-
-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Do not remove --as-needed from LDFLAGS * Add mpiexec.sh wrapper to workaround O_NONBLOCK issues * Add test for mpiexec with shell script * Add test for mpifort compiler wrapper
- Loading branch information
Showing
6 changed files
with
62 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
# pipe stdout, stderr through cat to avoid O_NONBLOCK issues | ||
exec mpiexec "$@" 2>&1</dev/null | cat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,58 @@ | ||
#!/bin/bash | ||
set -x | ||
|
||
command -v mpichversion | ||
mpichversion | ||
|
||
command -v mpicc | ||
mpicc -show | ||
|
||
command -v mpicxx | ||
mpicxx -show | ||
|
||
command -v mpif90 | ||
mpif90 -show | ||
|
||
command -v mpiexec | ||
set -ex | ||
|
||
export HYDRA_LAUNCHER=fork | ||
MPIEXEC="${PWD}/mpiexec.sh" | ||
|
||
pushd "tests" | ||
|
||
function mpi_exec() { | ||
# use pipes to avoid O_NONBLOCK issues on stdin, stdout | ||
mpiexec -launcher fork $@ 2>&1 </dev/null | cat | ||
} | ||
|
||
if [[ $PKG_NAME == "mpich" ]]; then | ||
mpi_exec -n 4 python test_exec.py | ||
command -v mpichversion | ||
mpichversion | ||
|
||
command -v mpiexec | ||
$MPIEXEC -n 1 mpivars | ||
$MPIEXEC -n 4 ./helloworld.sh | ||
fi | ||
|
||
if [[ $PKG_NAME == "mpich-mpicc" ]]; then | ||
command -v mpicc | ||
mpicc -show | ||
|
||
mpicc $CFLAGS $LDFLAGS helloworld.c -o helloworld_c | ||
mpi_exec -n 4 ./helloworld_c | ||
$MPIEXEC -n 4 ./helloworld_c | ||
fi | ||
|
||
if [[ $PKG_NAME == "mpich-mpicxx" ]]; then | ||
command -v mpicxx | ||
mpicxx -show | ||
|
||
mpicxx $CXXFLAGS $LDFLAGS helloworld.cxx -o helloworld_cxx | ||
mpi_exec -n 4 ./helloworld_cxx | ||
$MPIEXEC -n 4 ./helloworld_cxx | ||
fi | ||
|
||
if [[ $PKG_NAME == "mpich-mpifort" ]]; then | ||
mpif77 $FFLAGS $LDFLAGS helloworld.f -o helloworld_f | ||
mpi_exec -n 4 ./helloworld_f | ||
command -v mpifort | ||
mpifort -show | ||
|
||
mpifort $FFLAGS $LDFLAGS helloworld.f -o helloworld1_f | ||
$MPIEXEC -n 4 ./helloworld1_f | ||
|
||
mpifort $FFLAGS $LDFLAGS helloworld.f90 -o helloworld1_f90 | ||
$MPIEXEC -n 4 ./helloworld1_f90 | ||
|
||
command -v mpif77 | ||
mpif77 -show | ||
|
||
mpif77 $FFLAGS $LDFLAGS helloworld.f -o helloworld2_f | ||
$MPIEXEC -n 4 ./helloworld2_f | ||
|
||
command -v mpif90 | ||
mpif90 -show | ||
|
||
mpif90 $FFLAGS $LDFLAGS helloworld.f90 -o helloworld2_f90 | ||
$MPIEXEC -n 4 ./helloworld2_f90 | ||
|
||
mpif90 $FFLAGS $LDFLAGS helloworld.f90 -o helloworld_f90 | ||
mpi_exec -n 4 ./helloworld_f90 | ||
fi | ||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
set -eu | ||
rank=$PMI_RANK | ||
size=$PMI_SIZE | ||
printf "Hello, World! I am process %d of %d.\n" $rank $size |
This file was deleted.
Oops, something went wrong.