From 82c003875caedcd7026ef6914369b932abe559b9 Mon Sep 17 00:00:00 2001 From: Mehdi Dogguy <mehdi@debian.org> Date: Mon, 8 Sep 2014 21:31:12 +0200 Subject: [PATCH] Imported Upstream version 1.2.27 --- META | 4 +- NEWS | 29 ++++++++++- contribs/torque/Makefile.am | 6 ++- contribs/torque/Makefile.in | 5 +- contribs/torque/qstat.pl | 36 ++++++------- doc/html/configurator.html.in | 1 + doc/man/man1/srun.1 | 11 ++-- doc/man/man5/slurm.conf.5 | 6 +++ slurm.spec | 6 +-- slurm/slurm.h.in | 1 + src/api/Makefile.am | 2 +- src/api/Makefile.in | 4 +- src/common/env.c | 3 +- src/common/read_config.c | 6 +++ src/common/read_config.h | 1 + src/common/xstring.c | 32 +++++++++--- src/plugins/jobacct/common/common_slurmctld.c | 8 +++ src/plugins/jobacct/gold/jobacct_gold.c | 2 +- src/plugins/mpi/mvapich/mvapich.c | 2 +- src/plugins/sched/wiki/get_jobs.c | 14 ++--- src/plugins/sched/wiki2/get_jobs.c | 14 ++--- src/plugins/select/linear/select_linear.c | 7 +-- src/sbatch/opt.c | 9 +++- src/sinfo/sinfo.c | 4 +- src/slurmctld/job_mgr.c | 51 ++++++++++++------- src/slurmctld/job_scheduler.c | 2 - src/slurmctld/node_mgr.c | 4 +- src/slurmctld/proc_req.c | 22 ++++++-- src/slurmctld/step_mgr.c | 14 ++--- src/slurmd/slurmd/slurmd.c | 21 ++------ src/slurmd/slurmd/slurmd.h | 3 +- src/smap/smap.c | 5 +- src/srun/opt.c | 11 ++-- testsuite/expect/test1.23 | 2 +- testsuite/expect/test12.2.prog.c | 6 ++- testsuite/expect/test7.2 | 4 +- testsuite/expect/test7.3 | 4 +- 37 files changed, 236 insertions(+), 126 deletions(-) diff --git a/META b/META index 32ed21c29..50b7e7dbe 100644 --- a/META +++ b/META @@ -3,9 +3,9 @@ Api_revision: 0 Major: 1 Meta: 1 - Micro: 25 + Micro: 27 Minor: 2 Name: slurm Release: 1 Release_tags: - Version: 1.2.25 + Version: 1.2.27 diff --git a/NEWS b/NEWS index e50a73535..3dc5b0fd1 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,33 @@ 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 1.2.27 +========================= + -- Record job eligible time in accounting database (for jobacct/gold only). + -- Prevent user root from executing a job step within a job allocation + belonging to another user. + -- Fixed limiting issue for strings larger than 4096 in xstrfmtcat + -- Fix bug in how Slurm reports job state to Maui/Moab when a job is requeued + due to a node failure, but we can't terminate the job's spawned processes. + Job was being reported as PENDING when it was really still COMPLETING. + -- Added patch from Jerry Smith for qstat -a output + -- Fixed looking at the correct perl path for Slurm.pm in torque wrappers. + -- Enhance job requeue on node failure to be more robust. + -- Added configuration parameter "DisableRootJobs". See "man slurm.conf" + for details. + +* Changes in SLURM 1.2.26 +========================= + -- Correct number of sockets/cores/threads reported by slurmd (from + Par Andersson, National Supercomputer Centre, Sweden). + -- Update libpmi linking so that libslurm is not required for PMI use + (from Steven McDougal, SiCortex). + -- In srun and sbatch, do not check the PATH env var if an absolute pathname + of the program is specified (previously reported an error if no PATH). + -- Correct output of "sinfo -o %C" (CPU counts by node state). + -- Treat attempt to submit a batch job against an existing resource allocation + as an error if sched/wiki2 is configured (Moab). + * Changes in SLURM 1.2.25 ========================= -- Bug fix for setting exit code in accounting for batch script. @@ -2851,4 +2878,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 13623 2008-03-17 16:46:23Z jette $ +$Id: NEWS 13871 2008-04-15 15:47:33Z jette $ diff --git a/contribs/torque/Makefile.am b/contribs/torque/Makefile.am index 16c02e0fc..320c25288 100644 --- a/contribs/torque/Makefile.am +++ b/contribs/torque/Makefile.am @@ -13,12 +13,14 @@ qstat: qsub: mpiexec: +_perldir=$(exec_prefix)`perl -e 'use Config; $$T=$$Config{installsitearch}; $$P=$$Config{installprefix}; $$P1="$$P/local"; $$T =~ s/$$P1//; $$T =~ s/$$P//; print $$T;'` + install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ - echo "sed 's%use lib .*%use lib qw(${exec_prefix}/lib ${exec_prefix}/lib/perl5);%' $(top_srcdir)/contribs/torque/$$p.pl > $(DESTDIR)$(bindir)/$$p"; \ - sed 's%use lib .*%use lib qw(@libdir@ @libdir@/perl5);%' $(top_srcdir)/contribs/torque/$$p.pl >$(DESTDIR)$(bindir)/$$p; \ + echo "sed 's%use lib .*%use lib qw(${_perldir});%' $(top_srcdir)/contribs/torque/$$p.pl > $(DESTDIR)$(bindir)/$$p"; \ + sed "s%use lib .*%use lib qw(${_perldir});%" $(top_srcdir)/contribs/torque/$$p.pl >$(DESTDIR)$(bindir)/$$p; \ chmod 755 $(DESTDIR)$(bindir)/$$p;\ done diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 9b3c84c0c..e4e159f44 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -229,6 +229,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign bin_SCRIPTS = pbsnodes qdel qhold qrls qstat qsub mpiexec +_perldir = $(exec_prefix)`perl -e 'use Config; $$T=$$Config{installsitearch}; $$P=$$Config{installprefix}; $$P1="$$P/local"; $$T =~ s/$$P1//; $$T =~ s/$$P//; print $$T;'` all: all-am .SUFFIXES: @@ -410,8 +411,8 @@ install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_SCRIPTS)'; for p in $$list; do \ - echo "sed 's%use lib .*%use lib qw(${exec_prefix}/lib ${exec_prefix}/lib/perl5);%' $(top_srcdir)/contribs/torque/$$p.pl > $(DESTDIR)$(bindir)/$$p"; \ - sed 's%use lib .*%use lib qw(@libdir@ @libdir@/perl5);%' $(top_srcdir)/contribs/torque/$$p.pl >$(DESTDIR)$(bindir)/$$p; \ + echo "sed 's%use lib .*%use lib qw(${_perldir});%' $(top_srcdir)/contribs/torque/$$p.pl > $(DESTDIR)$(bindir)/$$p"; \ + sed "s%use lib .*%use lib qw(${_perldir});%" $(top_srcdir)/contribs/torque/$$p.pl >$(DESTDIR)$(bindir)/$$p; \ chmod 755 $(DESTDIR)$(bindir)/$$p;\ done diff --git a/contribs/torque/qstat.pl b/contribs/torque/qstat.pl index 8b53967f4..20f457576 100755 --- a/contribs/torque/qstat.pl +++ b/contribs/torque/qstat.pl @@ -56,7 +56,7 @@ my ( $giga, $help, $idle, $mega, $man, $nodes, $one, $queueList, $queueStatus, $running, $serverStatus, $siteSpecific, - $userList, $hostname, $rc + $userList, $hostname, $rc, $header_printed ); GetOptions( @@ -409,24 +409,26 @@ sub print_job_select my $sessID = "--"; my $execHost; - print "\n${hostname}:\n"; - - printf("%-20s %-8s %-8s %-10s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", - "", "", "", "", "", "", "", "Req'd", "Req'd", "", "Elap"); - printf( - "%-20s %-8s %-8s %-10s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", - "Job ID", "Username", "Queue", "Jobname", "SessID", "NDS", - "TSK", "Memory", "Time", "S", "Time" - ); - printf( - "%-20s %-8s %-8s %-10s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", - '-' x 20, '-' x 8, '-' x 8, '-' x 10, '-' x 6, '-' x 5, - '-' x 3, '-' x 6, '-' x 5, '-', '-' x 5 - ); - + if (!defined $header_printed) { + print "\n${hostname}:\n"; + + printf("%-20s %-8s %-8s %-20s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", + "", "", "", "", "", "", "", "Req'd", "Req'd", "", "Elap"); + printf( + "%-20s %-8s %-8s %-20s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", + "Job ID", "Username", "Queue", "Jobname", "SessID", "NDS", + "TSK", "Memory", "Time", "S", "Time" + ); + printf( + "%-20s %-8s %-8s %-20s %-6s %-5s %-3s %-6s %-5s %-1s %-5s\n", + '-' x 20, '-' x 8, '-' x 8, '-' x 20, '-' x 6, '-' x 5, + '-' x 3, '-' x 6, '-' x 5, '-', '-' x 5 + ); + $header_printed = 1; + } $execHost = get_exec_host($job) if $nodes; - printf("%-20.20s %-8.8s %-8.8s %-10.10s " . + printf("%-20.20s %-8.8s %-8.8s %-20.20s " . "%-6.6s %5.5s %3.3s %6.6s %-5.5s %-1s %-5.5s", $job->{'job_id'}, $job->{'user_name'}, diff --git a/doc/html/configurator.html.in b/doc/html/configurator.html.in index b7d09d968..9e04a16f4 100644 --- a/doc/html/configurator.html.in +++ b/doc/html/configurator.html.in @@ -116,6 +116,7 @@ function displayfile() get_field("BackupController",document.config.backup_controller) + "<br>" + get_field("BackupAddr",document.config.backup_addr) + "<br>" + "# <br>" + + "#DisableRootJobs=0 <br>" + "#JobFileAppend=0 <br>" + "SlurmUser=" + document.config.slurm_user.value + "<br>" + "SlurmctldPort=" + document.config.slurmctld_port.value + "<br>" + diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 117209122..2f2249ac7 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1,4 +1,4 @@ -.\" $Id: srun.1 13559 2008-03-11 22:41:30Z jette $ +.\" $Id: srun.1 13766 2008-04-02 17:19:34Z jette $ .\" .TH SRUN "1" "July 2007" "srun 1.2" "slurm components" @@ -1448,9 +1448,12 @@ Signals sent to the \fBsrun\fR command are automatically forwarded to the tasks it is controlling with a few exceptions. The escape sequence \fB<control\-c>\fR will report the state of all tasks associated with the \fBsrun\fR command. If \fB<control\-c>\fR is entered twice within -one second, then the associated SIGINT signal will be sent to all tasks. -If a third \fB<control\-c>\fR is received, the job will be forcefully -terminated without waiting for remote tasks to exit. +one second, then the associated SIGINT signal will be sent to all tasks +and a termination sequence will be entered sending SIGCONT, SIGTERM, +and SIGKILL to all spawned tasks. +If a third \fB<control\-c>\fR is received, the srun program will be +terminated without waiting for remote tasks to exit or their I/O to +complete. The escape sequence \fB<control\-z>\fR is presently ignored. Our intent is for this put the \fBsrun\fR command into a mode where various special diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 43a950872..a49f3ada3 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -102,6 +102,12 @@ This should be a node name without the full domain name (e.g. "lx0001"). This value must be specified. See the \fBRELOCATING CONTROLLERS\fR section if you change this. + +.TP +\fBDisableRootJobs\fR +If set to 1 then user root will be prevented from running any jobs +The default value is 0, meaning user root will be able to execute jobs. + .TP \fBEpilog\fR Fully qualified pathname of a script to execute as user root on every diff --git a/slurm.spec b/slurm.spec index 9c83f1e97..bc9eaf08e 100644 --- a/slurm.spec +++ b/slurm.spec @@ -60,14 +60,14 @@ %endif Name: slurm -Version: 1.2.25 +Version: 1.2.27 Release: 1 Summary: Simple Linux Utility for Resource Management License: GPL Group: System Environment/Base -Source: slurm-1.2.25.tar.bz2 +Source: slurm-1.2.27.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release} URL: https://computing.llnl.gov/linux/slurm/ BuildRequires: openssl-devel >= 0.9.6 openssl >= 0.9.6 @@ -212,7 +212,7 @@ SLURM process tracking plugin for SGI job containers. ############################################################################# %prep -%setup -n slurm-1.2.25 +%setup -n slurm-1.2.27 %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 7f76820d6..53a6d9079 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -855,6 +855,7 @@ typedef struct slurm_ctl_conf { char *checkpoint_type; /* checkpoint plugin type */ char *control_addr; /* comm path of slurmctld primary server */ char *control_machine; /* name of slurmctld primary server */ + uint16_t disable_root_jobs; /* if set then user root can't run jobs */ char *epilog; /* pathname of job epilog */ uint32_t first_job_id; /* first slurm generated job_id to assign */ uint32_t next_job_id; /* next slurm generated job_id to assign */ diff --git a/src/api/Makefile.am b/src/api/Makefile.am index 819f5bd2c..6023cef72 100644 --- a/src/api/Makefile.am +++ b/src/api/Makefile.am @@ -105,7 +105,7 @@ libslurm_la_LDFLAGS = \ $(OTHER_FLAGS) libpmi_la_SOURCES = pmi.c -#libpmi_la_LIBADD = $(convenience_libs) +libpmi_la_LIBADD = $(top_builddir)/src/api/libslurm.la libpmi_la_LDFLAGS = $(LIB_LDFLAGS) \ $(PMI_OTHER_FLAGS) diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 2d94ff509..7b0a3474e 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -74,7 +74,7 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(libdir)" libLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) -libpmi_la_LIBADD = +libpmi_la_DEPENDENCIES = $(top_builddir)/src/api/libslurm.la am_libpmi_la_OBJECTS = pmi.lo libpmi_la_OBJECTS = $(am_libpmi_la_OBJECTS) libpmi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -372,7 +372,7 @@ libslurm_la_LDFLAGS = \ $(OTHER_FLAGS) libpmi_la_SOURCES = pmi.c -#libpmi_la_LIBADD = $(convenience_libs) +libpmi_la_LIBADD = $(top_builddir)/src/api/libslurm.la libpmi_la_LDFLAGS = $(LIB_LDFLAGS) \ $(PMI_OTHER_FLAGS) diff --git a/src/common/env.c b/src/common/env.c index 424faa277..e28cc028a 100644 --- a/src/common/env.c +++ b/src/common/env.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * src/common/env.c - add an environment variable to environment vector - * $Id: env.c 13237 2008-02-08 23:16:16Z jette $ + * $Id: env.c 13678 2008-03-20 21:02:07Z jette $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -45,6 +45,7 @@ #include <stdarg.h> #include <stdlib.h> #include <string.h> +#include <strings.h> #include <unistd.h> #include <sys/poll.h> #include <sys/types.h> diff --git a/src/common/read_config.c b/src/common/read_config.c index 79d44156d..1d9c515a4 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -126,6 +126,7 @@ s_p_options_t slurm_conf_options[] = { {"BackupController", S_P_STRING}, {"ControlAddr", S_P_STRING}, {"ControlMachine", S_P_STRING}, + {"DisableRootJobs", S_P_UINT16}, {"Epilog", S_P_STRING}, {"FastSchedule", S_P_UINT16}, {"FirstJobId", S_P_UINT32}, @@ -1060,6 +1061,7 @@ init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) xfree (ctl_conf_ptr->backup_controller); xfree (ctl_conf_ptr->control_addr); xfree (ctl_conf_ptr->control_machine); + ctl_conf_ptr->disable_root_jobs = 0; xfree (ctl_conf_ptr->epilog); ctl_conf_ptr->fast_schedule = (uint16_t) NO_VAL; ctl_conf_ptr->first_job_id = (uint32_t) NO_VAL; @@ -1398,6 +1400,10 @@ validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_string(&conf->checkpoint_type, "CheckpointType", hashtbl)) conf->checkpoint_type = xstrdup(DEFAULT_CHECKPOINT_TYPE); + if (!s_p_get_uint16(&conf->disable_root_jobs, "DisableRootJobs", + hashtbl)) + conf->disable_root_jobs = DEFAULT_DISABLE_ROOT_JOBS; + s_p_get_string(&conf->epilog, "Epilog", hashtbl); if (!s_p_get_uint16(&conf->fast_schedule, "FastSchedule", hashtbl)) diff --git a/src/common/read_config.h b/src/common/read_config.h index 70215d199..fa2156dd1 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -50,6 +50,7 @@ extern char *default_plugstack; #define DEFAULT_AUTH_TYPE "auth/none" #define DEFAULT_CACHE_GROUPS 0 +#define DEFAULT_DISABLE_ROOT_JOBS 0 #define DEFAULT_FAST_SCHEDULE 1 #define DEFAULT_FIRST_JOB_ID 1 #define DEFAULT_GET_ENV_TIMEOUT 2 diff --git a/src/common/xstring.c b/src/common/xstring.c index a5ee4925d..765ed7928 100644 --- a/src/common/xstring.c +++ b/src/common/xstring.c @@ -196,17 +196,35 @@ void _xstrftimecat(char **buf, const char *fmt) */ int _xstrfmtcat(char **str, const char *fmt, ...) { + /* Start out with a size of 100 bytes. */ + int n, size = 100; + char *p = NULL; va_list ap; - int rc; - char buf[4096]; + + if((p = xmalloc(size)) == NULL) + return 0; + while(1) { + /* Try to print in the allocated space. */ + va_start(ap, fmt); + n = vsnprintf(p, size, fmt, ap); + va_end (ap); + /* If that worked, return the string. */ + if (n > -1 && n < size) + break; + /* Else try again with more space. */ + if (n > -1) /* glibc 2.1 */ + size = n + 1; /* precisely what is needed */ + else /* glibc 2.0 */ + size *= 2; /* twice the old size */ + if ((p = xrealloc(p, size)) == NULL) + return 0; + } - va_start(ap, fmt); - rc = vsnprintf(buf, 4096, fmt, ap); - va_end(ap); + xstrcat(*str, p); - xstrcat(*str, buf); + xfree(p); - return rc; + return n; } /* diff --git a/src/plugins/jobacct/common/common_slurmctld.c b/src/plugins/jobacct/common/common_slurmctld.c index 26da06484..24dec3a79 100644 --- a/src/plugins/jobacct/common/common_slurmctld.c +++ b/src/plugins/jobacct/common/common_slurmctld.c @@ -194,6 +194,14 @@ extern int common_job_start_slurmctld(struct job_record *job_ptr) } debug2("jobacct_job_start() called"); + + if (job_ptr->start_time == 0) { + /* This function is called when a job becomes elligible to run + * in order to record reserved time (a measure of system + * over-subscription). We only use this in the Gold plugin. */ + return SLURM_SUCCESS; + } + for (i=0; i < job_ptr->num_cpu_groups; i++) ncpus += (job_ptr->cpus_per_node[i]) * (job_ptr->cpu_count_reps[i]); diff --git a/src/plugins/jobacct/gold/jobacct_gold.c b/src/plugins/jobacct/gold/jobacct_gold.c index 2b58e0373..bfea65a6e 100644 --- a/src/plugins/jobacct/gold/jobacct_gold.c +++ b/src/plugins/jobacct/gold/jobacct_gold.c @@ -791,7 +791,7 @@ static int _add_edit_job(gold_job_info_msg_t *job_ptr, gold_object_t action) gold_request_add_assignment(gold_request, "NodeList", nodes); - if (job_ptr->job_state != JOB_RUNNING) { + if (job_ptr->job_state >= JOB_COMPLETE) { snprintf(tmp_buff, sizeof(tmp_buff), "%u", (uint32_t)job_ptr->end_time); gold_request_add_assignment(gold_request, "EndTime", diff --git a/src/plugins/mpi/mvapich/mvapich.c b/src/plugins/mpi/mvapich/mvapich.c index b2e5b8684..2a2b5541a 100644 --- a/src/plugins/mpi/mvapich/mvapich.c +++ b/src/plugins/mpi/mvapich/mvapich.c @@ -604,7 +604,7 @@ static int mvapich_alltoallbcast (mvapich_state_t *st, void* buf, int size) { int pbufsize = size * st->nprocs; void* pbuf = xmalloc(pbufsize); - int i, src, rc; + int i, src, rc = 0; int n = 0; for (i = 0; i < st->nprocs; i++) { diff --git a/src/plugins/sched/wiki/get_jobs.c b/src/plugins/sched/wiki/get_jobs.c index 7da06dc9d..687bd65cd 100644 --- a/src/plugins/sched/wiki/get_jobs.c +++ b/src/plugins/sched/wiki/get_jobs.c @@ -403,13 +403,6 @@ static char * _get_job_state(struct job_record *job_ptr) uint16_t state = job_ptr->job_state; uint16_t base_state = state & (~JOB_COMPLETING); - if (base_state == JOB_PENDING) - return "Idle"; - if (base_state == JOB_RUNNING) - return "Running"; - if (base_state == JOB_SUSPENDED) - return "Suspended"; - if (state & JOB_COMPLETING) { /* Give configured KillWait+10 for job * to clear out, then then consider job @@ -421,6 +414,13 @@ static char * _get_job_state(struct job_record *job_ptr) return "Running"; } + if (base_state == JOB_PENDING) + return "Idle"; + if (base_state == JOB_RUNNING) + return "Running"; + if (base_state == JOB_SUSPENDED) + return "Suspended"; + if (base_state == JOB_COMPLETE) return "Completed"; else /* JOB_CANCELLED, JOB_FAILED, JOB_TIMEOUT, JOB_NODE_FAIL */ diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c index 824bbdac5..59b3720bd 100644 --- a/src/plugins/sched/wiki2/get_jobs.c +++ b/src/plugins/sched/wiki2/get_jobs.c @@ -493,13 +493,6 @@ static char * _get_job_state(struct job_record *job_ptr) char *state_str; static char return_msg[128]; - if (base_state == JOB_PENDING) - return "Idle"; - if (base_state == JOB_RUNNING) - return "Running"; - if (base_state == JOB_SUSPENDED) - return "Suspended"; - if (state & JOB_COMPLETING) { /* Give configured KillWait+10 for job * to clear out, then then consider job @@ -511,6 +504,13 @@ static char * _get_job_state(struct job_record *job_ptr) return "Running"; } + if (base_state == JOB_PENDING) + return "Idle"; + if (base_state == JOB_RUNNING) + return "Running"; + if (base_state == JOB_SUSPENDED) + return "Suspended"; + if ((base_state == JOB_COMPLETE) || (base_state == JOB_FAILED)) state_str = "Completed"; else /* JOB_CANCELLED, JOB_TIMEOUT, JOB_NODE_FAIL */ diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index c97907a1d..ec46310a6 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -3,7 +3,7 @@ * address space. Selects nodes for a job so as to minimize the number * of sets of consecutive nodes using a best-fit algorithm. * - * $Id: select_linear.c 12419 2007-09-27 16:33:13Z jette $ + * $Id: select_linear.c 13767 2008-04-02 17:29:59Z jette $ ***************************************************************************** * Copyright (C) 2004-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -723,8 +723,9 @@ extern int select_p_get_extra_jobinfo (struct node_record *node_ptr, { uint16_t *tmp_16 = (uint16_t *) data; - if ((job_ptr->details->cpus_per_task > 1) - || (job_ptr->details->mc_ptr)) { + if (job_ptr->details && + ((job_ptr->details->cpus_per_task > 1) || + (job_ptr->details->mc_ptr))) { int index = (node_ptr - node_record_table_ptr); *tmp_16 = _get_avail_cpus(job_ptr, index); } else { diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index 314cc2d2d..f3cb69393 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -1926,7 +1926,7 @@ _create_path_list(void) static char * _search_path(char *cmd, bool check_current_dir, int access_mode) { - List l = _create_path_list(); + List l = NULL; ListIterator i = NULL; char *path, *fullpath = NULL; @@ -1938,6 +1938,10 @@ _search_path(char *cmd, bool check_current_dir, int access_mode) goto done; } + l = _create_path_list(); + if (l == NULL) + return NULL; + if (check_current_dir) list_prepend(l, xstrdup(opt.cwd)); @@ -1952,7 +1956,8 @@ _search_path(char *cmd, bool check_current_dir, int access_mode) fullpath = NULL; } done: - list_destroy(l); + if (l) + list_destroy(l); return fullpath; } diff --git a/src/sinfo/sinfo.c b/src/sinfo/sinfo.c index 1e7f96379..02df66be0 100644 --- a/src/sinfo/sinfo.c +++ b/src/sinfo/sinfo.c @@ -1,7 +1,7 @@ /*****************************************************************************\ * sinfo.c - Report overall state the system * - * $Id: sinfo.c 10744 2007-01-11 20:09:18Z da $ + * $Id: sinfo.c 13835 2008-04-09 18:57:18Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -724,7 +724,7 @@ static void _update_sinfo(sinfo_data_t *sinfo_ptr, node_info_t *node_ptr) sinfo_ptr->cpus_alloc += node_ptr->used_cpus; sinfo_ptr->cpus_total += node_ptr->cpus; - if ((sinfo_ptr->node_state & NODE_STATE_DRAIN) || + if ((node_ptr->node_state & NODE_STATE_DRAIN) || (base_state == NODE_STATE_DOWN)) { sinfo_ptr->cpus_other += node_ptr->cpus - node_ptr->used_cpus; diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 165c9276d..64a03b2f0 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3,7 +3,7 @@ * Note: there is a global job list (job_list), time stamp * (last_job_update), and hash table (job_hash) * - * $Id: job_mgr.c 13533 2008-03-10 16:11:30Z jette $ + * $Id: job_mgr.c 13871 2008-04-15 15:47:33Z jette $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -1063,13 +1063,11 @@ extern int kill_running_job_by_node_name(char *node_name, bool step_test) _excise_node_from_job(job_ptr, node_ptr); } else if (job_ptr->batch_flag && job_ptr->details && (job_ptr->details->no_requeue == 0)) { - uint16_t save_state; srun_node_fail(job_ptr->job_id, node_name); info("requeue job %u due to failure of node %s", job_ptr->job_id, node_name); _set_job_prio(job_ptr); job_ptr->time_last_active = now; - job_ptr->job_state = JOB_PENDING | JOB_COMPLETING; if (suspended) job_ptr->end_time = job_ptr->suspend_time; else @@ -1078,11 +1076,12 @@ extern int kill_running_job_by_node_name(char *node_name, bool step_test) /* We want this job to look like it was cancelled in the * accounting logs. Set a new submit time so the restarted * job looks like a new job. */ - save_state = job_ptr->job_state; job_ptr->job_state = JOB_CANCELLED; deallocate_nodes(job_ptr, false, suspended); job_completion_logger(job_ptr); - job_ptr->job_state = save_state; + job_ptr->job_state = JOB_PENDING; + if (job_ptr->node_cnt) + job_ptr->job_state |= JOB_COMPLETING; job_ptr->details->submit_time = now; } else { info("Killing job_id %u on failed node %s", @@ -1679,12 +1678,12 @@ extern int job_complete(uint32_t job_id, uid_t uid, bool requeue, job_ptr->batch_flag++; /* only one retry */ job_ptr->job_state = JOB_PENDING | job_comp_flag; info("Non-responding node, requeue JobId=%u", job_ptr->job_id); - } else if (job_ptr->job_state == JOB_PENDING) { - job_ptr->job_state = JOB_CANCELLED; - job_ptr->start_time = now; - job_ptr->end_time = now; - job_ptr->requid = uid; - job_completion_logger(job_ptr); + } else if ((job_ptr->job_state == JOB_PENDING) && job_ptr->details && + job_ptr->batch_flag) { + /* Possible failure mode with DOWN node and job requeue. + * The DOWN node might actually respond to the cancel and + * take us here. */ + return SLURM_SUCCESS; } else { if (job_return_code == NO_VAL) { job_ptr->job_state = JOB_CANCELLED | job_comp_flag; @@ -2521,7 +2520,8 @@ _copy_job_desc_to_job_record(job_desc_msg_t * job_desc, detail_ptr->work_dir = xstrdup(job_desc->work_dir); if (job_desc->overcommit != (uint16_t) NO_VAL) detail_ptr->overcommit = job_desc->overcommit; - detail_ptr->begin_time = job_desc->begin_time; + if (job_desc->begin_time > time(NULL)) + detail_ptr->begin_time = job_desc->begin_time; job_ptr->select_jobinfo = select_g_copy_jobinfo(job_desc->select_jobinfo); detail_ptr->mc_ptr = _set_multi_core_data(job_desc); @@ -2646,6 +2646,11 @@ static int _validate_job_desc(job_desc_msg_t * job_desc_msg, int allocate, wiki_sched_test = true; } + if ((job_desc_msg->user_id == 0) && slurmctld_conf.disable_root_jobs) { + error("Security violation, SUBMIT_JOB for user root disabled"); + return ESLURM_USER_ID_MISSING; + } + if ((job_desc_msg->num_procs == NO_VAL) && (job_desc_msg->min_nodes == NO_VAL) && (job_desc_msg->req_nodes == NULL)) { @@ -4434,6 +4439,7 @@ extern bool job_independent(struct job_record *job_ptr) struct job_record *dep_ptr; struct job_details *detail_ptr = job_ptr->details; time_t now = time(NULL); + bool send_acct_rec = false; if (detail_ptr && (detail_ptr->begin_time > now)) { job_ptr->state_reason = WAIT_TIME; @@ -4455,8 +4461,20 @@ extern bool job_independent(struct job_record *job_ptr) return false; /* job exists and incomplete */ indi: /* job is independent, set begin time as needed */ - if (detail_ptr && (detail_ptr->begin_time == 0)) + if (detail_ptr && (detail_ptr->begin_time == 0)) { detail_ptr->begin_time = now; + send_acct_rec = true; + } else if (job_ptr->state_reason == WAIT_TIME) { + job_ptr->state_reason = WAIT_NO_REASON; + send_acct_rec = true; + } + if (send_acct_rec) { + /* We want to record when a job becomes eligible in + * order to calculate reserved time (a measure of + * system over-subscription), job really is not + * starting now */ + jobacct_g_job_start_slurmctld(job_ptr); + } return true; } /* @@ -4781,7 +4799,6 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) slurm_msg_t resp_msg; return_code_msg_t rc_msg; time_t now = time(NULL); - uint16_t save_state; /* find the job */ job_ptr = find_job_record (job_id); @@ -4834,7 +4851,6 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) if (job_ptr->job_state == JOB_SUSPENDED) suspended = true; job_ptr->time_last_active = now; - job_ptr->job_state = JOB_PENDING | JOB_COMPLETING; if (suspended) job_ptr->end_time = job_ptr->suspend_time; else @@ -4843,12 +4859,13 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd conn_fd) /* We want this job to look like it was cancelled in the * accounting logs. Set a new submit time so the restarted * job looks like a new job. */ - save_state = job_ptr->job_state; job_ptr->job_state = JOB_CANCELLED; deallocate_nodes(job_ptr, false, suspended); xfree(job_ptr->details->req_node_layout); job_completion_logger(job_ptr); - job_ptr->job_state = save_state; + job_ptr->job_state = JOB_PENDING; + if (job_ptr->node_cnt) + job_ptr->job_state |= JOB_COMPLETING; job_ptr->details->submit_time = now; reply: diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index bd17952d4..c093a9c37 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -150,7 +150,6 @@ extern void set_job_elig_time(void) ListIterator job_iterator; slurmctld_lock_t job_write_lock = { READ_LOCK, WRITE_LOCK, WRITE_LOCK, READ_LOCK }; - time_t now = time(NULL); lock_slurmctld(job_write_lock); job_iterator = list_iterator_create(job_list); @@ -173,7 +172,6 @@ extern void set_job_elig_time(void) continue; if (!job_independent(job_ptr)) continue; - job_ptr->details->begin_time = now; } list_iterator_destroy(job_iterator); unlock_slurmctld(job_write_lock); diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 403095cab..44e9992d5 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -4,7 +4,7 @@ * hash table (node_hash_table), time stamp (last_node_update) and * configuration list (config_list) * - * $Id: node_mgr.c 13552 2008-03-11 17:34:27Z jette $ + * $Id: node_mgr.c 13869 2008-04-15 00:51:16Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -1962,6 +1962,7 @@ void set_node_down (char *name, char *reason) return; } + _make_node_down(node_ptr, now); (void) kill_running_job_by_node_name(name, false); if ((node_ptr->reason == NULL) || (strncmp(node_ptr->reason, "Not responding", 14) == 0)) { @@ -1976,7 +1977,6 @@ void set_node_down (char *name, char *reason) node_ptr->reason = xstrdup(reason); xstrcat(node_ptr->reason, time_buf); } - _make_node_down(node_ptr, now); return; } diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index c1e6c4cbc..924a118bd 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1,7 +1,7 @@ /*****************************************************************************\ * proc_req.c - process incomming messages to slurmctld * - * $Id: proc_req.c 13341 2008-02-25 17:20:07Z jette $ + * $Id: proc_req.c 13871 2008-04-15 15:47:33Z jette $ ***************************************************************************** * Copyright (C) 2002-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -310,6 +310,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->checkpoint_type = xstrdup(conf->checkpoint_type); conf_ptr->control_addr = xstrdup(conf->control_addr); conf_ptr->control_machine = xstrdup(conf->control_machine); + conf_ptr->disable_root_jobs = conf->disable_root_jobs; conf_ptr->epilog = xstrdup(conf->epilog); conf_ptr->fast_schedule = conf->fast_schedule; conf_ptr->first_job_id = conf->first_job_id; @@ -1003,9 +1004,10 @@ static void _slurm_rpc_job_step_create(slurm_msg_t * msg) dump_step_desc(req_step_msg); uid = g_slurm_auth_get_uid(msg->auth_cred); - if ( (uid != req_step_msg->user_id) && (!_is_super_user(uid)) ) { - error("Security violation, JOB_STEP_CREATE RPC from uid=%u", - (unsigned int) uid); + if (uid != req_step_msg->user_id) { + error("Security violation, JOB_STEP_CREATE RPC from uid=%u " + "to run as uid %u", + (unsigned int) uid, req_step_msg->user_id); slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); return; } @@ -1701,6 +1703,7 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) dump_job_desc(job_desc_msg); uid = g_slurm_auth_get_uid(msg->auth_cred); if ( (uid != job_desc_msg->user_id) && (!_is_super_user(uid)) ) { + /* NOTE: User root can submit a batch job for any other user */ error_code = ESLURM_USER_ID_MISSING; error("Security violation, SUBMIT_JOB from uid=%u", (unsigned int) uid); @@ -1726,6 +1729,17 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) return; } #endif + + if (job_ptr->user_id != uid) { + error("Security violation, uid=%u attempting " + "to execute a step within job %u owned " + "by user %u", + (unsigned int) uid, job_ptr->job_id, + job_ptr->user_id); + slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); + unlock_slurmctld(job_write_lock); + return; + } error_code = _launch_batch_step(job_desc_msg, uid, &step_id); unlock_slurmctld(job_write_lock); diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 104f6d9f7..5b39ef9b8 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * step_mgr.c - manage the job step information of slurm - * $Id: step_mgr.c 13414 2008-02-28 23:22:33Z da $ + * $Id: step_mgr.c 13857 2008-04-11 19:14:36Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -712,18 +712,18 @@ step_create(job_step_create_request_msg_t *step_specs, return ESLURM_DUPLICATE_JOB_ID; } + /* NOTE: We have already confirmed the UID originating + * the request is identical with step_specs->user_id */ + if (step_specs->user_id != job_ptr->user_id) + return ESLURM_ACCESS_DENIED ; + if (batch_step) { info("user %u attempting to run batch script within " "an existing job", step_specs->user_id); /* This seems hazardous to allow, but LSF seems to - * work this way, so don't treat it as an error. - * return ESLURM_ACCESS_DENIED ; */ + * work this way, so don't treat it as an error. */ } - if ((step_specs->user_id != job_ptr->user_id) && - (step_specs->user_id != 0)) - return ESLURM_ACCESS_DENIED ; - if (IS_JOB_FINISHED(job_ptr) || (job_ptr->end_time <= time(NULL))) return ESLURM_ALREADY_DONE; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 785f5f6aa..d523cd2f1 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * src/slurmd/slurmd/slurmd.c - main slurm node server daemon - * $Id: slurmd.c 11829 2007-07-12 16:14:24Z jette $ + * $Id: slurmd.c 13688 2008-03-21 17:27:38Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -559,8 +559,6 @@ _read_config() conf->cr_type = cf->select_type_param; - conf->fast_schedule = cf->fast_schedule; - path_pubkey = xstrdup(cf->job_credential_public_certificate); if (!conf->logfile) @@ -597,17 +595,10 @@ _read_config() &conf->block_map_size, &conf->block_map, &conf->block_map_inv); - if (conf->fast_schedule) { - conf->cpus = conf->conf_cpus; - conf->sockets = conf->conf_sockets; - conf->cores = conf->conf_cores; - conf->threads = conf->conf_threads; - } else { - conf->cpus = conf->actual_cpus; - conf->sockets = conf->actual_sockets; - conf->cores = conf->actual_cores; - conf->threads = conf->actual_threads; - } + conf->cpus = conf->actual_cpus; + conf->sockets = conf->actual_sockets; + conf->cores = conf->actual_cores; + conf->threads = conf->actual_threads; get_memory(&conf->real_memory_size); @@ -733,7 +724,6 @@ _print_conf() debug3("TaskEpilog = `%s'", conf->task_epilog); debug3("Use CPUSETS = %u", conf->use_cpusets); debug3("Use PAM = %u", conf->use_pam); - debug3("Fast Sched = %u", conf->fast_schedule); slurm_conf_unlock(); } @@ -774,7 +764,6 @@ _init_conf() conf->spooldir = xstrdup(DEFAULT_SPOOLDIR); conf->use_pam = 0; conf->use_cpusets = 0; - conf->fast_schedule = 0; slurm_mutex_init(&conf->config_mutex); return; diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h index da2c1e6cd..191bf951e 100644 --- a/src/slurmd/slurmd/slurmd.h +++ b/src/slurmd/slurmd/slurmd.h @@ -1,6 +1,6 @@ /*****************************************************************************\ * src/slurmd/slurmd/slurmd.h - header for slurmd - * $Id: slurmd.h 11797 2007-07-06 22:54:22Z jette $ + * $Id: slurmd.h 13688 2008-03-21 17:27:38Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -123,7 +123,6 @@ typedef struct slurmd_config { uint16_t use_pam; uint16_t use_cpusets; /* Use cpusets, if available */ uint16_t propagate_prio; /* PropagatePrioProcess flag */ - uint16_t fast_schedule; /* use config from file/slurmctld */ } slurmd_conf_t; extern slurmd_conf_t * conf; diff --git a/src/smap/smap.c b/src/smap/smap.c index 9b8652f48..9e704f32f 100644 --- a/src/smap/smap.c +++ b/src/smap/smap.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * smap.c - Report overall state the system - * $Id: smap.c 12858 2007-12-19 20:15:32Z da $ + * $Id: smap.c 13794 2008-04-04 15:56:01Z da $ ***************************************************************************** * Copyright (C) 2004 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -249,7 +249,8 @@ part_fini: #else default: error("Must be on a BG SYSTEM to run this command"); - endwin(); + if(!params.commandline) + endwin(); ba_fini(); exit(0); break; diff --git a/src/srun/opt.c b/src/srun/opt.c index d766ce74c..06afe966a 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1,6 +1,6 @@ /*****************************************************************************\ * opt.c - options processing for srun - * $Id: opt.c 13623 2008-03-17 16:46:23Z jette $ + * $Id: opt.c 13727 2008-03-27 23:49:35Z jette $ ***************************************************************************** * Copyright (C) 2002-2006 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -2585,7 +2585,7 @@ _create_path_list(void) static char * _search_path(char *cmd, bool check_current_dir, int access_mode) { - List l = _create_path_list(); + List l = NULL; ListIterator i = NULL; char *path, *fullpath = NULL; @@ -2597,6 +2597,10 @@ _search_path(char *cmd, bool check_current_dir, int access_mode) goto done; } + l = _create_path_list(); + if (l == NULL) + return NULL; + if (check_current_dir) list_prepend(l, xstrdup(opt.cwd)); @@ -2611,7 +2615,8 @@ _search_path(char *cmd, bool check_current_dir, int access_mode) fullpath = NULL; } done: - list_destroy(l); + if (l) + list_destroy(l); return fullpath; } diff --git a/testsuite/expect/test1.23 b/testsuite/expect/test1.23 index 20247f452..d4de7f1c9 100755 --- a/testsuite/expect/test1.23 +++ b/testsuite/expect/test1.23 @@ -203,7 +203,7 @@ if {$err_msg != 1} { # set host_0 "" set timeout $max_job_delay -set srun_pid [spawn $srun -N1 -l --tmp=1 -t1 $bin_hostname] +set srun_pid [spawn $srun -N1 -l --tmp=0 -t1 $bin_hostname] expect { -re "0: ($alpha_numeric)" { set host_0 $expect_out(1,string) diff --git a/testsuite/expect/test12.2.prog.c b/testsuite/expect/test12.2.prog.c index e1fff2abc..1f1550422 100644 --- a/testsuite/expect/test12.2.prog.c +++ b/testsuite/expect/test12.2.prog.c @@ -31,7 +31,7 @@ main (int argc, char **argv) { - int exit_code, sleep_time, mem_kb; + int exit_code, i, sleep_time, mem_kb; char *mem; if (argc != 4) { @@ -46,6 +46,10 @@ main (int argc, char **argv) mem_kb = atoi(argv[3]); mem = malloc(mem_kb * 1024); + /* We need to actually use the memory for + * AIX to the allocation */ + for (i=0; i<(mem_kb * 1024); i++) + mem[i] = i%64; sleep(sleep_time); exit(exit_code); } diff --git a/testsuite/expect/test7.2 b/testsuite/expect/test7.2 index fd0942b40..0002e1e7b 100755 --- a/testsuite/expect/test7.2 +++ b/testsuite/expect/test7.2 @@ -43,9 +43,9 @@ print_header $test_id # exec $bin_rm -f $file_prog_get if {![test_aix]} { - exec $bin_cc ${file_prog_get}.c -g -pthread -o $file_prog_get -I${slurm_dir}/include -L${slurm_dir}/lib64 -Wl,--rpath=${slurm_dir}/lib64 -L${slurm_dir}/lib -Wl,--rpath=${slurm_dir}/lib -lpmi -lslurm + exec $bin_cc ${file_prog_get}.c -g -pthread -o $file_prog_get -I${slurm_dir}/include -L${slurm_dir}/lib64 -Wl,--rpath=${slurm_dir}/lib64 -L${slurm_dir}/lib -Wl,--rpath=${slurm_dir}/lib -lpmi } else { - exec $bin_cc ${file_prog_get}.c -Wl,-brtl -g -pthread -o $file_prog_get -I${slurm_dir}/include -L${slurm_dir}/lib -lpmi -lslurm + exec $bin_cc ${file_prog_get}.c -Wl,-brtl -g -pthread -o $file_prog_get -I${slurm_dir}/include -L${slurm_dir}/lib -lpmi } exec $bin_chmod 700 $file_prog_get diff --git a/testsuite/expect/test7.3 b/testsuite/expect/test7.3 index 35ebb85b7..340e33280 100755 --- a/testsuite/expect/test7.3 +++ b/testsuite/expect/test7.3 @@ -57,8 +57,8 @@ send_user "slurm_dir is $slurm_dir\n" if {![test_aix]} { exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${slurm_dir}/include -Wl,--rpath=${slurm_dir}/lib -L${slurm_dir}/lib -lslurm } else { - send_user "$bin_cc ${test_prog}.c -Wl,-brtl -g -pthread -o ${test_prog} -I${slurm_dir}/include -L${slurm_dir}/lib -lslurm\n" - exec $bin_cc ${test_prog}.c -Wl,-brtl -g -pthread -o ${test_prog} -I${slurm_dir}/include -L${slurm_dir}/lib -lslurm + send_user "$bin_cc ${test_prog}.c -Wl,-brtl -g -pthread -o ${test_prog} -I${slurm_dir}/include -L${slurm_dir}/lib -lslurm -lntbl\n" + exec $bin_cc ${test_prog}.c -Wl,-brtl -g -pthread -o ${test_prog} -I${slurm_dir}/include -L${slurm_dir}/lib -lslurm -lntbl } exec $bin_chmod 700 $test_prog -- GitLab