Skip to content

Commit

Permalink
Merge pull request #16 from wihobbs/openmpi5
Browse files Browse the repository at this point in the history
mpi: add testing support for openmpi5
  • Loading branch information
wihobbs authored Feb 15, 2024
2 parents 584a73c + 96b2e0d commit 81855f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
9 changes: 7 additions & 2 deletions mpi/inner_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,22 @@ BATCH_NNODES=$(flux resource list -n -o {nnodes})
BATCH_NCORES=$(flux resource list -n -o {ncores})
COMPILER=$1
MPI=$2
export NAME="$COMPILER"_"$MPI"
export NAME=$(echo "$COMPILER"_"$MPI" | sed "s/\///")

test -n $COMPILER || die "COMPILER (argument 1) not set"
test -n $MPI || die "MPI (argument 2) not set"
if [[ $MPI == "openmpi/5" ]]; then
## This is the Corona OpenMPI5 side-installed modulefile. Only load when
## openmpi5 is needed.
module use -q /usr/global/tools/mpi/toss_4_x86_64_ib/modulefiles/Core/
fi
module load $COMPILER || die "Compiler $COMPILER is unavailable on $LCSCHEDCLUSTER"
module load $MPI || die "MPI implementation $MPI is unavailable on $LCSCHEDCLUSTER"
test -n $FTC_DIRECTORY || die "FTC_DIRECTORY not set"
mkdir $FTC_DIRECTORY/$NAME || die "Unable to create directory for $FTC_DIRECTORY/$NAME"
cp -r $MPI_TESTS_DIRECTORY/* $FTC_DIRECTORY/$NAME
cd $FTC_DIRECTORY/$NAME || die "Could not find $FTC_DIRECTORY/$NAME"
echo "Running with $1 compiler and $2 MPI"
echo "Running with $COMPILER compiler and $MPI MPI"
flux bulksubmit -n1 --watch mpicc -o {} {}.c ::: $TESTS || die "Compilation failure in tests"
flux bulksubmit --watch -N $BATCH_NNODES -n $BATCH_NCORES $EXTRA_FLUX_SUBMIT_OPTIONS --output=kvs ./{} ::: $TESTS
RC=$?
Expand Down
11 changes: 6 additions & 5 deletions mpi/outer_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ intel-classic

corona_MPIS="
mvapich2
openmpi
openmpi/4
openmpi/5
"

export TESTS="hello
Expand All @@ -33,11 +34,11 @@ COMPILERS="${LCSCHEDCLUSTER}_COMPILERS"
for mpi in ${!MPIS}; do
for compiler in ${!COMPILERS}; do
if [[ $mpi == "cray-mpich" ]]; then
EXTRA_FLUX_SUBMIT_OPTIONS="-o pmi=cray-pals" flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $mpi $compiler
elif [[ $mpi == "openmpi" ]]; then
EXTRA_FLUX_SUBMIT_OPTIONS="-o pmi=pmix" flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $mpi $compiler
EXTRA_FLUX_SUBMIT_OPTIONS="-o pmi=cray-pals" flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $compiler $mpi
elif [[ $mpi == "openmpi"* ]]; then
EXTRA_FLUX_SUBMIT_OPTIONS="-o pmi=pmix" flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $compiler $mpi
else
flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $mpi $compiler
flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $compiler $mpi
fi
done
done
Expand Down

0 comments on commit 81855f2

Please sign in to comment.