Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rose mpi launch #2067

Merged
merged 2 commits into from Apr 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/rose-mpi-launch
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
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