Skip to content

Commit

Permalink
Merge pull request #14 from wihobbs/openmpi-options
Browse files Browse the repository at this point in the history
mpi: add testing for openmpi on corona
  • Loading branch information
wihobbs authored Jan 31, 2024
2 parents 5f2724f + ab320ee commit e073769
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ default:
script:
- export MPI_TESTS_DIRECTORY=$(pwd)/mpi
- export FTC_DIRECTORY=$(pwd)
- flux run -N2 $CORE_BUILD_DIR/src/cmd/flux start $MPI_TESTS_DIRECTORY/outer_script.sh
- flux run -N2 $CORE_INSTALL_PREFIX/bin/flux start $MPI_TESTS_DIRECTORY/outer_script.sh

corona-core-build:
extends:
Expand Down
7 changes: 4 additions & 3 deletions .gitlab/builds.gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
- cd flux-core
- ./autogen.sh
- mkdir build
- cd build
- mkdir install
- ../configure --prefix=$(pwd)/install
- cd build
- ../configure --prefix=${CI_DIRECTORY}/flux-core/install
- make -j $(nproc)
## need to install to get pkgconfig files
- make -j $(nproc) install
- export CORE_BUILD_DIR=$(pwd)
- export CORE_INSTALL_PREFIX=$(pwd)/install
- export CORE_INSTALL_PREFIX=${CI_DIRECTORY}/flux-core/install
- cd $FTC_DIRECTORY
- echo "CI_DIRECTORY=${CI_DIRECTORY}" >> build.env
- echo "CORE_BUILD_DIR=${CORE_BUILD_DIR}" >> build.env
Expand Down
2 changes: 1 addition & 1 deletion mpi/inner_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ 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"
flux bulksubmit -n1 --watch mpicc -o {} {}.c ::: $TESTS || die "Compilation failure in tests"
flux bulksubmit --watch -N $BATCH_NNODES -n $BATCH_NCORES --output=kvs ./{} ::: $TESTS
flux bulksubmit --watch -N $BATCH_NNODES -n $BATCH_NCORES $EXTRA_FLUX_SUBMIT_OPTIONS --output=kvs ./{} ::: $TESTS
RC=$?
rm -rf $FTC_DIRECTORY/$NAME
exit $RC
7 changes: 6 additions & 1 deletion mpi/outer_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ intel-classic

corona_MPIS="
mvapich2
openmpi
"

export TESTS="hello
Expand All @@ -22,7 +23,11 @@ COMPILERS="${LCSCHEDCLUSTER}_COMPILERS"

for mpi in ${!MPIS}; do
for compiler in ${!COMPILERS}; do
flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $mpi $compiler
if [[ $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
else
flux batch -N2 -n4 --flags=waitable --output=kvs $MPI_TESTS_DIRECTORY/inner_script.sh $mpi $compiler
fi
done
done
flux job wait --all
Expand Down

0 comments on commit e073769

Please sign in to comment.