Skip to content

Commit

Permalink
fix: get core ids for multiple numas
Browse files Browse the repository at this point in the history
  • Loading branch information
assafgi committed Nov 11, 2024
1 parent 7935f77 commit 798aad8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions bash_functions/get_bash_function.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,9 @@ func GetCoreIds() string {
get_core_ids() {
core_idx_end=$(($core_idx_begin + $1))
if [[ ${numa_num} > 1 ]]; then
index=$((i%2))
index=$((core_idx_begin%2))
core_ids=(${numa[$index]})
index_in_numa=$((core_idx_begin/2))
res=${core_ids["$index_in_numa"]}
res=${core_ids[$((core_idx_begin/2))]}
for (( i=$(($core_idx_begin+1)); i<$core_idx_end; i++ )); do
index=$(($i%2))
core_ids=(${numa[$index]})
Expand Down

0 comments on commit 798aad8

Please sign in to comment.