Skip to content

Commit

Permalink
Merge pull request #2067 from steoxley/rose-mpi-launch
Browse files Browse the repository at this point in the history
Rose mpi launch
  • Loading branch information
matthewrmshin authored Apr 19, 2017
2 parents 61ee7b5 + 6376a13 commit ce63ef7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion bin/rose-mpi-launch
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ while (($# > 0)); do
err "ROSE_LAUNCHER_ULIMIT_OPTS=$ROSE_LAUNCHER_ULIMIT_OPTS"
:;;
*)
ulimit -$OPT $OPTARG || err \
ulimit -$OPT ${OPTARG:-} || err \
"ROSE_LAUNCHER_ULIMIT_OPTS=$ROSE_LAUNCHER_ULIMIT_OPTS"
:;;
esac
Expand Down
17 changes: 10 additions & 7 deletions t/rose-mpi-launch/01-command-inner.t
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,18 @@ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Use ROSE_LAUNCHER_ULIMIT_OPTS.
TEST_KEY=$TEST_KEY_BASE-ulimit-good
ULIMIT_STACK=$(ulimit -s)
if [[ $ULIMIT_STACK == 'unlimited' ]]; then
ULIMIT_STACK_NEW=$ULIMIT_STACK
ULIMIT_FILE_SIZE=$(ulimit -f)
if [[ $ULIMIT_FILE_SIZE == 'unlimited' ]]; then
ULIMIT_FILE_SIZE_NEW=100000
else
ULIMIT_STACK_NEW=$(($(ulimit -s) / 2))
ULIMIT_FILE_SIZE_NEW=$(($(ulimit -f) / 2))
fi
ROSE_LAUNCHER_ULIMIT_OPTS="-s $ULIMIT_STACK_NEW" \
run_pass "$TEST_KEY" rose mpi-launch --inner bash -c 'ulimit -s'
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<<$ULIMIT_STACK_NEW
ROSE_LAUNCHER_ULIMIT_OPTS="-f $ULIMIT_FILE_SIZE_NEW -H" \
run_pass "$TEST_KEY" rose mpi-launch --inner bash -c 'ulimit -f'
file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__
$ULIMIT_FILE_SIZE_NEW
$ULIMIT_FILE_SIZE_NEW
__OUT__
file_cmp "$TEST_KEY.err" "$TEST_KEY.err" </dev/null
#-------------------------------------------------------------------------------
# Use bad ROSE_LAUNCHER_ULIMIT_OPTS.
Expand Down

0 comments on commit ce63ef7

Please sign in to comment.