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

Use --external-launcher for Slurm launch #58

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions configure.common.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ AS_CASE([$sysconfdir],
BROKEN_SRUN=0
bad_srun_major=20
bad_srun_minor=11
good_srun_major=0
good_srun_minor=0
good_srun_major=23
good_srun_minor=11
if test "x$ENABLE_SLURM" == "xtrue"; then
AC_PATH_PROG(SRUN_PATH, "srun", "none")
if test "x$SRUN_PATH" == "xnone"; then
Expand All @@ -135,10 +135,7 @@ if test "x$ENABLE_SLURM" == "xtrue"; then
srun_major=`echo $srun_version | cut -d . -f 1`
srun_minor=`echo $srun_version | cut -d . -f 2`
srun_point=`echo $srun_version | cut -d . -f 3`
if ( [[ "$srun_major" == "$bad_srun_major" ]] && [[ $srun_minor -ge $bad_srun_minor ]] ) || [[ $srun_major -gt $bad_srun_major ]] ; then BROKEN_SRUN=1; fi
if test "x$good_srun_major" != "x0"; then
if ( [[ "$srun_major" == "$good_srun_major" ]] && [[ $srun_minor -ge $good_srun_minor ]] ) || [[ $srun_major -gt $good_srun_major ]] ; then BROKEN_SRUN=0; fi
fi
if ( [ "$srun_major" == "$good_srun_major" ] && [ $srun_minor -lt $good_srun_minor ] ) || [ $srun_major -lt $good_srun_major ]; then BROKEN_SRUN=1; fi

if test "x$BROKEN_SRUN" == "x1"; then
AC_MSG_RESULT([no])
Expand All @@ -165,7 +162,7 @@ fi
if test "x$ENABLE_RSH_LAUNCH" == "x1"; then
AC_DEFINE_UNQUOTED([RSHLAUNCH_ENABLED],[1],[Default mode for rsh launch])
fi
AC_DEFINE_UNQUOTED([BROKEN_SRUN],[1],[Whether we are using a broken srun])
AC_DEFINE_UNQUOTED([BROKEN_SRUN],[$BROKEN_SRUN],[Whether we are using a broken srun])

#Runmode detection (pipe/socket or cobo/msocket communications)
if test "x$OS_BUILD" == "xlinux"; then
Expand Down
4 changes: 1 addition & 3 deletions src/fe/startup/launch_slurm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,8 @@ bool SlurmLauncher::spawnDaemon()
char count_buffer[64];
snprintf(count_buffer, 64, "%d", nnodes);
new_daemon_args[i++] = const_cast<char *>("srun");
new_daemon_args[i++] = const_cast<char *>("--ntasks-per-node=1");
new_daemon_args[i++] = const_cast<char *>("--external-launcher");
new_daemon_args[i++] = const_cast<char *>("--wait=0");
new_daemon_args[i++] = const_cast<char *>("--gres=none");
new_daemon_args[i++] = const_cast<char *>("--mem=0");
new_daemon_args[i++] = const_cast<char *>("-n");
new_daemon_args[i++] = count_buffer;
new_daemon_args[i++] = const_cast<char *>("-N");
Expand Down