Skip to content
Snippets Groups Projects
Commit 843990ea authored by Enol Fernandez's avatar Enol Fernandez
Browse files

Should fix issue #9, enhanced test for issue #1.

parent 80021c32
Branches
Tags
1 merge request!10Preparing release 1.5.2
......@@ -22,12 +22,18 @@ mpi_start_get_plugin "osc_mpiexec.sh" 1
# further determine if the mpiexec is hydra
if test $OSC_MPIEXEC -eq 0 ; then
if test "x$MPI_MPIEXEC" != "x"; then
# try with mpiexec.hydra
# No mpiexec? try finding mpiexec.hydra
MPIEXEC=`which mpiexec.hydra 2> /dev/null`
if test $? -eq 0 -a "x$MPI_MPICH2_DISABLE_HYDRA" != "x1" ; then
export HYDRA_MPIEXEC=1
MPI_MPIEXEC=$MPIEXEC
fi
else
# check if defined mpiexec is hydra
$MPI_MPIEXEC -version 2>&1 | grep -i "hydra" > /dev/null 2>&1
if test $? -eq 0 ; then
export HYDRA_MPIEXEC=1
fi
fi
fi
......
......@@ -7,10 +7,19 @@ unset I2G_MPIEXEC_COMM
# detect OSC mpiexec
if test "x$MPI_MPIEXEC" != "x"; then
$MPI_MPIEXEC 2>&1 | grep -e "-\<np\>" > /dev/null 2>&1
local VERSION_INFO=`$MPI_MPIEXEC -version 2>&1`
st=$?
if test $st -ne 0 ; then
export OSC_MPIEXEC=1
if test $st -eq 0 ; then
echo $VERSION_INFO | grep -i "hydra" > /dev/null 2>&1
st=$?
if test $st -ne 0 ; then
# for sure not hydra, check that we do not have -np option
$MPI_MPIEXEC 2>&1 | grep -e "-\<np\>" > /dev/null 2>&1
st=$?
if test $st -ne 0 ; then
export OSC_MPIEXEC=1
fi
fi
fi
fi
......
......@@ -94,8 +94,8 @@ if test "x${RUN_UNIT_TESTS}" = "x1" ; then
./test_unit.sh || exitcode=1
echo "* RFC #63"
./test_trac_63.sh || exitcode=1
echo "* Issue #1"
./test_issue_1.sh || exitcode=1
echo "* Issue #1, #9"
./test_issue_1_and_9.sh || exitcode=1
echo "* Issue #6"
./test_issue_6.sh || exitcode=1
echo "***************************"
......
......@@ -23,6 +23,10 @@ fake_mpiexec() {
echo "fake mpiexec -np option" 1>&2
}
fake_hydra_mpiexec() {
echo "fake hydra mpiexec, fake no options" 1>&2
}
testValidOSCmpiexec() {
export MPI_MPIEXEC=fake_osc_mpiexec
mpi_start_get_plugin "osc_mpiexec.sh" 1
......@@ -37,6 +41,12 @@ testInvalidOSCmpiexec() {
assertEquals "0" "$OSC_MPIEXEC"
}
# XXX missing tests for OSC mpiexec with the implementations
testHydrampiexec() {
export MPI_MPIEXEC=fake_hydra_mpiexec
mpi_start_get_plugin "osc_mpiexec.sh" 1
. $MPI_START_PLUGIN_FILES
assertEquals "0" "$OSC_MPIEXEC"
}
. $SHUNIT2
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment