Skip to content

Commit

Permalink
ci: test with mpirun -np 4, 1 GPU per rank
Browse files Browse the repository at this point in the history
  • Loading branch information
mgates3 committed Jun 27, 2024
1 parent 73f2ad2 commit b89a59d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/setup_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ mpif90 --version
#----------------------------------------------------------------- GPU
# Find idle GPUs. gpu_bind.sh also uses ${idle_gpus}.
# Arrays can't be exported, effectively.
export idle_gpus=$(./tools/idle_gpus.py)
export idle_gpus=$(./test/idle_gpus.py)
idle_gpus_array=(${idle_gpus}) # convert to array
gpu_kind=${idle_gpus_array[0]} # element 0 is gpu_kind: cuda or rocm
idle_gpus_array=(${idle_gpus_array[@]:1}) # slice elements 1:end
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ if [ "$maker" = "cmake" ]; then
tests="potrf"
fi

./run_tests.py ${args} --xml ${top}/report-${maker}.xml ${tests}
./run_tests.py --test 'mpirun -np 4 ./gpu_bind.sh ./tester' ${args} ${tests}
(( err += $? ))

print "======================================== Smoke tests"
Expand Down
4 changes: 3 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ add_custom_command(
TARGET ${tester} POST_BUILD
COMMAND
cp ${CMAKE_CURRENT_SOURCE_DIR}/run_tests.py
${CMAKE_CURRENT_BINARY_DIR}/run_tests.py
${CMAKE_CURRENT_SOURCE_DIR}/gpu_bind.sh
${CMAKE_CURRENT_SOURCE_DIR}/idle_gpus.py
${CMAKE_CURRENT_BINARY_DIR}/
)

if (slate_is_project)
Expand Down
4 changes: 2 additions & 2 deletions test/gpu_bind.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ fi
# Ignore GPUs that are already have processes.
# Use cached ${idle_gpus} if it was already set in setup_env.sh
if [ -z "${idle_gpus+x}" ]; then
echo "${local_rank} ../tools/idle_gpus.py"
export idle_gpus=$(../tools/idle_gpus.py)
echo "${local_rank} ./idle_gpus.py"
export idle_gpus=$(./idle_gpus.py)
fi

# Arrays can't be exported, effectively.
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ def filter_csv( values, csv ):
# Requires ref to check. Only QR.
cmds += [[ 'heev', gen + dtype + la + n + ' --jobz n --ref y --method-eig qr' ]]
if ('v' in jobz):
cmds += [[ 'heev', gen + dtype + la + n + ' --jobz v --method-eig qr,dc' ]]
cmds += [[ 'heev', gen + dtype + la + n + ' --jobz v --method-eig dc' ]]
cmds += [[ 'heev', gen + dtype + la + n + ' --jobz v --method-eig qr' ]]

cmds += [
# heev uses only side=l, no-trans. side=r and trans don't yet work
Expand Down

0 comments on commit b89a59d

Please sign in to comment.