From fd252f6f45ce4864c53f46e15e6b8bc38478b7bc Mon Sep 17 00:00:00 2001 From: Mehdi Dogguy <mehdi@debian.org> Date: Mon, 8 Sep 2014 21:36:16 +0200 Subject: [PATCH] Imported Upstream version 2.1.14 --- META | 4 +- Makefile.in | 1 + NEWS | 65 ++++++++++++- auxdir/Makefile.in | 1 + auxdir/x_ac_bluegene.m4 | 80 ++++++++-------- configure | 95 +++++++++++-------- configure.ac | 10 +- contribs/Makefile.in | 1 + contribs/pam/Makefile.in | 1 + contribs/perlapi/Makefile.in | 1 + contribs/phpext/Makefile.in | 1 + contribs/slurmdb-direct/Makefile.in | 1 + contribs/torque/Makefile.in | 1 + doc/Makefile.in | 1 + doc/html/Makefile.in | 1 + doc/html/accounting.shtml | 10 +- doc/html/resource_limits.shtml | 16 ++-- doc/html/team.shtml | 3 + doc/man/Makefile.in | 1 + doc/man/man1/sacct.1 | 16 ++-- doc/man/man1/salloc.1 | 2 +- doc/man/man1/sbatch.1 | 2 +- doc/man/man1/sreport.1 | 8 +- doc/man/man1/srun.1 | 2 +- doc/man/man5/slurm.conf.5 | 8 +- doc/man/man5/slurmdbd.conf.5 | 8 +- doc/man/man5/wiki.conf.5 | 10 ++ etc/init.d.slurm | 2 +- etc/init.d.slurmdbd | 2 +- slurm.spec | 29 ++++-- src/Makefile.in | 1 + src/api/Makefile.in | 1 + src/common/Makefile.in | 1 + src/common/assoc_mgr.c | 4 +- src/database/Makefile.in | 1 + src/plugins/Makefile.in | 1 + src/plugins/accounting_storage/Makefile.in | 1 + .../accounting_storage/filetxt/Makefile.in | 1 + .../accounting_storage/mysql/Makefile.in | 1 + .../mysql/accounting_storage_mysql.c | 65 ++++++++++++- .../accounting_storage/none/Makefile.in | 1 + .../accounting_storage/pgsql/Makefile.in | 1 + .../accounting_storage/slurmdbd/Makefile.in | 1 + src/plugins/auth/Makefile.in | 1 + src/plugins/auth/authd/Makefile.in | 1 + src/plugins/auth/munge/Makefile.in | 1 + src/plugins/auth/none/Makefile.in | 1 + src/plugins/checkpoint/Makefile.in | 1 + src/plugins/checkpoint/aix/Makefile.in | 1 + src/plugins/checkpoint/blcr/Makefile.in | 1 + src/plugins/checkpoint/none/Makefile.in | 1 + src/plugins/checkpoint/ompi/Makefile.in | 1 + src/plugins/checkpoint/xlch/Makefile.in | 1 + src/plugins/crypto/Makefile.in | 1 + src/plugins/crypto/munge/Makefile.in | 1 + src/plugins/crypto/openssl/Makefile.in | 1 + src/plugins/jobacct_gather/Makefile.in | 1 + src/plugins/jobacct_gather/aix/Makefile.in | 1 + src/plugins/jobacct_gather/linux/Makefile.in | 1 + src/plugins/jobacct_gather/none/Makefile.in | 1 + src/plugins/jobcomp/Makefile.in | 1 + src/plugins/jobcomp/filetxt/Makefile.in | 1 + src/plugins/jobcomp/mysql/Makefile.in | 1 + src/plugins/jobcomp/none/Makefile.in | 1 + src/plugins/jobcomp/pgsql/Makefile.in | 1 + src/plugins/jobcomp/script/Makefile.in | 1 + src/plugins/mpi/Makefile.in | 1 + src/plugins/mpi/lam/Makefile.in | 1 + src/plugins/mpi/mpich1_p4/Makefile.in | 1 + src/plugins/mpi/mpich1_shmem/Makefile.in | 1 + src/plugins/mpi/mpichgm/Makefile.in | 1 + src/plugins/mpi/mpichmx/Makefile.in | 1 + src/plugins/mpi/mvapich/Makefile.in | 1 + src/plugins/mpi/none/Makefile.in | 1 + src/plugins/mpi/openmpi/Makefile.in | 1 + src/plugins/preempt/Makefile.in | 1 + src/plugins/preempt/none/Makefile.in | 1 + .../preempt/partition_prio/Makefile.in | 1 + src/plugins/preempt/qos/Makefile.in | 1 + src/plugins/priority/Makefile.in | 1 + src/plugins/priority/basic/Makefile.in | 1 + src/plugins/priority/multifactor/Makefile.in | 1 + src/plugins/proctrack/Makefile.in | 1 + src/plugins/proctrack/aix/Makefile.in | 1 + src/plugins/proctrack/linuxproc/Makefile.in | 1 + src/plugins/proctrack/lua/Makefile.in | 1 + src/plugins/proctrack/pgid/Makefile.in | 1 + src/plugins/proctrack/rms/Makefile.in | 1 + src/plugins/proctrack/sgi_job/Makefile.in | 1 + src/plugins/sched/Makefile.in | 1 + src/plugins/sched/backfill/Makefile.in | 1 + src/plugins/sched/builtin/Makefile.in | 1 + src/plugins/sched/hold/Makefile.in | 1 + src/plugins/sched/wiki/Makefile.in | 1 + src/plugins/sched/wiki/get_nodes.c | 34 +++++++ src/plugins/sched/wiki/msg.c | 54 ++++++++++- src/plugins/sched/wiki/msg.h | 1 + src/plugins/sched/wiki2/Makefile.in | 1 + src/plugins/sched/wiki2/get_nodes.c | 34 +++++++ src/plugins/sched/wiki2/msg.c | 54 ++++++++++- src/plugins/sched/wiki2/msg.h | 1 + src/plugins/select/Makefile.in | 1 + src/plugins/select/bluegene/Makefile.in | 1 + .../bluegene/block_allocator/Makefile.in | 1 + .../select/bluegene/plugin/Makefile.am | 10 +- .../select/bluegene/plugin/Makefile.in | 40 ++++++-- .../select/bluegene/plugin/bg_job_place.c | 23 ++++- .../select/bluegene/plugin/bg_job_run.c | 4 +- .../select/bluegene/plugin/libsched_if64.c | 16 +++- src/plugins/select/cons_res/Makefile.in | 1 + src/plugins/select/cons_res/dist_tasks.c | 30 ++++-- src/plugins/select/cons_res/job_test.c | 9 +- src/plugins/select/cons_res/select_cons_res.c | 37 +++++--- src/plugins/select/linear/Makefile.in | 1 + src/plugins/select/linear/select_linear.c | 29 ++++-- src/plugins/switch/Makefile.in | 1 + src/plugins/switch/elan/Makefile.in | 1 + src/plugins/switch/federation/Makefile.in | 1 + src/plugins/switch/none/Makefile.in | 1 + src/plugins/task/Makefile.in | 1 + src/plugins/task/affinity/Makefile.in | 1 + src/plugins/task/none/Makefile.in | 1 + src/plugins/topology/3d_torus/Makefile.in | 1 + src/plugins/topology/Makefile.in | 1 + src/plugins/topology/none/Makefile.in | 1 + src/plugins/topology/tree/Makefile.in | 1 + src/sacct/Makefile.in | 1 + src/sacctmgr/Makefile.in | 1 + src/salloc/Makefile.in | 1 + src/salloc/salloc.c | 29 ++++-- src/sattach/Makefile.in | 1 + src/sbatch/Makefile.in | 1 + src/sbcast/Makefile.in | 1 + src/scancel/Makefile.in | 1 + src/scontrol/Makefile.in | 1 + src/sinfo/Makefile.in | 1 + src/sinfo/opts.c | 11 ++- src/sinfo/print.c | 8 ++ src/sinfo/print.h | 4 + src/sinfo/sinfo.c | 16 +++- src/slurmctld/Makefile.in | 1 + src/slurmctld/agent.c | 5 +- src/slurmctld/job_mgr.c | 38 ++++++-- src/slurmctld/node_mgr.c | 24 ++++- src/slurmctld/partition_mgr.c | 10 +- src/slurmctld/power_save.c | 4 + src/slurmctld/proc_req.c | 2 +- src/slurmd/Makefile.in | 1 + src/slurmd/slurmd/Makefile.in | 1 + src/slurmd/slurmd/get_mach_stat.c | 4 +- src/slurmd/slurmd/get_mach_stat.h | 1 - src/slurmd/slurmd/req.c | 2 + src/slurmd/slurmstepd/Makefile.in | 1 + src/slurmd/slurmstepd/mgr.c | 55 ++++------- src/slurmd/slurmstepd/pdebug.c | 16 ++-- src/slurmd/slurmstepd/pdebug.h | 3 + src/slurmdbd/Makefile.in | 1 + src/smap/Makefile.in | 1 + src/sprio/Makefile.in | 1 + src/squeue/Makefile.in | 1 + src/squeue/opts.c | 28 +++++- src/squeue/print.c | 21 +++- src/squeue/print.h | 10 ++ src/sreport/Makefile.in | 1 + src/srun/Makefile.in | 1 + src/srun/allocate.c | 15 ++- src/srun/srun.c | 19 ++-- src/srun_cr/Makefile.in | 1 + src/sshare/Makefile.in | 1 + src/sstat/Makefile.in | 1 + src/strigger/Makefile.in | 1 + src/sview/Makefile.in | 1 + testsuite/Makefile.in | 1 + testsuite/expect/Makefile.in | 1 + testsuite/expect/test7.7 | 19 ++-- testsuite/expect/test7.8 | 9 ++ testsuite/slurm_unit/Makefile.in | 1 + testsuite/slurm_unit/api/Makefile.in | 1 + testsuite/slurm_unit/api/manual/Makefile.in | 1 + testsuite/slurm_unit/common/Makefile.in | 1 + testsuite/slurm_unit/slurmctld/Makefile.in | 1 + testsuite/slurm_unit/slurmd/Makefile.in | 1 + testsuite/slurm_unit/slurmdbd/Makefile.in | 1 + 183 files changed, 1002 insertions(+), 291 deletions(-) diff --git a/META b/META index e53e18407..9044a1713 100644 --- a/META +++ b/META @@ -3,9 +3,9 @@ Api_revision: 0 Major: 2 Meta: 1 - Micro: 11 + Micro: 14 Minor: 1 Name: slurm Release: 1 Release_tags: dist - Version: 2.1.11 + Version: 2.1.14 diff --git a/Makefile.in b/Makefile.in index 0dc3be89d..3759ec6fc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -174,6 +174,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/NEWS b/NEWS index 34308efff..983d1e9b1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,69 @@ This file describes changes in recent versions of SLURM. It primarily documents those changes that are of interest to users and admins. +* Changes in SLURM 2.1.14 +========================= + -- Fixed coding mistakes in _slurm_rpc_resv_show() and job_alloc_info() found + while reviewing the code. + -- Fix select/cons_res logic to prevent allocating resources while jobs + previously allocated resources on the node are still completing. + -- Fixed typo in job_mgr.c dealing with qos instead of associations. + -- Make sure associations and qos' are initiated when added. + -- Fixed wrong initialization for wckeys in the association manager. + -- Added wiki.conf configuration parameter of HidePartitionNodes. See + "man wiki.conf" for more information. + -- Add "JobAggregationTime=#" field SchedulerParameter configuration parameter + output. + -- Modify init.d/slurm and slurmdbd scripts to prevent the possible + inadvertent inclusion of "." in LD_LIBRARY_PATH environment variable. + To fail, the script would need to be executed by user root or SlurmUser + without the LD_LIBRARY_PATH environment variable set and there would + have to be a maliciously altered library in the working directory. + Thanks to Raphael Geissert for identifying the problem. + +* Changes in SLURM 2.1.13 +========================= + -- Fix race condition which can set a node state to IDLE on slurmctld startup + even if it has running jobs. + +* Changes in SLURM 2.1.12 +========================= + -- Fixes for building on OS X 10.5. + -- Fixed a few '-' without a '\' in front of them in the man pages. + -- Fixed issues in client tools where a requeued job did get displayed + correctly. + -- Update typos in doc/html/accounting.shtml doc/html/resource_limits.shtml + doc/man/man5/slurmdbd.conf.5 and doc/man/man5/slurm.conf.5 + -- Fixed a bug in exitcode:signal display in sacct + -- Fix bug when request comes in for consumable resources and the -c option + is used in conjunction with -O + -- Fixed squeue -o "%h" output formatting + -- Change select/linear message "error: job xxx: best_fit topology failure" + to debug type. + -- BLUEGENE - Fix for sinfo -R to group all midplanes together in a single + line for midplanes in an error state instead of 1 line for each midplane. + -- Fix srun to work correctly with --uid when getting an allocation + and creating a step, also fix salloc to assume identity at the correct + time as well. + -- BLUEGENE - Fixed issue with jobs being refused when running dynamic mode + and every job on the system happens to be the same size. + -- Removed bad #define _SLURMD_H from slurmd/get_mach_stat.h. Didn't appear + to cause any problems being there, just incorrect syntax. + -- Validate the job ID when salloc or srun receive an SRUN_JOB_COMPLETE RPC to + avoid killing the wrong job if the original command exits and the port gets + re-used by another command right away. + -- Fix to node in correct state in accounting when updating it to drain from + scontrol/sview. + -- BLUEGENE - Removed incorrect unlocking on error cases when starting jobs. + -- Improve logging of invalid sinfo and squeue print options. + -- BLUEGENE - Added check to libsched_if to allow root to run even outside of + SLURM. This is needed when running certain blocks outside of SLURM in HTC + mode. + +* Changes in SLURM 2.1.11-2 +=========================== + -- BLUEGENE - make it so libsched_if.so is named correctly on 'L' it is + libsched_if64.so and on 'P' it is libsched_if.so * Changes in SLURM 2.1.11 ========================= @@ -5156,4 +5219,4 @@ documents those changes that are of interest to users and admins. -- Change directory to /tmp in slurmd if daemonizing. -- Logfiles are reopened on reconfigure. -$Id: NEWS 20850 2010-07-30 16:33:18Z da $ +$Id: NEWS 21192 2010-09-20 17:58:20Z jette $ diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 483d51ac8..aa01c0dda 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -90,6 +90,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/auxdir/x_ac_bluegene.m4 b/auxdir/x_ac_bluegene.m4 index 5e3311363..74c96a847 100644 --- a/auxdir/x_ac_bluegene.m4 +++ b/auxdir/x_ac_bluegene.m4 @@ -1,5 +1,5 @@ ##***************************************************************************** -## $Id: x_ac_bluegene.m4 18361 2009-08-10 20:58:02Z jette $ +## $Id: x_ac_bluegene.m4 20908 2010-08-06 17:51:35Z da $ ##***************************************************************************** # AUTHOR: # Morris Jette <jette1@llnl.gov> @@ -8,7 +8,7 @@ # X_AC_BG # # DESCRIPTION: -# Test for Blue Gene/L specific files. +# Test for Blue Gene/L specific files. # If found define HAVE_BG and HAVE_FRONT_END. ##***************************************************************************** @@ -21,20 +21,20 @@ AC_DEFUN([X_AC_BGL], # test for bluegene emulation mode - AC_ARG_ENABLE(bluegene-emulation, AS_HELP_STRING(--enable-bluegene-emulation, deprecated use --enable-bgl-emulation), + AC_ARG_ENABLE(bluegene-emulation, AS_HELP_STRING(--enable-bluegene-emulation, deprecated use --enable-bgl-emulation), [ case "$enableval" in yes) bluegene_emulation=yes ;; no) bluegene_emulation=no ;; *) AC_MSG_ERROR([bad value "$enableval" for --enable-bluegene-emulation]) ;; - esac ]) + esac ]) - AC_ARG_ENABLE(bgl-emulation, AS_HELP_STRING(--enable-bgl-emulation,Run SLURM in BGL mode on a non-bluegene system), + AC_ARG_ENABLE(bgl-emulation, AS_HELP_STRING(--enable-bgl-emulation,Run SLURM in BGL mode on a non-bluegene system), [ case "$enableval" in yes) bgl_emulation=yes ;; no) bgl_emulation=no ;; *) AC_MSG_ERROR([bad value "$enableval" for --enable-bgl-emulation]) ;; - esac ]) - + esac ]) + if test "x$bluegene_emulation" = "xyes" -o "x$bgl_emulation" = "xyes"; then AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture]) @@ -52,43 +52,43 @@ AC_DEFUN([X_AC_BGL], for bg_dir in $trydb2dir "" $bg_default_dirs; do # Skip directories that don't exist if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; + continue; fi # Search for required BG API libraries in the directory if test -z "$have_bg_ar" -a -f "$bg_dir/lib64/libbglbridge.so" ; then - have_bg_ar=yes + have_bg_ar=yes bg_bridge_so="$bg_dir/lib64/libbglbridge.so" bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -lbglbridge -lbgldb -ltableapi -lbglmachine -lexpat -lsaymessage" - fi - + fi + # Search for required DB2 library in the directory if test -z "$have_db2" -a -f "$bg_dir/lib64/libdb2.so" ; then - have_db2=yes + have_db2=yes bg_db2_so="$bg_dir/lib64/libdb2.so" bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2" fi # Search for headers in the directory if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bg_hdr=yes - bg_includes="-I$bg_dir/include" + have_bg_hdr=yes + bg_includes="-I$bg_dir/include" fi done - + if test ! -z "$have_bg_ar" -a ! -z "$have_bg_hdr" -a ! -z "$have_db2" ; then # ac_with_readline="no" # Test to make sure the api is good - have_bg_files=yes + have_bg_files=yes saved_LDFLAGS="$LDFLAGS" LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bg_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/L api.)]) - LDFLAGS="$saved_LDFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bg_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/L api.)]) + LDFLAGS="$saved_LDFLAGS" fi if test ! -z "$have_bg_files" ; then BG_INCLUDES="$bg_includes" - CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture]) AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system]) @@ -101,9 +101,9 @@ AC_DEFUN([X_AC_BGL], AC_MSG_CHECKING(for BG serial value) bg_serial="BGL" AC_ARG_WITH(bg-serial, - AS_HELP_STRING(--with-bg-serial=NAME,set BG_SERIAL value), [bg_serial="$withval"]) + AS_HELP_STRING(--with-bg-serial=NAME,set BG_SERIAL value), [bg_serial="$withval"]) AC_MSG_RESULT($bg_serial) - AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value]) + AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value]) #define ac_bluegene_loaded so we don't load another bluegene conf ac_bluegene_loaded=yes fi @@ -114,15 +114,15 @@ AC_DEFUN([X_AC_BGL], AC_DEFUN([X_AC_BGP], [ # test for bluegene emulation mode - AC_ARG_ENABLE(bgp-emulation, AS_HELP_STRING(--enable-bgp-emulation,Run SLURM in BG/P mode on a non-bluegene system), + AC_ARG_ENABLE(bgp-emulation, AS_HELP_STRING(--enable-bgp-emulation,Run SLURM in BG/P mode on a non-bluegene system), [ case "$enableval" in yes) bgp_emulation=yes ;; no) bgp_emulation=no ;; *) AC_MSG_ERROR([bad value "$enableval" for --enable-bgp-emulation]) ;; - esac ]) + esac ]) # Skip if already set - if test "x$ac_bluegene_loaded" = "xyes" ; then + if test "x$ac_bluegene_loaded" = "xyes" ; then bg_default_dirs="" elif test "x$bgp_emulation" = "xyes"; then AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) @@ -136,42 +136,42 @@ AC_DEFUN([X_AC_BGP], ac_bluegene_loaded=yes else bg_default_dirs="/bgsys/drivers/ppcfloor" - fi - + fi + libname=bgpbridge for bg_dir in $trydb2dir "" $bg_default_dirs; do # Skip directories that don't exist if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; + continue; fi soloc=$bg_dir/lib64/lib$libname.so # Search for required BG API libraries in the directory if test -z "$have_bg_ar" -a -f "$soloc" ; then - have_bgp_ar=yes + have_bgp_ar=yes bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname" - fi - + fi + # Search for headers in the directory if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bgp_hdr=yes - bg_includes="-I$bg_dir/include" + have_bgp_hdr=yes + bg_includes="-I$bg_dir/include" fi done - + if test ! -z "$have_bgp_ar" -a ! -z "$have_bgp_hdr" ; then # ac_with_readline="no" # Test to make sure the api is good - saved_LDFLAGS="$LDFLAGS" + saved_LDFLAGS="$LDFLAGS" LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bgp_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/P api.)]) - LDFLAGS="$saved_LDFLAGS" + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ int rm_set_serial(char *); ]], [[ rm_set_serial(""); ]])],[have_bgp_files=yes],[AC_MSG_ERROR(There is a problem linking to the BG/P api.)]) + LDFLAGS="$saved_LDFLAGS" fi if test ! -z "$have_bgp_files" ; then BG_INCLUDES="$bg_includes" - CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" AC_DEFINE(HAVE_3D, 1, [Define to 1 if 3-dimensional architecture]) AC_DEFINE(SYSTEM_DIMENSIONS, 3, [3-dimensional architecture]) AC_DEFINE(HAVE_BG, 1, [Define to 1 if emulating or running on Blue Gene system]) @@ -179,12 +179,12 @@ AC_DEFUN([X_AC_BGP], AC_DEFINE(HAVE_FRONT_END, 1, [Define to 1 if running slurmd on front-end only]) AC_DEFINE(HAVE_BG_FILES, 1, [Define to 1 if have Blue Gene files]) AC_DEFINE_UNQUOTED(BG_BRIDGE_SO, "$soloc", [Define the BG_BRIDGE_SO value]) - + AC_MSG_CHECKING(for BG serial value) - bg_serial="BGP" + bg_serial="BGP" AC_ARG_WITH(bg-serial,, [bg_serial="$withval"]) AC_MSG_RESULT($bg_serial) - AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value]) + AC_DEFINE_UNQUOTED(BG_SERIAL, "$bg_serial", [Define the BG_SERIAL value]) #define ac_bluegene_loaded so we don't load another bluegene conf ac_bluegene_loaded=yes fi diff --git a/configure b/configure index abaa4ab33..ee62b10e7 100755 --- a/configure +++ b/configure @@ -864,6 +864,9 @@ CMD_LDFLAGS BLUEGENE_LOADED BLUEGENE_LOADED_FALSE BLUEGENE_LOADED_TRUE +BGL_LOADED +BGL_LOADED_FALSE +BGL_LOADED_TRUE BG_INCLUDES am__fastdepCC_FALSE am__fastdepCC_TRUE @@ -4475,37 +4478,37 @@ $as_echo "$as_me: Running in BG/L emulation mode" >&6;} for bg_dir in $trydb2dir "" $bg_default_dirs; do # Skip directories that don't exist if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; + continue; fi # Search for required BG API libraries in the directory if test -z "$have_bg_ar" -a -f "$bg_dir/lib64/libbglbridge.so" ; then - have_bg_ar=yes + have_bg_ar=yes bg_bridge_so="$bg_dir/lib64/libbglbridge.so" bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -lbglbridge -lbgldb -ltableapi -lbglmachine -lexpat -lsaymessage" - fi + fi # Search for required DB2 library in the directory if test -z "$have_db2" -a -f "$bg_dir/lib64/libdb2.so" ; then - have_db2=yes + have_db2=yes bg_db2_so="$bg_dir/lib64/libdb2.so" bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -ldb2" fi # Search for headers in the directory if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bg_hdr=yes - bg_includes="-I$bg_dir/include" + have_bg_hdr=yes + bg_includes="-I$bg_dir/include" fi done if test ! -z "$have_bg_ar" -a ! -z "$have_bg_hdr" -a ! -z "$have_db2" ; then # ac_with_readline="no" # Test to make sure the api is good - have_bg_files=yes + have_bg_files=yes saved_LDFLAGS="$LDFLAGS" LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int rm_set_serial(char *); int @@ -4528,7 +4531,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test ! -z "$have_bg_files" ; then BG_INCLUDES="$bg_includes" - CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" $as_echo "#define HAVE_3D 1" >>confdefs.h @@ -4581,6 +4584,17 @@ _ACEOF + if test "x$ac_bluegene_loaded" = "xyes"; then + BGL_LOADED_TRUE= + BGL_LOADED_FALSE='#' +else + BGL_LOADED_TRUE='#' + BGL_LOADED_FALSE= +fi + + + + # test for bluegene emulation mode # Check whether --enable-bgp-emulation was given. if test "${enable_bgp_emulation+set}" = set; then : @@ -4625,29 +4639,29 @@ $as_echo "$as_me: Running in BG/P emulation mode" >&6;} for bg_dir in $trydb2dir "" $bg_default_dirs; do # Skip directories that don't exist if test ! -z "$bg_dir" -a ! -d "$bg_dir" ; then - continue; + continue; fi soloc=$bg_dir/lib64/lib$libname.so # Search for required BG API libraries in the directory if test -z "$have_bg_ar" -a -f "$soloc" ; then - have_bgp_ar=yes + have_bgp_ar=yes bg_ldflags="$bg_ldflags -L$bg_dir/lib64 -L/usr/lib64 -Wl,--unresolved-symbols=ignore-in-shared-libs -l$libname" - fi + fi # Search for headers in the directory if test -z "$have_bg_hdr" -a -f "$bg_dir/include/rm_api.h" ; then - have_bgp_hdr=yes - bg_includes="-I$bg_dir/include" + have_bgp_hdr=yes + bg_includes="-I$bg_dir/include" fi done if test ! -z "$have_bgp_ar" -a ! -z "$have_bgp_hdr" ; then # ac_with_readline="no" # Test to make sure the api is good - saved_LDFLAGS="$LDFLAGS" + saved_LDFLAGS="$LDFLAGS" LDFLAGS="$saved_LDFLAGS $bg_ldflags -m64" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int rm_set_serial(char *); int @@ -4670,7 +4684,7 @@ rm -f core conftest.err conftest.$ac_objext \ if test ! -z "$have_bgp_files" ; then BG_INCLUDES="$bg_includes" - CFLAGS="$CFLAGS -m64" + CFLAGS="$CFLAGS -m64" $as_echo "#define HAVE_3D 1" >>confdefs.h @@ -4697,7 +4711,7 @@ _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BG serial value" >&5 $as_echo_n "checking for BG serial value... " >&6; } - bg_serial="BGP" + bg_serial="BGP" # Check whether --with-bg-serial was given. if test "${with_bg_serial+set}" = set; then : @@ -4717,6 +4731,7 @@ _ACEOF + if test "x$ac_bluegene_loaded" = "xyes"; then BLUEGENE_LOADED_TRUE= BLUEGENE_LOADED_FALSE='#' @@ -6998,13 +7013,13 @@ if test "${lt_cv_nm_interface+set}" = set; then : else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:7001: $ac_compile\"" >&5) + (eval echo "\"\$as_me:7016: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:7004: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:7019: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:7007: output\"" >&5) + (eval echo "\"\$as_me:7022: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -8209,7 +8224,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 8212 "configure"' > conftest.$ac_ext + echo '#line 8227 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -9998,11 +10013,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10001: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10016: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10005: \$? = $ac_status" >&5 + echo "$as_me:10020: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -10337,11 +10352,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10340: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10355: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10344: \$? = $ac_status" >&5 + echo "$as_me:10359: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -10442,11 +10457,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10445: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10460: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10449: \$? = $ac_status" >&5 + echo "$as_me:10464: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -10497,11 +10512,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10500: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10515: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10504: \$? = $ac_status" >&5 + echo "$as_me:10519: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -12881,7 +12896,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12884 "configure" +#line 12899 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12977,7 +12992,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12980 "configure" +#line 12995 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -14933,11 +14948,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14936: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14951: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14940: \$? = $ac_status" >&5 + echo "$as_me:14955: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15032,11 +15047,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15035: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15050: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15039: \$? = $ac_status" >&5 + echo "$as_me:15054: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -15084,11 +15099,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15087: $lt_compile\"" >&5) + (eval echo "\"\$as_me:15102: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15091: \$? = $ac_status" >&5 + echo "$as_me:15106: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20388,6 +20403,10 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BGL_LOADED_TRUE}" && test -z "${BGL_LOADED_FALSE}"; then + as_fn_error "conditional \"BGL_LOADED\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${BLUEGENE_LOADED_TRUE}" && test -z "${BLUEGENE_LOADED_FALSE}"; then as_fn_error "conditional \"BLUEGENE_LOADED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/configure.ac b/configure.ac index 42db8e828..0b3cfda29 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -# $Id: configure.ac 20828 2010-07-28 20:38:55Z da $ +# $Id: configure.ac 20908 2010-08-06 17:51:35Z da $ # This file is to be processed with autoconf to generate a configure script dnl Prologue @@ -26,7 +26,15 @@ AC_CONFIG_HEADERS([slurm/slurm.h]) dnl This needs to be close to the front to set CFLAGS=-m64 X_AC_BGL + +dnl we need to know if this is a bgl in the Makefile.am to do +dnl some things differently +AM_CONDITIONAL(BGL_LOADED, test "x$ac_bluegene_loaded" = "xyes") +AC_SUBST(BGL_LOADED) + X_AC_BGP + +dnl ok now check if bluegene was loaded at all AM_CONDITIONAL(BLUEGENE_LOADED, test "x$ac_bluegene_loaded" = "xyes") AC_SUBST(BLUEGENE_LOADED) diff --git a/contribs/Makefile.in b/contribs/Makefile.in index a2f771f45..c218a37d4 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 88c42a7de..4a92f757c 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -143,6 +143,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index 6f59033d9..9229388c4 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -89,6 +89,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index bf9909d5f..39551aa05 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -89,6 +89,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index 1c7dde803..6d689f8fb 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -116,6 +116,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index d9166706b..2a3a4a9f0 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -116,6 +116,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/doc/Makefile.in b/doc/Makefile.in index ffa0480b9..ce49f51b3 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 955c65ae9..45f88022d 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -114,6 +114,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/doc/html/accounting.shtml b/doc/html/accounting.shtml index 6f4804bb3..642615627 100644 --- a/doc/html/accounting.shtml +++ b/doc/html/accounting.shtml @@ -194,7 +194,7 @@ a configuration. <p><b>MySQL is the preferred database, PostgreSQL is supported for job and step accounting only.</b> The infrastructure for PostgresSQL for use with associations is not yet supported, meaning -sacctmgr will not work correcting. If interested in adding this +sacctmgr will not work correctly. If interested in adding this capability for PostgresSQL, please contact us at slurm-dev@lists.llnl.gov. <p>To enable this database support @@ -418,7 +418,7 @@ you can start SlurmDBD and Slurm. You start SlurmDBD by typing | grep slurmdbd'. After SlurmDBD and the slurmctld start you can verify that the database was created by using the mysql command 'show databases;'. You can display the tables that slurm created in the -database by using the mysql command 'use slurm4_db;' and then 'show +database by using the mysql command 'use slurm_acct_db;' and then 'show tables;'.</p> <p>Use the mysql 'show databases;' command</p> @@ -430,7 +430,7 @@ mysql> show databases; | Database | +--------------------+ | information_schema | -| slurm4_db | +| slurm_acct_db | | test | +--------------------+ @@ -440,7 +440,7 @@ mysql> show databases; <p>Select the database that you created.</p> <pre> -mysql> use slurm4_db; +mysql> use slurm_acct_db; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A @@ -454,7 +454,7 @@ Database changed mysql> show tables; +---------------------------+ -| Tables_in_slurm4_db | +| Tables_in_slurm_acct_db | +---------------------------+ | acct_coord_table | | acct_table | diff --git a/doc/html/resource_limits.shtml b/doc/html/resource_limits.shtml index c7a2bf859..42290c23d 100644 --- a/doc/html/resource_limits.shtml +++ b/doc/html/resource_limits.shtml @@ -8,7 +8,7 @@ integration used for storing accounting information. This document describes the capabilities available in SLURM version 2.0. New features are under active development. -Familiarity with SLURM's <a href="accounting">Accounting</a> web page +Familiarity with SLURM's <a href="accounting.html">Accounting</a> web page is strongly recommended before use of this document.</p> <p>Note for users of Maui or Moab schedulers: <br> @@ -87,8 +87,8 @@ its use.</p> <p>Changes made to the scheduling policy are uploaded to the SLURM control daemons on the various clusters and take effect -immediately. When an association is delete, all jobs running or -pending which belong to that association are immediately canceled. +immediately. When an association is deleted, all running or pending +jobs which belong to that association are immediately canceled. When limits are lowered, running jobs will not be canceled to satisfy the new limits, but the new lower limits will be enforced.</p> @@ -100,11 +100,11 @@ The available options are expected to increase as development continues. Most of these scheduling policy options are available not only for a user association, but also for each cluster and account. -If a new association is created for some user and some scheduling -policy options is not specified, the default will be the option -for the cluster plus account pair and if that is not specified -then the cluster and if that is not specified then no limit -will apply.</p> +If a new association is created for some user and a scheduling +policy option is not specified the default will be: the option +for the cluster/account pair, and if both are not specified +then the option for the cluster, and if that also is not +specified then no limit will apply.</p> <p>Currently available scheduling policy options:</p> <ul> diff --git a/doc/html/team.shtml b/doc/html/team.shtml index b87e9fdf4..73c60f87b 100644 --- a/doc/html/team.shtml +++ b/doc/html/team.shtml @@ -35,6 +35,7 @@ Linux NetworX and many other contributors. <li>Kent Engström (National Supercomputer Centre, Sweden)</li> <li>Jim Garlick (LLNL)</li> <li>Didier Gazen (Laboratoire d'Aerologie, France)</li> +<li>Raphael Geissert (Debian)</li> <li>Yiannis Georgiou (Bull)</li> <li>Mark Grondona (LLNL)</li> <li>Takao Hatazaki (HP, Japan)</li> @@ -45,6 +46,7 @@ Linux NetworX and many other contributors. <li>David Jackson (Adaptive Computing)</li> <li>Klaus Joas (University Karlsruhe, Germany)</li> <li>Greg Johnson (LANL)</li> +<li>Roman Kurakin (Institute of Natural Science and Ecology, Russia)</li> <li>Jason King (LLNL)</li> <li>Nancy Kritkausky (Bull)</li> <li>Eric Lin (Bull)</li> @@ -76,6 +78,7 @@ Linux NetworX and many other contributors. <li>Jimmy Tang (Trinity College, Ireland)</li> <li>Kevin Tew (LLNL/Bringham Young University)</li> <li>Adam Todorski (Rensselaer Polytechnic Institute)</li> +<li>Nathan Weeks (Iowa State University)</li> <li>Tim Wickberg (Rensselaer Polytechnic Institute)</li> <li>Jay Windley (Linux NetworX)</li> <li>Anne-Marie Wunderlin (Bull)</li> diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 45c5936c5..5688247d3 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -118,6 +118,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/doc/man/man1/sacct.1 b/doc/man/man1/sacct.1 index 8e0d41d64..d9127ac28 100644 --- a/doc/man/man1/sacct.1 +++ b/doc/man/man1/sacct.1 @@ -169,8 +169,8 @@ option return jobs in this state before this period. Valid time formats are... HH:MM[:SS] [AM|PM] MMDD[YY] or MM/DD[/YY] or MM.DD[.YY] -MM/DD[/YY]-HH:MM[:SS] -YYYY-MM-DD[THH:MM[:SS]] +MM/DD[/YY]\-HH:MM[:SS] +YYYY\-MM\-DD[THH:MM[:SS]] .IP @@ -319,8 +319,8 @@ in this state at this time, 'now' is also used as the default time. Valid time formats are... HH:MM[:SS] [AM|PM] MMDD[YY] or MM/DD[/YY] or MM.DD[.YY] -MM/DD[/YY]-HH:MM[:SS] -YYYY-MM-DD[THH:MM[:SS]] +MM/DD[/YY]\-HH:MM[:SS] +YYYY\-MM\-DD[THH:MM[:SS]] .TP \f3\-T \fP\f3,\fP \f3\-\-truncate\fP @@ -475,7 +475,9 @@ seconds .TP \f3exitcode\fP -The first non\-zero error code returned by any job step. +The exit code returned by the job script or salloc, typically as set +by the exit() function. Following the colon is the signal that caused +the process to terminate if it was terminated by a signal. .TP \f3gid\fP @@ -1110,7 +1112,7 @@ option. .nf .ft 3 # sacct \-\-brief -Jobid Status Exitcode +Jobid Status ExitCode \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- 2 RUNNING 0 3 RUNNING 0 @@ -1125,7 +1127,7 @@ Jobid Status Exitcode .nf .ft 3 # sacct \-\-allocations -Jobid Jobname Partition Account AllocCPUS State Exitcode +Jobid Jobname Partition Account AllocCPUS State ExitCode \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\- 3 sja_init andy acct1 1 COMPLETED 0 4 sjaload andy acct1 2 COMPLETED 0 diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 87c25b64b..9bda968ff 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -80,7 +80,7 @@ You may also specify \fImidnight\fR, \fInoon\fR, or with \fIAM\fR or \fIPM\fR for running in the morning or the evening. You can also say what day the job will be run, by specifying a date of the form \fIMMDDYY\fR or \fIMM/DD/YY\fR -\fIYYYY-MM-DD\fR. Combine date and time using the following +\fIYYYY\-MM\-DD\fR. Combine date and time using the following format \fIYYYY\-MM\-DD[THH:MM[:SS]]\fR. You can also give times like \fInow + count time\-units\fR, where the time\-units can be \fIseconds\fR (default), \fIminutes\fR, \fIhours\fR, diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 3b6821354..c402725ef 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -79,7 +79,7 @@ You may also specify \fImidnight\fR, \fInoon\fR, or with \fIAM\fR or \fIPM\fR for running in the morning or the evening. You can also say what day the job will be run, by specifying a date of the form \fIMMDDYY\fR or \fIMM/DD/YY\fR -\fIYYYY-MM-DD\fR. Combine date and time using the following +\fIYYYY\-MM-DD\fR. Combine date and time using the following format \fIYYYY\-MM\-DD[THH:MM[:SS]]\fR. You can also give times like \fInow + count time\-units\fR, where the time\-units can be \fIseconds\fR (default), \fIminutes\fR, \fIhours\fR, diff --git a/doc/man/man1/sreport.1 b/doc/man/man1/sreport.1 index 3fed0f451..0a8df0758 100644 --- a/doc/man/man1/sreport.1 +++ b/doc/man/man1/sreport.1 @@ -221,8 +221,8 @@ Period ending for report. Default is 23:59:59 of previous day. Valid time formats are... HH:MM[:SS] [AM|PM] MMDD[YY] or MM/DD[/YY] or MM.DD[.YY] -MM/DD[/YY]-HH:MM[:SS] -YYYY-MM-DD[THH:MM[:SS]] +MM/DD[/YY]\-HH:MM[:SS] +YYYY\-MM\-DD[THH:MM[:SS]] .TP .B Format=<OPT> Comma separated list of fields to display in report. @@ -239,8 +239,8 @@ Period start for report. Default is 00:00:00 of previous day. Valid time formats are... HH:MM[:SS] [AM|PM] MMDD[YY] or MM/DD[/YY] or MM.DD[.YY] -MM/DD[/YY]-HH:MM[:SS] -YYYY-MM-DD[THH:MM[:SS]] +MM/DD[/YY]\-HH:MM[:SS] +YYYY\-MM\-DD[THH:MM[:SS]] .RE .TP diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 100f12459..cd306dda9 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -67,7 +67,7 @@ You may also specify \fImidnight\fR, \fInoon\fR, or with \fIAM\fR or \fIPM\fR for running in the morning or the evening. You can also say what day the job will be run, by specifying a date of the form \fIMMDDYY\fR or \fIMM/DD/YY\fR -\fIYYYY-MM-DD\fR. Combine date and time using the following +\fIYYYY\-MM\-DD\fR. Combine date and time using the following format \fIYYYY\-MM\-DD[THH:MM[:SS]]\fR. You can also give times like \fInow + count time\-units\fR, where the time\-units can be \fIseconds\fR (default), \fIminutes\fR, \fIhours\fR, diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 0dbeeec9a..24b4daa0c 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -9,9 +9,7 @@ how those nodes are grouped into partitions, and various scheduling parameters associated with those partitions. This file should be consistent across all nodes in the cluster. .LP -The file location can be modified at system build time using the -DEFAULT_SLURM_CONF parameter. In addition, you can use the -\fBSLURM_CONF\fR environment variable to override the built\-in +You can use the \fBSLURM_CONF\fR environment variable to override the built\-in location of this file. The SLURM daemons also allow you to override both the built\-in and environment\-provided location using the "\-f" option on the command line. @@ -59,8 +57,8 @@ Only used for database type storage plugins, ignored otherwise. .TP \fBAccountingStorageEnforce\fR This controls what level of enforcement you want on associations when new -jobs are submitted. Valid options are any combination of associations, limits, -and wckeys, or all for all things. If limits is set associations is implied. +jobs are submitted. Valid options are any combination of \fIassociations\fR, \fIlimits\fR, +and \fIwckeys\fR, or \fIall\fR for all things. If limits is set associations is implied. If wckeys is set both limits and associations are implied along with TrackWckey being set. By enforcing Associations no new job is allowed to run unless a corresponding association exists in the system. If limits are diff --git a/doc/man/man5/slurmdbd.conf.5 b/doc/man/man5/slurmdbd.conf.5 index df8fe7c76..38c51de88 100644 --- a/doc/man/man5/slurmdbd.conf.5 +++ b/doc/man/man5/slurmdbd.conf.5 @@ -5,8 +5,8 @@ slurmdbd.conf \- Slurm Database Daemon (SlurmDBD) configuration file .SH "DESCRIPTION" \fB/etc/slurmdb.conf\fP is an ASCII file which describes Slurm Database Daemon (SlurmDBD) configuration information. -The file location can be modified at system build time using the -DEFAULT_SLURM_CONF parameter. +You can use the \fBSLURM_CONF\fR environment variable to override the built\-in +location of this file. .LP The contents of the file are case insensitive except for the names of nodes and files. Any text following a "#" in the configuration file is treated @@ -84,8 +84,8 @@ The interpretation of this option is specific to the configured \fBAuthType\fR. In the case of \fIauth/munge\fR, this can be configured to use a Munge daemon specifically configured to provide authentication between clusters while the default Munge daemon provides authentication within a cluster. -In that case, this will specify the pathname of the socket to use. -The default value is NULL, which results in the default authentication +In that case, this will specify the pathname of the socket to use. Per default +this value is left unspecified, which results in the default authentication mechanism being used. .TP diff --git a/doc/man/man5/wiki.conf.5 b/doc/man/man5/wiki.conf.5 index a1b5e6b16..1cf069ad7 100644 --- a/doc/man/man5/wiki.conf.5 +++ b/doc/man/man5/wiki.conf.5 @@ -83,6 +83,16 @@ This only effects jobs which are submitted using SLURM commands (i.e. If more than one partition is to have its jobs hidden, use a comma separator between their names. +.TP +\fBHidePartitionNodes\fR +Identifies partitions whose nodes are not to be reported to Moab/Maui. +Nodes which are configured only in hidden partitions will not be accounted +for or otherwise visible to Moab/Maui. +Any partitions included here will normally also be included in the +\fBExcludePartitions\fR and \fBHidePartitionJobs\fR parameters. +If more than one partition is to have its jobs hidden, use a comma +separator between their names. + .TP \fBHostFormat\fR Controls the format of host lists exchanged between SLURM and Moab. diff --git a/etc/init.d.slurm b/etc/init.d.slurm index d7ab6af20..f0e593082 100644 --- a/etc/init.d.slurm +++ b/etc/init.d.slurm @@ -80,7 +80,7 @@ if [ ! -f $CONFDIR/slurm.conf ]; then fi # setup library paths for slurm and munge support -export LD_LIBRARY_PATH="$LIBDIR:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH=$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} start() { prog=$1 diff --git a/etc/init.d.slurmdbd b/etc/init.d.slurmdbd index 18d75f54f..5df59500f 100755 --- a/etc/init.d.slurmdbd +++ b/etc/init.d.slurmdbd @@ -69,7 +69,7 @@ if [ ! -f $CONFDIR/slurmdbd.conf ]; then fi # setup library paths for slurm and munge support -export LD_LIBRARY_PATH="$LIBDIR:$LD_LIBRARY_PATH" +export LD_LIBRARY_PATH=$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} start() { prog=$1 diff --git a/slurm.spec b/slurm.spec index a7510197c..ebbfb291a 100644 --- a/slurm.spec +++ b/slurm.spec @@ -1,4 +1,4 @@ -# $Id: slurm.spec 19976 2010-04-07 15:55:58Z jette $ +# $Id: slurm.spec 20919 2010-08-06 21:13:59Z da $ # # Note that this package is not relocatable @@ -83,14 +83,14 @@ %endif Name: slurm -Version: 2.1.11 +Version: 2.1.14 Release: 1%{?dist} Summary: Simple Linux Utility for Resource Management License: GPL Group: System Environment/Base -Source: slurm-2.1.11.tar.bz2 +Source: slurm-2.1.14.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} URL: https://computing.llnl.gov/linux/slurm/ @@ -352,7 +352,7 @@ Gives the ability for SLURM to use Berkeley Lab Checkpoint/Restart ############################################################################# %prep -%setup -n slurm-2.1.11 +%setup -n slurm-2.1.14 %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ @@ -434,6 +434,14 @@ install -D -m644 etc/bluegene.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/blueg mkdir -p ${RPM_BUILD_ROOT}/etc/ld.so.conf.d echo "%{_libdir}/slurm" > ${RPM_BUILD_ROOT}/etc/ld.so.conf.d/slurm.conf chmod 644 ${RPM_BUILD_ROOT}/etc/ld.so.conf.d/slurm.conf + +LIST=./bluegene.files +touch $LIST +test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/libsched_if.so && + echo %{_libdir}/slurm/libsched_if.so >> $LIST +test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/libsched_if64.so && + echo %{_libdir}/slurm/libsched_if64.so >> $LIST + %endif LIST=./aix.files @@ -552,10 +560,9 @@ rm -rf $RPM_BUILD_ROOT ############################################################################# %if %{slurm_with bluegene} -%files bluegene +%files -f bluegene.files bluegene %defattr(-,root,root) %{_libdir}/slurm/select_bluegene.so -%{_libdir}/slurm/libsched_if64.so %dir /etc/ld.so.conf.d /etc/ld.so.conf.d/slurm.conf %{_mandir}/man5/bluegene.* @@ -723,6 +730,16 @@ if [ ! -f %{_sysconfdir}/slurm.conf ]; then echo "Build a new one using http://www.llnl.gov/linux/slurm/configurator.html" fi +%if %{slurm_with bluegene} +%post bluegene +if [ -x /sbin/ldconfig ]; then + /sbin/ldconfig %{_libdir}/slurm +fi +if [ ! -f %{_sysconfdir}/bluegene.conf ]; then + echo "You need to build and install a bluegene.conf file" + echo "Edit %{_sysconfdir}/bluegene.conf.example and copy it to bluegene.conf" +fi +%endif %preun if [ "$1" = 0 ]; then diff --git a/src/Makefile.in b/src/Makefile.in index 492470da8..d771914db 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -132,6 +132,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 242e51ca3..432161213 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -165,6 +165,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index db4dd340b..546045df4 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -204,6 +204,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index f7d359fe8..a6a1eb4dc 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -772,7 +772,7 @@ static int _refresh_assoc_wckey_list(void *db_conn, int enforce) return SLURM_ERROR; } - _post_user_list(current_wckeys); + _post_wckey_list(current_wckeys); slurm_mutex_lock(&assoc_mgr_wckey_lock); if(assoc_mgr_wckey_list) @@ -884,7 +884,7 @@ extern int assoc_mgr_get_user_assocs(void *db_conn, { ListIterator itr = NULL; acct_association_rec_t *found_assoc = NULL; - int set = 1; + int set = 0; xassert(assoc); xassert(assoc->uid != (uint32_t)NO_VAL); diff --git a/src/database/Makefile.in b/src/database/Makefile.in index 23b542f55..967f4adc4 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -141,6 +141,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 07c59ecd3..501727b97 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 9d34d0f8d..007e1232b 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index 6b2b2013c..390f127b0 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -139,6 +139,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index 0978a1ae0..781b0c447 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -155,6 +155,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c index c152fc534..7eca06d3c 100644 --- a/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c +++ b/src/plugins/accounting_storage/mysql/accounting_storage_mysql.c @@ -1734,6 +1734,8 @@ static int _addto_update_list(List update_list, acct_update_type_t type, void *object) { acct_update_object_t *update_object = NULL; + acct_association_rec_t *assoc = object; + acct_qos_rec_t *qos = object; ListIterator itr = NULL; if(!update_list) { error("no update list given"); @@ -1771,12 +1773,68 @@ static int _addto_update_list(List update_list, acct_update_type_t type, update_object->objects = list_create(destroy_acct_user_rec); break; case ACCT_ADD_ASSOC: + /* We are going to send these to the slurmctld's so + lets set up the correct limits to INIFINITE instead + of NO_VAL */ + if(assoc->grp_cpu_mins == NO_VAL) + assoc->grp_cpu_mins = INFINITE; + if(assoc->grp_cpus == NO_VAL) + assoc->grp_cpus = INFINITE; + if(assoc->grp_jobs == NO_VAL) + assoc->grp_jobs = INFINITE; + if(assoc->grp_nodes == NO_VAL) + assoc->grp_nodes = INFINITE; + if(assoc->grp_submit_jobs == NO_VAL) + assoc->grp_submit_jobs = INFINITE; + if(assoc->grp_wall == NO_VAL) + assoc->grp_wall = INFINITE; + + if(assoc->max_jobs == NO_VAL) + assoc->max_jobs = INFINITE; + if(assoc->max_submit_jobs == NO_VAL) + assoc->max_submit_jobs = INFINITE; + if(assoc->max_cpus_pj == NO_VAL) + assoc->max_cpus_pj = INFINITE; + if(assoc->max_nodes_pj == NO_VAL) + assoc->max_nodes_pj = INFINITE; + if(assoc->max_wall_pj == NO_VAL) + assoc->max_wall_pj = INFINITE; + if(assoc->max_cpu_mins_pj == NO_VAL) + assoc->max_cpu_mins_pj = INFINITE; case ACCT_MODIFY_ASSOC: case ACCT_REMOVE_ASSOC: update_object->objects = list_create( destroy_acct_association_rec); break; case ACCT_ADD_QOS: + /* We are going to send these to the slurmctld's so + lets set up the correct limits to INIFINITE instead + of NO_VAL */ + if(qos->grp_cpu_mins == NO_VAL) + qos->grp_cpu_mins = INFINITE; + if(qos->grp_cpus == NO_VAL) + qos->grp_cpus = INFINITE; + if(qos->grp_jobs == NO_VAL) + qos->grp_jobs = INFINITE; + if(qos->grp_nodes == NO_VAL) + qos->grp_nodes = INFINITE; + if(qos->grp_submit_jobs == NO_VAL) + qos->grp_submit_jobs = INFINITE; + if(qos->grp_wall == NO_VAL) + qos->grp_wall = INFINITE; + + if(qos->max_jobs_pu == NO_VAL) + qos->max_jobs_pu = INFINITE; + if(qos->max_submit_jobs_pu == NO_VAL) + qos->max_submit_jobs_pu = INFINITE; + if(qos->max_cpus_pj == NO_VAL) + qos->max_cpus_pj = INFINITE; + if(qos->max_nodes_pj == NO_VAL) + qos->max_nodes_pj = INFINITE; + if(qos->max_wall_pj == NO_VAL) + qos->max_wall_pj = INFINITE; + if(qos->max_cpu_mins_pj == NO_VAL) + qos->max_cpu_mins_pj = INFINITE; case ACCT_MODIFY_QOS: case ACCT_REMOVE_QOS: update_object->objects = list_create( @@ -11222,13 +11280,14 @@ extern int jobacct_storage_p_step_complete(mysql_conn_t *mysql_conn, elapsed=0; /* For *very* short jobs, if clock is wrong */ exit_code = step_ptr->exit_code; - if (exit_code == NO_VAL) { + if (WIFSIGNALED(exit_code)) { comp_status = JOB_CANCELLED; - exit_code = 0; } else if (exit_code) comp_status = JOB_FAILED; - else + else { + step_ptr->requid = -1; comp_status = JOB_COMPLETE; + } /* figure out the ave of the totals sent */ if(cpus > 0) { diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index 456b9a1a4..d821d28d3 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -138,6 +138,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 47dee8eec..9af35c74a 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -151,6 +151,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index 8967f4ad6..2dc8a7120 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -139,6 +139,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index bbe4586a7..a1df9fb00 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index 4a0c6fdd5..3a3e6d46d 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 522358744..a6540a670 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -138,6 +138,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index 5daac229e..00c52dcd9 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index f8a82bd2b..24ffceb9f 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index f630f73b1..62f072858 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -141,6 +141,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 70b527932..13773601e 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -147,6 +147,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index 57347d5b9..e1711cdad 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index ea6aee61a..2e2c79620 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/checkpoint/xlch/Makefile.in b/src/plugins/checkpoint/xlch/Makefile.in index 8643df084..d3b5f455c 100644 --- a/src/plugins/checkpoint/xlch/Makefile.in +++ b/src/plugins/checkpoint/xlch/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index 5d2d2dcdc..f90465863 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index a4bfe44b1..d63d914c5 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -138,6 +138,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index 161fed09d..527900253 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -143,6 +143,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index 7caf9dbed..ce47b91aa 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index e5dd29228..482aa0dfb 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 4ac7ffd06..39649b7f7 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index b4723af27..1d6eadd5d 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index 49eada510..f6d1e3e34 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 2ffc4b229..f9dda003d 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index ff1426914..aa4463913 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -145,6 +145,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 8df2f4ec1..374c78e69 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index 5ea47ed18..03866d8a5 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -145,6 +145,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index b4f820454..bebc85a5c 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 7b1981e5f..ab6fd5114 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index ad1109454..ff9df1692 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 74b644b86..836f3d835 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index 2b9c59c0b..0277a5850 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index 991e084a6..cc01a5b98 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index e3c0e3df5..50a78fcfb 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index 26b0be86d..c137df2c8 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 1f036ba05..ff0097ff1 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index fdd252de7..698aab36b 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index 9b562afaa..810d701db 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index 6d37d02b6..692ddcf0d 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index 3f13b2295..b9b947677 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -138,6 +138,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index e433b1c43..20b335485 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index 47d587d12..ccd9601e1 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index fff0f1900..2d8410505 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index b8a51a7b2..746eba641 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index a4e2ebf04..1a635dd16 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index a990a9224..e9e0b97e4 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 139bf09fb..ad273d773 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index c64ad3b6f..3bcd8fcae 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index 44e7e092a..f10124908 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in index 1dddeb6be..886ddf232 100644 --- a/src/plugins/proctrack/rms/Makefile.in +++ b/src/plugins/proctrack/rms/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index 90a844f48..e297a1781 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index ecb1bc4b8..e7e82d990 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index 49130659c..8bfe508dd 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index 4b480f7a0..64e779bd5 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index dfcecd805..5dcec22fd 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index 6a12caa4a..22257b39c 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -138,6 +138,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/wiki/get_nodes.c b/src/plugins/sched/wiki/get_nodes.c index 5f2312f32..81902b3a2 100644 --- a/src/plugins/sched/wiki/get_nodes.c +++ b/src/plugins/sched/wiki/get_nodes.c @@ -44,6 +44,7 @@ static char * _dump_all_nodes(int *node_cnt, time_t update_time); static char * _dump_node(struct node_record *node_ptr, time_t update_time); static char * _get_node_state(struct node_record *node_ptr); +static bool _hidden_node(struct node_record *node_ptr); /* * get_nodes - get information on specific node(s) changed since some time @@ -103,6 +104,8 @@ extern int get_nodes(char *cmd_ptr, int *err_code, char **err_msg) node_name); continue; } + if (_hidden_node(node_ptr)) + continue; tmp_buf = _dump_node(node_ptr, update_time); if (node_rec_cnt > 0) xstrcat(buf, "#"); @@ -139,6 +142,8 @@ static char * _dump_all_nodes(int *node_cnt, time_t update_time) continue; if (IS_NODE_FUTURE(node_ptr)) continue; + if (_hidden_node(node_ptr)) + continue; tmp_buf = _dump_node(node_ptr, update_time); if (cnt > 0) xstrcat(buf, "#"); @@ -241,3 +246,32 @@ static char * _get_node_state(struct node_record *node_ptr) return "Unknown"; } + +/* Return true if the node exists in a hidden partition and not in any + * non-hidden partitions. */ +static bool _hidden_node(struct node_record *node_ptr) +{ + int i, n; + int hidden = -1; /* node is hidden for some partition */ + int shown = -1; /* node is *not* hidden for some partition */ + + for (n = 0; n < node_ptr->part_cnt; n++) { + bool hide_found = false; + for (i=0; i<HIDE_PART_CNT; i++) { + if (hide_part_nodes_ptr[i] == NULL) + break; + if (hide_part_nodes_ptr[i] == node_ptr->part_pptr[n]) { + hide_found = true; + break; + } + } + if (hide_found) + hidden = 1; + else + shown = 1; + } + + if ((hidden == 1) && (shown != 1)) + return true; + return false; +} diff --git a/src/plugins/sched/wiki/msg.c b/src/plugins/sched/wiki/msg.c index 0ffb64b21..5cdb6a6b3 100644 --- a/src/plugins/sched/wiki/msg.c +++ b/src/plugins/sched/wiki/msg.c @@ -60,6 +60,7 @@ char e_host_bu[E_HOST_SIZE] = ""; uint16_t e_port = 0; struct part_record *exclude_part_ptr[EXC_PART_CNT]; struct part_record *hide_part_ptr[HIDE_PART_CNT]; +struct part_record *hide_part_nodes_ptr[HIDE_PART_CNT]; uint16_t job_aggregation_time = 10; /* Default value is 10 seconds */ uint16_t host_format; int init_prio_mode = PRIO_HOLD; @@ -247,12 +248,13 @@ extern int parse_wiki_config(void) {"EPort", S_P_UINT16}, {"ExcludePartitions", S_P_STRING}, {"HidePartitionJobs", S_P_STRING}, + {"HidePartitionNodes", S_P_STRING}, {"HostFormat", S_P_UINT16}, {"JobAggregationTime", S_P_UINT16}, {"JobPriority", S_P_STRING}, {NULL} }; s_p_hashtbl_t *tbl; - char *exclude_partitions, *hide_partitions; + char *exclude_partitions, *hide_partitions, *hide_part_nodes; char *key = NULL, *priority_mode = NULL, *wiki_conf; struct stat buf; slurm_ctl_conf_t *conf; @@ -263,6 +265,8 @@ extern int parse_wiki_config(void) exclude_part_ptr[i] = NULL; for (i=0; i<HIDE_PART_CNT; i++) hide_part_ptr[i] = NULL; + for (i=0; i<HIDE_PART_CNT; i++) + hide_part_nodes_ptr[i] = NULL; conf = slurm_conf_lock(); strncpy(e_host, conf->control_addr, sizeof(e_host)); if (conf->backup_addr) { @@ -312,7 +316,7 @@ extern int parse_wiki_config(void) while (tok) { if (i >= EXC_PART_CNT) { error("ExcludePartitions has too many entries " - "skipping %s and later entries"); + "skipping %s and later entries", tok); break; } exclude_part_ptr[i] = find_part_record(tok); @@ -331,7 +335,7 @@ extern int parse_wiki_config(void) while (tok) { if (i >= HIDE_PART_CNT) { error("HidePartitionJobs has too many entries " - "skipping %s and later entries"); + "skipping %s and later entries", tok); break; } hide_part_ptr[i] = find_part_record(tok); @@ -343,6 +347,25 @@ extern int parse_wiki_config(void) } } + if (s_p_get_string(&hide_part_nodes, "HidePartitionNodes", tbl)) { + char *tok = NULL, *tok_p = NULL; + tok = strtok_r(hide_part_nodes, ",", &tok_p); + i = 0; + while (tok) { + if (i >= HIDE_PART_CNT) { + error("HidePartitionNodes has too many entries " + "skipping %s and later entries", tok); + break; + } + hide_part_nodes_ptr[i] = find_part_record(tok); + if (hide_part_nodes_ptr[i]) + i++; + else + error("HidePartitionNodes %s not found", tok); + tok = strtok_r(NULL, ",", &tok_p); + } + } + if (s_p_get_string(&priority_mode, "JobPriority", tbl)) { if (strcasecmp(priority_mode, "hold") == 0) init_prio_mode = PRIO_HOLD; @@ -371,7 +394,12 @@ extern int parse_wiki_config(void) for (i=0; i<HIDE_PART_CNT; i++) { if (!hide_part_ptr[i]) continue; - info("HidePartitionJobs = %s", hide_ptr_ptr[i]->name); + info("HidePartitionJobs = %s", hide_part_ptr[i]->name); + } + for (i=0; i<HIDE_PART_CNT; i++) { + if (!hide_part_nodes_ptr[i]) + continue; + info("HidePartitionNodes = %s", hide_part_nodes_ptr[i]->name); } #endif return SLURM_SUCCESS; @@ -380,11 +408,15 @@ extern int parse_wiki_config(void) extern char * get_wiki_conf(void) { int i, first; - char buf[20], *conf = NULL; + char buf[32], *conf = NULL; snprintf(buf, sizeof(buf), "HostFormat=%u", use_host_exp); xstrcat(conf, buf); + snprintf(buf, sizeof(buf), ";JobAggregationTime=%u", + job_aggregation_time); + xstrcat(conf, buf); + first = 1; for (i=0; i<EXC_PART_CNT; i++) { if (!exclude_part_ptr[i]) @@ -409,6 +441,18 @@ extern char * get_wiki_conf(void) xstrcat(conf, hide_part_ptr[i]->name); } + first = 1; + for (i=0; i<HIDE_PART_CNT; i++) { + if (!hide_part_nodes_ptr[i]) + continue; + if (first) { + xstrcat(conf, ";HidePartitionNodes="); + first = 0; + } else + xstrcat(conf, ","); + xstrcat(conf, hide_part_nodes_ptr[i]->name); + } + return conf; } diff --git a/src/plugins/sched/wiki/msg.h b/src/plugins/sched/wiki/msg.h index 3443d8869..0cbff35c4 100644 --- a/src/plugins/sched/wiki/msg.h +++ b/src/plugins/sched/wiki/msg.h @@ -97,6 +97,7 @@ extern char e_host_bu[E_HOST_SIZE]; extern uint16_t e_port; extern struct part_record *exclude_part_ptr[EXC_PART_CNT]; extern struct part_record *hide_part_ptr[HIDE_PART_CNT]; +extern struct part_record *hide_part_nodes_ptr[HIDE_PART_CNT]; extern uint16_t job_aggregation_time; extern uint16_t kill_wait; extern uint16_t use_host_exp; diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index 9c13655cd..925a66d76 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -141,6 +141,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/sched/wiki2/get_nodes.c b/src/plugins/sched/wiki2/get_nodes.c index f45b92028..4993d2f38 100644 --- a/src/plugins/sched/wiki2/get_nodes.c +++ b/src/plugins/sched/wiki2/get_nodes.c @@ -45,6 +45,7 @@ static char * _dump_all_nodes(int *node_cnt, time_t update_time); static char * _dump_node(struct node_record *node_ptr, hostlist_t hl, time_t update_time); +static bool _hidden_node(struct node_record *node_ptr); static char * _get_node_state(struct node_record *node_ptr); static int _same_info(struct node_record *node1_ptr, struct node_record *node2_ptr, time_t update_time); @@ -117,6 +118,8 @@ extern int get_nodes(char *cmd_ptr, int *err_code, char **err_msg) node_name); continue; } + if (_hidden_node(node_ptr)) + continue; tmp_buf = _dump_node(node_ptr, NULL, update_time); if (node_rec_cnt > 0) @@ -160,6 +163,8 @@ static char * _dump_all_nodes(int *node_cnt, time_t update_time) continue; if (IS_NODE_FUTURE(node_ptr)) continue; + if (_hidden_node(node_ptr)) + continue; if (use_host_exp == 2) { rc = _same_info(uniq_node_ptr, node_ptr, update_time); if (rc == 0) { @@ -416,3 +421,32 @@ static int _str_cmp(char *s1, char *s2) /* One pointer is valid and the other is NULL */ return 1; } + +/* Return true if the node exists in a hidden partition and not in any + * non-hidden partitions. */ +static bool _hidden_node(struct node_record *node_ptr) +{ + int i, n; + int hidden = -1; /* node is hidden for some partition */ + int shown = -1; /* node is *not* hidden for some partition */ + + for (n = 0; n < node_ptr->part_cnt; n++) { + bool hide_found = false; + for (i=0; i<HIDE_PART_CNT; i++) { + if (hide_part_nodes_ptr[i] == NULL) + break; + if (hide_part_nodes_ptr[i] == node_ptr->part_pptr[n]) { + hide_found = true; + break; + } + } + if (hide_found) + hidden = 1; + else + shown = 1; + } + + if ((hidden == 1) && (shown != 1)) + return true; + return false; +} diff --git a/src/plugins/sched/wiki2/msg.c b/src/plugins/sched/wiki2/msg.c index 39ff39f23..c4f99c6c5 100644 --- a/src/plugins/sched/wiki2/msg.c +++ b/src/plugins/sched/wiki2/msg.c @@ -66,6 +66,7 @@ char e_host_bu[E_HOST_SIZE] = ""; uint16_t e_port = 0; struct part_record *exclude_part_ptr[EXC_PART_CNT]; struct part_record *hide_part_ptr[HIDE_PART_CNT]; +struct part_record *hide_part_nodes_ptr[HIDE_PART_CNT]; uint32_t first_job_id; uint16_t job_aggregation_time = 10; /* Default value is 10 seconds */ int init_prio_mode = PRIO_HOLD; @@ -253,12 +254,13 @@ extern int parse_wiki_config(void) {"EPort", S_P_UINT16}, {"ExcludePartitions", S_P_STRING}, {"HidePartitionJobs", S_P_STRING}, + {"HidePartitionNodes", S_P_STRING}, {"HostFormat", S_P_UINT16}, {"JobAggregationTime", S_P_UINT16}, {"JobPriority", S_P_STRING}, {NULL} }; s_p_hashtbl_t *tbl; - char *exclude_partitions, *hide_partitions; + char *exclude_partitions, *hide_partitions, *hide_part_nodes; char *key = NULL, *priority_mode = NULL, *wiki_conf; struct stat buf; slurm_ctl_conf_t *conf; @@ -269,6 +271,8 @@ extern int parse_wiki_config(void) exclude_part_ptr[i] = NULL; for (i=0; i<HIDE_PART_CNT; i++) hide_part_ptr[i] = NULL; + for (i=0; i<HIDE_PART_CNT; i++) + hide_part_nodes_ptr[i] = NULL; conf = slurm_conf_lock(); strncpy(e_host, conf->control_addr, sizeof(e_host)); if (conf->backup_addr) { @@ -316,7 +320,7 @@ extern int parse_wiki_config(void) while (tok) { if (i >= EXC_PART_CNT) { error("ExcludePartitions has too many entries " - "skipping %s and later entries"); + "skipping %s and later entries", tok); break; } exclude_part_ptr[i] = find_part_record(tok); @@ -335,7 +339,7 @@ extern int parse_wiki_config(void) while (tok) { if (i >= HIDE_PART_CNT) { error("HidePartitionJobs has too many entries " - "skipping %s and later entries"); + "skipping %s and later entries", tok); break; } hide_part_ptr[i] = find_part_record(tok); @@ -347,6 +351,25 @@ extern int parse_wiki_config(void) } } + if (s_p_get_string(&hide_part_nodes, "HidePartitionNodes", tbl)) { + char *tok = NULL, *tok_p = NULL; + tok = strtok_r(hide_part_nodes, ",", &tok_p); + i = 0; + while (tok) { + if (i >= HIDE_PART_CNT) { + error("HidePartitionNodes has too many entries " + "skipping %s and later entries", tok); + break; + } + hide_part_nodes_ptr[i] = find_part_record(tok); + if (hide_part_nodes_ptr[i]) + i++; + else + error("HidePartitionNodes %s not found", tok); + tok = strtok_r(NULL, ",", &tok_p); + } + } + if (s_p_get_string(&priority_mode, "JobPriority", tbl)) { if (strcasecmp(priority_mode, "hold") == 0) init_prio_mode = PRIO_HOLD; @@ -379,7 +402,12 @@ extern int parse_wiki_config(void) for (i=0; i<HIDE_PART_CNT; i++) { if (!hide_part_ptr[i]) continue; - info("HidePartitionJobs = %s", hide_ptr_ptr[i]->name); + info("HidePartitionJobs = %s", hide_part_ptr[i]->name); + } + for (i=0; i<HIDE_PART_CNT; i++) { + if (!hide_part_nodes_ptr[i]) + continue; + info("HidePartitionNodes = %s", hide_part_nodes_ptr[i]->name); } #endif return SLURM_SUCCESS; @@ -393,11 +421,15 @@ extern int parse_wiki_config(void) extern char * get_wiki_conf(void) { int i, first; - char buf[20], *conf = NULL; + char buf[32], *conf = NULL; snprintf(buf, sizeof(buf), "HostFormat=%u", use_host_exp); xstrcat(conf, buf); + snprintf(buf, sizeof(buf), ";JobAggregationTime=%u", + job_aggregation_time); + xstrcat(conf, buf); + first = 1; for (i=0; i<EXC_PART_CNT; i++) { if (!exclude_part_ptr[i]) @@ -422,6 +454,18 @@ extern char * get_wiki_conf(void) xstrcat(conf, hide_part_ptr[i]->name); } + first = 1; + for (i=0; i<HIDE_PART_CNT; i++) { + if (!hide_part_nodes_ptr[i]) + continue; + if (first) { + xstrcat(conf, ";HidePartitionNodes="); + first = 0; + } else + xstrcat(conf, ","); + xstrcat(conf, hide_part_nodes_ptr[i]->name); + } + return conf; } diff --git a/src/plugins/sched/wiki2/msg.h b/src/plugins/sched/wiki2/msg.h index d5261f253..bade52ae4 100644 --- a/src/plugins/sched/wiki2/msg.h +++ b/src/plugins/sched/wiki2/msg.h @@ -98,6 +98,7 @@ extern char e_host_bu[E_HOST_SIZE]; extern uint16_t e_port; extern struct part_record *exclude_part_ptr[EXC_PART_CNT]; extern struct part_record *hide_part_ptr[HIDE_PART_CNT]; +extern struct part_record *hide_part_nodes_ptr[HIDE_PART_CNT]; extern uint32_t first_job_id; extern uint16_t job_aggregation_time; extern uint16_t kill_wait; diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index d1d40f676..db289df01 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index e3c501950..9bcb999b2 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/select/bluegene/block_allocator/Makefile.in b/src/plugins/select/bluegene/block_allocator/Makefile.in index 55dcd6307..dcc09e362 100644 --- a/src/plugins/select/bluegene/block_allocator/Makefile.in +++ b/src/plugins/select/bluegene/block_allocator/Makefile.in @@ -128,6 +128,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/select/bluegene/plugin/Makefile.am b/src/plugins/select/bluegene/plugin/Makefile.am index 5855e32d4..f864b037c 100644 --- a/src/plugins/select/bluegene/plugin/Makefile.am +++ b/src/plugins/select/bluegene/plugin/Makefile.am @@ -9,7 +9,11 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) if BLUEGENE_LOADED +if BGL_LOADED pkglib_LTLIBRARIES = select_bluegene.la libsched_if64.la +else +pkglib_LTLIBRARIES = select_bluegene.la libsched_if.la +endif # Blue Gene node selection plugin. select_bluegene_la_SOURCES = select_bluegene.c \ @@ -34,9 +38,13 @@ select_bluegene_la_LIBADD = ../block_allocator/libbluegene_block_allocator.la # MPIRUN dynamic lib. +if BGL_LOADED libsched_if64_la_SOURCES = libsched_if64.c libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) - +else +libsched_if_la_SOURCES = libsched_if64.c +libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +endif sbin_PROGRAMS = slurm_prolog slurm_epilog sfree diff --git a/src/plugins/select/bluegene/plugin/Makefile.in b/src/plugins/select/bluegene/plugin/Makefile.in index 3195a2954..1b5bed556 100644 --- a/src/plugins/select/bluegene/plugin/Makefile.in +++ b/src/plugins/select/bluegene/plugin/Makefile.in @@ -106,14 +106,26 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sbindir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) +libsched_if_la_LIBADD = +am__libsched_if_la_SOURCES_DIST = libsched_if64.c +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_OBJECTS = \ +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@ libsched_if64.lo +libsched_if_la_OBJECTS = $(am_libsched_if_la_OBJECTS) +libsched_if_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libsched_if_la_LDFLAGS) $(LDFLAGS) -o $@ +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@am_libsched_if_la_rpath = \ +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) libsched_if64_la_LIBADD = am__libsched_if64_la_SOURCES_DIST = libsched_if64.c -@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_OBJECTS = libsched_if64.lo +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_OBJECTS = \ +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ libsched_if64.lo libsched_if64_la_OBJECTS = $(am_libsched_if64_la_OBJECTS) libsched_if64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libsched_if64_la_LDFLAGS) $(LDFLAGS) -o $@ -@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_rpath = -rpath $(pkglibdir) +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_rpath = \ +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) @BLUEGENE_LOADED_TRUE@select_bluegene_la_DEPENDENCIES = ../block_allocator/libbluegene_block_allocator.la am__select_bluegene_la_SOURCES_DIST = select_bluegene.c bg_boot_time.h \ bg_job_place.c bg_job_place.h bg_job_run.c bg_job_run.h \ @@ -141,8 +153,10 @@ select_bluegene_la_OBJECTS = $(am_select_bluegene_la_OBJECTS) select_bluegene_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(select_bluegene_la_LDFLAGS) $(LDFLAGS) -o $@ -@BLUEGENE_LOADED_TRUE@am_select_bluegene_la_rpath = -rpath \ -@BLUEGENE_LOADED_TRUE@ $(pkglibdir) +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@am_select_bluegene_la_rpath = \ +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_select_bluegene_la_rpath = \ +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) PROGRAMS = $(sbin_PROGRAMS) am__sfree_SOURCES_DIST = sfree.c sfree.h opts.c \ ../block_allocator/bridge_linker.c \ @@ -183,10 +197,12 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libsched_if64_la_SOURCES) $(select_bluegene_la_SOURCES) \ +SOURCES = $(libsched_if_la_SOURCES) $(libsched_if64_la_SOURCES) \ + $(select_bluegene_la_SOURCES) \ $(EXTRA_select_bluegene_la_SOURCES) $(sfree_SOURCES) \ $(slurm_epilog_SOURCES) $(slurm_prolog_SOURCES) -DIST_SOURCES = $(am__libsched_if64_la_SOURCES_DIST) \ +DIST_SOURCES = $(am__libsched_if_la_SOURCES_DIST) \ + $(am__libsched_if64_la_SOURCES_DIST) \ $(am__select_bluegene_la_SOURCES_DIST) \ $(am__EXTRA_select_bluegene_la_SOURCES_DIST) \ $(am__sfree_SOURCES_DIST) $(am__slurm_epilog_SOURCES_DIST) \ @@ -203,6 +219,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ @@ -382,7 +399,8 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic -lm INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) -@BLUEGENE_LOADED_TRUE@pkglib_LTLIBRARIES = select_bluegene.la libsched_if64.la +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@pkglib_LTLIBRARIES = select_bluegene.la libsched_if.la +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@pkglib_LTLIBRARIES = select_bluegene.la libsched_if64.la # Blue Gene node selection plugin. @BLUEGENE_LOADED_TRUE@select_bluegene_la_SOURCES = select_bluegene.c \ @@ -405,8 +423,10 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) @BLUEGENE_LOADED_TRUE@select_bluegene_la_LIBADD = ../block_allocator/libbluegene_block_allocator.la # MPIRUN dynamic lib. -@BLUEGENE_LOADED_TRUE@libsched_if64_la_SOURCES = libsched_if64.c -@BLUEGENE_LOADED_TRUE@libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_SOURCES = libsched_if64.c +@BGL_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@libsched_if64_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@libsched_if_la_SOURCES = libsched_if64.c +@BGL_LOADED_FALSE@@BLUEGENE_LOADED_TRUE@libsched_if_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) @BLUEGENE_LOADED_TRUE@sfree_LDADD = $(top_builddir)/src/api/libslurmhelper.la @BLUEGENE_LOADED_TRUE@slurm_prolog_LDADD = $(top_builddir)/src/api/libslurmhelper.la @BLUEGENE_LOADED_TRUE@slurm_epilog_LDADD = $(top_builddir)/src/api/libslurmhelper.la @@ -498,6 +518,8 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libsched_if.la: $(libsched_if_la_OBJECTS) $(libsched_if_la_DEPENDENCIES) + $(libsched_if_la_LINK) $(am_libsched_if_la_rpath) $(libsched_if_la_OBJECTS) $(libsched_if_la_LIBADD) $(LIBS) libsched_if64.la: $(libsched_if64_la_OBJECTS) $(libsched_if64_la_DEPENDENCIES) $(libsched_if64_la_LINK) $(am_libsched_if64_la_rpath) $(libsched_if64_la_OBJECTS) $(libsched_if64_la_LIBADD) $(LIBS) select_bluegene.la: $(select_bluegene_la_OBJECTS) $(select_bluegene_la_DEPENDENCIES) diff --git a/src/plugins/select/bluegene/plugin/bg_job_place.c b/src/plugins/select/bluegene/plugin/bg_job_place.c index dffde3100..e7879f706 100644 --- a/src/plugins/select/bluegene/plugin/bg_job_place.c +++ b/src/plugins/select/bluegene/plugin/bg_job_place.c @@ -1118,14 +1118,27 @@ static int _find_best_block_match(List block_list, */ (*found_bg_record) = list_pop(new_blocks); if(!(*found_bg_record)) { - error("got an empty list back"); list_destroy(new_blocks); - if(bg_record) - continue; - else { - rc = SLURM_ERROR; + if(bg_record) { + debug2("Appears we are trying " + "to place this job on " + "the block we just " + "removed."); + /* This means we + placed the job on + the block we just + popped off. + */ + bit_and(slurm_block_bitmap, + bg_record->bitmap); + *found_bg_record = bg_record; break; } + + /* This should never happen */ + error("got an empty list back"); + rc = SLURM_ERROR; + break; } bit_and(slurm_block_bitmap, (*found_bg_record)->bitmap); diff --git a/src/plugins/select/bluegene/plugin/bg_job_run.c b/src/plugins/select/bluegene/plugin/bg_job_run.c index 839f27178..0dba053af 100644 --- a/src/plugins/select/bluegene/plugin/bg_job_run.c +++ b/src/plugins/select/bluegene/plugin/bg_job_run.c @@ -2,7 +2,7 @@ * bg_job_run.c - blue gene job execution (e.g. initiation and termination) * functions. * - * $Id: bg_job_run.c 20097 2010-04-20 16:42:16Z da $ + * $Id: bg_job_run.c 21007 2010-08-25 20:51:44Z da $ ***************************************************************************** * Copyright (C) 2004-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -316,7 +316,6 @@ static int _make_sure_block_still_exists(bg_update_t *bg_update_ptr, job_fail(bg_update_ptr->job_ptr->job_id); } unlock_slurmctld(job_write_lock); - slurm_mutex_unlock(&job_start_mutex); return 0; } return 1; @@ -529,7 +528,6 @@ static void _sync_agent(bg_update_t *bg_update_ptr) job_fail(bg_update_ptr->job_ptr->job_id); } unlock_slurmctld(job_write_lock); - slurm_mutex_unlock(&job_start_mutex); return; } diff --git a/src/plugins/select/bluegene/plugin/libsched_if64.c b/src/plugins/select/bluegene/plugin/libsched_if64.c index 27689affa..086856bb1 100644 --- a/src/plugins/select/bluegene/plugin/libsched_if64.c +++ b/src/plugins/select/bluegene/plugin/libsched_if64.c @@ -40,13 +40,21 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> +#include <unistd.h> +#include <sys/types.h> int get_parameters(void *params) { - char *partition = getenv("MPIRUN_PARTITION"); /* get MPIRUN env - * var to see if we - * are inside slurm - * or not */ + char *partition; + + /* Always allow root to run no matter what. This is needed + for HTC mode where it is common to run outside of SLURM. + */ + if (getuid() == 0) + return 0; + + /* get MPIRUN env var to see if we are inside slurm or not */ + partition = getenv("MPIRUN_PARTITION"); if (!partition || (strlen(partition) < 3)) { printf("YOU ARE OUTSIDE OF SLURM!!!! NOT RUNNING MPIRUN!\n"); return 1; diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index f64f5b076..291461e57 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 9714117c8..dcac02230 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -83,8 +83,18 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) avail_cpus = job_res->cpus; job_res->cpus = xmalloc(job_res->nhosts * sizeof(uint16_t)); - if (job_ptr->details->cpus_per_task > 1) - maxtasks = maxtasks / job_ptr->details->cpus_per_task; + /* nprocs is already set the number of tasks if overcommit is used */ + if (!job_ptr->details->overcommit + && (job_ptr->details->cpus_per_task > 1)) + maxtasks = maxtasks / job_ptr->details->cpus_per_task; + + /* Safe guard if the user didn't specified a lower number of + * cpus than cpus_per_task or didn't specify the number. */ + if(!maxtasks) { + error("_compute_c_b_task_dist: request was for 0 tasks, " + "setting to 1"); + maxtasks = 1; + } for (tid = 0, i = 0; (tid < maxtasks); i++) { /* cycle counter */ bool space_remaining = false; @@ -99,7 +109,8 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) for (n = 0; ((n < job_res->nhosts) && (tid < maxtasks)); n++) { if ((i < avail_cpus[n]) || over_subscribe) { tid++; - for (l = 0; l < job_ptr->details->cpus_per_task; l++) { + for (l = 0; l < job_ptr->details->cpus_per_task; + l++) { if (job_res->cpus[n] < avail_cpus[n]) job_res->cpus[n]++; if ((i + 1) < avail_cpus[n]) @@ -135,7 +146,8 @@ static int _compute_plane_dist(struct job_record *job_ptr) plane_size = job_ptr->details->mc_ptr->plane_size; if (plane_size <= 0) { - error("cons_res: _compute_plane_dist received invalid plane_size"); + error("cons_res: _compute_plane_dist received invalid " + "plane_size"); return SLURM_ERROR; } job_res->cpus = xmalloc(job_res->nhosts * sizeof(uint16_t)); @@ -294,7 +306,7 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, ntasks_per_core = job_ptr->details->mc_ptr-> ntasks_per_core; } - if ((job_ptr->details->mc_ptr->min_threads != + if ((job_ptr->details->mc_ptr->min_threads != (uint16_t) NO_VAL) && (job_ptr->details->mc_ptr->min_threads < ntasks_per_core)) { ntasks_per_core = job_ptr->details->mc_ptr->min_threads; @@ -321,7 +333,7 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, vpus, job_res->cpus[i]); #endif if ((c + (sockets * cps)) > csize) - fatal ("cons_res: _cyclic_sync_core_bitmap index error"); + fatal("cons_res: _cyclic_sync_core_bitmap index error"); if (sockets > sock_size) { sock_size = sockets; @@ -441,14 +453,16 @@ extern int cr_dist(struct job_record *job_ptr, /* perform a plane distribution on the 'cpus' array */ error_code = _compute_plane_dist(job_ptr); if (error_code != SLURM_SUCCESS) { - error("cons_res: cr_dist: Error in _compute_plane_dist"); + error("cons_res: cr_dist: Error in " + "_compute_plane_dist"); return error_code; } } else { /* perform a cyclic distribution on the 'cpus' array */ error_code = _compute_c_b_task_dist(job_ptr); if (error_code != SLURM_SUCCESS) { - error("cons_res: cr_dist: Error in _compute_c_b_task_dist"); + error("cons_res: cr_dist: Error in " + "_compute_c_b_task_dist"); return error_code; } } diff --git a/src/plugins/select/cons_res/job_test.c b/src/plugins/select/cons_res/job_test.c index fabf2575c..0bfe937e1 100644 --- a/src/plugins/select/cons_res/job_test.c +++ b/src/plugins/select/cons_res/job_test.c @@ -618,6 +618,13 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, { uint16_t cpus; uint32_t avail_mem, req_mem; + struct node_record *node_ptr = node_record_table_ptr + node_i; + + if (!test_only && IS_NODE_COMPLETING(node_ptr)) { + /* Do not allocate more jobs to nodes with completing jobs */ + cpus = 0; + return cpus; + } switch (cr_type) { case CR_CORE: @@ -1413,7 +1420,7 @@ static int _eval_nodes_topo(struct job_record *job_ptr, bitstr_t *bitmap, best_fit_inx = j; } if (best_fit_inx == -1) { - error("job %u: best_fit topology failure", job_ptr->job_id); + debug("job %u: best_fit topology failure", job_ptr->job_id); rc = SLURM_ERROR; goto fini; } diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 5fb46a813..78477d6df 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -116,17 +116,32 @@ * the slurmctld we will have these symbols defined. They will get * overwritten when linking with the slurmctld. */ -slurm_ctl_conf_t slurmctld_conf; -struct node_record *node_record_table_ptr; -List part_list; -List job_list; -int node_record_count; -time_t last_node_update; -struct switch_record *switch_record_table; -int switch_record_cnt; -bitstr_t *avail_node_bitmap; -bitstr_t *idle_node_bitmap; -List slurm_find_preemptable_jobs(struct job_record *job_ptr); +#if defined (__APPLE__) + slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); + struct node_record *node_record_table_ptr __attribute__((weak_import)); + List part_list __attribute__((weak_import)); + List job_list __attribute__((weak_import)); + int node_record_count __attribute__((weak_import)); + time_t last_node_update __attribute__((weak_import)); + struct switch_record *switch_record_table __attribute__((weak_import)); + int switch_record_cnt __attribute__((weak_import)); + bitstr_t *avail_node_bitmap __attribute__((weak_import)); + bitstr_t *idle_node_bitmap __attribute__((weak_import)); + List slurm_find_preemptable_jobs(struct job_record *job_ptr) + __attribute__((weak_import)); +#else + slurm_ctl_conf_t slurmctld_conf; + struct node_record *node_record_table_ptr; + List part_list; + List job_list; + int node_record_count; + time_t last_node_update; + struct switch_record *switch_record_table; + int switch_record_cnt; + bitstr_t *avail_node_bitmap; + bitstr_t *idle_node_bitmap; + List slurm_find_preemptable_jobs(struct job_record *job_ptr); +#endif /* * These variables are required by the generic plugin interface. If they diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index e94e9e7d1..7389567bd 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 39cd508f1..981ed6571 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -81,14 +81,25 @@ * the slurmctld we will have these symbols defined. They will get * overwritten when linking with the slurmctld. */ -slurm_ctl_conf_t slurmctld_conf; -struct node_record *node_record_table_ptr; -List part_list; -List job_list; -int node_record_count; -time_t last_node_update; -struct switch_record *switch_record_table; -int switch_record_cnt; +#if defined (__APPLE__) + slurm_ctl_conf_t slurmctld_conf __attribute__((weak_import)); + struct node_record *node_record_table_ptr __attribute__((weak_import)); + List part_list __attribute__((weak_import)); + List job_list __attribute__((weak_import)); + int node_record_count __attribute__((weak_import)); + time_t last_node_update __attribute__((weak_import)); + struct switch_record *switch_record_table __attribute__((weak_import)); + int switch_record_cnt __attribute__((weak_import)); +#else + slurm_ctl_conf_t slurmctld_conf; + struct node_record *node_record_table_ptr; + List part_list; + List job_list; + int node_record_count; + time_t last_node_update; + struct switch_record *switch_record_table; + int switch_record_cnt; +#endif struct select_nodeinfo { uint16_t magic; /* magic number */ @@ -1127,7 +1138,7 @@ static int _job_test_topo(struct job_record *job_ptr, bitstr_t *bitmap, best_fit_inx = j; } if (best_fit_inx == -1) { - error("job %u: best_fit topology failure", job_ptr->job_id); + debug("job %u: best_fit topology failure", job_ptr->job_id); rc = EINVAL; goto fini; } diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index a0456d178..d5f23e581 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in index a0d4696d9..34f152ea9 100644 --- a/src/plugins/switch/elan/Makefile.in +++ b/src/plugins/switch/elan/Makefile.in @@ -142,6 +142,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in index 6d571c407..e267e7dcd 100644 --- a/src/plugins/switch/federation/Makefile.in +++ b/src/plugins/switch/federation/Makefile.in @@ -145,6 +145,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index 53d5213f6..8d283fce0 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index 751945e9f..b6cc74ac7 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 9a77ed424..5256108bc 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -148,6 +148,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 86dde0291..2135ea771 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index beece14fa..30ede658c 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index dce8d9850..1f69be980 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -131,6 +131,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index f2028797d..760deb63e 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index 0da6fe709..6ce69cbf0 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index dc7f339e2..e2b1cdbbb 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index 21a4248ef..f03b394d2 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -124,6 +124,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 0afb4f12a..62bc9c3c2 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -117,6 +117,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/salloc/salloc.c b/src/salloc/salloc.c index 24ace1341..8fe779e13 100644 --- a/src/salloc/salloc.c +++ b/src/salloc/salloc.c @@ -203,12 +203,6 @@ int main(int argc, char *argv[]) exit(error_exit); } } - if (opt.uid != (uid_t) -1) { - if (setuid(opt.uid) < 0) { - error("setuid: %m"); - exit(error_exit); - } - } callbacks.ping = _ping_handler; callbacks.timeout = _timeout_handler; @@ -240,6 +234,13 @@ int main(int argc, char *argv[]) sleep (++retries); } + /* become the user after the allocation has been requested. */ + if (opt.uid != (uid_t) -1) { + if (setuid(opt.uid) < 0) { + error("setuid: %m"); + exit(error_exit); + } + } if (alloc == NULL) { if (allocation_interrupted) { /* cancelled by signal */ @@ -261,7 +262,8 @@ int main(int argc, char *argv[]) /* * Allocation granted! */ - info("Granted job allocation %d", alloc->job_id); + info("Granted job allocation %u", alloc->job_id); + pending_job_id = alloc->job_id; #ifdef HAVE_BG if (!_wait_bluegene_block_ready(alloc)) { if(!allocation_interrupted) @@ -334,8 +336,13 @@ int main(int argc, char *argv[]) env_array_free(env); pthread_mutex_lock(&allocation_state_lock); if (allocation_state == REVOKED) { - error("Allocation was revoked before command could be run"); + error("Allocation was revoked for job %u before command could " + "be run", alloc->job_id); pthread_mutex_unlock(&allocation_state_lock); + if (slurm_complete_job(alloc->job_id, status) != 0) { + error("Unable to clean up allocation for job %u: %m", + alloc->job_id); + } return 1; } else { allocation_state = GRANTED; @@ -650,6 +657,12 @@ static void _exit_on_signal(int signo) /* This typically signifies the job was cancelled by scancel */ static void _job_complete_handler(srun_job_complete_msg_t *comp) { + if (pending_job_id && (pending_job_id != comp->job_id)) { + error("Ignoring bogus job_complete call: job %u is not " + "job %u", pending_job_id, comp->job_id); + return; + } + if (comp->step_id == NO_VAL) { pthread_mutex_lock(&allocation_state_lock); if (allocation_state != REVOKED) { diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index f5ee3550d..29426f8a6 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -118,6 +118,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 8d52bb1b7..7649fbd55 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -117,6 +117,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 4bbca8e4f..7b8b30d4f 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 2d9019ad0..68886c276 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -119,6 +119,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index f235fc4cf..b5d378713 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -121,6 +121,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 6ca2f314d..854333ddb 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -121,6 +121,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sinfo/opts.c b/src/sinfo/opts.c index 7de33968f..4b9daf939 100644 --- a/src/sinfo/opts.c +++ b/src/sinfo/opts.c @@ -626,9 +626,18 @@ _parse_format( char* format ) field_size, right_justify, suffix ); - } else + } else { + prefix = xstrdup("%"); + xstrcat(prefix, token); + xfree(suffix); + suffix = prefix; + format_add_invalid( params.format_list, + field_size, + right_justify, + suffix ); fprintf(stderr, "Invalid node format specification: %c\n", field[0] ); + } token = strtok_r( NULL, "%", &tmp_char); } diff --git a/src/sinfo/print.c b/src/sinfo/print.c index 833357ff3..a15cf6f52 100644 --- a/src/sinfo/print.c +++ b/src/sinfo/print.c @@ -863,3 +863,11 @@ int _print_weight(sinfo_data_t * sinfo_data, int width, printf("%s", suffix); return SLURM_SUCCESS; } + +int _print_com_invalid(sinfo_data_t * sinfo_data, int width, + bool right_justify, char *suffix) +{ + if (suffix) + printf("%s", suffix); + return SLURM_SUCCESS; +} diff --git a/src/sinfo/print.h b/src/sinfo/print.h index a6e41fe06..59cc00c0c 100644 --- a/src/sinfo/print.h +++ b/src/sinfo/print.h @@ -123,6 +123,8 @@ int print_sinfo_list(List sinfo_list); format_add_function(list,wid,right,suffix,_print_weight) #define format_add_alloc_nodes(list,wid,right,suffix) \ format_add_function(list,wid,right,suffix,_print_alloc_nodes) +#define format_add_invalid(list,wid,right,suffix) \ + format_add_function(list,wid,right,suffix,_print_com_invalid) /***************************************************************************** * Print Field Functions @@ -184,5 +186,7 @@ int _print_weight(sinfo_data_t * sinfo_data, int width, bool right_justify, char *suffix); int _print_alloc_nodes(sinfo_data_t * sinfo_data, int width, bool right_justify, char *suffix); +int _print_com_invalid(sinfo_data_t * sinfo_data, int width, + bool right_justify, char *suffix); #endif diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c index 35a4daab4..a022a7394 100644 --- a/src/sinfo/sinfo.c +++ b/src/sinfo/sinfo.c @@ -699,11 +699,7 @@ static void _update_sinfo(sinfo_data_t *sinfo_ptr, node_info_t *node_ptr, NODE_STATE_ERROR, &error_cpus); #ifdef HAVE_BG - if(error_cpus) { - xfree(node_ptr->reason); - node_ptr->reason = xstrdup("Block(s) in error state"); - sinfo_ptr->reason = node_ptr->reason; - } + if(!params.match_flags.state_flag && (used_cpus || error_cpus)) { /* We only get one shot at this (because all states are combined together), so we need to make @@ -779,6 +775,16 @@ static int _insert_node_ptr(List sinfo_list, uint16_t part_num, sinfo_data_t *sinfo_ptr = NULL; ListIterator itr = NULL; +#ifdef HAVE_BG + uint16_t error_cpus = 0; + select_g_select_nodeinfo_get(node_ptr->select_nodeinfo, + SELECT_NODEDATA_SUBCNT, + NODE_STATE_ERROR, + &error_cpus); + if(error_cpus && !node_ptr->reason) + node_ptr->reason = xstrdup("Block(s) in error state"); +#endif + itr = list_iterator_create(sinfo_list); while ((sinfo_ptr = list_next(itr))) { if (!_match_part_data(sinfo_ptr, part_ptr)) diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 6fcdaaead..a6e92e710 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -127,6 +127,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index 3dd917e3c..8db15e0f6 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -981,7 +981,10 @@ static void *_thread_per_group_rpc(void *args) break; default: if (!srun_agent) { - errno = ret_data_info->err; + if (ret_data_info->err) + errno = ret_data_info->err; + else + errno = rc; rc = _comm_err(ret_data_info->node_name); } if(srun_agent) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index eef44df37..810cd0581 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -6076,11 +6076,8 @@ job_alloc_info(uint32_t uid, uint32_t job_id, struct job_record **job_pptr) job_ptr = find_job_record(job_id); if (job_ptr == NULL) return ESLURM_INVALID_JOB_ID; - if ((job_ptr->user_id != uid) && - (uid != 0) && (uid != slurmctld_conf.slurm_user_id)) - return ESLURM_ACCESS_DENIED; if ((slurmctld_conf.private_data & PRIVATE_DATA_JOBS) - && (job_ptr->user_id != uid) && !validate_super_user(uid)) + && (job_ptr->user_id != uid) && !validate_super_user(uid)) return ESLURM_ACCESS_DENIED; if (IS_JOB_PENDING(job_ptr)) return ESLURM_JOB_PENDING; @@ -6319,6 +6316,34 @@ extern bool job_epilog_complete(uint32_t job_id, char *node_name, if (!IS_JOB_COMPLETING(job_ptr)) { /* COMPLETED */ if (IS_JOB_PENDING(job_ptr) && (job_ptr->batch_flag)) { info("requeue batch job %u", job_ptr->job_id); + /* Clear everything so this appears to + be a new job and then restart it + up in accounting. + */ + job_ptr->start_time = job_ptr->end_time = 0; + job_ptr->total_procs = 0; + /* Current code (<= 2.1) has it so we start the new + job with the next step id. This could be + used when restarting to figure out which + step the previous run of this job stopped + on. + */ + + //job_ptr->next_step_id = 0; +#ifdef HAVE_BG + select_g_select_jobinfo_set( + job_ptr->select_jobinfo, + SELECT_JOBDATA_BLOCK_ID, + NULL); + select_g_select_jobinfo_set( + job_ptr->select_jobinfo, + SELECT_JOBDATA_NODE_CNT, + 0); +#endif + job_ptr->node_cnt = 0; + xfree(job_ptr->nodes); + xfree(job_ptr->nodes_completing); + FREE_NULL_BITMAP(job_ptr->node_bitmap); if (job_ptr->details) { /* the time stamp on the new batch launch * credential must be larger than the time @@ -6327,7 +6352,6 @@ extern bool job_epilog_complete(uint32_t job_id, char *node_name, * named socket purged, so delay for at * least ten seconds. */ job_ptr->details->begin_time = time(NULL) + 10; - job_ptr->start_time = job_ptr->end_time = 0; jobacct_storage_g_job_start( acct_db_conn, slurmctld_cluster_name, job_ptr); @@ -7113,7 +7137,7 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, if(used_limits && (used_limits->submit_jobs >= qos_ptr->max_submit_jobs_pu)) { info("job submit for user %s(%u): " - "account max submit job limit exceeded %u", + "qos max submit job limit exceeded %u", user_name, job_desc->user_id, qos_ptr->max_submit_jobs_pu); @@ -7137,7 +7161,7 @@ static bool _validate_acct_policy(job_desc_msg_t *job_desc, job_desc->time_limit = time_limit; } else if (job_desc->time_limit > time_limit) { info("job submit for user %s(%u): " - "time limit %u exceeds account max %u", + "time limit %u exceeds qos max %u", user_name, job_desc->user_id, job_desc->time_limit, time_limit); diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 175a991a5..04ed2a0cc 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -776,7 +776,7 @@ int update_node ( update_node_msg_t * update_node_msg ) } else if ((state_val == NODE_STATE_DRAIN) || (state_val == NODE_STATE_FAIL)) { bit_clear (avail_node_bitmap, node_inx); - state_val = node_ptr->node_state | + state_val = node_ptr->node_state |= NODE_STATE_DRAIN; if ((node_ptr->run_job_cnt == 0) && (node_ptr->comp_job_cnt == 0)) { @@ -1420,6 +1420,14 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) (reg_msg->job_count == 0)) { /* job already done */ last_node_update = now; node_ptr->node_state &= (~NODE_STATE_COMPLETING); + } else if (IS_NODE_IDLE(node_ptr) && + (reg_msg->job_count != 0)) { + last_node_update = now; + node_ptr->node_state = NODE_STATE_ALLOCATED | + node_flags; + error("Invalid state for node %s, was IDLE with %u " + "running jobs", + node_ptr->name, reg_msg->job_count); } select_g_update_node_config((node_ptr-node_record_table_ptr)); @@ -1640,6 +1648,14 @@ extern int validate_nodes_via_front_end( updated_job = true; node_ptr->node_state &= (~NODE_STATE_COMPLETING); + } else if (IS_NODE_IDLE(node_ptr) && + (jobs_on_node != 0)) { + updated_job = true; + node_ptr->node_state = NODE_STATE_ALLOCATED | + node_flags; + error("Invalid state for node %s, was IDLE " + "with %u running jobs", + node_ptr->name, reg_msg->job_count); } select_g_update_node_config( @@ -1747,7 +1763,11 @@ static void _node_did_resp(struct node_record *node_ptr) if (IS_NODE_UNKNOWN(node_ptr)) { last_node_update = now; node_ptr->last_idle = now; - node_ptr->node_state = NODE_STATE_IDLE | node_flags; + if (node_ptr->run_job_cnt) { + node_ptr->node_state = NODE_STATE_ALLOCATED | + node_flags; + } else + node_ptr->node_state = NODE_STATE_IDLE | node_flags; if (!IS_NODE_DRAIN(node_ptr) && !IS_NODE_FAIL(node_ptr)) { clusteracct_storage_g_node_up(acct_db_conn, slurmctld_cluster_name, diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index 0c9a7fe19..91d937255 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -2,7 +2,7 @@ * partition_mgr.c - manage the partition information of slurm * Note: there is a global partition list (part_list) and * time stamp (last_part_update) - * $Id: partition_mgr.c 19095 2009-12-01 22:59:18Z da $ + * $Id: partition_mgr.c 20897 2010-08-05 17:59:33Z jette $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Copyright (C) 2008-2009 Lawrence Livermore National Security. @@ -1255,6 +1255,9 @@ uid_t *_get_group_members(char *group_name) setgrent_r(&fp); while (!getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, &fp)) { grp_result = &grp; +#elif defined (__APPLE__) + setgrent(); + while ((grp_result = getgrent()) != NULL) { #else setgrent(); while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, @@ -1274,6 +1277,9 @@ uid_t *_get_group_members(char *group_name) setgrent_r(&fp); while (!getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, &fp)) { grp_result = &grp; +#elif defined (__APPLE__) + setgrent(); + while ((grp_result = getgrent()) != NULL) { #else setgrent(); while (getgrent_r(&grp, grp_buffer, PW_BUF_SIZE, @@ -1309,6 +1315,8 @@ uid_t *_get_group_members(char *group_name) setpwent(); #if defined (__sun) while ((pwd_result = getpwent_r(&pw, pw_buffer, PW_BUF_SIZE)) != NULL) { +#elif defined (__APPLE__) + while ((pwd_result = getpwent()) != NULL) { #else while (!getpwent_r(&pw, pw_buffer, PW_BUF_SIZE, &pwd_result)) { diff --git a/src/slurmctld/power_save.c b/src/slurmctld/power_save.c index ff4a91aa2..219dcd615 100644 --- a/src/slurmctld/power_save.c +++ b/src/slurmctld/power_save.c @@ -306,7 +306,11 @@ static pid_t _run_prog(char *prog, char *arg) if (child == 0) { for (i=0; i<128; i++) close(i); +#ifdef SETPGRP_TWO_ARGS + setpgrp(0, 0); +#else setpgrp(); +#endif execl(program, arg0, arg1, NULL); exit(1); } else if (child < 0) { diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 42faf0ca4..fc6bb517c 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -2722,7 +2722,7 @@ static void _slurm_rpc_resv_show(slurm_msg_t * msg) START_TIMER; debug2("Processing RPC: REQUEST_RESERVATION_INFO from uid=%u", (unsigned int) uid); - if ((slurmctld_conf.private_data & PRIVATE_DATA_PARTITIONS) && + if ((slurmctld_conf.private_data & PRIVATE_DATA_RESERVATIONS) && (!validate_super_user(uid))) { debug2("Security violation, REQUEST_RESERVATION_INFO " "RPC from uid=%d", uid); diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index 3078f9b1d..91fff6b7e 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index de33adcd8..8b3af9d05 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -124,6 +124,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/slurmd/slurmd/get_mach_stat.c b/src/slurmd/slurmd/get_mach_stat.c index 106c938fc..e8839ece7 100644 --- a/src/slurmd/slurmd/get_mach_stat.c +++ b/src/slurmd/slurmd/get_mach_stat.c @@ -65,7 +65,7 @@ #include <string.h> #include <syslog.h> -#if defined(HAVE_AIX) || defined(__sun) +#if defined(HAVE_AIX) || defined(__sun) || defined(__APPLE__) # include <sys/times.h> # include <sys/types.h> #else @@ -403,7 +403,7 @@ get_tmp_disk(uint32_t *tmp_disk, char *tmp_fs) extern int get_up_time(uint32_t *up_time) { -#if defined(HAVE_AIX) || defined(__sun) +#if defined(HAVE_AIX) || defined(__sun) || defined(__APPLE__) clock_t tm; struct tms buf; diff --git a/src/slurmd/slurmd/get_mach_stat.h b/src/slurmd/slurmd/get_mach_stat.h index f82ba29f4..aca63cdde 100644 --- a/src/slurmd/slurmd/get_mach_stat.h +++ b/src/slurmd/slurmd/get_mach_stat.h @@ -38,7 +38,6 @@ #ifndef _GET_MACH_STAT_H #define _GET_MACH_STAT_H -#define _SLURMD_H #if HAVE_CONFIG_H # include "config.h" # if HAVE_INTTYPES_H diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 29efe3a52..0f551774c 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3563,6 +3563,8 @@ init_gids_cache(int cache) setpwent(); #if defined (__sun) while ((pwd = getpwent_r(&pw, buf, BUF_SIZE)) != NULL) { +#elif defined (__APPLE__) + while ((pwd = getpwent()) != NULL) { #else while (!getpwent_r(&pw, buf, BUF_SIZE, &pwd)) { diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index d6327d6c0..6f948eeb6 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -127,6 +127,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 4b38bbc8a..f0d3ed5b2 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * src/slurmd/slurmstepd/mgr.c - job manager functions for slurmstepd - * $Id: mgr.c 20276 2010-05-18 16:51:08Z da $ + * $Id: mgr.c 20933 2010-08-12 16:18:35Z lipari $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Copyright (C) 2008-2009 Lawrence Livermore National Security. @@ -232,31 +232,32 @@ mgr_launch_tasks_setup(launch_tasks_request_msg_t *msg, slurm_addr *cli, } /* - * Send batch exit code to slurmctld. Non-zero rc will DRAIN the node. + * Find the maximum task return code */ -extern void -batch_finish(slurmd_job_t *job, int rc) +static uint32_t _get_exit_code(slurmd_job_t *job) { int i; + uint32_t step_rc = NO_VAL; + for (i = 0; i < job->ntasks; i++) { /* If signalled we only need to check one and then * break out of the loop */ if(WIFSIGNALED(job->task[i]->estatus)) { - switch(WTERMSIG(job->task[i]->estatus)) { - case SIGTERM: - case SIGKILL: - case SIGINT: - step_complete.step_rc = NO_VAL; - break; - default: - step_complete.step_rc = job->task[i]->estatus; - break; - } + step_rc = job->task[i]->estatus; break; } - step_complete.step_rc = MAX(step_complete.step_rc, - WEXITSTATUS(job->task[i]->estatus)); + step_rc = MAX(step_complete.step_rc, job->task[i]->estatus); } + return step_rc; +} + +/* + * Send batch exit code to slurmctld. Non-zero rc will DRAIN the node. + */ +extern void +batch_finish(slurmd_job_t *job, int rc) +{ + step_complete.step_rc = _get_exit_code(job); if (job->argv[0] && (unlink(job->argv[0]) < 0)) error("unlink(%s): %m", job->argv[0]); @@ -586,7 +587,6 @@ _wait_for_children_slurmstepd(slurmd_job_t *job) { int left = 0; int rc; - int i; struct timespec ts = {0, 0}; pthread_mutex_lock(&step_complete.lock); @@ -617,26 +617,7 @@ _wait_for_children_slurmstepd(slurmd_job_t *job) step_complete.rank); } - /* Find the maximum task return code */ - for (i = 0; i < job->ntasks; i++) { - /* If signalled we only need to check one and then - break out of the loop */ - if(WIFSIGNALED(job->task[i]->estatus)) { - switch(WTERMSIG(job->task[i]->estatus)) { - case SIGTERM: - case SIGKILL: - case SIGINT: - step_complete.step_rc = NO_VAL; - break; - default: - step_complete.step_rc = job->task[i]->estatus; - break; - } - break; - } - step_complete.step_rc = MAX(step_complete.step_rc, - WEXITSTATUS(job->task[i]->estatus)); - } + step_complete.step_rc = _get_exit_code(job); step_complete.wait_children = false; pthread_mutex_unlock(&step_complete.lock); diff --git a/src/slurmd/slurmstepd/pdebug.c b/src/slurmd/slurmstepd/pdebug.c index ebc049f7b..b3a4f70a3 100644 --- a/src/slurmd/slurmstepd/pdebug.c +++ b/src/slurmd/slurmstepd/pdebug.c @@ -85,14 +85,14 @@ pdebug_trace_process(slurmd_job_t *job, pid_t pid) return SLURM_ERROR; } -#ifdef PT_DETACH +#ifdef BSD + if (_PTRACE(PT_DETACH, pid, (caddr_t)1, 0)) { +#elif defined(PT_DETACH) if (_PTRACE(PT_DETACH, pid, NULL, 0)) { -#else -#if defined (__sun) +#elif defined(__sun) if (_PTRACE(7, pid, NULL, 0)) { #else if (_PTRACE(PTRACE_DETACH, pid, NULL, 0)) { -#endif #endif error("ptrace(%lu): %m", (unsigned long) pid); return SLURM_ERROR; @@ -111,14 +111,14 @@ pdebug_stop_current(slurmd_job_t *job) * Stop the task on exec for TotalView to connect */ if ( (job->task_flags & TASK_PARALLEL_DEBUG) -#ifdef PT_TRACE_ME +#ifdef BSD + && (_PTRACE(PT_TRACE_ME, 0, (caddr_t)0, 0) < 0) ) +#elif defined(PT_TRACE_ME) && (_PTRACE(PT_TRACE_ME, 0, NULL, 0) < 0) ) -#else -#if defined (__sun) +#elif defined(__sun) && (_PTRACE(0, 0, NULL, 0) < 0)) #else && (_PTRACE(PTRACE_TRACEME, 0, NULL, 0) < 0) ) -#endif #endif error("ptrace: %m"); } diff --git a/src/slurmd/slurmstepd/pdebug.h b/src/slurmd/slurmstepd/pdebug.h index 4aac05f4b..e2ca80a92 100644 --- a/src/slurmd/slurmstepd/pdebug.h +++ b/src/slurmd/slurmstepd/pdebug.h @@ -43,6 +43,7 @@ #endif #include <unistd.h> +#include <sys/param.h> #ifdef HAVE_SYS_PTRACE_H # include <sys/ptrace.h> #endif @@ -64,6 +65,8 @@ int pdebug_trace_process(slurmd_job_t *job, pid_t pid); #else # ifdef PTRACE_FIVE_ARGS # define _PTRACE(r,p,a,d) ptrace((r),(p),(a),(d),NULL) +# elif defined BSD +# define _PTRACE(r,p,a,d) ptrace((r),(p),(a),(d)) # else # define _PTRACE(r,p,a,d) ptrace((r),(p),(a),(void *)(d)) # endif diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 90a07b897..73d640da7 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 6ec7aa376..0f2b4b332 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -137,6 +137,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index 78340c5e0..329455458 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index 37eab6220..968f35a48 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -121,6 +121,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/squeue/opts.c b/src/squeue/opts.c index 1c586d92d..a6d05cae6 100644 --- a/src/squeue/opts.c +++ b/src/squeue/opts.c @@ -1,7 +1,7 @@ /****************************************************************************\ * opts.c - srun command line option parsing * - * $Id: opts.c 19153 2009-12-10 22:47:09Z da $ + * $Id: opts.c 21042 2010-08-30 15:49:44Z jette $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Copyright (C) 2008-2009 Lawrence Livermore National Security. @@ -504,10 +504,20 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); - else + else { + prefix = xstrdup("%"); + xstrcat(prefix, token); + xfree(suffix); + suffix = prefix; + + step_format_add_invalid( params.format_list, + field_size, + right_justify, + suffix ); error ( "Invalid job step format " "specification: %c", field[0] ); + } } else { if (field[0] == 'a') job_format_add_account( params.format_list, @@ -711,9 +721,19 @@ extern int parse_format( char* format ) field_size, right_justify, suffix ); - else + else { + prefix = xstrdup("%"); + xstrcat(prefix, token); + xfree(suffix); + suffix = prefix; + + job_format_add_invalid( params.format_list, + field_size, + right_justify, + suffix ); error( "Invalid job format specification: %c", field[0] ); + } } token = strtok_r( NULL, "%", &tmp_char); } @@ -752,7 +772,7 @@ _get_prefix( char *token ) * OUT field - the letter code for the data type * OUT field_size - byte count * OUT right_justify - true of field to be right justified - * OUT suffix - tring containing everthing after the field specification + * OUT suffix - string containing everthing after the field specification */ static void _parse_token( char *token, char *field, int *field_size, bool *right_justify, diff --git a/src/squeue/print.c b/src/squeue/print.c index 7b5465beb..fdbc424e1 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -757,7 +757,19 @@ int _print_job_shared(job_info_t * job, int width, bool right_justify, if (job == NULL) /* Print the Header instead */ _print_str("SHARED", width, right_justify, true); else { - _print_int(job->shared, width, right_justify, true); + switch (job->shared) { + case 0: + _print_str("no", width, right_justify, true); + break; + case 1: + case 2: + _print_str("yes", width, right_justify, true); + break; + case (uint16_t)NO_VAL: + default: + _print_str("unknwn", width, right_justify, true); + break; + } } if (suffix) printf("%s", suffix); @@ -1437,3 +1449,10 @@ static int _filter_step(job_step_info_t * step) return 0; } + +int _print_com_invalid(void * p, int width, bool right, char* suffix) +{ + if (suffix) + printf("%s", suffix); + return SLURM_SUCCESS; +} diff --git a/src/squeue/print.h b/src/squeue/print.h index 131b94174..e2a235d83 100644 --- a/src/squeue/print.h +++ b/src/squeue/print.h @@ -172,6 +172,8 @@ int job_format_add_function(List list, int width, bool right_justify, job_format_add_function(list,wid,right,suffix,_print_job_comment) #define job_format_add_reservation(list,wid,right,suffix) \ job_format_add_function(list,wid,right,suffix,_print_job_reservation) +#define job_format_add_invalid(list,wid,right,suffix) \ + job_format_add_function(list,wid,right,suffix,(void*)_print_com_invalid) /***************************************************************************** * Job Line Print Functions @@ -296,6 +298,9 @@ int step_format_add_function(List list, int width, bool right_justify, step_format_add_function(list,wid,right,suffix,_print_step_name) #define step_format_add_num_tasks(list,wid,right,suffix) \ step_format_add_function(list,wid,right,suffix,_print_step_num_tasks) +#define step_format_add_invalid(list,wid,right,suffix) \ + step_format_add_function(list,wid,right,suffix, \ + (void*)_print_com_invalid) /***************************************************************************** * Step Line Print Functions @@ -323,4 +328,9 @@ int _print_step_nodes(job_step_info_t * step, int width, int _print_step_num_tasks(job_step_info_t * step, int width, bool right_justify, char *suffix); +/***************************************************************************** + * Common Line Print Functions + *****************************************************************************/ +int _print_com_invalid(void * p, int width, bool right_justify, char * suffix); + #endif diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 4416efe4f..7e71d0f0f 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 3e06fceea..fe4ed656d 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/srun/allocate.c b/src/srun/allocate.c index 712cece8b..ce1a1bd0b 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -132,10 +132,16 @@ static void _exit_on_signal(int signo) /* This typically signifies the job was cancelled by scancel */ static void _job_complete_handler(srun_job_complete_msg_t *msg) { - if((int)msg->step_id >= 0) - info("Force Terminated job %u.%u", msg->job_id, msg->step_id); - else + if (pending_job_id && (pending_job_id != msg->job_id)) { + error("Ignoring bogus job_complete call: job %u is not " + "job %u", pending_job_id, msg->job_id); + return; + } + + if (msg->step_id == NO_VAL) info("Force Terminated job %u", msg->job_id); + else + info("Force Terminated job %u.%u", msg->job_id, msg->step_id); } /* @@ -231,7 +237,6 @@ static int _wait_bluegene_block_ready(resource_allocation_response_msg_t *alloc) int max_delay = BG_FREE_PREVIOUS_BLOCK + BG_MIN_BLOCK_BOOT + (BG_INCR_BLOCK_BOOT * alloc->node_cnt); - pending_job_id = alloc->job_id; select_g_select_jobinfo_get(alloc->select_jobinfo, SELECT_JOBDATA_BLOCK_ID, &block_id); @@ -271,7 +276,6 @@ static int _wait_bluegene_block_ready(resource_allocation_response_msg_t *alloc) is_ready = 0; xfree(block_id); - pending_job_id = 0; return is_ready; } @@ -401,6 +405,7 @@ allocate_nodes(void) /* * Allocation granted! */ + pending_job_id = resp->job_id; #ifdef HAVE_BG if (!_wait_bluegene_block_ready(resp)) { if(!destroy_job) diff --git a/src/srun/srun.c b/src/srun/srun.c index 35684307d..0ea072db8 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -257,12 +257,6 @@ int srun(int ac, char **av) /* Set up slurmctld message handler */ slurmctld_msg_init(); - /* - * Become --uid user - */ - if (_become_user () < 0) - info ("Warning: Unable to assume uid=%lu\n", opt.uid); - /* now global "opt" should be filled in and available, * create a job from opt */ @@ -349,6 +343,13 @@ int srun(int ac, char **av) /* use SLURM_JOB_NAME env var */ opt.job_name_set_cmd = true; } + + /* + * Become --uid user + */ + if (_become_user () < 0) + info ("Warning: Unable to assume uid=%lu\n", opt.uid); + if (!job || create_job_step(job, true) < 0) { slurm_complete_job(resp->job_id, 1); exit(error_exit); @@ -357,6 +358,12 @@ int srun(int ac, char **av) slurm_free_resource_allocation_response_msg(resp); } + /* + * Become --uid user + */ + if (_become_user () < 0) + info ("Warning: Unable to assume uid=%lu\n", opt.uid); + /* * Enhance environment for job */ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index 1f9855872..9e0c9678d 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -118,6 +118,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 7f7cf401e..b2e647928 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -118,6 +118,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 923e2c514..c2b32f785 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 9fc9a587e..8c68a5940 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -120,6 +120,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index 34012c42a..237e6118b 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -140,6 +140,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 0e0f2b70e..b40813e99 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -136,6 +136,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 8aae85060..165b8727a 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -89,6 +89,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/expect/test7.7 b/testsuite/expect/test7.7 index 4d1010c05..a045de3c1 100755 --- a/testsuite/expect/test7.7 +++ b/testsuite/expect/test7.7 @@ -47,6 +47,7 @@ print_header $test_id # Check if we have sched/wiki2 configured # log_user 0 +set agg_time -1 set conf_dir "" set control_addr "" set sched_port 0 @@ -58,6 +59,10 @@ expect { set control_addr $expect_out(1,string) exp_continue } + -re "SchedulerParameters.*JobAggregationTime=($number)" { + set agg_time $expect_out(1,string) + exp_continue + } -re "SchedulerPort *= ($number)" { set sched_port $expect_out(1,string) exp_continue @@ -91,13 +96,16 @@ if {$sched_port == 0} { send_user "\nFAILURE: SchedulerPort = 0\n" exit 1 } +if {$agg_time != 0} { + send_user "\nWARNING: JobAggregationTime != 0\n" + exit 1 +} # # Try to get the AuthKey from wiki.conf # set auth_key 0 set e_port 0 -set agg_time 999 set wiki_file "$conf_dir/wiki.conf" if {[file readable $wiki_file] == 0} { send_user "\nWARNING: Unable to read $wiki_file\n" @@ -114,10 +122,6 @@ expect { set e_port $expect_out(1,string) exp_continue } - -re "JobAggregationTime=($number)" { - set agg_time $expect_out(1,string) - exp_continue - } -re eof { wait @@ -132,10 +136,7 @@ if {$e_port == 0} { send_user "\nWARNING: EPort not found in $wiki_file\n" exit 1 } -if {$agg_time != 0} { - send_user "\nWARNING: JobAggregationTime != 0 in $wiki_file\n" - exit 1 -} + #send_user "\nAuthKey=$auth_key\nEPort=$e_port\n" if { [test_bluegene] } { diff --git a/testsuite/expect/test7.8 b/testsuite/expect/test7.8 index ff28bae8f..15450b6b7 100755 --- a/testsuite/expect/test7.8 +++ b/testsuite/expect/test7.8 @@ -46,6 +46,7 @@ print_header $test_id # Check if we have sched/wiki configured # log_user 0 +set agg_time -1 set conf_dir "" set control_addr "" set sched_port 0 @@ -57,6 +58,10 @@ expect { set control_addr $expect_out(1,string) exp_continue } + -re "SchedulerParameters.*JobAggregationTime=($number)" { + set agg_time $expect_out(1,string) + exp_continue + } -re "SchedulerPort *= ($number)" { set sched_port $expect_out(1,string) exp_continue @@ -94,6 +99,10 @@ if {$sched_port == 0} { send_user "\nFAILURE: SchedulerPort = 0\n" exit 1 } +if {$agg_time != 0} { + send_user "\nWARNING: JobAggregationTime != 0\n" + exit 1 +} if { [test_bluegene] } { set is_bluegene 1 diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index 397734f26..bafc07261 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -129,6 +129,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index bc40132e2..0cb878285 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -152,6 +152,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 52910b49e..694423859 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -144,6 +144,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index 87482a8a5..846f8f0e5 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -132,6 +132,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/slurmctld/Makefile.in b/testsuite/slurm_unit/slurmctld/Makefile.in index 4d835c451..a393432ee 100644 --- a/testsuite/slurm_unit/slurmctld/Makefile.in +++ b/testsuite/slurm_unit/slurmctld/Makefile.in @@ -94,6 +94,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/slurmd/Makefile.in b/testsuite/slurm_unit/slurmd/Makefile.in index 8ba324a9a..f103ee8f7 100644 --- a/testsuite/slurm_unit/slurmd/Makefile.in +++ b/testsuite/slurm_unit/slurmd/Makefile.in @@ -94,6 +94,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ diff --git a/testsuite/slurm_unit/slurmdbd/Makefile.in b/testsuite/slurm_unit/slurmdbd/Makefile.in index dc802acfd..a40219eaa 100644 --- a/testsuite/slurm_unit/slurmdbd/Makefile.in +++ b/testsuite/slurm_unit/slurmdbd/Makefile.in @@ -94,6 +94,7 @@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ BG_INCLUDES = @BG_INCLUDES@ BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ BLCR_HOME = @BLCR_HOME@ -- GitLab