Skip to content

Instantly share code, notes, and snippets.

@rasolca
Created February 4, 2025 18:00
Show Gist options
  • Save rasolca/fd9720690183ed26e4263e478f963f09 to your computer and use it in GitHub Desktop.
Save rasolca/fd9720690183ed26e4263e478f963f09 to your computer and use it in GitHub Desktop.
#!/bin/bash -e
pushd /DLA-Future-build > /dev/null
export CUDA_VISIBLE_DEVICE=$(( SLURM_LOCALID % 4 ))
echo "Rank $SLURM_PROCID: set CUDA_VISIBLE_DEVICE=$CUDA_VISIBLE_DEVICE"
# Run the tests, only output on the first rank
if [[ $SLURM_PROCID == "0" ]]; then
TZ=CET date +"Run started at: %H:%M:%S %z"
/DLA-Future-build/test/unit/c_api/eigensolver/test_gen_eigensolver_c_api --pika:threads=16 | grep -v "PU.*Core.*Socket.*pool" | grep -v "MPI rank: 0" | grep -E -v "\*{70}"
TZ=CET date +"Run finished at: %H:%M:%S %z"
else
/DLA-Future-build/test/unit/c_api/eigensolver/test_gen_eigensolver_c_api --pika:threads=16 > /dev/null
fi
popd > /dev/null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment