Skip to content

Commit

Permalink
Set env flag in travis that allow oversubscription with openMPI and a…
Browse files Browse the repository at this point in the history
…dd option for provided MPIEXEC args to run-scripts.sh
  • Loading branch information
shuds13 committed Nov 22, 2017
1 parent d641287 commit 92f056c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -10,7 +10,7 @@ sudo: false
env:
global:
- HYDRA_LAUNCHER=fork

- OMPI_MCA_rmaps_base_oversubscribe=yes
matrix:
- MPI=mpich
- MPI=openmpi
Expand Down
13 changes: 9 additions & 4 deletions code/tests/run-tests.sh
Expand Up @@ -131,8 +131,9 @@ unset RUN_PREFIX
script_name=`basename "$0"`
RUN_PREFIX=$script_name
CLEAN_ONLY=false
unset MPIEXEC_FLAGS

while getopts ":p:n:c" opt; do
while getopts ":p:n:a:c" opt; do
case $opt in
p)
echo "Parameter supplied for Python version: $OPTARG" >&2
Expand All @@ -142,6 +143,10 @@ while getopts ":p:n:c" opt; do
echo "Parameter supplied for Test Name: $OPTARG" >&2
RUN_PREFIX=$OPTARG
;;
a)
echo "Parameter supplied for mpiexec args: $OPTARG" >&2
MPIEXEC_FLAGS=$OPTARG
;;
c)
#echo "Cleaning test output: $OPTARG" >&2
echo "Cleaning test output"
Expand Down Expand Up @@ -243,7 +248,7 @@ if [ "$root_found" = true ]; then
tput bold;tput setaf 6
echo -e "\n$RUN_PREFIX --$PYTHON_RUN: Running regression tests"
tput sgr 0

cd $ROOT_DIR/$REG_TEST_SUBDIR

#Check output dir exists.
Expand Down Expand Up @@ -303,11 +308,11 @@ if [ "$root_found" = true ]; then
if [ "$RUN_TEST" = "true" ]; then

if [ "$REG_USE_PYTEST" = true ]; then
mpiexec -np $NPROCS $PYTHON_RUN -m pytest $TEST_SCRIPT >> $TEST_SCRIPT.$NPROCS'procs'.$REG_TEST_OUTPUT_EXT 2>test.err
mpiexec -np $NPROCS $MPIEXEC_FLAGS $PYTHON_RUN -m pytest $TEST_SCRIPT >> $TEST_SCRIPT.$NPROCS'procs'.$REG_TEST_OUTPUT_EXT 2>test.err
#mpiexec -np $REG_TEST_PROCESS_COUNT $PYTHON_RUN -m pytest $COV_LINE_PARALLEL test_libE_on_GKLS_pytest.py >> $REG_TEST_OUTPUT
test_code=$?
else
mpiexec -np $NPROCS $PYTHON_RUN $COV_LINE_PARALLEL $TEST_SCRIPT >> $TEST_SCRIPT.$NPROCS'procs'.$REG_TEST_OUTPUT_EXT 2>test.err
mpiexec -np $NPROCS $MPIEXEC_FLAGS $PYTHON_RUN $COV_LINE_PARALLEL $TEST_SCRIPT >> $TEST_SCRIPT.$NPROCS'procs'.$REG_TEST_OUTPUT_EXT 2>test.err
test_code=$?
fi
reg_count_runs=$((reg_count_runs+1))
Expand Down

0 comments on commit 92f056c

Please sign in to comment.