From e26c62c81eab9638d35529bd18750faf01034c78 Mon Sep 17 00:00:00 2001 From: Matt Ezell Date: Fri, 17 Jan 2025 01:10:12 -0500 Subject: [PATCH] Use --external-launcher for Slurm launch --- configure.common.ac | 11 ++++------- src/fe/startup/launch_slurm.cc | 4 +--- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/configure.common.ac b/configure.common.ac index 5bfcb2a..4fb4c5e 100644 --- a/configure.common.ac +++ b/configure.common.ac @@ -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 @@ -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]) @@ -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 diff --git a/src/fe/startup/launch_slurm.cc b/src/fe/startup/launch_slurm.cc index 6e647fa..2433e17 100644 --- a/src/fe/startup/launch_slurm.cc +++ b/src/fe/startup/launch_slurm.cc @@ -159,10 +159,8 @@ bool SlurmLauncher::spawnDaemon() char count_buffer[64]; snprintf(count_buffer, 64, "%d", nnodes); new_daemon_args[i++] = const_cast("srun"); - new_daemon_args[i++] = const_cast("--ntasks-per-node=1"); + new_daemon_args[i++] = const_cast("--external-launcher"); new_daemon_args[i++] = const_cast("--wait=0"); - new_daemon_args[i++] = const_cast("--gres=none"); - new_daemon_args[i++] = const_cast("--mem=0"); new_daemon_args[i++] = const_cast("-n"); new_daemon_args[i++] = count_buffer; new_daemon_args[i++] = const_cast("-N");