From bb753c3b76d3306377c7f6245c2da2c573901e16 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 21 Dec 2011 15:52:08 -0800 Subject: [PATCH 001/614] Add switch/nrt framework, APIs need modification --- configure.ac | 3 +- doc/html/configurator.html.in | 1 + doc/html/switchplugins.shtml | 5 +- doc/man/man5/slurm.conf.5 | 6 +- src/plugins/switch/Makefile.am | 2 +- src/plugins/switch/nrt/Makefile.am | 23 + src/plugins/switch/nrt/Makefile.in | 658 +++++++ src/plugins/switch/nrt/nrt.c | 2629 +++++++++++++++++++++++++++ src/plugins/switch/nrt/nrt.h | 113 ++ src/plugins/switch/nrt/nrt_keys.h | 61 + src/plugins/switch/nrt/switch_nrt.c | 674 +++++++ 11 files changed, 4169 insertions(+), 6 deletions(-) create mode 100644 src/plugins/switch/nrt/Makefile.am create mode 100644 src/plugins/switch/nrt/Makefile.in create mode 100644 src/plugins/switch/nrt/nrt.c create mode 100644 src/plugins/switch/nrt/nrt.h create mode 100644 src/plugins/switch/nrt/nrt_keys.h create mode 100644 src/plugins/switch/nrt/switch_nrt.c diff --git a/configure.ac b/configure.ac index f6b49817f0..04b6544f6a 100644 --- a/configure.ac +++ b/configure.ac @@ -515,8 +515,9 @@ AC_CONFIG_FILES([Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile - src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile + src/plugins/switch/none/Makefile + src/plugins/switch/nrt/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile diff --git a/doc/html/configurator.html.in b/doc/html/configurator.html.in index 0d38e63ccb..fc78e04ccb 100644 --- a/doc/html/configurator.html.in +++ b/doc/html/configurator.html.in @@ -543,6 +543,7 @@ Select one value for SwitchType:
Federation Switch
None: No special handling required (InfiniBand, Myrinet, Ethernet, etc.)
+ NRT: IBM Network Resource Table

Default MPI Type

diff --git a/doc/html/switchplugins.shtml b/doc/html/switchplugins.shtml index 00a0a5d774..4a599ce6a3 100644 --- a/doc/html/switchplugins.shtml +++ b/doc/html/switchplugins.shtml @@ -24,7 +24,8 @@ abbreviation for the type of switch. We recommend, for example:

switch service. This is the case for Ethernet and Myrinet interconnects.
  • elanQuadrics Elan3 or Elan4 interconnect.
  • -
  • federation—IBM Federation interconnects (presently under development).
  • +
  • federation—IBM Federation interconnects.
  • +
  • nrt—IBM Network Resource Table (presently under development).
  • The plugin_name and plugin_version @@ -513,6 +514,6 @@ plugin that transmitted it. It is at the discretion of the plugin author whether to maintain data format compatibility across different versions of the plugin.

    -

    Last modified 5 September 2008

    +

    Last modified 21 December 2011

    diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index f3fc350a89..a9165e8326 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1909,6 +1909,8 @@ Acceptable values include "switch/none" for switches not requiring special processing for job launch or termination (Myrinet, Ethernet, and InfiniBand), "switch/elan" for Quadrics Elan 3 or Elan 4 interconnect. +"switch/federation" for IBM's Federation switch. +"switch/nrt" for IBM's Network Resource Table API. The default value is "switch/none". All SLURM daemons, commands and running jobs must be restarted for a change in \fBSwitchType\fR to take effect. @@ -2248,7 +2250,7 @@ settings. Note that if the short form of the hostname is not used, it may prevent use of hostlist expressions (the numeric portion in brackets must be at the end of the string). Only short hostname forms are compatible with the -switch/elan and switch/federation plugins at this time. +switch/elan, switch/federation and switch/nrt plugins at this time. It may also be an arbitrary string if \fBNodeHostname\fR is specified. If the \fBNodeName\fR is "DEFAULT", the values specified with that record will apply to subsequent node specifications @@ -2270,7 +2272,7 @@ settings. Note that if the short form of the hostname is not used, it may prevent use of hostlist expressions (the numeric portion in brackets must be at the end of the string). Only short hostname forms are compatible with the -switch/elan and switch/federation plugins at this time. +switch/elan, switch/federation and switch/nrt plugins at this time. A node range expression can be used to specify a set of nodes. If an expression is used, the number of nodes identified by \fBNodeHostname\fR on a line in the configuration file must diff --git a/src/plugins/switch/Makefile.am b/src/plugins/switch/Makefile.am index 1d9b5c9350..f7250e991f 100644 --- a/src/plugins/switch/Makefile.am +++ b/src/plugins/switch/Makefile.am @@ -1,3 +1,3 @@ # Makefile for switch plugins -SUBDIRS = elan none federation +SUBDIRS = elan none nrt federation diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am new file mode 100644 index 0000000000..5201e9a8f9 --- /dev/null +++ b/src/plugins/switch/nrt/Makefile.am @@ -0,0 +1,23 @@ +# Makefile for switch/nrt plugin (NRT = IBM's Network Routing Table) + +CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +SWITCH_NRT_LA_SOURCES = \ + nrt.c nrt.h \ + nrt_keys.h \ + switch_nrt.c + +if BUILD_NRT +pkglib_LTLIBRARIES = switch_nrt.la +switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) + +else +pkglib_LTLIBRARIES = +EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +endif diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in new file mode 100644 index 0000000000..59f1256c69 --- /dev/null +++ b/src/plugins/switch/nrt/Makefile.in @@ -0,0 +1,658 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for switch/nrt plugin (NRT = IBM's Network Routing Table) + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/switch/nrt +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_elan.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_federation.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +switch_nrt_la_LIBADD = +am__switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h switch_nrt.c +am__objects_1 = nrt.lo switch_nrt.lo +@BUILD_FEDERATION_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) +am__EXTRA_switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h \ + switch_nrt.c +switch_nrt_la_OBJECTS = $(am_switch_nrt_la_OBJECTS) +switch_nrt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(switch_nrt_la_LDFLAGS) $(LDFLAGS) -o $@ +@BUILD_FEDERATION_TRUE@am_switch_nrt_la_rpath = -rpath $(pkglibdir) +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(switch_nrt_la_SOURCES) $(EXTRA_switch_nrt_la_SOURCES) +DIST_SOURCES = $(am__switch_nrt_la_SOURCES_DIST) \ + $(am__EXTRA_switch_nrt_la_SOURCES_DIST) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ELAN_LIBS = @ELAN_LIBS@ +EXEEXT = @EXEEXT@ +FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LOADLEVELER_INCLUDES = @LOADLEVELER_INCLUDES@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +SWITCH_NRT_LA_SOURCES = \ + nrt.c nrt.h \ + nrt_keys.h \ + switch_nrt.c + +@BUILD_FEDERATION_FALSE@pkglib_LTLIBRARIES = +@BUILD_FEDERATION_TRUE@pkglib_LTLIBRARIES = switch_nrt.la +@BUILD_FEDERATION_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +@BUILD_FEDERATION_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) +@BUILD_FEDERATION_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/switch/nrt/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/switch/nrt/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +switch_nrt.la: $(switch_nrt_la_OBJECTS) $(switch_nrt_la_DEPENDENCIES) + $(switch_nrt_la_LINK) $(am_switch_nrt_la_rpath) $(switch_nrt_la_OBJECTS) $(switch_nrt_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch_nrt.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c new file mode 100644 index 0000000000..c2aa3f8430 --- /dev/null +++ b/src/plugins/switch/nrt/nrt.c @@ -0,0 +1,2629 @@ +/*****************************************************************************\ + * nrt.c - Library routines for initiating jobs using IBM's NRT (Network + * Routing Table) + ***************************************************************************** + * Copyright (C) 2004-2007 The Regents of the University of California. + * Copyright (C) 2008 Lawrence Livermore National Security. + * Portions Copyright (C) 2011 SchedMD LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Jason King + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#include +#include +#include + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#if HAVE_LIBNRT +# include +#else +# error "Must have libnrt to compile this module!" +#endif + +#include + +#include "slurm/slurm_errno.h" +#include "src/common/slurm_xlator.h" +#include "src/common/read_config.h" +#include "src/plugins/switch/nrt/nrt.h" +#include "src/plugins/switch/nrt/nrt_keys.h" + +/* + * Definitions local to this module + */ +#define NRT_NODEINFO_MAGIC 0xc00cc00a +#define NRT_JOBINFO_MAGIC 0xc00cc00b +#define NRT_LIBSTATE_MAGIC 0xc00cc00c + +#define NRT_ADAPTERNAME_LEN 5 +#define NRT_HOSTLEN 20 +#define NRT_VERBOSE_PRINT 0 +#define NRT_NODECOUNT 128 +#define NRT_HASHCOUNT 128 +#define NRT_AUTO_WINMEM 0 +#define NRT_MAX_WIN 15 +#define NRT_MIN_WIN 0 +#define NRT_DEBUG 0 + +#define BUFSIZE 4096 + +char* nrt_conf = NULL; +extern bool nrt_need_state_save; + +mode_t nrt_umask; + +/* + * Data structures specific to switch/nrt + * + * We are going to some trouble to keep these defs private so slurm + * hackers not interested in the interconnect details can just pass around + * the opaque types. All use of the data structure internals is local to this + * module. + */ + +typedef struct nrt_window { + uint16_t id; + uint32_t status; + uint16_t job_key; +} nrt_window_t; + +typedef struct nrt_adapter { + char name[NRT_ADAPTERNAME_LEN]; + uint16_t lid; + uint16_t network_id; + uint32_t max_winmem; + uint32_t min_winmem; + uint32_t avail_mem; + uint32_t window_count; + nrt_window_t *window_list; +} nrt_adapter_t; + +struct nrt_nodeinfo { + uint32_t magic; + char name[NRT_HOSTLEN]; + uint32_t adapter_count; + nrt_adapter_t *adapter_list; + struct nrt_nodeinfo *next; +}; + +struct nrt_libstate { + uint32_t magic; + uint32_t node_count; + uint32_t node_max; + nrt_nodeinfo_t *node_list; + uint32_t hash_max; + nrt_nodeinfo_t **hash_table; + uint16_t key_index; +}; + +struct nrt_jobinfo { + uint32_t magic; + /* version from ntbl_version() */ + /* adapter from lid in table */ + /* network_id from lid in table */ + /* uid from getuid() */ + /* pid from getpid() */ + uint16_t job_key; + char job_desc[DESCLEN]; + uint32_t window_memory; + uint8_t bulk_xfer; /* flag */ + uint16_t tables_per_task; + nrt_tableinfo_t *tableinfo; + + hostlist_t nodenames; + int num_tasks; +}; + +typedef struct { + int status_number; + char *status_msg; +} nrt_status_t; + +typedef struct { + char name[NRT_ADAPTERNAME_LEN]; + uint16_t lid; + uint16_t network_id; +} nrt_cache_entry_t; + +/* + * Globals + */ +nrt_libstate_t *nrt_state = NULL; +pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; + +/* slurmd/slurmstepd global variables */ +hostlist_t adapter_list; +static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; + + +#define NRT_STATUS_UNKNOWN 99 +static nrt_status_t nrt_status_tab[]= { + {0, "NTBL_SUCCESS"}, + {1, "NTBL_EINVAL"}, + {2, "NTBL_EPERM"}, + {3, "NTBL_EIOCTL"}, + {4, "NTBL_EADAPTER"}, + {5, "NTBL_ESYSTEM"}, + {6, "NTBL_EMEM"}, + {7, "NTBL_ELID"}, + {8, "NTBL_EIO"}, + {9, "NTBL_UNLOADED_STATE"}, + {10, "NTBL_LOADED_STATE"}, + {11, "NTBL_DISABLED_STATE"}, + {12, "NTBL_ACTIVE_STATE"}, + {13, "NTBL_BUSY_STATE"}, + {14, "NTBL_NO_RDMA_AVAIL"}, + {NRT_STATUS_UNKNOWN, "UNKNOWN_RESULT_CODE"} +}; + +static void _hash_rebuild(nrt_libstate_t *state); +static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name); +static int _parse_nrt_file(hostlist_t *adapter_list); +static void _init_adapter_cache(void); +static int _fill_in_adapter_cache(void); + +/* The _lock() and _unlock() functions are used to lock/unlock a + * global mutex. Used to serialize access to the global library + * state variable nrt_state. + */ +static void +_lock(void) +{ + int err = 1; + + while (err) { + err = pthread_mutex_lock(&global_lock); + } +} + +static void +_unlock(void) +{ + int err = 1; + + while (err) { + err = pthread_mutex_unlock(&global_lock); + } +} + +extern int +nrt_slurmctld_init(void) +{ + return SLURM_SUCCESS; +} + +extern int +nrt_slurmd_init(void) +{ + /* + * This is a work-around for the ntbl_* functions calling umask(0) + */ + nrt_umask = umask(0077); + umask(nrt_umask); + + /*_init_adapter_cache();*/ + + adapter_list = hostlist_create(NULL); + if (_parse_nrt_file(&adapter_list) != SLURM_SUCCESS) + return SLURM_FAILURE; + assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); + return SLURM_SUCCESS; +} + +extern int +nrt_slurmd_step_init(void) +{ + /* + * This is a work-around for the ntbl_* functions calling umask(0) + */ + nrt_umask = umask(0077); + umask(nrt_umask); + + _init_adapter_cache(); + + adapter_list = hostlist_create(NULL); + if (_parse_nrt_file(&adapter_list) != SLURM_SUCCESS) + return SLURM_FAILURE; + assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); + + _fill_in_adapter_cache(); + + return SLURM_SUCCESS; +} + +static char * +_lookup_nrt_status_tab(int status) +{ + char *res = NULL; + int i; + + for (i = 0; i < sizeof(nrt_status_tab) / sizeof(nrt_status_t); i++) { + if (nrt_status_tab[i].status_number == status) { + res = nrt_status_tab[i].status_msg; + break; + } + } + + if (!res) + res = nrt_status_tab[NRT_STATUS_UNKNOWN].status_msg; + + return res; +} + +/* Used by: slurmd, slurmctld */ +extern void nrt_print_jobinfo(FILE *fp, nrt_jobinfo_t *jobinfo) +{ + assert(jobinfo->magic == NRT_JOBINFO_MAGIC); + + /* stubbed out */ +} + +/* Used by: slurmd, slurmctld */ +extern char *nrt_sprint_jobinfo(nrt_jobinfo_t *j, char *buf, size_t size) +{ + int count; + char *tmp = buf; + int remaining = size; + + assert(buf); + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + + count = snprintf(tmp, remaining, + "--Begin Jobinfo--\n" + " job_key: %u\n" + " job_desc: %s\n" + " window_memory: %u\n" + " table_size: %u\n" + "--End Jobinfo--\n", + j->job_key, + j->job_desc, + j->window_memory, + j->tables_per_task); + if (count < 0) + return buf; + remaining -= count; + tmp += count; + if (remaining < 1) + return buf; + + return buf; +} + +/* The lid caching functions were created to avoid unnecessary + * function calls each time we need to load network tables on a node. + * _init_cache() simply initializes the cache to sane values and + * needs to be called before any other cache functions are called. + * + * Used by: slurmd/slurmstepd + */ +static void +_init_adapter_cache(void) +{ + int i; + + for (i = 0; i < NRT_MAXADAPTERS; i++) { + lid_cache[i].name[0] = 0; + lid_cache[i].lid = -1; + lid_cache[i].network_id = -1; + } +} + +/* Use ntbl_adapter_resources to cache information about local adapters. + * + * Used by: slurmstepd + */ +static int +_fill_in_adapter_cache(void) +{ + hostlist_iterator_t adapters; + char *adapter_name = NULL; + ADAPTER_RESOURCES res; + int num; + int rc; + int i; + + adapters = hostlist_iterator_create(adapter_list); + for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { + rc = ntbl_adapter_resources(NRT_VERSION, adapter_name, &res); + if (rc != NTBL_SUCCESS) + return SLURM_ERROR; + + num = adapter_name[3] - (int)'0'; + assert(num < NRT_MAXADAPTERS); + lid_cache[num].lid = res.lid; + lid_cache[num].network_id = res.network_id; + strncpy(lid_cache[num].name, adapter_name, NRT_ADAPTERNAME_LEN); + + free(res.window_list); + free(adapter_name); + } + hostlist_iterator_destroy(adapters); + umask(nrt_umask); + + return SLURM_SUCCESS; +} + + +/* Cache the lid and network_id of a given adapter. Ex: sni0 with lid 10 + * gets cached in array index 0 with a lid = 10 and a name = sni0. + * + * Used by: slurmd + */ +static void +_cache_lid(nrt_adapter_t *ap) +{ + assert(ap); + + int adapter_num = ap->name[3] - (int) '0'; + + lid_cache[adapter_num].lid = ap->lid; + lid_cache[adapter_num].network_id = ap->network_id; + strncpy(lid_cache[adapter_num].name, ap->name, NRT_ADAPTERNAME_LEN); +} + + +/* Check lid cache for an adapter name and return the network id. + * + * Used by: slurmd + */ +static uint16_t +_get_network_id_from_adapter(char *adapter_name) +{ + int i; + + for (i = 0; i < NRT_MAXADAPTERS; i++) { + if (!strncmp(adapter_name, lid_cache[i].name, + NRT_ADAPTERNAME_LEN)) + return lid_cache[i].network_id; + } + + return (uint16_t) -1; +} + + +/* Check lid cache for an adapter name and return the lid. + * + * Used by: slurmd + */ +static uint16_t +_get_lid_from_adapter(char *adapter_name) +{ + int i; + + for (i = 0; i < NRT_MAXADAPTERS; i++) { + if (!strncmp(adapter_name, lid_cache[i].name, + NRT_ADAPTERNAME_LEN)) + return lid_cache[i].lid; + } + + return (uint16_t) -1; +} + + +static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name) +{ + ADAPTER_RESOURCES res; + struct NTBL_STATUS *status = NULL; + struct NTBL_STATUS *old = NULL; + nrt_window_t *tmp_winlist = NULL; + int win_count = 0, i; + int error_code; + + info("adapter_name is %s", adapter_name); + + error_code = ntbl_adapter_resources(NRT_VERSION, + adapter_name, + &res); + if (error_code != NTBL_SUCCESS) + return SLURM_ERROR; + strncpy(nrt_adapter->name, + adapter_name, + NRT_ADAPTERNAME_LEN); + nrt_adapter->lid = res.lid; + nrt_adapter->network_id = res.network_id; + /* FUTURE: check that we don't lose information when converting + * from 64 to 32 bit unsigned ints in the next three assignments. + */ + nrt_adapter->max_winmem = res.max_window_memory; + nrt_adapter->min_winmem = res.min_window_memory; + nrt_adapter->avail_mem = res.avail_adapter_memory; + nrt_adapter->window_count = res.window_count; + free(res.window_list); + _cache_lid(nrt_adapter); + error_code = ntbl_status_adapter(NRT_VERSION, + adapter_name, + &win_count, + &status); + umask(nrt_umask); + if (error_code) + slurm_seterrno_ret(ESTATUS); + tmp_winlist = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * + res.window_count); + if (!tmp_winlist) + slurm_seterrno_ret(ENOMEM); + for (i = 0; i < res.window_count; i++) { + tmp_winlist[i].id = status->window_id; + tmp_winlist[i].status = status->rc; + old = status; + status = status->next; + free(old); + } + nrt_adapter->window_list = tmp_winlist; + return SLURM_SUCCESS; +} + +static char *_get_nrt_conf(void) +{ + char *val = getenv("SLURM_CONF"); + char *rc; + int i; + + if (!val) + return xstrdup(NRTERATION_CONFIG_FILE); + + /* Replace file name on end of path */ + i = strlen(val) - strlen("slurm.conf") + strlen("nrt.conf") + 1; + rc = xmalloc(i); + strcpy(rc, val); + val = strrchr(rc, (int)'/'); + if (val) /* absolute path */ + val++; + else /* not absolute path */ + val = rc; + strcpy(val, "nrt.conf"); + return rc; +} + +static int _parse_nrt_file(hostlist_t *adapter_list) +{ + s_p_options_t options[] = {{"AdapterName", S_P_STRING}, {NULL}}; + s_p_hashtbl_t *tbl; + char *adapter_name; + + debug("Reading the nrt.conf file"); + if (!nrt_conf) + nrt_conf = _get_nrt_conf(); + + tbl = s_p_hashtbl_create(options); + if (s_p_parse_file(tbl, NULL, nrt_conf, false) == SLURM_ERROR) + fatal("something wrong with opening/reading nrt.conf file"); + + if (s_p_get_string(&adapter_name, "AdapterName", tbl)) { + int rc; + rc = hostlist_push(*adapter_list, adapter_name); + if (rc == 0) + error("Adapter name format is incorrect."); + xfree(adapter_name); + } + + s_p_hashtbl_destroy(tbl); + + return SLURM_SUCCESS; +} + +/* Check for existence of sniX, where X is from 0 to NRT_MAXADAPTERS. + * For all that exist, record vital adapter info plus status for all windows + * available on that adapter. Cache lid to adapter name mapping locally. + * + * Used by: slurmd + */ +static int +_get_adapters(nrt_adapter_t *list, int *count) +{ + hostlist_iterator_t adapter_iter; + char *adapter = NULL; + int i; + + assert(list != NULL); + assert(adapter_list != NULL); + + adapter_iter = hostlist_iterator_create(adapter_list); + for (i = 0; (adapter = hostlist_next(adapter_iter)); i++) { + if (_set_up_adapter(list + i, adapter) == SLURM_ERROR) + fatal("Failed to set up adapter %s.", adapter); + free(adapter); + } + hostlist_iterator_destroy(adapter_iter); + + assert(i > 0); + *count = i; + info("Number of adapters is = %d", *count); + + if (!*count) + slurm_seterrno_ret(ENOADAPTER); + + return 0; +} + +/* Used by: slurmd, slurmctld */ +extern int +nrt_alloc_jobinfo(nrt_jobinfo_t **j) +{ + nrt_jobinfo_t *new; + + assert(j != NULL); + new = (nrt_jobinfo_t *)xmalloc(sizeof(nrt_jobinfo_t)); + if (!new) + slurm_seterrno_ret(ENOMEM); + new->magic = NRT_JOBINFO_MAGIC; + new->job_key = -1; + new->window_memory = 0; + new->tables_per_task = 0; + new->tableinfo = NULL; + *j = new; + + return 0; +} + +/* Used by: slurmd, slurmctld */ +extern int +nrt_alloc_nodeinfo(nrt_nodeinfo_t **n) +{ + nrt_nodeinfo_t *new; + + assert(n); + + new = (nrt_nodeinfo_t *)xmalloc(sizeof(nrt_nodeinfo_t)); + if (!new) + slurm_seterrno_ret(ENOMEM); + new->adapter_list = (nrt_adapter_t *)xmalloc(sizeof(nrt_adapter_t) + * NRT_MAXADAPTERS); + if (!new->adapter_list) { + xfree(new); + slurm_seterrno_ret(ENOMEM); + } + new->magic = NRT_NODEINFO_MAGIC; + new->adapter_count = 0; + new->next = NULL; + + *n = new; + + return 0; +} + +/* Assumes a pre-allocated nodeinfo structure and uses _get_adapters + * to do the dirty work. We probably collect more information about + * the adapters on a give node than we need to but it was done + * in the interest of being prepared for future requirements. + * + * Used by: slurmd + */ +extern int +nrt_build_nodeinfo(nrt_nodeinfo_t *n, char *name) +{ + int count; + int err; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); + assert(name); + + strncpy(n->name, name, NRT_HOSTLEN); + _lock(); + err = _get_adapters(n->adapter_list, &count); + _unlock(); + if (err != 0) + return err; + n->adapter_count = count; + return 0; +} +#if NRT_DEBUG +static int +_print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) +{ + int count; + + assert(r); + assert(buf); + assert(size > 0); + + count = snprintf(buf, size, + "--Begin Adapter Resources--\n" + " device_type = %x\n" + " lid = %d\n" + " network_id = %d\n" + " max_window_memory = %lld\n" + " min_window_memory = %lld\n" + " avail_adapter_memory = %lld\n" + " fifo_slot_size = %lld\n" + " window_count = %d\n" + " window_list = %d\n" +#if NRT_VERSION == 120 + " reserved = %lld\n" +#else + " rcontext_block_count = %lld\n" +#endif + "--End Adapter Resources--\n", + r->device_type, + r->lid, + r->network_id, + r->max_window_memory, + r->min_window_memory, + r->avail_adapter_memory, + r->fifo_slot_size, + r->window_count, + r->window_list[0], +#if NRT_VERSION == 120 + r->reserved); +#else + r->rcontext_block_count); +#endif + + return count; +} + +static int +_print_window_status(struct NTBL_STATUS *s, char *buf, size_t size) +{ + int count; + + assert(s); + assert(buf); + assert(size > 0); + + switch(s->rc) { + case NTBL_UNLOADED_STATE: + count = snprintf(buf, size, +#if NRT_VERBOSE_PRINT + "--Begin NTBL Status For Window %d on %s--\n" + " window_id = %u\n" + " adapter = %s\n" + " return code = %s\n" + "--End NTBL Status For Window %d on %s--\n", + s->window_id, s->adapter, + s->window_id, + s->adapter, + _lookup_nrt_status_tab(s->rc), + s->window_id, s->adapter); +#else + "window %u on %s: %s\n", + s->window_id, s->adapter, + _lookup_nrt_status_tab(s->rc)); +#endif + break; + case NTBL_LOADED_STATE: + case NTBL_DISABLED_STATE: + case NTBL_ACTIVE_STATE: + case NTBL_BUSY_STATE: + count = snprintf(buf, size, +#if NRT_VERBOSE_PRINT + "--Begin NTBL Status For Window %d on %s--\n" + " user_name = %s\n" + " client_pid = %d\n" + " uid = %d\n" + " window_id = %u\n" + " adapter = %s\n" + " memory_requested = %llu\n" + " memory_allocated = %llu\n" + " time_loaded = %s\n" + " description = %s\n" + " return code = %s\n" + "--End NTBL Status For Window %d on %s--\n", + s->window_id, s->adapter, + s->user_name, + s->client_pid, + s->uid, + s->window_id, + s->adapter, + s->memory_requested, + s->memory_allocated, + s->time_loaded, + s->description, + _lookup_nrt_status_tab(s->rc), + s->window_id, s->adapter); +#else + "window %u on %s: %s\n", + s->window_id, s->adapter, + _lookup_nrt_status_tab(s->rc)); +#endif + break; + default: + count = snprintf(buf, size, + "Uknown NTBL Return Code For Window %d: %s\n", + s->window_id, + _lookup_nrt_status_tab(s->rc)); + } + + return count; +} +#endif +static int +_print_window_struct(nrt_window_t *w, char *buf, size_t size) +{ + int count; + + assert(w); + assert(buf); + assert(size > 0); + + + count = snprintf(buf, size, + " Window %u: %s\n", + w->id, + _lookup_nrt_status_tab(w->status)); + + return count; +} + +/* Writes out nodeinfo structure to a buffer. Maintains the + * snprintf semantics by only filling the buffer up to the value + * of size. If NRT_VERBOSE_PRINT is defined this function will + * dump the entire structure, otherwise only the "useful" part. + * + * Used by: slurmd, slurmctld + */ +extern char * +nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) +{ + nrt_adapter_t *a; + int i,j; + nrt_window_t *w; + int remaining = size; + int count; + char *tmp = buf; + + assert(n); + assert(buf); + assert(size > 0); + assert(n->magic == NRT_NODEINFO_MAGIC); + + count = snprintf(tmp, remaining, + "Node: %s\n", + n->name); + if (count < 0) + return buf; + remaining -= count; + tmp += count; + if (remaining < 1) + return buf; + for (i = 0; i < n->adapter_count; i++) { + a = n->adapter_list + i; + count = snprintf(tmp, remaining, +#if NRT_VERBOSE_PRINT + " Adapter: %s\n" + " lid: %u\n" + " network_id: %u\n" + " max_window_memory: %u\n" + " min_window_memory: %u\n" + " avail_adapter_memory: %u\n" + " window_count: %u\n", + a->name, + a->lid, + a->network_id, + a->max_winmem, + a->min_winmem, + a->avail_mem, + a->window_count); +#else + " Adapter: %s\n" + " Window count: %d\n" + " Active windows:\n", + a->name, + a->window_count); +#endif + if (count < 0) + return buf; + remaining -= count; + tmp += count; + if (remaining < 1) + return buf; + + w = a->window_list; + for (j = 0; j < a->window_count; j++) { +#if NRT_VERBOSE_PRINT + count = _print_window_struct(&w[j], tmp, remaining); +#else + + if (w[j].status != NTBL_UNLOADED_STATE) + count = _print_window_struct(&w[j], tmp, + remaining); + else + count = 0; +#endif + if (count < 0) + return buf; + remaining -= count; + tmp += count; + if (remaining < 1) + return buf; + } + } + + return buf; +} + +/* Note that when collecting max_winmem, min_winmem and avail_mem + * we convert these values from 64 to 32 bit unisgned integers. This + * was to make the pack/unpack implementation easier. I am taking a + * chance here that IBM will not release NRT adapters with more + * than 4GB of memory. + * + * Used by: all + */ +extern int +nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) +{ + int i,j; + nrt_adapter_t *a; + int offset; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); + assert(buf); + + offset = get_buf_offset(buf); + pack32(n->magic, buf); + packmem(n->name, NRT_HOSTLEN, buf); + pack32(n->adapter_count, buf); + for (i = 0; i < n->adapter_count; i++) { + a = n->adapter_list + i; + packmem(a->name, NRT_ADAPTERNAME_LEN, buf); + pack16(a->lid, buf); + pack16(a->network_id, buf); + pack32(a->max_winmem, buf); + pack32(a->min_winmem, buf); + pack32(a->avail_mem, buf); + pack32(a->window_count, buf); + for (j = 0; j < a->window_count; j++) { + pack16(a->window_list[j].id, buf); + pack32(a->window_list[j].status, buf); + pack16(a->window_list[j].job_key, buf); + } + } + + return(get_buf_offset(buf) - offset); +} + +/* Used by: all */ +static int +_copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) +{ + int i,j; + nrt_adapter_t *sa = NULL; + nrt_adapter_t *da = NULL; + + assert(dest); + assert(src); + assert(dest->magic == NRT_NODEINFO_MAGIC); + assert(src->magic == NRT_NODEINFO_MAGIC); + + strncpy(dest->name, src->name, NRT_HOSTLEN); + dest->adapter_count = src->adapter_count; + for (i = 0; i < dest->adapter_count; i++) { + sa = src->adapter_list + i; + da = dest->adapter_list +i; + strncpy(da->name, sa->name, NRT_ADAPTERNAME_LEN); + da->lid = sa->lid; + da->network_id = sa->network_id; + da->max_winmem = sa->max_winmem; + da->min_winmem = sa->min_winmem; + da->avail_mem = sa->avail_mem; + da->window_count = sa->window_count; + da->window_list = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * + da->window_count); + if (!da->window_list) { + slurm_seterrno_ret(ENOMEM); + } + for (j = 0; j < da->window_count; j++) + da->window_list[j] = sa->window_list[j]; + } + + return SLURM_SUCCESS; +} + +/* The idea behind keeping the hash table was to avoid a linear + * search of the node list each time we want to retrieve or + * modify a node's data. The _hash_index function translates + * a node name to an index into the hash table. + * + * Used by: slurmctld + */ +static int +_hash_index (char *name) +{ + int index = 0; + int j; + + assert(name); + + /* Multiply each character by its numerical position in the + * name string to add a bit of entropy, because host names such + * as cluster[0001-1000] can cause excessive index collisions. + */ + for (j = 1; *name; name++, j++) + index += (int)*name * j; + index %= nrt_state->hash_max; + + return index; +} + +/* Tries to find a node fast using the hash table + * + * Used by: slurmctld + */ +static nrt_nodeinfo_t * +_find_node(nrt_libstate_t *lp, char *name) +{ + int i; + nrt_nodeinfo_t *n; + + assert(name); + assert(lp); + + if (lp->node_count == 0) + return NULL; + + if (lp->hash_table) { + i = _hash_index(name); + n = lp->hash_table[i]; + while (n) { + assert(n->magic == NRT_NODEINFO_MAGIC); + if (!strncmp(n->name, name, NRT_HOSTLEN)) + return n; + n = n->next; + } + } + + return NULL; +} + +/* Add the hash entry for a newly created nrt_nodeinfo_t + */ +static void +_hash_add_nodeinfo(nrt_libstate_t *state, nrt_nodeinfo_t *node) +{ + int index; + + assert(state); + assert(state->hash_table); + assert(state->hash_max >= state->node_count); + if (!strlen(node->name)) + return; + index = _hash_index(node->name); + node->next = state->hash_table[index]; + state->hash_table[index] = node; +} + +/* Recreates the hash table for the node list. + * + * Used by: slurmctld + */ +static void +_hash_rebuild(nrt_libstate_t *state) +{ + int i; + + assert(state); + + if (state->hash_table) + xfree(state->hash_table); + if (state->node_count > state->hash_max || state->hash_max == 0) + state->hash_max += NRT_HASHCOUNT; + state->hash_table = (nrt_nodeinfo_t **) + xmalloc(sizeof(nrt_nodeinfo_t *) * state->hash_max); + memset(state->hash_table, 0, + sizeof(nrt_nodeinfo_t *) * state->hash_max); + for (i = 0; i < state->node_count; i++) + _hash_add_nodeinfo(state, &(state->node_list[i])); +} + +/* If the node is already in the node list then simply return + * a pointer to it, otherwise dynamically allocate memory to the + * node list if necessary. + * + * Used by: slurmctld + */ +static nrt_nodeinfo_t * +_alloc_node(nrt_libstate_t *lp, char *name) +{ + nrt_nodeinfo_t *n = NULL; + int new_bufsize; + bool need_hash_rebuild = false; + + assert(lp); + + if (name != NULL) { + n = _find_node(lp, name); + if (n != NULL) + return n; + } + + nrt_need_state_save = true; + + if (lp->node_count >= lp->node_max) { + lp->node_max += NRT_NODECOUNT; + new_bufsize = lp->node_max * sizeof(nrt_nodeinfo_t); + if (lp->node_list == NULL) + lp->node_list = (nrt_nodeinfo_t *)xmalloc(new_bufsize); + else + lp->node_list = (nrt_nodeinfo_t *)xrealloc(lp->node_list, + new_bufsize); + need_hash_rebuild = true; + } + if (lp->node_list == NULL) { + slurm_seterrno(ENOMEM); + return NULL; + } + + n = lp->node_list + (lp->node_count++); + n->magic = NRT_NODEINFO_MAGIC; + n->name[0] = '\0'; + n->adapter_list = (nrt_adapter_t *)xmalloc(NRT_MAXADAPTERS * + sizeof(nrt_adapter_t)); + + if (name != NULL) { + strncpy(n->name, name, NRT_HOSTLEN); + if (need_hash_rebuild || lp->node_count > lp->hash_max) + _hash_rebuild(lp); + else + _hash_add_nodeinfo(lp, n); + } + + return n; +} +#if NRT_DEBUG +/* Used by: slurmctld */ +static void +_print_libstate(const nrt_libstate_t *l) +{ + int i; + char buf[3000]; + + assert(l); + + printf("--Begin libstate--\n"); + printf(" magic = %u\n", l->magic); + printf(" node_count = %u\n", l->node_count); + printf(" node_max = %u\n", l->node_max); + printf(" hash_max = %u\n", l->hash_max); + for (i = 0; i < l->node_count; i++) { + memset(buf, 0, 3000); + nrt_print_nodeinfo(&l->node_list[i], buf, 3000); + printf("%s", buf); + } + printf("--End libstate--\n"); +} +#endif + + +/* Throw away adapter portion of the nodeinfo. + * + * Used by: _unpack_nodeinfo + */ +static int +_fake_unpack_adapters(Buf buf) +{ + uint32_t adapter_count; + uint32_t window_count; + uint32_t dummy32; + uint16_t dummy16; + char *dummyptr; + int i, j; + + safe_unpack32(&adapter_count, buf); + for (i = 0; i < adapter_count; i++) { + /* no copy, just advances buf counters */ + safe_unpackmem_ptr(&dummyptr, &dummy32, buf); + if (dummy32 != NRT_ADAPTERNAME_LEN) + goto unpack_error; + safe_unpack16(&dummy16, buf); + safe_unpack16(&dummy16, buf); + safe_unpack32(&dummy32, buf); + safe_unpack32(&dummy32, buf); + safe_unpack32(&dummy32, buf); + safe_unpack32(&window_count, buf); + for (j = 0; j < window_count; j++) { + safe_unpack16(&dummy16, buf); + safe_unpack32(&dummy32, buf); + safe_unpack16(&dummy16, buf); + } + } + + return SLURM_SUCCESS; + +unpack_error: + return SLURM_ERROR; +} + + +/* Unpack nodeinfo and update persistent libstate. + * + * If believe_window_status is true, we honor the window status variables + * from the packed nrt_nodeinfo_t. If it is false we set the status of + * all windows to NTBL_UNLOADED_STATE. + * + * Used by: slurmctld + */ +static int +_unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) +{ + int i, j; + nrt_adapter_t *tmp_a = NULL; + nrt_window_t *tmp_w = NULL; + uint32_t size; + nrt_nodeinfo_t *tmp_n = NULL; + char *name_ptr, name[NRT_HOSTLEN]; + int magic; + + /* NOTE! We don't care at this point whether n is valid. + * If it's NULL, we will just forego the copy at the end. + */ + assert(buf); + + /* Extract node name from buffer + */ + safe_unpack32(&magic, buf); + if (magic != NRT_NODEINFO_MAGIC) + slurm_seterrno_ret(EBADMAGIC_NRTNODEINFO); + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_HOSTLEN) + goto unpack_error; + memcpy(name, name_ptr, size); + + /* When the slurmctld is in normal operating mode (NOT backup mode), + * the global nrt_state structure should NEVER be NULL at the time that + * this function is called. Therefore, if nrt_state is NULL here, + * we assume that the controller is in backup mode. In backup mode, + * the slurmctld only unpacks RPCs to find out their identity. + * Most of the RPCs, including the one calling this function, are + * simply ignored. + * + * So, here we just do a fake unpack to advance the buffer pointer. + */ + if (nrt_state == NULL) { + if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + slurm_seterrno_ret(EUNPACK); + } else { + return SLURM_SUCCESS; + } + } + + /* If we already have nodeinfo for this node, we ignore this message. + * The slurmctld's view of window allocation is always better than + * the slurmd's view. We only need the slurmd's view if the slurmctld + * has no nodeinfo at all for that node. + */ + if (name != NULL) { + tmp_n = _find_node(nrt_state, name); + if (tmp_n != NULL) { + if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + slurm_seterrno_ret(EUNPACK); + } else { + goto copy_node; + } + } + } + + /* Update global libstate with this nodes' info. + */ + tmp_n = _alloc_node(nrt_state, name); + if (tmp_n == NULL) + return SLURM_ERROR; + tmp_n->magic = magic; + safe_unpack32(&tmp_n->adapter_count, buf); + for (i = 0; i < tmp_n->adapter_count; i++) { + tmp_a = tmp_n->adapter_list + i; + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_ADAPTERNAME_LEN) + goto unpack_error; + memcpy(tmp_a->name, name_ptr, size); + safe_unpack16(&tmp_a->lid, buf); + safe_unpack16(&tmp_a->network_id, buf); + safe_unpack32(&tmp_a->max_winmem, buf); + safe_unpack32(&tmp_a->min_winmem, buf); + safe_unpack32(&tmp_a->avail_mem, buf); + safe_unpack32(&tmp_a->window_count, buf); + tmp_w = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * + tmp_a->window_count); + if (!tmp_w) + slurm_seterrno_ret(ENOMEM); + for (j = 0; j < tmp_a->window_count; j++) { + safe_unpack16(&tmp_w[j].id, buf); + safe_unpack32(&tmp_w[j].status, buf); + safe_unpack16(&tmp_w[j].job_key, buf); + if (!believe_window_status) { + tmp_w[j].status = NTBL_UNLOADED_STATE; + tmp_w[j].job_key = 0; + } + } + tmp_a->window_list = tmp_w; + tmp_w = NULL; /* don't free on unpack error of next adapter */ + } + +copy_node: + /* Only copy the node_info structure if the caller wants it */ + if (n != NULL) + if (_copy_node(n, tmp_n) != SLURM_SUCCESS) + return SLURM_ERROR; + +#if NRT_DEBUG + _print_libstate(nrt_state); +#endif + + return SLURM_SUCCESS; + +unpack_error: + xfree(tmp_w); + slurm_seterrno_ret(EUNPACK); +} + +/* Unpack nodeinfo and update persistent libstate. + * + * Used by: slurmctld + */ +extern int +nrt_unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) +{ + int rc; + + _lock(); + rc = _unpack_nodeinfo(n, buf, false); + _unlock(); + return rc; +} + + +/* Used by: slurmd, slurmctld */ +extern void +nrt_free_nodeinfo(nrt_nodeinfo_t *n, bool ptr_into_array) +{ + nrt_adapter_t *adapter; + int i; + + if (!n) + return; + + assert(n->magic == NRT_NODEINFO_MAGIC); + + if (n->adapter_list) { + adapter = n->adapter_list; + for (i = 0; i < n->adapter_count; i++) { + xfree(adapter[i].window_list); + } + xfree(n->adapter_list); + } + if (!ptr_into_array) + xfree(n); +} + +/* Assign a unique key to each job. The key is used later to + * gain access to the network table loaded on each node of a job. + * + * NRT documentation states that the job key must be greater + * than 0 and less than 0xFFF0. + * + * Used by: slurmctld + */ +static uint16_t +_next_key(void) +{ + uint16_t key; + + assert(nrt_state); + + _lock(); + key = nrt_state->key_index % 0xFFF0; + if (key == 0) + key++; + nrt_state->key_index = key + 1; + _unlock(); + + return key; +} + +/* FIXME - this could be a little smarter than walking the whole list each time */ +static nrt_window_t * +_find_free_window(nrt_adapter_t *adapter) { + int i; + nrt_window_t *window; + + for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { + window = &adapter->window_list[i]; + if (window->status == NTBL_UNLOADED_STATE) + return window; + } + + return (nrt_window_t *) NULL; +} + + +static nrt_window_t * +_find_window(nrt_adapter_t *adapter, int window_id) { + int i; + nrt_window_t *window; + + for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { + window = &adapter->window_list[i]; + if (window->id == window_id) + return window; + } + + debug3("Unable to _find_window %d on adapter %s", + window_id, adapter->name); + return (nrt_window_t *) NULL; +} + + +/* For a given process, fill out an NTBL + * struct (an array of these makes up the network table loaded + * for each job). Assign adapters, lids and switch windows to + * each task in a job. + * + * Used by: slurmctld + */ +static int +_allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, + char *hostname, int task_id, uint16_t job_key) +{ + nrt_nodeinfo_t *node; + nrt_adapter_t *adapter; + nrt_window_t *window; + NTBL *table; + int i; + + assert(tableinfo); + assert(hostname); + + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + + /* Reserve a window on each adapter for this task */ + for (i = 0; i < adapter_cnt; i++) { + adapter = &node->adapter_list[i]; + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->name); + return SLURM_ERROR; + } + window->status = NTBL_LOADED_STATE; + window->job_key = job_key; + + table = tableinfo[i].table[task_id]; + table->task_id = task_id; + table->lid = adapter->lid; + table->window_id = window->id; + + strncpy(tableinfo[i].adapter_name, adapter->name, + NRT_ADAPTERNAME_LEN); + } + + return SLURM_SUCCESS; +} + + +/* For a given process, fill out an NTBL + * struct (an array of these makes up the network table loaded + * for each job). Assign a single adapter, lid and switch window to + * a task in a job. + * + * Used by: slurmctld + */ +static int +_allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, + char *hostname, int task_id, uint16_t job_key) +{ + nrt_nodeinfo_t *node; + nrt_adapter_t *adapter = NULL; + nrt_window_t *window; + NTBL *table; + int i; + + assert(tableinfo); + assert(hostname); + + debug("in _allocate_window_single"); + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + + /* find the adapter */ + for (i = 0; i < node->adapter_count; i++) { + debug("adapter %s at index %d", node->adapter_list[i].name, i); + if (strcasecmp(node->adapter_list[i].name, adapter_name) + == 0) { + adapter = &node->adapter_list[i]; + debug("Found adapter %s", adapter_name); + break; + } + } + if (adapter == NULL) { + error("Failed to find adapter %s on node %s", + adapter_name, hostname); + return SLURM_ERROR; + } + + /* Reserve a window on the adapter for this task */ + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->name); + return SLURM_ERROR; + } + window->status = NTBL_LOADED_STATE; + window->job_key = job_key; + + table = tableinfo[0].table[task_id]; + table->task_id = task_id; + table->lid = adapter->lid; + table->window_id = window->id; + + strncpy(tableinfo[0].adapter_name, adapter_name, + NRT_ADAPTERNAME_LEN); + + return SLURM_SUCCESS; +} + + +/* Find the correct NTBL structs and set the state + * of the switch windows for the specified task_id. + * + * Used by: slurmctld + */ +static int +_window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, + char *hostname, int task_id, enum NTBL_RC state, + uint16_t job_key) +{ + nrt_nodeinfo_t *node = NULL; + nrt_adapter_t *adapter = NULL; + nrt_window_t *window = NULL; + NTBL *table = NULL; + int i, j; + bool adapter_found; + + assert(tableinfo); + assert(hostname); + assert(adapter_cnt <= NRT_MAXADAPTERS); + + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + if (node->adapter_list == NULL) { + error("Found node, but adapter_list is NULL"); + return SLURM_ERROR; + } + + for (i = 0; i < adapter_cnt; i++) { + if (tableinfo[i].table == NULL) { + error("tableinfo[%d].table is NULL", i); + return SLURM_ERROR; + } + table = tableinfo[i].table[task_id]; + if (table == NULL) { + error("tableinfo[%d].table[%d] is NULL", i, task_id); + return SLURM_ERROR; + } + + adapter_found = false; + /* Find the adapter that matches the one in tableinfo */ + for (j = 0; j < node->adapter_count; j++) { + adapter = &node->adapter_list[j]; + if (strcasecmp(adapter->name, + tableinfo[i].adapter_name) == 0 + && adapter->lid == table->lid) { + adapter_found = true; + break; + } + } + if (!adapter_found) { + if (table->lid != 0) + error("Did not find the correct adapter: " + "%hu vs. %hu", + adapter->lid, table->lid); + return SLURM_ERROR; + } + + debug3("Setting status %s adapter %s, " + "lid %hu, window %hu for task %d", + state == NTBL_UNLOADED_STATE ? "UNLOADED" : "LOADED", + adapter->name, + table->lid, table->window_id, task_id); + window = _find_window(adapter, table->window_id); + if (window) { + window->status = state; + window->job_key = + (state == NTBL_UNLOADED_STATE) ? 0 : job_key; + } + } + + return SLURM_SUCCESS; +} + + +#if NRT_DEBUG +/* Used by: all */ +static void +_print_table(NTBL **table, int size) +{ + int i; + + assert(table); + assert(size > 0); + + printf("--Begin NTBL table--\n"); + for (i = 0; i < size; i++) { + printf(" task_id: %u\n", table[i]->task_id); + printf(" window_id: %u\n", table[i]->window_id); + printf(" lid: %u\n", table[i]->lid); + } + printf("--End NTBL table--\n"); +} + +/* Used by: all */ +static void +_print_index(char *index, int size) +{ + int i; + + assert(index); + assert(size > 0); + + printf("--Begin lid index--\n"); + for (i = 0; i < size; i++) { + printf(" task_id: %u\n", i); + printf(" name: %s\n", index + (i * NRT_ADAPTERNAME_LEN)); + } + printf("--End lid index--\n"); +} +#endif + + +/* Find all of the windows used by this job step and set their + * status to "state". + * + * Used by: slurmctld + */ +static int +_job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) +{ + hostlist_iterator_t hi; + char *host; + int proc_cnt; + int nprocs; + int nnodes; + int i, j; + int rc; + int task_cnt; + int full_node_cnt; + int min_procs_per_node; + int max_procs_per_node; + + xassert(!hostlist_is_empty(hl)); + xassert(jp); + xassert(jp->magic == NRT_JOBINFO_MAGIC); + + if ((jp == NULL) + || (jp->magic != NRT_JOBINFO_MAGIC) + || (hostlist_is_empty(hl))) + return SLURM_ERROR; + + if ((jp->tables_per_task == 0) + || !jp->tableinfo + || (jp->tableinfo[0].table_length == 0)) + return SLURM_SUCCESS; + + debug3("jp->tables_per_task = %d", jp->tables_per_task); + nprocs = jp->tableinfo[0].table_length; + hi = hostlist_iterator_create(hl); + + debug("Finding windows"); + nnodes = hostlist_count(hl); + full_node_cnt = nprocs % nnodes; + min_procs_per_node = nprocs / nnodes; + max_procs_per_node = (nprocs + nnodes - 1) / nnodes; + + proc_cnt = 0; + _lock(); + for (i = 0; i < nnodes; i++) { + host = hostlist_next(hi); + if (!host) + error("Failed to get next host"); + + if (i < full_node_cnt) + task_cnt = max_procs_per_node; + else + task_cnt = min_procs_per_node; + + for (j = 0; j < task_cnt; j++) { + rc = _window_state_set(jp->tables_per_task, + jp->tableinfo, + host, proc_cnt, + state, jp->job_key); + proc_cnt++; + } + free(host); + } + _unlock(); + + hostlist_iterator_destroy(hi); + return SLURM_SUCCESS; +} + +/* + * For one node, free all of the windows belonging to a particular + * job step (as identified by the job_key). + */ +static void inline +_free_windows_by_job_key(uint16_t job_key, char *nodename) +{ + nrt_nodeinfo_t *node; + nrt_adapter_t *adapter; + nrt_window_t *window; + int i, j; + + /* debug3("_free_windows_by_job_key(%hu, %s)", job_key, nodename); */ + if ((node = _find_node(nrt_state, nodename)) == NULL) + return; + + if (node->adapter_list == NULL) { + error("_free_windows_by_job_key, " + "adapter_list NULL for node %s", nodename); + return; + } + for (i = 0; i < node->adapter_count; i++) { + adapter = &node->adapter_list[i]; + if (adapter->window_list == NULL) { + error("_free_windows_by_job_key, " + "window_list NULL for node %s adapter %s", + nodename, adapter->name); + continue; + } + /* We could check here to see if this adapter's name + * is in the nrt_jobinfo tablinfo list to avoid the next + * loop if the adapter isn't in use by the job step. + * However, the added searching and string comparisons + * probably aren't worth it, especially since MOST job + * steps will use all of the adapters. + */ + for (j = 0; j < adapter->window_count; j++) { + window = &adapter->window_list[j]; + + if (window->job_key == job_key) { + /* debug3("Freeing adapter %s window %d", + adapter->name, window->id); */ + window->status = NTBL_UNLOADED_STATE; + window->job_key = 0; + } + } + } +} + +/* Find all of the windows used by job step "jp" on the hosts + * designated in hostlist "hl" and mark their state NTBL_UNLOADED_STATE. + * + * Used by: slurmctld + */ +extern int +nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) +{ + hostlist_t uniq_hl; + hostlist_iterator_t hi; + char *nodename; + + xassert(!hostlist_is_empty(hl)); + xassert(jp); + xassert(jp->magic == NRT_JOBINFO_MAGIC); + + if ((jp == NULL) + || (jp->magic != NRT_JOBINFO_MAGIC) + || (hostlist_is_empty(hl))) + return SLURM_ERROR; + + if ((jp->tables_per_task == 0) + || !jp->tableinfo + || (jp->tableinfo[0].table_length == 0)) + return SLURM_SUCCESS; + + /* The hl hostlist may contain duplicate nodenames (poe -hostfile + * triggers duplicates in the hostlist). Since there + * is no reason to call _free_windows_by_job_key more than once + * per nodename, we create a new unique hostlist. + */ + uniq_hl = hostlist_copy(hl); + hostlist_uniq(uniq_hl); + hi = hostlist_iterator_create(uniq_hl); + + _lock(); + if (nrt_state != NULL) { + while ((nodename = hostlist_next(hi)) != NULL) { + _free_windows_by_job_key(jp->job_key, nodename); + free(nodename); + } + } else { /* nrt_state == NULL */ + /* If there is no state at all, the job is already cleaned + * up. :) This should really only happen when the backup + * controller is calling job_fini() just before it takes over + * the role of active controller. + */ + debug("nrt_job_step_complete called when nrt_state == NULL"); + } + _unlock(); + + hostlist_iterator_destroy(hi); + hostlist_destroy(uniq_hl); + return SLURM_SUCCESS; +} + + +/* Find all of the windows used by job step "jp" and mark their + * state NTBL_LOADED_STATE. + * + * Used by the slurmctld at startup time to restore the allocation + * status of any job steps that were running at the time the previous + * slurmctld was shutdown. Also used to restore the allocation + * status after a call to switch_clear(). + */ +extern int +nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl) +{ + return _job_step_window_state(jp, hl, NTBL_LOADED_STATE); +} + + + +/* Setup everything for the job. Assign tasks across + * nodes based on the hostlist given and create the network table used + * on all nodes of the job. + * + * Used by: slurmctld + */ +extern int +nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, + bool sn_all, char *adapter_name, int bulk_xfer) +{ + int nnodes; + hostlist_iterator_t hi; + char *host = NULL; + int proc_cnt = 0; + int i, j; + nrt_nodeinfo_t *node; + int rc; + int task_cnt; + int full_node_cnt; + int min_procs_per_node; + int max_procs_per_node; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + assert(!hostlist_is_empty(hl)); + + if (nprocs <= 0) + slurm_seterrno_ret(EINVAL); + + jp->bulk_xfer = (uint8_t) bulk_xfer; + jp->job_key = _next_key(); + snprintf(jp->job_desc, DESCLEN, + "slurm switch/NRT driver key=%d", jp->job_key); + jp->window_memory = NRT_AUTO_WINMEM; + + hi = hostlist_iterator_create(hl); + + if (sn_all) { + /* + * Peek at the first host to figure out tables_per_task. + * This driver assumes that all nodes have the same number + * of adapters per node. Bad Things will happen if this + * assumption is incorrect. + */ + host = hostlist_next(hi); + _lock(); + node = _find_node(nrt_state, host); + jp->tables_per_task = node ? node->adapter_count : 0; + _unlock(); + if (host != NULL) + free(host); + hostlist_iterator_reset(hi); + } else { + jp->tables_per_task = 1; + } + + /* Allocate memory for each nrt_tableinfo_t */ + jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task + * sizeof(nrt_tableinfo_t)); + for (i = 0; i < jp->tables_per_task; i++) { + jp->tableinfo[i].table_length = nprocs; + jp->tableinfo[i].table = (NTBL **) xmalloc(nprocs + * sizeof(NTBL *)); + for (j = 0; j < nprocs; j++) { + jp->tableinfo[i].table[j] = + (NTBL *) xmalloc(sizeof(NTBL)); + } + } + + debug("Allocating windows"); + nnodes = hostlist_count(hl); + full_node_cnt = nprocs % nnodes; + min_procs_per_node = nprocs / nnodes; + max_procs_per_node = (nprocs + nnodes - 1) / nnodes; + proc_cnt = 0; + _lock(); + for (i = 0; i < nnodes; i++) { + host = hostlist_next(hi); + if (!host) + error("Failed to get next host"); + + if (i < full_node_cnt) + task_cnt = max_procs_per_node; + else + task_cnt = min_procs_per_node; + + for (j = 0; j < task_cnt; j++) { + if (adapter_name == NULL) { + rc = _allocate_windows_all(jp->tables_per_task, + jp->tableinfo, + host, proc_cnt, + jp->job_key); + } else { + rc = _allocate_window_single(adapter_name, + jp->tableinfo, + host, proc_cnt, + jp->job_key); + } + if (rc != SLURM_SUCCESS) { + _unlock(); + goto fail; + } + proc_cnt++; + } + free(host); + } + _unlock(); + + +#if NRT_DEBUG + _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); +#endif + + hostlist_iterator_destroy(hi); + return SLURM_SUCCESS; + +fail: + free(host); + hostlist_iterator_destroy(hi); + /* slurmctld will call nrt_free_jobinfo on jp */ + return SLURM_FAILURE; +} + +staic void +_pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +{ + int i; + + pack32(tableinfo->table_length, buf); + for (i = 0; i < tableinfo->table_length; i++) { + pack16(tableinfo->table[i]->task_id, buf); + pack16(tableinfo->table[i]->lid, buf); + pack16(tableinfo->table[i]->window_id, buf); + } + packmem(tableinfo->adapter_name, NRT_ADAPTERNAME_LEN, buf); +} + +/* Used by: all */ +extern int +nrt_pack_jobinfo(nrt_jobinfo_t *j, Buf buf) +{ + int i; + + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + assert(buf); + + pack32(j->magic, buf); + pack16(j->job_key, buf); + packmem(j->job_desc, DESCLEN, buf); + pack32(j->window_memory, buf); + pack8(j->bulk_xfer, buf); + pack16(j->tables_per_task, buf); + for (i = 0; i < j->tables_per_task; i++) { + _pack_tableinfo(&j->tableinfo[i], buf); + } + + return SLURM_SUCCESS; +} + +/* return 0 on success, -1 on failure */ +static int +_unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +{ + uint32_t size; + char *name_ptr; + int i; + + safe_unpack32(&tableinfo->table_length, buf); + tableinfo->table = (NTBL **) xmalloc(tableinfo->table_length + * sizeof(NTBL *)); + for (i = 0; i < tableinfo->table_length; i++) { + tableinfo->table[i] = (NTBL *) xmalloc(sizeof(NTBL)); + + safe_unpack16(&tableinfo->table[i]->task_id, buf); + safe_unpack16(&tableinfo->table[i]->lid, buf); + safe_unpack16(&tableinfo->table[i]->window_id, buf); + } + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_ADAPTERNAME_LEN) + goto unpack_error; + memcpy(tableinfo->adapter_name, name_ptr, size); + return 0; + +unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ + error("unpack error in _unpack_tableinfo"); + return -1; +} + +/* Used by: all */ +int +nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) +{ + uint32_t size; + int i, k; + + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + assert(buf); + + safe_unpack32(&j->magic, buf); + assert(j->magic == NRT_JOBINFO_MAGIC); + safe_unpack16(&j->job_key, buf); + safe_unpackmem(j->job_desc, &size, buf); + if (size != DESCLEN) + goto unpack_error; + safe_unpack32(&j->window_memory, buf); + safe_unpack8(&j->bulk_xfer, buf); + safe_unpack16(&j->tables_per_task, buf); + + j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task + * sizeof(nrt_tableinfo_t)); + if (!j->tableinfo) + slurm_seterrno_ret(ENOMEM); + for (i = 0; i < j->tables_per_task; i++) { + if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) + goto unpack_error; + } + + return SLURM_SUCCESS; + +unpack_error: + error("nrt_unpack_jobinfo error"); + if (j->tableinfo) { + for (i = 0; i < j->tables_per_task; i++) { + for (k=0; ktableinfo[i].table_length; k++) + xfree(j->tableinfo[i].table[k]); + xfree(j->tableinfo[i].table); + } + xfree(j->tableinfo); + } + slurm_seterrno_ret(EUNPACK); + return SLURM_ERROR; +} + +/* Used by: all */ +extern nrt_jobinfo_t * +nrt_copy_jobinfo(nrt_jobinfo_t *job) +{ + nrt_jobinfo_t *new; + int i, k; + + assert(job); + assert(job->magic == NRT_JOBINFO_MAGIC); + + if (nrt_alloc_jobinfo(&new)) { + debug("nrt_alloc_jobinfo failed"); + goto cleanup1; + } + memcpy(new, job, sizeof(nrt_jobinfo_t)); + /* table will be empty (and table_size == 0) when the network string + * from poe does not contain "us". + * (See man poe: -euilib or MP_EUILIB) + */ + if (job->tables_per_task > 0) { + /* Allocate memory for each nrt_tableinfo_t */ + new->tableinfo = (nrt_tableinfo_t *)xmalloc( + job->tables_per_task * sizeof(nrt_tableinfo_t)); + if (new->tableinfo == NULL) + goto cleanup2; + memcpy(new->tableinfo, job->tableinfo, + sizeof(nrt_tableinfo_t) * job->tables_per_task); + + for (i = 0; i < job->tables_per_task; i++) { + new->tableinfo[i].table = + (NTBL **) xmalloc(job->tableinfo[i].table_length + * sizeof(NTBL *)); + if (new->tableinfo[i].table == NULL) + goto cleanup3; + + for (k = 0; k < new->tableinfo[i].table_length; k++) { + new->tableinfo[i].table[k] = + (NTBL *) xmalloc(sizeof(NTBL)); + if (new->tableinfo[i].table[k] == NULL) + goto cleanup4; + memcpy(new->tableinfo[i].table[k], + job->tableinfo[i].table[k], + sizeof(nrt_tableinfo_t)); + } + + + } + } + + return new; + +cleanup4: + k--; + for ( ; k >= 0; k--) + xfree(new->tableinfo[i].table[k]); +cleanup3: + i--; + for ( ; i >= 0; i--) { + for (k = 0; k < new->tableinfo[i].table_length; k++) + xfree(new->tableinfo[i].table[k]); + xfree(new->tableinfo[i].table); + } + xfree(new->tableinfo); +cleanup2: + nrt_free_jobinfo(new); +cleanup1: + error("Allocating new jobinfo"); + slurm_seterrno(ENOMEM); + return NULL; +} + +/* Used by: all */ +extern void +nrt_free_jobinfo(nrt_jobinfo_t *jp) +{ + int i, j; + nrt_tableinfo_t *tableinfo; + + if (!jp) { + return; + } + + if (jp->magic != NRT_JOBINFO_MAGIC) { + error("jp is not a switch/nrt nrt_jobinfo_t"); + return; + } + + jp->magic = 0; + if (jp->tables_per_task > 0 && jp->tableinfo != NULL) { + for (i = 0; i < jp->tables_per_task; i++) { + tableinfo = &jp->tableinfo[i]; + if (tableinfo->table == NULL) + continue; + for (j = 0; j < tableinfo->table_length; j++) { + if (tableinfo->table[j] == NULL) + continue; + xfree(tableinfo->table[j]); + } + xfree(tableinfo->table); + } + xfree(jp->tableinfo); + } + + xfree(jp); + jp = NULL; + + return; +} + +/* Return data to code for whom jobinfo is an opaque type. + * + * Used by: all + */ +extern int +nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) +{ + nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **)data; + int *tables_per = (int *)data; + int *job_key = (int *)data; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + + switch(key) { + case NRT_JOBINFO_TABLEINFO: + *tableinfo = jp->tableinfo; + break; + case NRT_JOBINFO_TABLESPERTASK: + *tables_per = jp->tables_per_task; + break; + case NRT_JOBINFO_KEY: + *job_key = jp->job_key; + break; + default: + slurm_seterrno_ret(EINVAL); + } + + return SLURM_SUCCESS; +} + + +/* + * Check up to "retry" times for "window_id" on "adapter_name" + * to switch to the NTBL_UNLOADED_STATE. Sleep one second between + * each retry. + * + * Used by: slurmd + */ +static int +_wait_for_window_unloaded(char *adapter_name, unsigned short window_id, + int retry) +{ + int status; + int i; + + for (i = 0; i < retry; i++) { + ntbl_query_window(NRT_VERSION, adapter_name, + window_id, &status); + if (status == NTBL_UNLOADED_STATE) + break; + debug2("Window %hu adapter %s is in use, sleeping 1 second", + window_id, adapter_name); + sleep(1); + } + + if (status != NTBL_UNLOADED_STATE) + return SLURM_ERROR; + + return SLURM_SUCCESS; +} + + +/* + * Look through the table and find all of the NTBL that are for an adapter on + * this node. Wait until the window from each local NTBL is in the + * NTBL_UNLOADED_STATE. + * + * Used by: slurmd + */ +static int +_wait_for_all_windows(nrt_tableinfo_t *tableinfo) +{ + uint16_t lid; + int i; + int err; + int rc = SLURM_SUCCESS; + int retry = 15; + + lid = _get_lid_from_adapter(tableinfo->adapter_name); + + for (i = 0; i < tableinfo->table_length; i++) { + if (tableinfo->table[i]->lid == lid) { + err = _wait_for_window_unloaded( + tableinfo->adapter_name, + tableinfo->table[i]->window_id, + retry); + if (err != SLURM_SUCCESS) { + error("Window %hu adapter %s did not become" + " free within %d seconds", + tableinfo->table[i]->window_id, + tableinfo->adapter_name, + retry); + rc = err; + retry = 2; + } + } + } + + return rc; +} + +static int +_check_rdma_job_count(char *adapter) +{ + unsigned int job_count; + unsigned int *job_keys; + int rc, z; + + rc = ntbl_rdma_jobs(NRT_VERSION, adapter, + &job_count, &job_keys); + if (rc != NTBL_SUCCESS) { + error("ntbl_rdma_jobs(): %d", rc); + return SLURM_ERROR; + } + + debug3("Adapter %s, RDMA job_count = %u", + adapter, job_count); + for (z = 0; z < job_count; z++) + debug3(" job key = %u", job_keys[z]); + free(job_keys); + if (job_count >= 4) { + error("RDMA job_count is too high: %u", job_count); + return SLURM_ERROR; + } + + return SLURM_SUCCESS; +} + + +/* Load a network table on node. If table contains more than + * one window for a given adapter, load the table only once for that + * adapter. + * + * Used by: slurmd + */ +extern int +nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) +{ + int i; + int err; + unsigned long long winmem; + char *adapter; + uint16_t network_id; +/* ADAPTER_RESOURCES res; */ + int rc; + +#if NRT_DEBUG + char buf[2000]; +#endif + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + + for (i = 0; i < jp->tables_per_task; i++) { +#if NRT_DEBUG + _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); + printf("%s", nrt_sprint_jobinfo(jp, buf, 2000)); +#endif + adapter = jp->tableinfo[i].adapter_name; + network_id = _get_network_id_from_adapter(adapter); + + rc = _wait_for_all_windows(&jp->tableinfo[i]); + if (rc != SLURM_SUCCESS) + return rc; + + if (adapter == NULL) + continue; + winmem = jp->window_memory; + if (jp->bulk_xfer) { + if (i == 0) { + rc = _check_rdma_job_count(adapter); + if (rc != SLURM_SUCCESS) + return rc; + } + + err = ntbl_load_table_rdma( + NRT_VERSION, + adapter, + network_id, + uid, + pid, + jp->job_key, + jp->job_desc, + jp->bulk_xfer, + 0, /* rcontext_blocks */ + jp->tableinfo[i].table_length, + jp->tableinfo[i].table); + } else { + err = ntbl_load_table( + NRT_VERSION, + adapter, + network_id, + uid, + pid, + jp->job_key, + jp->job_desc, + &winmem, + jp->tableinfo[i].table_length, + jp->tableinfo[i].table); + } + if (err != NTBL_SUCCESS) { + error("unable to load table: [%d] %s", + err, _lookup_nrt_status_tab(err)); + return SLURM_ERROR; + } + } + umask(nrt_umask); + + return SLURM_SUCCESS; +} + + +/* + * Try up to "retry" times to unload a window. + */ +static int +_unload_window(char *adapter, unsigned short job_key, unsigned short window_id, + int retry) +{ + int i; + int err; + + for (i = 0; i < retry; i++) { + err = ntbl_unload_window(NRT_VERSION, adapter, + job_key, window_id); + if (err == NTBL_SUCCESS) + return SLURM_SUCCESS; + debug("Unable to unload window %hu adapter %s job_key %hu: %s", + window_id, adapter, job_key, _lookup_nrt_status_tab(err)); + + err = ntbl_clean_window(NRT_VERSION, adapter, + ALWAYS_KILL, window_id); + if (err == NTBL_SUCCESS) + return SLURM_SUCCESS; + error("Unable to clean window %hu adapter %s job_key %hu: %s", + window_id, adapter, job_key, _lookup_nrt_status_tab(err)); + + sleep(1); + } + + return SLURM_FAILURE; +} + + +/* Assumes that, on error, new switch state information will be + * read from node. + * + * Used by: slurmd + */ +extern int +nrt_unload_table(nrt_jobinfo_t *jp) +{ + int i, j; + int err; + char *adapter_name; + NTBL **table; + uint32_t table_length; + int local_lid; + int rc = SLURM_SUCCESS; + int retry = 15; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + for (i = 0; i < jp->tables_per_task; i++) { + table = jp->tableinfo[i].table; + table_length = jp->tableinfo[i].table_length; + adapter_name = jp->tableinfo[i].adapter_name; + local_lid = _get_lid_from_adapter(adapter_name); + + for (j = 0; j < table_length; j++) { + if (table[j]->lid != local_lid) + continue; + debug3("freeing adapter %s lid %d window %d job_key %d", + adapter_name, table[j]->lid, + table[j]->window_id, jp->job_key); + err = _unload_window(adapter_name, + jp->job_key, + table[j]->window_id, + retry); + if (err != SLURM_SUCCESS) { + rc = err; + slurm_seterrno(EUNLOAD); + retry = 2; + } + } + } + return rc; +} + +static nrt_libstate_t * +_alloc_libstate(void) +{ + nrt_libstate_t *tmp; + + tmp = (nrt_libstate_t *)xmalloc(sizeof(nrt_libstate_t)); + if (!tmp) { + slurm_seterrno(ENOMEM); + return NULL; + } + tmp->magic = NRT_LIBSTATE_MAGIC; + tmp->node_count = 0; + tmp->node_max = 0; + tmp->node_list = NULL; + tmp->hash_max = 0; + tmp->hash_table = NULL; + tmp->key_index = 1; + + return tmp; +} + +/* Allocate and initialize memory for the persistent libstate. + * + * Used by: slurmctld + */ +extern int +nrt_init(void) +{ + nrt_libstate_t *tmp; + + tmp = _alloc_libstate(); + if (!tmp) + return SLURM_FAILURE; + _lock(); + assert(!nrt_state); + nrt_state = tmp; + _unlock(); + + return SLURM_SUCCESS; +} + +static void +_free_libstate(nrt_libstate_t *lp) +{ + int i; + + if (!lp) + return; + if (lp->node_list != NULL) { + for (i = 0; i < lp->node_count; i++) + nrt_free_nodeinfo(&lp->node_list[i], true); + xfree(lp->node_list); + } + xfree(lp->hash_table); + xfree(lp); +} + +int +nrt_fini(void) +{ + xfree(nrt_conf); + return SLURM_SUCCESS; +} + +/* Used by: slurmctld */ +static int +_pack_libstate(nrt_libstate_t *lp, Buf buffer) +{ + int offset; + int i; + + assert(lp); + assert(lp->magic == NRT_LIBSTATE_MAGIC); + + offset = get_buf_offset(buffer); + pack32(lp->magic, buffer); + pack32(lp->node_count, buffer); + for (i = 0; i < lp->node_count; i++) + (void)nrt_pack_nodeinfo(&lp->node_list[i], buffer); + /* don't pack hash_table, we'll just rebuild on restore */ + pack16(lp->key_index, buffer); + + return(get_buf_offset(buffer) - offset); +} + +/* Used by: slurmctld */ +extern void +nrt_libstate_save(Buf buffer, bool free_flag) +{ + _lock(); + + if (nrt_state != NULL) + _pack_libstate(nrt_state, buffer); + + /* Clean up nrt_state since backup slurmctld can repeatedly + * save and restore state */ + if (free_flag) { + _free_libstate(nrt_state); + nrt_state = NULL; /* freed above */ + } + _unlock(); +} + +/* Used by: slurmctld */ +static int +_unpack_libstate(nrt_libstate_t *lp, Buf buffer) +{ + int offset; + int node_count; + int i; + + assert(lp->magic == NRT_LIBSTATE_MAGIC); + + offset = get_buf_offset(buffer); + + safe_unpack32(&lp->magic, buffer); + safe_unpack32(&node_count, buffer); + for (i = 0; i < node_count; i++) { + if (_unpack_nodeinfo(NULL, buffer, false) != SLURM_SUCCESS) + goto unpack_error; + } + if (lp->node_count != node_count) { + error("Failed to recover switch state of all nodes (%d of %u)", + lp->node_count, node_count); + return SLURM_ERROR; + } + safe_unpack16(&lp->key_index, buffer); + + return SLURM_SUCCESS; + +unpack_error: + error("unpack error in _unpack_libstate"); + slurm_seterrno_ret(EBADMAGIC_NRTLIBSTATE); + return SLURM_ERROR; +} + +/* Used by: slurmctld */ +extern int +nrt_libstate_restore(Buf buffer) +{ + _lock(); + assert(!nrt_state); + + nrt_state = _alloc_libstate(); + if (!nrt_state) { + error("nrt_libstate_restore nrt_state is NULL"); + _unlock(); + return SLURM_FAILURE; + } + _unpack_libstate(nrt_state, buffer); + _unlock(); + + return SLURM_SUCCESS; +} + +extern int +nrt_libstate_clear(void) +{ + int i, j, k; + struct nrt_nodeinfo *node; + struct nrt_adapter *adapter; + struct nrt_window *window; + + debug3("Clearing state on all windows in global NRT state"); + _lock(); + if (!nrt_state || !nrt_state->node_list) { + error("nrt_state or node_list not initialized!"); + _unlock(); + return SLURM_ERROR; + } + + for (i = 0; i < nrt_state->node_count; i++) { + node = &nrt_state->node_list[i]; + if (!node->adapter_list) + continue; + for (j = 0; j < node->adapter_count; j++) { + adapter = &node->adapter_list[i]; + if (!adapter || !adapter->window_list) + continue; + for (k = 0; k < adapter->window_count; k++) { + window = &adapter->window_list[k]; + if (!window) + continue; + window->status = NTBL_UNLOADED_STATE; + } + } + } + _unlock(); + + return SLURM_SUCCESS; +} diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h new file mode 100644 index 0000000000..557a04c470 --- /dev/null +++ b/src/plugins/switch/nrt/nrt.h @@ -0,0 +1,113 @@ +/*****************************************************************************\ + * nrt.h - Library routines for initiating jobs using IBM's NRT (Network + * Routing Table) + ***************************************************************************** + * Copyright (C) 2004 The Regents of the University of California. + * Portions Copyright (C) 2011 SchedMD LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Jason King + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include "src/common/slurm_xlator.h" + +#ifndef _NRT_INCLUDED +#define _NRT_INCLUDED + +#if HAVE_LIBNRT +# include +#else +# error "Must have libnrt to compile this module!" +#endif + +/* opaque data structures - no peeking! */ +typedef struct nrt_libstate nrt_libstate_t; +typedef struct nrt_jobinfo nrt_jobinfo_t; +typedef struct nrt_nodeinfo nrt_nodeinfo_t; + +/* NOTE: error codes should be between ESLURM_SWITCH_MIN and + * ESLURM_SWITCH MAX as defined in slurm/slurm_errno.h */ +enum { + /* switch/nrt specific error codes */ + ESTATUS = 3000, + EADAPTER, + ENOADAPTER, + EBADMAGIC_NRT_NODEINFO, + EBADMAGIC_NRT_JOBINFO, + EBADMAGIC_NRT_LIBSTATE, + EUNPACK, + EHOSTNAME, + ENOTSUPPORTED, + EVERSION, + EWINDOW, + EUNLOAD +}; + +#define NRT_MAXADAPTERS 2 +#define NRT_LIBSTATE_LEN (1024 * 1024 * 1) + +extern int nrt_slurmctld_init(void); +extern int nrt_slurmd_init(void); +extern int nrt_slurmd_step_init(void); +extern int nrt_alloc_nodeinfo(nrt_nodeinfo_t **nh); +extern int nrt_build_nodeinfo(nrt_nodeinfo_t *np, char *hostname); +extern char *nrt_print_nodeinfo(nrt_nodeinfo_t *np, char *buf, size_t size); +extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *np, Buf buf); +extern int nrt_unpack_nodeinfo(nrt_nodeinfo_t *np, Buf buf); +extern void nrt_free_nodeinfo(nrt_nodeinfo_t *np, bool ptr_into_array); +extern int nrt_alloc_jobinfo(nrt_jobinfo_t **jh); +extern int nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, + bool sn_all, char *adapter_name, int bulk_xfer); +extern int nrt_pack_jobinfo(nrt_jobinfo_t *jp, Buf buf); +extern int nrt_unpack_jobinfo(nrt_jobinfo_t *jp, Buf buf); +extern nrt_jobinfo_t *nrt_copy_jobinfo(nrt_jobinfo_t *jp); +extern void nrt_free_jobinfo(nrt_jobinfo_t *jp); +extern int nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid); +extern int nrt_init(void); +extern int nrt_fini(void); +extern int nrt_unload_table(nrt_jobinfo_t *jp); +extern int nrt_unpack_libstate(nrt_libstate_t *lp, Buf buffer); +extern int nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data); +extern void nrt_libstate_save(Buf buffer, bool free_flag); +extern int nrt_libstate_restore(Buf buffer); +extern int nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl); +extern int nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl); +extern int nrt_libstate_clear(void); +extern int nrt_slurmctld_init(void); +extern int nrt_slurmd_init(void); +extern int nrt_slurmd_step_init(void); + +#endif /* _NRT_INCLUDED */ diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h new file mode 100644 index 0000000000..3553b2152c --- /dev/null +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -0,0 +1,61 @@ +/*****************************************************************************\ + ** federation_keys.h - Key definitions used by the get_jobinfo functions + ** $Id$ + ***************************************************************************** + * Copyright (C) 2004 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Jason King + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _FEDERATION_KEYS_INCLUDED +#define _FEDERATION_KEYS_INCLUDED + +#define FED_ADAPTERNAME_LEN 5 + +enum { + /* Federation specific get_jobinfo keys */ + FED_JOBINFO_TABLEINFO, + FED_JOBINFO_TABLESPERTASK, + FED_JOBINFO_KEY, + FED_JOBINFO_PROTOCOL, + FED_JOBINFO_MODE +}; + +/* Information shared between slurm_ll_api and the slurm federation driver */ +typedef struct fed_tableinfo { + uint32_t table_length; + NTBL **table; + char adapter_name[FED_ADAPTERNAME_LEN]; +} fed_tableinfo_t; + +#endif /* _FEDERATION_KEYS_INCLUDED */ diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c new file mode 100644 index 0000000000..5322cffe5b --- /dev/null +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -0,0 +1,674 @@ +/***************************************************************************** \ + * nrt.c - Library routines for initiating jobs using IBM's NRT (Network + * Routing Table) + ***************************************************************************** + * Copyright (C) 2004-2007 The Regents of the University of California. + * Copyright (C) 2008 Lawrence Livermore National Security. + * Portions Copyright (C) 2011 SchedMD LLC. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Jason King + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#include "slurm/slurm_errno.h" +#include "src/common/macros.h" +#include "src/common/slurm_xlator.h" +#include "src/plugins/switch/nrt/nrt.h" + +#define NRT_BUF_SIZE 4096 + +bool nrt_need_state_save = false; + +static void _spawn_state_save_thread(char *dir); +static int _switch_p_libstate_save(char * dir_name, bool free_flag); + +/* Type for error string table entries */ +typedef struct { + int xe_number; + char *xe_message; +} slurm_errtab_t; + +static slurm_errtab_t slurm_errtab[] = { + {0, "No error"}, + {-1, "Unspecified error"}, + + /* switch/nrt routine error codes */ + + { ESTATUS, + "Cannot get adapter status" }, + { EADAPTER, + "Open of adapter failed" }, + { ENOADAPTER, + "No adapters found" }, + { EBADMAGIC_NRT_NODEINFO, + "Bad magic in NRT nodeinfo" }, + { EBADMAGIC_NRT_JOBINFO, + "Bad magic in NRT jobinfo" }, + { EBADMAGIC_NRT_LIBSTATE, + "Bad magic in NRT libstate" }, + { EUNPACK, + "Error during unpack" }, + { EHOSTNAME, + "Cannot get hostname" }, + { ENOTSUPPORTED, + "This feature not currently supported" }, + { EVERSION, + "Header/library version mismatch" }, + { EWINDOW, + "Error allocating switch window" }, + { EUNLOAD, + "Error unloading switch window table" } +}; + +/* + * These variables are required by the generic plugin interface. If they + * are not found in the plugin, the plugin loader will ignore it. + * + * plugin_name - a string giving a human-readable description of the + * plugin. There is no maximum length, but the symbol must refer to + * a valid string. + * + * plugin_type - a string suggesting the type of the plugin or its + * applicability to a particular form of data or method of data handling. + * If the low-level plugin API is used, the contents of this string are + * unimportant and may be anything. SLURM uses the higher-level plugin + * interface which requires this string to be of the form + * + * / + * + * where is a description of the intended application of + * the plugin (e.g., "switch" for SLURM switch) and is a description + * of how this plugin satisfies that application. SLURM will only load + * a switch plugin if the plugin_type string has a prefix of "switch/". + * + * plugin_version - an unsigned 32-bit integer giving the version number + * of the plugin. If major and minor revisions are desired, the major + * version number may be multiplied by a suitable magnitude constant such + * as 100 or 1000. Various SLURM versions will likely require a certain + * minimum version for their plugins as this API matures. + */ +const char plugin_name[] = "switch NRT plugin"; +const char plugin_type[] = "switch/nrt"; +const uint32_t plugin_version = 100; + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init ( void ) +{ + verbose("%s loaded", plugin_name); + + return SLURM_SUCCESS; +} + +extern int fini ( void ) +{ + return nrt_fini(); +} + +extern int switch_p_slurmctld_init( void ) +{ + return nrt_slurmctld_init(); +} + +extern int switch_p_slurmd_init( void ) +{ + return nrt_slurmd_init(); +} + +extern int switch_p_slurmd_step_init( void ) +{ + return nrt_slurmd_step_init(); +} + +/* + * Switch functions for global state save + * NOTE: Clears current switch state as needed for backup + * controller to repeatedly assume control primary server + */ +extern int switch_p_libstate_save ( char * dir_name ) +{ + return _switch_p_libstate_save(dir_name, true); +} + +/* save and purge the libstate if free_flag is true */ +static int _switch_p_libstate_save ( char * dir_name, bool free_flag ) +{ + Buf buffer; + char *file_name; + int ret = SLURM_SUCCESS; + int state_fd; + + buffer = init_buf(NRT_LIBSTATE_LEN); + (void) nrt_libstate_save(buffer, free_flag); + file_name = xstrdup(dir_name); + xstrcat(file_name, "/nrt_state"); + (void) unlink(file_name); + state_fd = creat(file_name, 0600); + if (state_fd < 0) { + error("Can't save state, error creating file %s %m", + file_name); + ret = SLURM_ERROR; + } else { + char *buf = get_buf_data(buffer); + size_t len = get_buf_offset(buffer); + while (1) { + int wrote = write (state_fd, buf, len); + if ((wrote < 0) && (errno == EINTR)) + continue; + if (wrote == 0) + break; + if (wrote < 0) { + error("Can't save switch state: %m"); + ret = SLURM_ERROR; + break; + } + buf += wrote; + len -= wrote; + } + close(state_fd); + } + xfree(file_name); + + if (buffer) + free_buf(buffer); + + return ret; +} + + +/* + * Restore global nodeinfo from a file. + * + * NOTE: switch_p_libstate_restore is only called by slurmctld, and only + * once at start-up. We exploit this fact to spawn a pthread to + * periodically call _switch_p_libstate_save(). + */ +extern int switch_p_libstate_restore ( char * dir_name, bool recover ) +{ + char *data = NULL, *file_name; + Buf buffer = NULL; + int error_code = SLURM_SUCCESS; + int state_fd, data_allocated = 0, data_read = 0, data_size = 0; + + xassert(dir_name != NULL); + + _spawn_state_save_thread(xstrdup(dir_name)); + if (!recover) /* clean start, no recovery */ + return nrt_init(); + + file_name = xstrdup(dir_name); + xstrcat(file_name, "/nrt_state"); + state_fd = open (file_name, O_RDONLY); + if (state_fd >= 0) { + data_allocated = NRT_BUF_SIZE; + data = xmalloc(data_allocated); + while (1) { + data_read = read (state_fd, &data[data_size], + NRT_BUF_SIZE); + if ((data_read < 0) && (errno == EINTR)) + continue; + if (data_read < 0) { + error ("Read error on %s, %m", file_name); + error_code = SLURM_ERROR; + break; + } else if (data_read == 0) + break; + data_size += data_read; + data_allocated += data_read; + xrealloc(data, data_allocated); + } + close (state_fd); + xfree(file_name); + } else { + error("No %s file for switch/nrt state recovery", file_name); + error("Starting switch/nrt with clean state"); + xfree(file_name); + return nrt_init(); + } + + if (error_code == SLURM_SUCCESS) { + buffer = create_buf (data, data_size); + data = NULL; /* now in buffer, don't xfree() */ + if (nrt_libstate_restore(buffer) < 0) + error_code = SLURM_ERROR; + } + + if (buffer) + free_buf(buffer); + xfree(data); + + return error_code; +} + +extern int switch_p_libstate_clear(void) +{ + return nrt_libstate_clear(); +} + +/***************************************************************************** + * switch state monitoring functions + *****************************************************************************/ +/* NOTE: we assume that once the switch state is cleared, + * notification of this will be forwarded to slurmctld. We do not + * enforce that in this function. + */ +/* FIX ME! - should use adapter name from nrt.conf file now that + * we have that file support. + */ +#define ZERO 48 +extern int switch_p_clear_node_state(void) +{ + int i, j; + ADAPTER_RESOURCES res; + char name[] = "sniN"; + int err; + + for (i = 0; i < NRT_MAXADAPTERS; i++) { + name[3] = i + ZERO; + err = ntbl_adapter_resources(NRT_VERSION, name, &res); + if (err != NTBL_SUCCESS) + continue; + for (j = 0; j < res.window_count; j++) + ntbl_clean_window(NRT_VERSION, name, + ALWAYS_KILL, res.window_list[j]); + free(res.window_list); + } + + return SLURM_SUCCESS; +} + +extern int switch_p_alloc_node_info(switch_node_info_t **switch_node) +{ + return nrt_alloc_nodeinfo((nrt_nodeinfo_t **)switch_node); +} + +extern int switch_p_build_node_info(switch_node_info_t *switch_node) +{ + char hostname[256]; + char *tmp; + + if (gethostname(hostname, 256) < 0) + slurm_seterrno_ret(EHOSTNAME); + /* remove the domain portion, if necessary */ + tmp = strstr(hostname, "."); + if (tmp) + *tmp = '\0'; + return nrt_build_nodeinfo((nrt_nodeinfo_t *)switch_node, hostname); +} + +extern int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) +{ + return nrt_pack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); +} + +extern int switch_p_unpack_node_info(switch_node_info_t *switch_node, + Buf buffer) +{ + return nrt_unpack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); +} + +extern void switch_p_free_node_info(switch_node_info_t **switch_node) +{ + if (switch_node) + nrt_free_nodeinfo((nrt_nodeinfo_t *)*switch_node, false); +} + +extern char * switch_p_sprintf_node_info(switch_node_info_t *switch_node, + char *buf, size_t size) +{ + return nrt_print_nodeinfo((nrt_nodeinfo_t *)switch_node, buf, size); +} + +/* + * switch functions for job step specific credential + */ +extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) +{ + return nrt_alloc_jobinfo((nrt_jobinfo_t **)switch_job); +} + +static char *_adapter_name_check(char *network) +{ + regex_t re; + char *pattern = "(sni[[:digit:]])"; + size_t nmatch = 5; + regmatch_t pmatch[5]; + char *name; + + if (regcomp(&re, pattern, REG_EXTENDED) != 0) { + error("sockname regex compilation failed"); + return NULL; + } + memset(pmatch, 0, sizeof(regmatch_t)*nmatch); + if (regexec(&re, network, nmatch, pmatch, 0) == REG_NOMATCH) { + return NULL; + } + name = strndup(network + pmatch[1].rm_so, + (size_t)(pmatch[1].rm_eo - pmatch[1].rm_so)); + regfree(&re); + + return name; +} + +extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, + uint16_t *tasks_per_node, int cyclic_alloc, + char *network) +{ + hostlist_t list = NULL; + bool sn_all; + int i, err, nprocs = 0; + int bulk_xfer = 0; + char *adapter_name = NULL; + + debug3("network = \"%s\"", network); + if (strstr(network, "ip") || strstr(network, "IP")) { + debug2("NRT: \"ip\" found in network string, " + "no network tables allocated"); + return SLURM_SUCCESS; + } else { + if (strstr(network, "sn_all") || strstr(network, "SN_ALL")) { + debug3("Found sn_all in network string"); + sn_all = true; + } else if (strstr(network, "sn_single") || + strstr(network, "SN_SINGLE")) { + debug3("Found sn_single in network string"); + sn_all = false; + } else if ((adapter_name = _adapter_name_check(network))) { + debug3("Found adapter %s in network string", + adapter_name); + sn_all = false; + } else { + /* default to sn_all */ + sn_all = true; + } + + list = hostlist_create(nodelist); + if (!list) + fatal("hostlist_create(%s): %m", nodelist); + for (i = 0; i < hostlist_count(list); i++) + nprocs += tasks_per_node[i]; + + if (strstr(network, "bulk_xfer") + || strstr(network, "BULK_XFER")) + bulk_xfer = 1; + err = nrt_build_jobinfo((nrt_jobinfo_t *)switch_job, list, + nprocs, sn_all, adapter_name, + bulk_xfer); + hostlist_destroy(list); + if (adapter_name) + free(adapter_name); + + return err; + } +} + +extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) +{ + switch_jobinfo_t *j; + + j = (switch_jobinfo_t *)nrt_copy_jobinfo((nrt_jobinfo_t *)switch_job); + if (!j) + error("nrt_copy_jobinfo failed"); + + return j; +} + +extern void switch_p_free_jobinfo(switch_jobinfo_t *switch_job) +{ + return nrt_free_jobinfo((nrt_jobinfo_t *)switch_job); +} + +extern int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) +{ + return nrt_pack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); +} + +extern int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) +{ + return nrt_unpack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); +} + +extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, + void *resulting_data) +{ + return nrt_get_jobinfo((nrt_jobinfo_t *)switch_job, key, + resulting_data); +} + +static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) +{ + hostlist_t list = NULL; + int rc; + + list = hostlist_create(nodelist); + rc = nrt_job_step_complete((nrt_jobinfo_t *)jobinfo, list); + hostlist_destroy(list); + + return rc; +} + +extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) +{ + return _make_step_comp(jobinfo, nodelist); +} + +extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, + char *nodelist) +{ + return _make_step_comp(jobinfo, nodelist); +} + +extern bool switch_p_part_comp(void) +{ + return true; +} + +extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, char *nodelist) +{ + hostlist_t list = NULL; + int rc; + + list = hostlist_create(nodelist); + rc = nrt_job_step_allocated((nrt_jobinfo_t *)jobinfo, list); + hostlist_destroy(list); + + return rc; +} + +extern void switch_p_print_jobinfo(FILE *fp, switch_jobinfo_t *jobinfo) +{ + return; +} + +extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, + char *buf, size_t size) +{ + return NULL; +} + +/* + * switch functions for job initiation + */ +static int _ntbl_version_ok(void) +{ + return((ntbl_version() == NRT_VERSION) ? 1 : 0); +} + +int switch_p_node_init(void) +{ + /* check to make sure the version of the library we compiled with + * matches the one dynamically linked + */ + if (!_ntbl_version_ok()) { + slurm_seterrno_ret(EVERSION); + } + + return SLURM_SUCCESS; +} + +extern int switch_p_node_fini(void) +{ + return SLURM_SUCCESS; +} + +extern int switch_p_job_preinit(switch_jobinfo_t *jobinfo) +{ + return SLURM_SUCCESS; +} + +extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) +{ + pid_t pid; + + pid = getpid(); + return nrt_load_table((nrt_jobinfo_t *)jobinfo, uid, pid); +} + +extern int switch_p_job_fini (switch_jobinfo_t *jobinfo) +{ + return SLURM_SUCCESS; +} + +extern int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, + uint32_t job_id, uint32_t step_id) +{ + int err; + + /* + * Kill all processes in the job's session + */ + if (pgid) { + debug2("Sending SIGKILL to pgid %lu", + (unsigned long) pgid); + kill(-pgid, SIGKILL); + } else + debug("Job %u.%u: Bad pid valud %lu", job_id, + step_id, (unsigned long) pgid); + + err = nrt_unload_table((nrt_jobinfo_t *)jobinfo); + if (err != SLURM_SUCCESS) + return SLURM_ERROR; + + return SLURM_SUCCESS; +} + +extern int switch_p_job_attach(switch_jobinfo_t *jobinfo, char ***env, + uint32_t nodeid, uint32_t procid, + uint32_t nnodes, uint32_t nprocs, uint32_t rank) +{ +#if 0 + printf("nodeid = %u\n", nodeid); + printf("procid = %u\n", procid); + printf("nnodes = %u\n", nnodes); + printf("nprocs = %u\n", nprocs); + printf("rank = %u\n", rank); +#endif + return SLURM_SUCCESS; +} + +/* + * switch functions for other purposes + */ + +/* + * Linear search through table of errno values and strings, + * returns NULL on error, string on success. + */ +static char *_lookup_slurm_api_errtab(int errnum) +{ + char *res = NULL; + int i; + + for (i = 0; i < sizeof(slurm_errtab) / sizeof(slurm_errtab_t); i++) { + if (slurm_errtab[i].xe_number == errnum) { + res = slurm_errtab[i].xe_message; + break; + } + } + return res; +} + +extern int switch_p_get_errno(void) +{ + int err = slurm_get_errno(); + + if ((err >= ESLURM_SWITCH_MIN) && (err <= ESLURM_SWITCH_MAX)) + return err; + + return SLURM_SUCCESS; +} + +extern char *switch_p_strerror(int errnum) +{ + char *res = _lookup_slurm_api_errtab(errnum); + return (res ? res : strerror(errnum)); +} + + +static void *_state_save_thread(void *arg) +{ + char *dir_name = (char *)arg; + + while (1) { + sleep(300); + if (nrt_need_state_save) { + nrt_need_state_save = false; + _switch_p_libstate_save(dir_name, false); + } + } +} + +static void _spawn_state_save_thread(char *dir) +{ + pthread_attr_t attr; + pthread_t id; + + slurm_attr_init(&attr); + + if (pthread_create(&id, &attr, &_state_save_thread, (void *)dir) != 0) + error("Could not start switch/nrt state saving pthread"); + + slurm_attr_destroy(&attr); +} -- GitLab From 1576053b24b381c79c6f84b3c3f96fa71c030f9d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 08:52:35 -0800 Subject: [PATCH 002/614] Add switch/nrt plugin to main RPM --- slurm.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/slurm.spec b/slurm.spec index f788e1c653..b60d21e776 100644 --- a/slurm.spec +++ b/slurm.spec @@ -484,6 +484,8 @@ test -f $RPM_BUILD_ROOT/etc/init.d/slurm && echo /etc/init.d/slurm >> $LIST test -f $RPM_BUILD_ROOT/%{_bindir}/sview && echo %{_bindir}/sview >> $LIST +test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_nrt.so && + echo %{_libdir}/slurm/switch_nrt.so >> $LIST %if %{slurm_with aix} install -D -m644 etc/federation.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/federation.conf.example -- GitLab From b01ffb2fadb8b3ed09dd33e5210599f584aa1d71 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 10:13:58 -0800 Subject: [PATCH 003/614] NRT work Convert ntbl_adapter_resources() to nrt_adapter_resource() and ntbl_clean_window() to nrt_clean_window(). More functions remain and we need to determine adapter_type somehow --- src/plugins/switch/nrt/nrt.c | 85 ++++++++++++++++++++++++----- src/plugins/switch/nrt/nrt.h | 4 ++ src/plugins/switch/nrt/switch_nrt.c | 32 ++++++++--- 3 files changed, 99 insertions(+), 22 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c2aa3f8430..cf7bd3466c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -351,16 +351,24 @@ _fill_in_adapter_cache(void) { hostlist_iterator_t adapters; char *adapter_name = NULL; - ADAPTER_RESOURCES res; + uint16_t adapter_type; /* FIXME: How to fill in? */ + adap_resources_t res; int num; int rc; int i; adapters = hostlist_iterator_create(adapter_list); for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { - rc = ntbl_adapter_resources(NRT_VERSION, adapter_name, &res); - if (rc != NTBL_SUCCESS) + rc = nrt_adapter_resources(NRT_VERSION, adapter_name, + adapter_type, &res); + if (rc != NRT_SUCCESS) { + error("nrt_adapter_resources(%s, %hu): %s", + adapter_name, adapter_type, nrt_err_str(rc)); return SLURM_ERROR; + } +#if NRT_DEBUG + nrt_dump_adapter(adapter_name, adapter_type, &res); +#endif num = adapter_name[3] - (int)'0'; assert(num < NRT_MAXADAPTERS); @@ -2363,28 +2371,29 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) * Try up to "retry" times to unload a window. */ static int -_unload_window(char *adapter, unsigned short job_key, unsigned short window_id, - int retry) +_unload_window(char *adapter_name, uint16_t adapter_type, + unsigned short job_key, unsigned short window_id, int retry) { int i; int err; for (i = 0; i < retry; i++) { - err = ntbl_unload_window(NRT_VERSION, adapter, + if (i > 0) + sleep(1); + err = ntbl_unload_window(NRT_VERSION, adapter_name, job_key, window_id); if (err == NTBL_SUCCESS) return SLURM_SUCCESS; debug("Unable to unload window %hu adapter %s job_key %hu: %s", window_id, adapter, job_key, _lookup_nrt_status_tab(err)); - err = ntbl_clean_window(NRT_VERSION, adapter, - ALWAYS_KILL, window_id); - if (err == NTBL_SUCCESS) + err = nrt_clean_window(NRT_VERSION, adapter_name, + adapter_type, KILL, window_id); + if (err == NRT_SUCCESS) return SLURM_SUCCESS; - error("Unable to clean window %hu adapter %s job_key %hu: %s", - window_id, adapter, job_key, _lookup_nrt_status_tab(err)); - - sleep(1); + error("Unable to clean window for job_key %hd, " + "nrt_clean_window(%s, %u): %s", + job_key, adapter_name, adapter_type, nrt_err_str(err)); } return SLURM_FAILURE; @@ -2627,3 +2636,53 @@ nrt_libstate_clear(void) return SLURM_SUCCESS; } + +extern char *nrt_err_str(int rc) +{ + static char str[16]; + + switch (rc) { + case NRT_BAD_VERSION: + return "Bad version"; + case NRT_EADAPTER: + return "Invalid adapter name"; + case NRT_EADAPTYPE: + return "Invalid adapter type"; + case NRT_EINVAL: + return "Invalid input paramter"; + case NRT_EMEM: + return "Memory allocation error"; + case NRT_EPERM: + return "Permission denied, not root"; + case NRT_PNSDAPI: + return "Error communicating with Protocol Network Services " + "Daemon"; + case NRT_SUCCESS: + return "Success"; + case NRT_WRONG_WINDOW_STATE: + return "Wrong window state"; + } + + snprintf(str, sizeof(str), "%d", rc); + return str; +} + +extern void nrt_dump_adapter(char *adapter_name, uint16_t adapter_type, + adap_resources_t *adapter_res) +{ + int i; + + info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + info(" node_number:%u", adapter_res->node_number); + info(" num_spigots:%hu", adapter_res->num_spigots); + for (i = 0; i < MAX_SPIGOTS; i++) { + info(" lid[%d]:%hu", i, adapter_res->lid[i]); + info(" network_id[%d]:%u", i, adapter_res->network_id[i]); + info(" lmc[%d]:%hu", i, adapter_res->lmc[i]); + info(" spigot_id[%d]:%hu", i, adapter_res->spigot_id[i]); + } + info(" window_count:%hu", adapter_res->window_count); + for (i = 0; i < adapter_res->window_count; i++) + info(" window_list[%d]:%hu", i, adapter_res->window_list); + info(" rcontext_block_count:%u", adapter_res->rcontext_block_count); +} diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h index 557a04c470..260a015ac1 100644 --- a/src/plugins/switch/nrt/nrt.h +++ b/src/plugins/switch/nrt/nrt.h @@ -76,9 +76,13 @@ enum { EUNLOAD }; +#define NRT_DEBUG 1 /* Enable extra logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) +extern char *nrt_err_str(int rc); +extern void nrt_dump_adapter(char *adapter_name, uint16_t adapter_type, + adap_resources_t *adapter_res); extern int nrt_slurmctld_init(void); extern int nrt_slurmd_init(void); extern int nrt_slurmd_step_init(void); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 5322cffe5b..41da852197 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -294,25 +294,39 @@ extern int switch_p_libstate_clear(void) * notification of this will be forwarded to slurmctld. We do not * enforce that in this function. */ -/* FIX ME! - should use adapter name from nrt.conf file now that +/* FIXME! - should use adapter name from nrt.conf file now that * we have that file support. */ -#define ZERO 48 extern int switch_p_clear_node_state(void) { int i, j; - ADAPTER_RESOURCES res; + adap_resources_t res; char name[] = "sniN"; + uint16_t adapter_type; /* FIXME: How to fill in? */ int err; for (i = 0; i < NRT_MAXADAPTERS; i++) { - name[3] = i + ZERO; - err = ntbl_adapter_resources(NRT_VERSION, name, &res); - if (err != NTBL_SUCCESS) + name[3] = i + (int) '0'; + err = nrt_adapter_resources(NRT_VERSION, adapter_name, + adapter_type, &res); + if (err != NRT_SUCCESS) { + error("nrt_adapter_resources(%s, %hu): %s", + adapter_name, adapter_type, nrt_err_str(rc)); continue; - for (j = 0; j < res.window_count; j++) - ntbl_clean_window(NRT_VERSION, name, - ALWAYS_KILL, res.window_list[j]); + } +#if NRT_DEBUG + nrt_dump_adapter(adapter_name, adapter_type, &res); +#endif + for (j = 0; j < res.window_count; j++) { + err = nrt_clean_window(NRT_VERSION, adapter_name, + adapter_type, KILL, + res.window_list[j]); + if (err != NRT_SUCCESS) { + error("nrt_clean_window(%s, %hu): %s", + adapter_name, adapter_type, + nrt_err_str(rc)); + } + } free(res.window_list); } -- GitLab From bfdb40b31e0e85c4de87c776d860718ccc2f05a8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 11:23:28 -0800 Subject: [PATCH 004/614] More NRT logic Change ntbl_load_table_rdma() and ntbl_load_table() calls to nrt_load_table_rdma() and add logging --- src/plugins/switch/nrt/nrt.c | 80 +++++++++++++++++++------------ src/plugins/switch/nrt/nrt_keys.h | 8 ++-- 2 files changed, 53 insertions(+), 35 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index cf7bd3466c..16e47daa40 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2297,12 +2297,15 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) int i; int err; unsigned long long winmem; - char *adapter; + char *adapter_name; + uint16_t adapter_type; uint16_t network_id; + uint bulk_xfer_resources = 0; /* Unused by NRT today */ /* ADAPTER_RESOURCES res; */ int rc; #if NRT_DEBUG + int j; char buf[2000]; #endif assert(jp); @@ -2310,54 +2313,67 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) for (i = 0; i < jp->tables_per_task; i++) { #if NRT_DEBUG - _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); + _print_table(jp->tableinfo[i].table, + jp->tableinfo[i].table_length); printf("%s", nrt_sprint_jobinfo(jp, buf, 2000)); #endif - adapter = jp->tableinfo[i].adapter_name; + adapter_name = jp->tableinfo[i].adapter_name; + adapter_type = 0; /* FIXME: Load from where? */ network_id = _get_network_id_from_adapter(adapter); rc = _wait_for_all_windows(&jp->tableinfo[i]); if (rc != SLURM_SUCCESS) return rc; - if (adapter == NULL) + if (adapter_name == NULL) continue; - winmem = jp->window_memory; + winmem = jp->window_memory; /* FIXME: Unused by NRT? */ if (jp->bulk_xfer) { if (i == 0) { rc = _check_rdma_job_count(adapter); if (rc != SLURM_SUCCESS) return rc; } - - err = ntbl_load_table_rdma( - NRT_VERSION, - adapter, - network_id, - uid, - pid, - jp->job_key, - jp->job_desc, - jp->bulk_xfer, - 0, /* rcontext_blocks */ - jp->tableinfo[i].table_length, - jp->tableinfo[i].table); - } else { - err = ntbl_load_table( - NRT_VERSION, - adapter, - network_id, - uid, - pid, - jp->job_key, - jp->job_desc, - &winmem, - jp->tableinfo[i].table_length, - jp->tableinfo[i].table); } +#if NRT_DEBUG + info("attempting nrt_load_table_rdma:"); + info("adapter_name:%s adapter_type:%hu", adapter_name, + adapter_type); + info(" network_id:%u uid:%u pid:%u", network_id, + (uint32_t)uid, (uint32_t)pid); + info(" job_key:%hd job_desc:%s", jp->job_key, jp->job_desc); + info(" bulk_xfer:%u bulk_xfer_res:%u", jp->bulk_xfer, + bulk_xfer_resources); + for (j = 0; j < jp->tableinfo[i].table_length; j++) { + info(" task_id[%d]:%hu", j, + jp->tableinfo[i].table[j]->task_id); + info(" win_id[%d]:%hu", j, + jp->tableinfo[i].table[j]->win_id); + info(" node_number[%d]:%u", j, + jp->tableinfo[i].table[j]->node_number); + info(" device_name[%d]:%s", j, + jp->tableinfo[i].table[j]->device_name); + info(" base_lid[%d]:%hu", j, + jp->tableinfo[i].table[j]->base_lid); + info(" port_id[%d]:%hu", j, + jp->tableinfo[i].table[j]->port_id); + info(" lmc[%d]:%hu", j, + jp->tableinfo[i].table[j]->lmc); + info(" port_status[%d]:%hu", j, + jp->tableinfo[i].table[j]->port_status); + } +#endif + err = nrt_load_table_rdma(NRT_VERSION, + adapter_name, adapter_type, + network_id, uid, pid, + jp->job_key, jp->job_desc, + jp->bulk_xfer, + bulk_xfer_resources, + jp->tableinfo[i].table_length, + jp->tableinfo[i].table); if (err != NTBL_SUCCESS) { error("unable to load table: [%d] %s", - err, _lookup_nrt_status_tab(err)); + err, nrt_err_str(err)); return SLURM_ERROR; } } @@ -2642,6 +2658,8 @@ extern char *nrt_err_str(int rc) static char str[16]; switch (rc) { + case NRT_ALREADY_LOADED: + return "Already loaded"; case NRT_BAD_VERSION: return "Bad version"; case NRT_EADAPTER: diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 3553b2152c..9a6db3c879 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -37,8 +37,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ -#ifndef _FEDERATION_KEYS_INCLUDED -#define _FEDERATION_KEYS_INCLUDED +#ifndef _NRT_KEYS_INCLUDED +#define _NRT_KEYS_INCLUDED #define FED_ADAPTERNAME_LEN 5 @@ -54,8 +54,8 @@ enum { /* Information shared between slurm_ll_api and the slurm federation driver */ typedef struct fed_tableinfo { uint32_t table_length; - NTBL **table; + nrt_creator_ib_per_task_input_t **table; char adapter_name[FED_ADAPTERNAME_LEN]; } fed_tableinfo_t; -#endif /* _FEDERATION_KEYS_INCLUDED */ +#endif /* _NRT_KEYS_INCLUDED */ -- GitLab From 3d7d8d5680eeb96efc1180ed4427c72cd2a531f9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 11:36:04 -0800 Subject: [PATCH 005/614] More NRT support added Convert ntbl_rdma_jobs() to nrt_rdma_jobs() and add logging --- src/plugins/switch/nrt/nrt.c | 31 ++++++++++++++++------------- src/plugins/switch/nrt/switch_nrt.c | 1 + 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 16e47daa40..f68208911d 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -367,6 +367,7 @@ _fill_in_adapter_cache(void) return SLURM_ERROR; } #if NRT_DEBUG + info("nrt_adapter_resources():"); nrt_dump_adapter(adapter_name, adapter_type, &res); #endif @@ -2258,26 +2259,27 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) } static int -_check_rdma_job_count(char *adapter) +_check_rdma_job_count(char *adapter_name, uint16_t adapter_type) { - unsigned int job_count; - unsigned int *job_keys; - int rc, z; + uint16_t job_count; + uint16_t *job_keys; + int err, i; - rc = ntbl_rdma_jobs(NRT_VERSION, adapter, + err = nrt_rdma_jobs(NRT_VERSION, adapter_name,adapter_type &job_count, &job_keys); - if (rc != NTBL_SUCCESS) { - error("ntbl_rdma_jobs(): %d", rc); + if (err != NTBL_SUCCESS) { + error("ntbl_rdma_jobs(): %s", nrt_err_str(err)); return SLURM_ERROR; } - - debug3("Adapter %s, RDMA job_count = %u", - adapter, job_count); - for (z = 0; z < job_count; z++) - debug3(" job key = %u", job_keys[z]); +#if NRT_DEBUG + info("nrt_rdma_jobs:"); + info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + for (i = 0; i < job_count; i++) + info(" job_key[%d]:%hu", job_keys[i]); +#endif free(job_keys); if (job_count >= 4) { - error("RDMA job_count is too high: %u", job_count); + error("RDMA job_count is too high: %hu", job_count); return SLURM_ERROR; } @@ -2330,7 +2332,8 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) winmem = jp->window_memory; /* FIXME: Unused by NRT? */ if (jp->bulk_xfer) { if (i == 0) { - rc = _check_rdma_job_count(adapter); + rc = _check_rdma_job_count(adapter_name, + adapter_type); if (rc != SLURM_SUCCESS) return rc; } diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 41da852197..e14b4dde09 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -315,6 +315,7 @@ extern int switch_p_clear_node_state(void) continue; } #if NRT_DEBUG + info("nrt_adapter_resources():"); nrt_dump_adapter(adapter_name, adapter_type, &res); #endif for (j = 0; j < res.window_count; j++) { -- GitLab From 2cfef8ada1a1bba365915791e774fe94c095a38b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 12:17:41 -0800 Subject: [PATCH 006/614] Convert more NRT functions Convert ntbl_status_adapter() use to nrt_status_adapter() and ntbl_version() to nrt_version() and add logging --- src/plugins/switch/nrt/nrt.c | 36 ++++++++++++++++++++--------- src/plugins/switch/nrt/switch_nrt.c | 2 +- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f68208911d..747fd25240 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -443,21 +443,22 @@ _get_lid_from_adapter(char *adapter_name) } -static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name) +static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, + uint16_t adapter_type) { ADAPTER_RESOURCES res; - struct NTBL_STATUS *status = NULL; + nrt_status_t *status = NULL; struct NTBL_STATUS *old = NULL; nrt_window_t *tmp_winlist = NULL; - int win_count = 0, i; - int error_code; + uint16_t win_count = 0; + int err, i; info("adapter_name is %s", adapter_name); - error_code = ntbl_adapter_resources(NRT_VERSION, + err = ntbl_adapter_resources(NRT_VERSION, adapter_name, &res); - if (error_code != NTBL_SUCCESS) + if (err != NTBL_SUCCESS) return SLURM_ERROR; strncpy(nrt_adapter->name, adapter_name, @@ -473,13 +474,26 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name) nrt_adapter->window_count = res.window_count; free(res.window_list); _cache_lid(nrt_adapter); - error_code = ntbl_status_adapter(NRT_VERSION, - adapter_name, - &win_count, - &status); + err = nrt_status_adapter(NRT_VERSION, adapter_name, adapter_type, + &win_count, &status); umask(nrt_umask); - if (error_code) + if (err != NRT_SUCCESS) { + error("nrt_status_adapter(%s, %u): %s", adapter_name, + adapter_type, nrt_err_str(err)); slurm_seterrno_ret(ESTATUS); + } +#if NRT_DEBUG + info("nrt_status_adapter:"); + info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + for (i = 0; i < win_count; i++) { + info(" client_pid[%d]:%u", i, (uint32_t)status[i].client_pid); + info(" uid[%d]:%u", i, (uint32_t) status[i].uid); + info(" window_id[%d]:%hu", i, status[i].window_id); + info(" bulk_xfer[%d]:%hu", i, status[i].bulk_transfer); + info(" rcontext_blocks[%d]:%u", i, status[i].rcontext_blocks); + info(" state[%d]:%d", i, status[i].state); + } +#endif tmp_winlist = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * res.window_count); if (!tmp_winlist) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index e14b4dde09..da9b57af5c 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -548,7 +548,7 @@ extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, */ static int _ntbl_version_ok(void) { - return((ntbl_version() == NRT_VERSION) ? 1 : 0); + return((nrt_version() == NRT_VERSION) ? 1 : 0); } int switch_p_node_init(void) -- GitLab From b45fd59f60daa6212cea975f56f7bf17be8c0fd8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 12:37:47 -0800 Subject: [PATCH 007/614] convert more nrt work convert ntbl_unload_window() to nrt_unload_window() and fix some comments and logging --- src/plugins/switch/nrt/nrt.c | 27 ++++++++++++++------------- src/plugins/switch/nrt/switch_nrt.c | 4 ++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 747fd25240..4a280f6656 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -131,7 +131,7 @@ struct nrt_libstate { struct nrt_jobinfo { uint32_t magic; - /* version from ntbl_version() */ + /* version from nrt_version() */ /* adapter from lid in table */ /* network_id from lid in table */ /* uid from getuid() */ @@ -229,7 +229,7 @@ extern int nrt_slurmd_init(void) { /* - * This is a work-around for the ntbl_* functions calling umask(0) + * This is a work-around for the nrt_* functions calling umask(0) */ nrt_umask = umask(0077); umask(nrt_umask); @@ -247,7 +247,7 @@ extern int nrt_slurmd_step_init(void) { /* - * This is a work-around for the ntbl_* functions calling umask(0) + * This is a work-around for the nrt_* functions calling umask(0) */ nrt_umask = umask(0077); umask(nrt_umask); @@ -342,7 +342,7 @@ _init_adapter_cache(void) } } -/* Use ntbl_adapter_resources to cache information about local adapters. +/* Use nrt_adapter_resources to cache information about local adapters. * * Used by: slurmstepd */ @@ -458,7 +458,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, err = ntbl_adapter_resources(NRT_VERSION, adapter_name, &res); - if (err != NTBL_SUCCESS) + if (err != NRT_SUCCESS) return SLURM_ERROR; strncpy(nrt_adapter->name, adapter_name, @@ -2281,8 +2281,8 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) err = nrt_rdma_jobs(NRT_VERSION, adapter_name,adapter_type &job_count, &job_keys); - if (err != NTBL_SUCCESS) { - error("ntbl_rdma_jobs(): %s", nrt_err_str(err)); + if (err != NRT_SUCCESS) { + error("nrt_rdma_jobs(): %s", nrt_err_str(err)); return SLURM_ERROR; } #if NRT_DEBUG @@ -2388,7 +2388,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) bulk_xfer_resources, jp->tableinfo[i].table_length, jp->tableinfo[i].table); - if (err != NTBL_SUCCESS) { + if (err != NRT_SUCCESS) { error("unable to load table: [%d] %s", err, nrt_err_str(err)); return SLURM_ERROR; @@ -2413,12 +2413,13 @@ _unload_window(char *adapter_name, uint16_t adapter_type, for (i = 0; i < retry; i++) { if (i > 0) sleep(1); - err = ntbl_unload_window(NRT_VERSION, adapter_name, - job_key, window_id); - if (err == NTBL_SUCCESS) + err = nrt_unload_window(NRT_VERSION, adapter_name, + adapter_type, job_key, window_id); + if (err == NRT_SUCCESS) return SLURM_SUCCESS; - debug("Unable to unload window %hu adapter %s job_key %hu: %s", - window_id, adapter, job_key, _lookup_nrt_status_tab(err)); + debug("Unable to unload window for job_key %hd, " + "nrt_unload_window(%s, %u): %s", + job_key, adapter_name, adapter_type, nrt_err_str(err)); err = nrt_clean_window(NRT_VERSION, adapter_name, adapter_type, KILL, window_id); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index da9b57af5c..fca88c4684 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -546,7 +546,7 @@ extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, /* * switch functions for job initiation */ -static int _ntbl_version_ok(void) +static int _nrt_version_ok(void) { return((nrt_version() == NRT_VERSION) ? 1 : 0); } @@ -556,7 +556,7 @@ int switch_p_node_init(void) /* check to make sure the version of the library we compiled with * matches the one dynamically linked */ - if (!_ntbl_version_ok()) { + if (!_nrt_version_ok()) { slurm_seterrno_ret(EVERSION); } -- GitLab From 730e4bbd4d7d29b49362123e7a4701060264132b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Jan 2012 13:48:46 -0800 Subject: [PATCH 008/614] More NRT conversion work Change one more ntbl_adapter_resources() to nrt_adapter_resources() Change ntbl_query_window() to nrt_status_adapter() add more logging --- src/plugins/switch/nrt/nrt.c | 76 ++++++++++++++++++----------- src/plugins/switch/nrt/switch_nrt.c | 6 +-- 2 files changed, 51 insertions(+), 31 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4a280f6656..170c707778 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -4,7 +4,7 @@ ***************************************************************************** * Copyright (C) 2004-2007 The Regents of the University of California. * Copyright (C) 2008 Lawrence Livermore National Security. - * Portions Copyright (C) 2011 SchedMD LLC. + * Portions Copyright (C) 2011-2012 SchedMD LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Jason King * CODE-OCEC-09-009. All rights reserved. @@ -446,23 +446,26 @@ _get_lid_from_adapter(char *adapter_name) static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, uint16_t adapter_type) { - ADAPTER_RESOURCES res; + adap_resoures_t res; nrt_status_t *status = NULL; struct NTBL_STATUS *old = NULL; nrt_window_t *tmp_winlist = NULL; uint16_t win_count = 0; int err, i; - info("adapter_name is %s", adapter_name); - - err = ntbl_adapter_resources(NRT_VERSION, - adapter_name, - &res); - if (err != NRT_SUCCESS) + err = nrt_adapter_resources(NRT_VERSION, adapter_name, adapter_type, + &res); + if (err != NRT_SUCCESS) { + error("nrt_adapter_resources(%s, %hu): %s", + adapter_name, adapter_type, nrt_err_str(rc)); return SLURM_ERROR; - strncpy(nrt_adapter->name, - adapter_name, - NRT_ADAPTERNAME_LEN); + } +#if NRT_DEBUG + info("nrt_adapter_resources():"); + nrt_dump_adapter(adapter_name, adapter_type, &res); +#endif + + strncpy(nrt_adapter->name, adapter_name, NRT_ADAPTERNAME_LEN); nrt_adapter->lid = res.lid; nrt_adapter->network_id = res.network_id; /* FUTURE: check that we don't lose information when converting @@ -496,8 +499,6 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, #endif tmp_winlist = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * res.window_count); - if (!tmp_winlist) - slurm_seterrno_ret(ENOMEM); for (i = 0; i < res.window_count; i++) { tmp_winlist[i].id = status->window_id; tmp_winlist[i].status = status->rc; @@ -506,6 +507,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, free(old); } nrt_adapter->window_list = tmp_winlist; + return SLURM_SUCCESS; } @@ -2210,26 +2212,44 @@ nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) * Used by: slurmd */ static int -_wait_for_window_unloaded(char *adapter_name, unsigned short window_id, - int retry) +_wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, + unsigned short window_id, int retry) { - int status; - int i; + int err, i; + uint16_t win_count; + nrt_status_t *status; for (i = 0; i < retry; i++) { - ntbl_query_window(NRT_VERSION, adapter_name, - window_id, &status); - if (status == NTBL_UNLOADED_STATE) - break; - debug2("Window %hu adapter %s is in use, sleeping 1 second", - window_id, adapter_name); - sleep(1); + if (i > 0) + sleep(1); + err = nrt_status_adapter(NRT_VERSION, adapter_name, + adapter_type, &win_count, &status); + if (err != NRT_SUCCESS) { + error("nrt_status_adapter(%s, %u): %s", adapter_name, + adapter_type, nrt_err_str(err)); + return SLURM_ERROR; + } + for (j = 0; j < win_count; j++) { + if (status[j]->window_id == window_id) + break; + } + if (j >= win_count) { + error("nrt_status_adapter(%s, %u), window %hu not " + "found", adapter_name, adapter_type, window_id); + free(status); + return SLURM_ERROR; + } + if (status[j]->state == NRT_WIN_AVAILBLE) + free(status); + return SLURM_SUCCESS; + } + debug2("nrt_status_adapter(%s, %u), window %hu state %d" + adapter_name, adapter_type, window_id, + status[j]->state); + free(status); } - if (status != NTBL_UNLOADED_STATE) - return SLURM_ERROR; - - return SLURM_SUCCESS; + return SLURM_ERROR; } diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index fca88c4684..f4b17067a4 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -4,7 +4,7 @@ ***************************************************************************** * Copyright (C) 2004-2007 The Regents of the University of California. * Copyright (C) 2008 Lawrence Livermore National Security. - * Portions Copyright (C) 2011 SchedMD LLC. + * Portions Copyright (C) 2011-2012 SchedMD LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Jason King * CODE-OCEC-09-009. All rights reserved. @@ -301,14 +301,14 @@ extern int switch_p_clear_node_state(void) { int i, j; adap_resources_t res; - char name[] = "sniN"; + char *name = "sniN"; uint16_t adapter_type; /* FIXME: How to fill in? */ int err; for (i = 0; i < NRT_MAXADAPTERS; i++) { name[3] = i + (int) '0'; err = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type, &res); + adapter_type, &res); if (err != NRT_SUCCESS) { error("nrt_adapter_resources(%s, %hu): %s", adapter_name, adapter_type, nrt_err_str(rc)); -- GitLab From 33b507d08acc352eeac2e26b4020a5fb9d1f5d88 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 08:15:28 -0800 Subject: [PATCH 009/614] Remove unused variables and function from NRT plugin --- src/plugins/switch/nrt/nrt.c | 164 +---------------------------------- 1 file changed, 2 insertions(+), 162 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 170c707778..b094648e7f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -104,9 +104,6 @@ typedef struct nrt_adapter { char name[NRT_ADAPTERNAME_LEN]; uint16_t lid; uint16_t network_id; - uint32_t max_winmem; - uint32_t min_winmem; - uint32_t avail_mem; uint32_t window_count; nrt_window_t *window_list; } nrt_adapter_t; @@ -138,7 +135,6 @@ struct nrt_jobinfo { /* pid from getpid() */ uint16_t job_key; char job_desc[DESCLEN]; - uint32_t window_memory; uint8_t bulk_xfer; /* flag */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -169,26 +165,6 @@ hostlist_t adapter_list; static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; -#define NRT_STATUS_UNKNOWN 99 -static nrt_status_t nrt_status_tab[]= { - {0, "NTBL_SUCCESS"}, - {1, "NTBL_EINVAL"}, - {2, "NTBL_EPERM"}, - {3, "NTBL_EIOCTL"}, - {4, "NTBL_EADAPTER"}, - {5, "NTBL_ESYSTEM"}, - {6, "NTBL_EMEM"}, - {7, "NTBL_ELID"}, - {8, "NTBL_EIO"}, - {9, "NTBL_UNLOADED_STATE"}, - {10, "NTBL_LOADED_STATE"}, - {11, "NTBL_DISABLED_STATE"}, - {12, "NTBL_ACTIVE_STATE"}, - {13, "NTBL_BUSY_STATE"}, - {14, "NTBL_NO_RDMA_AVAIL"}, - {NRT_STATUS_UNKNOWN, "UNKNOWN_RESULT_CODE"} -}; - static void _hash_rebuild(nrt_libstate_t *state); static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name); static int _parse_nrt_file(hostlist_t *adapter_list); @@ -264,25 +240,6 @@ nrt_slurmd_step_init(void) return SLURM_SUCCESS; } -static char * -_lookup_nrt_status_tab(int status) -{ - char *res = NULL; - int i; - - for (i = 0; i < sizeof(nrt_status_tab) / sizeof(nrt_status_t); i++) { - if (nrt_status_tab[i].status_number == status) { - res = nrt_status_tab[i].status_msg; - break; - } - } - - if (!res) - res = nrt_status_tab[NRT_STATUS_UNKNOWN].status_msg; - - return res; -} - /* Used by: slurmd, slurmctld */ extern void nrt_print_jobinfo(FILE *fp, nrt_jobinfo_t *jobinfo) { @@ -306,12 +263,10 @@ extern char *nrt_sprint_jobinfo(nrt_jobinfo_t *j, char *buf, size_t size) "--Begin Jobinfo--\n" " job_key: %u\n" " job_desc: %s\n" - " window_memory: %u\n" " table_size: %u\n" "--End Jobinfo--\n", j->job_key, j->job_desc, - j->window_memory, j->tables_per_task); if (count < 0) return buf; @@ -468,12 +423,6 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, strncpy(nrt_adapter->name, adapter_name, NRT_ADAPTERNAME_LEN); nrt_adapter->lid = res.lid; nrt_adapter->network_id = res.network_id; - /* FUTURE: check that we don't lose information when converting - * from 64 to 32 bit unsigned ints in the next three assignments. - */ - nrt_adapter->max_winmem = res.max_window_memory; - nrt_adapter->min_winmem = res.min_window_memory; - nrt_adapter->avail_mem = res.avail_adapter_memory; nrt_adapter->window_count = res.window_count; free(res.window_list); _cache_lid(nrt_adapter); @@ -606,7 +555,6 @@ nrt_alloc_jobinfo(nrt_jobinfo_t **j) slurm_seterrno_ret(ENOMEM); new->magic = NRT_JOBINFO_MAGIC; new->job_key = -1; - new->window_memory = 0; new->tables_per_task = 0; new->tableinfo = NULL; *j = new; @@ -681,9 +629,6 @@ _print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) " device_type = %x\n" " lid = %d\n" " network_id = %d\n" - " max_window_memory = %lld\n" - " min_window_memory = %lld\n" - " avail_adapter_memory = %lld\n" " fifo_slot_size = %lld\n" " window_count = %d\n" " window_list = %d\n" @@ -696,9 +641,6 @@ _print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) r->device_type, r->lid, r->network_id, - r->max_window_memory, - r->min_window_memory, - r->avail_adapter_memory, r->fifo_slot_size, r->window_count, r->window_list[0], @@ -711,81 +653,6 @@ _print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) return count; } -static int -_print_window_status(struct NTBL_STATUS *s, char *buf, size_t size) -{ - int count; - - assert(s); - assert(buf); - assert(size > 0); - - switch(s->rc) { - case NTBL_UNLOADED_STATE: - count = snprintf(buf, size, -#if NRT_VERBOSE_PRINT - "--Begin NTBL Status For Window %d on %s--\n" - " window_id = %u\n" - " adapter = %s\n" - " return code = %s\n" - "--End NTBL Status For Window %d on %s--\n", - s->window_id, s->adapter, - s->window_id, - s->adapter, - _lookup_nrt_status_tab(s->rc), - s->window_id, s->adapter); -#else - "window %u on %s: %s\n", - s->window_id, s->adapter, - _lookup_nrt_status_tab(s->rc)); -#endif - break; - case NTBL_LOADED_STATE: - case NTBL_DISABLED_STATE: - case NTBL_ACTIVE_STATE: - case NTBL_BUSY_STATE: - count = snprintf(buf, size, -#if NRT_VERBOSE_PRINT - "--Begin NTBL Status For Window %d on %s--\n" - " user_name = %s\n" - " client_pid = %d\n" - " uid = %d\n" - " window_id = %u\n" - " adapter = %s\n" - " memory_requested = %llu\n" - " memory_allocated = %llu\n" - " time_loaded = %s\n" - " description = %s\n" - " return code = %s\n" - "--End NTBL Status For Window %d on %s--\n", - s->window_id, s->adapter, - s->user_name, - s->client_pid, - s->uid, - s->window_id, - s->adapter, - s->memory_requested, - s->memory_allocated, - s->time_loaded, - s->description, - _lookup_nrt_status_tab(s->rc), - s->window_id, s->adapter); -#else - "window %u on %s: %s\n", - s->window_id, s->adapter, - _lookup_nrt_status_tab(s->rc)); -#endif - break; - default: - count = snprintf(buf, size, - "Uknown NTBL Return Code For Window %d: %s\n", - s->window_id, - _lookup_nrt_status_tab(s->rc)); - } - - return count; -} -#endif static int _print_window_struct(nrt_window_t *w, char *buf, size_t size) { @@ -799,7 +666,7 @@ _print_window_struct(nrt_window_t *w, char *buf, size_t size) count = snprintf(buf, size, " Window %u: %s\n", w->id, - _lookup_nrt_status_tab(w->status)); + nrt_err_str(w->status)); return count; } @@ -842,16 +709,10 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) " Adapter: %s\n" " lid: %u\n" " network_id: %u\n" - " max_window_memory: %u\n" - " min_window_memory: %u\n" - " avail_adapter_memory: %u\n" " window_count: %u\n", a->name, a->lid, a->network_id, - a->max_winmem, - a->min_winmem, - a->avail_mem, a->window_count); #else " Adapter: %s\n" @@ -891,14 +752,7 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) return buf; } -/* Note that when collecting max_winmem, min_winmem and avail_mem - * we convert these values from 64 to 32 bit unisgned integers. This - * was to make the pack/unpack implementation easier. I am taking a - * chance here that IBM will not release NRT adapters with more - * than 4GB of memory. - * - * Used by: all - */ +/* Used by: all */ extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) { @@ -919,9 +773,6 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) packmem(a->name, NRT_ADAPTERNAME_LEN, buf); pack16(a->lid, buf); pack16(a->network_id, buf); - pack32(a->max_winmem, buf); - pack32(a->min_winmem, buf); - pack32(a->avail_mem, buf); pack32(a->window_count, buf); for (j = 0; j < a->window_count; j++) { pack16(a->window_list[j].id, buf); @@ -954,9 +805,6 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) strncpy(da->name, sa->name, NRT_ADAPTERNAME_LEN); da->lid = sa->lid; da->network_id = sa->network_id; - da->max_winmem = sa->max_winmem; - da->min_winmem = sa->min_winmem; - da->avail_mem = sa->avail_mem; da->window_count = sa->window_count; da->window_list = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * da->window_count); @@ -1268,9 +1116,6 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) memcpy(tmp_a->name, name_ptr, size); safe_unpack16(&tmp_a->lid, buf); safe_unpack16(&tmp_a->network_id, buf); - safe_unpack32(&tmp_a->max_winmem, buf); - safe_unpack32(&tmp_a->min_winmem, buf); - safe_unpack32(&tmp_a->avail_mem, buf); safe_unpack32(&tmp_a->window_count, buf); tmp_w = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * tmp_a->window_count); @@ -1861,7 +1706,6 @@ nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, jp->job_key = _next_key(); snprintf(jp->job_desc, DESCLEN, "slurm switch/NRT driver key=%d", jp->job_key); - jp->window_memory = NRT_AUTO_WINMEM; hi = hostlist_iterator_create(hl); @@ -1978,7 +1822,6 @@ nrt_pack_jobinfo(nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack16(j->job_key, buf); packmem(j->job_desc, DESCLEN, buf); - pack32(j->window_memory, buf); pack8(j->bulk_xfer, buf); pack16(j->tables_per_task, buf); for (i = 0; i < j->tables_per_task; i++) { @@ -2034,7 +1877,6 @@ nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) safe_unpackmem(j->job_desc, &size, buf); if (size != DESCLEN) goto unpack_error; - safe_unpack32(&j->window_memory, buf); safe_unpack8(&j->bulk_xfer, buf); safe_unpack16(&j->tables_per_task, buf); @@ -2332,7 +2174,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) { int i; int err; - unsigned long long winmem; char *adapter_name; uint16_t adapter_type; uint16_t network_id; @@ -2363,7 +2204,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) if (adapter_name == NULL) continue; - winmem = jp->window_memory; /* FIXME: Unused by NRT? */ if (jp->bulk_xfer) { if (i == 0) { rc = _check_rdma_job_count(adapter_name, -- GitLab From 0a50e659ea57060c619c3be206c7e01856717115 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 11:34:17 -0800 Subject: [PATCH 010/614] NRT conversion work change lid and network_id into arrays and correct field sizes --- src/plugins/switch/nrt/nrt.c | 156 ++++++++++++++++++------------ src/plugins/switch/nrt/nrt_keys.h | 20 ++-- 2 files changed, 102 insertions(+), 74 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b094648e7f..2b6ead6fc9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -102,9 +102,9 @@ typedef struct nrt_window { typedef struct nrt_adapter { char name[NRT_ADAPTERNAME_LEN]; - uint16_t lid; - uint16_t network_id; - uint32_t window_count; + uint16_t lid[MAX_SPIGOTS]; + uint64_t network_id[MAX_SPIGOTS]; + uint16_t window_count; nrt_window_t *window_list; } nrt_adapter_t; @@ -150,8 +150,8 @@ typedef struct { typedef struct { char name[NRT_ADAPTERNAME_LEN]; - uint16_t lid; - uint16_t network_id; + uint16_t lid[MAX_SPIGOTS]; + uint64_t network_id[MAX_SPIGOTS]; } nrt_cache_entry_t; /* @@ -165,11 +165,11 @@ hostlist_t adapter_list; static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; +static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); -static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name); -static int _parse_nrt_file(hostlist_t *adapter_list); static void _init_adapter_cache(void); -static int _fill_in_adapter_cache(void); +static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name); +static int _parse_nrt_file(hostlist_t *adapter_list); /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library @@ -288,12 +288,14 @@ extern char *nrt_sprint_jobinfo(nrt_jobinfo_t *j, char *buf, size_t size) static void _init_adapter_cache(void) { - int i; + int i, j; for (i = 0; i < NRT_MAXADAPTERS; i++) { lid_cache[i].name[0] = 0; - lid_cache[i].lid = -1; - lid_cache[i].network_id = -1; + for (j = 0; j < MAX_SPIGOTS; j++) { + lid_cache[i].lid[j] = (uint16_t) -1; + lid_cache[i].network_id[j] = (uint64_t) -1; + } } } @@ -310,7 +312,7 @@ _fill_in_adapter_cache(void) adap_resources_t res; int num; int rc; - int i; + int i, j; adapters = hostlist_iterator_create(adapter_list); for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { @@ -328,9 +330,12 @@ _fill_in_adapter_cache(void) num = adapter_name[3] - (int)'0'; assert(num < NRT_MAXADAPTERS); - lid_cache[num].lid = res.lid; - lid_cache[num].network_id = res.network_id; - strncpy(lid_cache[num].name, adapter_name, NRT_ADAPTERNAME_LEN); + for (j = 0; j < MAX_SPIGOTS; j++) { + lid_cache[num].lid[j] = res.lid[j]; + lid_cache[num].network_id[j] = res.network_id[j]; + } + strncpy(lid_cache[num].name, adapter_name, + NRT_ADAPTERNAME_LEN); free(res.window_list); free(adapter_name); @@ -350,12 +355,15 @@ _fill_in_adapter_cache(void) static void _cache_lid(nrt_adapter_t *ap) { + int j; assert(ap); int adapter_num = ap->name[3] - (int) '0'; - lid_cache[adapter_num].lid = ap->lid; - lid_cache[adapter_num].network_id = ap->network_id; + for (j = 0; j < MAX_SPIGOTS; j++) { + lid_cache[adapter_num].lid[j] = ap->lid[j]; + lid_cache[adapter_num].network_id[j] = ap->network_id[j]; + } strncpy(lid_cache[adapter_num].name, ap->name, NRT_ADAPTERNAME_LEN); } @@ -364,15 +372,17 @@ _cache_lid(nrt_adapter_t *ap) * * Used by: slurmd */ -static uint16_t +static uint64_t _get_network_id_from_adapter(char *adapter_name) { int i; for (i = 0; i < NRT_MAXADAPTERS; i++) { if (!strncmp(adapter_name, lid_cache[i].name, - NRT_ADAPTERNAME_LEN)) - return lid_cache[i].network_id; + NRT_ADAPTERNAME_LEN)) { +/* FIXME: Return which spigot's network_id? */ + return lid_cache[i].network_id[0]; + } } return (uint16_t) -1; @@ -390,8 +400,10 @@ _get_lid_from_adapter(char *adapter_name) for (i = 0; i < NRT_MAXADAPTERS; i++) { if (!strncmp(adapter_name, lid_cache[i].name, - NRT_ADAPTERNAME_LEN)) - return lid_cache[i].lid; + NRT_ADAPTERNAME_LEN)) { +/* FIXME: Return which spigot's lid? */ + return lid_cache[i].lid[0]; + } } return (uint16_t) -1; @@ -406,7 +418,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, struct NTBL_STATUS *old = NULL; nrt_window_t *tmp_winlist = NULL; uint16_t win_count = 0; - int err, i; + int err, i, j; err = nrt_adapter_resources(NRT_VERSION, adapter_name, adapter_type, &res); @@ -421,8 +433,10 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, #endif strncpy(nrt_adapter->name, adapter_name, NRT_ADAPTERNAME_LEN); - nrt_adapter->lid = res.lid; - nrt_adapter->network_id = res.network_id; + for (j = 0; j < MAX_SPIGOTS; j++) { + nrt_adapter->lid[j] = res.lid[j]; + nrt_adapter->network_id[j] = res.network_id[j]; + } nrt_adapter->window_count = res.window_count; free(res.window_list); _cache_lid(nrt_adapter); @@ -627,11 +641,11 @@ _print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) count = snprintf(buf, size, "--Begin Adapter Resources--\n" " device_type = %x\n" - " lid = %d\n" - " network_id = %d\n" + " lid[0] = %hu\n" + " network_id[0] = %u\n" " fifo_slot_size = %lld\n" - " window_count = %d\n" - " window_list = %d\n" + " window_count = %hu\n" + " window_list[0] = %hu\n" #if NRT_VERSION == 120 " reserved = %lld\n" #else @@ -639,8 +653,8 @@ _print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) #endif "--End Adapter Resources--\n", r->device_type, - r->lid, - r->network_id, + r->lid[0], + r->network_id[0], r->fifo_slot_size, r->window_count, r->window_list[0], @@ -707,16 +721,16 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) count = snprintf(tmp, remaining, #if NRT_VERBOSE_PRINT " Adapter: %s\n" - " lid: %u\n" - " network_id: %u\n" - " window_count: %u\n", + " lid[0]: %hu\n" + " network_id[0]: %u\n" + " window_count: %hu\n", a->name, - a->lid, - a->network_id, + a->lid[0], + a->network_id[0], a->window_count); #else " Adapter: %s\n" - " Window count: %d\n" + " Window count: %hu\n" " Active windows:\n", a->name, a->window_count); @@ -756,7 +770,7 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) { - int i,j; + int i, j; nrt_adapter_t *a; int offset; @@ -771,9 +785,11 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; packmem(a->name, NRT_ADAPTERNAME_LEN, buf); - pack16(a->lid, buf); - pack16(a->network_id, buf); - pack32(a->window_count, buf); + for (j = 0; j < MAX_SPIGOTS; j++) { + pack16(a->lid[j], buf); + pack64(a->network_id[j], buf); + } + pack16(a->window_count, buf); for (j = 0; j < a->window_count; j++) { pack16(a->window_list[j].id, buf); pack32(a->window_list[j].status, buf); @@ -788,7 +804,7 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) static int _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) { - int i,j; + int i, j; nrt_adapter_t *sa = NULL; nrt_adapter_t *da = NULL; @@ -803,11 +819,13 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) sa = src->adapter_list + i; da = dest->adapter_list +i; strncpy(da->name, sa->name, NRT_ADAPTERNAME_LEN); - da->lid = sa->lid; - da->network_id = sa->network_id; + for (j = 0; j < MAX_SPIGOTS; j++) { + da->lid[j] = sa->lid[j]; + da->network_id[j] = sa->network_id[j]; + } da->window_count = sa->window_count; da->window_list = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * - da->window_count); + da->window_count); if (!da->window_list) { slurm_seterrno_ret(ENOMEM); } @@ -1001,7 +1019,8 @@ static int _fake_unpack_adapters(Buf buf) { uint32_t adapter_count; - uint32_t window_count; + uint16_t window_count; + uint64_t dummy64; uint32_t dummy32; uint16_t dummy16; char *dummyptr; @@ -1013,12 +1032,11 @@ _fake_unpack_adapters(Buf buf) safe_unpackmem_ptr(&dummyptr, &dummy32, buf); if (dummy32 != NRT_ADAPTERNAME_LEN) goto unpack_error; - safe_unpack16(&dummy16, buf); - safe_unpack16(&dummy16, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&window_count, buf); + for (j = 0; j < MAX_SPIGOTS; j++) { + safe_unpack16(&dummy16, buf); + safe_unpack64(&dummy64, buf); + } + safe_unpack16(&window_count, buf); for (j = 0; j < window_count; j++) { safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); @@ -1114,9 +1132,11 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) if (size != NRT_ADAPTERNAME_LEN) goto unpack_error; memcpy(tmp_a->name, name_ptr, size); - safe_unpack16(&tmp_a->lid, buf); - safe_unpack16(&tmp_a->network_id, buf); - safe_unpack32(&tmp_a->window_count, buf); + for (j = 0; j < MAX_SPIGOTS; j++) { + safe_unpack16(&tmp_a->lid[j], buf); + safe_unpack64(&tmp_a->network_id[j], buf); + } + safe_unpack16(&tmp_a->window_count, buf); tmp_w = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * tmp_a->window_count); if (!tmp_w) @@ -1803,8 +1823,8 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack32(tableinfo->table_length, buf); for (i = 0; i < tableinfo->table_length; i++) { pack16(tableinfo->table[i]->task_id, buf); - pack16(tableinfo->table[i]->lid, buf); - pack16(tableinfo->table[i]->window_id, buf); + pack16(tableinfo->table[i]->base_lid, buf); + pack16(tableinfo->table[i]->win_id, buf); } packmem(tableinfo->adapter_name, NRT_ADAPTERNAME_LEN, buf); } @@ -1846,8 +1866,8 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) tableinfo->table[i] = (NTBL *) xmalloc(sizeof(NTBL)); safe_unpack16(&tableinfo->table[i]->task_id, buf); - safe_unpack16(&tableinfo->table[i]->lid, buf); - safe_unpack16(&tableinfo->table[i]->window_id, buf); + safe_unpack16(&tableinfo->table[i]->base_lid, buf); + safe_unpack16(&tableinfo->table[i]->win_id, buf); } safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != NRT_ADAPTERNAME_LEN) @@ -1882,8 +1902,6 @@ nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); - if (!j->tableinfo) - slurm_seterrno_ret(ENOMEM); for (i = 0; i < j->tables_per_task; i++) { if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) goto unpack_error; @@ -1895,7 +1913,7 @@ unpack_error: error("nrt_unpack_jobinfo error"); if (j->tableinfo) { for (i = 0; i < j->tables_per_task; i++) { - for (k=0; ktableinfo[i].table_length; k++) + for (k = 0; k < j->tableinfo[i].table_length; k++) xfree(j->tableinfo[i].table[k]); xfree(j->tableinfo[i].table); } @@ -2176,7 +2194,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) int err; char *adapter_name; uint16_t adapter_type; - uint16_t network_id; + uint64_t network_id; uint bulk_xfer_resources = 0; /* Unused by NRT today */ /* ADAPTER_RESOURCES res; */ int rc; @@ -2396,7 +2414,7 @@ _free_libstate(nrt_libstate_t *lp) xfree(lp); } -int +extern int nrt_fini(void) { xfree(nrt_conf); @@ -2544,17 +2562,27 @@ extern char *nrt_err_str(int rc) return "Invalid adapter name"; case NRT_EADAPTYPE: return "Invalid adapter type"; + case NRT_EAGAIN: + return "Try call again later"; case NRT_EINVAL: return "Invalid input paramter"; + case NRT_EIO: + return "Adapter reported a DOWN state"; case NRT_EMEM: return "Memory allocation error"; case NRT_EPERM: return "Permission denied, not root"; + case NRT_ESYSTEM: + return "A system error occured"; + case NRT_NO_RDMA_AVAIL: + return "No RDMA windows available"; case NRT_PNSDAPI: return "Error communicating with Protocol Network Services " "Daemon"; case NRT_SUCCESS: return "Success"; + case NRT_UNKNOWN_ADAPTER: + return "Unknown adaper"; case NRT_WRONG_WINDOW_STATE: return "Wrong window state"; } diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 9a6db3c879..0ac08cdc35 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -1,5 +1,5 @@ /*****************************************************************************\ - ** federation_keys.h - Key definitions used by the get_jobinfo functions + ** nrt_keys.h - Key definitions used by the get_jobinfo functions ** $Id$ ***************************************************************************** * Copyright (C) 2004 The Regents of the University of California. @@ -40,22 +40,22 @@ #ifndef _NRT_KEYS_INCLUDED #define _NRT_KEYS_INCLUDED -#define FED_ADAPTERNAME_LEN 5 +#define NRT_ADAPTERNAME_LEN 5 enum { /* Federation specific get_jobinfo keys */ - FED_JOBINFO_TABLEINFO, - FED_JOBINFO_TABLESPERTASK, - FED_JOBINFO_KEY, - FED_JOBINFO_PROTOCOL, - FED_JOBINFO_MODE + NRT_JOBINFO_TABLEINFO, + NRT_JOBINFO_TABLESPERTASK, + NRT_JOBINFO_KEY, + NRT_JOBINFO_PROTOCOL, + NRT_JOBINFO_MODE }; /* Information shared between slurm_ll_api and the slurm federation driver */ -typedef struct fed_tableinfo { +typedef struct nrt_tableinfo { uint32_t table_length; nrt_creator_ib_per_task_input_t **table; - char adapter_name[FED_ADAPTERNAME_LEN]; -} fed_tableinfo_t; + char adapter_name[NRT_ADAPTERNAME_LEN]; +} nrt_tableinfo_t; #endif /* _NRT_KEYS_INCLUDED */ -- GitLab From 1f4aa3d574ed650d5f001c3a91d8f965eccd14e1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 11:56:46 -0800 Subject: [PATCH 011/614] Add README notes about require NRT work --- src/plugins/switch/nrt/README | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/plugins/switch/nrt/README diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README new file mode 100644 index 0000000000..adf6d9c65f --- /dev/null +++ b/src/plugins/switch/nrt/README @@ -0,0 +1,24 @@ +1. Configuration file nrt.conf +1A. Add nrt.conf man page +1B. Add nrt.conf example +1C. Modify nrt.conf parsing and data structures to support adapter_type + (e.g. RSCT_DEVTYPE_INFINIBAND) + +2. NRT APIs +2A. Convert all Federation switch API calls to Torrent switch API calls + (largely completed as part of evaluation, but largely untested) +2B. Convert Federation switch data structures to Torrent switch data structures + Add adapter type + In the adapter resources, how "spigot" used? "lid" and "network_id" now arrays + Resolve window state incompatabilities + Remove adapter memory specifications (done) + Many window and adapter fields that do remain have different sizes + (started as part of evaluation, but the work is untested) + +3. POE support +3A. Data structures needed to allocate resources to job are similar, but require some mods + Minor changes needed to job credential +3B. Task launch completely new + Pass window allocation information using socket +3C. Elimination of POE would require IBM to expose details of network communications + Likely major effort and not possible without close cooperation with IBM -- GitLab From 70607953a2f85c867e075043ee5712367b154fca Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 12:55:57 -0800 Subject: [PATCH 012/614] more NRT work Remove tests for xmalloc NULL return rename adapter name field from "name" to "adapter_name" Add adapter_type field where needed Change use of NRT_ADAPTERNAME_LEN to NRT_MAX_DEVICENAME_SIZE --- src/plugins/switch/nrt/nrt.c | 177 ++++++++++++------------------ src/plugins/switch/nrt/nrt_keys.h | 11 +- 2 files changed, 79 insertions(+), 109 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2b6ead6fc9..17b6802c6e 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -68,7 +68,6 @@ #define NRT_JOBINFO_MAGIC 0xc00cc00b #define NRT_LIBSTATE_MAGIC 0xc00cc00c -#define NRT_ADAPTERNAME_LEN 5 #define NRT_HOSTLEN 20 #define NRT_VERBOSE_PRINT 0 #define NRT_NODECOUNT 128 @@ -101,7 +100,8 @@ typedef struct nrt_window { } nrt_window_t; typedef struct nrt_adapter { - char name[NRT_ADAPTERNAME_LEN]; + char adapter_name[NRT_MAX_DEVICENAME_SIZE]; + uint16_t adapter_type; uint16_t lid[MAX_SPIGOTS]; uint64_t network_id[MAX_SPIGOTS]; uint16_t window_count; @@ -144,12 +144,7 @@ struct nrt_jobinfo { }; typedef struct { - int status_number; - char *status_msg; -} nrt_status_t; - -typedef struct { - char name[NRT_ADAPTERNAME_LEN]; + char adapter_name[NRT_MAX_DEVICENAME_SIZE]; uint16_t lid[MAX_SPIGOTS]; uint64_t network_id[MAX_SPIGOTS]; } nrt_cache_entry_t; @@ -164,7 +159,6 @@ pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; hostlist_t adapter_list; static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; - static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); @@ -335,7 +329,7 @@ _fill_in_adapter_cache(void) lid_cache[num].network_id[j] = res.network_id[j]; } strncpy(lid_cache[num].name, adapter_name, - NRT_ADAPTERNAME_LEN); + NRT_MAX_DEVICENAME_SIZE); free(res.window_list); free(adapter_name); @@ -364,7 +358,9 @@ _cache_lid(nrt_adapter_t *ap) lid_cache[adapter_num].lid[j] = ap->lid[j]; lid_cache[adapter_num].network_id[j] = ap->network_id[j]; } - strncpy(lid_cache[adapter_num].name, ap->name, NRT_ADAPTERNAME_LEN); + strncpy(lid_cache[adapter_num].adapter_name, ap->adapter_name, + NRT_MAX_DEVICENAME_SIZE); + lid_cache[adapter_num].adapter_type = ap->adapter_type; } @@ -379,7 +375,7 @@ _get_network_id_from_adapter(char *adapter_name) for (i = 0; i < NRT_MAXADAPTERS; i++) { if (!strncmp(adapter_name, lid_cache[i].name, - NRT_ADAPTERNAME_LEN)) { + NRT_MAX_DEVICENAME_SIZE)) { /* FIXME: Return which spigot's network_id? */ return lid_cache[i].network_id[0]; } @@ -400,7 +396,7 @@ _get_lid_from_adapter(char *adapter_name) for (i = 0; i < NRT_MAXADAPTERS; i++) { if (!strncmp(adapter_name, lid_cache[i].name, - NRT_ADAPTERNAME_LEN)) { + NRT_MAX_DEVICENAME_SIZE)) { /* FIXME: Return which spigot's lid? */ return lid_cache[i].lid[0]; } @@ -432,7 +428,9 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, nrt_dump_adapter(adapter_name, adapter_type, &res); #endif - strncpy(nrt_adapter->name, adapter_name, NRT_ADAPTERNAME_LEN); + strncpy(nrt_adapter->adapter_name, adapter_name, + NRT_MAX_DEVICENAME_SIZE); + nrt_adapter->adapter_type = adapter_type; for (j = 0; j < MAX_SPIGOTS; j++) { nrt_adapter->lid[j] = res.lid[j]; nrt_adapter->network_id[j] = res.network_id[j]; @@ -460,8 +458,8 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, info(" state[%d]:%d", i, status[i].state); } #endif - tmp_winlist = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * - res.window_count); + tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * + res.window_count); for (i = 0; i < res.window_count; i++) { tmp_winlist[i].id = status->window_id; tmp_winlist[i].status = status->rc; @@ -564,9 +562,7 @@ nrt_alloc_jobinfo(nrt_jobinfo_t **j) nrt_jobinfo_t *new; assert(j != NULL); - new = (nrt_jobinfo_t *)xmalloc(sizeof(nrt_jobinfo_t)); - if (!new) - slurm_seterrno_ret(ENOMEM); + new = (nrt_jobinfo_t *) xmalloc(sizeof(nrt_jobinfo_t)); new->magic = NRT_JOBINFO_MAGIC; new->job_key = -1; new->tables_per_task = 0; @@ -584,15 +580,9 @@ nrt_alloc_nodeinfo(nrt_nodeinfo_t **n) assert(n); - new = (nrt_nodeinfo_t *)xmalloc(sizeof(nrt_nodeinfo_t)); - if (!new) - slurm_seterrno_ret(ENOMEM); - new->adapter_list = (nrt_adapter_t *)xmalloc(sizeof(nrt_adapter_t) - * NRT_MAXADAPTERS); - if (!new->adapter_list) { - xfree(new); - slurm_seterrno_ret(ENOMEM); - } + new = (nrt_nodeinfo_t *) xmalloc(sizeof(nrt_nodeinfo_t)); + new->adapter_list = (nrt_adapter_t *) xmalloc(sizeof(nrt_adapter_t) * + NRT_MAXADAPTERS); new->magic = NRT_NODEINFO_MAGIC; new->adapter_count = 0; new->next = NULL; @@ -721,18 +711,22 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) count = snprintf(tmp, remaining, #if NRT_VERBOSE_PRINT " Adapter: %s\n" + " type: %hu\n" " lid[0]: %hu\n" " network_id[0]: %u\n" " window_count: %hu\n", - a->name, + a->adapter_name, + a->adapter_type, a->lid[0], a->network_id[0], a->window_count); #else - " Adapter: %s\n" - " Window count: %hu\n" - " Active windows:\n", - a->name, + " Adapter: %s\n" + " type: %hu\n" + " Window count: %hu\n" + " Active windows:\n", + a->adapter_name, + a->adapter_type, a->window_count); #endif if (count < 0) @@ -784,7 +778,8 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) pack32(n->adapter_count, buf); for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; - packmem(a->name, NRT_ADAPTERNAME_LEN, buf); + packmem(a->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); + pack16(a->adapter_type, buf); for (j = 0; j < MAX_SPIGOTS; j++) { pack16(a->lid[j], buf); pack64(a->network_id[j], buf); @@ -818,7 +813,9 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) for (i = 0; i < dest->adapter_count; i++) { sa = src->adapter_list + i; da = dest->adapter_list +i; - strncpy(da->name, sa->name, NRT_ADAPTERNAME_LEN); + strncpy(da->adapter_name, sa->adapter_name, + NRT_MAX_DEVICENAME_SIZE); + da->adapter_type = sa->adapter_type; for (j = 0; j < MAX_SPIGOTS; j++) { da->lid[j] = sa->lid[j]; da->network_id[j] = sa->network_id[j]; @@ -826,9 +823,6 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) da->window_count = sa->window_count; da->window_list = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * da->window_count); - if (!da->window_list) { - slurm_seterrno_ret(ENOMEM); - } for (j = 0; j < da->window_count; j++) da->window_list[j] = sa->window_list[j]; } @@ -844,7 +838,7 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) * Used by: slurmctld */ static int -_hash_index (char *name) +_hash_index(char *name) { int index = 0; int j; @@ -925,7 +919,7 @@ _hash_rebuild(nrt_libstate_t *state) if (state->node_count > state->hash_max || state->hash_max == 0) state->hash_max += NRT_HASHCOUNT; state->hash_table = (nrt_nodeinfo_t **) - xmalloc(sizeof(nrt_nodeinfo_t *) * state->hash_max); + xmalloc(sizeof(nrt_nodeinfo_t *) * state->hash_max); memset(state->hash_table, 0, sizeof(nrt_nodeinfo_t *) * state->hash_max); for (i = 0; i < state->node_count; i++) @@ -958,11 +952,12 @@ _alloc_node(nrt_libstate_t *lp, char *name) if (lp->node_count >= lp->node_max) { lp->node_max += NRT_NODECOUNT; new_bufsize = lp->node_max * sizeof(nrt_nodeinfo_t); - if (lp->node_list == NULL) + if (lp->node_list == NULL) { lp->node_list = (nrt_nodeinfo_t *)xmalloc(new_bufsize); - else + } else { lp->node_list = (nrt_nodeinfo_t *)xrealloc(lp->node_list, new_bufsize); + } need_hash_rebuild = true; } if (lp->node_list == NULL) { @@ -973,8 +968,8 @@ _alloc_node(nrt_libstate_t *lp, char *name) n = lp->node_list + (lp->node_count++); n->magic = NRT_NODEINFO_MAGIC; n->name[0] = '\0'; - n->adapter_list = (nrt_adapter_t *)xmalloc(NRT_MAXADAPTERS * - sizeof(nrt_adapter_t)); + n->adapter_list = (nrt_adapter_t *) xmalloc(NRT_MAXADAPTERS * + sizeof(nrt_adapter_t)); if (name != NULL) { strncpy(n->name, name, NRT_HOSTLEN); @@ -1030,8 +1025,9 @@ _fake_unpack_adapters(Buf buf) for (i = 0; i < adapter_count; i++) { /* no copy, just advances buf counters */ safe_unpackmem_ptr(&dummyptr, &dummy32, buf); - if (dummy32 != NRT_ADAPTERNAME_LEN) + if (dummy32 != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; + safe_unpack16(&dummy16, buf); for (j = 0; j < MAX_SPIGOTS; j++) { safe_unpack16(&dummy16, buf); safe_unpack64(&dummy64, buf); @@ -1129,18 +1125,17 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) for (i = 0; i < tmp_n->adapter_count; i++) { tmp_a = tmp_n->adapter_list + i; safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_ADAPTERNAME_LEN) + if (size != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; - memcpy(tmp_a->name, name_ptr, size); + memcpy(tmp_a->adapter_name, name_ptr, size); + safe_unpack16(&tmp_a->adapter_type, buf); for (j = 0; j < MAX_SPIGOTS; j++) { safe_unpack16(&tmp_a->lid[j], buf); safe_unpack64(&tmp_a->network_id[j], buf); } safe_unpack16(&tmp_a->window_count, buf); - tmp_w = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * + tmp_w = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * tmp_a->window_count); - if (!tmp_w) - slurm_seterrno_ret(ENOMEM); for (j = 0; j < tmp_a->window_count; j++) { safe_unpack16(&tmp_w[j].id, buf); safe_unpack32(&tmp_w[j].status, buf); @@ -1282,7 +1277,6 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, nrt_nodeinfo_t *node; nrt_adapter_t *adapter; nrt_window_t *window; - NTBL *table; int i; assert(tableinfo); @@ -1306,13 +1300,19 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, window->status = NTBL_LOADED_STATE; window->job_key = job_key; - table = tableinfo[i].table[task_id]; - table->task_id = task_id; - table->lid = adapter->lid; - table->window_id = window->id; + if (adapter->adapter_type == RSCT_DEV_TYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_table; + ib_table = tableinfo[i].table[task_id].ib_per_task; + ib_table->task_id = task_id; + ib_table->base_lid = adapter->lid[0]; + ib_table->win_id = window->id; + } else { + fatal("Missing support for adapter type %hu", + adapter->adapter_type); + } strncpy(tableinfo[i].adapter_name, adapter->name, - NRT_ADAPTERNAME_LEN); + NRT_MAX_DEVICENAME_SIZE); } return SLURM_SUCCESS; @@ -1349,8 +1349,8 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, /* find the adapter */ for (i = 0; i < node->adapter_count; i++) { debug("adapter %s at index %d", node->adapter_list[i].name, i); - if (strcasecmp(node->adapter_list[i].name, adapter_name) - == 0) { + if (strcasecmp(node->adapter_list[i].adapter_name, + adapter_name) == 0) { adapter = &node->adapter_list[i]; debug("Found adapter %s", adapter_name); break; @@ -1378,7 +1378,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, table->window_id = window->id; strncpy(tableinfo[0].adapter_name, adapter_name, - NRT_ADAPTERNAME_LEN); + NRT_MAX_DEVICENAME_SIZE); return SLURM_SUCCESS; } @@ -1430,7 +1430,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, /* Find the adapter that matches the one in tableinfo */ for (j = 0; j < node->adapter_count; j++) { adapter = &node->adapter_list[j]; - if (strcasecmp(adapter->name, + if (strcasecmp(adapter->adapter_name, tableinfo[i].adapter_name) == 0 && adapter->lid == table->lid) { adapter_found = true; @@ -1493,7 +1493,7 @@ _print_index(char *index, int size) printf("--Begin lid index--\n"); for (i = 0; i < size; i++) { printf(" task_id: %u\n", i); - printf(" name: %s\n", index + (i * NRT_ADAPTERNAME_LEN)); + printf(" name: %s\n", index + (i * NRT_MAX_DEVICENAME_SIZE)); } printf("--End lid index--\n"); } @@ -1524,13 +1524,11 @@ _job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) xassert(jp); xassert(jp->magic == NRT_JOBINFO_MAGIC); - if ((jp == NULL) - || (jp->magic != NRT_JOBINFO_MAGIC) - || (hostlist_is_empty(hl))) + if ((jp == NULL) || (hostlist_is_empty(hl))) return SLURM_ERROR; if ((jp->tables_per_task == 0) - || !jp->tableinfo + || (!jp->tableinfo) || (jp->tableinfo[0].table_length == 0)) return SLURM_SUCCESS; @@ -1636,9 +1634,7 @@ nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) xassert(jp); xassert(jp->magic == NRT_JOBINFO_MAGIC); - if ((jp == NULL) - || (jp->magic != NRT_JOBINFO_MAGIC) - || (hostlist_is_empty(hl))) + if ((jp == NULL) || (hostlist_is_empty(hl))) return SLURM_ERROR; if ((jp->tables_per_task == 0) @@ -1826,7 +1822,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack16(tableinfo->table[i]->base_lid, buf); pack16(tableinfo->table[i]->win_id, buf); } - packmem(tableinfo->adapter_name, NRT_ADAPTERNAME_LEN, buf); + packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); } /* Used by: all */ @@ -1870,7 +1866,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpack16(&tableinfo->table[i]->win_id, buf); } safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_ADAPTERNAME_LEN) + if (size != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; memcpy(tableinfo->adapter_name, name_ptr, size); return 0; @@ -1934,8 +1930,9 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) assert(job->magic == NRT_JOBINFO_MAGIC); if (nrt_alloc_jobinfo(&new)) { - debug("nrt_alloc_jobinfo failed"); - goto cleanup1; + error("Allocating new jobinfo"); + slurm_seterrno(ENOMEM); + return NULL; } memcpy(new, job, sizeof(nrt_jobinfo_t)); /* table will be empty (and table_size == 0) when the network string @@ -1945,9 +1942,7 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) if (job->tables_per_task > 0) { /* Allocate memory for each nrt_tableinfo_t */ new->tableinfo = (nrt_tableinfo_t *)xmalloc( - job->tables_per_task * sizeof(nrt_tableinfo_t)); - if (new->tableinfo == NULL) - goto cleanup2; + job->tables_per_task * sizeof(nrt_tableinfo_t)); memcpy(new->tableinfo, job->tableinfo, sizeof(nrt_tableinfo_t) * job->tables_per_task); @@ -1955,43 +1950,17 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) new->tableinfo[i].table = (NTBL **) xmalloc(job->tableinfo[i].table_length * sizeof(NTBL *)); - if (new->tableinfo[i].table == NULL) - goto cleanup3; - for (k = 0; k < new->tableinfo[i].table_length; k++) { new->tableinfo[i].table[k] = (NTBL *) xmalloc(sizeof(NTBL)); - if (new->tableinfo[i].table[k] == NULL) - goto cleanup4; memcpy(new->tableinfo[i].table[k], job->tableinfo[i].table[k], sizeof(nrt_tableinfo_t)); } - - } } return new; - -cleanup4: - k--; - for ( ; k >= 0; k--) - xfree(new->tableinfo[i].table[k]); -cleanup3: - i--; - for ( ; i >= 0; i--) { - for (k = 0; k < new->tableinfo[i].table_length; k++) - xfree(new->tableinfo[i].table[k]); - xfree(new->tableinfo[i].table); - } - xfree(new->tableinfo); -cleanup2: - nrt_free_jobinfo(new); -cleanup1: - error("Allocating new jobinfo"); - slurm_seterrno(ENOMEM); - return NULL; } /* Used by: all */ @@ -2362,11 +2331,7 @@ _alloc_libstate(void) { nrt_libstate_t *tmp; - tmp = (nrt_libstate_t *)xmalloc(sizeof(nrt_libstate_t)); - if (!tmp) { - slurm_seterrno(ENOMEM); - return NULL; - } + tmp = (nrt_libstate_t *) xmalloc(sizeof(nrt_libstate_t)); tmp->magic = NRT_LIBSTATE_MAGIC; tmp->node_count = 0; tmp->node_max = 0; diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 0ac08cdc35..c8bae59de8 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -40,7 +40,11 @@ #ifndef _NRT_KEYS_INCLUDED #define _NRT_KEYS_INCLUDED -#define NRT_ADAPTERNAME_LEN 5 +#if HAVE_LIBNRT +# include +#else +# error "Must have libnrt to compile this module!" +#endif enum { /* Federation specific get_jobinfo keys */ @@ -54,8 +58,9 @@ enum { /* Information shared between slurm_ll_api and the slurm federation driver */ typedef struct nrt_tableinfo { uint32_t table_length; - nrt_creator_ib_per_task_input_t **table; - char adapter_name[NRT_ADAPTERNAME_LEN]; + nrt_creator_per_task_input_t **table; + char adapter_name[NRT_MAX_DEVICENAME_SIZE]; + uint16_t adapter_type; } nrt_tableinfo_t; #endif /* _NRT_KEYS_INCLUDED */ -- GitLab From 3ae8c9197c2e523e4ac41d48d8a4be37e5d11249 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 13:59:28 -0800 Subject: [PATCH 013/614] Rename nrt.h to slurm_nrt.h to avoid confusion with IBM's nrt.h --- src/plugins/switch/Makefile.am | 2 +- src/plugins/switch/Makefile.in | 2 +- src/plugins/switch/nrt/Makefile.am | 3 ++- src/plugins/switch/nrt/Makefile.in | 7 ++++--- src/plugins/switch/nrt/nrt.c | 2 +- src/plugins/switch/nrt/{nrt.h => slurm_nrt.h} | 10 +++++----- src/plugins/switch/nrt/switch_nrt.c | 2 +- 7 files changed, 15 insertions(+), 13 deletions(-) rename src/plugins/switch/nrt/{nrt.h => slurm_nrt.h} (95%) diff --git a/src/plugins/switch/Makefile.am b/src/plugins/switch/Makefile.am index f7250e991f..4c24989539 100644 --- a/src/plugins/switch/Makefile.am +++ b/src/plugins/switch/Makefile.am @@ -1,3 +1,3 @@ # Makefile for switch plugins -SUBDIRS = elan none nrt federation +SUBDIRS = elan federation none nrt diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index 48ea9f6ceb..bcbd464eab 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -325,7 +325,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = elan none federation +SUBDIRS = elan federation none nrt all: all-recursive .SUFFIXES: diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 5201e9a8f9..41c4ac3332 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -8,8 +8,9 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common SWITCH_NRT_LA_SOURCES = \ - nrt.c nrt.h \ + nrt.c \ nrt_keys.h \ + slurm_nrt.h \ switch_nrt.c if BUILD_NRT diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 59f1256c69..c334a0891f 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -107,10 +107,10 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) switch_nrt_la_LIBADD = -am__switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h switch_nrt.c +am__switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h switch_nrt.c am__objects_1 = nrt.lo switch_nrt.lo @BUILD_FEDERATION_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) -am__EXTRA_switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h \ +am__EXTRA_switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h \ switch_nrt.c switch_nrt_la_OBJECTS = $(am_switch_nrt_la_OBJECTS) switch_nrt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -338,8 +338,9 @@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common SWITCH_NRT_LA_SOURCES = \ - nrt.c nrt.h \ + nrt.c \ nrt_keys.h \ + slurm_nrt.h \ switch_nrt.c @BUILD_FEDERATION_FALSE@pkglib_LTLIBRARIES = diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 17b6802c6e..8345830d06 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -58,8 +58,8 @@ #include "slurm/slurm_errno.h" #include "src/common/slurm_xlator.h" #include "src/common/read_config.h" -#include "src/plugins/switch/nrt/nrt.h" #include "src/plugins/switch/nrt/nrt_keys.h" +#include "src/plugins/switch/nrt/slurm_nrt.h" /* * Definitions local to this module diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/slurm_nrt.h similarity index 95% rename from src/plugins/switch/nrt/nrt.h rename to src/plugins/switch/nrt/slurm_nrt.h index 260a015ac1..806b7434d3 100644 --- a/src/plugins/switch/nrt/nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -1,6 +1,6 @@ /*****************************************************************************\ - * nrt.h - Library routines for initiating jobs using IBM's NRT (Network - * Routing Table) + * slurm_nrt.h - Library routines for initiating jobs using IBM's NRT + * (Network Routing Table) ***************************************************************************** * Copyright (C) 2004 The Regents of the University of California. * Portions Copyright (C) 2011 SchedMD LLC. @@ -44,8 +44,8 @@ #include "src/common/slurm_xlator.h" -#ifndef _NRT_INCLUDED -#define _NRT_INCLUDED +#ifndef _SLURM_NRT_INCLUDED +#define _SLURM_NRT_INCLUDED #if HAVE_LIBNRT # include @@ -114,4 +114,4 @@ extern int nrt_slurmctld_init(void); extern int nrt_slurmd_init(void); extern int nrt_slurmd_step_init(void); -#endif /* _NRT_INCLUDED */ +#endif /* _SLURM_NRT_INCLUDED */ diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index f4b17067a4..bbe4c89c1b 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -53,7 +53,7 @@ #include "slurm/slurm_errno.h" #include "src/common/macros.h" #include "src/common/slurm_xlator.h" -#include "src/plugins/switch/nrt/nrt.h" +#include "src/plugins/switch/nrt/slurm_nrt.h" #define NRT_BUF_SIZE 4096 -- GitLab From b6b075bf7f74ab2c681084c707e3d9abb218ea84 Mon Sep 17 00:00:00 2001 From: jette Date: Tue, 24 Jan 2012 14:18:19 -0800 Subject: [PATCH 014/614] Mods for appropriate switch/nrt plugin build --- Makefile.in | 3 + aclocal.m4 | 1 + auxdir/Makefile.am | 1 + auxdir/Makefile.in | 4 ++ auxdir/x_ac_nrt.m4 | 51 +++++++++++++++ config.h.in | 3 + configure | 63 ++++++++++++++++++- configure.ac | 6 ++ contribs/Makefile.in | 3 + contribs/arrayrun/Makefile.in | 3 + contribs/cray/Makefile.in | 3 + contribs/lua/Makefile.in | 3 + contribs/pam/Makefile.in | 3 + contribs/perlapi/Makefile.in | 3 + contribs/perlapi/libslurm/Makefile.in | 3 + contribs/perlapi/libslurmdb/Makefile.in | 3 + contribs/phpext/Makefile.in | 3 + contribs/sjobexit/Makefile.in | 3 + contribs/slurmdb-direct/Makefile.in | 3 + contribs/torque/Makefile.in | 3 + doc/Makefile.in | 3 + doc/html/Makefile.in | 3 + doc/man/Makefile.in | 3 + doc/man/man1/Makefile.in | 3 + doc/man/man3/Makefile.in | 3 + doc/man/man5/Makefile.in | 3 + doc/man/man8/Makefile.in | 3 + src/Makefile.in | 3 + src/api/Makefile.in | 3 + src/common/Makefile.in | 3 + src/database/Makefile.in | 3 + src/db_api/Makefile.in | 3 + src/plugins/Makefile.in | 3 + src/plugins/accounting_storage/Makefile.in | 3 + .../accounting_storage/common/Makefile.in | 3 + .../accounting_storage/filetxt/Makefile.in | 3 + .../accounting_storage/mysql/Makefile.in | 3 + .../accounting_storage/none/Makefile.in | 3 + .../accounting_storage/pgsql/Makefile.in | 3 + .../accounting_storage/slurmdbd/Makefile.in | 3 + src/plugins/auth/Makefile.in | 3 + src/plugins/auth/authd/Makefile.in | 3 + src/plugins/auth/munge/Makefile.in | 3 + src/plugins/auth/none/Makefile.in | 3 + src/plugins/checkpoint/Makefile.in | 3 + src/plugins/checkpoint/aix/Makefile.in | 3 + src/plugins/checkpoint/blcr/Makefile.in | 3 + src/plugins/checkpoint/none/Makefile.in | 3 + src/plugins/checkpoint/ompi/Makefile.in | 3 + src/plugins/crypto/Makefile.in | 3 + src/plugins/crypto/munge/Makefile.in | 3 + src/plugins/crypto/openssl/Makefile.in | 3 + src/plugins/gres/Makefile.in | 3 + src/plugins/gres/gpu/Makefile.in | 3 + src/plugins/gres/nic/Makefile.in | 3 + src/plugins/job_submit/Makefile.in | 3 + src/plugins/job_submit/cnode/Makefile.in | 3 + src/plugins/job_submit/defaults/Makefile.in | 3 + src/plugins/job_submit/logging/Makefile.in | 3 + src/plugins/job_submit/lua/Makefile.in | 3 + src/plugins/job_submit/partition/Makefile.in | 3 + src/plugins/jobacct_gather/Makefile.in | 3 + src/plugins/jobacct_gather/aix/Makefile.in | 3 + src/plugins/jobacct_gather/linux/Makefile.in | 3 + src/plugins/jobacct_gather/none/Makefile.in | 3 + src/plugins/jobcomp/Makefile.in | 3 + src/plugins/jobcomp/filetxt/Makefile.in | 3 + src/plugins/jobcomp/mysql/Makefile.in | 3 + src/plugins/jobcomp/none/Makefile.in | 3 + src/plugins/jobcomp/pgsql/Makefile.in | 3 + src/plugins/jobcomp/script/Makefile.in | 3 + src/plugins/mpi/Makefile.in | 3 + src/plugins/mpi/lam/Makefile.in | 3 + src/plugins/mpi/mpich1_p4/Makefile.in | 3 + src/plugins/mpi/mpich1_shmem/Makefile.in | 3 + src/plugins/mpi/mpichgm/Makefile.in | 3 + src/plugins/mpi/mpichmx/Makefile.in | 3 + src/plugins/mpi/mvapich/Makefile.in | 3 + src/plugins/mpi/none/Makefile.in | 3 + src/plugins/mpi/openmpi/Makefile.in | 3 + src/plugins/preempt/Makefile.in | 3 + src/plugins/preempt/none/Makefile.in | 3 + .../preempt/partition_prio/Makefile.in | 3 + src/plugins/preempt/qos/Makefile.in | 3 + src/plugins/priority/Makefile.in | 3 + src/plugins/priority/basic/Makefile.in | 3 + src/plugins/priority/multifactor/Makefile.in | 3 + src/plugins/proctrack/Makefile.in | 3 + src/plugins/proctrack/aix/Makefile.in | 3 + src/plugins/proctrack/cgroup/Makefile.in | 3 + src/plugins/proctrack/linuxproc/Makefile.in | 3 + src/plugins/proctrack/lua/Makefile.in | 3 + src/plugins/proctrack/pgid/Makefile.in | 3 + src/plugins/proctrack/rms/Makefile.in | 3 + src/plugins/proctrack/sgi_job/Makefile.in | 3 + src/plugins/sched/Makefile.in | 3 + src/plugins/sched/backfill/Makefile.in | 3 + src/plugins/sched/builtin/Makefile.in | 3 + src/plugins/sched/hold/Makefile.in | 3 + src/plugins/sched/wiki/Makefile.in | 3 + src/plugins/sched/wiki2/Makefile.in | 3 + src/plugins/select/Makefile.in | 3 + src/plugins/select/bluegene/Makefile.in | 3 + src/plugins/select/bluegene/ba/Makefile.in | 3 + .../select/bluegene/ba_bgq/Makefile.in | 3 + src/plugins/select/bluegene/bl/Makefile.in | 3 + .../select/bluegene/bl_bgq/Makefile.in | 3 + src/plugins/select/bluegene/sfree/Makefile.in | 3 + src/plugins/select/cons_res/Makefile.in | 3 + src/plugins/select/cray/Makefile.in | 3 + src/plugins/select/cray/libalps/Makefile.in | 3 + .../select/cray/libemulate/Makefile.in | 3 + src/plugins/select/linear/Makefile.in | 3 + src/plugins/switch/Makefile.in | 3 + src/plugins/switch/elan/Makefile.in | 3 + src/plugins/switch/federation/Makefile.in | 3 + src/plugins/switch/none/Makefile.in | 3 + src/plugins/switch/nrt/Makefile.am | 6 +- src/plugins/switch/nrt/Makefile.in | 28 +++++---- src/plugins/task/Makefile.in | 3 + src/plugins/task/affinity/Makefile.in | 3 + src/plugins/task/cgroup/Makefile.in | 3 + src/plugins/task/none/Makefile.in | 3 + src/plugins/topology/3d_torus/Makefile.in | 3 + src/plugins/topology/Makefile.in | 3 + src/plugins/topology/node_rank/Makefile.in | 3 + src/plugins/topology/none/Makefile.in | 3 + src/plugins/topology/tree/Makefile.in | 3 + src/sacct/Makefile.in | 3 + src/sacctmgr/Makefile.in | 3 + src/salloc/Makefile.in | 3 + src/sattach/Makefile.in | 3 + src/sbatch/Makefile.in | 3 + src/sbcast/Makefile.in | 3 + src/scancel/Makefile.in | 3 + src/scontrol/Makefile.in | 3 + src/sinfo/Makefile.in | 3 + src/slurmctld/Makefile.in | 3 + src/slurmd/Makefile.in | 3 + src/slurmd/common/Makefile.in | 3 + src/slurmd/slurmd/Makefile.in | 3 + src/slurmd/slurmstepd/Makefile.in | 3 + src/slurmdbd/Makefile.in | 3 + src/smap/Makefile.in | 3 + src/sprio/Makefile.in | 3 + src/squeue/Makefile.in | 3 + src/sreport/Makefile.in | 3 + src/srun/Makefile.in | 3 + src/srun_cr/Makefile.in | 3 + src/sshare/Makefile.in | 3 + src/sstat/Makefile.in | 3 + src/strigger/Makefile.in | 3 + src/sview/Makefile.in | 3 + testsuite/Makefile.in | 3 + testsuite/expect/Makefile.in | 3 + testsuite/slurm_unit/Makefile.in | 3 + testsuite/slurm_unit/api/Makefile.in | 3 + testsuite/slurm_unit/api/manual/Makefile.in | 3 + testsuite/slurm_unit/common/Makefile.in | 3 + 159 files changed, 597 insertions(+), 16 deletions(-) create mode 100644 auxdir/x_ac_nrt.m4 diff --git a/Makefile.in b/Makefile.in index a9412ddea1..b47b3d5537 100644 --- a/Makefile.in +++ b/Makefile.in @@ -72,6 +72,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -222,6 +223,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -253,6 +255,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/aclocal.m4 b/aclocal.m4 index 259e31b88b..5c1b30b6e0 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1372,6 +1372,7 @@ m4_include([auxdir/x_ac_lua.m4]) m4_include([auxdir/x_ac_man2html.m4]) m4_include([auxdir/x_ac_munge.m4]) m4_include([auxdir/x_ac_ncurses.m4]) +m4_include([auxdir/x_ac_nrt.m4]) m4_include([auxdir/x_ac_pam.m4]) m4_include([auxdir/x_ac_printf_null.m4]) m4_include([auxdir/x_ac_ptrace.m4]) diff --git a/auxdir/Makefile.am b/auxdir/Makefile.am index 6042614c5f..675d9d6875 100644 --- a/auxdir/Makefile.am +++ b/auxdir/Makefile.am @@ -27,6 +27,7 @@ EXTRA_DIST = \ x_ac_man2html.m4 \ x_ac_munge.m4 \ x_ac_ncurses.m4 \ + x_ac_nrt.m4 \ x_ac_pam.m4 \ x_ac_printf_null.m4 \ x_ac_ptrace.m4 \ diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 1b86a66ded..08308c0c35 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -64,6 +64,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -136,6 +137,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -167,6 +169,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -307,6 +310,7 @@ EXTRA_DIST = \ x_ac_man2html.m4 \ x_ac_munge.m4 \ x_ac_ncurses.m4 \ + x_ac_nrt.m4 \ x_ac_pam.m4 \ x_ac_printf_null.m4 \ x_ac_ptrace.m4 \ diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 new file mode 100644 index 0000000000..8ed94162e6 --- /dev/null +++ b/auxdir/x_ac_nrt.m4 @@ -0,0 +1,51 @@ +##***************************************************************************** +# AUTHOR: +# Morris Jette +# +# SYNOPSIS: +# AC_NRT +# +# DESCRIPTION: +# Checks for availability of the libraries necessary to support +# IBM NRT (Network Resource Table) switch management +# +# WARNINGS: +# This macro must be placed after AC_PROG_CC or equivalent. +##***************************************************************************** + + +AC_DEFUN([X_AC_NRT], +[ + AC_MSG_CHECKING([whether to enable IBM NRT switch support]) + nrt_default_dirs="/usr/lib" + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + + if test "$OBJECT_MODE" = "64"; then + libnrt="nrt_64" + else + libnrt="nrt" + fi + + # search for required NTBL API libraries + if test -f "$nrt_dir/lib${libnrt}.so"; then + ac_have_nrt="yes" + NRT_LDFLAGS="-l$libnrt" + break; + fi + + done + + if test "x$ac_have_nrt" != "xyes" ; then + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([Cannot support IBM NRT switch without libnrt]) + else + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_LIBNRT, 1, [define if you have libntbl.]) + fi + + AC_SUBST(NRT_LDFLAGS) +]) diff --git a/config.h.in b/config.h.in index a2518075fd..8e9cd5afd8 100644 --- a/config.h.in +++ b/config.h.in @@ -148,6 +148,9 @@ /* Define to 1 if you have the `job' library (-ljob). */ #undef HAVE_LIBJOB +/* define if you have libntbl. */ +#undef HAVE_LIBNRT + /* define if you have libntbl. */ #undef HAVE_LIBNTBL diff --git a/configure b/configure index 9419b8c5af..14e9138d63 100755 --- a/configure +++ b/configure @@ -651,6 +651,10 @@ lua_LIBS lua_CFLAGS HAVE_SGI_JOB_FALSE HAVE_SGI_JOB_TRUE +HAVE_NRT +HAVE_NRT_FALSE +HAVE_NRT_TRUE +NRT_LDFLAGS HAVE_FEDERATION HAVE_FEDERATION_FALSE HAVE_FEDERATION_TRUE @@ -21254,6 +21258,56 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT switch support" >&5 +$as_echo_n "checking whether to enable IBM NRT switch support... " >&6; } + nrt_default_dirs="/usr/lib" + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + + if test "$OBJECT_MODE" = "64"; then + libnrt="nrt_64" + else + libnrt="nrt" + fi + + # search for required NTBL API libraries + if test -f "$nrt_dir/lib${libnrt}.so"; then + ac_have_nrt="yes" + NRT_LDFLAGS="-l$libnrt" + break; + fi + + done + + if test "x$ac_have_nrt" != "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support IBM NRT switch without libnrt" >&5 +$as_echo "$as_me: Cannot support IBM NRT switch without libnrt" >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LIBNRT 1" >>confdefs.h + + fi + + + + if test "x$ac_have_nrt" = "xyes"; then + HAVE_NRT_TRUE= + HAVE_NRT_FALSE='#' +else + HAVE_NRT_TRUE='#' + HAVE_NRT_FALSE= +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for job_attachpid in -ljob" >&5 $as_echo_n "checking for job_attachpid in -ljob... " >&6; } if ${ac_cv_lib_job_job_attachpid+:} false; then : @@ -22162,7 +22216,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -22411,6 +22465,10 @@ if test -z "${HAVE_FEDERATION_TRUE}" && test -z "${HAVE_FEDERATION_FALSE}"; then as_fn_error $? "conditional \"HAVE_FEDERATION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_NRT_TRUE}" && test -z "${HAVE_NRT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_NRT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_SGI_JOB_TRUE}" && test -z "${HAVE_SGI_JOB_FALSE}"; then as_fn_error $? "conditional \"HAVE_SGI_JOB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23564,8 +23622,9 @@ do "src/plugins/select/linear/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/linear/Makefile" ;; "src/plugins/switch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/Makefile" ;; "src/plugins/switch/elan/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/elan/Makefile" ;; - "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; "src/plugins/switch/federation/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/federation/Makefile" ;; + "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; + "src/plugins/switch/nrt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/Makefile" ;; "src/plugins/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/Makefile" ;; "src/plugins/mpi/mpich1_p4/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_p4/Makefile" ;; "src/plugins/mpi/mpich1_shmem/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_shmem/Makefile" ;; diff --git a/configure.ac b/configure.ac index 04b6544f6a..4ee66f01d2 100644 --- a/configure.ac +++ b/configure.ac @@ -289,6 +289,12 @@ X_AC_FEDERATION AM_CONDITIONAL(HAVE_FEDERATION, test "x$ac_have_federation" = "xyes") AC_SUBST(HAVE_FEDERATION) +dnl check for whether to include IBM NRT switch support +dnl +X_AC_NRT +AM_CONDITIONAL(HAVE_NRT, test "x$ac_have_nrt" = "xyes") +AC_SUBST(HAVE_NRT) + dnl check for SGI job container support dnl X_AC_SGI_JOB diff --git a/contribs/Makefile.in b/contribs/Makefile.in index 5b38c95ab4..9af6d4b5a4 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 08a54351c0..7a6ddfe892 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index 3502d17289..58cee807d0 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -163,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index 0b719898b1..6c83ca2229 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 90a77b6cab..54d1f68dba 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -189,6 +190,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -220,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index ec7776a827..3838ac6285 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index 2239325ffc..ab8cdb9a30 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index 403f910a6b..2c062a078c 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index e3e975f4f3..a35f7039bd 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index a024440c02..298ed9b2f2 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -162,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index d5ad51d086..d4359e4b3c 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -162,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 980f66f466..794776a901 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -162,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/Makefile.in b/doc/Makefile.in index db6ac8a70d..41dbaf04d3 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index dd2b6ceecb..dc5fcba08f 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -160,6 +161,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -191,6 +193,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 01baf41e56..44a68abee9 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index 7c31c57465..08ceb3accd 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -163,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index ec07874f73..16d2486eb8 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -160,6 +161,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -191,6 +193,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index c2d9d7ff55..f1190ffe83 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -163,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index 31ccb84e27..766120f7f5 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -163,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/Makefile.in b/src/Makefile.in index 9bcfdd1b60..4407b88a21 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -180,6 +181,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 6b7c8bd424..5b1f8cc09c 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -212,6 +213,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -243,6 +245,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index c218bc42bd..0eb68e3415 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -77,6 +77,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -257,6 +258,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -288,6 +290,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/database/Makefile.in b/src/database/Makefile.in index a7b0ed7456..fee752b51b 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -187,6 +188,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index 99baaf32c5..fbaa9d0f6b 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -197,6 +198,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -228,6 +230,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 01ead5be7d..940696ec0e 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 2dbd8bc768..50684f9a40 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index 290635613b..d08b53910c 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -158,6 +159,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -189,6 +191,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index 48f519387b..bff51eb2e6 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -185,6 +186,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index 7e207af863..0ab44a3ac4 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -235,6 +236,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -266,6 +268,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index ac4800dedd..74a5971aa6 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -184,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 09741209c0..58c1638d86 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -230,6 +231,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -261,6 +263,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index b79365de20..8cbe68841c 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -185,6 +186,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 0e1debd686..2b7daf7cc7 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index b62120f137..03b1a833ad 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 6a0d3b8074..49cdb50324 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -184,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index 2e1e82607c..ba817468a5 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index 632b95be17..29f937409e 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index ef02494db8..9869b5e19e 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -187,6 +188,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 8eb94cd11b..6b7689f434 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -193,6 +194,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -224,6 +226,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index ffb5826dd8..4adb818233 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index b725e69146..17b255a891 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index 248b7a49b7..4e19316a8e 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index 930d4d0458..5d536efd30 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -184,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index b90ef8c8dc..a256811bd2 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -189,6 +190,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -220,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index 3f2388b54d..e91bdc923a 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index ff3d8bba44..9a8a7f5f79 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index f26fdad465..b9f71e4554 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index 7eb5f4c4b3..ae4f9af57c 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index 53f06f749f..82fa346f47 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index 5b66492c4a..b8ee748958 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index 4ac50e2df8..b95bdd2c60 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index 1f6953769b..130564f3e0 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -187,6 +188,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 725fb995ed..86a92f95d0 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index 9c59f0986c..c7ac16c137 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index e9b7ea8db6..c850f36caa 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 2f87104024..65701e4b24 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index 7718913d30..e1318758e0 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index 7f0f709362..1ec55571bc 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 494fb0219b..90b34460a3 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index e37f8215ef..85168e1fb4 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -191,6 +192,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 15edf151c3..d563d7be44 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index f7339818f4..304f548c2e 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -191,6 +192,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index 506f21b85e..51738a9b73 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 585512e95c..72f955d5e8 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index 7b0b37fc6d..93df09e58e 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 4a3cf37516..7ace0ec9f5 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index db4211ef1d..1bab9e2d14 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index 2b154466cd..a9c8382428 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index 34726bc1c6..25eb62f475 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index a00190387a..d6816e8357 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 329507f8f1..3340c753af 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index 2f48aaa7b0..60d9f036f3 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index 567674f5e0..1afe021fce 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index c0b5f10473..a20c74a2ea 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index d416ef0f40..16446887a8 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -184,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index bcc13036bd..d39230d93b 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index 57e51c83de..aac4e3528c 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index 3118180c3c..f3b11e5bf4 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index d6be58f2c2..74be16075e 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index 4a44c61457..02bb1a6f08 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 86413e9f84..9e863553f3 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index 963d63d89b..af1840036c 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 5b7d8e45e9..1a281ce39d 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index c4fbc34a06..909c7f560a 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index d2851f53dc..a874ad0af5 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in index bf27931014..6185dac210 100644 --- a/src/plugins/proctrack/rms/Makefile.in +++ b/src/plugins/proctrack/rms/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index d25a6e05ff..830dc4f2b4 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index f2b3a72f76..b459649b89 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index 121aaf3d1a..d10e1f2c68 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index fc02bba236..4dbe0babdf 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index 324905971d..a5c8728dd5 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index 60d91ffb01..b524d3c3f5 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -184,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index f679ffb550..5807d79045 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -187,6 +188,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index 88b40a5301..0d5277effd 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 9afc6e40ac..4218d839ca 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -98,6 +98,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -344,6 +345,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -375,6 +377,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index aaabcb21d0..6e260e9bc5 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -170,6 +171,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index 4781aba9ef..165126443a 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -180,6 +181,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index be1fd48a3f..e37f58ed80 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -161,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -192,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index a2c355d90d..8d74a3a863 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -170,6 +171,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index b3d5579735..737cec9a96 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -162,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index 52f80fd9b9..63a1f5af6c 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index 1ae7405505..31284d8727 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -229,6 +230,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -260,6 +262,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index eec9ab4187..3ee7e814d1 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -168,6 +169,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -199,6 +201,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index 5dae4cc6cd..602d064108 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -162,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index 8effe85bbe..f51d83be93 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index bcbd464eab..1759846311 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in index b773c85fb6..94d15dc3b1 100644 --- a/src/plugins/switch/elan/Makefile.in +++ b/src/plugins/switch/elan/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -188,6 +189,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -219,6 +221,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in index 62d34bd3c0..e1f3d5b1e1 100644 --- a/src/plugins/switch/federation/Makefile.in +++ b/src/plugins/switch/federation/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -191,6 +192,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index 6dcb50d1ac..e1182a4d2d 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 41c4ac3332..9c67431225 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -1,6 +1,6 @@ # Makefile for switch/nrt plugin (NRT = IBM's Network Routing Table) -CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" +CPPFLAGS = -DNRT_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic @@ -13,10 +13,10 @@ SWITCH_NRT_LA_SOURCES = \ slurm_nrt.h \ switch_nrt.c -if BUILD_NRT +if HAVE_NRT pkglib_LTLIBRARIES = switch_nrt.la switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) -switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) +switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) else pkglib_LTLIBRARIES = diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index c334a0891f..912f71ed5b 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -38,7 +38,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = src/plugins/switch/nrt -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/libtool.m4 \ @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -107,16 +108,17 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) switch_nrt_la_LIBADD = -am__switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h switch_nrt.c +am__switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h \ + switch_nrt.c am__objects_1 = nrt.lo switch_nrt.lo -@BUILD_FEDERATION_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) +@HAVE_NRT_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) am__EXTRA_switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h \ switch_nrt.c switch_nrt_la_OBJECTS = $(am_switch_nrt_la_OBJECTS) switch_nrt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(switch_nrt_la_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_FEDERATION_TRUE@am_switch_nrt_la_rpath = -rpath $(pkglibdir) +@HAVE_NRT_TRUE@am_switch_nrt_la_rpath = -rpath $(pkglibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp am__depfiles_maybe = depfiles @@ -160,7 +162,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CMD_LDFLAGS = @CMD_LDFLAGS@ CPP = @CPP@ -CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" +CPPFLAGS = -DNRT_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -185,8 +187,12 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ +HAVE_ELAN = @HAVE_ELAN@ +HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ @@ -203,7 +209,6 @@ LIBTOOL = @LIBTOOL@ LIB_LDFLAGS = @LIB_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ -LOADLEVELER_INCLUDES = @LOADLEVELER_INCLUDES@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -217,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -343,11 +349,11 @@ SWITCH_NRT_LA_SOURCES = \ slurm_nrt.h \ switch_nrt.c -@BUILD_FEDERATION_FALSE@pkglib_LTLIBRARIES = -@BUILD_FEDERATION_TRUE@pkglib_LTLIBRARIES = switch_nrt.la -@BUILD_FEDERATION_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) -@BUILD_FEDERATION_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) -@BUILD_FEDERATION_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +@HAVE_NRT_FALSE@pkglib_LTLIBRARIES = +@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la +@HAVE_NRT_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +@HAVE_NRT_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) +@HAVE_NRT_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) all: all-am .SUFFIXES: diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index 3eca05a5c0..5d7872d0a2 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 6c108b7542..6355c943e5 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -194,6 +195,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -225,6 +227,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index 772c54787c..7f1be1315e 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -185,6 +186,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 8969fc57cf..1aedf5fd50 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index 03168d8c1f..054b7fe13f 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -183,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index 38cb018d8e..a2b02e32f8 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -177,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index 3b76b09d1e..08287d6fb0 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 74351935c7..2bf2c92680 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index 476e4bff2a..ffa63a27c5 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index c770674087..a61c4a5542 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index 32ef2c32f7..a7ce0895d4 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -171,6 +172,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -202,6 +204,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 8c5658a86d..07d6690452 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -165,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -196,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 96dd3957e7..8c11f73839 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -164,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 1405bef514..5c2d561443 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -164,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 0cfb072c58..8e3e9eaa75 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 3583a0c07a..42dc7b7bfe 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -165,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -196,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 6d94e7077a..1f6321dc18 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -180,6 +181,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 6596965cd1..7dc30f4279 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -167,6 +168,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index f743403606..43372472cb 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -174,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -205,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index a61fdf3658..b93e5cc3e8 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index c4d3832dac..96c88414ab 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -66,6 +66,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -158,6 +159,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -189,6 +191,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index c266e74289..23ea2a9bad 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -167,6 +168,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index e2df9338c9..1262f44993 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -170,6 +171,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 7ea6fa3767..e39cc91025 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -68,6 +68,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 7c793c1eb2..1cb87b6d57 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -75,6 +75,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -186,6 +187,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -217,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index eaed426f2b..a594fe4ca5 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index 0c31b28ddf..a19ded7480 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -167,6 +168,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 17fa4905b2..ffb0bad73c 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 5111e985a9..6a51432a5b 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -69,6 +69,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index b0b185dd39..e38de17f4b 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -164,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 18e5d93538..b6b24d8cf8 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -164,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 35b7ab448a..10f38b569e 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -163,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 6b8659f756..5bbf756067 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -70,6 +70,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -166,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index 03c490394f..96697f14bf 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -71,6 +71,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -190,6 +191,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -221,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 71b20b0bb5..b8f7566042 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -182,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 9ea034dbdb..550340a122 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -135,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index 4cfbe27e45..c89e61ddb5 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -63,6 +63,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -175,6 +176,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index a1273da5f0..6414629469 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -198,6 +199,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -229,6 +231,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 0938ac3e12..71812e6221 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -67,6 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -190,6 +191,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -221,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index 2178b17bd6..dd43a4c2f1 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_man2html.m4 \ $(top_srcdir)/auxdir/x_ac_munge.m4 \ $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ $(top_srcdir)/auxdir/x_ac_pam.m4 \ $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ @@ -178,6 +179,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -209,6 +211,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -- GitLab From 49706c633db8da96cc84df6112d86c3f7e144d24 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Jan 2012 16:50:18 -0800 Subject: [PATCH 015/614] add something that looks lime ibm's nrt.h file to build our code --- src/plugins/switch/nrt/nrt.c | 41 +----------- src/plugins/switch/nrt/nrt.h | 123 +++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+), 40 deletions(-) create mode 100644 src/plugins/switch/nrt/nrt.h diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 8345830d06..2313d9c26a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -75,7 +75,6 @@ #define NRT_AUTO_WINMEM 0 #define NRT_MAX_WIN 15 #define NRT_MIN_WIN 0 -#define NRT_DEBUG 0 #define BUFSIZE 4096 @@ -420,7 +419,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, &res); if (err != NRT_SUCCESS) { error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(rc)); + adapter_name, adapter_type, nrt_err_str(err)); return SLURM_ERROR; } #if NRT_DEBUG @@ -618,44 +617,6 @@ nrt_build_nodeinfo(nrt_nodeinfo_t *n, char *name) n->adapter_count = count; return 0; } -#if NRT_DEBUG -static int -_print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) -{ - int count; - - assert(r); - assert(buf); - assert(size > 0); - - count = snprintf(buf, size, - "--Begin Adapter Resources--\n" - " device_type = %x\n" - " lid[0] = %hu\n" - " network_id[0] = %u\n" - " fifo_slot_size = %lld\n" - " window_count = %hu\n" - " window_list[0] = %hu\n" -#if NRT_VERSION == 120 - " reserved = %lld\n" -#else - " rcontext_block_count = %lld\n" -#endif - "--End Adapter Resources--\n", - r->device_type, - r->lid[0], - r->network_id[0], - r->fifo_slot_size, - r->window_count, - r->window_list[0], -#if NRT_VERSION == 120 - r->reserved); -#else - r->rcontext_block_count); -#endif - - return count; -} static int _print_window_struct(nrt_window_t *w, char *buf, size_t size) diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h new file mode 100644 index 0000000000..74aa49a258 --- /dev/null +++ b/src/plugins/switch/nrt/nrt.h @@ -0,0 +1,123 @@ +/* This should be the same as IBM's nrt.h file (or close anyway) */ + +#ifndef _NRT_INCLUDED +#define _NRT_INCLUDED + +#include +#define MAX_SPIGOTS 4 +#define NRT_MAX_DEVICENAME_SIZE 6 +#define NRT_VERSION 100 + +#define NRT_SUCCESS 0 +#define NRT_ALREADY_LOADED 15 +#define NRT_BAD_VERSION 10 +#define NRT_EADAPTER 4 +#define NRT_EADAPTYPE 9 +#define NRT_EAGAIN 11 +#define NRT_EINVAL 1 +#define NRT_EIO 7 +#define NRT_EMEM 6 +#define NRT_EPERM 2 +#define NRT_ESYSTEM 5 +#define NRT_NO_RDMA_AVAIL 8 +#define NRT_PNSDAPI 2 +#define NRT_UNKNOWN_ADAPTER 13 +#define NRT_WRONG_WINDOW_STATE 12 + +typedef struct { + uint32_t node_number; // to form unique ID + uint8_t num_spigots; //Ports for IB, spigots for HCPE + uint8_t padding1[3]; //future use + uint16_t lid[MAX_SPIGOTS]; //(IB only) Logical ID of each spigot + uint64_t network_id[MAX_SPIGOTS]; //Network ID for each adapter spigot + uint8_t lmc[MAX_SPIGOTS]; //(IB only) Logical mask of each spigot + uint8_t spigot_id[MAX_SPIGOTS]; //Port/Spigot IDs + uint16_t window_count; //Count of window in window_list + uint8_t padding2[6]; //future use + uint16_t *window_list; //array of available windows + uint64_t rcontext_block_count; //available rcxt blocks +} adap_resources_t; + + +typedef enum { NRT_WIN_UNAVAILABLE, //Initialization in progress + NRT_WIN_INVALID, // Not a usable window + NRT_WIN_AVAILABLE, // Ready for NRT load + NRT_WIN_RESERVED, //Window reserved, NRT not loaded + // (for POE-PMD) + NRT_WIN_READY, //NRT loaded + NRT_WIN_RUNNING //Window is running +} win_state_t; + +typedef struct { + pid_t client_pid; // Pid of process that loaded + uid_t uid; // Uid using the window + uint16_t window_id; // Window being reported + uint16_t bulk_transfer; // Is this lead using RDMA? + uint32_t rcontext_blocks; // rcontexts per window + win_state_t state; // Window state + uint8_t padding[4]; +} nrt_status_t; + +typedef enum { LEAVE_IN_USE, KILL } clean_option_t; + + +int nrt_adapter_resources(int version, char *adapter_device_string, + uint16_t adapter_type, + adap_resources_t *adapter_infor_OUT); + +int nrt_clean_window (int version, char *adapter_or_string, + uint16_t adapter_type, + clean_option_t leave_inuse_or_kill, + ushort window_id); + + +typedef struct { + uint16_t task_id; + uint16_t win_id; + uint32_t node_number; + char device_name[NRT_MAX_DEVICENAME_SIZE]; + uint16_t base_lid; + uint8_t port_id; + uint8_t lmc; + uint8_t port_status; //ignored + uint8_t padding[3]; +} nrt_creator_ib_per_task_input_t; + +typedef struct { + uint16_t task_id; +/* FIXME: We have no idea what this should contain */ +} nrt_creator_hpce_per_task_input_t; + +typedef union { + nrt_creator_hpce_per_task_input_t hpce_per_task; + nrt_creator_ib_per_task_input_t ib_per_task; +} nrt_creator_per_task_input_t; + +int nrt_load_table_rdma (int version, char *adapter_or_string, + uint16_t adapter_type, + uint64_t network_id, uid_t uid, pid_t pid, + ushort job_key, char *job_description, + uint use_bulk_transfer, + uint bulk_transfer_resources, int table_size, + nrt_creator_per_task_input_t *per_task_input); + + +int nrt_rdma_jobs(int version, char *adapter_device_string, + uint16_t adapter_type, uint16_t *job_count, + uint16_t **job_keys); + + +int nrt_status_adapter (int version, char *adapter_device_string, + uint16_t adapter_type, uint16_t *window_count, + nrt_status_t ** status_array); + + +int nrt_upload_window (int version, char * adapter_device_string, + uint16_t adapter_type, ushort job_key, + ushort window_id); + + + + +int nrt_version(void); +#endif -- GitLab From e4452ac48c037e8ff94fd7e6108411bafad24904 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Jan 2012 09:50:27 -0800 Subject: [PATCH 016/614] Fixing code for NRT build --- src/plugins/switch/nrt/nrt.c | 208 +++++++++++++++-------------- src/plugins/switch/nrt/nrt.h | 10 +- src/plugins/switch/nrt/slurm_nrt.h | 1 + 3 files changed, 111 insertions(+), 108 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2313d9c26a..7e7de1b2a3 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -68,6 +68,7 @@ #define NRT_JOBINFO_MAGIC 0xc00cc00b #define NRT_LIBSTATE_MAGIC 0xc00cc00c +#define JOB_DESC_LEN 64 /* Length of job description */ #define NRT_HOSTLEN 20 #define NRT_VERBOSE_PRINT 0 #define NRT_NODECOUNT 128 @@ -93,9 +94,9 @@ mode_t nrt_umask; */ typedef struct nrt_window { - uint16_t id; - uint32_t status; - uint16_t job_key; + uint16_t window_id; + uint32_t state; + uint16_t job_key; /* FIXME: Perhaps change to uid or client_pid? */ } nrt_window_t; typedef struct nrt_adapter { @@ -133,7 +134,7 @@ struct nrt_jobinfo { /* uid from getuid() */ /* pid from getpid() */ uint16_t job_key; - char job_desc[DESCLEN]; + char job_desc[JOB_DESC_LEN]; uint8_t bulk_xfer; /* flag */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -144,6 +145,7 @@ struct nrt_jobinfo { typedef struct { char adapter_name[NRT_MAX_DEVICENAME_SIZE]; + uint16_t adapter_type; uint16_t lid[MAX_SPIGOTS]; uint64_t network_id[MAX_SPIGOTS]; } nrt_cache_entry_t; @@ -161,7 +163,8 @@ static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); -static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name); +static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, + uint16_t adapter_type); static int _parse_nrt_file(hostlist_t *adapter_list); /* The _lock() and _unlock() functions are used to lock/unlock a @@ -284,7 +287,7 @@ _init_adapter_cache(void) int i, j; for (i = 0; i < NRT_MAXADAPTERS; i++) { - lid_cache[i].name[0] = 0; + lid_cache[i].adapter_name[0] = '\0'; for (j = 0; j < MAX_SPIGOTS; j++) { lid_cache[i].lid[j] = (uint16_t) -1; lid_cache[i].network_id[j] = (uint64_t) -1; @@ -327,7 +330,7 @@ _fill_in_adapter_cache(void) lid_cache[num].lid[j] = res.lid[j]; lid_cache[num].network_id[j] = res.network_id[j]; } - strncpy(lid_cache[num].name, adapter_name, + strncpy(lid_cache[num].adapter_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); free(res.window_list); @@ -351,7 +354,7 @@ _cache_lid(nrt_adapter_t *ap) int j; assert(ap); - int adapter_num = ap->name[3] - (int) '0'; + int adapter_num = ap->adapter_name[3] - (int) '0'; for (j = 0; j < MAX_SPIGOTS; j++) { lid_cache[adapter_num].lid[j] = ap->lid[j]; @@ -373,7 +376,7 @@ _get_network_id_from_adapter(char *adapter_name) int i; for (i = 0; i < NRT_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].name, + if (!strncmp(adapter_name, lid_cache[i].adapter_name, NRT_MAX_DEVICENAME_SIZE)) { /* FIXME: Return which spigot's network_id? */ return lid_cache[i].network_id[0]; @@ -394,7 +397,7 @@ _get_lid_from_adapter(char *adapter_name) int i; for (i = 0; i < NRT_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].name, + if (!strncmp(adapter_name, lid_cache[i].adapter_name, NRT_MAX_DEVICENAME_SIZE)) { /* FIXME: Return which spigot's lid? */ return lid_cache[i].lid[0]; @@ -408,9 +411,8 @@ _get_lid_from_adapter(char *adapter_name) static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, uint16_t adapter_type) { - adap_resoures_t res; + adap_resources_t res; nrt_status_t *status = NULL; - struct NTBL_STATUS *old = NULL; nrt_window_t *tmp_winlist = NULL; uint16_t win_count = 0; int err, i, j; @@ -460,12 +462,10 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * res.window_count); for (i = 0; i < res.window_count; i++) { - tmp_winlist[i].id = status->window_id; - tmp_winlist[i].status = status->rc; - old = status; - status = status->next; - free(old); + tmp_winlist[i].window_id = status->window_id; + tmp_winlist[i].state = status->state; } + free(status); nrt_adapter->window_list = tmp_winlist; return SLURM_SUCCESS; @@ -478,7 +478,7 @@ static char *_get_nrt_conf(void) int i; if (!val) - return xstrdup(NRTERATION_CONFIG_FILE); + return xstrdup(NRT_CONFIG_FILE); /* Replace file name on end of path */ i = strlen(val) - strlen("slurm.conf") + strlen("nrt.conf") + 1; @@ -630,8 +630,8 @@ _print_window_struct(nrt_window_t *w, char *buf, size_t size) count = snprintf(buf, size, " Window %u: %s\n", - w->id, - nrt_err_str(w->status)); + w->window_id, + nrt_err_str(w->state)); return count; } @@ -703,7 +703,7 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) count = _print_window_struct(&w[j], tmp, remaining); #else - if (w[j].status != NTBL_UNLOADED_STATE) + if (w[j].state != NTBL_UNLOADED_STATE) count = _print_window_struct(&w[j], tmp, remaining); else @@ -747,8 +747,8 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) } pack16(a->window_count, buf); for (j = 0; j < a->window_count; j++) { - pack16(a->window_list[j].id, buf); - pack32(a->window_list[j].status, buf); + pack16(a->window_list[j].window_id, buf); + pack32(a->window_list[j].state, buf); pack16(a->window_list[j].job_key, buf); } } @@ -1098,11 +1098,11 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) tmp_w = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * tmp_a->window_count); for (j = 0; j < tmp_a->window_count; j++) { - safe_unpack16(&tmp_w[j].id, buf); - safe_unpack32(&tmp_w[j].status, buf); + safe_unpack16(&tmp_w[j].window_id, buf); + safe_unpack32(&tmp_w[j].state, buf); safe_unpack16(&tmp_w[j].job_key, buf); if (!believe_window_status) { - tmp_w[j].status = NTBL_UNLOADED_STATE; + tmp_w[j].state = NTBL_UNLOADED_STATE; tmp_w[j].job_key = 0; } } @@ -1199,7 +1199,7 @@ _find_free_window(nrt_adapter_t *adapter) { for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { window = &adapter->window_list[i]; - if (window->status == NTBL_UNLOADED_STATE) + if (window->state == NTBL_UNLOADED_STATE) return window; } @@ -1214,12 +1214,12 @@ _find_window(nrt_adapter_t *adapter, int window_id) { for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { window = &adapter->window_list[i]; - if (window->id == window_id) + if (window->window_id == window_id) return window; } debug3("Unable to _find_window %d on adapter %s", - window_id, adapter->name); + window_id, adapter->adapter_name); return (nrt_window_t *) NULL; } @@ -1255,10 +1255,10 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, window = _find_free_window(adapter); if (window == NULL) { error("No free windows on node %s adapter %s", - node->name, adapter->name); + node->name, adapter->adapter_name); return SLURM_ERROR; } - window->status = NTBL_LOADED_STATE; + window->state = NTBL_LOADED_STATE; window->job_key = job_key; if (adapter->adapter_type == RSCT_DEV_TYPE_INFINIBAND) { @@ -1266,7 +1266,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table = tableinfo[i].table[task_id].ib_per_task; ib_table->task_id = task_id; ib_table->base_lid = adapter->lid[0]; - ib_table->win_id = window->id; + ib_table->win_id = window->window_id; } else { fatal("Missing support for adapter type %hu", adapter->adapter_type); @@ -1309,7 +1309,8 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, /* find the adapter */ for (i = 0; i < node->adapter_count; i++) { - debug("adapter %s at index %d", node->adapter_list[i].name, i); + debug("adapter %s at index %d", + node->adapter_list[i].adapter_name, i); if (strcasecmp(node->adapter_list[i].adapter_name, adapter_name) == 0) { adapter = &node->adapter_list[i]; @@ -1330,13 +1331,13 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, node->name, adapter->name); return SLURM_ERROR; } - window->status = NTBL_LOADED_STATE; + window->state = NTBL_LOADED_STATE; window->job_key = job_key; table = tableinfo[0].table[task_id]; table->task_id = task_id; table->lid = adapter->lid; - table->window_id = window->id; + table->window_id = window->window_id; strncpy(tableinfo[0].adapter_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); @@ -1410,10 +1411,10 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, "lid %hu, window %hu for task %d", state == NTBL_UNLOADED_STATE ? "UNLOADED" : "LOADED", adapter->name, - table->lid, table->window_id, task_id); - window = _find_window(adapter, table->window_id); + table->lid, table->win_id, task_id); + window = _find_window(adapter, table->win_id); if (window) { - window->status = state; + window->state = state; window->job_key = (state == NTBL_UNLOADED_STATE) ? 0 : job_key; } @@ -1441,23 +1442,6 @@ _print_table(NTBL **table, int size) } printf("--End NTBL table--\n"); } - -/* Used by: all */ -static void -_print_index(char *index, int size) -{ - int i; - - assert(index); - assert(size > 0); - - printf("--Begin lid index--\n"); - for (i = 0; i < size; i++) { - printf(" task_id: %u\n", i); - printf(" name: %s\n", index + (i * NRT_MAX_DEVICENAME_SIZE)); - } - printf("--End lid index--\n"); -} #endif @@ -1556,7 +1540,7 @@ _free_windows_by_job_key(uint16_t job_key, char *nodename) if (adapter->window_list == NULL) { error("_free_windows_by_job_key, " "window_list NULL for node %s adapter %s", - nodename, adapter->name); + node->name, adapter->adapter_name); continue; } /* We could check here to see if this adapter's name @@ -1572,7 +1556,7 @@ _free_windows_by_job_key(uint16_t job_key, char *nodename) if (window->job_key == job_key) { /* debug3("Freeing adapter %s window %d", adapter->name, window->id); */ - window->status = NTBL_UNLOADED_STATE; + window->state = NTBL_UNLOADED_STATE; window->job_key = 0; } } @@ -1681,7 +1665,7 @@ nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, jp->bulk_xfer = (uint8_t) bulk_xfer; jp->job_key = _next_key(); - snprintf(jp->job_desc, DESCLEN, + snprintf(jp->job_desc, JOB_DESC_LEN, "slurm switch/NRT driver key=%d", jp->job_key); hi = hostlist_iterator_create(hl); @@ -1798,7 +1782,7 @@ nrt_pack_jobinfo(nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack16(j->job_key, buf); - packmem(j->job_desc, DESCLEN, buf); + packmem(j->job_desc, JOB_DESC_LEN, buf); pack8(j->bulk_xfer, buf); pack16(j->tables_per_task, buf); for (i = 0; i < j->tables_per_task; i++) { @@ -1852,7 +1836,7 @@ nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); safe_unpack16(&j->job_key, buf); safe_unpackmem(j->job_desc, &size, buf); - if (size != DESCLEN) + if (size != JOB_DESC_LEN) goto unpack_error; safe_unpack8(&j->bulk_xfer, buf); safe_unpack16(&j->tables_per_task, buf); @@ -1909,8 +1893,9 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) for (i = 0; i < job->tables_per_task; i++) { new->tableinfo[i].table = - (NTBL **) xmalloc(job->tableinfo[i].table_length - * sizeof(NTBL *)); + (nrt_creator_per_task_input_t **) + xmalloc(job->tableinfo[i].table_length * + sizeof(nrt_creator_per_task_input_t *)); for (k = 0; k < new->tableinfo[i].table_length; k++) { new->tableinfo[i].table[k] = (NTBL *) xmalloc(sizeof(NTBL)); @@ -2003,9 +1988,9 @@ nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) */ static int _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, - unsigned short window_id, int retry) + uint16_t window_id, int retry) { - int err, i; + int err, i, j; uint16_t win_count; nrt_status_t *status; @@ -2024,16 +2009,16 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, break; } if (j >= win_count) { - error("nrt_status_adapter(%s, %u), window %hu not " + error("nrt_status_adapter(%s, %hu), window %hu not " "found", adapter_name, adapter_type, window_id); free(status); return SLURM_ERROR; } - if (status[j]->state == NRT_WIN_AVAILBLE) + if (status[j]->state == NRT_WIN_AVAILBLE) { free(status); return SLURM_SUCCESS; } - debug2("nrt_status_adapter(%s, %u), window %hu state %d" + debug2("nrt_status_adapter(%s, %u), window %u state %d", adapter_name, adapter_type, window_id, status[j]->state); free(status); @@ -2099,7 +2084,7 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) info("nrt_rdma_jobs:"); info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); for (i = 0; i < job_count; i++) - info(" job_key[%d]:%hu", job_keys[i]); + info(" job_keys[%d]:%hu", i, job_keys[i]); #endif free(job_keys); if (job_count >= 4) { @@ -2164,28 +2149,35 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) info("attempting nrt_load_table_rdma:"); info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - info(" network_id:%u uid:%u pid:%u", network_id, + info(" network_id:%"PRIu64" uid:%u pid:%u", network_id, (uint32_t)uid, (uint32_t)pid); info(" job_key:%hd job_desc:%s", jp->job_key, jp->job_desc); info(" bulk_xfer:%u bulk_xfer_res:%u", jp->bulk_xfer, bulk_xfer_resources); for (j = 0; j < jp->tableinfo[i].table_length; j++) { - info(" task_id[%d]:%hu", j, - jp->tableinfo[i].table[j]->task_id); - info(" win_id[%d]:%hu", j, - jp->tableinfo[i].table[j]->win_id); - info(" node_number[%d]:%u", j, - jp->tableinfo[i].table[j]->node_number); - info(" device_name[%d]:%s", j, - jp->tableinfo[i].table[j]->device_name); - info(" base_lid[%d]:%hu", j, - jp->tableinfo[i].table[j]->base_lid); - info(" port_id[%d]:%hu", j, - jp->tableinfo[i].table[j]->port_id); - info(" lmc[%d]:%hu", j, - jp->tableinfo[i].table[j]->lmc); - info(" port_status[%d]:%hu", j, - jp->tableinfo[i].table[j]->port_status); +/* FIXME: table contains a union, it could contain either IB or HPCE data */ + if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &jp->tableinfo[i].table[j]-> + ib_per_task; + info(" task_id[%d]:%hu", j, + ib_tbl_ptr->task_id); + info(" win_id[%d]:%hu", j, + ib_tbl_ptr->win_id); + info(" node_number[%d]:%u", j, + ib_tbl_ptr->node_number); + info(" device_name[%d]:%s", j, + ib_tbl_ptr->device_name); + info(" base_lid[%d]:%hu", j, + ib_tbl_ptr->base_lid); + info(" port_id[%d]:%hu", j, + ib_tbl_ptr->port_id); + info(" lmc[%d]:%hu", j, ib_tbl_ptr->lmc); + info(" port_status[%d]:%hu", j, + ib_tbl_ptr->port_status); + } else { + fatal("nrt_load_table: lack HPCE code"); + } } #endif err = nrt_load_table_rdma(NRT_VERSION, @@ -2253,7 +2245,8 @@ nrt_unload_table(nrt_jobinfo_t *jp) int i, j; int err; char *adapter_name; - NTBL **table; + uint16_t adapter_type; + nrt_creator_per_task_input_t **table; uint32_t table_length; int local_lid; int rc = SLURM_SUCCESS; @@ -2265,18 +2258,28 @@ nrt_unload_table(nrt_jobinfo_t *jp) table = jp->tableinfo[i].table; table_length = jp->tableinfo[i].table_length; adapter_name = jp->tableinfo[i].adapter_name; + adapter_type = jp->tableinfo[i].adapter_type; local_lid = _get_lid_from_adapter(adapter_name); for (j = 0; j < table_length; j++) { - if (table[j]->lid != local_lid) - continue; - debug3("freeing adapter %s lid %d window %d job_key %d", - adapter_name, table[j]->lid, - table[j]->window_id, jp->job_key); - err = _unload_window(adapter_name, - jp->job_key, - table[j]->window_id, - retry); +/* FIXME: table contains a union, it could contain either IB or HPCE data */ + if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &table[j]->ib_per_task; + if (ib_tbl_ptr->base_lid != local_lid) + continue; + debug3("freeing adapter %s base_lid %hu win_id %hu " + "job_key %hu", + adapter_name, ib_tbl_ptr->base_lid, + ib_tbl_ptr->win_id, jp->job_key); + err = _unload_window(adapter_name, + adapter_type, + jp->job_key, + ib_tbl_ptr->win_id, + retry); + } else { + fatal("nrt_unload_table: lack HPCE code"); + } if (err != SLURM_SUCCESS) { rc = err; slurm_seterrno(EUNLOAD); @@ -2390,14 +2393,11 @@ nrt_libstate_save(Buf buffer, bool free_flag) static int _unpack_libstate(nrt_libstate_t *lp, Buf buffer) { - int offset; - int node_count; + uint32_t node_count; int i; assert(lp->magic == NRT_LIBSTATE_MAGIC); - offset = get_buf_offset(buffer); - safe_unpack32(&lp->magic, buffer); safe_unpack32(&node_count, buffer); for (i = 0; i < node_count; i++) { @@ -2415,7 +2415,7 @@ _unpack_libstate(nrt_libstate_t *lp, Buf buffer) unpack_error: error("unpack error in _unpack_libstate"); - slurm_seterrno_ret(EBADMAGIC_NRTLIBSTATE); + slurm_seterrno_ret(EBADMAGIC_NRT_LIBSTATE); return SLURM_ERROR; } @@ -2527,12 +2527,14 @@ extern void nrt_dump_adapter(char *adapter_name, uint16_t adapter_type, info(" num_spigots:%hu", adapter_res->num_spigots); for (i = 0; i < MAX_SPIGOTS; i++) { info(" lid[%d]:%hu", i, adapter_res->lid[i]); - info(" network_id[%d]:%u", i, adapter_res->network_id[i]); + info(" network_id[%d]:%"PRIu64"", + i, adapter_res->network_id[i]); info(" lmc[%d]:%hu", i, adapter_res->lmc[i]); info(" spigot_id[%d]:%hu", i, adapter_res->spigot_id[i]); } info(" window_count:%hu", adapter_res->window_count); for (i = 0; i < adapter_res->window_count; i++) - info(" window_list[%d]:%hu", i, adapter_res->window_list); - info(" rcontext_block_count:%u", adapter_res->rcontext_block_count); + info(" window_list[%d]:%hu", i, adapter_res->window_list[i]); + info(" rcontext_block_count:%"PRIu64"", + adapter_res->rcontext_block_count); } diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h index 74aa49a258..29c4bdb5f8 100644 --- a/src/plugins/switch/nrt/nrt.h +++ b/src/plugins/switch/nrt/nrt.h @@ -20,7 +20,7 @@ #define NRT_EPERM 2 #define NRT_ESYSTEM 5 #define NRT_NO_RDMA_AVAIL 8 -#define NRT_PNSDAPI 2 +#define NRT_PNSDAPI 3 #define NRT_UNKNOWN_ADAPTER 13 #define NRT_WRONG_WINDOW_STATE 12 @@ -39,7 +39,7 @@ typedef struct { } adap_resources_t; -typedef enum { NRT_WIN_UNAVAILABLE, //Initialization in progress +typedef enum { NRT_WIN_UNAVAILABLE, //Initialization in progress NRT_WIN_INVALID, // Not a usable window NRT_WIN_AVAILABLE, // Ready for NRT load NRT_WIN_RESERVED, //Window reserved, NRT not loaded @@ -89,8 +89,8 @@ typedef struct { } nrt_creator_hpce_per_task_input_t; typedef union { - nrt_creator_hpce_per_task_input_t hpce_per_task; - nrt_creator_ib_per_task_input_t ib_per_task; + nrt_creator_hpce_per_task_input_t hpce_per_task; + nrt_creator_ib_per_task_input_t ib_per_task; } nrt_creator_per_task_input_t; int nrt_load_table_rdma (int version, char *adapter_or_string, @@ -112,7 +112,7 @@ int nrt_status_adapter (int version, char *adapter_device_string, nrt_status_t ** status_array); -int nrt_upload_window (int version, char * adapter_device_string, +int nrt_unload_window (int version, char * adapter_device_string, uint16_t adapter_type, ushort job_key, ushort window_id); diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 806b7434d3..f3bc55a1a8 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -49,6 +49,7 @@ #if HAVE_LIBNRT # include +# define RSCT_DEVTYPE_INFINIBAND 32 #else # error "Must have libnrt to compile this module!" #endif -- GitLab From fbcc109b8d3477f94c8f82574d7925fc9f8f3f8c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Jan 2012 11:24:05 -0800 Subject: [PATCH 017/614] More mods for NRT support --- src/plugins/switch/nrt/nrt.c | 173 ++++++++++++++++++++--------------- 1 file changed, 101 insertions(+), 72 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7e7de1b2a3..62c3e50105 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -499,6 +499,7 @@ static int _parse_nrt_file(hostlist_t *adapter_list) s_p_hashtbl_t *tbl; char *adapter_name; +/* FIXME: Need to set adapter_type per nrt.conf file */ debug("Reading the nrt.conf file"); if (!nrt_conf) nrt_conf = _get_nrt_conf(); @@ -530,17 +531,23 @@ static int _get_adapters(nrt_adapter_t *list, int *count) { hostlist_iterator_t adapter_iter; - char *adapter = NULL; - int i; + char *adapter_name = NULL; + uint16_t adapter_type; + int i, rc; assert(list != NULL); assert(adapter_list != NULL); adapter_iter = hostlist_iterator_create(adapter_list); - for (i = 0; (adapter = hostlist_next(adapter_iter)); i++) { - if (_set_up_adapter(list + i, adapter) == SLURM_ERROR) - fatal("Failed to set up adapter %s.", adapter); - free(adapter); + for (i = 0; (adapter_name = hostlist_next(adapter_iter)); i++) { +/* FIXME: Need to set adapter_type per nrt.conf file */ + adapter_type = RSCT_DEVTYPE_INFINIBAND; + rc = _set_up_adapter(list + i, adapter_name, adapter_type); + if (rc != SLURM_SUCCESS) { + fatal("Failed to set up adapter %s of type %u", + adapter_name, adapter_type); + } + free(adapter_name); } hostlist_iterator_destroy(adapter_iter); @@ -703,7 +710,7 @@ nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) count = _print_window_struct(&w[j], tmp, remaining); #else - if (w[j].state != NTBL_UNLOADED_STATE) + if (w[j].state != NRT_WIN_AVAILABLE) count = _print_window_struct(&w[j], tmp, remaining); else @@ -1012,7 +1019,7 @@ unpack_error: * * If believe_window_status is true, we honor the window status variables * from the packed nrt_nodeinfo_t. If it is false we set the status of - * all windows to NTBL_UNLOADED_STATE. + * all windows to NRT_WIN_AVAILABLE. * * Used by: slurmctld */ @@ -1025,7 +1032,7 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) uint32_t size; nrt_nodeinfo_t *tmp_n = NULL; char *name_ptr, name[NRT_HOSTLEN]; - int magic; + uint32_t magic; /* NOTE! We don't care at this point whether n is valid. * If it's NULL, we will just forego the copy at the end. @@ -1036,7 +1043,7 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) */ safe_unpack32(&magic, buf); if (magic != NRT_NODEINFO_MAGIC) - slurm_seterrno_ret(EBADMAGIC_NRTNODEINFO); + slurm_seterrno_ret(EBADMAGIC_NRT_NODEINFO); safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != NRT_HOSTLEN) goto unpack_error; @@ -1102,7 +1109,7 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack32(&tmp_w[j].state, buf); safe_unpack16(&tmp_w[j].job_key, buf); if (!believe_window_status) { - tmp_w[j].state = NTBL_UNLOADED_STATE; + tmp_w[j].state = NRT_WIN_AVAILABLE; tmp_w[j].job_key = 0; } } @@ -1112,9 +1119,8 @@ _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) copy_node: /* Only copy the node_info structure if the caller wants it */ - if (n != NULL) - if (_copy_node(n, tmp_n) != SLURM_SUCCESS) - return SLURM_ERROR; + if ((n != NULL) && (_copy_node(n, tmp_n) != SLURM_SUCCESS)) + return SLURM_ERROR; #if NRT_DEBUG _print_libstate(nrt_state); @@ -1199,7 +1205,7 @@ _find_free_window(nrt_adapter_t *adapter) { for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { window = &adapter->window_list[i]; - if (window->state == NTBL_UNLOADED_STATE) + if (window->state == NRT_WIN_AVAILABLE) return window; } @@ -1224,7 +1230,7 @@ _find_window(nrt_adapter_t *adapter, int window_id) { } -/* For a given process, fill out an NTBL +/* For a given process, fill out an nrt_creator_per_task_input_t * struct (an array of these makes up the network table loaded * for each job). Assign adapters, lids and switch windows to * each task in a job. @@ -1258,12 +1264,12 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, node->name, adapter->adapter_name); return SLURM_ERROR; } - window->state = NTBL_LOADED_STATE; + window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; - if (adapter->adapter_type == RSCT_DEV_TYPE_INFINIBAND) { + if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_table; - ib_table = tableinfo[i].table[task_id].ib_per_task; + ib_table = &tableinfo[i].table[task_id]->ib_per_task; ib_table->task_id = task_id; ib_table->base_lid = adapter->lid[0]; ib_table->win_id = window->window_id; @@ -1272,7 +1278,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, adapter->adapter_type); } - strncpy(tableinfo[i].adapter_name, adapter->name, + strncpy(tableinfo[i].adapter_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); } @@ -1280,7 +1286,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, } -/* For a given process, fill out an NTBL +/* For a given process, fill out an nrt_creator_per_task_input_t * struct (an array of these makes up the network table loaded * for each job). Assign a single adapter, lid and switch window to * a task in a job. @@ -1294,7 +1300,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, nrt_nodeinfo_t *node; nrt_adapter_t *adapter = NULL; nrt_window_t *window; - NTBL *table; + nrt_creator_per_task_input_t *table; int i; assert(tableinfo); @@ -1328,16 +1334,23 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, window = _find_free_window(adapter); if (window == NULL) { error("No free windows on node %s adapter %s", - node->name, adapter->name); + node->name, adapter->adapter_name); return SLURM_ERROR; } - window->state = NTBL_LOADED_STATE; + window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; table = tableinfo[0].table[task_id]; - table->task_id = task_id; - table->lid = adapter->lid; - table->window_id = window->window_id; + if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { +/* FIXME: table contains a union, it could contain either IB or HPCE data */ + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &table->ib_per_task; + ib_tbl_ptr->task_id = task_id; + ib_tbl_ptr->base_lid = adapter->lid[0]; + ib_tbl_ptr->win_id = window->window_id; + } else { + fatal("_allocate_window_single: lack HPCE code"); + } strncpy(tableinfo[0].adapter_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); @@ -1346,20 +1359,20 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, } -/* Find the correct NTBL structs and set the state +/* Find the correct NRT structs and set the state * of the switch windows for the specified task_id. * * Used by: slurmctld */ static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, enum NTBL_RC state, + char *hostname, int task_id, win_state_t state, uint16_t job_key) { nrt_nodeinfo_t *node = NULL; nrt_adapter_t *adapter = NULL; nrt_window_t *window = NULL; - NTBL *table = NULL; + nrt_creator_per_task_input_t *table = NULL; int i, j; bool adapter_found; @@ -1392,9 +1405,9 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, /* Find the adapter that matches the one in tableinfo */ for (j = 0; j < node->adapter_count; j++) { adapter = &node->adapter_list[j]; - if (strcasecmp(adapter->adapter_name, - tableinfo[i].adapter_name) == 0 - && adapter->lid == table->lid) { + if ((strcasecmp(adapter->adapter_name, + tableinfo[i].adapter_name) == 0) + && (adapter->lid == table->lid)) { adapter_found = true; break; } @@ -1409,14 +1422,14 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, debug3("Setting status %s adapter %s, " "lid %hu, window %hu for task %d", - state == NTBL_UNLOADED_STATE ? "UNLOADED" : "LOADED", - adapter->name, + state == NRT_WIN_UNAVAILABLE ? "UNLOADED" : "LOADED", + adapter->adapter_name, table->lid, table->win_id, task_id); window = _find_window(adapter, table->win_id); if (window) { window->state = state; window->job_key = - (state == NTBL_UNLOADED_STATE) ? 0 : job_key; + (state == NRT_WIN_UNAVAILABLE) ? 0 : job_key; } } @@ -1427,20 +1440,27 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, #if NRT_DEBUG /* Used by: all */ static void -_print_table(NTBL **table, int size) +_print_table(nrt_creator_per_task_input_t **table, int size) { + uint16_t adapter_type = RSCT_DEVTYPE_INFINIBAND; int i; assert(table); assert(size > 0); - printf("--Begin NTBL table--\n"); + printf("--Begin NRT table--\n"); for (i = 0; i < size; i++) { - printf(" task_id: %u\n", table[i]->task_id); - printf(" window_id: %u\n", table[i]->window_id); - printf(" lid: %u\n", table[i]->lid); + if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &table[i]->ib_per_task; + printf(" task_id: %u\n", ib_tbl_ptr->task_id); + printf(" window_id: %u\n", ib_tbl_ptr->win_id); + printf(" lid: %u\n", ib_tbl_ptr->base_lid); + } else { + fatal("_print_table: lack HPCE code"); + } } - printf("--End NTBL table--\n"); + printf("--End NRT table--\n"); } #endif @@ -1451,7 +1471,7 @@ _print_table(NTBL **table, int size) * Used by: slurmctld */ static int -_job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) +_job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, win_state_t state) { hostlist_iterator_t hi; char *host; @@ -1459,7 +1479,7 @@ _job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) int nprocs; int nnodes; int i, j; - int rc; + int err, rc = SLURM_SUCCESS; int task_cnt; int full_node_cnt; int min_procs_per_node; @@ -1500,10 +1520,11 @@ _job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) task_cnt = min_procs_per_node; for (j = 0; j < task_cnt; j++) { - rc = _window_state_set(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - state, jp->job_key); + err = _window_state_set(jp->tables_per_task, + jp->tableinfo, + host, proc_cnt, + state, jp->job_key); + rc = MAX(rc, err); proc_cnt++; } free(host); @@ -1511,7 +1532,7 @@ _job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) _unlock(); hostlist_iterator_destroy(hi); - return SLURM_SUCCESS; + return rc; } /* @@ -1556,7 +1577,7 @@ _free_windows_by_job_key(uint16_t job_key, char *nodename) if (window->job_key == job_key) { /* debug3("Freeing adapter %s window %d", adapter->name, window->id); */ - window->state = NTBL_UNLOADED_STATE; + window->state = NRT_WIN_UNAVAILABLE; window->job_key = 0; } } @@ -1564,7 +1585,7 @@ _free_windows_by_job_key(uint16_t job_key, char *nodename) } /* Find all of the windows used by job step "jp" on the hosts - * designated in hostlist "hl" and mark their state NTBL_UNLOADED_STATE. + * designated in hostlist "hl" and mark their state NRT_WIN_AVAILABLE. * * Used by: slurmctld */ @@ -1619,7 +1640,7 @@ nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) /* Find all of the windows used by job step "jp" and mark their - * state NTBL_LOADED_STATE. + * state NRT_WIN_UNAVAILABLE. * * Used by the slurmctld at startup time to restore the allocation * status of any job steps that were running at the time the previous @@ -1629,7 +1650,7 @@ nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) extern int nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl) { - return _job_step_window_state(jp, hl, NTBL_LOADED_STATE); + return _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); } @@ -1694,11 +1715,13 @@ nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, * sizeof(nrt_tableinfo_t)); for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; - jp->tableinfo[i].table = (NTBL **) xmalloc(nprocs - * sizeof(NTBL *)); + jp->tableinfo[i].table = (nrt_creator_per_task_input_t **) + xmalloc(nprocs * + sizeof(nrt_creator_per_task_input_t *)); for (j = 0; j < nprocs; j++) { jp->tableinfo[i].table[j] = - (NTBL *) xmalloc(sizeof(NTBL)); + (nrt_creator_per_task_input_t *) + xmalloc(sizeof(nrt_creator_per_task_input_t)); } } @@ -1756,7 +1779,7 @@ fail: return SLURM_FAILURE; } -staic void +static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) { int i; @@ -1801,10 +1824,13 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) int i; safe_unpack32(&tableinfo->table_length, buf); - tableinfo->table = (NTBL **) xmalloc(tableinfo->table_length - * sizeof(NTBL *)); + tableinfo->table = (nrt_creator_per_task_input_t **) + xmalloc(tableinfo->table_length * + sizeof(nrt_creator_per_task_input_t *)); for (i = 0; i < tableinfo->table_length; i++) { - tableinfo->table[i] = (NTBL *) xmalloc(sizeof(NTBL)); + tableinfo->table[i] = (nrt_creator_per_task_input_t *) + xmalloc(sizeof( + nrt_creator_per_task_input_t)); safe_unpack16(&tableinfo->table[i]->task_id, buf); safe_unpack16(&tableinfo->table[i]->base_lid, buf); @@ -1898,7 +1924,9 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) sizeof(nrt_creator_per_task_input_t *)); for (k = 0; k < new->tableinfo[i].table_length; k++) { new->tableinfo[i].table[k] = - (NTBL *) xmalloc(sizeof(NTBL)); + (nrt_creator_per_task_input_t *) + xmalloc(sizeof( + nrt_creator_per_task_input_t)); memcpy(new->tableinfo[i].table[k], job->tableinfo[i].table[k], sizeof(nrt_tableinfo_t)); @@ -1981,7 +2009,7 @@ nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) /* * Check up to "retry" times for "window_id" on "adapter_name" - * to switch to the NTBL_UNLOADED_STATE. Sleep one second between + * to switch to the NRT_WIN_AVAILABLE. Sleep one second between * each retry. * * Used by: slurmd @@ -2005,7 +2033,7 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, return SLURM_ERROR; } for (j = 0; j < win_count; j++) { - if (status[j]->window_id == window_id) + if (status[j].window_id == window_id) break; } if (j >= win_count) { @@ -2014,13 +2042,13 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, free(status); return SLURM_ERROR; } - if (status[j]->state == NRT_WIN_AVAILBLE) { + if (status[j].state == NRT_WIN_AVAILABLE) { free(status); return SLURM_SUCCESS; } debug2("nrt_status_adapter(%s, %u), window %u state %d", adapter_name, adapter_type, window_id, - status[j]->state); + status[j].state); free(status); } @@ -2029,9 +2057,9 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, /* - * Look through the table and find all of the NTBL that are for an adapter on - * this node. Wait until the window from each local NTBL is in the - * NTBL_UNLOADED_STATE. + * Look through the table and find all of the NRT that are for an adapter on + * this node. Wait until the window from each local NRT is in the + * NRT_WIN_AVAILABLE. * * Used by: slurmd */ @@ -2050,6 +2078,7 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) if (tableinfo->table[i]->lid == lid) { err = _wait_for_window_unloaded( tableinfo->adapter_name, + tableinfo->adapter_type, tableinfo->table[i]->window_id, retry); if (err != SLURM_SUCCESS) { @@ -2074,7 +2103,7 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) uint16_t *job_keys; int err, i; - err = nrt_rdma_jobs(NRT_VERSION, adapter_name,adapter_type + err = nrt_rdma_jobs(NRT_VERSION, adapter_name, adapter_type, &job_count, &job_keys); if (err != NRT_SUCCESS) { error("nrt_rdma_jobs(): %s", nrt_err_str(err)); @@ -2129,7 +2158,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) #endif adapter_name = jp->tableinfo[i].adapter_name; adapter_type = 0; /* FIXME: Load from where? */ - network_id = _get_network_id_from_adapter(adapter); + network_id = _get_network_id_from_adapter(adapter_name); rc = _wait_for_all_windows(&jp->tableinfo[i]); if (rc != SLURM_SUCCESS) @@ -2187,7 +2216,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) jp->bulk_xfer, bulk_xfer_resources, jp->tableinfo[i].table_length, - jp->tableinfo[i].table); + *jp->tableinfo[i].table); if (err != NRT_SUCCESS) { error("unable to load table: [%d] %s", err, nrt_err_str(err)); @@ -2466,7 +2495,7 @@ nrt_libstate_clear(void) window = &adapter->window_list[k]; if (!window) continue; - window->status = NTBL_UNLOADED_STATE; + window->state = NRT_WIN_UNAVAILABLE; } } } -- GitLab From 661d1f76badac1f0d5693458570e4bf1ba407072 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Jan 2012 12:34:16 -0800 Subject: [PATCH 018/614] Now have clean build of NRT code --- src/plugins/switch/nrt/README | 7 +- src/plugins/switch/nrt/nrt.c | 132 +++++++++++++++++----------- src/plugins/switch/nrt/switch_nrt.c | 13 +-- 3 files changed, 94 insertions(+), 58 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index adf6d9c65f..01f1c18721 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -2,17 +2,20 @@ 1A. Add nrt.conf man page 1B. Add nrt.conf example 1C. Modify nrt.conf parsing and data structures to support adapter_type - (e.g. RSCT_DEVTYPE_INFINIBAND) + (e.g. currently hard-wired to type RSCT_DEVTYPE_INFINIBAND) 2. NRT APIs 2A. Convert all Federation switch API calls to Torrent switch API calls (largely completed as part of evaluation, but largely untested) 2B. Convert Federation switch data structures to Torrent switch data structures Add adapter type - In the adapter resources, how "spigot" used? "lid" and "network_id" now arrays + In the adapter resources, how "spigot" used? + "lid" and "network_id" are now arrays, how are they used? Resolve window state incompatabilities Remove adapter memory specifications (done) Many window and adapter fields that do remain have different sizes + We have no details about the differences in data structures between IB and HPCE, + but code changes for that will clearly be needed (started as part of evaluation, but the work is untested) 3. POE support diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 62c3e50105..3da420d282 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -304,7 +304,7 @@ _fill_in_adapter_cache(void) { hostlist_iterator_t adapters; char *adapter_name = NULL; - uint16_t adapter_type; /* FIXME: How to fill in? */ + uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; adap_resources_t res; int num; int rc; @@ -1214,7 +1214,7 @@ _find_free_window(nrt_adapter_t *adapter) { static nrt_window_t * -_find_window(nrt_adapter_t *adapter, int window_id) { +_find_window(nrt_adapter_t *adapter, uint16_t window_id) { int i; nrt_window_t *window; @@ -1224,7 +1224,7 @@ _find_window(nrt_adapter_t *adapter, int window_id) { return window; } - debug3("Unable to _find_window %d on adapter %s", + debug3("Unable to _find_window %hu on adapter %s", window_id, adapter->adapter_name); return (nrt_window_t *) NULL; } @@ -1375,6 +1375,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, nrt_creator_per_task_input_t *table = NULL; int i, j; bool adapter_found; + uint16_t win_id = 0; assert(tableinfo); assert(hostname); @@ -1405,27 +1406,38 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, /* Find the adapter that matches the one in tableinfo */ for (j = 0; j < node->adapter_count; j++) { adapter = &node->adapter_list[j]; - if ((strcasecmp(adapter->adapter_name, - tableinfo[i].adapter_name) == 0) - && (adapter->lid == table->lid)) { - adapter_found = true; - break; + if (strcasecmp(adapter->adapter_name, + tableinfo[i].adapter_name)) + continue; + if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &table->ib_per_task; + if (adapter->lid[0] == ib_tbl_ptr->base_lid) { + adapter_found = true; + win_id = ib_tbl_ptr->win_id; + debug3("Setting status %s adapter %s " + "lid %hu window %hu for task %d", + state == NRT_WIN_UNAVAILABLE ? + "UNLOADED" : "LOADED", + adapter->adapter_name, + ib_tbl_ptr->base_lid, + ib_tbl_ptr->win_id, task_id); + break; + } + } else { + fatal("_window_state_set: Missing support for " + "adapter type %hu", + adapter->adapter_type); + } } if (!adapter_found) { - if (table->lid != 0) - error("Did not find the correct adapter: " - "%hu vs. %hu", - adapter->lid, table->lid); + error("Did not find adapter %s with lid %hu ", + adapter->adapter_name, adapter->lid[0]); return SLURM_ERROR; } - debug3("Setting status %s adapter %s, " - "lid %hu, window %hu for task %d", - state == NRT_WIN_UNAVAILABLE ? "UNLOADED" : "LOADED", - adapter->adapter_name, - table->lid, table->win_id, task_id); - window = _find_window(adapter, table->win_id); + window = _find_window(adapter, win_id); if (window) { window->state = state; window->job_key = @@ -1785,10 +1797,17 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) int i; pack32(tableinfo->table_length, buf); - for (i = 0; i < tableinfo->table_length; i++) { - pack16(tableinfo->table[i]->task_id, buf); - pack16(tableinfo->table[i]->base_lid, buf); - pack16(tableinfo->table[i]->win_id, buf); + if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + for (i = 0; i < tableinfo->table_length; i++) { + ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + pack16(ib_tbl_ptr->task_id, buf); + pack16(ib_tbl_ptr->base_lid, buf); + pack16(ib_tbl_ptr->win_id, buf); + } + } else { + fatal("_pack_tableinfo: Missing support for adapter " + "type %hu", tableinfo->adapter_type); } packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); } @@ -1824,17 +1843,23 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) int i; safe_unpack32(&tableinfo->table_length, buf); - tableinfo->table = (nrt_creator_per_task_input_t **) - xmalloc(tableinfo->table_length * - sizeof(nrt_creator_per_task_input_t *)); - for (i = 0; i < tableinfo->table_length; i++) { - tableinfo->table[i] = (nrt_creator_per_task_input_t *) - xmalloc(sizeof( - nrt_creator_per_task_input_t)); - - safe_unpack16(&tableinfo->table[i]->task_id, buf); - safe_unpack16(&tableinfo->table[i]->base_lid, buf); - safe_unpack16(&tableinfo->table[i]->win_id, buf); + if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + tableinfo->table = (nrt_creator_per_task_input_t **) + xmalloc(tableinfo->table_length * + sizeof(nrt_creator_per_task_input_t *)); + for (i = 0; i < tableinfo->table_length; i++) { + tableinfo->table[i] = (nrt_creator_per_task_input_t *) + xmalloc(sizeof( + nrt_creator_per_task_input_t)); + ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + safe_unpack16(&ib_tbl_ptr->task_id, buf); + safe_unpack16(&ib_tbl_ptr->base_lid, buf); + safe_unpack16(&ib_tbl_ptr->win_id, buf); + } + } else { + fatal("_unpack_tableinfo: Missing support for adapter " + "type %hu", tableinfo->adapter_type); } safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != NRT_MAX_DEVICENAME_SIZE) @@ -2074,23 +2099,30 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) lid = _get_lid_from_adapter(tableinfo->adapter_name); - for (i = 0; i < tableinfo->table_length; i++) { - if (tableinfo->table[i]->lid == lid) { - err = _wait_for_window_unloaded( - tableinfo->adapter_name, - tableinfo->adapter_type, - tableinfo->table[i]->window_id, - retry); - if (err != SLURM_SUCCESS) { - error("Window %hu adapter %s did not become" - " free within %d seconds", - tableinfo->table[i]->window_id, - tableinfo->adapter_name, - retry); - rc = err; - retry = 2; + if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + for (i = 0; i < tableinfo->table_length; i++) { + ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + if (ib_tbl_ptr->base_lid == lid) { + err = _wait_for_window_unloaded( + tableinfo->adapter_name, + tableinfo->adapter_type, + ib_tbl_ptr->win_id, + retry); + if (err != SLURM_SUCCESS) { + error("Window %hu adapter %s did not " + "become free within %d seconds", + ib_tbl_ptr->win_id, + tableinfo->adapter_name, + retry); + rc = err; + retry = 2; + } } } + } else { + fatal("_wait_for_all_windows: Missing support for adapter " + "type %hu", tableinfo->adapter_type); } return rc; @@ -2209,6 +2241,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) } } #endif +/* FIXME: nrt_load_table_rdma can not be array of pointers, but must be array of creator elements */ err = nrt_load_table_rdma(NRT_VERSION, adapter_name, adapter_type, network_id, uid, pid, @@ -2272,13 +2305,12 @@ extern int nrt_unload_table(nrt_jobinfo_t *jp) { int i, j; - int err; + int err = SLURM_SUCCESS, rc = SLURM_SUCCESS; char *adapter_name; uint16_t adapter_type; nrt_creator_per_task_input_t **table; uint32_t table_length; int local_lid; - int rc = SLURM_SUCCESS; int retry = 15; assert(jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index bbe4c89c1b..4eb7f61d6f 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -51,8 +51,8 @@ #include #include "slurm/slurm_errno.h" -#include "src/common/macros.h" #include "src/common/slurm_xlator.h" +#include "src/common/macros.h" #include "src/plugins/switch/nrt/slurm_nrt.h" #define NRT_BUF_SIZE 4096 @@ -301,17 +301,17 @@ extern int switch_p_clear_node_state(void) { int i, j; adap_resources_t res; - char *name = "sniN"; - uint16_t adapter_type; /* FIXME: How to fill in? */ + char *adapter_name = "sniN"; + uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; /* FIXME: How to fill in? */ int err; for (i = 0; i < NRT_MAXADAPTERS; i++) { - name[3] = i + (int) '0'; + adapter_name[3] = i + (int) '0'; err = nrt_adapter_resources(NRT_VERSION, adapter_name, adapter_type, &res); if (err != NRT_SUCCESS) { error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(rc)); + adapter_name, adapter_type, nrt_err_str(err)); continue; } #if NRT_DEBUG @@ -325,7 +325,7 @@ extern int switch_p_clear_node_state(void) if (err != NRT_SUCCESS) { error("nrt_clean_window(%s, %hu): %s", adapter_name, adapter_type, - nrt_err_str(rc)); + nrt_err_str(err)); } } free(res.window_list); @@ -673,6 +673,7 @@ static void *_state_save_thread(void *arg) _switch_p_libstate_save(dir_name, false); } } + return NULL; } static void _spawn_state_save_thread(char *dir) -- GitLab From 5fadb628acff25360a34400370a599b729e75a7b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Jan 2012 13:40:45 -0800 Subject: [PATCH 019/614] Remove level of indirection from nrt_creator_per_task_input_t **table; --- src/plugins/switch/nrt/nrt.c | 68 +++++++++++-------------------- src/plugins/switch/nrt/nrt_keys.h | 2 +- 2 files changed, 24 insertions(+), 46 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 3da420d282..50c64b828c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1269,7 +1269,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_table; - ib_table = &tableinfo[i].table[task_id]->ib_per_task; + ib_table = &tableinfo[i].table[task_id].ib_per_task; ib_table->task_id = task_id; ib_table->base_lid = adapter->lid[0]; ib_table->win_id = window->window_id; @@ -1340,7 +1340,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; - table = tableinfo[0].table[task_id]; + table = &tableinfo[0].table[task_id]; if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { /* FIXME: table contains a union, it could contain either IB or HPCE data */ nrt_creator_ib_per_task_input_t *ib_tbl_ptr; @@ -1396,7 +1396,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, error("tableinfo[%d].table is NULL", i); return SLURM_ERROR; } - table = tableinfo[i].table[task_id]; + table = &tableinfo[i].table[task_id]; if (table == NULL) { error("tableinfo[%d].table[%d] is NULL", i, task_id); return SLURM_ERROR; @@ -1452,7 +1452,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, #if NRT_DEBUG /* Used by: all */ static void -_print_table(nrt_creator_per_task_input_t **table, int size) +_print_table(nrt_creator_per_task_input_t *table, int size) { uint16_t adapter_type = RSCT_DEVTYPE_INFINIBAND; int i; @@ -1464,7 +1464,7 @@ _print_table(nrt_creator_per_task_input_t **table, int size) for (i = 0; i < size; i++) { if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table[i]->ib_per_task; + ib_tbl_ptr = &table[i].ib_per_task; printf(" task_id: %u\n", ib_tbl_ptr->task_id); printf(" window_id: %u\n", ib_tbl_ptr->win_id); printf(" lid: %u\n", ib_tbl_ptr->base_lid); @@ -1727,14 +1727,9 @@ nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, * sizeof(nrt_tableinfo_t)); for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; - jp->tableinfo[i].table = (nrt_creator_per_task_input_t **) + jp->tableinfo[i].table = (nrt_creator_per_task_input_t *) xmalloc(nprocs * - sizeof(nrt_creator_per_task_input_t *)); - for (j = 0; j < nprocs; j++) { - jp->tableinfo[i].table[j] = - (nrt_creator_per_task_input_t *) - xmalloc(sizeof(nrt_creator_per_task_input_t)); - } + sizeof(nrt_creator_per_task_input_t)); } debug("Allocating windows"); @@ -1800,7 +1795,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; for (i = 0; i < tableinfo->table_length; i++) { - ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; pack16(ib_tbl_ptr->task_id, buf); pack16(ib_tbl_ptr->base_lid, buf); pack16(ib_tbl_ptr->win_id, buf); @@ -1845,14 +1840,11 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpack32(&tableinfo->table_length, buf); if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - tableinfo->table = (nrt_creator_per_task_input_t **) + tableinfo->table = (nrt_creator_per_task_input_t *) xmalloc(tableinfo->table_length * - sizeof(nrt_creator_per_task_input_t *)); + sizeof(nrt_creator_per_task_input_t)); for (i = 0; i < tableinfo->table_length; i++) { - tableinfo->table[i] = (nrt_creator_per_task_input_t *) - xmalloc(sizeof( - nrt_creator_per_task_input_t)); - ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; safe_unpack16(&ib_tbl_ptr->task_id, buf); safe_unpack16(&ib_tbl_ptr->base_lid, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); @@ -1877,7 +1869,7 @@ int nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) { uint32_t size; - int i, k; + int i; assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); @@ -1904,11 +1896,8 @@ nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) unpack_error: error("nrt_unpack_jobinfo error"); if (j->tableinfo) { - for (i = 0; i < j->tables_per_task; i++) { - for (k = 0; k < j->tableinfo[i].table_length; k++) - xfree(j->tableinfo[i].table[k]); + for (i = 0; i < j->tables_per_task; i++) xfree(j->tableinfo[i].table); - } xfree(j->tableinfo); } slurm_seterrno_ret(EUNPACK); @@ -1944,16 +1933,12 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) for (i = 0; i < job->tables_per_task; i++) { new->tableinfo[i].table = - (nrt_creator_per_task_input_t **) + (nrt_creator_per_task_input_t *) xmalloc(job->tableinfo[i].table_length * - sizeof(nrt_creator_per_task_input_t *)); + sizeof(nrt_creator_per_task_input_t)); for (k = 0; k < new->tableinfo[i].table_length; k++) { - new->tableinfo[i].table[k] = - (nrt_creator_per_task_input_t *) - xmalloc(sizeof( - nrt_creator_per_task_input_t)); - memcpy(new->tableinfo[i].table[k], - job->tableinfo[i].table[k], + memcpy(&new->tableinfo[i].table[k], + &job->tableinfo[i].table[k], sizeof(nrt_tableinfo_t)); } } @@ -1966,7 +1951,7 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) extern void nrt_free_jobinfo(nrt_jobinfo_t *jp) { - int i, j; + int i; nrt_tableinfo_t *tableinfo; if (!jp) { @@ -1982,13 +1967,6 @@ nrt_free_jobinfo(nrt_jobinfo_t *jp) if (jp->tables_per_task > 0 && jp->tableinfo != NULL) { for (i = 0; i < jp->tables_per_task; i++) { tableinfo = &jp->tableinfo[i]; - if (tableinfo->table == NULL) - continue; - for (j = 0; j < tableinfo->table_length; j++) { - if (tableinfo->table[j] == NULL) - continue; - xfree(tableinfo->table[j]); - } xfree(tableinfo->table); } xfree(jp->tableinfo); @@ -2102,7 +2080,7 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; for (i = 0; i < tableinfo->table_length; i++) { - ib_tbl_ptr = &tableinfo[i].table[i]->ib_per_task; + ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; if (ib_tbl_ptr->base_lid == lid) { err = _wait_for_window_unloaded( tableinfo->adapter_name, @@ -2219,7 +2197,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) /* FIXME: table contains a union, it could contain either IB or HPCE data */ if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &jp->tableinfo[i].table[j]-> + ib_tbl_ptr = &jp->tableinfo[i].table[j]. ib_per_task; info(" task_id[%d]:%hu", j, ib_tbl_ptr->task_id); @@ -2249,7 +2227,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) jp->bulk_xfer, bulk_xfer_resources, jp->tableinfo[i].table_length, - *jp->tableinfo[i].table); + jp->tableinfo[i].table); if (err != NRT_SUCCESS) { error("unable to load table: [%d] %s", err, nrt_err_str(err)); @@ -2308,7 +2286,7 @@ nrt_unload_table(nrt_jobinfo_t *jp) int err = SLURM_SUCCESS, rc = SLURM_SUCCESS; char *adapter_name; uint16_t adapter_type; - nrt_creator_per_task_input_t **table; + nrt_creator_per_task_input_t *table; uint32_t table_length; int local_lid; int retry = 15; @@ -2326,7 +2304,7 @@ nrt_unload_table(nrt_jobinfo_t *jp) /* FIXME: table contains a union, it could contain either IB or HPCE data */ if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table[j]->ib_per_task; + ib_tbl_ptr = &table[j].ib_per_task; if (ib_tbl_ptr->base_lid != local_lid) continue; debug3("freeing adapter %s base_lid %hu win_id %hu " diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index c8bae59de8..d6fbfbb58c 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -58,7 +58,7 @@ enum { /* Information shared between slurm_ll_api and the slurm federation driver */ typedef struct nrt_tableinfo { uint32_t table_length; - nrt_creator_per_task_input_t **table; + nrt_creator_per_task_input_t *table; char adapter_name[NRT_MAX_DEVICENAME_SIZE]; uint16_t adapter_type; } nrt_tableinfo_t; -- GitLab From 2a6c196226537c4be1b2c1ce09ccab6c0710fe55 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 27 Jan 2012 14:24:03 -0800 Subject: [PATCH 020/614] Add NRT window state string, general clean-up --- src/plugins/switch/nrt/README | 2 +- src/plugins/switch/nrt/nrt.c | 47 ++++++++++++++++++++++++----------- 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index 01f1c18721..78c5e7c8cf 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -11,7 +11,7 @@ Add adapter type In the adapter resources, how "spigot" used? "lid" and "network_id" are now arrays, how are they used? - Resolve window state incompatabilities + Resolve window state incompatabilities (data structure union, IB or HPCE) Remove adapter memory specifications (done) Many window and adapter fields that do remain have different sizes We have no details about the differences in data structures between IB and HPCE, diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 50c64b828c..04905e3a7a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -166,6 +166,7 @@ static void _init_adapter_cache(void); static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, uint16_t adapter_type); static int _parse_nrt_file(hostlist_t *adapter_list); +static char *_win_state_str(win_state_t state); /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library @@ -191,6 +192,25 @@ _unlock(void) } } +static char *_win_state_str(win_state_t state) +{ + if (state == NRT_WIN_UNAVAILABLE) + return "Unavailable"; + else if (state == NRT_WIN_INVALID) + return "Invalid"; + else if (state == NRT_WIN_RESERVED) + return "Reserved"; + else if (state == NRT_WIN_READY) + return "Ready"; + else if (state == NRT_WIN_RUNNING) + return "Running"; + else { + static char buf[16]; + snprintf(buf, sizeof(buf), "%d", state); + return buf; + } +} + extern int nrt_slurmctld_init(void) { @@ -456,7 +476,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, info(" window_id[%d]:%hu", i, status[i].window_id); info(" bulk_xfer[%d]:%hu", i, status[i].bulk_transfer); info(" rcontext_blocks[%d]:%u", i, status[i].rcontext_blocks); - info(" state[%d]:%d", i, status[i].state); + info(" state[%d]:%s", i, _win_state_str(status[i].state)); } #endif tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * @@ -2049,9 +2069,9 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, free(status); return SLURM_SUCCESS; } - debug2("nrt_status_adapter(%s, %u), window %u state %d", + debug2("nrt_status_adapter(%s, %u), window %u state %s", adapter_name, adapter_type, window_id, - status[j].state); + _win_state_str(status[j].state)); free(status); } @@ -2135,9 +2155,8 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) } -/* Load a network table on node. If table contains more than - * one window for a given adapter, load the table only once for that - * adapter. +/* Load a network table on node. If table contains more than one window + * for a given adapter, load the table only once for that adapter. * * Used by: slurmd */ @@ -2150,7 +2169,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) uint16_t adapter_type; uint64_t network_id; uint bulk_xfer_resources = 0; /* Unused by NRT today */ -/* ADAPTER_RESOURCES res; */ int rc; #if NRT_DEBUG @@ -2167,7 +2185,9 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) printf("%s", nrt_sprint_jobinfo(jp, buf, 2000)); #endif adapter_name = jp->tableinfo[i].adapter_name; - adapter_type = 0; /* FIXME: Load from where? */ +/* FIXME: Determine adapter_type from adapter_name and nrt.conf file contents. + * We probably do NOT want to store adapter_type in nrt_jobinfo_t */ + adapter_type = RSCT_DEVTYPE_INFINIBAND; network_id = _get_network_id_from_adapter(adapter_name); rc = _wait_for_all_windows(&jp->tableinfo[i]); @@ -2176,13 +2196,10 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) if (adapter_name == NULL) continue; - if (jp->bulk_xfer) { - if (i == 0) { - rc = _check_rdma_job_count(adapter_name, - adapter_type); - if (rc != SLURM_SUCCESS) - return rc; - } + if (jp->bulk_xfer && (i == 0)) { + rc = _check_rdma_job_count(adapter_name, adapter_type); + if (rc != SLURM_SUCCESS) + return rc; } #if NRT_DEBUG info("attempting nrt_load_table_rdma:"); -- GitLab From 54729cde2ba3586f455a983a35b79c642ae243d3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 27 Jan 2012 15:42:48 -0800 Subject: [PATCH 021/614] Restructure NRT logging logic --- src/plugins/switch/nrt/nrt.c | 253 +++++++++------------------- src/plugins/switch/nrt/nrt.h | 21 ++- src/plugins/switch/nrt/switch_nrt.c | 3 +- 3 files changed, 96 insertions(+), 181 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 04905e3a7a..04528cd216 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -256,43 +256,93 @@ nrt_slurmd_step_init(void) return SLURM_SUCCESS; } -/* Used by: slurmd, slurmctld */ -extern void nrt_print_jobinfo(FILE *fp, nrt_jobinfo_t *jobinfo) +#if NRT_DEBUG +/* Used by: slurmd */ +static void +_print_adapter(char *adapter_name, uint16_t adapter_type, uint16_t win_count, + nrt_status_t *status) { - assert(jobinfo->magic == NRT_JOBINFO_MAGIC); + int i; - /* stubbed out */ + info("--Begin Adapter Status--"); + info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + for (i = 0; i < win_count; i++) { + info(" client_pid[%d]:%u", i, (uint32_t)status[i].client_pid); + info(" uid[%d]:%u", i, (uint32_t) status[i].uid); + info(" window_id[%d]:%hu", i, status[i].window_id); + info(" bulk_xfer[%d]:%hu", i, status[i].bulk_transfer); + info(" rcontext_blocks[%d]:%u", i, status[i].rcontext_blocks); + info(" state[%d]:%s", i, _win_state_str(status[i].state)); + } + info("--End Adapter Status--"); } /* Used by: slurmd, slurmctld */ -extern char *nrt_sprint_jobinfo(nrt_jobinfo_t *j, char *buf, size_t size) +static void +_print_jobinfo(nrt_jobinfo_t *j) { - int count; - char *tmp = buf; - int remaining = size; - - assert(buf); assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); - count = snprintf(tmp, remaining, - "--Begin Jobinfo--\n" - " job_key: %u\n" - " job_desc: %s\n" - " table_size: %u\n" - "--End Jobinfo--\n", - j->job_key, - j->job_desc, - j->tables_per_task); - if (count < 0) - return buf; - remaining -= count; - tmp += count; - if (remaining < 1) - return buf; + info("--Begin Jobinfo--"); + info(" job_key: %u", j->job_key); + info(" job_desc: %s", j->job_desc); + info(" table_size: %u", j->tables_per_task); + info("--End Jobinfo--"); +} + +/* Used by: slurmd, slurmctld */ +static void +_print_nodeinfo(nrt_nodeinfo_t *n) +{ + int i, j; + nrt_adapter_t *a; + nrt_window_t *w; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); - return buf; + info("Node: %s", n->name); + for (i = 0; i < n->adapter_count; i++) { + a = n->adapter_list + i; + info(" adapter: %s", a->adapter_name); + info(" type: %hu", a->adapter_type); + info(" window_count: %hu", a->window_count); +#if NRT_VERBOSE_PRINT + info(" lid[0]: %hu", a->lid[0]); + info(" network_id[0]: %"PRIu64"", a->network_id[0]); +#endif + w = a->window_list; + for (j = 0; j < a->window_count; j++) { +#if (NRT_VERBOSE_PRINT < 1) + if (w[j].state != NRT_WIN_AVAILABLE) + continue; +#endif + info(" Window %hu: %s", w->window_id, + nrt_err_str(w->state)); + } + } +} + +/* Used by: slurmctld */ +static void +_print_libstate(const nrt_libstate_t *l) +{ + int i; + + assert(l); + + info("--Begin libstate--\n"); + info(" magic = %u", l->magic); + info(" node_count = %u", l->node_count); + info(" node_max = %u", l->node_max); + info(" hash_max = %u", l->hash_max); + for (i = 0; i < l->node_count; i++) { + _print_nodeinfo(&l->node_list[i]); + } + info("--End libstate--"); } +#endif /* The lid caching functions were created to avoid unnecessary * function calls each time we need to load network tables on a node. @@ -468,16 +518,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, slurm_seterrno_ret(ESTATUS); } #if NRT_DEBUG - info("nrt_status_adapter:"); - info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - for (i = 0; i < win_count; i++) { - info(" client_pid[%d]:%u", i, (uint32_t)status[i].client_pid); - info(" uid[%d]:%u", i, (uint32_t) status[i].uid); - info(" window_id[%d]:%hu", i, status[i].window_id); - info(" bulk_xfer[%d]:%hu", i, status[i].bulk_transfer); - info(" rcontext_blocks[%d]:%u", i, status[i].rcontext_blocks); - info(" state[%d]:%s", i, _win_state_str(status[i].state)); - } + _print_adapter(adapter_name, adapter_type, win_count, status); #endif tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * res.window_count); @@ -645,109 +686,6 @@ nrt_build_nodeinfo(nrt_nodeinfo_t *n, char *name) return 0; } -static int -_print_window_struct(nrt_window_t *w, char *buf, size_t size) -{ - int count; - - assert(w); - assert(buf); - assert(size > 0); - - - count = snprintf(buf, size, - " Window %u: %s\n", - w->window_id, - nrt_err_str(w->state)); - - return count; -} - -/* Writes out nodeinfo structure to a buffer. Maintains the - * snprintf semantics by only filling the buffer up to the value - * of size. If NRT_VERBOSE_PRINT is defined this function will - * dump the entire structure, otherwise only the "useful" part. - * - * Used by: slurmd, slurmctld - */ -extern char * -nrt_print_nodeinfo(nrt_nodeinfo_t *n, char *buf, size_t size) -{ - nrt_adapter_t *a; - int i,j; - nrt_window_t *w; - int remaining = size; - int count; - char *tmp = buf; - - assert(n); - assert(buf); - assert(size > 0); - assert(n->magic == NRT_NODEINFO_MAGIC); - - count = snprintf(tmp, remaining, - "Node: %s\n", - n->name); - if (count < 0) - return buf; - remaining -= count; - tmp += count; - if (remaining < 1) - return buf; - for (i = 0; i < n->adapter_count; i++) { - a = n->adapter_list + i; - count = snprintf(tmp, remaining, -#if NRT_VERBOSE_PRINT - " Adapter: %s\n" - " type: %hu\n" - " lid[0]: %hu\n" - " network_id[0]: %u\n" - " window_count: %hu\n", - a->adapter_name, - a->adapter_type, - a->lid[0], - a->network_id[0], - a->window_count); -#else - " Adapter: %s\n" - " type: %hu\n" - " Window count: %hu\n" - " Active windows:\n", - a->adapter_name, - a->adapter_type, - a->window_count); -#endif - if (count < 0) - return buf; - remaining -= count; - tmp += count; - if (remaining < 1) - return buf; - - w = a->window_list; - for (j = 0; j < a->window_count; j++) { -#if NRT_VERBOSE_PRINT - count = _print_window_struct(&w[j], tmp, remaining); -#else - - if (w[j].state != NRT_WIN_AVAILABLE) - count = _print_window_struct(&w[j], tmp, - remaining); - else - count = 0; -#endif - if (count < 0) - return buf; - remaining -= count; - tmp += count; - if (remaining < 1) - return buf; - } - } - - return buf; -} - /* Used by: all */ extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) @@ -969,30 +907,6 @@ _alloc_node(nrt_libstate_t *lp, char *name) return n; } -#if NRT_DEBUG -/* Used by: slurmctld */ -static void -_print_libstate(const nrt_libstate_t *l) -{ - int i; - char buf[3000]; - - assert(l); - - printf("--Begin libstate--\n"); - printf(" magic = %u\n", l->magic); - printf(" node_count = %u\n", l->node_count); - printf(" node_max = %u\n", l->node_max); - printf(" hash_max = %u\n", l->hash_max); - for (i = 0; i < l->node_count; i++) { - memset(buf, 0, 3000); - nrt_print_nodeinfo(&l->node_list[i], buf, 3000); - printf("%s", buf); - } - printf("--End libstate--\n"); -} -#endif - /* Throw away adapter portion of the nodeinfo. * @@ -1480,19 +1394,19 @@ _print_table(nrt_creator_per_task_input_t *table, int size) assert(table); assert(size > 0); - printf("--Begin NRT table--\n"); + info("--Begin NRT table--"); for (i = 0; i < size; i++) { if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; ib_tbl_ptr = &table[i].ib_per_task; - printf(" task_id: %u\n", ib_tbl_ptr->task_id); - printf(" window_id: %u\n", ib_tbl_ptr->win_id); - printf(" lid: %u\n", ib_tbl_ptr->base_lid); + info(" task_id: %hu", ib_tbl_ptr->task_id); + info(" win_id: %hu", ib_tbl_ptr->win_id); + info(" base_lid: %hu", ib_tbl_ptr->base_lid); } else { fatal("_print_table: lack HPCE code"); } } - printf("--End NRT table--\n"); + info("--End NRT table--"); } #endif @@ -2173,7 +2087,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) #if NRT_DEBUG int j; - char buf[2000]; #endif assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2182,7 +2095,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) #if NRT_DEBUG _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); - printf("%s", nrt_sprint_jobinfo(jp, buf, 2000)); + _print_jobinfo(jp); #endif adapter_name = jp->tableinfo[i].adapter_name; /* FIXME: Determine adapter_type from adapter_name and nrt.conf file contents. diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h index 29c4bdb5f8..fd894f2181 100644 --- a/src/plugins/switch/nrt/nrt.h +++ b/src/plugins/switch/nrt/nrt.h @@ -4,25 +4,28 @@ #define _NRT_INCLUDED #include + #define MAX_SPIGOTS 4 #define NRT_MAX_DEVICENAME_SIZE 6 #define NRT_VERSION 100 #define NRT_SUCCESS 0 -#define NRT_ALREADY_LOADED 15 -#define NRT_BAD_VERSION 10 -#define NRT_EADAPTER 4 -#define NRT_EADAPTYPE 9 -#define NRT_EAGAIN 11 #define NRT_EINVAL 1 -#define NRT_EIO 7 -#define NRT_EMEM 6 #define NRT_EPERM 2 +#define NRT_PNSDAPI 3 +#define NRT_EADAPTER 4 #define NRT_ESYSTEM 5 +#define NRT_EMEM 6 +#define NRT_EIO 7 #define NRT_NO_RDMA_AVAIL 8 -#define NRT_PNSDAPI 3 -#define NRT_UNKNOWN_ADAPTER 13 +#define NRT_EADAPTYPE 9 +#define NRT_BAD_VERSION 10 +#define NRT_EAGAIN 11 #define NRT_WRONG_WINDOW_STATE 12 +#define NRT_UNKNOWN_ADAPTER 13 + +#define NRT_ALREADY_LOADED 15 + typedef struct { uint32_t node_number; // to form unique ID diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 4eb7f61d6f..e1658261ea 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -599,8 +599,7 @@ extern int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, (unsigned long) pgid); kill(-pgid, SIGKILL); } else - debug("Job %u.%u: Bad pid valud %lu", job_id, - step_id, (unsigned long) pgid); + debug("Job %u.%u: pgid value is zero", job_id, step_id); err = nrt_unload_table((nrt_jobinfo_t *)jobinfo); if (err != SLURM_SUCCESS) -- GitLab From 526e58e289e2062f6dd2198e4580effd73f25474 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 27 Jan 2012 16:52:34 -0800 Subject: [PATCH 022/614] Enhance NRT logging --- src/plugins/switch/nrt/nrt.c | 160 ++++++++++++++++++++-------- src/plugins/switch/nrt/slurm_nrt.h | 5 +- src/plugins/switch/nrt/switch_nrt.c | 37 +------ 3 files changed, 116 insertions(+), 86 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 04528cd216..b2499eaa9f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -4,10 +4,9 @@ ***************************************************************************** * Copyright (C) 2004-2007 The Regents of the University of California. * Copyright (C) 2008 Lawrence Livermore National Security. - * Portions Copyright (C) 2011-2012 SchedMD LLC. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jason King - * CODE-OCEC-09-009. All rights reserved. + * Copyright (C) 2011-2012 SchedMD LLC. + * Original switch/federation plugin written by Jason King + * Largely re-written for NRT support by Morris Jette * * This file is part of SLURM, a resource management program. * For details, see . @@ -70,15 +69,12 @@ #define JOB_DESC_LEN 64 /* Length of job description */ #define NRT_HOSTLEN 20 -#define NRT_VERBOSE_PRINT 0 #define NRT_NODECOUNT 128 #define NRT_HASHCOUNT 128 #define NRT_AUTO_WINMEM 0 #define NRT_MAX_WIN 15 #define NRT_MIN_WIN 0 -#define BUFSIZE 4096 - char* nrt_conf = NULL; extern bool nrt_need_state_save; @@ -257,15 +253,41 @@ nrt_slurmd_step_init(void) } #if NRT_DEBUG +/* Used by: slurmd */ +static void +_print_adapter_resources(char *adapter_name, uint16_t adapter_type, + adap_resources_t *adapter_res) +{ + int i; + + info("--Begin Adapter Resources--"); + info(" adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + info(" node_number:%u", adapter_res->node_number); + info(" num_spigots:%hu", adapter_res->num_spigots); + for (i = 0; i < adapter_res->num_spigots; i++) { + info(" lid[%d]:%hu", i, adapter_res->lid[i]); + info(" network_id[%d]:%"PRIu64"", + i, adapter_res->network_id[i]); + info(" lmc[%d]:%hu", i, adapter_res->lmc[i]); + info(" spigot_id[%d]:%hu", i, adapter_res->spigot_id[i]); + } + info(" window_count:%hu", adapter_res->window_count); + for (i = 0; i < adapter_res->window_count; i++) + info(" window_list[%d]:%hu", i, adapter_res->window_list[i]); + info(" rcontext_block_count:%"PRIu64"", + adapter_res->rcontext_block_count); + info("--End Adapter Resources--"); +} + /* Used by: slurmd */ static void -_print_adapter(char *adapter_name, uint16_t adapter_type, uint16_t win_count, - nrt_status_t *status) +_print_adapter_status(char *adapter_name, uint16_t adapter_type, + uint16_t win_count, nrt_status_t *status) { int i; info("--Begin Adapter Status--"); - info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + info(" adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); for (i = 0; i < win_count; i++) { info(" client_pid[%d]:%u", i, (uint32_t)status[i].client_pid); info(" uid[%d]:%u", i, (uint32_t) status[i].uid); @@ -281,6 +303,8 @@ _print_adapter(char *adapter_name, uint16_t adapter_type, uint16_t win_count, static void _print_jobinfo(nrt_jobinfo_t *j) { + char buf[128]; + assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); @@ -288,6 +312,12 @@ _print_jobinfo(nrt_jobinfo_t *j) info(" job_key: %u", j->job_key); info(" job_desc: %s", j->job_desc); info(" table_size: %u", j->tables_per_task); + info(" bulk_xfer: %u", j->bulk_xfer); + info(" tables_per_task: %hu", j->tables_per_task); + hostlist_ranged_string(j->nodenames, sizeof(buf), buf); + info(" nodenames: %s", buf); + info(" num_tasks: %d", j->num_tasks); + info(" tableinfo supressed"); info("--End Jobinfo--"); } @@ -302,26 +332,29 @@ _print_nodeinfo(nrt_nodeinfo_t *n) assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); - info("Node: %s", n->name); + info("--Begin Node Info--"); + info(" node: %s", n->name); + info(" adapter_count: %u", n->adapter_count); for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; - info(" adapter: %s", a->adapter_name); - info(" type: %hu", a->adapter_type); - info(" window_count: %hu", a->window_count); -#if NRT_VERBOSE_PRINT - info(" lid[0]: %hu", a->lid[0]); - info(" network_id[0]: %"PRIu64"", a->network_id[0]); + info(" adapter: %s", a->adapter_name); + info(" type: %hu", a->adapter_type); + info(" window_count: %hu", a->window_count); +#if (NRT_DEBUG > 1) + info(" lid[0]: %hu", a->lid[0]); + info(" network_id[0]: %"PRIu64"", a->network_id[0]); #endif w = a->window_list; for (j = 0; j < a->window_count; j++) { -#if (NRT_VERBOSE_PRINT < 1) +#if (NRT_DEBUG < 2) if (w[j].state != NRT_WIN_AVAILABLE) continue; #endif - info(" Window %hu: %s", w->window_id, + info(" window %hu: %s", w->window_id, nrt_err_str(w->state)); } } + info("--End Node Info--"); } /* Used by: slurmctld */ @@ -331,9 +364,9 @@ _print_libstate(const nrt_libstate_t *l) int i; assert(l); + assert(l->magic == NRT_LIBSTATE_MAGIC); info("--Begin libstate--\n"); - info(" magic = %u", l->magic); info(" node_count = %u", l->node_count); info(" node_max = %u", l->node_max); info(" hash_max = %u", l->hash_max); @@ -391,7 +424,7 @@ _fill_in_adapter_cache(void) } #if NRT_DEBUG info("nrt_adapter_resources():"); - nrt_dump_adapter(adapter_name, adapter_type, &res); + _print_adapter_resources(adapter_name, adapter_type, &res); #endif num = adapter_name[3] - (int)'0'; @@ -495,8 +528,8 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, return SLURM_ERROR; } #if NRT_DEBUG - info("nrt_adapter_resources():"); - nrt_dump_adapter(adapter_name, adapter_type, &res); + info("_set_up_adapter: nrt_adapter_resources():"); + _print_adapter_resources(adapter_name, adapter_type, &res); #endif strncpy(nrt_adapter->adapter_name, adapter_name, @@ -518,7 +551,8 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, slurm_seterrno_ret(ESTATUS); } #if NRT_DEBUG - _print_adapter(adapter_name, adapter_type, win_count, status); + info("_set_up_adapter: nrt_status_adapter():"); + _print_adapter_status(adapter_name, adapter_type, win_count, status); #endif tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * res.window_count); @@ -1057,6 +1091,7 @@ copy_node: return SLURM_ERROR; #if NRT_DEBUG + info("_unpack_nodeinfo"); _print_libstate(nrt_state); #endif @@ -1201,6 +1236,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_table; ib_table = &tableinfo[i].table[task_id].ib_per_task; @@ -1343,6 +1379,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (strcasecmp(adapter->adapter_name, tableinfo[i].adapter_name)) continue; +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; ib_tbl_ptr = &table->ib_per_task; @@ -1396,6 +1433,7 @@ _print_table(nrt_creator_per_task_input_t *table, int size) info("--Begin NRT table--"); for (i = 0; i < size; i++) { +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; ib_tbl_ptr = &table[i].ib_per_task; @@ -1707,6 +1745,7 @@ nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, #if NRT_DEBUG + info("nrt_build_jobinfo"); _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); #endif @@ -1726,6 +1765,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) int i; pack32(tableinfo->table_length, buf); +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; for (i = 0; i < tableinfo->table_length; i++) { @@ -1772,6 +1812,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) int i; safe_unpack32(&tableinfo->table_length, buf); +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; tableinfo->table = (nrt_creator_per_task_input_t *) @@ -1969,6 +2010,11 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, adapter_type, nrt_err_str(err)); return SLURM_ERROR; } +#if NRT_DEBUG + info("_wait_for_window_unloaded"); + _print_adapter_status(adapter_name, adapter_type, win_count, + status); +#endif for (j = 0; j < win_count; j++) { if (status[j].window_id == window_id) break; @@ -2011,6 +2057,7 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) lid = _get_lid_from_adapter(tableinfo->adapter_name); +/* FIXME: table contains a union, it could contain either IB or HPCE data */ if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; for (i = 0; i < tableinfo->table_length; i++) { @@ -2054,7 +2101,7 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) return SLURM_ERROR; } #if NRT_DEBUG - info("nrt_rdma_jobs:"); + info("_check_rdma_job_count: nrt_rdma_jobs:"); info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); for (i = 0; i < job_count; i++) info(" job_keys[%d]:%hu", i, job_keys[i]); @@ -2087,6 +2134,8 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) #if NRT_DEBUG int j; + + info("nrt_load_table"); #endif assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2444,6 +2493,45 @@ nrt_libstate_clear(void) return SLURM_SUCCESS; } +/* FIXME! - should use adapter name from nrt.conf file now that + * we have that file support. */ +extern int nrt_clear_node_state(void) +{ + int i, j; + adap_resources_t res; + char *adapter_name = "sniN"; + uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; /* FIXME: How to fill in? */ + int err; + + for (i = 0; i < NRT_MAXADAPTERS; i++) { + adapter_name[3] = i + (int) '0'; + err = nrt_adapter_resources(NRT_VERSION, adapter_name, + adapter_type, &res); + if (err != NRT_SUCCESS) { + error("nrt_adapter_resources(%s, %hu): %s", + adapter_name, adapter_type, nrt_err_str(err)); + continue; + } +#if NRT_DEBUG + info("nrt_clear_node_state: nrt_adapter_resources():"); + _print_adapter_resources(adapter_name, adapter_type, &res); +#endif + for (j = 0; j < res.window_count; j++) { + err = nrt_clean_window(NRT_VERSION, adapter_name, + adapter_type, KILL, + res.window_list[j]); + if (err != NRT_SUCCESS) { + error("nrt_clean_window(%s, %hu): %s", + adapter_name, adapter_type, + nrt_err_str(err)); + } + } + free(res.window_list); + } + + return SLURM_SUCCESS; +} + extern char *nrt_err_str(int rc) { static char str[16]; @@ -2485,25 +2573,3 @@ extern char *nrt_err_str(int rc) snprintf(str, sizeof(str), "%d", rc); return str; } - -extern void nrt_dump_adapter(char *adapter_name, uint16_t adapter_type, - adap_resources_t *adapter_res) -{ - int i; - - info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - info(" node_number:%u", adapter_res->node_number); - info(" num_spigots:%hu", adapter_res->num_spigots); - for (i = 0; i < MAX_SPIGOTS; i++) { - info(" lid[%d]:%hu", i, adapter_res->lid[i]); - info(" network_id[%d]:%"PRIu64"", - i, adapter_res->network_id[i]); - info(" lmc[%d]:%hu", i, adapter_res->lmc[i]); - info(" spigot_id[%d]:%hu", i, adapter_res->spigot_id[i]); - } - info(" window_count:%hu", adapter_res->window_count); - for (i = 0; i < adapter_res->window_count; i++) - info(" window_list[%d]:%hu", i, adapter_res->window_list[i]); - info(" rcontext_block_count:%"PRIu64"", - adapter_res->rcontext_block_count); -} diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index f3bc55a1a8..017d1a0dcf 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -77,13 +77,12 @@ enum { EUNLOAD }; -#define NRT_DEBUG 1 /* Enable extra logging */ +#define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) +extern int nrt_clear_node_state(void); extern char *nrt_err_str(int rc); -extern void nrt_dump_adapter(char *adapter_name, uint16_t adapter_type, - adap_resources_t *adapter_res); extern int nrt_slurmctld_init(void); extern int nrt_slurmd_init(void); extern int nrt_slurmd_step_init(void); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index e1658261ea..a7f0b06365 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -294,44 +294,9 @@ extern int switch_p_libstate_clear(void) * notification of this will be forwarded to slurmctld. We do not * enforce that in this function. */ -/* FIXME! - should use adapter name from nrt.conf file now that - * we have that file support. - */ extern int switch_p_clear_node_state(void) { - int i, j; - adap_resources_t res; - char *adapter_name = "sniN"; - uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; /* FIXME: How to fill in? */ - int err; - - for (i = 0; i < NRT_MAXADAPTERS; i++) { - adapter_name[3] = i + (int) '0'; - err = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type, &res); - if (err != NRT_SUCCESS) { - error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(err)); - continue; - } -#if NRT_DEBUG - info("nrt_adapter_resources():"); - nrt_dump_adapter(adapter_name, adapter_type, &res); -#endif - for (j = 0; j < res.window_count; j++) { - err = nrt_clean_window(NRT_VERSION, adapter_name, - adapter_type, KILL, - res.window_list[j]); - if (err != NRT_SUCCESS) { - error("nrt_clean_window(%s, %hu): %s", - adapter_name, adapter_type, - nrt_err_str(err)); - } - } - free(res.window_list); - } - - return SLURM_SUCCESS; + return nrt_clear_node_state(); } extern int switch_p_alloc_node_info(switch_node_info_t **switch_node) -- GitLab From 9299938241d694a270ac7a9db622bdeed4cd23a6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 27 Jan 2012 17:01:09 -0800 Subject: [PATCH 023/614] Add logging to each NRT function call --- src/plugins/switch/nrt/switch_nrt.c | 85 +++++++++++++++++++++++++++-- 1 file changed, 79 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index a7f0b06365..c35713338e 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -149,16 +149,25 @@ extern int fini ( void ) extern int switch_p_slurmctld_init( void ) { +#if NRT_DEBUG + info("switch_p_slurmctld_init()"); +#endif return nrt_slurmctld_init(); } extern int switch_p_slurmd_init( void ) { +#if NRT_DEBUG + info("switch_p_slurmd_init()"); +#endif return nrt_slurmd_init(); } extern int switch_p_slurmd_step_init( void ) { +#if NRT_DEBUG + info("switch_p_slurmd_step_init()"); +#endif return nrt_slurmd_step_init(); } @@ -169,6 +178,9 @@ extern int switch_p_slurmd_step_init( void ) */ extern int switch_p_libstate_save ( char * dir_name ) { +#if NRT_DEBUG + info("switch_p_libstate_save()"); +#endif return _switch_p_libstate_save(dir_name, true); } @@ -234,6 +246,9 @@ extern int switch_p_libstate_restore ( char * dir_name, bool recover ) xassert(dir_name != NULL); +#if NRT_DEBUG + info("switch_p_libstate_restore()"); +#endif _spawn_state_save_thread(xstrdup(dir_name)); if (!recover) /* clean start, no recovery */ return nrt_init(); @@ -284,6 +299,9 @@ extern int switch_p_libstate_restore ( char * dir_name, bool recover ) extern int switch_p_libstate_clear(void) { +#if NRT_DEBUG + info("switch_p_libstate_clear()"); +#endif return nrt_libstate_clear(); } @@ -296,6 +314,9 @@ extern int switch_p_libstate_clear(void) */ extern int switch_p_clear_node_state(void) { +#if NRT_DEBUG + info("switch_p_clear_node_state()"); +#endif return nrt_clear_node_state(); } @@ -309,6 +330,9 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) char hostname[256]; char *tmp; +#if NRT_DEBUG + info("switch_p_build_node_info()"); +#endif if (gethostname(hostname, 256) < 0) slurm_seterrno_ret(EHOSTNAME); /* remove the domain portion, if necessary */ @@ -320,17 +344,26 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) extern int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) { +#if NRT_DEBUG + info("switch_p_pack_node_info()"); +#endif return nrt_pack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); } extern int switch_p_unpack_node_info(switch_node_info_t *switch_node, Buf buffer) { +#if NRT_DEBUG + info("switch_p_unpack_node_info()"); +#endif return nrt_unpack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); } extern void switch_p_free_node_info(switch_node_info_t **switch_node) { +#if NRT_DEBUG + info("switch_p_free_node_info()"); +#endif if (switch_node) nrt_free_nodeinfo((nrt_nodeinfo_t *)*switch_node, false); } @@ -346,6 +379,9 @@ extern char * switch_p_sprintf_node_info(switch_node_info_t *switch_node, */ extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) { +#if NRT_DEBUG + info("switch_p_alloc_jobinfo()"); +#endif return nrt_alloc_jobinfo((nrt_jobinfo_t **)switch_job); } @@ -382,6 +418,9 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, int bulk_xfer = 0; char *adapter_name = NULL; +#if NRT_DEBUG + info("switch_p_build_jobinfo()"); +#endif debug3("network = \"%s\"", network); if (strstr(network, "ip") || strstr(network, "IP")) { debug2("NRT: \"ip\" found in network string, " @@ -428,6 +467,9 @@ extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) { switch_jobinfo_t *j; +#if NRT_DEBUG + info("switch_p_copy_jobinfo()"); +#endif j = (switch_jobinfo_t *)nrt_copy_jobinfo((nrt_jobinfo_t *)switch_job); if (!j) error("nrt_copy_jobinfo failed"); @@ -437,22 +479,34 @@ extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) extern void switch_p_free_jobinfo(switch_jobinfo_t *switch_job) { +#if NRT_DEBUG + info("switch_p_free_jobinfo()"); +#endif return nrt_free_jobinfo((nrt_jobinfo_t *)switch_job); } extern int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) { +#if NRT_DEBUG + info("switch_p_pack_jobinfo()"); +#endif return nrt_pack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) { +#if NRT_DEBUG + info("switch_p_unpack_jobinfo()"); +#endif return nrt_unpack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, void *resulting_data) { +#if NRT_DEBUG + info("switch_p_get_jobinfo()"); +#endif return nrt_get_jobinfo((nrt_jobinfo_t *)switch_job, key, resulting_data); } @@ -471,17 +525,26 @@ static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) { +#if NRT_DEBUG + info("switch_p_job_step_complete()"); +#endif return _make_step_comp(jobinfo, nodelist); } extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, char *nodelist) { +#if NRT_DEBUG + info("switch_p_job_step_part_comp()"); +#endif return _make_step_comp(jobinfo, nodelist); } extern bool switch_p_part_comp(void) { +#if NRT_DEBUG + info("switch_p_part_comp()"); +#endif return true; } @@ -490,6 +553,9 @@ extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, char *nodelist hostlist_t list = NULL; int rc; +#if NRT_DEBUG + info("switch_p_job_step_allocated()"); +#endif list = hostlist_create(nodelist); rc = nrt_job_step_allocated((nrt_jobinfo_t *)jobinfo, list); hostlist_destroy(list); @@ -542,6 +608,9 @@ extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) { pid_t pid; +#if NRT_DEBUG + info("switch_p_job_init()"); +#endif pid = getpid(); return nrt_load_table((nrt_jobinfo_t *)jobinfo, uid, pid); } @@ -556,6 +625,9 @@ extern int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, { int err; +#if NRT_DEBUG + info("switch_p_job_postfini()"); +#endif /* * Kill all processes in the job's session */ @@ -577,12 +649,13 @@ extern int switch_p_job_attach(switch_jobinfo_t *jobinfo, char ***env, uint32_t nodeid, uint32_t procid, uint32_t nnodes, uint32_t nprocs, uint32_t rank) { -#if 0 - printf("nodeid = %u\n", nodeid); - printf("procid = %u\n", procid); - printf("nnodes = %u\n", nnodes); - printf("nprocs = %u\n", nprocs); - printf("rank = %u\n", rank); +#if NRT_DEBUG + info("switch_p_job_attach()"); + info("nodeid = %u", nodeid); + info("procid = %u", procid); + info("nnodes = %u", nnodes); + info("nprocs = %u", nprocs); + info("rank = %u", rank); #endif return SLURM_SUCCESS; } -- GitLab From cf4670923987d09fdd6f0944f085f842505bf2d0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 30 Jan 2012 14:17:57 -0800 Subject: [PATCH 024/614] Read adapter type from config file --- src/plugins/switch/nrt/nrt.c | 104 ++++++++++++++++++++++------------- 1 file changed, 65 insertions(+), 39 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b2499eaa9f..fa7bf90ba3 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -154,6 +154,7 @@ pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; /* slurmd/slurmstepd global variables */ hostlist_t adapter_list; +uint16_t adapter_type_code = 0; static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; static int _fill_in_adapter_cache(void); @@ -161,7 +162,7 @@ static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, uint16_t adapter_type); -static int _parse_nrt_file(hostlist_t *adapter_list); +static int _parse_nrt_file(hostlist_t *adapter_list, uint16_t *adapter_code); static char *_win_state_str(win_state_t state); /* The _lock() and _unlock() functions are used to lock/unlock a @@ -225,7 +226,8 @@ nrt_slurmd_init(void) /*_init_adapter_cache();*/ adapter_list = hostlist_create(NULL); - if (_parse_nrt_file(&adapter_list) != SLURM_SUCCESS) + if (_parse_nrt_file(&adapter_list, &adapter_type_code) != + SLURM_SUCCESS) return SLURM_FAILURE; assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); return SLURM_SUCCESS; @@ -243,7 +245,8 @@ nrt_slurmd_step_init(void) _init_adapter_cache(); adapter_list = hostlist_create(NULL); - if (_parse_nrt_file(&adapter_list) != SLURM_SUCCESS) + if (_parse_nrt_file(&adapter_list, &adapter_type_code) != + SLURM_SUCCESS) return SLURM_FAILURE; assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); @@ -379,7 +382,7 @@ _print_libstate(const nrt_libstate_t *l) /* The lid caching functions were created to avoid unnecessary * function calls each time we need to load network tables on a node. - * _init_cache() simply initializes the cache to sane values and + * _init_cache() simply initializes the cache to save values and * needs to be called before any other cache functions are called. * * Used by: slurmd/slurmstepd @@ -407,7 +410,6 @@ _fill_in_adapter_cache(void) { hostlist_iterator_t adapters; char *adapter_name = NULL; - uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; adap_resources_t res; int num; int rc; @@ -416,15 +418,18 @@ _fill_in_adapter_cache(void) adapters = hostlist_iterator_create(adapter_list); for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { rc = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type, &res); + adapter_type_code, &res); if (rc != NRT_SUCCESS) { error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(rc)); + adapter_name, adapter_type_code, + nrt_err_str(rc)); + free(adapter_name); return SLURM_ERROR; } #if NRT_DEBUG info("nrt_adapter_resources():"); - _print_adapter_resources(adapter_name, adapter_type, &res); + _print_adapter_resources(adapter_name, adapter_type_code, + &res); #endif num = adapter_name[3] - (int)'0'; @@ -588,13 +593,15 @@ static char *_get_nrt_conf(void) return rc; } -static int _parse_nrt_file(hostlist_t *adapter_list) +static int _parse_nrt_file(hostlist_t *adapter_list, uint16_t *adapter_code) { - s_p_options_t options[] = {{"AdapterName", S_P_STRING}, {NULL}}; + s_p_options_t options[] = { + {"AdapterName", S_P_STRING}, + {"AdapterType", S_P_STRING}, + {NULL}}; s_p_hashtbl_t *tbl; - char *adapter_name; + char *adapter_name, *adapter_type; -/* FIXME: Need to set adapter_type per nrt.conf file */ debug("Reading the nrt.conf file"); if (!nrt_conf) nrt_conf = _get_nrt_conf(); @@ -610,6 +617,15 @@ static int _parse_nrt_file(hostlist_t *adapter_list) error("Adapter name format is incorrect."); xfree(adapter_name); } + if (s_p_get_string(&adapter_type, "AdapterType", tbl)) { + if (!strcasecmp(adapter_type, "IB") || + !strcasecmp(adapter_type, "InfiniBand")) { + *adapter_code = RSCT_DEVTYPE_INFINIBAND; + } else { + error("Adapter type is invalid (%s).", adapter_type); + } + xfree(adapter_type); + } s_p_hashtbl_destroy(tbl); @@ -627,7 +643,6 @@ _get_adapters(nrt_adapter_t *list, int *count) { hostlist_iterator_t adapter_iter; char *adapter_name = NULL; - uint16_t adapter_type; int i, rc; assert(list != NULL); @@ -635,12 +650,11 @@ _get_adapters(nrt_adapter_t *list, int *count) adapter_iter = hostlist_iterator_create(adapter_list); for (i = 0; (adapter_name = hostlist_next(adapter_iter)); i++) { -/* FIXME: Need to set adapter_type per nrt.conf file */ - adapter_type = RSCT_DEVTYPE_INFINIBAND; - rc = _set_up_adapter(list + i, adapter_name, adapter_type); + rc = _set_up_adapter(list + i, adapter_name, + adapter_type_code); if (rc != SLURM_SUCCESS) { - fatal("Failed to set up adapter %s of type %u", - adapter_name, adapter_type); + fatal("Failed to set up adapter %s of type %hu", + adapter_name, adapter_type_code); } free(adapter_name); } @@ -2127,7 +2141,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) int i; int err; char *adapter_name; - uint16_t adapter_type; uint64_t network_id; uint bulk_xfer_resources = 0; /* Unused by NRT today */ int rc; @@ -2147,9 +2160,6 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) _print_jobinfo(jp); #endif adapter_name = jp->tableinfo[i].adapter_name; -/* FIXME: Determine adapter_type from adapter_name and nrt.conf file contents. - * We probably do NOT want to store adapter_type in nrt_jobinfo_t */ - adapter_type = RSCT_DEVTYPE_INFINIBAND; network_id = _get_network_id_from_adapter(adapter_name); rc = _wait_for_all_windows(&jp->tableinfo[i]); @@ -2159,14 +2169,15 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) if (adapter_name == NULL) continue; if (jp->bulk_xfer && (i == 0)) { - rc = _check_rdma_job_count(adapter_name, adapter_type); + rc = _check_rdma_job_count(adapter_name, + adapter_type_code); if (rc != SLURM_SUCCESS) return rc; } #if NRT_DEBUG info("attempting nrt_load_table_rdma:"); info("adapter_name:%s adapter_type:%hu", adapter_name, - adapter_type); + adapter_type_code); info(" network_id:%"PRIu64" uid:%u pid:%u", network_id, (uint32_t)uid, (uint32_t)pid); info(" job_key:%hd job_desc:%s", jp->job_key, jp->job_desc); @@ -2174,7 +2185,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) bulk_xfer_resources); for (j = 0; j < jp->tableinfo[i].table_length; j++) { /* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { + if (adapter_type_code == RSCT_DEVTYPE_INFINIBAND) { nrt_creator_ib_per_task_input_t *ib_tbl_ptr; ib_tbl_ptr = &jp->tableinfo[i].table[j]. ib_per_task; @@ -2200,7 +2211,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) #endif /* FIXME: nrt_load_table_rdma can not be array of pointers, but must be array of creator elements */ err = nrt_load_table_rdma(NRT_VERSION, - adapter_name, adapter_type, + adapter_name, adapter_type_code, network_id, uid, pid, jp->job_key, jp->job_desc, jp->bulk_xfer, @@ -2493,41 +2504,56 @@ nrt_libstate_clear(void) return SLURM_SUCCESS; } -/* FIXME! - should use adapter name from nrt.conf file now that - * we have that file support. */ extern int nrt_clear_node_state(void) { - int i, j; + int err, j; adap_resources_t res; - char *adapter_name = "sniN"; - uint16_t adapter_type= RSCT_DEVTYPE_INFINIBAND; /* FIXME: How to fill in? */ - int err; + hostlist_iterator_t adapters; + char *adapter_name; - for (i = 0; i < NRT_MAXADAPTERS; i++) { - adapter_name[3] = i + (int) '0'; + if (!adapter_list) { + /* + * Work-around for the nrt_* functions calling umask(0) + */ + nrt_umask = umask(0077); + umask(nrt_umask); + + adapter_list = hostlist_create(NULL); + if (_parse_nrt_file(&adapter_list, &adapter_type_code) != + SLURM_SUCCESS) + return SLURM_FAILURE; + } + + adapters = hostlist_iterator_create(adapter_list); + while ((adapter_name = hostlist_next(adapters))) { err = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type, &res); + adapter_type_code, &res); if (err != NRT_SUCCESS) { error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(err)); + adapter_name, adapter_type_code, + nrt_err_str(err)); + free(adapter_name); continue; } #if NRT_DEBUG info("nrt_clear_node_state: nrt_adapter_resources():"); - _print_adapter_resources(adapter_name, adapter_type, &res); + _print_adapter_resources(adapter_name, adapter_type_code, + &res); #endif for (j = 0; j < res.window_count; j++) { err = nrt_clean_window(NRT_VERSION, adapter_name, - adapter_type, KILL, + adapter_type_code, KILL, res.window_list[j]); if (err != NRT_SUCCESS) { error("nrt_clean_window(%s, %hu): %s", - adapter_name, adapter_type, + adapter_name, adapter_type_code, nrt_err_str(err)); } } free(res.window_list); + free(adapter_name); } + hostlist_iterator_destroy(adapters); return SLURM_SUCCESS; } -- GitLab From d6bbaeab87c8a535f52ae43d248a43e5d1d52890 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 30 Jan 2012 14:53:32 -0800 Subject: [PATCH 025/614] Minor changes to improve debugging messages --- src/plugins/switch/nrt/README | 1 - src/plugins/switch/nrt/nrt.c | 87 ++++++++++++++++++++--------------- 2 files changed, 51 insertions(+), 37 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index 78c5e7c8cf..2f0643469d 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -2,7 +2,6 @@ 1A. Add nrt.conf man page 1B. Add nrt.conf example 1C. Modify nrt.conf parsing and data structures to support adapter_type - (e.g. currently hard-wired to type RSCT_DEVTYPE_INFINIBAND) 2. NRT APIs 2A. Convert all Federation switch API calls to Torrent switch API calls diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index fa7bf90ba3..f71f7700ac 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -256,6 +256,33 @@ nrt_slurmd_step_init(void) } #if NRT_DEBUG +/* Used by: all */ +static void +_print_table(nrt_creator_per_task_input_t *table, int size) +{ + uint16_t adapter_type = RSCT_DEVTYPE_INFINIBAND; + int i; + + assert(table); + assert(size > 0); + + info("--Begin NRT table--"); + for (i = 0; i < size; i++) { +/* FIXME: table contains a union, it could contain either IB or HPCE data */ + if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { + nrt_creator_ib_per_task_input_t *ib_tbl_ptr; + ib_tbl_ptr = &table[i].ib_per_task; + info(" task_id: %hu", ib_tbl_ptr->task_id); + info(" win_id: %hu", ib_tbl_ptr->win_id); + info(" base_lid: %hu", ib_tbl_ptr->base_lid); + } else { + fatal("_print_table: lack HPCE code"); + } + } + info("--End NRT table--"); +} + + /* Used by: slurmd */ static void _print_adapter_resources(char *adapter_name, uint16_t adapter_type, @@ -427,7 +454,7 @@ _fill_in_adapter_cache(void) return SLURM_ERROR; } #if NRT_DEBUG - info("nrt_adapter_resources():"); + info("_fill_in_adapter_cache: nrt_adapter_resources():"); _print_adapter_resources(adapter_name, adapter_type_code, &res); #endif @@ -745,7 +772,10 @@ nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); assert(buf); - +#if NRT_DEBUG + info("nrt_pack_nodeinfo():"); + _print_nodeinfo(n); +#endif offset = get_buf_offset(buf); pack32(n->magic, buf); packmem(n->name, NRT_HOSTLEN, buf); @@ -781,7 +811,10 @@ _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) assert(src); assert(dest->magic == NRT_NODEINFO_MAGIC); assert(src->magic == NRT_NODEINFO_MAGIC); - +#if NRT_DEBUG + info("_copy_node():"); + _print_nodeinfo(src); +#endif strncpy(dest->name, src->name, NRT_HOSTLEN); dest->adapter_count = src->adapter_count; for (i = 0; i < dest->adapter_count; i++) { @@ -1106,7 +1139,7 @@ copy_node: #if NRT_DEBUG info("_unpack_nodeinfo"); - _print_libstate(nrt_state); + _print_nodeinfo(tmp_n); #endif return SLURM_SUCCESS; @@ -1144,6 +1177,10 @@ nrt_free_nodeinfo(nrt_nodeinfo_t *n, bool ptr_into_array) assert(n->magic == NRT_NODEINFO_MAGIC); +#if NRT_DEBUG + info("_unpack_nodeinfo"); + _print_nodeinfo(n); +#endif if (n->adapter_list) { adapter = n->adapter_list; for (i = 0; i < n->adapter_count; i++) { @@ -1434,35 +1471,6 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, } -#if NRT_DEBUG -/* Used by: all */ -static void -_print_table(nrt_creator_per_task_input_t *table, int size) -{ - uint16_t adapter_type = RSCT_DEVTYPE_INFINIBAND; - int i; - - assert(table); - assert(size > 0); - - info("--Begin NRT table--"); - for (i = 0; i < size; i++) { -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table[i].ib_per_task; - info(" task_id: %hu", ib_tbl_ptr->task_id); - info(" win_id: %hu", ib_tbl_ptr->win_id); - info(" base_lid: %hu", ib_tbl_ptr->base_lid); - } else { - fatal("_print_table: lack HPCE code"); - } - } - info("--End NRT table--"); -} -#endif - - /* Find all of the windows used by this job step and set their * status to "state". * @@ -2297,8 +2305,8 @@ nrt_unload_table(nrt_jobinfo_t *jp) ib_tbl_ptr = &table[j].ib_per_task; if (ib_tbl_ptr->base_lid != local_lid) continue; - debug3("freeing adapter %s base_lid %hu win_id %hu " - "job_key %hu", + debug3("freeing adapter %s base_lid %hu " + "win_id %hu job_key %hu", adapter_name, ib_tbl_ptr->base_lid, ib_tbl_ptr->win_id, jp->job_key); err = _unload_window(adapter_name, @@ -2389,6 +2397,10 @@ _pack_libstate(nrt_libstate_t *lp, Buf buffer) assert(lp); assert(lp->magic == NRT_LIBSTATE_MAGIC); +#if NRT_DEBUG + info("_pack_libstate"); + _print_libstate(lp); + #endif offset = get_buf_offset(buffer); pack32(lp->magic, buffer); pack32(lp->node_count, buffer); @@ -2439,7 +2451,10 @@ _unpack_libstate(nrt_libstate_t *lp, Buf buffer) return SLURM_ERROR; } safe_unpack16(&lp->key_index, buffer); - +#if NRT_DEBUG + info("_unpack_libstate"); + _print_libstate(lp); + #endif return SLURM_SUCCESS; unpack_error: -- GitLab From 953cbe620a3ba4f30d3525461961ba8b3c1afb96 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 30 Jan 2012 15:27:48 -0800 Subject: [PATCH 026/614] Add nrt.conf man page --- doc/man/man5/Makefile.am | 2 ++ doc/man/man5/Makefile.in | 2 ++ doc/man/man5/nrt.conf.5 | 75 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 doc/man/man5/nrt.conf.5 diff --git a/doc/man/man5/Makefile.am b/doc/man/man5/Makefile.am index f8a9ca37a7..aaf3698190 100644 --- a/doc/man/man5/Makefile.am +++ b/doc/man/man5/Makefile.am @@ -6,6 +6,7 @@ man5_MANS = bluegene.conf.5 \ cgroup.conf.5 \ cray.conf.5 \ gres.conf.5 \ + nrt.conf.5 \ slurm.conf.5 \ slurmdbd.conf.5 \ topology.conf.5 \ @@ -16,6 +17,7 @@ html_DATA = \ bluegene.conf.html \ cgroup.conf.html \ gres.conf.html \ + nrt.conf.html \ slurm.conf.html \ slurmdbd.conf.html \ topology.conf.html \ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index f1190ffe83..f3390950a9 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -319,6 +319,7 @@ man5_MANS = bluegene.conf.5 \ cgroup.conf.5 \ cray.conf.5 \ gres.conf.5 \ + nrt.conf.5 \ slurm.conf.5 \ slurmdbd.conf.5 \ topology.conf.5 \ @@ -328,6 +329,7 @@ man5_MANS = bluegene.conf.5 \ @HAVE_MAN2HTML_TRUE@ bluegene.conf.html \ @HAVE_MAN2HTML_TRUE@ cgroup.conf.html \ @HAVE_MAN2HTML_TRUE@ gres.conf.html \ +@HAVE_MAN2HTML_TRUE@ nrt.conf.html \ @HAVE_MAN2HTML_TRUE@ slurm.conf.html \ @HAVE_MAN2HTML_TRUE@ slurmdbd.conf.html \ @HAVE_MAN2HTML_TRUE@ topology.conf.html \ diff --git a/doc/man/man5/nrt.conf.5 b/doc/man/man5/nrt.conf.5 new file mode 100644 index 0000000000..95241eab1e --- /dev/null +++ b/doc/man/man5/nrt.conf.5 @@ -0,0 +1,75 @@ +.TH "nrt.conf" "5" "January 2012" "nrt.conf 2.4" "SLURM configuration file" + +.SH "NAME" +nrt.conf \- Slurm configuration file for the IBM Network Resource Table (NRT) specific information + +.SH "DESCRIPTION" +\fBnrt.conf\fP is an ASCII file which defines parameters used by +SLURM's switch/nrt plugin in support of IBM systems in which the Network +Resource Table (NRT) Application Programming Interface (API) is used to +manage its network. +The file location can be modified at system build time using the +DEFAULT_SLURM_CONF parameter or at execution time by setting the SLURM_CONF +environment variable. The file will always be located in the +same directory as the \fBslurm.conf\fP file. +.LP +Parameter names are case insensitive. +Any text following a "#" in the configuration file is treated +as a comment through the end of that line. +The size of each line in the file is limited to 1024 characters. +Changes to the configuration file take effect upon restart of +SLURM daemons. +.LP +The configuration parameters available include: + +.TP +\fBAdapterName\fR= +Name of switch adapter(s). This can use the same name format as the SLURM +hostname expression (numeric values or ranges in square brackets). For example, +"sni0", "sni[0-1]", "sni[0,1]" or "sni[0-1,2]". + +.TP +\fBAdapterType\fR= +The adapter type. Valid values include: +.RS +.TP 12 +\fBIB\fR +InfiniBand switch type +.TP +\fBHPCE\fR +HPCE switch type +.RE + +.SH "EXAMPLE" +.LP +.br +### +.br +# SLURM Network Resource Table (NRT) configuration file +.br +### +.br +AdapterName=sni[0-1] +.br +AdapterType=IB + +.SH "COPYING" +Copyright (C) 2012 SchedMD LLC. +Produced at SchedMD LLC (cf, DISCLAIMER). +.LP +This file is part of SLURM, a resource management program. +For details, see . +.LP +SLURM is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 2 of the License, or (at your option) +any later version. +.LP +SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +details. + +.SH "SEE ALSO" +.LP +\fBslurm.conf\fR(5) -- GitLab From 4068c0911849ede3484b0870b344a4c4f19ba6d8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 6 Feb 2012 12:58:44 -0800 Subject: [PATCH 027/614] Mods needed to run configure on real percs system --- Makefile.in | 2 + auxdir/Makefile.in | 2 + auxdir/acx_pthread.m4 | 2 +- auxdir/x_ac_federation.m4 | 39 ++++++++++- config.h.in | 3 + configure | 64 ++++++++++++++++++- configure.ac | 7 ++ contribs/Makefile.in | 2 + contribs/arrayrun/Makefile.in | 2 + contribs/cray/Makefile.in | 2 + contribs/lua/Makefile.in | 2 + contribs/pam/Makefile.in | 2 + contribs/perlapi/Makefile.in | 2 + contribs/perlapi/libslurm/Makefile.in | 2 + contribs/perlapi/libslurmdb/Makefile.in | 2 + contribs/phpext/Makefile.in | 2 + contribs/sjobexit/Makefile.in | 2 + contribs/slurmdb-direct/Makefile.in | 2 + contribs/torque/Makefile.in | 2 + doc/Makefile.in | 2 + doc/html/Makefile.in | 2 + doc/man/Makefile.in | 2 + doc/man/man1/Makefile.in | 2 + doc/man/man3/Makefile.in | 2 + doc/man/man5/Makefile.in | 2 + doc/man/man8/Makefile.in | 2 + src/Makefile.in | 2 + src/api/Makefile.in | 2 + src/common/Makefile.in | 2 + src/database/Makefile.in | 2 + src/db_api/Makefile.in | 2 + src/plugins/Makefile.in | 2 + src/plugins/accounting_storage/Makefile.in | 2 + .../accounting_storage/common/Makefile.in | 2 + .../accounting_storage/filetxt/Makefile.in | 2 + .../accounting_storage/mysql/Makefile.in | 2 + .../accounting_storage/none/Makefile.in | 2 + .../accounting_storage/pgsql/Makefile.in | 2 + .../accounting_storage/slurmdbd/Makefile.in | 2 + src/plugins/auth/Makefile.in | 2 + src/plugins/auth/authd/Makefile.in | 2 + src/plugins/auth/munge/Makefile.in | 2 + src/plugins/auth/none/Makefile.in | 2 + src/plugins/checkpoint/Makefile.in | 2 + src/plugins/checkpoint/aix/Makefile.in | 2 + src/plugins/checkpoint/blcr/Makefile.in | 2 + src/plugins/checkpoint/none/Makefile.in | 2 + src/plugins/checkpoint/ompi/Makefile.in | 2 + src/plugins/crypto/Makefile.in | 2 + src/plugins/crypto/munge/Makefile.in | 2 + src/plugins/crypto/openssl/Makefile.in | 2 + src/plugins/gres/Makefile.in | 2 + src/plugins/gres/gpu/Makefile.in | 2 + src/plugins/gres/nic/Makefile.in | 2 + src/plugins/job_submit/Makefile.in | 2 + src/plugins/job_submit/cnode/Makefile.in | 2 + src/plugins/job_submit/defaults/Makefile.in | 2 + src/plugins/job_submit/logging/Makefile.in | 2 + src/plugins/job_submit/lua/Makefile.in | 2 + src/plugins/job_submit/partition/Makefile.in | 2 + src/plugins/jobacct_gather/Makefile.in | 2 + src/plugins/jobacct_gather/aix/Makefile.in | 2 + src/plugins/jobacct_gather/linux/Makefile.in | 2 + src/plugins/jobacct_gather/none/Makefile.in | 2 + src/plugins/jobcomp/Makefile.in | 2 + src/plugins/jobcomp/filetxt/Makefile.in | 2 + src/plugins/jobcomp/mysql/Makefile.in | 2 + src/plugins/jobcomp/none/Makefile.in | 2 + src/plugins/jobcomp/pgsql/Makefile.in | 2 + src/plugins/jobcomp/script/Makefile.in | 2 + src/plugins/mpi/Makefile.in | 2 + src/plugins/mpi/lam/Makefile.in | 2 + src/plugins/mpi/mpich1_p4/Makefile.in | 2 + src/plugins/mpi/mpich1_shmem/Makefile.in | 2 + src/plugins/mpi/mpichgm/Makefile.in | 2 + src/plugins/mpi/mpichmx/Makefile.in | 2 + src/plugins/mpi/mvapich/Makefile.in | 2 + src/plugins/mpi/none/Makefile.in | 2 + src/plugins/mpi/openmpi/Makefile.in | 2 + src/plugins/preempt/Makefile.in | 2 + src/plugins/preempt/none/Makefile.in | 2 + .../preempt/partition_prio/Makefile.in | 2 + src/plugins/preempt/qos/Makefile.in | 2 + src/plugins/priority/Makefile.in | 2 + src/plugins/priority/basic/Makefile.in | 2 + src/plugins/priority/multifactor/Makefile.in | 2 + src/plugins/proctrack/Makefile.in | 2 + src/plugins/proctrack/aix/Makefile.in | 2 + src/plugins/proctrack/cgroup/Makefile.in | 2 + src/plugins/proctrack/linuxproc/Makefile.in | 2 + src/plugins/proctrack/lua/Makefile.in | 2 + src/plugins/proctrack/pgid/Makefile.in | 2 + src/plugins/proctrack/rms/Makefile.in | 2 + src/plugins/proctrack/sgi_job/Makefile.in | 2 + src/plugins/sched/Makefile.in | 2 + src/plugins/sched/backfill/Makefile.in | 2 + src/plugins/sched/builtin/Makefile.in | 2 + src/plugins/sched/hold/Makefile.in | 2 + src/plugins/sched/wiki/Makefile.in | 2 + src/plugins/sched/wiki2/Makefile.in | 2 + src/plugins/select/Makefile.in | 2 + src/plugins/select/bluegene/Makefile.in | 2 + src/plugins/select/bluegene/ba/Makefile.in | 2 + .../select/bluegene/ba_bgq/Makefile.in | 2 + src/plugins/select/bluegene/bl/Makefile.in | 2 + .../select/bluegene/bl_bgq/Makefile.in | 2 + src/plugins/select/bluegene/sfree/Makefile.in | 2 + src/plugins/select/cons_res/Makefile.in | 2 + src/plugins/select/cray/Makefile.in | 2 + src/plugins/select/cray/libalps/Makefile.in | 2 + .../select/cray/libemulate/Makefile.in | 2 + src/plugins/select/linear/Makefile.in | 2 + src/plugins/switch/Makefile.in | 4 +- src/plugins/switch/elan/Makefile.in | 2 + src/plugins/switch/federation/Makefile.in | 2 + src/plugins/switch/none/Makefile.in | 2 + src/plugins/switch/nrt/Makefile.am | 4 +- src/plugins/switch/nrt/Makefile.in | 20 +++--- src/plugins/task/Makefile.in | 2 + src/plugins/task/affinity/Makefile.in | 2 + src/plugins/task/cgroup/Makefile.in | 2 + src/plugins/task/none/Makefile.in | 2 + src/plugins/topology/3d_torus/Makefile.in | 2 + src/plugins/topology/Makefile.in | 2 + src/plugins/topology/node_rank/Makefile.in | 2 + src/plugins/topology/none/Makefile.in | 2 + src/plugins/topology/tree/Makefile.in | 2 + src/sacct/Makefile.in | 2 + src/sacctmgr/Makefile.in | 2 + src/salloc/Makefile.in | 2 + src/sattach/Makefile.in | 2 + src/sbatch/Makefile.in | 2 + src/sbcast/Makefile.in | 2 + src/scancel/Makefile.in | 2 + src/scontrol/Makefile.in | 2 + src/sinfo/Makefile.in | 2 + src/slurmctld/Makefile.in | 2 + src/slurmd/Makefile.in | 2 + src/slurmd/common/Makefile.in | 2 + src/slurmd/slurmd/Makefile.in | 2 + src/slurmd/slurmstepd/Makefile.in | 2 + src/slurmdbd/Makefile.in | 2 + src/smap/Makefile.in | 2 + src/sprio/Makefile.in | 2 + src/squeue/Makefile.in | 2 + src/sreport/Makefile.in | 2 + src/srun/Makefile.in | 2 + src/srun_cr/Makefile.in | 2 + src/sshare/Makefile.in | 2 + src/sstat/Makefile.in | 2 + src/strigger/Makefile.in | 2 + src/sview/Makefile.in | 2 + testsuite/Makefile.in | 2 + testsuite/expect/Makefile.in | 2 + testsuite/slurm_unit/Makefile.in | 2 + testsuite/slurm_unit/api/Makefile.in | 2 + testsuite/slurm_unit/api/manual/Makefile.in | 2 + testsuite/slurm_unit/common/Makefile.in | 2 + 158 files changed, 427 insertions(+), 16 deletions(-) diff --git a/Makefile.in b/Makefile.in index a9412ddea1..ae7e888dee 100644 --- a/Makefile.in +++ b/Makefile.in @@ -222,6 +222,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -253,6 +254,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 1b86a66ded..c8ae8568a1 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -136,6 +136,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -167,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/auxdir/acx_pthread.m4 b/auxdir/acx_pthread.m4 index ed9885ed3f..22ff8c5436 100644 --- a/auxdir/acx_pthread.m4 +++ b/auxdir/acx_pthread.m4 @@ -144,7 +144,7 @@ for flag in $acx_pthread_flags; do # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_atfork(NULL, NULL, NULL); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[]) LIBS="$save_LIBS" diff --git a/auxdir/x_ac_federation.m4 b/auxdir/x_ac_federation.m4 index b377a9811c..dcd8f6a48b 100644 --- a/auxdir/x_ac_federation.m4 +++ b/auxdir/x_ac_federation.m4 @@ -9,7 +9,8 @@ # # DESCRIPTION: # Checks for availability of the libraries necessary to support -# communication via User Space over the Federation switch. +# communication via IBM interconnects (Federation switch and NRT, Network +# Resource Table API). # # WARNINGS: # This macro must be placed after AC_PROG_CC or equivalent. @@ -51,3 +52,39 @@ AC_DEFUN([X_AC_FEDERATION], AC_SUBST(FEDERATION_LDFLAGS) ]) + + + +AC_DEFUN([X_AC_NRT], +[ + AC_MSG_CHECKING([whether to enable IBM NRT support]) + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + + # search for required NRT API libraries + if test -f "$ntbl_dir/libnrt.so"; then + ac_have_nrt="yes" + NRT_LDFLAGS="-lnrt" + break; + fi + + done + + if test "x$ac_have_nrt" != "xyes" ; then + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([Cannot support IBM NRT API without libnrt.]) + else + AC_MSG_RESULT([yes]) + AC_DEFINE(HAVE_LIBNRT, 1, [define if you have libnrt.]) + fi + + AC_SUBST(NRT_LDFLAGS) +]) diff --git a/config.h.in b/config.h.in index a2518075fd..493f2121c8 100644 --- a/config.h.in +++ b/config.h.in @@ -148,6 +148,9 @@ /* Define to 1 if you have the `job' library (-ljob). */ #undef HAVE_LIBJOB +/* define if you have libnrt. */ +#undef HAVE_LIBNRT + /* define if you have libntbl. */ #undef HAVE_LIBNTBL diff --git a/configure b/configure index 9419b8c5af..50445c3dc9 100755 --- a/configure +++ b/configure @@ -651,6 +651,10 @@ lua_LIBS lua_CFLAGS HAVE_SGI_JOB_FALSE HAVE_SGI_JOB_TRUE +HAVE_NRT +HAVE_NRT_FALSE +HAVE_NRT_TRUE +NRT_LDFLAGS HAVE_FEDERATION HAVE_FEDERATION_FALSE HAVE_FEDERATION_TRUE @@ -19183,7 +19187,7 @@ int main () { pthread_t th; pthread_join(th, 0); - pthread_attr_init(0); pthread_cleanup_push(0, 0); + pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_atfork(NULL, NULL, NULL); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; @@ -21254,6 +21258,55 @@ fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 +$as_echo_n "checking whether to enable IBM NRT support... " >&6; } + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + + # search for required NRT API libraries + if test -f "$ntbl_dir/libnrt.so"; then + ac_have_nrt="yes" + NRT_LDFLAGS="-lnrt" + break; + fi + + done + + if test "x$ac_have_nrt" != "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support IBM NRT API without libnrt." >&5 +$as_echo "$as_me: Cannot support IBM NRT API without libnrt." >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +$as_echo "#define HAVE_LIBNRT 1" >>confdefs.h + + fi + + + + if test "x$ac_have_nrt" = "xyes"; then + HAVE_NRT_TRUE= + HAVE_NRT_FALSE='#' +else + HAVE_NRT_TRUE='#' + HAVE_NRT_FALSE= +fi + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for job_attachpid in -ljob" >&5 $as_echo_n "checking for job_attachpid in -ljob... " >&6; } if ${ac_cv_lib_job_job_attachpid+:} false; then : @@ -22162,7 +22215,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -22411,6 +22464,10 @@ if test -z "${HAVE_FEDERATION_TRUE}" && test -z "${HAVE_FEDERATION_FALSE}"; then as_fn_error $? "conditional \"HAVE_FEDERATION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_NRT_TRUE}" && test -z "${HAVE_NRT_FALSE}"; then + as_fn_error $? "conditional \"HAVE_NRT\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${HAVE_SGI_JOB_TRUE}" && test -z "${HAVE_SGI_JOB_FALSE}"; then as_fn_error $? "conditional \"HAVE_SGI_JOB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23564,8 +23621,9 @@ do "src/plugins/select/linear/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/linear/Makefile" ;; "src/plugins/switch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/Makefile" ;; "src/plugins/switch/elan/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/elan/Makefile" ;; - "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; "src/plugins/switch/federation/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/federation/Makefile" ;; + "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; + "src/plugins/switch/nrt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/Makefile" ;; "src/plugins/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/Makefile" ;; "src/plugins/mpi/mpich1_p4/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_p4/Makefile" ;; "src/plugins/mpi/mpich1_shmem/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_shmem/Makefile" ;; diff --git a/configure.ac b/configure.ac index 04b6544f6a..db3703d3c3 100644 --- a/configure.ac +++ b/configure.ac @@ -289,6 +289,13 @@ X_AC_FEDERATION AM_CONDITIONAL(HAVE_FEDERATION, test "x$ac_have_federation" = "xyes") AC_SUBST(HAVE_FEDERATION) + +dnl check for whether to include IBM NRT (Network Resource Table) support +dnl +X_AC_NRT +AM_CONDITIONAL(HAVE_NRT, test "x$ac_have_nrt" = "xyes") +AC_SUBST(HAVE_NRT) + dnl check for SGI job container support dnl X_AC_SGI_JOB diff --git a/contribs/Makefile.in b/contribs/Makefile.in index 5b38c95ab4..ed985d43b9 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 08a54351c0..ee8c16bcb0 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index 3502d17289..4e020d30cc 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -163,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index 0b719898b1..fe6f347fbf 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 90a77b6cab..ad505e52cb 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -189,6 +189,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -220,6 +221,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index ec7776a827..46de7f0c05 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index 2239325ffc..2ab6112e88 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index 403f910a6b..5d277611bf 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index e3e975f4f3..6a8100b0ed 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index a024440c02..c5f27540b6 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -162,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index d5ad51d086..eb19faaff5 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -162,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 980f66f466..3abfacc240 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -162,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/Makefile.in b/doc/Makefile.in index db6ac8a70d..aa66d407cb 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index dd2b6ceecb..f82f5503d7 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -160,6 +160,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -191,6 +192,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 01baf41e56..9229e9b548 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index 7c31c57465..3ab5046504 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -163,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index ec07874f73..5eb2a41adf 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -160,6 +160,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -191,6 +192,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index c2d9d7ff55..91d10d3498 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -163,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index 31ccb84e27..290446f624 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -163,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/Makefile.in b/src/Makefile.in index 9bcfdd1b60..071495d247 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -180,6 +180,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +212,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 6b7c8bd424..c89017fa1e 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -212,6 +212,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -243,6 +244,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index c218bc42bd..81367d3465 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -257,6 +257,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -288,6 +289,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/database/Makefile.in b/src/database/Makefile.in index a7b0ed7456..b1aac24f22 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -187,6 +187,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index 99baaf32c5..13ad6a88e5 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -197,6 +197,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -228,6 +229,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 01ead5be7d..60fd457560 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 2dbd8bc768..362dcdd166 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index 290635613b..cae7b2e693 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -158,6 +158,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -189,6 +190,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index 48f519387b..e605d9dd97 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -185,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index 7e207af863..d6cf94ef3a 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -235,6 +235,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -266,6 +267,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index ac4800dedd..3018eba1bc 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -184,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 09741209c0..9107b3460b 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -230,6 +230,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -261,6 +262,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index b79365de20..8090f2e1dc 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -185,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 0e1debd686..cce4d4fa72 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index b62120f137..51cd30adf3 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 6a0d3b8074..a31bcf1bab 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -184,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index 2e1e82607c..6ac05ff0cf 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index 632b95be17..538e822552 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index ef02494db8..d0d8480aa1 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -187,6 +187,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 8eb94cd11b..d43ccb09ce 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -193,6 +193,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -224,6 +225,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index ffb5826dd8..3c8bea3794 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index b725e69146..e5cc65b7ff 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index 248b7a49b7..a87e748fde 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index 930d4d0458..86c1580485 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -184,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index b90ef8c8dc..3191e620d0 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -189,6 +189,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -220,6 +221,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index 3f2388b54d..6a11b467bd 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index ff3d8bba44..1598694509 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index f26fdad465..0bf62689c7 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index 7eb5f4c4b3..b465e793b0 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index 53f06f749f..ddfa49bb75 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index 5b66492c4a..c5679541c1 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index 4ac50e2df8..a8fa91c792 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index 1f6953769b..6611d6e236 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -187,6 +187,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 725fb995ed..2ecf2b00f7 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index 9c59f0986c..312ccc8fd7 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index e9b7ea8db6..56a6b7830d 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 2f87104024..dfaf08c599 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index 7718913d30..d0559b5064 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index 7f0f709362..24b304f06f 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 494fb0219b..e1c9f0c178 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index e37f8215ef..3c9d455367 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -191,6 +191,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 15edf151c3..4c6ec00e19 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index f7339818f4..7bb411252f 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -191,6 +191,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index 506f21b85e..6438bbcca1 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 585512e95c..70158a1a8b 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index 7b0b37fc6d..50189ae786 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 4a3cf37516..0648f3843a 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index db4211ef1d..bae04847b5 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index 2b154466cd..fec57d685b 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index 34726bc1c6..e811f052c2 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index a00190387a..afdcc195c6 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 329507f8f1..f2cdc7d878 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index 2f48aaa7b0..8ce4969950 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index 567674f5e0..1a77cd2ab2 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index c0b5f10473..fb80799ae2 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index d416ef0f40..6d9d0dede6 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -184,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index bcc13036bd..2e46103e51 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index 57e51c83de..d905d5c507 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index 3118180c3c..ec26dcccf7 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index d6be58f2c2..1595344819 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index 4a44c61457..602c15e953 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 86413e9f84..fd425beca2 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index 963d63d89b..68a9673b6f 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 5b7d8e45e9..ea35f52175 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index c4fbc34a06..3420610ed0 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index d2851f53dc..6d11d028eb 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in index bf27931014..cd158ee3ea 100644 --- a/src/plugins/proctrack/rms/Makefile.in +++ b/src/plugins/proctrack/rms/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index d25a6e05ff..2987838e82 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index f2b3a72f76..5b3d4f5dc5 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index 121aaf3d1a..0f27e5095b 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index fc02bba236..02fcb6a413 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index 324905971d..6d58c1a5ff 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index 60d91ffb01..cf75625e14 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -184,6 +184,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -215,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index f679ffb550..03617c14d1 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -187,6 +187,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -218,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index 88b40a5301..1585593524 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 9afc6e40ac..1ff7fce66f 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -344,6 +344,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -375,6 +376,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index aaabcb21d0..f97152a24f 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -170,6 +170,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +202,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index 4781aba9ef..e66d035193 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -180,6 +180,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +212,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index be1fd48a3f..551f2d9076 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -161,6 +161,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -192,6 +193,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index a2c355d90d..0faf8726e5 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -170,6 +170,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +202,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index b3d5579735..984c232211 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -162,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index 52f80fd9b9..85df8bb11c 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index 1ae7405505..bbad62ea8e 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -229,6 +229,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -260,6 +261,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index eec9ab4187..9ada0ed3af 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -168,6 +168,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -199,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index 5dae4cc6cd..ebca087d2f 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -162,6 +162,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -193,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index 8effe85bbe..3af47d88c6 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index 48ea9f6ceb..4911032bad 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -325,7 +327,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = elan none federation +SUBDIRS = elan none nrt federation all: all-recursive .SUFFIXES: diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in index b773c85fb6..1f711f7599 100644 --- a/src/plugins/switch/elan/Makefile.in +++ b/src/plugins/switch/elan/Makefile.in @@ -188,6 +188,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -219,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in index 62d34bd3c0..c743b27ad5 100644 --- a/src/plugins/switch/federation/Makefile.in +++ b/src/plugins/switch/federation/Makefile.in @@ -191,6 +191,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -222,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index 6dcb50d1ac..fb48fe780e 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 5201e9a8f9..f6313e6047 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -12,10 +12,10 @@ SWITCH_NRT_LA_SOURCES = \ nrt_keys.h \ switch_nrt.c -if BUILD_NRT +if HAVE_NRT pkglib_LTLIBRARIES = switch_nrt.la switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) -switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) +switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) else pkglib_LTLIBRARIES = diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 59f1256c69..771f8cf963 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -109,14 +109,14 @@ LTLIBRARIES = $(pkglib_LTLIBRARIES) switch_nrt_la_LIBADD = am__switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h switch_nrt.c am__objects_1 = nrt.lo switch_nrt.lo -@BUILD_FEDERATION_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) +@HAVE_NRT_TRUE@am_switch_nrt_la_OBJECTS = $(am__objects_1) am__EXTRA_switch_nrt_la_SOURCES_DIST = nrt.c nrt.h nrt_keys.h \ switch_nrt.c switch_nrt_la_OBJECTS = $(am_switch_nrt_la_OBJECTS) switch_nrt_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(switch_nrt_la_LDFLAGS) $(LDFLAGS) -o $@ -@BUILD_FEDERATION_TRUE@am_switch_nrt_la_rpath = -rpath $(pkglibdir) +@HAVE_NRT_TRUE@am_switch_nrt_la_rpath = -rpath $(pkglibdir) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp am__depfiles_maybe = depfiles @@ -185,8 +185,12 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ +HAVE_ELAN = @HAVE_ELAN@ +HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ HWLOC_LIBS = @HWLOC_LIBS@ @@ -203,7 +207,6 @@ LIBTOOL = @LIBTOOL@ LIB_LDFLAGS = @LIB_LDFLAGS@ LIPO = @LIPO@ LN_S = @LN_S@ -LOADLEVELER_INCLUDES = @LOADLEVELER_INCLUDES@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ @@ -217,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ @@ -342,11 +346,11 @@ SWITCH_NRT_LA_SOURCES = \ nrt_keys.h \ switch_nrt.c -@BUILD_FEDERATION_FALSE@pkglib_LTLIBRARIES = -@BUILD_FEDERATION_TRUE@pkglib_LTLIBRARIES = switch_nrt.la -@BUILD_FEDERATION_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) -@BUILD_FEDERATION_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(FEDERATION_LDFLAGS) -@BUILD_FEDERATION_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +@HAVE_NRT_FALSE@pkglib_LTLIBRARIES = +@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la +@HAVE_NRT_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) +@HAVE_NRT_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) +@HAVE_NRT_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) all: all-am .SUFFIXES: diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index 3eca05a5c0..05c831e267 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 6c108b7542..9459256170 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -194,6 +194,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -225,6 +226,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index 772c54787c..fdbcb655ac 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -185,6 +185,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -216,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 8969fc57cf..129f0c37f3 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index 03168d8c1f..00d06dff9a 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -183,6 +183,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -214,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index 38cb018d8e..2957bbcbc8 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -177,6 +177,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -208,6 +209,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index 3b76b09d1e..159b04ff1e 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 74351935c7..579dc77cc9 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index 476e4bff2a..8bfbac27a7 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index c770674087..ca02e7e304 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index 32ef2c32f7..b53628fee1 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -171,6 +171,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -202,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 8c5658a86d..c5301c6ec8 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -165,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -196,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 96dd3957e7..f7538bc5e7 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -164,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 1405bef514..4da6d69125 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -164,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 0cfb072c58..d7ff2cd6f9 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 3583a0c07a..a6384975ff 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -165,6 +165,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -196,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 6d94e7077a..2ef57ad488 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -180,6 +180,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -211,6 +212,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 6596965cd1..f42f45f87e 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -167,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index f743403606..4b7ca3e940 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -174,6 +174,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -205,6 +206,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index a61fdf3658..ecb4e20b93 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index c4d3832dac..c8561f7809 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -158,6 +158,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -189,6 +190,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index c266e74289..60e9049891 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -167,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index e2df9338c9..a3f63133ec 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -170,6 +170,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -201,6 +202,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 7ea6fa3767..969ac2fc84 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 7c793c1eb2..c284df0986 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -186,6 +186,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -217,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index eaed426f2b..07af397a65 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index 0c31b28ddf..377eb12a47 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -167,6 +167,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -198,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 17fa4905b2..34cc3b9ead 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 5111e985a9..dbe6ccc68f 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index b0b185dd39..49a010d5bb 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -164,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 18e5d93538..cd1b650a92 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -164,6 +164,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -195,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 35b7ab448a..a6bd846041 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -163,6 +163,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -194,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 6b8659f756..0e73149bc9 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -166,6 +166,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -197,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index 03c490394f..e479c29017 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -190,6 +190,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -221,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 71b20b0bb5..f0bf945e7d 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -182,6 +182,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -213,6 +214,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 9ea034dbdb..36918b0988 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -135,6 +135,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -166,6 +167,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index 4cfbe27e45..24501b19b4 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -175,6 +175,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -206,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index a1273da5f0..a7f06581a7 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -198,6 +198,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -229,6 +230,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 0938ac3e12..a04d16a25b 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -190,6 +190,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -221,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index 2178b17bd6..4b9686e6bc 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -178,6 +178,7 @@ HAVE_AIX = @HAVE_AIX@ HAVE_ELAN = @HAVE_ELAN@ HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ @@ -209,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -- GitLab From b371273fe26e9626014048367f4051308b86d183 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 6 Feb 2012 14:07:03 -0800 Subject: [PATCH 028/614] Remove fake nrt.h file --- src/plugins/switch/nrt/nrt.h | 126 ----------------------------------- 1 file changed, 126 deletions(-) delete mode 100644 src/plugins/switch/nrt/nrt.h diff --git a/src/plugins/switch/nrt/nrt.h b/src/plugins/switch/nrt/nrt.h deleted file mode 100644 index fd894f2181..0000000000 --- a/src/plugins/switch/nrt/nrt.h +++ /dev/null @@ -1,126 +0,0 @@ -/* This should be the same as IBM's nrt.h file (or close anyway) */ - -#ifndef _NRT_INCLUDED -#define _NRT_INCLUDED - -#include - -#define MAX_SPIGOTS 4 -#define NRT_MAX_DEVICENAME_SIZE 6 -#define NRT_VERSION 100 - -#define NRT_SUCCESS 0 -#define NRT_EINVAL 1 -#define NRT_EPERM 2 -#define NRT_PNSDAPI 3 -#define NRT_EADAPTER 4 -#define NRT_ESYSTEM 5 -#define NRT_EMEM 6 -#define NRT_EIO 7 -#define NRT_NO_RDMA_AVAIL 8 -#define NRT_EADAPTYPE 9 -#define NRT_BAD_VERSION 10 -#define NRT_EAGAIN 11 -#define NRT_WRONG_WINDOW_STATE 12 -#define NRT_UNKNOWN_ADAPTER 13 - -#define NRT_ALREADY_LOADED 15 - - -typedef struct { - uint32_t node_number; // to form unique ID - uint8_t num_spigots; //Ports for IB, spigots for HCPE - uint8_t padding1[3]; //future use - uint16_t lid[MAX_SPIGOTS]; //(IB only) Logical ID of each spigot - uint64_t network_id[MAX_SPIGOTS]; //Network ID for each adapter spigot - uint8_t lmc[MAX_SPIGOTS]; //(IB only) Logical mask of each spigot - uint8_t spigot_id[MAX_SPIGOTS]; //Port/Spigot IDs - uint16_t window_count; //Count of window in window_list - uint8_t padding2[6]; //future use - uint16_t *window_list; //array of available windows - uint64_t rcontext_block_count; //available rcxt blocks -} adap_resources_t; - - -typedef enum { NRT_WIN_UNAVAILABLE, //Initialization in progress - NRT_WIN_INVALID, // Not a usable window - NRT_WIN_AVAILABLE, // Ready for NRT load - NRT_WIN_RESERVED, //Window reserved, NRT not loaded - // (for POE-PMD) - NRT_WIN_READY, //NRT loaded - NRT_WIN_RUNNING //Window is running -} win_state_t; - -typedef struct { - pid_t client_pid; // Pid of process that loaded - uid_t uid; // Uid using the window - uint16_t window_id; // Window being reported - uint16_t bulk_transfer; // Is this lead using RDMA? - uint32_t rcontext_blocks; // rcontexts per window - win_state_t state; // Window state - uint8_t padding[4]; -} nrt_status_t; - -typedef enum { LEAVE_IN_USE, KILL } clean_option_t; - - -int nrt_adapter_resources(int version, char *adapter_device_string, - uint16_t adapter_type, - adap_resources_t *adapter_infor_OUT); - -int nrt_clean_window (int version, char *adapter_or_string, - uint16_t adapter_type, - clean_option_t leave_inuse_or_kill, - ushort window_id); - - -typedef struct { - uint16_t task_id; - uint16_t win_id; - uint32_t node_number; - char device_name[NRT_MAX_DEVICENAME_SIZE]; - uint16_t base_lid; - uint8_t port_id; - uint8_t lmc; - uint8_t port_status; //ignored - uint8_t padding[3]; -} nrt_creator_ib_per_task_input_t; - -typedef struct { - uint16_t task_id; -/* FIXME: We have no idea what this should contain */ -} nrt_creator_hpce_per_task_input_t; - -typedef union { - nrt_creator_hpce_per_task_input_t hpce_per_task; - nrt_creator_ib_per_task_input_t ib_per_task; -} nrt_creator_per_task_input_t; - -int nrt_load_table_rdma (int version, char *adapter_or_string, - uint16_t adapter_type, - uint64_t network_id, uid_t uid, pid_t pid, - ushort job_key, char *job_description, - uint use_bulk_transfer, - uint bulk_transfer_resources, int table_size, - nrt_creator_per_task_input_t *per_task_input); - - -int nrt_rdma_jobs(int version, char *adapter_device_string, - uint16_t adapter_type, uint16_t *job_count, - uint16_t **job_keys); - - -int nrt_status_adapter (int version, char *adapter_device_string, - uint16_t adapter_type, uint16_t *window_count, - nrt_status_t ** status_array); - - -int nrt_unload_window (int version, char * adapter_device_string, - uint16_t adapter_type, ushort job_key, - ushort window_id); - - - - -int nrt_version(void); -#endif -- GitLab From d17ace3cad800f9e3d6c80a4c7672bcd43b1e285 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 6 Feb 2012 14:26:33 -0800 Subject: [PATCH 029/614] Remove src/api/load_leveler.c, not needed in this branch --- src/api/Makefile.am | 1 - src/api/Makefile.in | 6 ++---- src/api/load_leveler.c | 0 3 files changed, 2 insertions(+), 5 deletions(-) delete mode 100644 src/api/load_leveler.c diff --git a/src/api/Makefile.am b/src/api/Makefile.am index d37b3d7dc9..336b8d0921 100644 --- a/src/api/Makefile.am +++ b/src/api/Makefile.am @@ -90,7 +90,6 @@ slurmapi_src = \ init_msg.c \ job_info.c \ job_step_info.c \ - load_leveler.c \ node_info.c \ partition_info.c \ reservation_info.c \ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 5b1f8cc09c..0bc7485139 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -127,8 +127,8 @@ am__DEPENDENCIES_1 = $(common_dir)/libcommon.la \ libslurmhelper_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = allocate.lo allocate_msg.lo block_info.lo cancel.lo \ checkpoint.lo complete.lo config_info.lo front_end_info.lo \ - init_msg.lo job_info.lo job_step_info.lo load_leveler.lo \ - node_info.lo partition_info.lo reservation_info.lo signal.lo \ + init_msg.lo job_info.lo job_step_info.lo node_info.lo \ + partition_info.lo reservation_info.lo signal.lo \ slurm_hostlist.lo slurm_pmi.lo step_ctx.lo step_io.lo \ step_launch.lo pmi_server.lo submit.lo suspend.lo topo_info.lo \ triggers.lo reconfigure.lo update_config.lo @@ -447,7 +447,6 @@ slurmapi_src = \ init_msg.c \ job_info.c \ job_step_info.c \ - load_leveler.c \ node_info.c \ partition_info.c \ reservation_info.c \ @@ -622,7 +621,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init_msg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_step_info.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load_leveler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/node_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/partition_info.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pmi.Plo@am__quote@ diff --git a/src/api/load_leveler.c b/src/api/load_leveler.c deleted file mode 100644 index e69de29bb2..0000000000 -- GitLab From 466078377412f982c1f4e7251866c1d56b368c16 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 6 Feb 2012 17:24:07 -0800 Subject: [PATCH 030/614] Moving toward clean NRT build --- src/plugins/switch/nrt/nrt.c | 389 +++++++++++++--------------- src/plugins/switch/nrt/switch_nrt.c | 2 +- 2 files changed, 183 insertions(+), 208 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f71f7700ac..0004c0cb38 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -140,10 +140,8 @@ struct nrt_jobinfo { }; typedef struct { - char adapter_name[NRT_MAX_DEVICENAME_SIZE]; + char adapter_names[NRT_MAX_ADAPTER_NAME_LEN]; uint16_t adapter_type; - uint16_t lid[MAX_SPIGOTS]; - uint64_t network_id[MAX_SPIGOTS]; } nrt_cache_entry_t; /* @@ -151,18 +149,19 @@ typedef struct { */ nrt_libstate_t *nrt_state = NULL; pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; +#define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) /* slurmd/slurmstepd global variables */ hostlist_t adapter_list; uint16_t adapter_type_code = 0; -static nrt_cache_entry_t lid_cache[NRT_MAXADAPTERS]; +static int lid_cache_size = 0; +static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, uint16_t adapter_type); -static int _parse_nrt_file(hostlist_t *adapter_list, uint16_t *adapter_code); static char *_win_state_str(win_state_t state); /* The _lock() and _unlock() functions are used to lock/unlock a @@ -223,13 +222,6 @@ nrt_slurmd_init(void) nrt_umask = umask(0077); umask(nrt_umask); - /*_init_adapter_cache();*/ - - adapter_list = hostlist_create(NULL); - if (_parse_nrt_file(&adapter_list, &adapter_type_code) != - SLURM_SUCCESS) - return SLURM_FAILURE; - assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); return SLURM_SUCCESS; } @@ -243,13 +235,6 @@ nrt_slurmd_step_init(void) umask(nrt_umask); _init_adapter_cache(); - - adapter_list = hostlist_create(NULL); - if (_parse_nrt_file(&adapter_list, &adapter_type_code) != - SLURM_SUCCESS) - return SLURM_FAILURE; - assert(hostlist_count(adapter_list) <= NRT_MAXADAPTERS); - _fill_in_adapter_cache(); return SLURM_SUCCESS; @@ -417,15 +402,7 @@ _print_libstate(const nrt_libstate_t *l) static void _init_adapter_cache(void) { - int i, j; - - for (i = 0; i < NRT_MAXADAPTERS; i++) { - lid_cache[i].adapter_name[0] = '\0'; - for (j = 0; j < MAX_SPIGOTS; j++) { - lid_cache[i].lid[j] = (uint16_t) -1; - lid_cache[i].network_id[j] = (uint64_t) -1; - } - } + lid_cache_size = 0; } /* Use nrt_adapter_resources to cache information about local adapters. @@ -435,46 +412,53 @@ _init_adapter_cache(void) static int _fill_in_adapter_cache(void) { - hostlist_iterator_t adapters; - char *adapter_name = NULL; - adap_resources_t res; - int num; - int rc; - int i, j; + int err, i, j, rc = SLURM_SUCCESS; + nrt_cmd_query_adapter_types_t adapter_types; + nrt_cmd_query_adapter_names_t adapter_names; - adapters = hostlist_iterator_create(adapter_list); - for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { - rc = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type_code, &res); - if (rc != NRT_SUCCESS) { - error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type_code, - nrt_err_str(rc)); - free(adapter_name); - return SLURM_ERROR; - } #if NRT_DEBUG - info("_fill_in_adapter_cache: nrt_adapter_resources():"); - _print_adapter_resources(adapter_name, adapter_type_code, - &res); + info("_fill_in_adapter_cache: begin"); #endif + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + return SLURM_ERROR; + } - num = adapter_name[3] - (int)'0'; - assert(num < NRT_MAXADAPTERS); - for (j = 0; j < MAX_SPIGOTS; j++) { - lid_cache[num].lid[j] = res.lid[j]; - lid_cache[num].network_id[j] = res.network_id[j]; + for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { +#if NRT_DEBUG + info("adapter_type[%d]: %u", + i, adapter_types.adapter_types[i]); +#endif + adapter_names.adapter_type = adapter_types.adapter_types[i]; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { +#if NRT_DEBUG + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); +#endif + adapter_status.adapter_name = adapter_names. + adapter_names[j]; + lid_cache[lid_cache_size].adapter_type = adapter_names. + adapter_type; + strncpy(lid_cache[lid_cache_size].adapter_name, + adapter_names.adapter_names[j], + NRT_MAX_ADAPTER_NAME_LEN); + lid_cache_size++; } - strncpy(lid_cache[num].adapter_name, adapter_name, - NRT_MAX_DEVICENAME_SIZE); - - free(res.window_list); - free(adapter_name); } - hostlist_iterator_destroy(adapters); - umask(nrt_umask); - - return SLURM_SUCCESS; +#if NRT_DEBUG + info("_fill_in_adapter_cache: complete: %d", rc); +#endif + return rc; } @@ -598,67 +582,6 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, return SLURM_SUCCESS; } -static char *_get_nrt_conf(void) -{ - char *val = getenv("SLURM_CONF"); - char *rc; - int i; - - if (!val) - return xstrdup(NRT_CONFIG_FILE); - - /* Replace file name on end of path */ - i = strlen(val) - strlen("slurm.conf") + strlen("nrt.conf") + 1; - rc = xmalloc(i); - strcpy(rc, val); - val = strrchr(rc, (int)'/'); - if (val) /* absolute path */ - val++; - else /* not absolute path */ - val = rc; - strcpy(val, "nrt.conf"); - return rc; -} - -static int _parse_nrt_file(hostlist_t *adapter_list, uint16_t *adapter_code) -{ - s_p_options_t options[] = { - {"AdapterName", S_P_STRING}, - {"AdapterType", S_P_STRING}, - {NULL}}; - s_p_hashtbl_t *tbl; - char *adapter_name, *adapter_type; - - debug("Reading the nrt.conf file"); - if (!nrt_conf) - nrt_conf = _get_nrt_conf(); - - tbl = s_p_hashtbl_create(options); - if (s_p_parse_file(tbl, NULL, nrt_conf, false) == SLURM_ERROR) - fatal("something wrong with opening/reading nrt.conf file"); - - if (s_p_get_string(&adapter_name, "AdapterName", tbl)) { - int rc; - rc = hostlist_push(*adapter_list, adapter_name); - if (rc == 0) - error("Adapter name format is incorrect."); - xfree(adapter_name); - } - if (s_p_get_string(&adapter_type, "AdapterType", tbl)) { - if (!strcasecmp(adapter_type, "IB") || - !strcasecmp(adapter_type, "InfiniBand")) { - *adapter_code = RSCT_DEVTYPE_INFINIBAND; - } else { - error("Adapter type is invalid (%s).", adapter_type); - } - xfree(adapter_type); - } - - s_p_hashtbl_destroy(tbl); - - return SLURM_SUCCESS; -} - /* Check for existence of sniX, where X is from 0 to NRT_MAXADAPTERS. * For all that exist, record vital adapter info plus status for all windows * available on that adapter. Cache lid to adapter name mapping locally. @@ -2243,27 +2166,44 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) */ static int _unload_window(char *adapter_name, uint16_t adapter_type, - unsigned short job_key, unsigned short window_id, int retry) + nrt_job_key_t job_key, nrt_window_id_t window_id, int retry) { - int i; - int err; + int err, i; + nrt_cmd_clean_window_t clean_window; + nrt_cmd_unload_window_t unload_window; for (i = 0; i < retry; i++) { - if (i > 0) + if (i > 0) { sleep(1); - err = nrt_unload_window(NRT_VERSION, adapter_name, - adapter_type, job_key, window_id); + } else { + unload_window.adapter_name = adapter_name; + unload_window.adapter_type = adapter_type; + unload_window.job_key = job_key; + unload_window.window_id = window_id; + } +#if NRT_DEBUG + info("nrt_command(unload_window, %s, %u, %u, %hu)", + adapter_name, adapter_type, job_key, window_id); +#endif + err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_WINDOW, + &unload_window); if (err == NRT_SUCCESS) return SLURM_SUCCESS; - debug("Unable to unload window for job_key %hd, " + debug("Unable to unload window for job_key %hu, " "nrt_unload_window(%s, %u): %s", job_key, adapter_name, adapter_type, nrt_err_str(err)); - err = nrt_clean_window(NRT_VERSION, adapter_name, - adapter_type, KILL, window_id); + if (i == 0) { + clean_window.adapter_name = adapter_name; + clean_window.adapter_type = adapter_type; + clean_window.leave_inuse_or_kill = KILL; + clean_window.window_id = window_id; + } + err = nrt_command(NRT_VERSION, NRT_CMD_CLEAN_WINDOW, + &clean_window); if (err == NRT_SUCCESS) return SLURM_SUCCESS; - error("Unable to clean window for job_key %hd, " + error("Unable to clean window for job_key %hu, " "nrt_clean_window(%s, %u): %s", job_key, adapter_name, adapter_type, nrt_err_str(err)); } @@ -2280,48 +2220,20 @@ _unload_window(char *adapter_name, uint16_t adapter_type, extern int nrt_unload_table(nrt_jobinfo_t *jp) { - int i, j; - int err = SLURM_SUCCESS, rc = SLURM_SUCCESS; - char *adapter_name; - uint16_t adapter_type; - nrt_creator_per_task_input_t *table; - uint32_t table_length; - int local_lid; + int err, i, j, rc = SLURM_SUCCESS; int retry = 15; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); for (i = 0; i < jp->tables_per_task; i++) { - table = jp->tableinfo[i].table; - table_length = jp->tableinfo[i].table_length; - adapter_name = jp->tableinfo[i].adapter_name; - adapter_type = jp->tableinfo[i].adapter_type; - local_lid = _get_lid_from_adapter(adapter_name); - - for (j = 0; j < table_length; j++) { -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table[j].ib_per_task; - if (ib_tbl_ptr->base_lid != local_lid) - continue; - debug3("freeing adapter %s base_lid %hu " - "win_id %hu job_key %hu", - adapter_name, ib_tbl_ptr->base_lid, - ib_tbl_ptr->win_id, jp->job_key); - err = _unload_window(adapter_name, - adapter_type, - jp->job_key, - ib_tbl_ptr->win_id, - retry); - } else { - fatal("nrt_unload_table: lack HPCE code"); - } - if (err != SLURM_SUCCESS) { - rc = err; - slurm_seterrno(EUNLOAD); - retry = 2; - } + for (j = 0; j < jp->tableinfo[i].table_length; j++) { + err = _unload_window(jp->tableinfo[i].adapter_name, + jp->tableinfo[i].adapter_type, + jp->job_key, + jp->tableinfo[i].table[j].window_id, + retry); + if (err != NRT_SUCCESS) + rc = SLURM_ERROR; } } return rc; @@ -2521,56 +2433,89 @@ nrt_libstate_clear(void) extern int nrt_clear_node_state(void) { - int err, j; - adap_resources_t res; - hostlist_iterator_t adapters; - char *adapter_name; + int err, i, j, k, rc = SLURM_SUCCESS; + nrt_cmd_query_adapter_types_t adapter_types; + nrt_cmd_query_adapter_names_t adapter_names; + nrt_cmd_status_adapter_t adapter_status; + nrt_cmd_clean_window_t clean_window; - if (!adapter_list) { - /* - * Work-around for the nrt_* functions calling umask(0) - */ - nrt_umask = umask(0077); - umask(nrt_umask); - - adapter_list = hostlist_create(NULL); - if (_parse_nrt_file(&adapter_list, &adapter_type_code) != - SLURM_SUCCESS) - return SLURM_FAILURE; +#if NRT_DEBUG + info("nrt_clear_node_state: begin"); +#endif + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + return SLURM_ERROR; } - adapters = hostlist_iterator_create(adapter_list); - while ((adapter_name = hostlist_next(adapters))) { - err = nrt_adapter_resources(NRT_VERSION, adapter_name, - adapter_type_code, &res); + for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { +#if NRT_DEBUG + info("adapter_type[%d]: %u", + i, adapter_types.adapter_types[i]); +#endif + adapter_names.adapter_type = adapter_types.adapter_types[i]; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); if (err != NRT_SUCCESS) { - error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type_code, - nrt_err_str(err)); - free(adapter_name); + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; continue; } + for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { #if NRT_DEBUG - info("nrt_clear_node_state: nrt_adapter_resources():"); - _print_adapter_resources(adapter_name, adapter_type_code, - &res); + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); #endif - for (j = 0; j < res.window_count; j++) { - err = nrt_clean_window(NRT_VERSION, adapter_name, - adapter_type_code, KILL, - res.window_list[j]); + adapter_status.adapter_name = adapter_names. + adapter_names[j]; + adapter_status.adapter_type = adapter_names. + adapter_type; + err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, + &adapter_status); if (err != NRT_SUCCESS) { - error("nrt_clean_window(%s, %hu): %s", - adapter_name, adapter_type_code, + error("nrt_command(clean_status, %s, %u): %s", + adapter_status.adapter_name, + adapter_status.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + + for (k = 0; k < adapter_status.window_count[0]; k++) { +#if NRT_DEBUG + info("window_id[%d]: %u", k, + adapter_status.status_array[k]-> + window_id); +#endif + clean_window.adapter_name = adapter_names. + adapter_names[i]; + clean_window.adapter_type = adapter_names. + adapter_type; + clean_window.leave_inuse_or_kill = KILL; + clean_window.window_id = adapter_status. + status_array[k]-> + window_id; + err = nrt_command(NRT_VERSION, + NRT_CMD_CLEAN_WINDOW, + &clean_window); + if (err != NRT_SUCCESS) { + error("nrt_command(clean_window, " + "%s, %u, %u): %s", + clean_window.adapter_name, + clean_window.adapter_type, + clean_window.window_id, + nrt_err_str(err)); + rc = SLURM_ERROR; + } } } - free(res.window_list); - free(adapter_name); } - hostlist_iterator_destroy(adapters); - - return SLURM_SUCCESS; +#if NRT_DEBUG + info("nrt_clear_node_state: complete: %d", rc); +#endif + return rc; } extern char *nrt_err_str(int rc) @@ -2582,6 +2527,12 @@ extern char *nrt_err_str(int rc) return "Already loaded"; case NRT_BAD_VERSION: return "Bad version"; + case NRT_CAU_EXCEEDED: + return "CAU index request exeeds available resources"; + case NRT_CAU_RESERVE: + return "Error during CAU index reserve"; + case NRT_CAU_UNRESERVE: + return "Error during CAU index unreserve"; case NRT_EADAPTER: return "Invalid adapter name"; case NRT_EADAPTYPE: @@ -2596,17 +2547,41 @@ extern char *nrt_err_str(int rc) return "Memory allocation error"; case NRT_EPERM: return "Permission denied, not root"; + case NRT_ERR_COMMAND_TYPE: + return "Invalid command type"; case NRT_ESYSTEM: return "A system error occured"; + case NRT_IMM_SEND_RESERVE: + return "Error during immediate send slot reserve"; + case NRT_NO_FREE_WINDOW: + return "No free window"; case NRT_NO_RDMA_AVAIL: return "No RDMA windows available"; + case NRT_NTBL_LOAD_FAILED: + return "Failed to load NTBL"; + case NRT_NTBL_NOT_FOUND: + return "NTBL not found"; + case NRT_NTBL_UNLOAD_FAILED: + return "Failed to unload NTBL"; + case NRT_OP_NOT_VALID: + return "Requested operation not valid for given device"; case NRT_PNSDAPI: return "Error communicating with Protocol Network Services " "Daemon"; + case NRT_RDMA_CLEAN_FAILED: + return "Task RDMA cleanup failed"; case NRT_SUCCESS: return "Success"; + case NRT_TIMEOUT: + return "No response back from PNSD/job"; case NRT_UNKNOWN_ADAPTER: return "Unknown adaper"; + case NRT_WIN_CLOSE_FAILED: + return "Task can not close window"; + case NRT_WIN_OPEN_FAILED: + return "Task can not open window"; + case NRT_WRONG_PREEMPT_STATE: + return "Invalid preemption state"; case NRT_WRONG_WINDOW_STATE: return "Wrong window state"; } diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index c35713338e..32ecfdee6c 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -579,7 +579,7 @@ extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, */ static int _nrt_version_ok(void) { - return((nrt_version() == NRT_VERSION) ? 1 : 0); + return ((NRT_VERSION == 1100) ? 1 : 0); } int switch_p_node_init(void) -- GitLab From 0d73f6b4ef15c20d22fab94b4887aaabcfc8a3c9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 11:19:53 -0800 Subject: [PATCH 031/614] More work to build with NRT --- src/plugins/switch/nrt/nrt.c | 234 ++++++++++++++++-------------- src/plugins/switch/nrt/nrt_keys.h | 4 +- 2 files changed, 129 insertions(+), 109 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 0004c0cb38..86b75e7e69 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -296,20 +296,21 @@ _print_adapter_resources(char *adapter_name, uint16_t adapter_type, /* Used by: slurmd */ static void -_print_adapter_status(char *adapter_name, uint16_t adapter_type, - uint16_t win_count, nrt_status_t *status) +_print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) { int i; info("--Begin Adapter Status--"); - info(" adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - for (i = 0; i < win_count; i++) { - info(" client_pid[%d]:%u", i, (uint32_t)status[i].client_pid); - info(" uid[%d]:%u", i, (uint32_t) status[i].uid); - info(" window_id[%d]:%hu", i, status[i].window_id); - info(" bulk_xfer[%d]:%hu", i, status[i].bulk_transfer); - info(" rcontext_blocks[%d]:%u", i, status[i].rcontext_blocks); - info(" state[%d]:%s", i, _win_state_str(status[i].state)); + info(" adapter_name:%s adapter_type:%hu", + status_adapter->adapter_name, status_adapter->adapter_type); + for (i = 0; i < status_adapter->window_count; i++) { + nrt_status_t *status = status_adapter->status_array[i]; + info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); + info(" uid[%d]:%u", i, (uint32_t) status->uid); + info(" window_id[%d]:%hu", i, status->window_id); + info(" bulk_xfer[%d]:%hu", i, status->bulk_transfer); + info(" rcontext_blocks[%d]:%u", i, status->rcontext_blocks); + info(" state[%d]:%s", i, _win_state_str(status->state)); } info("--End Adapter Status--"); } @@ -502,28 +503,7 @@ _get_network_id_from_adapter(char *adapter_name) } } - return (uint16_t) -1; -} - - -/* Check lid cache for an adapter name and return the lid. - * - * Used by: slurmd - */ -static uint16_t -_get_lid_from_adapter(char *adapter_name) -{ - int i; - - for (i = 0; i < NRT_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].adapter_name, - NRT_MAX_DEVICENAME_SIZE)) { -/* FIXME: Return which spigot's lid? */ - return lid_cache[i].lid[0]; - } - } - - return (uint16_t) -1; + return (uint16_t) -1; } @@ -1938,46 +1918,46 @@ nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) * Used by: slurmd */ static int -_wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, - uint16_t window_id, int retry) +_wait_for_window_unloaded(char *adapter_name, int adapter_type, + nrt_window_id_t window_id, int retry) { int err, i, j; - uint16_t win_count; - nrt_status_t *status; + nrt_cmd_status_adapter_t status_adapter; + nrt_status_t *status = NULL; + status_adapter.adapter_name = adapter_name; + status_adapter.adapter_type = adapter_type; for (i = 0; i < retry; i++) { if (i > 0) sleep(1); - err = nrt_status_adapter(NRT_VERSION, adapter_name, - adapter_type, &win_count, &status); + + err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, + &status_adapter); if (err != NRT_SUCCESS) { - error("nrt_status_adapter(%s, %u): %s", adapter_name, - adapter_type, nrt_err_str(err)); + error("nrt_status_adapter(%s, %d): %s", adapter_name, + (int) adapter_type, nrt_err_str(err)); return SLURM_ERROR; } #if NRT_DEBUG info("_wait_for_window_unloaded"); - _print_adapter_status(adapter_name, adapter_type, win_count, - status); + _print_adapter_status(&status_adapter); #endif - for (j = 0; j < win_count; j++) { - if (status[j].window_id == window_id) + for (j = 0; j < *status_adapter.window_count; j++) { + status = status_adapter.status_array[j]; + if (status->window_id == window_id) break; } - if (j >= win_count) { + if (j >= *status_adapter.window_count) { error("nrt_status_adapter(%s, %hu), window %hu not " - "found", adapter_name, adapter_type, window_id); - free(status); + "found", + adapter_name, (int)adapter_type, window_id); return SLURM_ERROR; } - if (status[j].state == NRT_WIN_AVAILABLE) { - free(status); + if (status->state == NRT_WIN_AVAILABLE) return SLURM_SUCCESS; - } - debug2("nrt_status_adapter(%s, %u), window %u state %s", - adapter_name, adapter_type, window_id, - _win_state_str(status[j].state)); - free(status); + debug2("nrt_status_adapter(%s, %d), window %u state %s", + adapter_name, (int) adapter_type, window_id, + _win_state_str(status->state)); } return SLURM_ERROR; @@ -1994,39 +1974,35 @@ _wait_for_window_unloaded(char *adapter_name, uint16_t adapter_type, static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo) { - uint16_t lid; - int i; - int err; - int rc = SLURM_SUCCESS; + int err, i, rc = SLURM_SUCCESS; int retry = 15; - - lid = _get_lid_from_adapter(tableinfo->adapter_name); - -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - for (i = 0; i < tableinfo->table_length; i++) { - ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; - if (ib_tbl_ptr->base_lid == lid) { - err = _wait_for_window_unloaded( - tableinfo->adapter_name, - tableinfo->adapter_type, - ib_tbl_ptr->win_id, - retry); - if (err != SLURM_SUCCESS) { - error("Window %hu adapter %s did not " - "become free within %d seconds", - ib_tbl_ptr->win_id, - tableinfo->adapter_name, - retry); - rc = err; - retry = 2; - } - } + nrt_window_id_t window_id; + + for (i = 0; i < tableinfo->table_length; i++) { + if (tableinfo->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) tableinfo->table; + ib_tbl_ptr += i; + window_id = ib_tbl_ptr->win_id; + } else if (adapter_type_code == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) tableinfo->table; + hfi_tbl_ptr += i; + window_id = hfi_tbl_ptr->win_id; + } else { + fatal("_wait_for_all_windows: Missing support for " + "adapter type %hu", tableinfo->adapter_type); } - } else { - fatal("_wait_for_all_windows: Missing support for adapter " - "type %hu", tableinfo->adapter_type); + err = _wait_for_window_unloaded(tableinfo->adapter_name, + tableinfo->adapter_type, + window_id, retry); + if (err != SLURM_SUCCESS) { + error("Window %hu adapter %s did not " + "become free within %d seconds", + window_id, tableinfo->adapter_name, retry); + rc = err; + } + } return rc; @@ -2073,8 +2049,10 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) int err; char *adapter_name; uint64_t network_id; - uint bulk_xfer_resources = 0; /* Unused by NRT today */ + uint bulk_xfer_resources = 0; int rc; + nrt_cmd_load_table_t load_table; + nrt_table_info_t table_info; #if NRT_DEBUG int j; @@ -2106,7 +2084,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) return rc; } #if NRT_DEBUG - info("attempting nrt_load_table_rdma:"); + info("attempting nrt_load_table:"); info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type_code); info(" network_id:%"PRIu64" uid:%u pid:%u", network_id, @@ -2115,11 +2093,11 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) info(" bulk_xfer:%u bulk_xfer_res:%u", jp->bulk_xfer, bulk_xfer_resources); for (j = 0; j < jp->tableinfo[i].table_length; j++) { -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter_type_code == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &jp->tableinfo[i].table[j]. - ib_per_task; + if (adapter_type_code == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) + jp->tableinfo[i].table; + ib_tbl_ptr += j; info(" task_id[%d]:%hu", j, ib_tbl_ptr->task_id); info(" win_id[%d]:%hu", j, @@ -2135,20 +2113,46 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) info(" lmc[%d]:%hu", j, ib_tbl_ptr->lmc); info(" port_status[%d]:%hu", j, ib_tbl_ptr->port_status); + } else if (adapter_type_code == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) + jp->tableinfo[i].table; + hfi_tbl_ptr += j; + info(" task_id[%d]:%hu", j, + hfi_tbl_ptr->task_id); + info(" lpar_id[%d]:%hu", j, + hfi_tbl_ptr->lpar_id); + info(" lid[%d]:%hu", j, + hfi_tbl_ptr->lid); + info(" win_id[%d]:%hu", j, + hfi_tbl_ptr->win_id); } else { - fatal("nrt_load_table: lack HPCE code"); + fatal("nrt_load_table: invalid adapter type: " + "%hu", adapter_type_code); } } #endif -/* FIXME: nrt_load_table_rdma can not be array of pointers, but must be array of creator elements */ - err = nrt_load_table_rdma(NRT_VERSION, - adapter_name, adapter_type_code, - network_id, uid, pid, - jp->job_key, jp->job_desc, - jp->bulk_xfer, - bulk_xfer_resources, - jp->tableinfo[i].table_length, - jp->tableinfo[i].table); +/* FIXME: Ne need to set a bunch of these paramters appropriately */ +#define TBD 0 + table_info.num_tasks = jp->tableinfo[i].table_length; + table_info.job_key = jp->job_key; + table_info.uid = uid; + table_info.network_id = TBD; + table_info.pid = pid; + table_info.adapter_type = adapter_type_code; + table_info.is_user_space = TBD; + table_info.is_ipv4 = TBD; + table_info.context_id = TBD; + table_info.table_id = TBD; + strncpy(table_info.job_name, "TBD", NRT_MAX_JOB_NAME_LEN); + strncpy(table_info.protocol_name, "TBD", NRT_MAX_PROTO_NAME_LEN); + table_info.use_bulk_transfer = jp->bulk_xfer; + table_info.bulk_transfer_resources = TBD; + table_info.immed_send_slots_per_win = TBD; + table_info.num_cau_indexes = TBD; + load_table.table_info = &table_info; + load_table.per_task_input = jp->tableinfo[i].table; + err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); if (err != NRT_SUCCESS) { error("unable to load table: [%d] %s", err, nrt_err_str(err)); @@ -2220,18 +2224,34 @@ _unload_window(char *adapter_name, uint16_t adapter_type, extern int nrt_unload_table(nrt_jobinfo_t *jp) { + nrt_window_id_t window_id; int err, i, j, rc = SLURM_SUCCESS; int retry = 15; - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); for (i = 0; i < jp->tables_per_task; i++) { + if (jp->tableinfo[i].adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) + jp->tableinfo[i].table; + ib_tbl_ptr += j; + window_id = ib_tbl_ptr->win_id; + } else if (jp->tableinfo[i].adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) + jp->tableinfo[i].table; + hfi_tbl_ptr += j; + window_id = hfi_tbl_ptr->win_id; + } else { + fatal("nrt_unload_table: invalid adapter type: " + "%hu", adapter_type_code); + } for (j = 0; j < jp->tableinfo[i].table_length; j++) { err = _unload_window(jp->tableinfo[i].adapter_name, jp->tableinfo[i].adapter_type, jp->job_key, - jp->tableinfo[i].table[j].window_id, - retry); + window_id, retry); if (err != NRT_SUCCESS) rc = SLURM_ERROR; } @@ -2331,7 +2351,7 @@ nrt_libstate_save(Buf buffer, bool free_flag) _lock(); if (nrt_state != NULL) - _pack_libstate(nrt_state, buffer); + _pack_libstate(nrt_state, buffer); /* Clean up nrt_state since backup slurmctld can repeatedly * save and restore state */ diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index d6fbfbb58c..598a1f807c 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -58,8 +58,8 @@ enum { /* Information shared between slurm_ll_api and the slurm federation driver */ typedef struct nrt_tableinfo { uint32_t table_length; - nrt_creator_per_task_input_t *table; - char adapter_name[NRT_MAX_DEVICENAME_SIZE]; + void *table; /* Pointer to nrt_ib_task_info_t or nrt_hfi_task_info_t */ + char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; uint16_t adapter_type; } nrt_tableinfo_t; -- GitLab From f7499e002e7332287eec657b39e46179e5461e0e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 12:06:49 -0800 Subject: [PATCH 032/614] More mods for NRT build --- src/plugins/switch/nrt/nrt.c | 56 +++++++++++++++++-------------- src/plugins/switch/nrt/nrt_keys.h | 6 ++-- 2 files changed, 34 insertions(+), 28 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 86b75e7e69..6a96095515 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -95,20 +95,20 @@ typedef struct nrt_window { uint16_t job_key; /* FIXME: Perhaps change to uid or client_pid? */ } nrt_window_t; -typedef struct nrt_adapter { +struct nrt_adapter { char adapter_name[NRT_MAX_DEVICENAME_SIZE]; uint16_t adapter_type; - uint16_t lid[MAX_SPIGOTS]; - uint64_t network_id[MAX_SPIGOTS]; + uint16_t lid; + uint64_t network_id; uint16_t window_count; nrt_window_t *window_list; -} nrt_adapter_t; +}; struct nrt_nodeinfo { uint32_t magic; char name[NRT_HOSTLEN]; uint32_t adapter_count; - nrt_adapter_t *adapter_list; + struct nrt_adapter *adapter_list; struct nrt_nodeinfo *next; }; @@ -140,7 +140,7 @@ struct nrt_jobinfo { }; typedef struct { - char adapter_names[NRT_MAX_ADAPTER_NAME_LEN]; + char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; uint16_t adapter_type; } nrt_cache_entry_t; @@ -160,7 +160,7 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); -static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, +static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, uint16_t adapter_type); static char *_win_state_str(win_state_t state); @@ -342,7 +342,7 @@ static void _print_nodeinfo(nrt_nodeinfo_t *n) { int i, j; - nrt_adapter_t *a; + struct nrt_adapter *a; nrt_window_t *w; assert(n); @@ -469,7 +469,7 @@ _fill_in_adapter_cache(void) * Used by: slurmd */ static void -_cache_lid(nrt_adapter_t *ap) +_cache_lid(struct nrt_adapter *ap) { int j; assert(ap); @@ -507,7 +507,7 @@ _get_network_id_from_adapter(char *adapter_name) } -static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, +static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, uint16_t adapter_type) { adap_resources_t res; @@ -569,7 +569,7 @@ static int _set_up_adapter(nrt_adapter_t *nrt_adapter, char *adapter_name, * Used by: slurmd */ static int -_get_adapters(nrt_adapter_t *list, int *count) +_get_adapters(struct nrt_adapter *list, int *count) { hostlist_iterator_t adapter_iter; char *adapter_name = NULL; @@ -626,7 +626,8 @@ nrt_alloc_nodeinfo(nrt_nodeinfo_t **n) assert(n); new = (nrt_nodeinfo_t *) xmalloc(sizeof(nrt_nodeinfo_t)); - new->adapter_list = (nrt_adapter_t *) xmalloc(sizeof(nrt_adapter_t) * + new->adapter_list = (struct nrt_adapter *) + xmalloc(sizeof(struct nrt_adapter) * NRT_MAXADAPTERS); new->magic = NRT_NODEINFO_MAGIC; new->adapter_count = 0; @@ -669,7 +670,7 @@ extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) { int i, j; - nrt_adapter_t *a; + struct nrt_adapter *a; int offset; assert(n); @@ -707,8 +708,8 @@ static int _copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) { int i, j; - nrt_adapter_t *sa = NULL; - nrt_adapter_t *da = NULL; + struct nrt_adapter *sa = NULL; + struct nrt_adapter *da = NULL; assert(dest); assert(src); @@ -878,8 +879,8 @@ _alloc_node(nrt_libstate_t *lp, char *name) n = lp->node_list + (lp->node_count++); n->magic = NRT_NODEINFO_MAGIC; n->name[0] = '\0'; - n->adapter_list = (nrt_adapter_t *) xmalloc(NRT_MAXADAPTERS * - sizeof(nrt_adapter_t)); + n->adapter_list = (struct nrt_adapter *) xmalloc(NRT_MAXADAPTERS * + sizeof(struct nrt_adapter)); if (name != NULL) { strncpy(n->name, name, NRT_HOSTLEN); @@ -945,7 +946,7 @@ static int _unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) { int i, j; - nrt_adapter_t *tmp_a = NULL; + struct nrt_adapter *tmp_a = NULL; nrt_window_t *tmp_w = NULL; uint32_t size; nrt_nodeinfo_t *tmp_n = NULL; @@ -1072,7 +1073,7 @@ nrt_unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) extern void nrt_free_nodeinfo(nrt_nodeinfo_t *n, bool ptr_into_array) { - nrt_adapter_t *adapter; + struct nrt_adapter *adapter; int i; if (!n) @@ -1122,7 +1123,7 @@ _next_key(void) /* FIXME - this could be a little smarter than walking the whole list each time */ static nrt_window_t * -_find_free_window(nrt_adapter_t *adapter) { +_find_free_window(struct nrt_adapter *adapter) { int i; nrt_window_t *window; @@ -1137,7 +1138,7 @@ _find_free_window(nrt_adapter_t *adapter) { static nrt_window_t * -_find_window(nrt_adapter_t *adapter, uint16_t window_id) { +_find_window(struct nrt_adapter *adapter, uint16_t window_id) { int i; nrt_window_t *window; @@ -1165,7 +1166,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, uint16_t job_key) { nrt_nodeinfo_t *node; - nrt_adapter_t *adapter; + struct nrt_adapter *adapter; nrt_window_t *window; int i; @@ -1222,7 +1223,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, uint16_t job_key) { nrt_nodeinfo_t *node; - nrt_adapter_t *adapter = NULL; + struct nrt_adapter *adapter = NULL; nrt_window_t *window; nrt_creator_per_task_input_t *table; int i; @@ -1294,7 +1295,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, uint16_t job_key) { nrt_nodeinfo_t *node = NULL; - nrt_adapter_t *adapter = NULL; + struct nrt_adapter *adapter = NULL; nrt_window_t *window = NULL; nrt_creator_per_task_input_t *table = NULL; int i, j; @@ -1452,7 +1453,7 @@ static void inline _free_windows_by_job_key(uint16_t job_key, char *nodename) { nrt_nodeinfo_t *node; - nrt_adapter_t *adapter; + struct nrt_adapter *adapter; nrt_window_t *window; int i, j; @@ -2015,8 +2016,13 @@ _check_rdma_job_count(char *adapter_name, uint16_t adapter_type) uint16_t *job_keys; int err, i; +#if 1 + err = NRT_SUCESS; +#else +/* FIXME: Address this later, RDMA jobs are those using bulk transters */ err = nrt_rdma_jobs(NRT_VERSION, adapter_name, adapter_type, &job_count, &job_keys); +#endif if (err != NRT_SUCCESS) { error("nrt_rdma_jobs(): %s", nrt_err_str(err)); return SLURM_ERROR; diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 598a1f807c..08770cc1eb 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -47,7 +47,7 @@ #endif enum { - /* Federation specific get_jobinfo keys */ + /* NRT specific get_jobinfo keys */ NRT_JOBINFO_TABLEINFO, NRT_JOBINFO_TABLESPERTASK, NRT_JOBINFO_KEY, @@ -55,10 +55,10 @@ enum { NRT_JOBINFO_MODE }; -/* Information shared between slurm_ll_api and the slurm federation driver */ +/* Information shared between slurm_ll_api and the slurm NRT driver */ typedef struct nrt_tableinfo { uint32_t table_length; - void *table; /* Pointer to nrt_ib_task_info_t or nrt_hfi_task_info_t */ + void *table; /* Pointer to nrt_*_task_info_t*/ char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; uint16_t adapter_type; } nrt_tableinfo_t; -- GitLab From d41e5485ffdd6a4a1af6e8480be2953a0d1dbfb1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 13:45:40 -0800 Subject: [PATCH 033/614] More work toward NRT build --- src/plugins/switch/nrt/nrt.c | 754 +++++++++++++++++++++------- src/plugins/switch/nrt/nrt_keys.h | 2 +- src/plugins/switch/nrt/slurm_nrt.h | 42 +- src/plugins/switch/nrt/switch_nrt.c | 38 +- 4 files changed, 626 insertions(+), 210 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6a96095515..c60957b2b0 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -66,9 +66,590 @@ #define NRT_NODEINFO_MAGIC 0xc00cc00a #define NRT_JOBINFO_MAGIC 0xc00cc00b #define NRT_LIBSTATE_MAGIC 0xc00cc00c +#define NRT_HOSTLEN 20 + +#if 1 +pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; +mode_t nrt_umask; + +/* + * Data structures specific to switch/nrt + * + * We are going to some trouble to keep these defs private so slurm + * hackers not interested in the interconnect details can just pass around + * the opaque types. All use of the data structure internals is local to this + * module. + */ + +typedef struct slurm_nrt_window { + nrt_window_id_t window_id; + win_state_t state; + nrt_job_key_t job_key; /* FIXME: Perhaps change to uid or client_pid? */ +} slurm_nrt_window_t; + +typedef struct slurm_nrt_adapter { + char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; + nrt_adapter_t adapter_type; +// uint16_t lid; +// uint64_t network_id; + nrt_window_id_t window_count; + slurm_nrt_window_t *window_list; +} slurm_nrt_adapter_t; + +typedef struct slurm_nrt_nodeinfo { + uint32_t magic; + char name[NRT_HOSTLEN]; + uint32_t adapter_count; + struct slurm_nrt_adapter *adapter_list; + struct slurm_nrt_nodeinfo *next; +} slurm_nrt_nodeinfo_t; + +/* The _lock() and _unlock() functions are used to lock/unlock a + * global mutex. Used to serialize access to the global library + * state variable nrt_state. + */ +static void +_lock(void) +{ + int err = 1; + + while (err) { + err = pthread_mutex_lock(&global_lock); + } +} + +static void +_unlock(void) +{ + int err = 1; + + while (err) { + err = pthread_mutex_unlock(&global_lock); + } +} + +static char *_win_state_str(win_state_t state) +{ + if (state == NRT_WIN_UNAVAILABLE) + return "Unavailable"; + else if (state == NRT_WIN_INVALID) + return "Invalid"; + else if (state == NRT_WIN_RESERVED) + return "Reserved"; + else if (state == NRT_WIN_READY) + return "Ready"; + else if (state == NRT_WIN_RUNNING) + return "Running"; + else { + static char buf[16]; + snprintf(buf, sizeof(buf), "%d", state); + return buf; + } +} + +extern int +nrt_slurmctld_init(void) +{ + return SLURM_SUCCESS; +} + +extern int +nrt_slurmd_init(void) +{ + /* + * This is a work-around for the nrt_* functions calling umask(0) + */ + nrt_umask = umask(0077); + umask(nrt_umask); + + return SLURM_SUCCESS; +} + +extern int +nrt_slurmd_step_init(void) +{ + /* + * This is a work-around for the nrt_* functions calling umask(0) + */ + nrt_umask = umask(0077); + umask(nrt_umask); + + return SLURM_SUCCESS; +} + +/* Used by: slurmd, slurmctld */ +extern int +nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **j) +{ + return SLURM_SUCCESS; +} + + +/* Used by: slurmd, slurmctld */ +extern int +nrt_alloc_nodeinfo(slurm_nrt_nodeinfo_t **n) +{ + slurm_nrt_nodeinfo_t *new; + + assert(n); + + new = (slurm_nrt_nodeinfo_t *) xmalloc(sizeof(slurm_nrt_nodeinfo_t)); + new->adapter_list = (struct slurm_nrt_adapter *) + xmalloc(sizeof(struct slurm_nrt_adapter) * + NRT_MAX_ADAPTER_TYPES * NRT_MAX_ADAPTERS_PER_TYPE); + new->magic = NRT_NODEINFO_MAGIC; + new->adapter_count = 0; + new->next = NULL; + + *n = new; + + return 0; +} + +static int +_get_adapters(slurm_nrt_nodeinfo_t *n) +{ + int err, i, j, k, rc = SLURM_SUCCESS; + nrt_cmd_query_adapter_types_t adapter_types; + nrt_cmd_query_adapter_names_t adapter_names; + nrt_cmd_status_adapter_t adapter_status; + +#if NRT_DEBUG + info("nrt_build_nodeinfo: begin"); +#endif + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + return SLURM_ERROR; + } + + for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { +#if NRT_DEBUG + info("adapter_type[%d]: %u", + i, adapter_types.adapter_types[i]); +#endif + adapter_names.adapter_type = adapter_types.adapter_types[i]; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { + slurm_nrt_adapter_t *adapter_ptr; +#if NRT_DEBUG + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); +#endif + adapter_status.adapter_name = adapter_names. + adapter_names[j]; + adapter_status.adapter_type = adapter_names. + adapter_type; + err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, + &adapter_status); + if (err != NRT_SUCCESS) { + error("nrt_command(clean_status, %s, %u): %s", + adapter_status.adapter_name, + adapter_status.adapter_type, + nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + + adapter_ptr = &n->adapter_list[n->adapter_count]; + strncpy(adapter_ptr->adapter_name, + adapter_status.adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + adapter_ptr->adapter_type = adapter_status. + adapter_type; + adapter_ptr->window_count = adapter_status. + window_count[0]; + adapter_ptr->window_list = + xmalloc(sizeof(slurm_nrt_window_t) * + adapter_ptr->window_count); + n->adapter_count++; + for (k = 0; k < adapter_status.window_count[0]; k++) { + slurm_nrt_window_t *window_ptr; +#if NRT_DEBUG + info("window_id[%d]: %u", k, + adapter_status.status_array[k]-> + window_id); + info("state[%d]: %u", k, + adapter_status.status_array[k]->state); + info("client_pid[%d]: %u", k, + adapter_status.status_array[k]-> + client_pid); +#endif + window_ptr = adapter_ptr->window_list + k; + window_ptr->window_id = adapter_status. + status_array[k]-> + window_id; + window_ptr->state = adapter_status. + status_array[k]-> + state; + window_ptr->job_key = adapter_status. + status_array[k]-> + client_pid; + } + } + } +#if NRT_DEBUG + info("nrt_build_nodeinfo: complete: %d", rc); +#endif + return rc; +} + +/* Assumes a pre-allocated nodeinfo structure and uses _get_adapters + * to do the dirty work. We probably collect more information about + * the adapters on a give node than we need to but it was done + * in the interest of being prepared for future requirements. + * + * Used by: slurmd + */ +extern int +nrt_build_nodeinfo(slurm_nrt_nodeinfo_t *n, char *name) +{ + int err; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); + assert(name); + + strncpy(n->name, name, NRT_HOSTLEN); + _lock(); + err = _get_adapters(n); + _unlock(); + + return err; +} + +/* Used by: all */ +extern int +nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) +{ + return SLURM_SUCCESS; +} + +/* Unpack nodeinfo and update persistent libstate. + * + * Used by: slurmctld + */ +extern int +nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) +{ + return SLURM_SUCCESS; +} + + +/* Used by: slurmd, slurmctld */ +extern void +nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *n, bool ptr_into_array) +{ + return; +} + +/* Find all of the windows used by job step "jp" on the hosts + * designated in hostlist "hl" and mark their state NRT_WIN_AVAILABLE. + * + * Used by: slurmctld + */ +extern int +nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) +{ + return SLURM_SUCCESS; +} + + +/* Find all of the windows used by job step "jp" and mark their + * state NRT_WIN_UNAVAILABLE. + * + * Used by the slurmctld at startup time to restore the allocation + * status of any job steps that were running at the time the previous + * slurmctld was shutdown. Also used to restore the allocation + * status after a call to switch_clear(). + */ +extern int +nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) +{ + return SLURM_SUCCESS; +} + +/* Setup everything for the job. Assign tasks across + * nodes based on the hostlist given and create the network table used + * on all nodes of the job. + * + * Used by: slurmctld + */ +extern int +nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, + bool sn_all, char *adapter_name, int bulk_xfer) +{ + + return SLURM_SUCCESS; +} + +/* Used by: all */ +extern int +nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) +{ + return SLURM_SUCCESS; +} + +/* Used by: all */ +extern int +nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) +{ + return SLURM_SUCCESS; +} + +/* Used by: all */ +extern slurm_nrt_jobinfo_t * +nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) +{ + return NULL; +} + +/* Used by: all */ +extern void +nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) +{ + return; +} + +/* Return data to code for whom jobinfo is an opaque type. + * + * Used by: all + */ +extern int +nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) +{ + return SLURM_SUCCESS; +} + +/* Load a network table on node. If table contains more than one window + * for a given adapter, load the table only once for that adapter. + * + * Used by: slurmd + */ +extern int +nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) +{ + return SLURM_SUCCESS; +} + +/* Assumes that, on error, new switch state information will be + * read from node. + * + * Used by: slurmd + */ +extern int +nrt_unload_table(slurm_nrt_jobinfo_t *jp) +{ + return SLURM_SUCCESS; +} + +/* Allocate and initialize memory for the persistent libstate. + * + * Used by: slurmctld + */ +extern int +nrt_init(void) +{ + return SLURM_SUCCESS; +} + +extern int +nrt_fini(void) +{ + return SLURM_SUCCESS; +} + +/* Used by: slurmctld */ +extern void +nrt_libstate_save(Buf buffer, bool free_flag) +{ + return; +} + +/* Used by: slurmctld */ +extern int +nrt_libstate_restore(Buf buffer) +{ + return SLURM_SUCCESS; +} + +extern int +nrt_libstate_clear(void) +{ + return SLURM_SUCCESS; +} + +extern int nrt_clear_node_state(void) +{ + int err, i, j, k, rc = SLURM_SUCCESS; + nrt_cmd_query_adapter_types_t adapter_types; + nrt_cmd_query_adapter_names_t adapter_names; + nrt_cmd_status_adapter_t adapter_status; + nrt_cmd_clean_window_t clean_window; + +#if NRT_DEBUG + info("nrt_clear_node_state: begin"); +#endif + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + return SLURM_ERROR; + } + + for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { +#if NRT_DEBUG + info("adapter_type[%d]: %u", + i, adapter_types.adapter_types[i]); +#endif + adapter_names.adapter_type = adapter_types.adapter_types[i]; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { +#if NRT_DEBUG + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); +#endif + adapter_status.adapter_name = adapter_names. + adapter_names[j]; + adapter_status.adapter_type = adapter_names. + adapter_type; + err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, + &adapter_status); + if (err != NRT_SUCCESS) { + error("nrt_command(clean_status, %s, %u): %s", + adapter_status.adapter_name, + adapter_status.adapter_type, + nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + + for (k = 0; k < adapter_status.window_count[0]; k++) { +#if NRT_DEBUG + info("window_id[%d]: %u", k, + adapter_status.status_array[k]-> + window_id); +#endif + clean_window.adapter_name = adapter_names. + adapter_names[i]; + clean_window.adapter_type = adapter_names. + adapter_type; + clean_window.leave_inuse_or_kill = KILL; + clean_window.window_id = adapter_status. + status_array[k]-> + window_id; + err = nrt_command(NRT_VERSION, + NRT_CMD_CLEAN_WINDOW, + &clean_window); + if (err != NRT_SUCCESS) { + error("nrt_command(clean_window, " + "%s, %u, %u): %s", + clean_window.adapter_name, + clean_window.adapter_type, + clean_window.window_id, + nrt_err_str(err)); + rc = SLURM_ERROR; + } + } + } + } +#if NRT_DEBUG + info("nrt_clear_node_state: complete: %d", rc); +#endif + return rc; +} + +extern char *nrt_err_str(int rc) +{ + static char str[16]; + + switch (rc) { + case NRT_ALREADY_LOADED: + return "Already loaded"; + case NRT_BAD_VERSION: + return "Bad version"; + case NRT_CAU_EXCEEDED: + return "CAU index request exeeds available resources"; + case NRT_CAU_RESERVE: + return "Error during CAU index reserve"; + case NRT_CAU_UNRESERVE: + return "Error during CAU index unreserve"; + case NRT_EADAPTER: + return "Invalid adapter name"; + case NRT_EADAPTYPE: + return "Invalid adapter type"; + case NRT_EAGAIN: + return "Try call again later"; + case NRT_EINVAL: + return "Invalid input paramter"; + case NRT_EIO: + return "Adapter reported a DOWN state"; + case NRT_EMEM: + return "Memory allocation error"; + case NRT_EPERM: + return "Permission denied, not root"; + case NRT_ERR_COMMAND_TYPE: + return "Invalid command type"; + case NRT_ESYSTEM: + return "A system error occured"; + case NRT_IMM_SEND_RESERVE: + return "Error during immediate send slot reserve"; + case NRT_NO_FREE_WINDOW: + return "No free window"; + case NRT_NO_RDMA_AVAIL: + return "No RDMA windows available"; + case NRT_NTBL_LOAD_FAILED: + return "Failed to load NTBL"; + case NRT_NTBL_NOT_FOUND: + return "NTBL not found"; + case NRT_NTBL_UNLOAD_FAILED: + return "Failed to unload NTBL"; + case NRT_OP_NOT_VALID: + return "Requested operation not valid for given device"; + case NRT_PNSDAPI: + return "Error communicating with Protocol Network Services " + "Daemon"; + case NRT_RDMA_CLEAN_FAILED: + return "Task RDMA cleanup failed"; + case NRT_SUCCESS: + return "Success"; + case NRT_TIMEOUT: + return "No response back from PNSD/job"; + case NRT_UNKNOWN_ADAPTER: + return "Unknown adaper"; + case NRT_WIN_CLOSE_FAILED: + return "Task can not close window"; + case NRT_WIN_OPEN_FAILED: + return "Task can not open window"; + case NRT_WRONG_PREEMPT_STATE: + return "Invalid preemption state"; + case NRT_WRONG_WINDOW_STATE: + return "Wrong window state"; + } + snprintf(str, sizeof(str), "%d", rc); + return str; +} +#else +/******************************************************************************/ +/* THIS IS OLD CODE, LIKELY TO BE MODIFIED AND MERGED INTO THE ABOVE #ifdef */ +/******************************************************************************/ #define JOB_DESC_LEN 64 /* Length of job description */ -#define NRT_HOSTLEN 20 #define NRT_NODECOUNT 128 #define NRT_HASHCOUNT 128 #define NRT_AUTO_WINMEM 0 @@ -80,38 +661,6 @@ extern bool nrt_need_state_save; mode_t nrt_umask; -/* - * Data structures specific to switch/nrt - * - * We are going to some trouble to keep these defs private so slurm - * hackers not interested in the interconnect details can just pass around - * the opaque types. All use of the data structure internals is local to this - * module. - */ - -typedef struct nrt_window { - uint16_t window_id; - uint32_t state; - uint16_t job_key; /* FIXME: Perhaps change to uid or client_pid? */ -} nrt_window_t; - -struct nrt_adapter { - char adapter_name[NRT_MAX_DEVICENAME_SIZE]; - uint16_t adapter_type; - uint16_t lid; - uint64_t network_id; - uint16_t window_count; - nrt_window_t *window_list; -}; - -struct nrt_nodeinfo { - uint32_t magic; - char name[NRT_HOSTLEN]; - uint32_t adapter_count; - struct nrt_adapter *adapter_list; - struct nrt_nodeinfo *next; -}; - struct nrt_libstate { uint32_t magic; uint32_t node_count; @@ -207,24 +756,6 @@ static char *_win_state_str(win_state_t state) } } -extern int -nrt_slurmctld_init(void) -{ - return SLURM_SUCCESS; -} - -extern int -nrt_slurmd_init(void) -{ - /* - * This is a work-around for the nrt_* functions calling umask(0) - */ - nrt_umask = umask(0077); - umask(nrt_umask); - - return SLURM_SUCCESS; -} - extern int nrt_slurmd_step_init(void) { @@ -617,54 +1148,6 @@ nrt_alloc_jobinfo(nrt_jobinfo_t **j) return 0; } -/* Used by: slurmd, slurmctld */ -extern int -nrt_alloc_nodeinfo(nrt_nodeinfo_t **n) -{ - nrt_nodeinfo_t *new; - - assert(n); - - new = (nrt_nodeinfo_t *) xmalloc(sizeof(nrt_nodeinfo_t)); - new->adapter_list = (struct nrt_adapter *) - xmalloc(sizeof(struct nrt_adapter) * - NRT_MAXADAPTERS); - new->magic = NRT_NODEINFO_MAGIC; - new->adapter_count = 0; - new->next = NULL; - - *n = new; - - return 0; -} - -/* Assumes a pre-allocated nodeinfo structure and uses _get_adapters - * to do the dirty work. We probably collect more information about - * the adapters on a give node than we need to but it was done - * in the interest of being prepared for future requirements. - * - * Used by: slurmd - */ -extern int -nrt_build_nodeinfo(nrt_nodeinfo_t *n, char *name) -{ - int count; - int err; - - assert(n); - assert(n->magic == NRT_NODEINFO_MAGIC); - assert(name); - - strncpy(n->name, name, NRT_HOSTLEN); - _lock(); - err = _get_adapters(n->adapter_list, &count); - _unlock(); - if (err != 0) - return err; - n->adapter_count = count; - return 0; -} - /* Used by: all */ extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) @@ -2543,75 +3026,4 @@ extern int nrt_clear_node_state(void) #endif return rc; } - -extern char *nrt_err_str(int rc) -{ - static char str[16]; - - switch (rc) { - case NRT_ALREADY_LOADED: - return "Already loaded"; - case NRT_BAD_VERSION: - return "Bad version"; - case NRT_CAU_EXCEEDED: - return "CAU index request exeeds available resources"; - case NRT_CAU_RESERVE: - return "Error during CAU index reserve"; - case NRT_CAU_UNRESERVE: - return "Error during CAU index unreserve"; - case NRT_EADAPTER: - return "Invalid adapter name"; - case NRT_EADAPTYPE: - return "Invalid adapter type"; - case NRT_EAGAIN: - return "Try call again later"; - case NRT_EINVAL: - return "Invalid input paramter"; - case NRT_EIO: - return "Adapter reported a DOWN state"; - case NRT_EMEM: - return "Memory allocation error"; - case NRT_EPERM: - return "Permission denied, not root"; - case NRT_ERR_COMMAND_TYPE: - return "Invalid command type"; - case NRT_ESYSTEM: - return "A system error occured"; - case NRT_IMM_SEND_RESERVE: - return "Error during immediate send slot reserve"; - case NRT_NO_FREE_WINDOW: - return "No free window"; - case NRT_NO_RDMA_AVAIL: - return "No RDMA windows available"; - case NRT_NTBL_LOAD_FAILED: - return "Failed to load NTBL"; - case NRT_NTBL_NOT_FOUND: - return "NTBL not found"; - case NRT_NTBL_UNLOAD_FAILED: - return "Failed to unload NTBL"; - case NRT_OP_NOT_VALID: - return "Requested operation not valid for given device"; - case NRT_PNSDAPI: - return "Error communicating with Protocol Network Services " - "Daemon"; - case NRT_RDMA_CLEAN_FAILED: - return "Task RDMA cleanup failed"; - case NRT_SUCCESS: - return "Success"; - case NRT_TIMEOUT: - return "No response back from PNSD/job"; - case NRT_UNKNOWN_ADAPTER: - return "Unknown adaper"; - case NRT_WIN_CLOSE_FAILED: - return "Task can not close window"; - case NRT_WIN_OPEN_FAILED: - return "Task can not open window"; - case NRT_WRONG_PREEMPT_STATE: - return "Invalid preemption state"; - case NRT_WRONG_WINDOW_STATE: - return "Wrong window state"; - } - - snprintf(str, sizeof(str), "%d", rc); - return str; -} +#endif diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 08770cc1eb..ff1cb99e76 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -60,7 +60,7 @@ typedef struct nrt_tableinfo { uint32_t table_length; void *table; /* Pointer to nrt_*_task_info_t*/ char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; - uint16_t adapter_type; + nrt_adapter_t adapter_type; } nrt_tableinfo_t; #endif /* _NRT_KEYS_INCLUDED */ diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 017d1a0dcf..139aa2994a 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -55,9 +55,9 @@ #endif /* opaque data structures - no peeking! */ -typedef struct nrt_libstate nrt_libstate_t; -typedef struct nrt_jobinfo nrt_jobinfo_t; -typedef struct nrt_nodeinfo nrt_nodeinfo_t; +typedef struct slurm_nrt_libstate slurm_nrt_libstate_t; +typedef struct slurm_nrt_jobinfo slurm_nrt_jobinfo_t; +typedef struct slurm_nrt_nodeinfo slurm_nrt_nodeinfo_t; /* NOTE: error codes should be between ESLURM_SWITCH_MIN and * ESLURM_SWITCH MAX as defined in slurm/slurm_errno.h */ @@ -86,29 +86,29 @@ extern char *nrt_err_str(int rc); extern int nrt_slurmctld_init(void); extern int nrt_slurmd_init(void); extern int nrt_slurmd_step_init(void); -extern int nrt_alloc_nodeinfo(nrt_nodeinfo_t **nh); -extern int nrt_build_nodeinfo(nrt_nodeinfo_t *np, char *hostname); -extern char *nrt_print_nodeinfo(nrt_nodeinfo_t *np, char *buf, size_t size); -extern int nrt_pack_nodeinfo(nrt_nodeinfo_t *np, Buf buf); -extern int nrt_unpack_nodeinfo(nrt_nodeinfo_t *np, Buf buf); -extern void nrt_free_nodeinfo(nrt_nodeinfo_t *np, bool ptr_into_array); -extern int nrt_alloc_jobinfo(nrt_jobinfo_t **jh); -extern int nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, +extern int nrt_alloc_nodeinfo(slurm_nrt_nodeinfo_t **nh); +extern int nrt_build_nodeinfo(slurm_nrt_nodeinfo_t *np, char *hostname); +extern char *nrt_print_nodeinfo(slurm_nrt_nodeinfo_t *np, char *buf, size_t size); +extern int nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *np, Buf buf); +extern int nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *np, Buf buf); +extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); +extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); +extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, bool sn_all, char *adapter_name, int bulk_xfer); -extern int nrt_pack_jobinfo(nrt_jobinfo_t *jp, Buf buf); -extern int nrt_unpack_jobinfo(nrt_jobinfo_t *jp, Buf buf); -extern nrt_jobinfo_t *nrt_copy_jobinfo(nrt_jobinfo_t *jp); -extern void nrt_free_jobinfo(nrt_jobinfo_t *jp); -extern int nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid); +extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); +extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); +extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); +extern void nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp); +extern int nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid); extern int nrt_init(void); extern int nrt_fini(void); -extern int nrt_unload_table(nrt_jobinfo_t *jp); -extern int nrt_unpack_libstate(nrt_libstate_t *lp, Buf buffer); -extern int nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data); +extern int nrt_unload_table(slurm_nrt_jobinfo_t *jp); +extern int nrt_unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); +extern int nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data); extern void nrt_libstate_save(Buf buffer, bool free_flag); extern int nrt_libstate_restore(Buf buffer); -extern int nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl); -extern int nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl); +extern int nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl); +extern int nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl); extern int nrt_libstate_clear(void); extern int nrt_slurmctld_init(void); extern int nrt_slurmd_init(void); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 32ecfdee6c..78e433390e 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -322,7 +322,10 @@ extern int switch_p_clear_node_state(void) extern int switch_p_alloc_node_info(switch_node_info_t **switch_node) { - return nrt_alloc_nodeinfo((nrt_nodeinfo_t **)switch_node); +#if NRT_DEBUG + info("switch_p_alloc_node_info()"); +#endif + return nrt_alloc_nodeinfo((slurm_nrt_nodeinfo_t **)switch_node); } extern int switch_p_build_node_info(switch_node_info_t *switch_node) @@ -339,7 +342,8 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) tmp = strstr(hostname, "."); if (tmp) *tmp = '\0'; - return nrt_build_nodeinfo((nrt_nodeinfo_t *)switch_node, hostname); + return nrt_build_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, + hostname); } extern int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) @@ -347,7 +351,7 @@ extern int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) #if NRT_DEBUG info("switch_p_pack_node_info()"); #endif - return nrt_pack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); + return nrt_pack_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, buffer); } extern int switch_p_unpack_node_info(switch_node_info_t *switch_node, @@ -356,7 +360,7 @@ extern int switch_p_unpack_node_info(switch_node_info_t *switch_node, #if NRT_DEBUG info("switch_p_unpack_node_info()"); #endif - return nrt_unpack_nodeinfo((nrt_nodeinfo_t *)switch_node, buffer); + return nrt_unpack_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, buffer); } extern void switch_p_free_node_info(switch_node_info_t **switch_node) @@ -365,13 +369,13 @@ extern void switch_p_free_node_info(switch_node_info_t **switch_node) info("switch_p_free_node_info()"); #endif if (switch_node) - nrt_free_nodeinfo((nrt_nodeinfo_t *)*switch_node, false); + nrt_free_nodeinfo((slurm_nrt_nodeinfo_t *)*switch_node, false); } extern char * switch_p_sprintf_node_info(switch_node_info_t *switch_node, char *buf, size_t size) { - return nrt_print_nodeinfo((nrt_nodeinfo_t *)switch_node, buf, size); + return nrt_print_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, buf, size); } /* @@ -382,7 +386,7 @@ extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) #if NRT_DEBUG info("switch_p_alloc_jobinfo()"); #endif - return nrt_alloc_jobinfo((nrt_jobinfo_t **)switch_job); + return nrt_alloc_jobinfo((slurm_nrt_jobinfo_t **)switch_job); } static char *_adapter_name_check(char *network) @@ -452,7 +456,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (strstr(network, "bulk_xfer") || strstr(network, "BULK_XFER")) bulk_xfer = 1; - err = nrt_build_jobinfo((nrt_jobinfo_t *)switch_job, list, + err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, nprocs, sn_all, adapter_name, bulk_xfer); hostlist_destroy(list); @@ -470,7 +474,7 @@ extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) #if NRT_DEBUG info("switch_p_copy_jobinfo()"); #endif - j = (switch_jobinfo_t *)nrt_copy_jobinfo((nrt_jobinfo_t *)switch_job); + j = (switch_jobinfo_t *)nrt_copy_jobinfo((slurm_nrt_jobinfo_t *)switch_job); if (!j) error("nrt_copy_jobinfo failed"); @@ -482,7 +486,7 @@ extern void switch_p_free_jobinfo(switch_jobinfo_t *switch_job) #if NRT_DEBUG info("switch_p_free_jobinfo()"); #endif - return nrt_free_jobinfo((nrt_jobinfo_t *)switch_job); + return nrt_free_jobinfo((slurm_nrt_jobinfo_t *)switch_job); } extern int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) @@ -490,7 +494,7 @@ extern int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) #if NRT_DEBUG info("switch_p_pack_jobinfo()"); #endif - return nrt_pack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); + return nrt_pack_jobinfo((slurm_nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) @@ -498,7 +502,7 @@ extern int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) #if NRT_DEBUG info("switch_p_unpack_jobinfo()"); #endif - return nrt_unpack_jobinfo((nrt_jobinfo_t *)switch_job, buffer); + return nrt_unpack_jobinfo((slurm_nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, @@ -507,7 +511,7 @@ extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, #if NRT_DEBUG info("switch_p_get_jobinfo()"); #endif - return nrt_get_jobinfo((nrt_jobinfo_t *)switch_job, key, + return nrt_get_jobinfo((slurm_nrt_jobinfo_t *)switch_job, key, resulting_data); } @@ -517,7 +521,7 @@ static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) int rc; list = hostlist_create(nodelist); - rc = nrt_job_step_complete((nrt_jobinfo_t *)jobinfo, list); + rc = nrt_job_step_complete((slurm_nrt_jobinfo_t *)jobinfo, list); hostlist_destroy(list); return rc; @@ -557,7 +561,7 @@ extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, char *nodelist info("switch_p_job_step_allocated()"); #endif list = hostlist_create(nodelist); - rc = nrt_job_step_allocated((nrt_jobinfo_t *)jobinfo, list); + rc = nrt_job_step_allocated((slurm_nrt_jobinfo_t *)jobinfo, list); hostlist_destroy(list); return rc; @@ -612,7 +616,7 @@ extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) info("switch_p_job_init()"); #endif pid = getpid(); - return nrt_load_table((nrt_jobinfo_t *)jobinfo, uid, pid); + return nrt_load_table((slurm_nrt_jobinfo_t *)jobinfo, uid, pid); } extern int switch_p_job_fini (switch_jobinfo_t *jobinfo) @@ -638,7 +642,7 @@ extern int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, } else debug("Job %u.%u: pgid value is zero", job_id, step_id); - err = nrt_unload_table((nrt_jobinfo_t *)jobinfo); + err = nrt_unload_table((slurm_nrt_jobinfo_t *)jobinfo); if (err != SLURM_SUCCESS) return SLURM_ERROR; -- GitLab From 0f05b6fd606d0deb9b63d73e8f50f2ec17d51305 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 14:15:12 -0800 Subject: [PATCH 034/614] More work for NRT build --- src/plugins/switch/nrt/nrt.c | 180 +++++++++++++---------------------- 1 file changed, 67 insertions(+), 113 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c60957b2b0..5cd2f78028 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -147,9 +147,45 @@ static char *_win_state_str(win_state_t state) } } +#if NRT_DEBUG +/* Used by: slurmd, slurmctld */ +static void +_print_nodeinfo(slurm_nrt_nodeinfo_t *n) +{ + int i, j; + struct slurm_nrt_adapter *a; + slurm_nrt_window_t *w; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); + + info("--Begin Node Info--"); + info(" node: %s", n->name); + info(" adapter_count: %u", n->adapter_count); + for (i = 0; i < n->adapter_count; i++) { + a = n->adapter_list + i; + info(" adapter: %s", a->adapter_name); + info(" type: %hu", a->adapter_type); + info(" window_count: %hu", a->window_count); + w = a->window_list; + for (j = 0; j < a->window_count; j++) { +#if (NRT_DEBUG < 2) + if (w[j].state != NRT_WIN_AVAILABLE) + continue; +#endif + info(" window %hu: %s", w->window_id, + _win_state_str(w->state)); + info(" job_key %hu", w->job_key); + } + } + info("--End Node Info--"); +} +#endif + extern int nrt_slurmctld_init(void) { + /* No op */ return SLURM_SUCCESS; } @@ -174,6 +210,8 @@ nrt_slurmd_step_init(void) nrt_umask = umask(0077); umask(nrt_umask); +/* FIXME: Should we cache NRT state information? */ + return SLURM_SUCCESS; } @@ -225,10 +263,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { -#if NRT_DEBUG - info("adapter_type[%d]: %u", - i, adapter_types.adapter_types[i]); -#endif adapter_names.adapter_type = adapter_types.adapter_types[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); @@ -240,10 +274,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { slurm_nrt_adapter_t *adapter_ptr; -#if NRT_DEBUG - info("adapter_names[%d]: %s", - j, adapter_names.adapter_names[j]); -#endif adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. @@ -251,7 +281,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { - error("nrt_command(clean_status, %s, %u): %s", + error("nrt_command(status_adapter, %s, %u): %s", adapter_status.adapter_name, adapter_status.adapter_type, nrt_err_str(err)); @@ -273,16 +303,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) n->adapter_count++; for (k = 0; k < adapter_status.window_count[0]; k++) { slurm_nrt_window_t *window_ptr; -#if NRT_DEBUG - info("window_id[%d]: %u", k, - adapter_status.status_array[k]-> - window_id); - info("state[%d]: %u", k, - adapter_status.status_array[k]->state); - info("client_pid[%d]: %u", k, - adapter_status.status_array[k]-> - client_pid); -#endif window_ptr = adapter_ptr->window_list + k; window_ptr->window_id = adapter_status. status_array[k]-> @@ -297,6 +317,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } } #if NRT_DEBUG + _print_nodeinfo(n); info("nrt_build_nodeinfo: complete: %d", rc); #endif return rc; @@ -348,7 +369,26 @@ nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *n, bool ptr_into_array) { - return; + struct slurm_nrt_adapter *adapter; + int i; + + if (!n) + return; + + assert(n->magic == NRT_NODEINFO_MAGIC); + +#if NRT_DEBUGX + info("nrt_free_nodeinfo"); + _print_nodeinfo(n); +#endif + if (n->adapter_list) { + adapter = n->adapter_list; + for (i = 0; i < n->adapter_count; i++) + xfree(adapter[i].window_list); + xfree(n->adapter_list); + } + if (!ptr_into_array) + xfree(n); } /* Find all of the windows used by job step "jp" on the hosts @@ -506,10 +546,6 @@ extern int nrt_clear_node_state(void) } for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { -#if NRT_DEBUG - info("adapter_type[%d]: %u", - i, adapter_types.adapter_types[i]); -#endif adapter_names.adapter_type = adapter_types.adapter_types[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); @@ -520,10 +556,6 @@ extern int nrt_clear_node_state(void) continue; } for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { -#if NRT_DEBUG - info("adapter_names[%d]: %s", - j, adapter_names.adapter_names[j]); -#endif adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. @@ -540,11 +572,6 @@ extern int nrt_clear_node_state(void) } for (k = 0; k < adapter_status.window_count[0]; k++) { -#if NRT_DEBUG - info("window_id[%d]: %u", k, - adapter_status.status_array[k]-> - window_id); -#endif clean_window.adapter_name = adapter_names. adapter_names[i]; clean_window.adapter_type = adapter_names. @@ -564,7 +591,14 @@ extern int nrt_clear_node_state(void) clean_window.window_id, nrt_err_str(err)); rc = SLURM_ERROR; + continue; } +#if NRT_DEBUG + info("nrt_command(clean_window, %s, %u, %u)", + clean_window.adapter_name, + clean_window.adapter_type, + clean_window.window_id); +#endif } } } @@ -711,50 +745,6 @@ static void _hash_rebuild(nrt_libstate_t *state); static void _init_adapter_cache(void); static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, uint16_t adapter_type); -static char *_win_state_str(win_state_t state); - -/* The _lock() and _unlock() functions are used to lock/unlock a - * global mutex. Used to serialize access to the global library - * state variable nrt_state. - */ -static void -_lock(void) -{ - int err = 1; - - while (err) { - err = pthread_mutex_lock(&global_lock); - } -} - -static void -_unlock(void) -{ - int err = 1; - - while (err) { - err = pthread_mutex_unlock(&global_lock); - } -} - -static char *_win_state_str(win_state_t state) -{ - if (state == NRT_WIN_UNAVAILABLE) - return "Unavailable"; - else if (state == NRT_WIN_INVALID) - return "Invalid"; - else if (state == NRT_WIN_RESERVED) - return "Reserved"; - else if (state == NRT_WIN_READY) - return "Ready"; - else if (state == NRT_WIN_RUNNING) - return "Running"; - else { - static char buf[16]; - snprintf(buf, sizeof(buf), "%d", state); - return buf; - } -} extern int nrt_slurmd_step_init(void) @@ -868,42 +858,6 @@ _print_jobinfo(nrt_jobinfo_t *j) info("--End Jobinfo--"); } -/* Used by: slurmd, slurmctld */ -static void -_print_nodeinfo(nrt_nodeinfo_t *n) -{ - int i, j; - struct nrt_adapter *a; - nrt_window_t *w; - - assert(n); - assert(n->magic == NRT_NODEINFO_MAGIC); - - info("--Begin Node Info--"); - info(" node: %s", n->name); - info(" adapter_count: %u", n->adapter_count); - for (i = 0; i < n->adapter_count; i++) { - a = n->adapter_list + i; - info(" adapter: %s", a->adapter_name); - info(" type: %hu", a->adapter_type); - info(" window_count: %hu", a->window_count); -#if (NRT_DEBUG > 1) - info(" lid[0]: %hu", a->lid[0]); - info(" network_id[0]: %"PRIu64"", a->network_id[0]); -#endif - w = a->window_list; - for (j = 0; j < a->window_count; j++) { -#if (NRT_DEBUG < 2) - if (w[j].state != NRT_WIN_AVAILABLE) - continue; -#endif - info(" window %hu: %s", w->window_id, - nrt_err_str(w->state)); - } - } - info("--End Node Info--"); -} - /* Used by: slurmctld */ static void _print_libstate(const nrt_libstate_t *l) -- GitLab From b34b85f4fa9903c1b71407037f9bcae6eab4d5a2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 14:59:14 -0800 Subject: [PATCH 035/614] More work on NRT build --- src/plugins/switch/nrt/nrt.c | 489 +++++++++++++++++------------------ 1 file changed, 236 insertions(+), 253 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 5cd2f78028..39f1fbd4c2 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -182,6 +182,16 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) } #endif +/* Tries to find a node fast using the hash table + * + * Used by: slurmctld + */ +static slurm_nrt_nodeinfo_t * +_find_node(slurm_nrt_libstate_t *lp, char *name) +{ + return NULL; +} + extern int nrt_slurmctld_init(void) { @@ -351,7 +361,227 @@ nrt_build_nodeinfo(slurm_nrt_nodeinfo_t *n, char *name) extern int nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) { + int i, j; + struct slurm_nrt_adapter *a; + int offset; + + assert(n); + assert(n->magic == NRT_NODEINFO_MAGIC); + assert(buf); +#if NRT_DEBUG + info("nrt_pack_nodeinfo():"); + _print_nodeinfo(n); +#endif + offset = get_buf_offset(buf); + pack32(n->magic, buf); + packmem(n->name, NRT_HOSTLEN, buf); + pack32(n->adapter_count, buf); + for (i = 0; i < n->adapter_count; i++) { + a = n->adapter_list + i; + packmem(a->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); + pack16(a->adapter_type, buf); + pack16(a->window_count, buf); + for (j = 0; j < a->window_count; j++) { + uint32_t state = a->window_list[j].state; + pack16(a->window_list[j].window_id, buf); + pack32(state, buf); + pack32(a->window_list[j].job_key, buf); + } + } + + return(get_buf_offset(buf) - offset); +} + +/* Used by: all */ +static int +_copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) +{ + int i, j; + struct slurm_nrt_adapter *sa = NULL; + struct slurm_nrt_adapter *da = NULL; + + assert(dest); + assert(src); + assert(dest->magic == NRT_NODEINFO_MAGIC); + assert(src->magic == NRT_NODEINFO_MAGIC); +#if NRT_DEBUG + info("_copy_node():"); + _print_nodeinfo(src); +#endif + strncpy(dest->name, src->name, NRT_HOSTLEN); + dest->adapter_count = src->adapter_count; + for (i = 0; i < dest->adapter_count; i++) { + sa = src->adapter_list + i; + da = dest->adapter_list +i; + strncpy(da->adapter_name, sa->adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + da->adapter_type = sa->adapter_type; + da->window_count = sa->window_count; + da->window_list = (slurm_nrt_window_t *) + xmalloc(sizeof(slurm_nrt_window_t) * + da->window_count); + for (j = 0; j < da->window_count; j++) { + da->window_list[j].window_id = sa->window_list[j]. + window_id; + da->window_list[j].state = sa->window_list[j].state; + da->window_list[j].job_key = sa->window_list[j]. + job_key; + } + } + + return SLURM_SUCCESS; +} + +/* Throw away adapter portion of the nodeinfo. + * + * Used by: _unpack_nodeinfo + */ +static int +_fake_unpack_adapters(Buf buf) +{ + uint32_t adapter_count; + uint16_t window_count; + uint32_t dummy32; + uint16_t dummy16; + char *dummyptr; + int i, j; + + safe_unpack32(&adapter_count, buf); + for (i = 0; i < adapter_count; i++) { + /* no copy, just advances buf counters */ + safe_unpackmem_ptr(&dummyptr, &dummy32, buf); + if (dummy32 != NRT_MAX_ADAPTER_NAME_LEN) + goto unpack_error; + safe_unpack16(&dummy16, buf); + safe_unpack16(&window_count, buf); + for (j = 0; j < window_count; j++) { + safe_unpack16(&dummy16, buf); + safe_unpack32(&dummy32, buf); + safe_unpack32(&dummy32, buf); + } + } + return SLURM_SUCCESS; + +unpack_error: + return SLURM_ERROR; +} + + +/* Unpack nodeinfo and update persistent libstate. + * + * If believe_window_status is true, we honor the window status variables + * from the packed nrt_nodeinfo_t. If it is false we set the status of + * all windows to NRT_WIN_AVAILABLE. + * + * Used by: slurmctld + */ +static int +_unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) +{ + int i, j, rc = SLURM_SUCCESS; + struct slurm_nrt_adapter *tmp_a = NULL; + slurm_nrt_window_t *tmp_w = NULL; + uint32_t size; + slurm_nrt_nodeinfo_t *tmp_n = NULL; + char *name_ptr, name[NRT_HOSTLEN]; + uint32_t magic; + uint16_t dummy16; + + /* NOTE! We don't care at this point whether n is valid. + * If it's NULL, we will just forego the copy at the end. + */ + assert(buf); + + /* Extract node name from buffer + */ + safe_unpack32(&magic, buf); + if (magic != NRT_NODEINFO_MAGIC) + slurm_seterrno_ret(EBADMAGIC_NRT_NODEINFO); + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_HOSTLEN) + goto unpack_error; + memcpy(name, name_ptr, size); + + /* When the slurmctld is in normal operating mode (NOT backup mode), + * the global nrt_state structure should NEVER be NULL at the time that + * this function is called. Therefore, if nrt_state is NULL here, + * we assume that the controller is in backup mode. In backup mode, + * the slurmctld only unpacks RPCs to find out their identity. + * Most of the RPCs, including the one calling this function, are + * simply ignored. + * + * So, here we just do a fake unpack to advance the buffer pointer. + */ + if (nrt_state == NULL) { + if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + slurm_seterrno_ret(EUNPACK); + } else { + return SLURM_SUCCESS; + } + } + + /* If we already have nodeinfo for this node, we ignore this message. + * The slurmctld's view of window allocation is always better than + * the slurmd's view. We only need the slurmd's view if the slurmctld + * has no nodeinfo at all for that node. + */ + if (name != NULL) { + tmp_n = _find_node(nrt_state, name); + if (tmp_n != NULL) { + if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + slurm_seterrno_ret(EUNPACK); + } else { + goto copy_node; + } + } + } + + /* + * Update global libstate with this nodes' info. + */ + tmp_n = xmalloc(sizeof(slurm_nrt_nodeinfo_t)); + tmp_n->magic = magic; + safe_unpack32(&tmp_n->adapter_count, buf); + for (i = 0; i < tmp_n->adapter_count; i++) { + tmp_a = tmp_n->adapter_list + i; + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_MAX_ADAPTER_NAME_LEN) + goto unpack_error; + memcpy(tmp_a->adapter_name, name_ptr, size); + safe_unpack16(&dummy16, buf); + tmp_a->adapter_type = dummy16; + safe_unpack16(&tmp_a->window_count, buf); + tmp_w = (slurm_nrt_window_t *) + xmalloc(sizeof(slurm_nrt_window_t) * + tmp_a->window_count); + for (j = 0; j < tmp_a->window_count; j++) { + safe_unpack16(&tmp_w[j].window_id, buf); + safe_unpack32(&tmp_w[j].state, buf); + safe_unpack32(&tmp_w[j].job_key, buf); + if (!believe_window_status) { + tmp_w[j].state = NRT_WIN_AVAILABLE; + tmp_w[j].job_key = 0; + } + } + tmp_a->window_list = tmp_w; + tmp_w = NULL; /* don't free if unpack error on next adapter */ + } +#if NRT_DEBUG + info("_unpack_nodeinfo"); + _print_nodeinfo(tmp_n); +#endif + +copy_node: + /* Only copy the node_info structure if the caller wants it */ + if ((n != NULL) && (_copy_node(n, tmp_n) != SLURM_SUCCESS)) + rc = SLURM_ERROR; + nrt_free_nodeinfo(tmp_n, false); + return rc; + +unpack_error: + xfree(tmp_w); + slurm_seterrno_ret(EUNPACK); } /* Unpack nodeinfo and update persistent libstate. @@ -361,9 +591,13 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) extern int nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) { - return SLURM_SUCCESS; -} + int rc; + _lock(); + rc = _unpack_nodeinfo(n, buf, false); + _unlock(); + return rc; +} /* Used by: slurmd, slurmctld */ extern void @@ -1102,82 +1336,6 @@ nrt_alloc_jobinfo(nrt_jobinfo_t **j) return 0; } -/* Used by: all */ -extern int -nrt_pack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) -{ - int i, j; - struct nrt_adapter *a; - int offset; - - assert(n); - assert(n->magic == NRT_NODEINFO_MAGIC); - assert(buf); -#if NRT_DEBUG - info("nrt_pack_nodeinfo():"); - _print_nodeinfo(n); -#endif - offset = get_buf_offset(buf); - pack32(n->magic, buf); - packmem(n->name, NRT_HOSTLEN, buf); - pack32(n->adapter_count, buf); - for (i = 0; i < n->adapter_count; i++) { - a = n->adapter_list + i; - packmem(a->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); - pack16(a->adapter_type, buf); - for (j = 0; j < MAX_SPIGOTS; j++) { - pack16(a->lid[j], buf); - pack64(a->network_id[j], buf); - } - pack16(a->window_count, buf); - for (j = 0; j < a->window_count; j++) { - pack16(a->window_list[j].window_id, buf); - pack32(a->window_list[j].state, buf); - pack16(a->window_list[j].job_key, buf); - } - } - - return(get_buf_offset(buf) - offset); -} - -/* Used by: all */ -static int -_copy_node(nrt_nodeinfo_t *dest, nrt_nodeinfo_t *src) -{ - int i, j; - struct nrt_adapter *sa = NULL; - struct nrt_adapter *da = NULL; - - assert(dest); - assert(src); - assert(dest->magic == NRT_NODEINFO_MAGIC); - assert(src->magic == NRT_NODEINFO_MAGIC); -#if NRT_DEBUG - info("_copy_node():"); - _print_nodeinfo(src); -#endif - strncpy(dest->name, src->name, NRT_HOSTLEN); - dest->adapter_count = src->adapter_count; - for (i = 0; i < dest->adapter_count; i++) { - sa = src->adapter_list + i; - da = dest->adapter_list +i; - strncpy(da->adapter_name, sa->adapter_name, - NRT_MAX_DEVICENAME_SIZE); - da->adapter_type = sa->adapter_type; - for (j = 0; j < MAX_SPIGOTS; j++) { - da->lid[j] = sa->lid[j]; - da->network_id[j] = sa->network_id[j]; - } - da->window_count = sa->window_count; - da->window_list = (nrt_window_t *)xmalloc(sizeof(nrt_window_t) * - da->window_count); - for (j = 0; j < da->window_count; j++) - da->window_list[j] = sa->window_list[j]; - } - - return SLURM_SUCCESS; -} - /* The idea behind keeping the hash table was to avoid a linear * search of the node list each time we want to retrieve or * modify a node's data. The _hash_index function translates @@ -1330,181 +1488,6 @@ _alloc_node(nrt_libstate_t *lp, char *name) return n; } -/* Throw away adapter portion of the nodeinfo. - * - * Used by: _unpack_nodeinfo - */ -static int -_fake_unpack_adapters(Buf buf) -{ - uint32_t adapter_count; - uint16_t window_count; - uint64_t dummy64; - uint32_t dummy32; - uint16_t dummy16; - char *dummyptr; - int i, j; - - safe_unpack32(&adapter_count, buf); - for (i = 0; i < adapter_count; i++) { - /* no copy, just advances buf counters */ - safe_unpackmem_ptr(&dummyptr, &dummy32, buf); - if (dummy32 != NRT_MAX_DEVICENAME_SIZE) - goto unpack_error; - safe_unpack16(&dummy16, buf); - for (j = 0; j < MAX_SPIGOTS; j++) { - safe_unpack16(&dummy16, buf); - safe_unpack64(&dummy64, buf); - } - safe_unpack16(&window_count, buf); - for (j = 0; j < window_count; j++) { - safe_unpack16(&dummy16, buf); - safe_unpack32(&dummy32, buf); - safe_unpack16(&dummy16, buf); - } - } - - return SLURM_SUCCESS; - -unpack_error: - return SLURM_ERROR; -} - - -/* Unpack nodeinfo and update persistent libstate. - * - * If believe_window_status is true, we honor the window status variables - * from the packed nrt_nodeinfo_t. If it is false we set the status of - * all windows to NRT_WIN_AVAILABLE. - * - * Used by: slurmctld - */ -static int -_unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) -{ - int i, j; - struct nrt_adapter *tmp_a = NULL; - nrt_window_t *tmp_w = NULL; - uint32_t size; - nrt_nodeinfo_t *tmp_n = NULL; - char *name_ptr, name[NRT_HOSTLEN]; - uint32_t magic; - - /* NOTE! We don't care at this point whether n is valid. - * If it's NULL, we will just forego the copy at the end. - */ - assert(buf); - - /* Extract node name from buffer - */ - safe_unpack32(&magic, buf); - if (magic != NRT_NODEINFO_MAGIC) - slurm_seterrno_ret(EBADMAGIC_NRT_NODEINFO); - safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_HOSTLEN) - goto unpack_error; - memcpy(name, name_ptr, size); - - /* When the slurmctld is in normal operating mode (NOT backup mode), - * the global nrt_state structure should NEVER be NULL at the time that - * this function is called. Therefore, if nrt_state is NULL here, - * we assume that the controller is in backup mode. In backup mode, - * the slurmctld only unpacks RPCs to find out their identity. - * Most of the RPCs, including the one calling this function, are - * simply ignored. - * - * So, here we just do a fake unpack to advance the buffer pointer. - */ - if (nrt_state == NULL) { - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { - slurm_seterrno_ret(EUNPACK); - } else { - return SLURM_SUCCESS; - } - } - - /* If we already have nodeinfo for this node, we ignore this message. - * The slurmctld's view of window allocation is always better than - * the slurmd's view. We only need the slurmd's view if the slurmctld - * has no nodeinfo at all for that node. - */ - if (name != NULL) { - tmp_n = _find_node(nrt_state, name); - if (tmp_n != NULL) { - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { - slurm_seterrno_ret(EUNPACK); - } else { - goto copy_node; - } - } - } - - /* Update global libstate with this nodes' info. - */ - tmp_n = _alloc_node(nrt_state, name); - if (tmp_n == NULL) - return SLURM_ERROR; - tmp_n->magic = magic; - safe_unpack32(&tmp_n->adapter_count, buf); - for (i = 0; i < tmp_n->adapter_count; i++) { - tmp_a = tmp_n->adapter_list + i; - safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_MAX_DEVICENAME_SIZE) - goto unpack_error; - memcpy(tmp_a->adapter_name, name_ptr, size); - safe_unpack16(&tmp_a->adapter_type, buf); - for (j = 0; j < MAX_SPIGOTS; j++) { - safe_unpack16(&tmp_a->lid[j], buf); - safe_unpack64(&tmp_a->network_id[j], buf); - } - safe_unpack16(&tmp_a->window_count, buf); - tmp_w = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * - tmp_a->window_count); - for (j = 0; j < tmp_a->window_count; j++) { - safe_unpack16(&tmp_w[j].window_id, buf); - safe_unpack32(&tmp_w[j].state, buf); - safe_unpack16(&tmp_w[j].job_key, buf); - if (!believe_window_status) { - tmp_w[j].state = NRT_WIN_AVAILABLE; - tmp_w[j].job_key = 0; - } - } - tmp_a->window_list = tmp_w; - tmp_w = NULL; /* don't free on unpack error of next adapter */ - } - -copy_node: - /* Only copy the node_info structure if the caller wants it */ - if ((n != NULL) && (_copy_node(n, tmp_n) != SLURM_SUCCESS)) - return SLURM_ERROR; - -#if NRT_DEBUG - info("_unpack_nodeinfo"); - _print_nodeinfo(tmp_n); -#endif - - return SLURM_SUCCESS; - -unpack_error: - xfree(tmp_w); - slurm_seterrno_ret(EUNPACK); -} - -/* Unpack nodeinfo and update persistent libstate. - * - * Used by: slurmctld - */ -extern int -nrt_unpack_nodeinfo(nrt_nodeinfo_t *n, Buf buf) -{ - int rc; - - _lock(); - rc = _unpack_nodeinfo(n, buf, false); - _unlock(); - return rc; -} - /* Used by: slurmd, slurmctld */ extern void -- GitLab From 45e950f654655f57555259a43d82e94d8e840538 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 15:43:09 -0800 Subject: [PATCH 036/614] Move node state cache into current nrt code --- src/plugins/switch/nrt/nrt.c | 346 ++++++++++++++++++----------------- 1 file changed, 174 insertions(+), 172 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 39f1fbd4c2..57231234b1 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -66,11 +66,16 @@ #define NRT_NODEINFO_MAGIC 0xc00cc00a #define NRT_JOBINFO_MAGIC 0xc00cc00b #define NRT_LIBSTATE_MAGIC 0xc00cc00c -#define NRT_HOSTLEN 20 +#define NRT_HOSTLEN 20 +#define NRT_NODECOUNT 128 +#define NRT_HASHCOUNT 128 +#define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) #if 1 -pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; -mode_t nrt_umask; +pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; +extern bool nrt_need_state_save; +slurm_nrt_libstate_t * nrt_state = NULL; +mode_t nrt_umask; /* * Data structures specific to switch/nrt @@ -104,6 +109,16 @@ typedef struct slurm_nrt_nodeinfo { struct slurm_nrt_nodeinfo *next; } slurm_nrt_nodeinfo_t; +struct slurm_nrt_libstate { + uint32_t magic; + uint32_t node_count; + uint32_t node_max; + slurm_nrt_nodeinfo_t *node_list; + uint32_t hash_max; + slurm_nrt_nodeinfo_t **hash_table; + uint16_t key_index; +}; + /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library * state variable nrt_state. @@ -128,6 +143,158 @@ _unlock(void) } } +/* The idea behind keeping the hash table was to avoid a linear + * search of the node list each time we want to retrieve or + * modify a node's data. The _hash_index function translates + * a node name to an index into the hash table. + * + * Used by: slurmctld + */ +static int +_hash_index(char *name) +{ + int index = 0; + int j; + + assert(name); + + /* Multiply each character by its numerical position in the + * name string to add a bit of entropy, because host names such + * as cluster[0001-1000] can cause excessive index collisions. + */ + for (j = 1; *name; name++, j++) + index += (int)*name * j; + index %= nrt_state->hash_max; + + return index; +} + +/* Tries to find a node fast using the hash table + * + * Used by: slurmctld + */ +static slurm_nrt_nodeinfo_t * +_find_node(slurm_nrt_libstate_t *lp, char *name) +{ + int i; + slurm_nrt_nodeinfo_t *n; + + assert(name); + assert(lp); + + if (lp->node_count == 0) + return NULL; + + if (lp->hash_table) { + i = _hash_index(name); + n = lp->hash_table[i]; + while (n) { + assert(n->magic == NRT_NODEINFO_MAGIC); + if (!strncmp(n->name, name, NRT_HOSTLEN)) + return n; + n = n->next; + } + } + + return NULL; +} + +/* Add the hash entry for a newly created slurm_nrt_nodeinfo_t + */ +static void +_hash_add_nodeinfo(slurm_nrt_libstate_t *state, slurm_nrt_nodeinfo_t *node) +{ + int index; + + assert(state); + assert(state->hash_table); + assert(state->hash_max >= state->node_count); + if (!node->name[0]) + return; + index = _hash_index(node->name); + node->next = state->hash_table[index]; + state->hash_table[index] = node; +} + +/* Recreates the hash table for the node list. + * + * Used by: slurmctld + */ +static void +_hash_rebuild(slurm_nrt_libstate_t *state) +{ + int i; + + assert(state); + + if (state->hash_table) + xfree(state->hash_table); + if ((state->node_count > state->hash_max) || (state->hash_max == 0)) + state->hash_max += NRT_HASHCOUNT; + state->hash_table = (slurm_nrt_nodeinfo_t **) + xmalloc(sizeof(slurm_nrt_nodeinfo_t *) * + state->hash_max); + for (i = 0; i < state->node_count; i++) + _hash_add_nodeinfo(state, &(state->node_list[i])); +} + +/* If the node is already in the node list then simply return + * a pointer to it, otherwise dynamically allocate memory to the + * node list if necessary. + * + * Used by: slurmctld + */ +static slurm_nrt_nodeinfo_t * +_alloc_node(slurm_nrt_libstate_t *lp, char *name) +{ + slurm_nrt_nodeinfo_t *n = NULL; + int new_bufsize; + bool need_hash_rebuild = false; + + assert(lp); + + if (name != NULL) { + n = _find_node(lp, name); + if (n != NULL) + return n; + } + + nrt_need_state_save = true; + + if (lp->node_count >= lp->node_max) { + lp->node_max += NRT_NODECOUNT; + new_bufsize = lp->node_max * sizeof(slurm_nrt_nodeinfo_t); + if (lp->node_list == NULL) { + lp->node_list = (slurm_nrt_nodeinfo_t *) + xmalloc(new_bufsize); + } else { + lp->node_list = (slurm_nrt_nodeinfo_t *) + xrealloc(lp->node_list, new_bufsize); + } + need_hash_rebuild = true; + } + if (lp->node_list == NULL) { + slurm_seterrno(ENOMEM); + return NULL; + } + + n = lp->node_list + (lp->node_count++); + n->magic = NRT_NODEINFO_MAGIC; + n->name[0] = '\0'; + n->adapter_list = (struct slurm_nrt_adapter *) + xmalloc(NRT_MAXADAPTERS * + sizeof(struct slurm_nrt_adapter)); + + if (name != NULL) { + strncpy(n->name, name, NRT_HOSTLEN); + if (need_hash_rebuild || (lp->node_count > lp->hash_max)) + _hash_rebuild(lp); + else + _hash_add_nodeinfo(lp, n); + } + + return n; +} static char *_win_state_str(win_state_t state) { if (state == NRT_WIN_UNAVAILABLE) @@ -182,16 +349,6 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) } #endif -/* Tries to find a node fast using the hash table - * - * Used by: slurmctld - */ -static slurm_nrt_nodeinfo_t * -_find_node(slurm_nrt_libstate_t *lp, char *name) -{ - return NULL; -} - extern int nrt_slurmctld_init(void) { @@ -540,7 +697,9 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) /* * Update global libstate with this nodes' info. */ - tmp_n = xmalloc(sizeof(slurm_nrt_nodeinfo_t)); + tmp_n = _alloc_node(nrt_state, name); + if (tmp_n == NULL) + return SLURM_ERROR; tmp_n->magic = magic; safe_unpack32(&tmp_n->adapter_count, buf); for (i = 0; i < tmp_n->adapter_count; i++) { @@ -918,14 +1077,11 @@ extern char *nrt_err_str(int rc) /* THIS IS OLD CODE, LIKELY TO BE MODIFIED AND MERGED INTO THE ABOVE #ifdef */ /******************************************************************************/ #define JOB_DESC_LEN 64 /* Length of job description */ -#define NRT_NODECOUNT 128 -#define NRT_HASHCOUNT 128 #define NRT_AUTO_WINMEM 0 #define NRT_MAX_WIN 15 #define NRT_MIN_WIN 0 char* nrt_conf = NULL; -extern bool nrt_need_state_save; mode_t nrt_umask; @@ -964,9 +1120,7 @@ typedef struct { /* * Globals */ -nrt_libstate_t *nrt_state = NULL; -pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; -#define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) + /* slurmd/slurmstepd global variables */ hostlist_t adapter_list; @@ -1336,158 +1490,6 @@ nrt_alloc_jobinfo(nrt_jobinfo_t **j) return 0; } -/* The idea behind keeping the hash table was to avoid a linear - * search of the node list each time we want to retrieve or - * modify a node's data. The _hash_index function translates - * a node name to an index into the hash table. - * - * Used by: slurmctld - */ -static int -_hash_index(char *name) -{ - int index = 0; - int j; - - assert(name); - - /* Multiply each character by its numerical position in the - * name string to add a bit of entropy, because host names such - * as cluster[0001-1000] can cause excessive index collisions. - */ - for (j = 1; *name; name++, j++) - index += (int)*name * j; - index %= nrt_state->hash_max; - - return index; -} - -/* Tries to find a node fast using the hash table - * - * Used by: slurmctld - */ -static nrt_nodeinfo_t * -_find_node(nrt_libstate_t *lp, char *name) -{ - int i; - nrt_nodeinfo_t *n; - - assert(name); - assert(lp); - - if (lp->node_count == 0) - return NULL; - - if (lp->hash_table) { - i = _hash_index(name); - n = lp->hash_table[i]; - while (n) { - assert(n->magic == NRT_NODEINFO_MAGIC); - if (!strncmp(n->name, name, NRT_HOSTLEN)) - return n; - n = n->next; - } - } - - return NULL; -} - -/* Add the hash entry for a newly created nrt_nodeinfo_t - */ -static void -_hash_add_nodeinfo(nrt_libstate_t *state, nrt_nodeinfo_t *node) -{ - int index; - - assert(state); - assert(state->hash_table); - assert(state->hash_max >= state->node_count); - if (!strlen(node->name)) - return; - index = _hash_index(node->name); - node->next = state->hash_table[index]; - state->hash_table[index] = node; -} - -/* Recreates the hash table for the node list. - * - * Used by: slurmctld - */ -static void -_hash_rebuild(nrt_libstate_t *state) -{ - int i; - - assert(state); - - if (state->hash_table) - xfree(state->hash_table); - if (state->node_count > state->hash_max || state->hash_max == 0) - state->hash_max += NRT_HASHCOUNT; - state->hash_table = (nrt_nodeinfo_t **) - xmalloc(sizeof(nrt_nodeinfo_t *) * state->hash_max); - memset(state->hash_table, 0, - sizeof(nrt_nodeinfo_t *) * state->hash_max); - for (i = 0; i < state->node_count; i++) - _hash_add_nodeinfo(state, &(state->node_list[i])); -} - -/* If the node is already in the node list then simply return - * a pointer to it, otherwise dynamically allocate memory to the - * node list if necessary. - * - * Used by: slurmctld - */ -static nrt_nodeinfo_t * -_alloc_node(nrt_libstate_t *lp, char *name) -{ - nrt_nodeinfo_t *n = NULL; - int new_bufsize; - bool need_hash_rebuild = false; - - assert(lp); - - if (name != NULL) { - n = _find_node(lp, name); - if (n != NULL) - return n; - } - - nrt_need_state_save = true; - - if (lp->node_count >= lp->node_max) { - lp->node_max += NRT_NODECOUNT; - new_bufsize = lp->node_max * sizeof(nrt_nodeinfo_t); - if (lp->node_list == NULL) { - lp->node_list = (nrt_nodeinfo_t *)xmalloc(new_bufsize); - } else { - lp->node_list = (nrt_nodeinfo_t *)xrealloc(lp->node_list, - new_bufsize); - } - need_hash_rebuild = true; - } - if (lp->node_list == NULL) { - slurm_seterrno(ENOMEM); - return NULL; - } - - n = lp->node_list + (lp->node_count++); - n->magic = NRT_NODEINFO_MAGIC; - n->name[0] = '\0'; - n->adapter_list = (struct nrt_adapter *) xmalloc(NRT_MAXADAPTERS * - sizeof(struct nrt_adapter)); - - if (name != NULL) { - strncpy(n->name, name, NRT_HOSTLEN); - if (need_hash_rebuild || lp->node_count > lp->hash_max) - _hash_rebuild(lp); - else - _hash_add_nodeinfo(lp, n); - } - - return n; -} - /* Used by: slurmd, slurmctld */ extern void -- GitLab From ef459356a2f1f9f501599493e383f99b4fd91daa Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 16:10:15 -0800 Subject: [PATCH 037/614] More nrt work --- src/plugins/switch/nrt/nrt.c | 259 +++++++++++++++++------------------ 1 file changed, 127 insertions(+), 132 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 57231234b1..ae6e8298b5 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -119,6 +119,28 @@ struct slurm_nrt_libstate { uint16_t key_index; }; +/* Local functions */ +static slurm_nrt_libstate_t * + _alloc_libstate(void); +static slurm_nrt_nodeinfo_t * + _alloc_node(slurm_nrt_libstate_t *lp, char *name); +static int _copy_node(slurm_nrt_nodeinfo_t *dest, + slurm_nrt_nodeinfo_t *src); +static int _fake_unpack_adapters(Buf buf); +static slurm_nrt_nodeinfo_t * + _find_node(slurm_nrt_libstate_t *lp, char *name); +static int _get_adapters(slurm_nrt_nodeinfo_t *n); +static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, + slurm_nrt_nodeinfo_t *node); +static int _hash_index(char *name); +static void _hash_rebuild(slurm_nrt_libstate_t *state); +static void _lock(void); +static void _unlock(void); +static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); +static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, + bool believe_window_status); +static char * _win_state_str(win_state_t state); + /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library * state variable nrt_state. @@ -295,7 +317,9 @@ _alloc_node(slurm_nrt_libstate_t *lp, char *name) return n; } -static char *_win_state_str(win_state_t state) + +static char * +_win_state_str(win_state_t state) { if (state == NRT_WIN_UNAVAILABLE) return "Unavailable"; @@ -347,8 +371,63 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) } info("--End Node Info--"); } + +/* Used by: slurmctld */ +static void +_print_libstate(const slurm_nrt_libstate_t *l) +{ + int i; + + assert(l); + assert(l->magic == NRT_LIBSTATE_MAGIC); + + info("--Begin libstate--\n"); + info(" node_count = %u", l->node_count); + info(" node_max = %u", l->node_max); + info(" hash_max = %u", l->hash_max); + info(" key_index = %hu", l->key_index); + for (i = 0; i < l->node_count; i++) { + _print_nodeinfo(&l->node_list[i]); + } + info("--End libstate--"); +} #endif +static slurm_nrt_libstate_t * +_alloc_libstate(void) +{ + slurm_nrt_libstate_t *tmp; + + tmp = (slurm_nrt_libstate_t *) xmalloc(sizeof(slurm_nrt_libstate_t)); + tmp->magic = NRT_LIBSTATE_MAGIC; + tmp->node_count = 0; + tmp->node_max = 0; + tmp->node_list = NULL; + tmp->hash_max = 0; + tmp->hash_table = NULL; + tmp->key_index = 1; + + return tmp; +} + +/* Allocate and initialize memory for the persistent libstate. + * + * Used by: slurmctld + */ +extern int +nrt_init(void) +{ + slurm_nrt_libstate_t *tmp; + + tmp = _alloc_libstate(); + _lock(); + assert(!nrt_state); + nrt_state = tmp; + _unlock(); + + return SLURM_SUCCESS; +} + extern int nrt_slurmctld_init(void) { @@ -884,16 +963,6 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) return SLURM_SUCCESS; } -/* Allocate and initialize memory for the persistent libstate. - * - * Used by: slurmctld - */ -extern int -nrt_init(void) -{ - return SLURM_SUCCESS; -} - extern int nrt_fini(void) { @@ -907,10 +976,55 @@ nrt_libstate_save(Buf buffer, bool free_flag) return; } +/* Used by: slurmctld */ +static int +_unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) +{ + uint32_t node_count; + int i; + + assert(lp->magic == NRT_LIBSTATE_MAGIC); + + safe_unpack32(&lp->magic, buffer); + safe_unpack32(&node_count, buffer); + for (i = 0; i < node_count; i++) { + if (_unpack_nodeinfo(NULL, buffer, false) != SLURM_SUCCESS) + goto unpack_error; + } + if (lp->node_count != node_count) { + error("Failed to recover switch state of all nodes (%u of %u)", + lp->node_count, node_count); + return SLURM_ERROR; + } + safe_unpack16(&lp->key_index, buffer); +#if NRT_DEBUG + info("_unpack_libstate"); + _print_libstate(lp); + #endif + return SLURM_SUCCESS; + +unpack_error: + error("unpack error in _unpack_libstate"); + slurm_seterrno_ret(EBADMAGIC_NRT_LIBSTATE); + return SLURM_ERROR; +} + /* Used by: slurmctld */ extern int nrt_libstate_restore(Buf buffer) { + _lock(); + assert(!nrt_state); + + nrt_state = _alloc_libstate(); + if (!nrt_state) { + error("nrt_libstate_restore nrt_state is NULL"); + _unlock(); + return SLURM_FAILURE; + } + _unpack_libstate(nrt_state, buffer); + _unlock(); + return SLURM_SUCCESS; } @@ -920,7 +1034,8 @@ nrt_libstate_clear(void) return SLURM_SUCCESS; } -extern int nrt_clear_node_state(void) +extern int +nrt_clear_node_state(void) { int err, i, j, k, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; @@ -1083,18 +1198,6 @@ extern char *nrt_err_str(int rc) char* nrt_conf = NULL; -mode_t nrt_umask; - -struct nrt_libstate { - uint32_t magic; - uint32_t node_count; - uint32_t node_max; - nrt_nodeinfo_t *node_list; - uint32_t hash_max; - nrt_nodeinfo_t **hash_table; - uint16_t key_index; -}; - struct nrt_jobinfo { uint32_t magic; /* version from nrt_version() */ @@ -1245,25 +1348,6 @@ _print_jobinfo(nrt_jobinfo_t *j) info(" tableinfo supressed"); info("--End Jobinfo--"); } - -/* Used by: slurmctld */ -static void -_print_libstate(const nrt_libstate_t *l) -{ - int i; - - assert(l); - assert(l->magic == NRT_LIBSTATE_MAGIC); - - info("--Begin libstate--\n"); - info(" node_count = %u", l->node_count); - info(" node_max = %u", l->node_max); - info(" hash_max = %u", l->hash_max); - for (i = 0; i < l->node_count; i++) { - _print_nodeinfo(&l->node_list[i]); - } - info("--End libstate--"); -} #endif /* The lid caching functions were created to avoid unnecessary @@ -2687,43 +2771,6 @@ nrt_unload_table(nrt_jobinfo_t *jp) return rc; } -static nrt_libstate_t * -_alloc_libstate(void) -{ - nrt_libstate_t *tmp; - - tmp = (nrt_libstate_t *) xmalloc(sizeof(nrt_libstate_t)); - tmp->magic = NRT_LIBSTATE_MAGIC; - tmp->node_count = 0; - tmp->node_max = 0; - tmp->node_list = NULL; - tmp->hash_max = 0; - tmp->hash_table = NULL; - tmp->key_index = 1; - - return tmp; -} - -/* Allocate and initialize memory for the persistent libstate. - * - * Used by: slurmctld - */ -extern int -nrt_init(void) -{ - nrt_libstate_t *tmp; - - tmp = _alloc_libstate(); - if (!tmp) - return SLURM_FAILURE; - _lock(); - assert(!nrt_state); - nrt_state = tmp; - _unlock(); - - return SLURM_SUCCESS; -} - static void _free_libstate(nrt_libstate_t *lp) { @@ -2790,58 +2837,6 @@ nrt_libstate_save(Buf buffer, bool free_flag) _unlock(); } -/* Used by: slurmctld */ -static int -_unpack_libstate(nrt_libstate_t *lp, Buf buffer) -{ - uint32_t node_count; - int i; - - assert(lp->magic == NRT_LIBSTATE_MAGIC); - - safe_unpack32(&lp->magic, buffer); - safe_unpack32(&node_count, buffer); - for (i = 0; i < node_count; i++) { - if (_unpack_nodeinfo(NULL, buffer, false) != SLURM_SUCCESS) - goto unpack_error; - } - if (lp->node_count != node_count) { - error("Failed to recover switch state of all nodes (%d of %u)", - lp->node_count, node_count); - return SLURM_ERROR; - } - safe_unpack16(&lp->key_index, buffer); -#if NRT_DEBUG - info("_unpack_libstate"); - _print_libstate(lp); - #endif - return SLURM_SUCCESS; - -unpack_error: - error("unpack error in _unpack_libstate"); - slurm_seterrno_ret(EBADMAGIC_NRT_LIBSTATE); - return SLURM_ERROR; -} - -/* Used by: slurmctld */ -extern int -nrt_libstate_restore(Buf buffer) -{ - _lock(); - assert(!nrt_state); - - nrt_state = _alloc_libstate(); - if (!nrt_state) { - error("nrt_libstate_restore nrt_state is NULL"); - _unlock(); - return SLURM_FAILURE; - } - _unpack_libstate(nrt_state, buffer); - _unlock(); - - return SLURM_SUCCESS; -} - extern int nrt_libstate_clear(void) { -- GitLab From cc1a7b005a5f94b1410e671936c65a6f0d7965f5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 7 Feb 2012 16:24:15 -0800 Subject: [PATCH 038/614] More NRT progress --- src/plugins/switch/nrt/nrt.c | 64 +++++++++++++---------------- src/plugins/switch/nrt/switch_nrt.c | 9 ++-- 2 files changed, 33 insertions(+), 40 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ae6e8298b5..c39e3dbe4e 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -119,6 +119,23 @@ struct slurm_nrt_libstate { uint16_t key_index; }; +struct slurm_nrt_jobinfo { + uint32_t magic; + /* version from nrt_version() */ + /* adapter from lid in table */ + /* network_id from lid in table */ + /* uid from getuid() */ + /* pid from getpid() */ + uint32_t job_key; + char job_desc[NRT_MAX_JOB_NAME_LEN]; + uint8_t bulk_xfer; /* flag */ + uint16_t tables_per_task; + nrt_tableinfo_t *tableinfo; + + hostlist_t nodenames; + uint32_t num_tasks; +}; + /* Local functions */ static slurm_nrt_libstate_t * _alloc_libstate(void); @@ -465,9 +482,18 @@ nrt_slurmd_step_init(void) extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **j) { - return SLURM_SUCCESS; -} + slurm_nrt_jobinfo_t *new; + assert(j != NULL); + new = (slurm_nrt_jobinfo_t *) xmalloc(sizeof(slurm_nrt_jobinfo_t)); + new->magic = NRT_JOBINFO_MAGIC; + new->job_key = -1; + new->tables_per_task = 0; + new->tableinfo = NULL; + *j = new; + + return 0; +} /* Used by: slurmd, slurmctld */ extern int @@ -1198,23 +1224,6 @@ extern char *nrt_err_str(int rc) char* nrt_conf = NULL; -struct nrt_jobinfo { - uint32_t magic; - /* version from nrt_version() */ - /* adapter from lid in table */ - /* network_id from lid in table */ - /* uid from getuid() */ - /* pid from getpid() */ - uint16_t job_key; - char job_desc[JOB_DESC_LEN]; - uint8_t bulk_xfer; /* flag */ - uint16_t tables_per_task; - nrt_tableinfo_t *tableinfo; - - hostlist_t nodenames; - int num_tasks; -}; - typedef struct { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; uint16_t adapter_type; @@ -1557,23 +1566,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } -/* Used by: slurmd, slurmctld */ -extern int -nrt_alloc_jobinfo(nrt_jobinfo_t **j) -{ - nrt_jobinfo_t *new; - - assert(j != NULL); - new = (nrt_jobinfo_t *) xmalloc(sizeof(nrt_jobinfo_t)); - new->magic = NRT_JOBINFO_MAGIC; - new->job_key = -1; - new->tables_per_task = 0; - new->tableinfo = NULL; - *j = new; - - return 0; -} - /* Used by: slurmd, slurmctld */ extern void diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 78e433390e..921a810503 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -423,9 +423,10 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, char *adapter_name = NULL; #if NRT_DEBUG - info("switch_p_build_jobinfo()"); -#endif + info("switch_p_build_jobinfo(): network:%s", network); +#else debug3("network = \"%s\"", network); +#endif if (strstr(network, "ip") || strstr(network, "IP")) { debug2("NRT: \"ip\" found in network string, " "no network tables allocated"); @@ -453,8 +454,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, for (i = 0; i < hostlist_count(list); i++) nprocs += tasks_per_node[i]; - if (strstr(network, "bulk_xfer") - || strstr(network, "BULK_XFER")) + if (strstr(network, "bulk_xfer") || + strstr(network, "BULK_XFER")) bulk_xfer = 1; err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, nprocs, sn_all, adapter_name, -- GitLab From 3cfdb5f518c553fcf03712869f994cdebd3b2ee3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 8 Feb 2012 08:26:04 -0800 Subject: [PATCH 039/614] More work on real NRT build --- src/plugins/switch/nrt/nrt.c | 678 ++++++++++++++++++----------------- 1 file changed, 343 insertions(+), 335 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c39e3dbe4e..e9c0df56fa 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -126,8 +126,7 @@ struct slurm_nrt_jobinfo { /* network_id from lid in table */ /* uid from getuid() */ /* pid from getpid() */ - uint32_t job_key; - char job_desc[NRT_MAX_JOB_NAME_LEN]; + nrt_job_key_t job_key; uint8_t bulk_xfer; /* flag */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -137,21 +136,28 @@ struct slurm_nrt_jobinfo { }; /* Local functions */ -static slurm_nrt_libstate_t * - _alloc_libstate(void); -static slurm_nrt_nodeinfo_t * - _alloc_node(slurm_nrt_libstate_t *lp, char *name); +static int _allocate_windows_all(int adapter_cnt, + nrt_tableinfo_t *tableinfo, char *hostname, + nrt_task_id_t task_id, nrt_job_key_t job_key, + nrt_adapter_t adapter_type); +static int _allocate_window_single(char *adapter_name, + nrt_tableinfo_t *tableinfo, char *hostname, + nrt_task_id_t task_id, nrt_job_key_t job_key, + nrt_adapter_t adapter_type); +static slurm_nrt_libstate_t *_alloc_libstate(void); +static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); static int _fake_unpack_adapters(Buf buf); -static slurm_nrt_nodeinfo_t * - _find_node(slurm_nrt_libstate_t *lp, char *name); +static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); +static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); static int _get_adapters(slurm_nrt_nodeinfo_t *n); static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, slurm_nrt_nodeinfo_t *node); static int _hash_index(char *name); static void _hash_rebuild(slurm_nrt_libstate_t *state); static void _lock(void); +static nrt_job_key_t _next_key(void); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, @@ -335,6 +341,160 @@ _alloc_node(slurm_nrt_libstate_t *lp, char *name) return n; } +static slurm_nrt_window_t * +_find_free_window(slurm_nrt_adapter_t *adapter) +{ + int i; + slurm_nrt_window_t *window; + + for (i = 0; i < adapter->window_count; i++) { + window = &adapter->window_list[i]; + if (window->state == NRT_WIN_AVAILABLE) + return window; + } + + return (slurm_nrt_window_t *) NULL; +} + +/* For a given process, fill out an nrt_creator_per_task_input_t + * struct (an array of these makes up the network table loaded + * for each job). Assign adapters, lids and switch windows to + * each task in a job. + * + * Used by: slurmctld + */ +static int +_allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, + char *hostname, nrt_task_id_t task_id, + nrt_job_key_t job_key, nrt_adapter_t adapter_type) +{ + slurm_nrt_nodeinfo_t *node; + slurm_nrt_adapter_t *adapter; + slurm_nrt_window_t *window; + int i; + + assert(tableinfo); + assert(hostname); + + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + + /* Reserve a window on each adapter for this task */ + for (i = 0; i < adapter_cnt; i++) { + adapter = &node->adapter_list[i]; + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; + + if (adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_table; + ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table += task_id; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; + } else if (adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_table; + hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; + hfi_table += task_id; + hfi_table->task_id = task_id; + hfi_table->win_id = window->window_id; + } else { + fatal("Missing support for adapter type %d", + adapter_type); + } + + strncpy(tableinfo[i].adapter_name, adapter->adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + } + + return SLURM_SUCCESS; +} + + +/* For a given process, fill out an nrt_creator_per_task_input_t + * struct (an array of these makes up the network table loaded + * for each job). Assign a single adapter, lid and switch window to + * a task in a job. + * + * Used by: slurmctld + */ +static int +_allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, + char *hostname, nrt_task_id_t task_id, + nrt_job_key_t job_key, nrt_adapter_t adapter_type) +{ + slurm_nrt_nodeinfo_t *node; + slurm_nrt_adapter_t *adapter = NULL; + slurm_nrt_window_t *window; + int i; + + assert(tableinfo); + assert(hostname); + + debug("in _allocate_window_single"); + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + + /* find the adapter */ + for (i = 0; i < node->adapter_count; i++) { + debug("adapter %s at index %d", + node->adapter_list[i].adapter_name, i); + if (strcasecmp(node->adapter_list[i].adapter_name, + adapter_name) == 0) { + adapter = &node->adapter_list[i]; + debug("Found adapter %s", adapter_name); + break; + } + } + if (adapter == NULL) { + error("Failed to find adapter %s on node %s", + adapter_name, hostname); + return SLURM_ERROR; + } + + /* Reserve a window on the adapter for this task */ + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; + + if (adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_table; + ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table += task_id; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; + } else if (adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_table; + hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; + hfi_table += task_id; + hfi_table->task_id = task_id; + hfi_table->win_id = window->window_id; + } else { + fatal("Missing support for adapter type %d", adapter_type); + } + + strncpy(tableinfo[0].adapter_name, adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + + return SLURM_SUCCESS; +} + static char * _win_state_str(win_state_t state) { @@ -408,6 +568,43 @@ _print_libstate(const slurm_nrt_libstate_t *l) } info("--End libstate--"); } +/* Used by: all */ +static void +_print_table(void *table, int size, nrt_adapter_t adapter_type) +{ + int i; + + assert(table); + assert(size > 0); + + info("--Begin NRT table--"); + for (i = 0; i < size; i++) { + if (adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = table; + ib_tbl_ptr += i; + info(" task_id: %u", ib_tbl_ptr->task_id); + info(" win_id: %hu", ib_tbl_ptr->win_id); + info(" node_number: %u", ib_tbl_ptr->node_number); + info(" device_name: %s", ib_tbl_ptr->device_name); + info(" base_lid: %u", ib_tbl_ptr->base_lid); + info(" port_id: %hu", ib_tbl_ptr->port_id); + info(" lmc: %hu", ib_tbl_ptr->lmc); + info(" port_status: %hu", ib_tbl_ptr->port_status); + } else if (adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = table; + hfi_tbl_ptr += i; + info(" task_id: %u", hfi_tbl_ptr->task_id); + info(" lpar_id: %u", hfi_tbl_ptr->lpar_id); + info(" lid: %u", hfi_tbl_ptr->lid); + info(" win_id: %hu", hfi_tbl_ptr->win_id); + } else { + fatal("Unsupported adapter type: %u", adapter_type); + } + } + info("--End NRT table--"); +} #endif static slurm_nrt_libstate_t * @@ -915,6 +1112,28 @@ nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) return SLURM_SUCCESS; } + +/* Assign a unique key to each job. The key is used later to + * gain access to the network table loaded on each node of a job. + * + * Used by: slurmctld + */ +static nrt_job_key_t +_next_key(void) +{ + uint16_t key; + + assert(nrt_state); + + _lock(); + if (key == 0) + key++; + nrt_state->key_index = key + 1; + _unlock(); + + return key; +} + /* Setup everything for the job. Assign tasks across * nodes based on the hostlist given and create the network table used * on all nodes of the job. @@ -925,10 +1144,125 @@ extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, bool sn_all, char *adapter_name, int bulk_xfer) { + int nnodes; + hostlist_iterator_t hi; + char *host = NULL; + int proc_cnt = 0; + int i, j; + slurm_nrt_nodeinfo_t *node; + int rc; + int task_cnt; + int full_node_cnt; + int min_procs_per_node; + int max_procs_per_node; +/* FIXME: where can we load this from? */ + nrt_adapter_t adapter_type = NRT_HFI; + int table_rec_len = 0; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + assert(!hostlist_is_empty(hl)); + + if (nprocs <= 0) + slurm_seterrno_ret(EINVAL); + + jp->bulk_xfer = (uint8_t) bulk_xfer; + jp->job_key = _next_key(); + + hi = hostlist_iterator_create(hl); + + if (sn_all) { + /* + * Peek at the first host to figure out tables_per_task. + * This driver assumes that all nodes have the same number + * of adapters per node. Bad things will happen if this + * assumption is incorrect. + */ + host = hostlist_next(hi); + _lock(); + node = _find_node(nrt_state, host); + jp->tables_per_task = node ? node->adapter_count : 0; + _unlock(); + if (host != NULL) + free(host); + hostlist_iterator_reset(hi); + } else { + jp->tables_per_task = 1; + } + + /* Allocate memory for each nrt_tableinfo_t */ + jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * + sizeof(nrt_tableinfo_t)); + if (adapter_type == NRT_IB) + table_rec_len = sizeof(nrt_ib_task_info_t); + else if (adapter_type == NRT_HFI) + table_rec_len = sizeof(nrt_hfi_task_info_t); + else + fatal("Unsupported adapter_type: %u", adapter_type); + for (i = 0; i < jp->tables_per_task; i++) { + jp->tableinfo[i].table_length = nprocs; + jp->tableinfo[i].table = xmalloc(nprocs * table_rec_len); + } + + debug("Allocating windows"); + nnodes = hostlist_count(hl); + full_node_cnt = nprocs % nnodes; + min_procs_per_node = nprocs / nnodes; + max_procs_per_node = (nprocs + nnodes - 1) / nnodes; + proc_cnt = 0; + _lock(); + for (i = 0; i < nnodes; i++) { + host = hostlist_next(hi); + if (!host) + error("Failed to get next host"); + + if (i < full_node_cnt) + task_cnt = max_procs_per_node; + else + task_cnt = min_procs_per_node; + + for (j = 0; j < task_cnt; j++) { + if (adapter_name == NULL) { + rc = _allocate_windows_all(jp->tables_per_task, + jp->tableinfo, + host, proc_cnt, + jp->job_key, + adapter_type); + } else { + rc = _allocate_window_single(adapter_name, + jp->tableinfo, + host, proc_cnt, + jp->job_key, + adapter_type); + } + if (rc != SLURM_SUCCESS) { + _unlock(); + goto fail; + } + proc_cnt++; + } + free(host); + } + _unlock(); + + +#if NRT_DEBUG + info("nrt_build_jobinfo"); + _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length, + adapter_type); +#endif + hostlist_iterator_destroy(hi); return SLURM_SUCCESS; + +fail: + free(host); + hostlist_iterator_destroy(hi); + /* slurmctld will call nrt_free_jobinfo on jp */ + return SLURM_FAILURE; } + /* Used by: all */ extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) @@ -1262,33 +1596,6 @@ nrt_slurmd_step_init(void) } #if NRT_DEBUG -/* Used by: all */ -static void -_print_table(nrt_creator_per_task_input_t *table, int size) -{ - uint16_t adapter_type = RSCT_DEVTYPE_INFINIBAND; - int i; - - assert(table); - assert(size > 0); - - info("--Begin NRT table--"); - for (i = 0; i < size; i++) { -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table[i].ib_per_task; - info(" task_id: %hu", ib_tbl_ptr->task_id); - info(" win_id: %hu", ib_tbl_ptr->win_id); - info(" base_lid: %hu", ib_tbl_ptr->base_lid); - } else { - fatal("_print_table: lack HPCE code"); - } - } - info("--End NRT table--"); -} - - /* Used by: slurmd */ static void _print_adapter_resources(char *adapter_name, uint16_t adapter_type, @@ -1347,7 +1654,6 @@ _print_jobinfo(nrt_jobinfo_t *j) info("--Begin Jobinfo--"); info(" job_key: %u", j->job_key); - info(" job_desc: %s", j->job_desc); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %u", j->bulk_xfer); info(" tables_per_task: %hu", j->tables_per_task); @@ -1594,47 +1900,6 @@ nrt_free_nodeinfo(nrt_nodeinfo_t *n, bool ptr_into_array) xfree(n); } -/* Assign a unique key to each job. The key is used later to - * gain access to the network table loaded on each node of a job. - * - * NRT documentation states that the job key must be greater - * than 0 and less than 0xFFF0. - * - * Used by: slurmctld - */ -static uint16_t -_next_key(void) -{ - uint16_t key; - - assert(nrt_state); - - _lock(); - key = nrt_state->key_index % 0xFFF0; - if (key == 0) - key++; - nrt_state->key_index = key + 1; - _unlock(); - - return key; -} - -/* FIXME - this could be a little smarter than walking the whole list each time */ -static nrt_window_t * -_find_free_window(struct nrt_adapter *adapter) { - int i; - nrt_window_t *window; - - for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { - window = &adapter->window_list[i]; - if (window->state == NRT_WIN_AVAILABLE) - return window; - } - - return (nrt_window_t *) NULL; -} - - static nrt_window_t * _find_window(struct nrt_adapter *adapter, uint16_t window_id) { int i; @@ -1651,137 +1916,6 @@ _find_window(struct nrt_adapter *adapter, uint16_t window_id) { return (nrt_window_t *) NULL; } - -/* For a given process, fill out an nrt_creator_per_task_input_t - * struct (an array of these makes up the network table loaded - * for each job). Assign adapters, lids and switch windows to - * each task in a job. - * - * Used by: slurmctld - */ -static int -_allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, uint16_t job_key) -{ - nrt_nodeinfo_t *node; - struct nrt_adapter *adapter; - nrt_window_t *window; - int i; - - assert(tableinfo); - assert(hostname); - - node = _find_node(nrt_state, hostname); - if (node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - - /* Reserve a window on each adapter for this task */ - for (i = 0; i < adapter_cnt; i++) { - adapter = &node->adapter_list[i]; - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; - } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_table; - ib_table = &tableinfo[i].table[task_id].ib_per_task; - ib_table->task_id = task_id; - ib_table->base_lid = adapter->lid[0]; - ib_table->win_id = window->window_id; - } else { - fatal("Missing support for adapter type %hu", - adapter->adapter_type); - } - - strncpy(tableinfo[i].adapter_name, adapter->adapter_name, - NRT_MAX_DEVICENAME_SIZE); - } - - return SLURM_SUCCESS; -} - - -/* For a given process, fill out an nrt_creator_per_task_input_t - * struct (an array of these makes up the network table loaded - * for each job). Assign a single adapter, lid and switch window to - * a task in a job. - * - * Used by: slurmctld - */ -static int -_allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, uint16_t job_key) -{ - nrt_nodeinfo_t *node; - struct nrt_adapter *adapter = NULL; - nrt_window_t *window; - nrt_creator_per_task_input_t *table; - int i; - - assert(tableinfo); - assert(hostname); - - debug("in _allocate_window_single"); - node = _find_node(nrt_state, hostname); - if (node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - - /* find the adapter */ - for (i = 0; i < node->adapter_count; i++) { - debug("adapter %s at index %d", - node->adapter_list[i].adapter_name, i); - if (strcasecmp(node->adapter_list[i].adapter_name, - adapter_name) == 0) { - adapter = &node->adapter_list[i]; - debug("Found adapter %s", adapter_name); - break; - } - } - if (adapter == NULL) { - error("Failed to find adapter %s on node %s", - adapter_name, hostname); - return SLURM_ERROR; - } - - /* Reserve a window on the adapter for this task */ - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; - } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - - table = &tableinfo[0].table[task_id]; - if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table->ib_per_task; - ib_tbl_ptr->task_id = task_id; - ib_tbl_ptr->base_lid = adapter->lid[0]; - ib_tbl_ptr->win_id = window->window_id; - } else { - fatal("_allocate_window_single: lack HPCE code"); - } - - strncpy(tableinfo[0].adapter_name, adapter_name, - NRT_MAX_DEVICENAME_SIZE); - - return SLURM_SUCCESS; -} - - /* Find the correct NRT structs and set the state * of the switch windows for the specified task_id. * @@ -2062,127 +2196,6 @@ nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl) } - -/* Setup everything for the job. Assign tasks across - * nodes based on the hostlist given and create the network table used - * on all nodes of the job. - * - * Used by: slurmctld - */ -extern int -nrt_build_jobinfo(nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, int bulk_xfer) -{ - int nnodes; - hostlist_iterator_t hi; - char *host = NULL; - int proc_cnt = 0; - int i, j; - nrt_nodeinfo_t *node; - int rc; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; - - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); - assert(!hostlist_is_empty(hl)); - - if (nprocs <= 0) - slurm_seterrno_ret(EINVAL); - - jp->bulk_xfer = (uint8_t) bulk_xfer; - jp->job_key = _next_key(); - snprintf(jp->job_desc, JOB_DESC_LEN, - "slurm switch/NRT driver key=%d", jp->job_key); - - hi = hostlist_iterator_create(hl); - - if (sn_all) { - /* - * Peek at the first host to figure out tables_per_task. - * This driver assumes that all nodes have the same number - * of adapters per node. Bad Things will happen if this - * assumption is incorrect. - */ - host = hostlist_next(hi); - _lock(); - node = _find_node(nrt_state, host); - jp->tables_per_task = node ? node->adapter_count : 0; - _unlock(); - if (host != NULL) - free(host); - hostlist_iterator_reset(hi); - } else { - jp->tables_per_task = 1; - } - - /* Allocate memory for each nrt_tableinfo_t */ - jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task - * sizeof(nrt_tableinfo_t)); - for (i = 0; i < jp->tables_per_task; i++) { - jp->tableinfo[i].table_length = nprocs; - jp->tableinfo[i].table = (nrt_creator_per_task_input_t *) - xmalloc(nprocs * - sizeof(nrt_creator_per_task_input_t)); - } - - debug("Allocating windows"); - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - proc_cnt = 0; - _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if (!host) - error("Failed to get next host"); - - if (i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { - if (adapter_name == NULL) { - rc = _allocate_windows_all(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - jp->job_key); - } else { - rc = _allocate_window_single(adapter_name, - jp->tableinfo, - host, proc_cnt, - jp->job_key); - } - if (rc != SLURM_SUCCESS) { - _unlock(); - goto fail; - } - proc_cnt++; - } - free(host); - } - _unlock(); - - -#if NRT_DEBUG - info("nrt_build_jobinfo"); - _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); -#endif - - hostlist_iterator_destroy(hi); - return SLURM_SUCCESS; - -fail: - free(host); - hostlist_iterator_destroy(hi); - /* slurmctld will call nrt_free_jobinfo on jp */ - return SLURM_FAILURE; -} - static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) { @@ -2217,7 +2230,6 @@ nrt_pack_jobinfo(nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack16(j->job_key, buf); - packmem(j->job_desc, JOB_DESC_LEN, buf); pack8(j->bulk_xfer, buf); pack16(j->tables_per_task, buf); for (i = 0; i < j->tables_per_task; i++) { @@ -2267,7 +2279,6 @@ unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ int nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) { - uint32_t size; int i; assert(j); @@ -2277,9 +2288,6 @@ nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) safe_unpack32(&j->magic, buf); assert(j->magic == NRT_JOBINFO_MAGIC); safe_unpack16(&j->job_key, buf); - safe_unpackmem(j->job_desc, &size, buf); - if (size != JOB_DESC_LEN) - goto unpack_error; safe_unpack8(&j->bulk_xfer, buf); safe_unpack16(&j->tables_per_task, buf); @@ -2593,7 +2601,7 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) adapter_type_code); info(" network_id:%"PRIu64" uid:%u pid:%u", network_id, (uint32_t)uid, (uint32_t)pid); - info(" job_key:%hd job_desc:%s", jp->job_key, jp->job_desc); + info(" job_key:%u", jp->job_key); info(" bulk_xfer:%u bulk_xfer_res:%u", jp->bulk_xfer, bulk_xfer_resources); for (j = 0; j < jp->tableinfo[i].table_length; j++) { -- GitLab From f1eccf9ad831faf62777127e33890e89cf8aa3c1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 7 Feb 2012 12:46:04 -0800 Subject: [PATCH 040/614] NRT - add --with-libnrt dir to configure --- auxdir/x_ac_nrt.m4 | 22 ++++++++++++---------- configure | 29 +++++++++++++++++++---------- 2 files changed, 31 insertions(+), 20 deletions(-) diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index 6505c8515e..bbedfd1712 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -16,23 +16,25 @@ AC_DEFUN([X_AC_NRT], [ - AC_MSG_CHECKING([whether to enable IBM NRT support]) - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi - for nrt_dir in $nrt_default_dirs; do + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi + + AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Specify path to libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) + + AC_MSG_CHECKING([whether to enable IBM NRT support]) + for nrt_dir in $nrt_default_dirs; do # skip dirs that don't exist if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then continue; fi - # search for required NRT API libraries - if test -f "$ntbl_dir/libnrt.so"; then + if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" NRT_LDFLAGS="-lnrt" - break; + break; fi done diff --git a/configure b/configure index 50445c3dc9..cfe03da9d8 100755 --- a/configure +++ b/configure @@ -933,6 +933,7 @@ with_slurmctld_port with_slurmd_port with_slurmdbd_port with_slurmctld_port_count +with_libnrt with_readline with_ssl with_munge @@ -1646,6 +1647,7 @@ Optional Packages: --with-slurmdbd-port=N set slurmdbd default port [6819] --with-slurmctld-port-count=N set slurmctld default port count [1] + --with-libnrt=PATH Specify path to libnrt.so --without-readline compile without readline support --with-ssl=PATH Specify path to OpenSSL installation --with-munge=PATH Specify path to munge installation @@ -21259,24 +21261,31 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi + + +# Check whether --with-libnrt was given. +if test "${with_libnrt+set}" = set; then : + withval=$with_libnrt; nrt_default_dirs="$withval $nrt_default_dirs" +fi + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 $as_echo_n "checking whether to enable IBM NRT support... " >&6; } - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi - for nrt_dir in $nrt_default_dirs; do + for nrt_dir in $nrt_default_dirs; do # skip dirs that don't exist if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then continue; fi - # search for required NRT API libraries - if test -f "$ntbl_dir/libnrt.so"; then + if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" NRT_LDFLAGS="-lnrt" - break; + break; fi done -- GitLab From b94cd4e556b943b122d265e31b2162dfdba8b7ef Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 7 Feb 2012 14:25:07 -0800 Subject: [PATCH 041/614] PERSC - added shr_64.c to make libpermapi.so which is needed by poe to interface with SLURM. --- src/plugins/switch/nrt/Makefile.am | 8 +- src/plugins/switch/nrt/Makefile.in | 24 ++- src/plugins/switch/nrt/shr_64.c | 306 +++++++++++++++++++++++++++++ 3 files changed, 333 insertions(+), 5 deletions(-) create mode 100644 src/plugins/switch/nrt/shr_64.c diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 9c67431225..1a97c68418 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -7,6 +7,8 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +convenience_libs = $(top_builddir)/src/api/libslurm.o -ldl + SWITCH_NRT_LA_SOURCES = \ nrt.c \ nrt_keys.h \ @@ -14,10 +16,12 @@ SWITCH_NRT_LA_SOURCES = \ switch_nrt.c if HAVE_NRT -pkglib_LTLIBRARIES = switch_nrt.la +pkglib_LTLIBRARIES = switch_nrt.la libpermapi.la switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) - +libpermapi_la_SOURCES = shr_64.c +libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ + $(convenience_libs) -lpthread else pkglib_LTLIBRARIES = EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 912f71ed5b..6fafb78042 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -107,6 +107,14 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) +libpermapi_la_LIBADD = +am__libpermapi_la_SOURCES_DIST = shr_64.c +@HAVE_NRT_TRUE@am_libpermapi_la_OBJECTS = shr_64.lo +libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) +libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpermapi_la_LDFLAGS) $(LDFLAGS) -o $@ +@HAVE_NRT_TRUE@am_libpermapi_la_rpath = -rpath $(pkglibdir) switch_nrt_la_LIBADD = am__switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h \ switch_nrt.c @@ -132,8 +140,10 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(switch_nrt_la_SOURCES) $(EXTRA_switch_nrt_la_SOURCES) -DIST_SOURCES = $(am__switch_nrt_la_SOURCES_DIST) \ +SOURCES = $(libpermapi_la_SOURCES) $(switch_nrt_la_SOURCES) \ + $(EXTRA_switch_nrt_la_SOURCES) +DIST_SOURCES = $(am__libpermapi_la_SOURCES_DIST) \ + $(am__switch_nrt_la_SOURCES_DIST) \ $(am__EXTRA_switch_nrt_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags @@ -343,6 +353,7 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +convenience_libs = $(top_builddir)/src/api/libslurm.o -ldl SWITCH_NRT_LA_SOURCES = \ nrt.c \ nrt_keys.h \ @@ -350,9 +361,13 @@ SWITCH_NRT_LA_SOURCES = \ switch_nrt.c @HAVE_NRT_FALSE@pkglib_LTLIBRARIES = -@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la +@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la libpermapi.la @HAVE_NRT_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) @HAVE_NRT_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) +@HAVE_NRT_TRUE@libpermapi_la_SOURCES = shr_64.c +@HAVE_NRT_TRUE@libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ +@HAVE_NRT_TRUE@ $(convenience_libs) -lpthread + @HAVE_NRT_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) all: all-am @@ -419,6 +434,8 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done +libpermapi.la: $(libpermapi_la_OBJECTS) $(libpermapi_la_DEPENDENCIES) + $(libpermapi_la_LINK) $(am_libpermapi_la_rpath) $(libpermapi_la_OBJECTS) $(libpermapi_la_LIBADD) $(LIBS) switch_nrt.la: $(switch_nrt_la_OBJECTS) $(switch_nrt_la_DEPENDENCIES) $(switch_nrt_la_LINK) $(am_switch_nrt_la_rpath) $(switch_nrt_la_OBJECTS) $(switch_nrt_la_LIBADD) $(LIBS) @@ -429,6 +446,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch_nrt.Plo@am__quote@ .c.o: diff --git a/src/plugins/switch/nrt/shr_64.c b/src/plugins/switch/nrt/shr_64.c new file mode 100644 index 0000000000..bb5bad5cbf --- /dev/null +++ b/src/plugins/switch/nrt/shr_64.c @@ -0,0 +1,306 @@ +/*****************************************************************************\ + * shr_64.c - This plug is used by POE to interact with SLURM. + * + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC. + * Written by Danny Auble et. al. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif +#include "src/common/xmalloc.h" +#include "src/common/list.h" +#include "src/common/hostlist.h" +#include + +#include + +/* The connection communicates information to and from the resource + * manager, so that the resource manager can start the parallel task + * manager, and is available for the caller to communicate directly + * with the parallel task manager. + * IN resource_mgr - The resource manager handle returned by pe_rm_init. + * IN connect_param - Input parameter structure (rm_connect_param) + * that contains the following: + * machine_count: The count of hosts/machines. + * machine_name: The array of machine names on which to connect. + * executable: The name of the executable to be started. + * IN rm_timeout - The integer value that defines a connection timeout + * value. This value is defined by the MP_RM_TIMEOUT + * environment variable. A value less than zero indicates there + * is no timeout. A value equal to zero means to immediately + * return with no wait or retry. A value greater than zero + * means to wait the specified amount of time (in seconds). + * OUT rm_sockfds - An array of socket file descriptors, that are + * allocated by the caller, to be returned as output, of the connection. + * OUT error_msg - An error message that explains the error. + * RET 0 - SUCCESS, nonzero on failure. + */ +extern int pe_rm_connect(rmhandle_t resource_mgr, + rm_connect_param *connect_param, + int *rm_sockfds, int rm_timeout, char **error_msg) +{ + return -1; +} + +/* Releases the resource manager handle, closes the socket that is + * created by the pe_rm_init function, and releases memory + * allocated. When called, pe_rm_free implies the job has completed + * and resources are freed and available for subsequent jobs. + * IN/OUT resource_mgr + */ +extern void pe_rm_free(rmhandle_t *resource_mgr) +{ + +} + +/* The memory that is allocated to events generated by the resource + * manager is released. pe_rm_free_event must be called for every + * event that is received from the resource manager by calling the + * pe_rm_get_event function. + * IN resource_mgr + * IN job_event - The pointer to a job event. The event must have been + * built by calling the pe_rm_get_event function. + * RET 0 - SUCCESS, nonzero on failure. + */ +extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) +{ + return -1; +} + +/* This resource management interface is called to return job event + * information. The pe_rm_get_event function is only called in + * interactive mode. + * + * With interactive jobs, this function reads or selects on the listen + * socket created by the pe_rm_init call. If the listen socket is not + * ready to read, this function selects and waits. POE processes + * should monitor this socket at all times for event notification from + * the resource manager after the job has started running. + * + * This function returns a pointer to the event that was updated by + * the transaction. + * The valid events are: + * JOB_ERROR_EVENT + * Job error messages occurred. In this case, POE displays the + * error and terminates. + * JOB_STATE_EVENT + * A job status change occurred, which results in one of the + * following job states. In this case, the caller may need to take + * appropriate action. + * JOB_STATE_RUNNING + * Indicates that the job has started. POE uses the + * pe_rm_get_job_info function to return the job + * information. When a job state of JOB_STATE_RUNNING has been + * returned, the job has started running and POE can obtain the + * job information by way of the pe_rm_get_job_info function call. + * JOB_STATE_NOTRUN + * Indicates that the job was not run, and POE will terminate. + * JOB_STATE_PREEMPTED + * Indicates that the job was preempted. + * JOB_STATE_RESUMED + * Indicates that the job has resumed. + * JOB_TIMER_EVENT + * Indicates that no events occurred during the period + * specified by pe_rm_timeout. + * + * IN resource_mgr + * IN job_event - The address of the pointer to the job_event_t + * type. If an event is generated successfully by the resource + * manager, that event is saved at the location specified, and + * pe_rm_get_event returns 0 (or a nonzero value, if the event + * is not generated successfully). Based on the event type that is + * returned, the appropriate event of the type job_event_t can + * be accessed. After the event is processed, it should be + * freed by calling pe_rm_free_event. + * OUT error_msg - The address of a character string at which the + * error message that is generated by pe_rm_get_event is + * stored. The memory for this error message is allocated by + * the malloc API call. After the error message is processed, + * the memory allocated should be freed by a calling free function. + * IN rm_timeout - The integer value that defines a connection timeout + * value. This value is defined by the MP_RETRY environment + * variable. A value less than zero indicates there is no + * timeout. A value equal to zero means to immediately return + * with no wait or retry. A value greater than zero means to + * wait the specified amount of time (in seconds). + * RET 0 - SUCCESS, nonzero on failure. + */ +extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, + int rm_timeout, char ** error_msg) +{ + return -1; +} + +/* The pe_rm_get_job_info function is called to return job + * information, after a job has been started. It can be called in + * either batch or interactive mode. For interactive jobs, it should + * be called when pe_rm_get_event returns with the JOB_STATE_EVENT + * event type, indicating the JOB_STATE_RUNNING + * state. pe_rm_get_job_info provides the job information data values, + * as defined by the job_info_t structure. It returns with an error if + * the job is not in a running state. For batch jobs, POE calls + * pe_rm_get_job_info immediately because, in batch mode, POE is + * started only after the job has been started. The pe_rm_get_job_info + * function must be capable of being called multiple times from the + * same process or a different process, and the same job data must be + * returned each time. When called from a different process, the + * environment of that process is guaranteed to be the same as the + * environment of the process that originally called the function. + * + * IN resource_mgr + * IN job_info - The address of the pointer to the job_info_t + * type. The job_info_t type contains the job information + * returned by the resource manager for the handle that is + * specified. The caller itself must free the data areas that + * are returned. + * OUT error_msg - The address of a character string at which the + * error message that is generated by pe_rm_get_job_info is + * stored. The memory for this error message is allocated by the + * malloc API call. After the error message is processed, the memory + * allocated should be freed by a calling free function. + * RET 0 - SUCCESS, nonzero on failure. + */ +extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, + char ** error_msg) +{ + return -1; +} + +/* The handle to the resource manager is returned to the calling + * function. The calling process needs to use the resource manager + * handle in subsequent resource manager API calls. + * + * A version will be returned as output in the rmapi_version + * parameter, after POE supplies it as input. The resource manager + * returns the version value that is installed and running as output. + * + * A resource manager ID can be specified that defines a job that is + * currently running, and for which POE is initializing the resource + * manager. When the resource manager ID is null, a value for the + * resource manager ID is included with the job information that is + * returned by the pe_rm_get_job_info function. When pe_rm_init is + * called more than once with a null resource manager ID value, it + * returns the same ID value on the subsequent pe_rm_get_job_info + * function call. + * + * The resource manager can be initialized in either + * batch or interactive mode. The resource manager must export the + * environment variable PE_RM_BATCH=yes when in batch mode. + * + * By default, the resource manager error messages and any debugging + * messages that are generated by this function, or any subsequent + * resource manager API calls, should be written to STDERR. Errors are + * returned by way of the error message string parameter. + * + * When the resource manager is successfully instantiated and + * initialized, it returns with a file descriptor for a listen socket, + * which is used by the resource manager daemon to communicate with + * the calling process. If a resource manager wants to send + * information to the calling process, it builds an appropriate event + * that corresponds to the information and sends that event over the + * socket to the calling process. The calling process could monitor + * the socket using the select API and read the event when it is ready. + * + * IN/OUT rmapi_version - The resource manager API version level. The + * value of RM_API_VERSION is defined in permapi.h. Initially, + * POE provides this as input, and the resource manager will + * return its version level as output. + * OUT resource_mgr - Pointer to the rmhandle_t handle returned by the + * pe_rm_init function. This handle should be used by all other + * resource manager API calls. + * IN/OUT rm_id - Pointer to a character string that defines a + * resource manager ID, for checkpoint and restart cases. This + * pointer can be set to NULL, which means there is no previous + * resource manager session or job running. When it is set to a + * value, the resource manager uses the specified ID for + * returning the proper job information to a subsequent + * pe_rm_get_job_info function call. + * OUT error_msg - The address of a character string at which the + * error messages generated by this function are stored. The + * memory for this error message is allocated by the malloc API + * call. After the error message is processed, the memory + * allocated should be freed by a calling free function. + * RET - Non-negative integer representing a valid file descriptor + * number for the socket that will be used by the resource + * manager to communicate with the calling process. - SUCCESS + * integer less than 0 - FAILURE + */ +extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, + char** error_msg); +{ + return -1; +} + +/* Used to inform the resource manager that a checkpoint is in + * progress or has completed. POE calls pe_rm_send_event to provide + * the resource manager with information about the checkpointed job. + * + * IN resource_mgr + * IN job_event - The address of the pointer to the job_info_t type + * that indicates if a checkpoint is in progress (with a type + * of JOB_CKPT_IN_PROGRESS) or has completed (with a type of + * JOB_CKPT_COMPLETE). + * OUT error_msg - The address of a character string at which the + * error message that is generated by pe_rm_send_event is + * stored. The memory for this error message is allocated by the + * malloc API call. After the error message is processed, the + * memory allocated should be freed by a calling free function. + * RET 0 - SUCCESS, nonzero on failure. + */ +extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, + char ** error_msg) +{ + return -1; +} + +/* This function is used to submit an interactive job to the resource + * manager. The job request is either an object or a file (JCL format) + * that contains information needed by a job to run by way of the + * resource manager. + * + * IN resource_mgr + * IN job_cmd - The job request (JCL format), either as an object or a file. + * OUT error_msg - The address of a character string at which the + * error messages generated by this function are stored. The + * memory for this error message is allocated by the malloc API + * call. After the error message is processed, the memory + * allocated should be freed by a calling free function. + * RET 0 - SUCCESS, nonzero on failure. + */ +int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, + char** error_msg) +{ + return -1; +} + -- GitLab From 2744d8ab3363ea51b97b2e65797e2c187c38af91 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 7 Feb 2012 14:25:46 -0800 Subject: [PATCH 042/614] PERSC - added with persc option to the slurm.spec file to create a persc rpm needed for running on a IBM persc machine. --- slurm.spec | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/slurm.spec b/slurm.spec index b60d21e776..f5f20ac67c 100644 --- a/slurm.spec +++ b/slurm.spec @@ -18,6 +18,7 @@ # --with mysql %_with_mysql 1 require mysql support # --with openssl %_with_openssl 1 require openssl RPM to be installed # --without pam %_without_pam 1 don't require pam-devel RPM to be installed +# --with percs %_with_percs 1 build percs RPM # --with postgres %_with_postgres 1 require postgresql support # --without readline %_without_readline 1 don't require readline-devel RPM to be installed # --with sgijob %_with_sgijob 1 build proctrack-sgi-job RPM @@ -324,6 +325,17 @@ Obsoletes: slurm-aix-federation SLURM plugins for IBM AIX and Federation switch. %endif +%if %{slurm_with percs} +%package percs +Summary: SLURM plugins to run on an IBM PERCS system. +Group: System Environment/Base +Requires: slurm nrt +BuildRequires: nrt +%description percs +SLURM plugins to run on an IBM PERCS system, POE interface and NRT switch plugin. +%endif + + %if %{slurm_with sgijob} %package proctrack-sgi-job Summary: SLURM process tracking plugin for SGI job containers. @@ -484,8 +496,6 @@ test -f $RPM_BUILD_ROOT/etc/init.d/slurm && echo /etc/init.d/slurm >> $LIST test -f $RPM_BUILD_ROOT/%{_bindir}/sview && echo %{_bindir}/sview >> $LIST -test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_nrt.so && - echo %{_libdir}/slurm/switch_nrt.so >> $LIST %if %{slurm_with aix} install -D -m644 etc/federation.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/federation.conf.example @@ -515,6 +525,14 @@ test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/proctrack_aix.so && test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_federation.so && echo %{_libdir}/slurm/switch_federation.so >> $LIST +LIST=./percs.files +touch $LIST +test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_nrt.so && + echo %{_libdir}/slurm/switch_nrt.so >> $LIST +test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/libpermapi.so && + echo %{_libdir}/slurm/libpermapi.so >> $LIST + + LIST=./slurmdbd.files touch $LIST test -f $RPM_BUILD_ROOT/etc/init.d/slurm && @@ -784,6 +802,12 @@ rm -rf $RPM_BUILD_ROOT %endif ############################################################################# +%if %{slurm_with percs} +%files -f percs.files percs +%defattr(-,root,root) +%endif +############################################################################# + %if %{slurm_with sgijob} %files proctrack-sgi-job %defattr(-,root,root) -- GitLab From 7e6205a68c1c9b6287670bc62608bf4f95c508cd Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 7 Feb 2012 14:30:42 -0800 Subject: [PATCH 043/614] PERSC - return 0 instead of -1 as default --- src/plugins/switch/nrt/shr_64.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/shr_64.c b/src/plugins/switch/nrt/shr_64.c index bb5bad5cbf..ce7a9cce6b 100644 --- a/src/plugins/switch/nrt/shr_64.c +++ b/src/plugins/switch/nrt/shr_64.c @@ -70,7 +70,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { - return -1; + return 0; } /* Releases the resource manager handle, closes the socket that is @@ -95,7 +95,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { - return -1; + return 0; } /* This resource management interface is called to return job event @@ -159,7 +159,7 @@ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, int rm_timeout, char ** error_msg) { - return -1; + return 0; } /* The pe_rm_get_job_info function is called to return job @@ -194,7 +194,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char ** error_msg) { - return -1; + return 0; } /* The handle to the resource manager is returned to the calling @@ -259,7 +259,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg); { - return -1; + return 0; } /* Used to inform the resource manager that a checkpoint is in @@ -281,7 +281,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { - return -1; + return 0; } /* This function is used to submit an interactive job to the resource @@ -301,6 +301,6 @@ extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, char** error_msg) { - return -1; + return 0; } -- GitLab From 33e450a40cbf8ec91e5aa2806f4acd25337dce22 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 7 Feb 2012 14:34:36 -0800 Subject: [PATCH 044/614] PERSC - fix indent --- auxdir/x_ac_nrt.m4 | 16 ++++++++-------- configure | 14 +++++++------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index bbedfd1712..0f85c17475 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -16,16 +16,16 @@ AC_DEFUN([X_AC_NRT], [ - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi - AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Specify path to libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) + AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Specify path to libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) - AC_MSG_CHECKING([whether to enable IBM NRT support]) - for nrt_dir in $nrt_default_dirs; do + AC_MSG_CHECKING([whether to enable IBM NRT support]) + for nrt_dir in $nrt_default_dirs; do # skip dirs that don't exist if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then continue; diff --git a/configure b/configure index cfe03da9d8..8907a4441c 100755 --- a/configure +++ b/configure @@ -21261,11 +21261,11 @@ fi - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi + if test "$OBJECT_MODE" = "64"; then + nrt_default_dirs="/usr/lib64" + else + nrt_default_dirs="/usr/lib" + fi # Check whether --with-libnrt was given. @@ -21274,9 +21274,9 @@ if test "${with_libnrt+set}" = set; then : fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 $as_echo_n "checking whether to enable IBM NRT support... " >&6; } - for nrt_dir in $nrt_default_dirs; do + for nrt_dir in $nrt_default_dirs; do # skip dirs that don't exist if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then continue; -- GitLab From 0f0009f2a90c092779416a9391e9d69fb61a4fd3 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 8 Feb 2012 11:36:48 -0800 Subject: [PATCH 045/614] Fixes to make things compile --- src/plugins/switch/nrt/shr_64.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/shr_64.c b/src/plugins/switch/nrt/shr_64.c index ce7a9cce6b..dbc35e545f 100644 --- a/src/plugins/switch/nrt/shr_64.c +++ b/src/plugins/switch/nrt/shr_64.c @@ -35,15 +35,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#include + #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "src/common/xmalloc.h" #include "src/common/list.h" #include "src/common/hostlist.h" -#include +//#include -#include /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task @@ -257,7 +258,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, * integer less than 0 - FAILURE */ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, - char** error_msg); + char** error_msg) { return 0; } -- GitLab From f6976ea0bd7708381970a28804a3c5f9c3ee2cb8 Mon Sep 17 00:00:00 2001 From: jette Date: Wed, 8 Feb 2012 11:40:51 -0800 Subject: [PATCH 046/614] Gracefully handle job request with no --network option --- src/plugins/switch/nrt/switch_nrt.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 921a810503..5ab6e625b0 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -397,6 +397,8 @@ static char *_adapter_name_check(char *network) regmatch_t pmatch[5]; char *name; + if (!network) + return NULL; if (regcomp(&re, pattern, REG_EXTENDED) != 0) { error("sockname regex compilation failed"); return NULL; @@ -427,12 +429,16 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, #else debug3("network = \"%s\"", network); #endif - if (strstr(network, "ip") || strstr(network, "IP")) { + if (network && (strstr(network, "ip") || strstr(network, "IP"))) { debug2("NRT: \"ip\" found in network string, " "no network tables allocated"); return SLURM_SUCCESS; } else { - if (strstr(network, "sn_all") || strstr(network, "SN_ALL")) { + if (!network) { + /* default to sn_all */ + sn_all = true; + } else if (strstr(network, "sn_all") || + strstr(network, "SN_ALL")) { debug3("Found sn_all in network string"); sn_all = true; } else if (strstr(network, "sn_single") || @@ -454,8 +460,9 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, for (i = 0; i < hostlist_count(list); i++) nprocs += tasks_per_node[i]; - if (strstr(network, "bulk_xfer") || - strstr(network, "BULK_XFER")) + if (network && + (strstr(network, "bulk_xfer") || + strstr(network, "BULK_XFER"))) bulk_xfer = 1; err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, nprocs, sn_all, adapter_name, -- GitLab From bef0cf4f7a7db6c2aef2cbfa543b5b09a51acaa5 Mon Sep 17 00:00:00 2001 From: jette Date: Wed, 8 Feb 2012 11:45:38 -0800 Subject: [PATCH 047/614] Eliminate duplicate typedef --- src/plugins/switch/nrt/nrt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e9c0df56fa..8045c602df 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -101,13 +101,13 @@ typedef struct slurm_nrt_adapter { slurm_nrt_window_t *window_list; } slurm_nrt_adapter_t; -typedef struct slurm_nrt_nodeinfo { +struct slurm_nrt_nodeinfo { uint32_t magic; char name[NRT_HOSTLEN]; uint32_t adapter_count; struct slurm_nrt_adapter *adapter_list; struct slurm_nrt_nodeinfo *next; -} slurm_nrt_nodeinfo_t; +}; struct slurm_nrt_libstate { uint32_t magic; -- GitLab From f54fd51bf829390bfd6ebefceab2012dc2795b95 Mon Sep 17 00:00:00 2001 From: jette Date: Wed, 8 Feb 2012 11:46:31 -0800 Subject: [PATCH 048/614] Fix NRT job key generation logic --- src/plugins/switch/nrt/nrt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 8045c602df..1a8000f125 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1126,6 +1126,7 @@ _next_key(void) assert(nrt_state); _lock(); + key = nrt_state->key_index; if (key == 0) key++; nrt_state->key_index = key + 1; -- GitLab From 0e648ade13f4a082620c396c649a05bd1226b7ef Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 8 Feb 2012 11:50:45 -0800 Subject: [PATCH 049/614] add nrtlib dir to the nrtflags --- auxdir/x_ac_nrt.m4 | 2 +- configure | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index 0f85c17475..344e5f1424 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -33,7 +33,7 @@ AC_DEFUN([X_AC_NRT], # search for required NRT API libraries if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" - NRT_LDFLAGS="-lnrt" + NRT_LDFLAGS="-L$nrt_dir -lnrt" break; fi diff --git a/configure b/configure index 8907a4441c..69dfbfe29b 100755 --- a/configure +++ b/configure @@ -21284,7 +21284,7 @@ $as_echo_n "checking whether to enable IBM NRT support... " >&6; } # search for required NRT API libraries if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" - NRT_LDFLAGS="-lnrt" + NRT_LDFLAGS="-L$nrt_dir -lnrt" break; fi -- GitLab From 5b14b2faf9f4d66194bd8b8c1335a81fc694826a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 8 Feb 2012 12:45:01 -0800 Subject: [PATCH 050/614] Add NRT struct memory for query adapter types --- src/plugins/switch/nrt/nrt.c | 38 ++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 1a8000f125..6e5744c1e3 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -718,12 +718,16 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) { int err, i, j, k, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; + unsigned int num_adapter_types; + nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; nrt_cmd_status_adapter_t adapter_status; #if NRT_DEBUG info("nrt_build_nodeinfo: begin"); #endif + adapter_types.num_adapter_types = &num_adapter_types; + adapter_types.adapter_types = adapter_type; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, &adapter_types); if (err != NRT_SUCCESS) { @@ -731,8 +735,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) return SLURM_ERROR; } - for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { - adapter_names.adapter_type = adapter_types.adapter_types[i]; + for (i = 0; i < num_adapter_types; i++) { + adapter_names.adapter_type = adapter_type[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -1400,6 +1404,8 @@ nrt_clear_node_state(void) { int err, i, j, k, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; + unsigned int num_adapter_types; + nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_cmd_clean_window_t clean_window; @@ -1407,6 +1413,8 @@ nrt_clear_node_state(void) #if NRT_DEBUG info("nrt_clear_node_state: begin"); #endif + adapter_types.num_adapter_types = &num_adapter_types; + adapter_types.adapter_types = adapter_type; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, &adapter_types); if (err != NRT_SUCCESS) { @@ -1414,8 +1422,8 @@ nrt_clear_node_state(void) return SLURM_ERROR; } - for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { - adapter_names.adapter_type = adapter_types.adapter_types[i]; + for (i = 0; i < num_adapter_types; i++) { + adapter_names.adapter_type = adapter_type[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -1688,11 +1696,15 @@ _fill_in_adapter_cache(void) { int err, i, j, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; + unsigned int num_adapter_types; + nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; #if NRT_DEBUG info("_fill_in_adapter_cache: begin"); #endif + adapter_types.num_adapter_types = &num_adapter_types; + adapter_types.adapter_types = adapter_type; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, &adapter_types); if (err != NRT_SUCCESS) { @@ -1700,12 +1712,11 @@ _fill_in_adapter_cache(void) return SLURM_ERROR; } - for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { + for (i = 0; i < num_adapter_types; i++) { #if NRT_DEBUG - info("adapter_type[%d]: %u", - i, adapter_types.adapter_types[i]); + info("adapter_type[%d]: %u", i, adapter_type[i]); #endif - adapter_names.adapter_type = adapter_types.adapter_types[i]; + adapter_names.adapter_type = adapter_type[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -2879,6 +2890,8 @@ extern int nrt_clear_node_state(void) { int err, i, j, k, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; + unsigned int num_adapter_types; + nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_cmd_clean_window_t clean_window; @@ -2886,6 +2899,8 @@ extern int nrt_clear_node_state(void) #if NRT_DEBUG info("nrt_clear_node_state: begin"); #endif + adapter_types.num_adapter_types = &num_adapter_types; + adapter_types.adapter_types = adapter_type; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, &adapter_types); if (err != NRT_SUCCESS) { @@ -2893,12 +2908,11 @@ extern int nrt_clear_node_state(void) return SLURM_ERROR; } - for (i = 0; i < adapter_types.num_adapter_types[0]; i++) { + for (i = 0; i < num_adapter_types; i++) { #if NRT_DEBUG - info("adapter_type[%d]: %u", - i, adapter_types.adapter_types[i]); + info("adapter_type[%d]: %u", i, adapter_type[i]); #endif - adapter_names.adapter_type = adapter_types.adapter_types[i]; + adapter_names.adapter_type = adapter_type[i]; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { -- GitLab From b83409525aff072ec8b2d3b7734338868ad14b2a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 8 Feb 2012 13:02:29 -0800 Subject: [PATCH 051/614] Flesh out nrt_cmd_query_adapter_names_t struct --- src/plugins/switch/nrt/nrt.c | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6e5744c1e3..2083ae29a3 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -721,6 +721,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) unsigned int num_adapter_types; nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; #if NRT_DEBUG @@ -737,6 +738,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; + adapter_names.num_adapter_names = &num_adapter_names; + adapter_names.max_windows = &max_windows; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -745,7 +748,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) rc = SLURM_ERROR; continue; } - for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { + for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; adapter_status.adapter_name = adapter_names. adapter_names[j]; @@ -1407,6 +1410,7 @@ nrt_clear_node_state(void) unsigned int num_adapter_types; nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_cmd_clean_window_t clean_window; @@ -1424,6 +1428,8 @@ nrt_clear_node_state(void) for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; + adapter_names.num_adapter_names = &num_adapter_names; + adapter_names.max_windows = &max_windows; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -1432,7 +1438,7 @@ nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } - for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { + for (j = 0; j < num_adapter_names; j++) { adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. @@ -1699,6 +1705,7 @@ _fill_in_adapter_cache(void) unsigned int num_adapter_types; nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; #if NRT_DEBUG info("_fill_in_adapter_cache: begin"); @@ -1717,6 +1724,8 @@ _fill_in_adapter_cache(void) info("adapter_type[%d]: %u", i, adapter_type[i]); #endif adapter_names.adapter_type = adapter_type[i]; + adapter_names.num_adapter_names = &num_adapter_names; + adapter_names.max_windows = &max_windows; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -1725,7 +1734,7 @@ _fill_in_adapter_cache(void) rc = SLURM_ERROR; continue; } - for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { + for (j = 0; j < num_adapter_names; j++) { #if NRT_DEBUG info("adapter_names[%d]: %s", j, adapter_names.adapter_names[j]); @@ -2893,6 +2902,7 @@ extern int nrt_clear_node_state(void) unsigned int num_adapter_types; nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_cmd_clean_window_t clean_window; @@ -2913,6 +2923,8 @@ extern int nrt_clear_node_state(void) info("adapter_type[%d]: %u", i, adapter_type[i]); #endif adapter_names.adapter_type = adapter_type[i]; + adapter_names.num_adapter_names = &num_adapter_names; + adapter_names.max_windows = &max_windows; err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { @@ -2921,7 +2933,7 @@ extern int nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } - for (j = 0; j < adapter_names.num_adapter_names[0]; j++) { + for (j = 0; j < num_adapter_names[0]; j++) { #if NRT_DEBUG info("adapter_names[%d]: %s", j, adapter_names.adapter_names[j]); -- GitLab From 18b510dedf9dd92b583afb65c5731d1ec7a742b8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 8 Feb 2012 13:37:02 -0800 Subject: [PATCH 052/614] Fix nrt_cmd_status_adapter_t struct --- src/plugins/switch/nrt/nrt.c | 58 +++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2083ae29a3..8d0ac5623f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -723,6 +723,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; + nrt_status_t *status_array = NULL; + nrt_window_id_t window_count; #if NRT_DEBUG info("nrt_build_nodeinfo: begin"); @@ -748,12 +750,15 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) rc = SLURM_ERROR; continue; } + status_array = xmalloc(sizeof(nrt_status_t) * max_windows); for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; + adapter_status.status_array = &status_array; + adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { @@ -777,7 +782,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) xmalloc(sizeof(slurm_nrt_window_t) * adapter_ptr->window_count); n->adapter_count++; - for (k = 0; k < adapter_status.window_count[0]; k++) { + for (k = 0; k < window_count; k++) { slurm_nrt_window_t *window_ptr; window_ptr = adapter_ptr->window_list + k; window_ptr->window_id = adapter_status. @@ -791,6 +796,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) client_pid; } } + xfree(status_array); } #if NRT_DEBUG _print_nodeinfo(n); @@ -1412,6 +1418,8 @@ nrt_clear_node_state(void) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; + nrt_window_id_t window_count; + nrt_status_t *status_array = NULL; nrt_cmd_clean_window_t clean_window; #if NRT_DEBUG @@ -1438,11 +1446,14 @@ nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } + status_array = xmalloc(sizeof(nrt_status_t) * max_windows); for (j = 0; j < num_adapter_names; j++) { adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; + adapter_status.status_array = &status_array; + adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { @@ -1454,7 +1465,7 @@ nrt_clear_node_state(void) continue; } - for (k = 0; k < adapter_status.window_count[0]; k++) { + for (k = 0; k < window_count; k++) { clean_window.adapter_name = adapter_names. adapter_names[i]; clean_window.adapter_type = adapter_names. @@ -1484,6 +1495,7 @@ nrt_clear_node_state(void) #endif } } + xfree(status_array); } #if NRT_DEBUG info("nrt_clear_node_state: complete: %d", rc); @@ -2447,14 +2459,20 @@ nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) */ static int _wait_for_window_unloaded(char *adapter_name, int adapter_type, - nrt_window_id_t window_id, int retry) + nrt_window_id_t window_id, int retry, + unsigned int max_windows) { int err, i, j; nrt_cmd_status_adapter_t status_adapter; + nrt_status_t *status_array = NULL; + nrt_window_id_t window_count; nrt_status_t *status = NULL; + status_array = xmalloc(sizeof(nrt_status_t) * max_windows); status_adapter.adapter_name = adapter_name; status_adapter.adapter_type = adapter_type; + adapter_status.status_array = &status_array; + adapter_status.window_count = &window_count; for (i = 0; i < retry; i++) { if (i > 0) sleep(1); @@ -2464,22 +2482,22 @@ _wait_for_window_unloaded(char *adapter_name, int adapter_type, if (err != NRT_SUCCESS) { error("nrt_status_adapter(%s, %d): %s", adapter_name, (int) adapter_type, nrt_err_str(err)); - return SLURM_ERROR; + break; } #if NRT_DEBUG info("_wait_for_window_unloaded"); _print_adapter_status(&status_adapter); #endif - for (j = 0; j < *status_adapter.window_count; j++) { + for (j = 0; j < window_count; j++) { status = status_adapter.status_array[j]; if (status->window_id == window_id) break; } - if (j >= *status_adapter.window_count) { + if (j >= window_count) { error("nrt_status_adapter(%s, %hu), window %hu not " "found", adapter_name, (int)adapter_type, window_id); - return SLURM_ERROR; + break; } if (status->state == NRT_WIN_AVAILABLE) return SLURM_SUCCESS; @@ -2487,6 +2505,7 @@ _wait_for_window_unloaded(char *adapter_name, int adapter_type, adapter_name, (int) adapter_type, window_id, _win_state_str(status->state)); } + xfree(status_array); return SLURM_ERROR; } @@ -2505,7 +2524,21 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) int err, i, rc = SLURM_SUCCESS; int retry = 15; nrt_window_id_t window_id; + nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; + adapter_names.adapter_type = tableinfo->adapter_type; + adapter_names.max_windows = &max_windows; + adapter_names.num_adapter_names = &num_adapter_names; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + max_windows = 16; /* FIXME: What should this be? */ + } + for (i = 0; i < tableinfo->table_length; i++) { if (tableinfo->adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; @@ -2523,14 +2556,13 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) } err = _wait_for_window_unloaded(tableinfo->adapter_name, tableinfo->adapter_type, - window_id, retry); + window_id, retry, max_windows); if (err != SLURM_SUCCESS) { error("Window %hu adapter %s did not " "become free within %d seconds", window_id, tableinfo->adapter_name, retry); rc = err; } - } return rc; @@ -2904,6 +2936,8 @@ extern int nrt_clear_node_state(void) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; + nrt_status_t *status_array = NULL; + nrt_window_id_t window_count; nrt_cmd_clean_window_t clean_window; #if NRT_DEBUG @@ -2933,6 +2967,7 @@ extern int nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } + status_array = xmalloc(sizeof(nrt_status_t) * max_windows); for (j = 0; j < num_adapter_names[0]; j++) { #if NRT_DEBUG info("adapter_names[%d]: %s", @@ -2942,6 +2977,8 @@ extern int nrt_clear_node_state(void) adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; + adapter_status.status_array = &status_array; + adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { @@ -2953,7 +2990,7 @@ extern int nrt_clear_node_state(void) continue; } - for (k = 0; k < adapter_status.window_count[0]; k++) { + for (k = 0; k < window_count; k++) { #if NRT_DEBUG info("window_id[%d]: %u", k, adapter_status.status_array[k]-> @@ -2981,6 +3018,7 @@ extern int nrt_clear_node_state(void) } } } + xfree(status_array); } #if NRT_DEBUG info("nrt_clear_node_state: complete: %d", rc); -- GitLab From 6a3ca4cd40982fe5c175bd9acda4bbbfb7477757 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 8 Feb 2012 13:54:11 -0800 Subject: [PATCH 053/614] Remove memory free that shouldn't be there --- src/plugins/switch/nrt/nrt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 8d0ac5623f..09383bc4d2 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1050,7 +1050,6 @@ copy_node: /* Only copy the node_info structure if the caller wants it */ if ((n != NULL) && (_copy_node(n, tmp_n) != SLURM_SUCCESS)) rc = SLURM_ERROR; - nrt_free_nodeinfo(tmp_n, false); return rc; unpack_error: -- GitLab From f765ce64df0139c6aae4664928876fc41c60080e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 8 Feb 2012 14:45:39 -0800 Subject: [PATCH 054/614] Move shr_64 to it's own dir --- configure | 3 +- configure.ac | 1 + src/plugins/switch/nrt/Makefile.am | 11 +- src/plugins/switch/nrt/Makefile.in | 236 +++++-- src/plugins/switch/nrt/libpermapi/Makefile.am | 16 + src/plugins/switch/nrt/libpermapi/Makefile.in | 655 ++++++++++++++++++ .../switch/nrt/{ => libpermapi}/shr_64.c | 0 7 files changed, 866 insertions(+), 56 deletions(-) create mode 100644 src/plugins/switch/nrt/libpermapi/Makefile.am create mode 100644 src/plugins/switch/nrt/libpermapi/Makefile.in rename src/plugins/switch/nrt/{ => libpermapi}/shr_64.c (100%) diff --git a/configure b/configure index 69dfbfe29b..ba022728ee 100755 --- a/configure +++ b/configure @@ -22224,7 +22224,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -23633,6 +23633,7 @@ do "src/plugins/switch/federation/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/federation/Makefile" ;; "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; "src/plugins/switch/nrt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/Makefile" ;; + "src/plugins/switch/nrt/libpermapi/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/libpermapi/Makefile" ;; "src/plugins/mpi/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/Makefile" ;; "src/plugins/mpi/mpich1_p4/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_p4/Makefile" ;; "src/plugins/mpi/mpich1_shmem/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/mpi/mpich1_shmem/Makefile" ;; diff --git a/configure.ac b/configure.ac index db3703d3c3..cdadcbe585 100644 --- a/configure.ac +++ b/configure.ac @@ -525,6 +525,7 @@ AC_CONFIG_FILES([Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile + src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 1a97c68418..56e95a9224 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -7,7 +7,6 @@ PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -convenience_libs = $(top_builddir)/src/api/libslurm.o -ldl SWITCH_NRT_LA_SOURCES = \ nrt.c \ @@ -16,12 +15,14 @@ SWITCH_NRT_LA_SOURCES = \ switch_nrt.c if HAVE_NRT -pkglib_LTLIBRARIES = switch_nrt.la libpermapi.la + +SUBDIRS = libpermapi + +pkglib_LTLIBRARIES = switch_nrt.la + switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) -libpermapi_la_SOURCES = shr_64.c -libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ - $(convenience_libs) -lpthread + else pkglib_LTLIBRARIES = EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 6fafb78042..7962ca13c8 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -107,14 +107,6 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) -libpermapi_la_LIBADD = -am__libpermapi_la_SOURCES_DIST = shr_64.c -@HAVE_NRT_TRUE@am_libpermapi_la_OBJECTS = shr_64.lo -libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) -libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libpermapi_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_NRT_TRUE@am_libpermapi_la_rpath = -rpath $(pkglibdir) switch_nrt_la_LIBADD = am__switch_nrt_la_SOURCES_DIST = nrt.c nrt_keys.h slurm_nrt.h \ switch_nrt.c @@ -140,14 +132,50 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = $(libpermapi_la_SOURCES) $(switch_nrt_la_SOURCES) \ - $(EXTRA_switch_nrt_la_SOURCES) -DIST_SOURCES = $(am__libpermapi_la_SOURCES_DIST) \ - $(am__switch_nrt_la_SOURCES_DIST) \ +SOURCES = $(switch_nrt_la_SOURCES) $(EXTRA_switch_nrt_la_SOURCES) +DIST_SOURCES = $(am__switch_nrt_la_SOURCES_DIST) \ $(am__EXTRA_switch_nrt_la_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = libpermapi DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -353,23 +381,19 @@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -convenience_libs = $(top_builddir)/src/api/libslurm.o -ldl SWITCH_NRT_LA_SOURCES = \ nrt.c \ nrt_keys.h \ slurm_nrt.h \ switch_nrt.c +@HAVE_NRT_TRUE@SUBDIRS = libpermapi @HAVE_NRT_FALSE@pkglib_LTLIBRARIES = -@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la libpermapi.la +@HAVE_NRT_TRUE@pkglib_LTLIBRARIES = switch_nrt.la @HAVE_NRT_TRUE@switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) @HAVE_NRT_TRUE@switch_nrt_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(NRT_LDFLAGS) -@HAVE_NRT_TRUE@libpermapi_la_SOURCES = shr_64.c -@HAVE_NRT_TRUE@libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ -@HAVE_NRT_TRUE@ $(convenience_libs) -lpthread - @HAVE_NRT_FALSE@EXTRA_switch_nrt_la_SOURCES = $(SWITCH_NRT_LA_SOURCES) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -434,8 +458,6 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpermapi.la: $(libpermapi_la_OBJECTS) $(libpermapi_la_DEPENDENCIES) - $(libpermapi_la_LINK) $(am_libpermapi_la_rpath) $(libpermapi_la_OBJECTS) $(libpermapi_la_LIBADD) $(LIBS) switch_nrt.la: $(switch_nrt_la_OBJECTS) $(switch_nrt_la_DEPENDENCIES) $(switch_nrt_la_LINK) $(am_switch_nrt_la_rpath) $(switch_nrt_la_OBJECTS) $(switch_nrt_la_LIBADD) $(LIBS) @@ -446,7 +468,6 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nrt.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch_nrt.Plo@am__quote@ .c.o: @@ -476,6 +497,76 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -486,10 +577,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -508,7 +612,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -558,22 +662,51 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(LTLIBRARIES) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(pkglibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -590,81 +723,83 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-pkglibLTLIBRARIES -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-pkglibLTLIBRARIES -.MAKE: install-am install-strip +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + clean-pkglibLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -672,10 +807,11 @@ uninstall-am: uninstall-pkglibLTLIBRARIES install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-pkglibLTLIBRARIES \ install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + tags tags-recursive uninstall uninstall-am \ + uninstall-pkglibLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am new file mode 100644 index 0000000000..cab6b872bf --- /dev/null +++ b/src/plugins/switch/nrt/libpermapi/Makefile.am @@ -0,0 +1,16 @@ +# Makefile.am for libpermapi for poe to interface with + +AUTOMAKE_OPTIONS = foreign +CLEANFILES = core.* + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +# making a .la + +pkglib_LTLIBRARIES = libpermapi.la + +libpermapi_la_SOURCES = shr_64.c +libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ + $(top_builddir)/src/api/libslurm.o -ldl -lpthread diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in new file mode 100644 index 0000000000..677438fa43 --- /dev/null +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -0,0 +1,655 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile.am for libpermapi for poe to interface with + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/switch/nrt/libpermapi +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_elan.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_federation.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +libpermapi_la_LIBADD = +am_libpermapi_la_OBJECTS = shr_64.lo +libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) +libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libpermapi_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libpermapi_la_SOURCES) +DIST_SOURCES = $(libpermapi_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ELAN_LIBS = @ELAN_LIBS@ +EXEEXT = @EXEEXT@ +FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_ELAN = @HAVE_ELAN@ +HAVE_FEDERATION = @HAVE_FEDERATION@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +CLEANFILES = core.* +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +# making a .la +pkglib_LTLIBRARIES = libpermapi.la +libpermapi_la_SOURCES = shr_64.c +libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ + $(top_builddir)/src/api/libslurm.o -ldl -lpthread + +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/switch/nrt/libpermapi/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/switch/nrt/libpermapi/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libpermapi.la: $(libpermapi_la_OBJECTS) $(libpermapi_la_DEPENDENCIES) + $(libpermapi_la_LINK) -rpath $(pkglibdir) $(libpermapi_la_OBJECTS) $(libpermapi_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/switch/nrt/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c similarity index 100% rename from src/plugins/switch/nrt/shr_64.c rename to src/plugins/switch/nrt/libpermapi/shr_64.c -- GitLab From 1f3f9b0036aed3533dca668b52fa7dec600ca66e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 8 Feb 2012 14:47:02 -0800 Subject: [PATCH 055/614] Get it so we can include both the permapi.h and slurm.h in the same file --- slurm/slurm.h.in | 20 ++++++++++++++++---- src/plugins/switch/nrt/libpermapi/shr_64.c | 3 +-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index e34b4e586c..5cc47a0cc9 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1117,12 +1117,24 @@ typedef struct job_info { uint32_t wait4switch; /* Maximum time to wait for minimum switches */ char *wckey; /* wckey for job */ char *work_dir; /* pathname of working directory */ -} job_info_t; +} slurm_job_info_t; + +#ifndef __PERMAPI__H__ +/* If on an IBM PERCS machine the libpermapi.so file we generate in + * the switch/nrt plugin will need to link to this file and the + * permapi.h file which both have a job_info_t structure defined in + * it. So to avoid conflict only define job_info_t if we haven't + * included that file first. Then when in the libpermapi environment + * we can use slurm_job_info_t to access the job_info_t data. If not + * in that environment we should never know anything changed. + */ +typedef slurm_job_info_t job_info_t; +#endif typedef struct job_info_msg { time_t last_update; /* time of latest info */ uint32_t record_count; /* number of records */ - job_info_t *job_array; /* the job records */ + slurm_job_info_t *job_array; /* the job records */ } job_info_msg_t; typedef struct step_update_request_msg { @@ -2645,7 +2657,7 @@ extern int slurm_pid2jobid PARAMS((pid_t job_pid, uint32_t * job_id_ptr)); * IN job_ptr - an individual job information record pointer * IN one_liner - print as a single line if true */ -extern void slurm_print_job_info PARAMS((FILE*, job_info_t * job_ptr, +extern void slurm_print_job_info PARAMS((FILE*, slurm_job_info_t * job_ptr, int one_liner)); /* @@ -2666,7 +2678,7 @@ extern void slurm_print_job_info_msg PARAMS( * RET out - char * containing formatted output (must be freed after call) * NULL is returned on failure. */ -extern char *slurm_sprint_job_info PARAMS((job_info_t * job_ptr, +extern char *slurm_sprint_job_info PARAMS((slurm_job_info_t * job_ptr, int one_liner)); /* diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index dbc35e545f..8619fb8598 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -43,8 +43,7 @@ #include "src/common/xmalloc.h" #include "src/common/list.h" #include "src/common/hostlist.h" -//#include - +#include /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task -- GitLab From 74b7828d5307b619ca0f71bd3f6f551998f87387 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 8 Feb 2012 14:47:16 -0800 Subject: [PATCH 056/614] print out when we are in each function --- src/plugins/switch/nrt/libpermapi/shr_64.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 8619fb8598..c5aa1a1992 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -70,6 +70,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { + info("got pr_rm_connect called"); return 0; } @@ -81,6 +82,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, */ extern void pe_rm_free(rmhandle_t *resource_mgr) { + info("got pr_rm_free called"); } @@ -95,6 +97,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { + info("got pr_rm_free_event called"); return 0; } @@ -159,6 +162,7 @@ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, int rm_timeout, char ** error_msg) { + info("got pr_rm_get_event called"); return 0; } @@ -194,6 +198,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char ** error_msg) { + info("got pr_rm_get_job_info called"); return 0; } @@ -259,6 +264,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg) { + info("got pr_rm_init called"); return 0; } @@ -281,6 +287,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { + info("got pr_rm_send_event called"); return 0; } @@ -301,6 +308,7 @@ extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, char** error_msg) { + info("got pr_rm_submit_job called"); return 0; } -- GitLab From faaf5d74240451612c47205e1702717c42ed572f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 12:21:27 -0800 Subject: [PATCH 057/614] Use node state cache to get switch type info --- src/plugins/switch/nrt/nrt.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 09383bc4d2..b8ea416b87 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1168,8 +1168,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, int full_node_cnt; int min_procs_per_node; int max_procs_per_node; -/* FIXME: where can we load this from? */ - nrt_adapter_t adapter_type = NRT_HFI; + nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; int table_rec_len = 0; assert(jp); @@ -1184,24 +1183,26 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, hi = hostlist_iterator_create(hl); + /* + * Peek at the first host to figure out tables_per_task and adapter + * type. This driver assumes that all nodes have the same number of + * adapters per node. Bad things will happen if this assumption is + * incorrect. + */ + host = hostlist_next(hi); + _lock(); + node = _find_node(nrt_state, host); if (sn_all) { - /* - * Peek at the first host to figure out tables_per_task. - * This driver assumes that all nodes have the same number - * of adapters per node. Bad things will happen if this - * assumption is incorrect. - */ - host = hostlist_next(hi); - _lock(); - node = _find_node(nrt_state, host); jp->tables_per_task = node ? node->adapter_count : 0; - _unlock(); - if (host != NULL) - free(host); - hostlist_iterator_reset(hi); } else { jp->tables_per_task = 1; } + if (node && node->adapter_list) + adapter_type = node->adapter_list->adapter_type; + _unlock(); + if (host != NULL) + free(host); + hostlist_iterator_reset(hi); /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * -- GitLab From ddae51535afa87404b6431fb1b7af01185de8f33 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 12:34:53 -0800 Subject: [PATCH 058/614] Update nrt_slurmd_step_init() logic --- src/plugins/switch/nrt/nrt.c | 186 ++++++++++++++++------------------- 1 file changed, 86 insertions(+), 100 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b8ea416b87..c058fb9fbc 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -135,6 +135,15 @@ struct slurm_nrt_jobinfo { uint32_t num_tasks; }; +typedef struct { + char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; + nrt_adapter_t adapter_type; +} nrt_cache_entry_t; + +static int lid_cache_size = 0; +static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; + + /* Local functions */ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, @@ -149,6 +158,7 @@ static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); static int _fake_unpack_adapters(Buf buf); +static int _fill_in_adapter_cache(void); static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); static int _get_adapters(slurm_nrt_nodeinfo_t *n); @@ -156,6 +166,7 @@ static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, slurm_nrt_nodeinfo_t *node); static int _hash_index(char *name); static void _hash_rebuild(slurm_nrt_libstate_t *state); +static void _init_adapter_cache(void); static void _lock(void); static nrt_job_key_t _next_key(void); static void _unlock(void); @@ -188,6 +199,79 @@ _unlock(void) } } +/* The lid caching functions were created to avoid unnecessary + * function calls each time we need to load network tables on a node. + * _init_cache() simply initializes the cache to save values and + * needs to be called before any other cache functions are called. + * + * Used by: slurmd/slurmstepd + */ +static void +_init_adapter_cache(void) +{ + lid_cache_size = 0; +} + +/* Use nrt_adapter_resources to cache information about local adapters. + * + * Used by: slurmstepd + */ +static int +_fill_in_adapter_cache(void) +{ + int err, i, j, rc = SLURM_SUCCESS; + nrt_cmd_query_adapter_types_t adapter_types; + unsigned int num_adapter_types; + nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; + nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; + +#if NRT_DEBUG + info("_fill_in_adapter_cache: begin"); +#endif + adapter_types.num_adapter_types = &num_adapter_types; + adapter_types.adapter_types = adapter_type; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + return SLURM_ERROR; + } + + for (i = 0; i < num_adapter_types; i++) { +#if NRT_DEBUG + info("adapter_type[%d]: %u", i, adapter_type[i]); +#endif + adapter_names.adapter_type = adapter_type[i]; + adapter_names.num_adapter_names = &num_adapter_names; + adapter_names.max_windows = &max_windows; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } + for (j = 0; j < num_adapter_names; j++) { +#if NRT_DEBUG + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); +#endif + lid_cache[lid_cache_size].adapter_type = adapter_names. + adapter_type; + strncpy(lid_cache[lid_cache_size].adapter_name, + adapter_names.adapter_names[j], + NRT_MAX_ADAPTER_NAME_LEN); + lid_cache_size++; + } + } +#if NRT_DEBUG + info("_fill_in_adapter_cache: complete: %d", rc); +#endif + return rc; +} + /* The idea behind keeping the hash table was to avoid a linear * search of the node list each time we want to retrieve or * modify a node's data. The _hash_index function translates @@ -670,7 +754,8 @@ nrt_slurmd_step_init(void) nrt_umask = umask(0077); umask(nrt_umask); -/* FIXME: Should we cache NRT state information? */ + _init_adapter_cache(); + _fill_in_adapter_cache(); return SLURM_SUCCESS; } @@ -1585,11 +1670,6 @@ extern char *nrt_err_str(int rc) char* nrt_conf = NULL; -typedef struct { - char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; - uint16_t adapter_type; -} nrt_cache_entry_t; - /* * Globals */ @@ -1598,29 +1678,11 @@ typedef struct { /* slurmd/slurmstepd global variables */ hostlist_t adapter_list; uint16_t adapter_type_code = 0; -static int lid_cache_size = 0; -static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; -static int _fill_in_adapter_cache(void); static void _hash_rebuild(nrt_libstate_t *state); -static void _init_adapter_cache(void); static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, uint16_t adapter_type); -extern int -nrt_slurmd_step_init(void) -{ - /* - * This is a work-around for the nrt_* functions calling umask(0) - */ - nrt_umask = umask(0077); - umask(nrt_umask); - - _init_adapter_cache(); - _fill_in_adapter_cache(); - - return SLURM_SUCCESS; -} #if NRT_DEBUG /* Used by: slurmd */ @@ -1692,82 +1754,6 @@ _print_jobinfo(nrt_jobinfo_t *j) } #endif -/* The lid caching functions were created to avoid unnecessary - * function calls each time we need to load network tables on a node. - * _init_cache() simply initializes the cache to save values and - * needs to be called before any other cache functions are called. - * - * Used by: slurmd/slurmstepd - */ -static void -_init_adapter_cache(void) -{ - lid_cache_size = 0; -} - -/* Use nrt_adapter_resources to cache information about local adapters. - * - * Used by: slurmstepd - */ -static int -_fill_in_adapter_cache(void) -{ - int err, i, j, rc = SLURM_SUCCESS; - nrt_cmd_query_adapter_types_t adapter_types; - unsigned int num_adapter_types; - nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; - nrt_cmd_query_adapter_names_t adapter_names; - unsigned int max_windows, num_adapter_names; - -#if NRT_DEBUG - info("_fill_in_adapter_cache: begin"); -#endif - adapter_types.num_adapter_types = &num_adapter_types; - adapter_types.adapter_types = adapter_type; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, - &adapter_types); - if (err != NRT_SUCCESS) { - error("nrt_command(adapter_types): %s", nrt_err_str(err)); - return SLURM_ERROR; - } - - for (i = 0; i < num_adapter_types; i++) { -#if NRT_DEBUG - info("adapter_type[%d]: %u", i, adapter_type[i]); -#endif - adapter_names.adapter_type = adapter_type[i]; - adapter_names.num_adapter_names = &num_adapter_names; - adapter_names.max_windows = &max_windows; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, - &adapter_names); - if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); - rc = SLURM_ERROR; - continue; - } - for (j = 0; j < num_adapter_names; j++) { -#if NRT_DEBUG - info("adapter_names[%d]: %s", - j, adapter_names.adapter_names[j]); -#endif - adapter_status.adapter_name = adapter_names. - adapter_names[j]; - lid_cache[lid_cache_size].adapter_type = adapter_names. - adapter_type; - strncpy(lid_cache[lid_cache_size].adapter_name, - adapter_names.adapter_names[j], - NRT_MAX_ADAPTER_NAME_LEN); - lid_cache_size++; - } - } -#if NRT_DEBUG - info("_fill_in_adapter_cache: complete: %d", rc); -#endif - return rc; -} - - /* Cache the lid and network_id of a given adapter. Ex: sni0 with lid 10 * gets cached in array index 0 with a lid = 10 and a name = sni0. * -- GitLab From 6057300ee643134f353f69b229a173aec256920b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 12:43:46 -0800 Subject: [PATCH 059/614] Remove redundant switch/nrt logic --- src/plugins/switch/nrt/nrt.c | 131 +---------------------------------- 1 file changed, 2 insertions(+), 129 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c058fb9fbc..f8821331cd 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -812,7 +812,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_window_id_t window_count; #if NRT_DEBUG - info("nrt_build_nodeinfo: begin"); + info("_get_adapters: begin"); #endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; @@ -885,7 +885,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } #if NRT_DEBUG _print_nodeinfo(n); - info("nrt_build_nodeinfo: complete: %d", rc); + info("_get_adapters: complete: %d", rc); #endif return rc; } @@ -1891,34 +1891,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } - -/* Used by: slurmd, slurmctld */ -extern void -nrt_free_nodeinfo(nrt_nodeinfo_t *n, bool ptr_into_array) -{ - struct nrt_adapter *adapter; - int i; - - if (!n) - return; - - assert(n->magic == NRT_NODEINFO_MAGIC); - -#if NRT_DEBUG - info("_unpack_nodeinfo"); - _print_nodeinfo(n); -#endif - if (n->adapter_list) { - adapter = n->adapter_list; - for (i = 0; i < n->adapter_count; i++) { - xfree(adapter[i].window_list); - } - xfree(n->adapter_list); - } - if (!ptr_into_array) - xfree(n); -} - static nrt_window_t * _find_window(struct nrt_adapter *adapter, uint16_t window_id) { int i; @@ -2912,103 +2884,4 @@ nrt_libstate_clear(void) return SLURM_SUCCESS; } - -extern int nrt_clear_node_state(void) -{ - int err, i, j, k, rc = SLURM_SUCCESS; - nrt_cmd_query_adapter_types_t adapter_types; - unsigned int num_adapter_types; - nrt_adapter_t adapter_type[NRT_MAX_ADAPTER_TYPES]; - nrt_cmd_query_adapter_names_t adapter_names; - unsigned int max_windows, num_adapter_names; - nrt_cmd_status_adapter_t adapter_status; - nrt_status_t *status_array = NULL; - nrt_window_id_t window_count; - nrt_cmd_clean_window_t clean_window; - -#if NRT_DEBUG - info("nrt_clear_node_state: begin"); -#endif - adapter_types.num_adapter_types = &num_adapter_types; - adapter_types.adapter_types = adapter_type; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, - &adapter_types); - if (err != NRT_SUCCESS) { - error("nrt_command(adapter_types): %s", nrt_err_str(err)); - return SLURM_ERROR; - } - - for (i = 0; i < num_adapter_types; i++) { -#if NRT_DEBUG - info("adapter_type[%d]: %u", i, adapter_type[i]); -#endif - adapter_names.adapter_type = adapter_type[i]; - adapter_names.num_adapter_names = &num_adapter_names; - adapter_names.max_windows = &max_windows; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, - &adapter_names); - if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); - rc = SLURM_ERROR; - continue; - } - status_array = xmalloc(sizeof(nrt_status_t) * max_windows); - for (j = 0; j < num_adapter_names[0]; j++) { -#if NRT_DEBUG - info("adapter_names[%d]: %s", - j, adapter_names.adapter_names[j]); -#endif - adapter_status.adapter_name = adapter_names. - adapter_names[j]; - adapter_status.adapter_type = adapter_names. - adapter_type; - adapter_status.status_array = &status_array; - adapter_status.window_count = &window_count; - err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, - &adapter_status); - if (err != NRT_SUCCESS) { - error("nrt_command(clean_status, %s, %u): %s", - adapter_status.adapter_name, - adapter_status.adapter_type, - nrt_err_str(err)); - rc = SLURM_ERROR; - continue; - } - - for (k = 0; k < window_count; k++) { -#if NRT_DEBUG - info("window_id[%d]: %u", k, - adapter_status.status_array[k]-> - window_id); -#endif - clean_window.adapter_name = adapter_names. - adapter_names[i]; - clean_window.adapter_type = adapter_names. - adapter_type; - clean_window.leave_inuse_or_kill = KILL; - clean_window.window_id = adapter_status. - status_array[k]-> - window_id; - err = nrt_command(NRT_VERSION, - NRT_CMD_CLEAN_WINDOW, - &clean_window); - if (err != NRT_SUCCESS) { - error("nrt_command(clean_window, " - "%s, %u, %u): %s", - clean_window.adapter_name, - clean_window.adapter_type, - clean_window.window_id, - nrt_err_str(err)); - rc = SLURM_ERROR; - } - } - } - xfree(status_array); - } -#if NRT_DEBUG - info("nrt_clear_node_state: complete: %d", rc); -#endif - return rc; -} #endif -- GitLab From b50595ade8da16415e23a4aa11b03f924be8e9c7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 14:37:09 -0800 Subject: [PATCH 060/614] Major mods for step window alloction logic --- src/plugins/switch/nrt/nrt.c | 404 ++++++++++++++++++----------------- 1 file changed, 207 insertions(+), 197 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f8821331cd..36ed991e1e 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -95,7 +95,7 @@ typedef struct slurm_nrt_window { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; -// uint16_t lid; + uint16_t lid; /* FIXME: No information about where loaded from */ // uint64_t network_id; nrt_window_id_t window_count; slurm_nrt_window_t *window_list; @@ -159,6 +159,10 @@ static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); static int _fake_unpack_adapters(Buf buf); static int _fill_in_adapter_cache(void); +static slurm_nrt_nodeinfo_t * + _find_node(slurm_nrt_libstate_t *lp, char *name); +static slurm_nrt_window_t * + _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id); static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); static int _get_adapters(slurm_nrt_nodeinfo_t *n); @@ -167,6 +171,8 @@ static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, static int _hash_index(char *name); static void _hash_rebuild(slurm_nrt_libstate_t *state); static void _init_adapter_cache(void); +static int _job_step_window_state(slurm_nrt_jobinfo_t *jp, + hostlist_t hl, win_state_t state); static void _lock(void); static nrt_job_key_t _next_key(void); static void _unlock(void); @@ -174,6 +180,9 @@ static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); static char * _win_state_str(win_state_t state); +static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, + char *hostname, int task_id, + win_state_t state, uint16_t job_key); /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library @@ -367,6 +376,202 @@ _hash_rebuild(slurm_nrt_libstate_t *state) _hash_add_nodeinfo(state, &(state->node_list[i])); } +static slurm_nrt_window_t * +_find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id) +{ + int i; + slurm_nrt_window_t *window; + + for (i = 0; i < adapter->window_count; i++) { + window = &adapter->window_list[i]; + if (window->window_id == window_id) + return window; + } + + debug3("Unable to _find_window %hu on adapter %s", + window_id, adapter->adapter_name); + return (slurm_nrt_window_t *) NULL; +} + +/* + * Find all of the windows used by this job step and set their + * status to "state". + * + * Used by: slurmctld + */ +static int +_job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, + win_state_t state) +{ + hostlist_iterator_t hi; + char *host; + int proc_cnt; + int nprocs; + int nnodes; + int i, j; + int err, rc = SLURM_SUCCESS; + int task_cnt; + int full_node_cnt; + int min_procs_per_node; + int max_procs_per_node; + + xassert(!hostlist_is_empty(hl)); + xassert(jp); + xassert(jp->magic == NRT_JOBINFO_MAGIC); + + if ((jp == NULL) || (hostlist_is_empty(hl))) + return SLURM_ERROR; + + if ((jp->tables_per_task == 0) || (!jp->tableinfo) || + (jp->tableinfo[0].table_length == 0)) + return SLURM_SUCCESS; + + debug3("jp->tables_per_task = %d", jp->tables_per_task); + nprocs = jp->tableinfo[0].table_length; + hi = hostlist_iterator_create(hl); + + debug("Finding windows"); + nnodes = hostlist_count(hl); + full_node_cnt = nprocs % nnodes; + min_procs_per_node = nprocs / nnodes; + max_procs_per_node = (nprocs + nnodes - 1) / nnodes; + + proc_cnt = 0; + _lock(); + for (i = 0; i < nnodes; i++) { + host = hostlist_next(hi); + if (!host) + error("Failed to get next host"); + + if (i < full_node_cnt) + task_cnt = max_procs_per_node; + else + task_cnt = min_procs_per_node; + + for (j = 0; j < task_cnt; j++) { + err = _window_state_set(jp->tables_per_task, + jp->tableinfo, + host, proc_cnt, + state, jp->job_key); + rc = MAX(rc, err); + proc_cnt++; + } + free(host); + } + _unlock(); + + hostlist_iterator_destroy(hi); + return rc; +} + + +/* Find the correct NRT structs and set the state + * of the switch windows for the specified task_id. + * + * Used by: slurmctld + */ +static int +_window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, + char *hostname, int task_id, win_state_t state, + uint16_t job_key) +{ + slurm_nrt_nodeinfo_t *node = NULL; + slurm_nrt_adapter_t *adapter = NULL; + slurm_nrt_window_t *window = NULL; + int i, j; + bool adapter_found; + uint16_t win_id = 0; + + assert(tableinfo); + assert(hostname); + assert(adapter_cnt <= NRT_MAXADAPTERS); + + node = _find_node(nrt_state, hostname); + if (node == NULL) { + error("Failed to find node in node_list: %s", hostname); + return SLURM_ERROR; + } + if (node->adapter_list == NULL) { + error("Found node, but adapter_list is NULL"); + return SLURM_ERROR; + } + + for (i = 0; i < adapter_cnt; i++) { + if (tableinfo[i].table == NULL) { + error("tableinfo[%d].table is NULL", i); + return SLURM_ERROR; + } + + adapter_found = false; + /* Find the adapter that matches the one in tableinfo */ + for (j = 0; j < node->adapter_count; j++) { + adapter = &node->adapter_list[j]; + if (strcasecmp(adapter->adapter_name, + tableinfo[i].adapter_name)) + continue; + if (adapter->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = tableinfo[i].table + task_id; + if (ib_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d] is " + "NULL", i, task_id); + return SLURM_ERROR; + } + if (adapter->lid == ib_tbl_ptr->base_lid) { + adapter_found = true; + win_id = ib_tbl_ptr->win_id; + debug3("Setting status %s adapter %s " + "lid %hu window %hu for task %d", + state == NRT_WIN_UNAVAILABLE ? + "UNLOADED" : "LOADED", + adapter->adapter_name, + ib_tbl_ptr->base_lid, + ib_tbl_ptr->win_id, task_id); + break; + } + } else if (adapter->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = tableinfo[i].table + task_id; + if (hfi_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d] is " + "NULL", i, task_id); + return SLURM_ERROR; + } + if (adapter->lid == hfi_tbl_ptr->lid) { + adapter_found = true; + win_id = hfi_tbl_ptr->win_id; + debug3("Setting status %s adapter %s " + "lid %hu window %hu for task %d", + state == NRT_WIN_UNAVAILABLE ? + "UNLOADED" : "LOADED", + adapter->adapter_name, + hfi_tbl_ptr->lid, + hfi_tbl_ptr->win_id, task_id); + break; + } + } else { + fatal("_window_state_set: Missing support for " + "adapter type %hu", + adapter->adapter_type); + + } + } + if (!adapter_found) { + error("Did not find adapter %s with lid %hu ", + adapter->adapter_name, adapter->lid); + return SLURM_ERROR; + } + + window = _find_window(adapter, win_id); + if (window) { + window->state = state; + window->job_key = + (state == NRT_WIN_UNAVAILABLE) ? 0 : job_key; + } + } + + return SLURM_SUCCESS; +} /* If the node is already in the node list then simply return * a pointer to it, otherwise dynamically allocate memory to the * node list if necessary. @@ -1194,7 +1399,6 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) return SLURM_SUCCESS; } - /* Find all of the windows used by job step "jp" and mark their * state NRT_WIN_UNAVAILABLE. * @@ -1206,10 +1410,9 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) extern int nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) { - return SLURM_SUCCESS; + return _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); } - /* Assign a unique key to each job. The key is used later to * gain access to the network table loaded on each node of a job. * @@ -1891,183 +2094,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } -static nrt_window_t * -_find_window(struct nrt_adapter *adapter, uint16_t window_id) { - int i; - nrt_window_t *window; - - for (i = NRT_MIN_WIN; i < adapter->window_count; i++) { - window = &adapter->window_list[i]; - if (window->window_id == window_id) - return window; - } - - debug3("Unable to _find_window %hu on adapter %s", - window_id, adapter->adapter_name); - return (nrt_window_t *) NULL; -} - -/* Find the correct NRT structs and set the state - * of the switch windows for the specified task_id. - * - * Used by: slurmctld - */ -static int -_window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, win_state_t state, - uint16_t job_key) -{ - nrt_nodeinfo_t *node = NULL; - struct nrt_adapter *adapter = NULL; - nrt_window_t *window = NULL; - nrt_creator_per_task_input_t *table = NULL; - int i, j; - bool adapter_found; - uint16_t win_id = 0; - - assert(tableinfo); - assert(hostname); - assert(adapter_cnt <= NRT_MAXADAPTERS); - - node = _find_node(nrt_state, hostname); - if (node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - if (node->adapter_list == NULL) { - error("Found node, but adapter_list is NULL"); - return SLURM_ERROR; - } - - for (i = 0; i < adapter_cnt; i++) { - if (tableinfo[i].table == NULL) { - error("tableinfo[%d].table is NULL", i); - return SLURM_ERROR; - } - table = &tableinfo[i].table[task_id]; - if (table == NULL) { - error("tableinfo[%d].table[%d] is NULL", i, task_id); - return SLURM_ERROR; - } - - adapter_found = false; - /* Find the adapter that matches the one in tableinfo */ - for (j = 0; j < node->adapter_count; j++) { - adapter = &node->adapter_list[j]; - if (strcasecmp(adapter->adapter_name, - tableinfo[i].adapter_name)) - continue; -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (adapter->adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - ib_tbl_ptr = &table->ib_per_task; - if (adapter->lid[0] == ib_tbl_ptr->base_lid) { - adapter_found = true; - win_id = ib_tbl_ptr->win_id; - debug3("Setting status %s adapter %s " - "lid %hu window %hu for task %d", - state == NRT_WIN_UNAVAILABLE ? - "UNLOADED" : "LOADED", - adapter->adapter_name, - ib_tbl_ptr->base_lid, - ib_tbl_ptr->win_id, task_id); - break; - } - } else { - fatal("_window_state_set: Missing support for " - "adapter type %hu", - adapter->adapter_type); - - } - } - if (!adapter_found) { - error("Did not find adapter %s with lid %hu ", - adapter->adapter_name, adapter->lid[0]); - return SLURM_ERROR; - } - - window = _find_window(adapter, win_id); - if (window) { - window->state = state; - window->job_key = - (state == NRT_WIN_UNAVAILABLE) ? 0 : job_key; - } - } - - return SLURM_SUCCESS; -} - - -/* Find all of the windows used by this job step and set their - * status to "state". - * - * Used by: slurmctld - */ -static int -_job_step_window_state(nrt_jobinfo_t *jp, hostlist_t hl, win_state_t state) -{ - hostlist_iterator_t hi; - char *host; - int proc_cnt; - int nprocs; - int nnodes; - int i, j; - int err, rc = SLURM_SUCCESS; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; - - xassert(!hostlist_is_empty(hl)); - xassert(jp); - xassert(jp->magic == NRT_JOBINFO_MAGIC); - - if ((jp == NULL) || (hostlist_is_empty(hl))) - return SLURM_ERROR; - - if ((jp->tables_per_task == 0) - || (!jp->tableinfo) - || (jp->tableinfo[0].table_length == 0)) - return SLURM_SUCCESS; - - debug3("jp->tables_per_task = %d", jp->tables_per_task); - nprocs = jp->tableinfo[0].table_length; - hi = hostlist_iterator_create(hl); - - debug("Finding windows"); - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - - proc_cnt = 0; - _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if (!host) - error("Failed to get next host"); - - if (i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { - err = _window_state_set(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - state, jp->job_key); - rc = MAX(rc, err); - proc_cnt++; - } - free(host); - } - _unlock(); - - hostlist_iterator_destroy(hi); - return rc; -} - /* * For one node, free all of the windows belonging to a particular * job step (as identified by the job_key). @@ -2171,22 +2197,6 @@ nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) return SLURM_SUCCESS; } - -/* Find all of the windows used by job step "jp" and mark their - * state NRT_WIN_UNAVAILABLE. - * - * Used by the slurmctld at startup time to restore the allocation - * status of any job steps that were running at the time the previous - * slurmctld was shutdown. Also used to restore the allocation - * status after a call to switch_clear(). - */ -extern int -nrt_job_step_allocated(nrt_jobinfo_t *jp, hostlist_t hl) -{ - return _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); -} - - static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) { -- GitLab From f8dd1ebab6dfb78908c70786174dfc9e2d3bb20b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 14:50:41 -0800 Subject: [PATCH 061/614] Update nrt_job_step_complete() logic --- src/plugins/switch/nrt/nrt.c | 196 ++++++++++++++++------------------- 1 file changed, 92 insertions(+), 104 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 36ed991e1e..afe2b66ea6 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -393,6 +393,55 @@ _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id) return (slurm_nrt_window_t *) NULL; } +/* + * For one node, free all of the windows belonging to a particular + * job step (as identified by the job_key). + */ +static void +_free_windows_by_job_key(uint16_t job_key, char *node_name) +{ + slurm_nrt_nodeinfo_t *node; + slurm_nrt_adapter_t *adapter; + slurm_nrt_window_t *window; + int i, j; + + /* debug3("_free_windows_by_job_key(%hu, %s)", job_key, node_name); */ + if ((node = _find_node(nrt_state, node_name)) == NULL) + return; + + if (node->adapter_list == NULL) { + error("_free_windows_by_job_key, " + "adapter_list NULL for node %s", node_name); + return; + } + for (i = 0; i < node->adapter_count; i++) { + adapter = &node->adapter_list[i]; + if (adapter->window_list == NULL) { + error("_free_windows_by_job_key, " + "window_list NULL for node %s adapter %s", + node->name, adapter->adapter_name); + continue; + } + /* We could check here to see if this adapter's name + * is in the nrt_jobinfo tablinfo list to avoid the next + * loop if the adapter isn't in use by the job step. + * However, the added searching and string comparisons + * probably aren't worth it, especially since MOST job + * steps will use all of the adapters. + */ + for (j = 0; j < adapter->window_count; j++) { + window = &adapter->window_list[j]; + + if (window->job_key == job_key) { + /* debug3("Freeing adapter %s window %d", + adapter->name, window->id); */ + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = 0; + } + } + } +} + /* * Find all of the windows used by this job step and set their * status to "state". @@ -422,7 +471,7 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if ((jp == NULL) || (hostlist_is_empty(hl))) return SLURM_ERROR; - if ((jp->tables_per_task == 0) || (!jp->tableinfo) || + if ((jp->tables_per_task == 0) || (jp->tableinfo == NULL) || (jp->tableinfo[0].table_length == 0)) return SLURM_SUCCESS; @@ -1396,6 +1445,48 @@ nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *n, bool ptr_into_array) extern int nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) { + hostlist_t uniq_hl; + hostlist_iterator_t hi; + char *node_name; + + xassert(!hostlist_is_empty(hl)); + xassert(jp); + xassert(jp->magic == NRT_JOBINFO_MAGIC); + + if ((jp == NULL) || (hostlist_is_empty(hl))) + return SLURM_ERROR; + + if ((jp->tables_per_task == 0) || (jp->tableinfo == NULL) || + (jp->tableinfo[0].table_length == 0)) + return SLURM_SUCCESS; + + /* The hl hostlist may contain duplicate node_names (poe -hostfile + * triggers duplicates in the hostlist). Since there + * is no reason to call _free_windows_by_job_key more than once + * per node_name, we create a new unique hostlist. + */ + uniq_hl = hostlist_copy(hl); + hostlist_uniq(uniq_hl); + hi = hostlist_iterator_create(uniq_hl); + + _lock(); + if (nrt_state != NULL) { + while ((node_name = hostlist_next(hi)) != NULL) { + _free_windows_by_job_key(jp->job_key, node_name); + free(node_name); + } + } else { /* nrt_state == NULL */ + /* If there is no state at all, the job is already cleaned + * up. :) This should really only happen when the backup + * controller is calling job_fini() just before it takes over + * the role of active controller. + */ + debug("nrt_job_step_complete called when nrt_state == NULL"); + } + _unlock(); + + hostlist_iterator_destroy(hi); + hostlist_destroy(uniq_hl); return SLURM_SUCCESS; } @@ -2094,109 +2185,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } -/* - * For one node, free all of the windows belonging to a particular - * job step (as identified by the job_key). - */ -static void inline -_free_windows_by_job_key(uint16_t job_key, char *nodename) -{ - nrt_nodeinfo_t *node; - struct nrt_adapter *adapter; - nrt_window_t *window; - int i, j; - - /* debug3("_free_windows_by_job_key(%hu, %s)", job_key, nodename); */ - if ((node = _find_node(nrt_state, nodename)) == NULL) - return; - - if (node->adapter_list == NULL) { - error("_free_windows_by_job_key, " - "adapter_list NULL for node %s", nodename); - return; - } - for (i = 0; i < node->adapter_count; i++) { - adapter = &node->adapter_list[i]; - if (adapter->window_list == NULL) { - error("_free_windows_by_job_key, " - "window_list NULL for node %s adapter %s", - node->name, adapter->adapter_name); - continue; - } - /* We could check here to see if this adapter's name - * is in the nrt_jobinfo tablinfo list to avoid the next - * loop if the adapter isn't in use by the job step. - * However, the added searching and string comparisons - * probably aren't worth it, especially since MOST job - * steps will use all of the adapters. - */ - for (j = 0; j < adapter->window_count; j++) { - window = &adapter->window_list[j]; - - if (window->job_key == job_key) { - /* debug3("Freeing adapter %s window %d", - adapter->name, window->id); */ - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = 0; - } - } - } -} - -/* Find all of the windows used by job step "jp" on the hosts - * designated in hostlist "hl" and mark their state NRT_WIN_AVAILABLE. - * - * Used by: slurmctld - */ -extern int -nrt_job_step_complete(nrt_jobinfo_t *jp, hostlist_t hl) -{ - hostlist_t uniq_hl; - hostlist_iterator_t hi; - char *nodename; - - xassert(!hostlist_is_empty(hl)); - xassert(jp); - xassert(jp->magic == NRT_JOBINFO_MAGIC); - - if ((jp == NULL) || (hostlist_is_empty(hl))) - return SLURM_ERROR; - - if ((jp->tables_per_task == 0) - || !jp->tableinfo - || (jp->tableinfo[0].table_length == 0)) - return SLURM_SUCCESS; - - /* The hl hostlist may contain duplicate nodenames (poe -hostfile - * triggers duplicates in the hostlist). Since there - * is no reason to call _free_windows_by_job_key more than once - * per nodename, we create a new unique hostlist. - */ - uniq_hl = hostlist_copy(hl); - hostlist_uniq(uniq_hl); - hi = hostlist_iterator_create(uniq_hl); - - _lock(); - if (nrt_state != NULL) { - while ((nodename = hostlist_next(hi)) != NULL) { - _free_windows_by_job_key(jp->job_key, nodename); - free(nodename); - } - } else { /* nrt_state == NULL */ - /* If there is no state at all, the job is already cleaned - * up. :) This should really only happen when the backup - * controller is calling job_fini() just before it takes over - * the role of active controller. - */ - debug("nrt_job_step_complete called when nrt_state == NULL"); - } - _unlock(); - - hostlist_iterator_destroy(hi); - hostlist_destroy(uniq_hl); - return SLURM_SUCCESS; -} - static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) { -- GitLab From d86b59f2562efff26bb76735b1f130cc3ab40e5d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 15:04:08 -0800 Subject: [PATCH 062/614] Update nrt_libstate_clear() --- src/plugins/switch/nrt/nrt.c | 80 ++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 44 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index afe2b66ea6..7decd526b1 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1784,6 +1784,42 @@ nrt_libstate_restore(Buf buffer) extern int nrt_libstate_clear(void) { + int i, j, k; + slurm_nrt_nodeinfo_t *node; + slurm_nrt_adapter_t *adapter; + slurm_nrt_window_t *window; + + +#if NRT_DEBUG + info("Clearing state on all windows in global NRT state"); +#else + debug3("Clearing state on all windows in global NRT state"); +#endif + _lock(); + if (!nrt_state || !nrt_state->node_list) { + error("nrt_state or node_list not initialized!"); + _unlock(); + return SLURM_ERROR; + } + + for (i = 0; i < nrt_state->node_count; i++) { + node = &nrt_state->node_list[i]; + if (!node->adapter_list) + continue; + for (j = 0; j < node->adapter_count; j++) { + adapter = &node->adapter_list[i]; + if (!adapter || !adapter->window_list) + continue; + for (k = 0; k < adapter->window_count; k++) { + window = &adapter->window_list[k]; + if (!window) + continue; + window->state = NRT_WIN_UNAVAILABLE; + } + } + } + _unlock(); + return SLURM_SUCCESS; } @@ -2796,13 +2832,6 @@ _free_libstate(nrt_libstate_t *lp) xfree(lp); } -extern int -nrt_fini(void) -{ - xfree(nrt_conf); - return SLURM_SUCCESS; -} - /* Used by: slurmctld */ static int _pack_libstate(nrt_libstate_t *lp, Buf buffer) @@ -2845,41 +2874,4 @@ nrt_libstate_save(Buf buffer, bool free_flag) } _unlock(); } - -extern int -nrt_libstate_clear(void) -{ - int i, j, k; - struct nrt_nodeinfo *node; - struct nrt_adapter *adapter; - struct nrt_window *window; - - debug3("Clearing state on all windows in global NRT state"); - _lock(); - if (!nrt_state || !nrt_state->node_list) { - error("nrt_state or node_list not initialized!"); - _unlock(); - return SLURM_ERROR; - } - - for (i = 0; i < nrt_state->node_count; i++) { - node = &nrt_state->node_list[i]; - if (!node->adapter_list) - continue; - for (j = 0; j < node->adapter_count; j++) { - adapter = &node->adapter_list[i]; - if (!adapter || !adapter->window_list) - continue; - for (k = 0; k < adapter->window_count; k++) { - window = &adapter->window_list[k]; - if (!window) - continue; - window->state = NRT_WIN_UNAVAILABLE; - } - } - } - _unlock(); - - return SLURM_SUCCESS; -} #endif -- GitLab From 6f726c90f510d6757487600dbf587c2b6d8c1219 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 15:11:35 -0800 Subject: [PATCH 063/614] Update nrt_libstate_save() logic. --- src/plugins/switch/nrt/nrt.c | 114 +++++++++++++++++------------------ 1 file changed, 55 insertions(+), 59 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7decd526b1..b3889e7493 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -165,6 +165,7 @@ static slurm_nrt_window_t * _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id); static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); +static void _free_libstate(slurm_nrt_libstate_t *lp); static int _get_adapters(slurm_nrt_nodeinfo_t *n); static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, slurm_nrt_nodeinfo_t *node); @@ -175,6 +176,7 @@ static int _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, win_state_t state); static void _lock(void); static nrt_job_key_t _next_key(void); +static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, @@ -1722,11 +1724,63 @@ nrt_fini(void) return SLURM_SUCCESS; } +static void +_free_libstate(slurm_nrt_libstate_t *lp) +{ + int i; + + if (!lp) + return; + if (lp->node_list != NULL) { + for (i = 0; i < lp->node_count; i++) + nrt_free_nodeinfo(&lp->node_list[i], true); + xfree(lp->node_list); + } + xfree(lp->hash_table); + xfree(lp); +} + +/* Used by: slurmctld */ +static int +_pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) +{ + int offset; + int i; + + assert(lp); + assert(lp->magic == NRT_LIBSTATE_MAGIC); + +#if NRT_DEBUG + info("_pack_libstate"); + _print_libstate(lp); + #endif + offset = get_buf_offset(buffer); + pack32(lp->magic, buffer); + pack32(lp->node_count, buffer); + for (i = 0; i < lp->node_count; i++) + (void)nrt_pack_nodeinfo(&lp->node_list[i], buffer); + /* don't pack hash_table, we'll just rebuild on restore */ + pack16(lp->key_index, buffer); + + return(get_buf_offset(buffer) - offset); +} + /* Used by: slurmctld */ extern void nrt_libstate_save(Buf buffer, bool free_flag) { - return; + _lock(); + + if (nrt_state != NULL) + _pack_libstate(nrt_state, buffer); + + /* Clean up nrt_state since backup slurmctld can repeatedly + * save and restore state */ + if (free_flag) { + _free_libstate(nrt_state); + nrt_state = NULL; /* freed above */ + } + _unlock(); } /* Used by: slurmctld */ @@ -2816,62 +2870,4 @@ nrt_unload_table(nrt_jobinfo_t *jp) return rc; } -static void -_free_libstate(nrt_libstate_t *lp) -{ - int i; - - if (!lp) - return; - if (lp->node_list != NULL) { - for (i = 0; i < lp->node_count; i++) - nrt_free_nodeinfo(&lp->node_list[i], true); - xfree(lp->node_list); - } - xfree(lp->hash_table); - xfree(lp); -} - -/* Used by: slurmctld */ -static int -_pack_libstate(nrt_libstate_t *lp, Buf buffer) -{ - int offset; - int i; - - assert(lp); - assert(lp->magic == NRT_LIBSTATE_MAGIC); - -#if NRT_DEBUG - info("_pack_libstate"); - _print_libstate(lp); - #endif - offset = get_buf_offset(buffer); - pack32(lp->magic, buffer); - pack32(lp->node_count, buffer); - for (i = 0; i < lp->node_count; i++) - (void)nrt_pack_nodeinfo(&lp->node_list[i], buffer); - /* don't pack hash_table, we'll just rebuild on restore */ - pack16(lp->key_index, buffer); - - return(get_buf_offset(buffer) - offset); -} - -/* Used by: slurmctld */ -extern void -nrt_libstate_save(Buf buffer, bool free_flag) -{ - _lock(); - - if (nrt_state != NULL) - _pack_libstate(nrt_state, buffer); - - /* Clean up nrt_state since backup slurmctld can repeatedly - * save and restore state */ - if (free_flag) { - _free_libstate(nrt_state); - nrt_state = NULL; /* freed above */ - } - _unlock(); -} #endif -- GitLab From beefa696faf2d291070868b1f1b17a2ccb5f66b8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 15:18:33 -0800 Subject: [PATCH 064/614] Update nrt_free_jobinfo() and nrt_get_jobinfo() --- src/plugins/switch/nrt/nrt.c | 110 +++++++++++++++-------------------- 1 file changed, 46 insertions(+), 64 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b3889e7493..90c4b647d8 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1679,20 +1679,65 @@ nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) return NULL; } + /* Used by: all */ extern void nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) { + int i; + nrt_tableinfo_t *tableinfo; + + if (!jp) + return; + + if (jp->magic != NRT_JOBINFO_MAGIC) { + error("jp is not a switch/nrt slurm_nrt_jobinfo_t"); + return; + } + + jp->magic = 0; + if ((jp->tables_per_task > 0) && (jp->tableinfo != NULL)) { + for (i = 0; i < jp->tables_per_task; i++) { + tableinfo = &jp->tableinfo[i]; + xfree(tableinfo->table); + } + xfree(jp->tableinfo); + } + + xfree(jp); + jp = NULL; + return; } -/* Return data to code for whom jobinfo is an opaque type. +/* Return data to code for which jobinfo is an opaque type. * * Used by: all */ extern int nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) { + nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **)data; + int *tables_per = (int *)data; + int *job_key = (int *)data; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + + switch (key) { + case NRT_JOBINFO_TABLEINFO: + *tableinfo = jp->tableinfo; + break; + case NRT_JOBINFO_TABLESPERTASK: + *tables_per = jp->tables_per_task; + break; + case NRT_JOBINFO_KEY: + *job_key = jp->job_key; + break; + default: + slurm_seterrno_ret(EINVAL); + } + return SLURM_SUCCESS; } @@ -2433,69 +2478,6 @@ nrt_copy_jobinfo(nrt_jobinfo_t *job) return new; } -/* Used by: all */ -extern void -nrt_free_jobinfo(nrt_jobinfo_t *jp) -{ - int i; - nrt_tableinfo_t *tableinfo; - - if (!jp) { - return; - } - - if (jp->magic != NRT_JOBINFO_MAGIC) { - error("jp is not a switch/nrt nrt_jobinfo_t"); - return; - } - - jp->magic = 0; - if (jp->tables_per_task > 0 && jp->tableinfo != NULL) { - for (i = 0; i < jp->tables_per_task; i++) { - tableinfo = &jp->tableinfo[i]; - xfree(tableinfo->table); - } - xfree(jp->tableinfo); - } - - xfree(jp); - jp = NULL; - - return; -} - -/* Return data to code for whom jobinfo is an opaque type. - * - * Used by: all - */ -extern int -nrt_get_jobinfo(nrt_jobinfo_t *jp, int key, void *data) -{ - nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **)data; - int *tables_per = (int *)data; - int *job_key = (int *)data; - - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); - - switch(key) { - case NRT_JOBINFO_TABLEINFO: - *tableinfo = jp->tableinfo; - break; - case NRT_JOBINFO_TABLESPERTASK: - *tables_per = jp->tables_per_task; - break; - case NRT_JOBINFO_KEY: - *job_key = jp->job_key; - break; - default: - slurm_seterrno_ret(EINVAL); - } - - return SLURM_SUCCESS; -} - - /* * Check up to "retry" times for "window_id" on "adapter_name" * to switch to the NRT_WIN_AVAILABLE. Sleep one second between -- GitLab From 330da37da8f980e28e90caf358bef596bb9f6871 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 15:56:12 -0800 Subject: [PATCH 065/614] Update un/pack_job_info functions. --- src/plugins/switch/nrt/nrt.c | 246 +++++++++++++++++++---------------- 1 file changed, 131 insertions(+), 115 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 90c4b647d8..84cfe5f3d7 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -177,10 +177,12 @@ static int _job_step_window_state(slurm_nrt_jobinfo_t *jp, static void _lock(void); static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); +static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); +static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); static char * _win_state_str(win_state_t state); static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, @@ -1657,19 +1659,148 @@ fail: return SLURM_FAILURE; } +static void +_pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +{ + int i; + + pack32(tableinfo->table_length, buf); + if (tableinfo->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + for (i = 0, ib_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, ib_tbl_ptr++) { + pack32(ib_tbl_ptr->task_id, buf); + pack32(ib_tbl_ptr->base_lid, buf); + pack16(ib_tbl_ptr->win_id, buf); + } + } else if (tableinfo->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + for (i = 0, hfi_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, hfi_tbl_ptr++) { + uint16_t tmp_16; + uint8_t tmp_8; + pack32(hfi_tbl_ptr->task_id, buf); + tmp_16 = hfi_tbl_ptr->lid; + pack16(tmp_16, buf); + tmp_8 = hfi_tbl_ptr->win_id; + pack8(tmp_8, buf); + } + } else { + fatal("_pack_tableinfo: Missing support for adapter " + "type %hu", tableinfo->adapter_type); + } + packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); +} /* Used by: all */ extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { + int i; + + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + assert(buf); + + pack32(j->magic, buf); + pack32(j->job_key, buf); + pack8(j->bulk_xfer, buf); + pack16(j->tables_per_task, buf); + for (i = 0; i < j->tables_per_task; i++) { + _pack_tableinfo(&j->tableinfo[i], buf); + } + return SLURM_SUCCESS; } +/* return 0 on success, -1 on failure */ +static int +_unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +{ + uint32_t size; + char *name_ptr; + int i; + + safe_unpack32(&tableinfo->table_length, buf); + if (tableinfo->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + tableinfo->table = (nrt_ib_task_info_t *) + xmalloc(tableinfo->table_length * + sizeof(nrt_ib_task_info_t)); + for (i = 0, ib_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, ib_tbl_ptr++) { + safe_unpack32(&ib_tbl_ptr->task_id, buf); + safe_unpack32(&ib_tbl_ptr->base_lid, buf); + safe_unpack16(&ib_tbl_ptr->win_id, buf); + } + } else if (tableinfo->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + tableinfo->table = (nrt_hfi_task_info_t *) + xmalloc(tableinfo->table_length * + sizeof(nrt_hfi_task_info_t)); + for (i = 0, hfi_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, hfi_tbl_ptr++) { + uint16_t tmp_16; + uint8_t tmp_8; + safe_unpack32(&hfi_tbl_ptr->task_id, buf); + safe_unpack16(&tmp_16, buf); + hfi_tbl_ptr->lid = tmp_16; + safe_unpack8(&tmp_8, buf); + hfi_tbl_ptr->win_id = tmp_8; + } + } else { + fatal("_unpack_tableinfo: Missing support for adapter " + "type %hu", tableinfo->adapter_type); + } + safe_unpackmem_ptr(&name_ptr, &size, buf); + if (size != NRT_MAX_DEVICENAME_SIZE) + goto unpack_error; + memcpy(tableinfo->adapter_name, name_ptr, size); + return 0; + +unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ + error("unpack error in _unpack_tableinfo"); + return -1; +} + /* Used by: all */ extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { + int i; + + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + assert(buf); + + safe_unpack32(&j->magic, buf); + assert(j->magic == NRT_JOBINFO_MAGIC); + safe_unpack32(&j->job_key, buf); + safe_unpack8(&j->bulk_xfer, buf); + safe_unpack16(&j->tables_per_task, buf); + + j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * + sizeof(nrt_tableinfo_t)); + for (i = 0; i < j->tables_per_task; i++) { + if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) + goto unpack_error; + } + return SLURM_SUCCESS; + +unpack_error: + error("nrt_unpack_jobinfo error"); + if (j->tableinfo) { + for (i = 0; i < j->tables_per_task; i++) + xfree(j->tableinfo[i].table); + xfree(j->tableinfo); + } + slurm_seterrno_ret(EUNPACK); + return SLURM_ERROR; } /* Used by: all */ @@ -2320,121 +2451,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } -static void -_pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) -{ - int i; - - pack32(tableinfo->table_length, buf); -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - for (i = 0; i < tableinfo->table_length; i++) { - ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; - pack16(ib_tbl_ptr->task_id, buf); - pack16(ib_tbl_ptr->base_lid, buf); - pack16(ib_tbl_ptr->win_id, buf); - } - } else { - fatal("_pack_tableinfo: Missing support for adapter " - "type %hu", tableinfo->adapter_type); - } - packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); -} - -/* Used by: all */ -extern int -nrt_pack_jobinfo(nrt_jobinfo_t *j, Buf buf) -{ - int i; - - assert(j); - assert(j->magic == NRT_JOBINFO_MAGIC); - assert(buf); - - pack32(j->magic, buf); - pack16(j->job_key, buf); - pack8(j->bulk_xfer, buf); - pack16(j->tables_per_task, buf); - for (i = 0; i < j->tables_per_task; i++) { - _pack_tableinfo(&j->tableinfo[i], buf); - } - - return SLURM_SUCCESS; -} - -/* return 0 on success, -1 on failure */ -static int -_unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) -{ - uint32_t size; - char *name_ptr; - int i; - - safe_unpack32(&tableinfo->table_length, buf); -/* FIXME: table contains a union, it could contain either IB or HPCE data */ - if (tableinfo->adapter_type == RSCT_DEVTYPE_INFINIBAND) { - nrt_creator_ib_per_task_input_t *ib_tbl_ptr; - tableinfo->table = (nrt_creator_per_task_input_t *) - xmalloc(tableinfo->table_length * - sizeof(nrt_creator_per_task_input_t)); - for (i = 0; i < tableinfo->table_length; i++) { - ib_tbl_ptr = &tableinfo[i].table[i].ib_per_task; - safe_unpack16(&ib_tbl_ptr->task_id, buf); - safe_unpack16(&ib_tbl_ptr->base_lid, buf); - safe_unpack16(&ib_tbl_ptr->win_id, buf); - } - } else { - fatal("_unpack_tableinfo: Missing support for adapter " - "type %hu", tableinfo->adapter_type); - } - safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_MAX_DEVICENAME_SIZE) - goto unpack_error; - memcpy(tableinfo->adapter_name, name_ptr, size); - return 0; - -unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ - error("unpack error in _unpack_tableinfo"); - return -1; -} - -/* Used by: all */ -int -nrt_unpack_jobinfo(nrt_jobinfo_t *j, Buf buf) -{ - int i; - - assert(j); - assert(j->magic == NRT_JOBINFO_MAGIC); - assert(buf); - - safe_unpack32(&j->magic, buf); - assert(j->magic == NRT_JOBINFO_MAGIC); - safe_unpack16(&j->job_key, buf); - safe_unpack8(&j->bulk_xfer, buf); - safe_unpack16(&j->tables_per_task, buf); - - j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task - * sizeof(nrt_tableinfo_t)); - for (i = 0; i < j->tables_per_task; i++) { - if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) - goto unpack_error; - } - - return SLURM_SUCCESS; - -unpack_error: - error("nrt_unpack_jobinfo error"); - if (j->tableinfo) { - for (i = 0; i < j->tables_per_task; i++) - xfree(j->tableinfo[i].table); - xfree(j->tableinfo); - } - slurm_seterrno_ret(EUNPACK); - return SLURM_ERROR; -} - /* Used by: all */ extern nrt_jobinfo_t * nrt_copy_jobinfo(nrt_jobinfo_t *job) -- GitLab From 69d35a5586504fbd7b7d34242230af2d5b704406 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 16:32:52 -0800 Subject: [PATCH 066/614] Refactor nrt_copy_jobinfo() --- src/plugins/switch/nrt/nrt.c | 82 ++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 45 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 84cfe5f3d7..a4d235073a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1807,9 +1807,44 @@ unpack_error: extern slurm_nrt_jobinfo_t * nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) { - return NULL; -} + slurm_nrt_jobinfo_t *new; + int i; + int base_size = 0, table_size; + + assert(job); + assert(job->magic == NRT_JOBINFO_MAGIC); + if (nrt_alloc_jobinfo(&new)) { + error("Allocating new jobinfo"); + slurm_seterrno(ENOMEM); + return NULL; + } + memcpy(new, job, sizeof(slurm_nrt_jobinfo_t)); + + /* table will be empty (and table_size == 0) when the network string + * from poe does not contain "us". + * (See man poe: -euilib or MP_EUILIB) + */ + new->tableinfo = (nrt_tableinfo_t *) xmalloc(job->tables_per_task * + sizeof(nrt_table_info_t)); + for (i = 0; i < job->tables_per_task; i++) { + if (job->tableinfo->adapter_type == NRT_IB) { + base_size = sizeof(nrt_ib_task_info_t); + } else if (job->tableinfo->adapter_type == NRT_HFI) { + base_size = sizeof(nrt_hfi_task_info_t); + } else { + fatal("nrt_copy_jobinfo: Missing support for adapter " + "type %hu", job->tableinfo->adapter_type); + } + new->tableinfo[i].table_length = job->tableinfo[i].table_length; + table_size = base_size * job->tableinfo[i].table_length; + new->tableinfo->table = xmalloc(table_size); + memcpy(new->tableinfo[i].table, job->tableinfo[i].table, + table_size); + } + + return new; +} /* Used by: all */ extern void @@ -2451,49 +2486,6 @@ _get_adapters(struct nrt_adapter *list, int *count) return 0; } -/* Used by: all */ -extern nrt_jobinfo_t * -nrt_copy_jobinfo(nrt_jobinfo_t *job) -{ - nrt_jobinfo_t *new; - int i, k; - - assert(job); - assert(job->magic == NRT_JOBINFO_MAGIC); - - if (nrt_alloc_jobinfo(&new)) { - error("Allocating new jobinfo"); - slurm_seterrno(ENOMEM); - return NULL; - } - memcpy(new, job, sizeof(nrt_jobinfo_t)); - /* table will be empty (and table_size == 0) when the network string - * from poe does not contain "us". - * (See man poe: -euilib or MP_EUILIB) - */ - if (job->tables_per_task > 0) { - /* Allocate memory for each nrt_tableinfo_t */ - new->tableinfo = (nrt_tableinfo_t *)xmalloc( - job->tables_per_task * sizeof(nrt_tableinfo_t)); - memcpy(new->tableinfo, job->tableinfo, - sizeof(nrt_tableinfo_t) * job->tables_per_task); - - for (i = 0; i < job->tables_per_task; i++) { - new->tableinfo[i].table = - (nrt_creator_per_task_input_t *) - xmalloc(job->tableinfo[i].table_length * - sizeof(nrt_creator_per_task_input_t)); - for (k = 0; k < new->tableinfo[i].table_length; k++) { - memcpy(&new->tableinfo[i].table[k], - &job->tableinfo[i].table[k], - sizeof(nrt_tableinfo_t)); - } - } - } - - return new; -} - /* * Check up to "retry" times for "window_id" on "adapter_name" * to switch to the NRT_WIN_AVAILABLE. Sleep one second between -- GitLab From 259d06fdc2f1a7f569e874d5b6b9c42a018aecef Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 28 Feb 2012 16:56:35 -0800 Subject: [PATCH 067/614] Update nrt_unload_table() logic --- src/plugins/switch/nrt/nrt.c | 181 ++++++++++++++++------------------- 1 file changed, 84 insertions(+), 97 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index a4d235073a..32dba3b9da 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1918,6 +1918,57 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) return SLURM_SUCCESS; } +/* + * Try up to "retry" times to unload a window. + */ +static int +_unload_window(char *adapter_name, nrt_adapter_t adapter_type, + nrt_job_key_t job_key, nrt_window_id_t window_id, int retry) +{ + int err, i; + nrt_cmd_clean_window_t clean_window; + nrt_cmd_unload_window_t unload_window; + + for (i = 0; i < retry; i++) { + if (i > 0) { + sleep(1); + } else { + unload_window.adapter_name = adapter_name; + unload_window.adapter_type = adapter_type; + unload_window.job_key = job_key; + unload_window.window_id = window_id; + } +#if NRT_DEBUG + info("nrt_command(unload_window, %s, %u, %u, %hu)", + adapter_name, adapter_type, job_key, window_id); +#endif + err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_WINDOW, + &unload_window); + if (err == NRT_SUCCESS) + return SLURM_SUCCESS; + debug("Unable to unload window for job_key %hu, " + "nrt_unload_window(%s, %u): %s", + job_key, adapter_name, adapter_type, nrt_err_str(err)); + + if (i == 0) { + clean_window.adapter_name = adapter_name; + clean_window.adapter_type = adapter_type; + clean_window.leave_inuse_or_kill = KILL; + clean_window.window_id = window_id; + } + err = nrt_command(NRT_VERSION, NRT_CMD_CLEAN_WINDOW, + &clean_window); + if (err == NRT_SUCCESS) + return SLURM_SUCCESS; + error("Unable to clean window for job_key %hu, " + "nrt_clean_window(%s, %u): %s", + job_key, adapter_name, adapter_type, nrt_err_str(err)); + } + + return SLURM_FAILURE; +} + + /* Assumes that, on error, new switch state information will be * read from node. * @@ -1926,7 +1977,39 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) extern int nrt_unload_table(slurm_nrt_jobinfo_t *jp) { - return SLURM_SUCCESS; + nrt_window_id_t window_id; + int err, i, j, rc = SLURM_SUCCESS; + int retry = 15; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + for (i = 0; i < jp->tables_per_task; i++) { + if (jp->tableinfo[i].adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) + jp->tableinfo[i].table; + ib_tbl_ptr += j; + window_id = ib_tbl_ptr->win_id; + } else if (jp->tableinfo[i].adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) + jp->tableinfo[i].table; + hfi_tbl_ptr += j; + window_id = hfi_tbl_ptr->win_id; + } else { + fatal("nrt_unload_table: invalid adapter type: %hu", + jp->tableinfo[i].adapter_type); + } + for (j = 0; j < jp->tableinfo[i].table_length; j++) { + err = _unload_window(jp->tableinfo[i].adapter_name, + jp->tableinfo[i].adapter_type, + jp->job_key, + window_id, retry); + if (err != NRT_SUCCESS) + rc = SLURM_ERROR; + } + } + return rc; } extern int @@ -2764,100 +2847,4 @@ nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) return SLURM_SUCCESS; } - - -/* - * Try up to "retry" times to unload a window. - */ -static int -_unload_window(char *adapter_name, uint16_t adapter_type, - nrt_job_key_t job_key, nrt_window_id_t window_id, int retry) -{ - int err, i; - nrt_cmd_clean_window_t clean_window; - nrt_cmd_unload_window_t unload_window; - - for (i = 0; i < retry; i++) { - if (i > 0) { - sleep(1); - } else { - unload_window.adapter_name = adapter_name; - unload_window.adapter_type = adapter_type; - unload_window.job_key = job_key; - unload_window.window_id = window_id; - } -#if NRT_DEBUG - info("nrt_command(unload_window, %s, %u, %u, %hu)", - adapter_name, adapter_type, job_key, window_id); -#endif - err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_WINDOW, - &unload_window); - if (err == NRT_SUCCESS) - return SLURM_SUCCESS; - debug("Unable to unload window for job_key %hu, " - "nrt_unload_window(%s, %u): %s", - job_key, adapter_name, adapter_type, nrt_err_str(err)); - - if (i == 0) { - clean_window.adapter_name = adapter_name; - clean_window.adapter_type = adapter_type; - clean_window.leave_inuse_or_kill = KILL; - clean_window.window_id = window_id; - } - err = nrt_command(NRT_VERSION, NRT_CMD_CLEAN_WINDOW, - &clean_window); - if (err == NRT_SUCCESS) - return SLURM_SUCCESS; - error("Unable to clean window for job_key %hu, " - "nrt_clean_window(%s, %u): %s", - job_key, adapter_name, adapter_type, nrt_err_str(err)); - } - - return SLURM_FAILURE; -} - - -/* Assumes that, on error, new switch state information will be - * read from node. - * - * Used by: slurmd - */ -extern int -nrt_unload_table(nrt_jobinfo_t *jp) -{ - nrt_window_id_t window_id; - int err, i, j, rc = SLURM_SUCCESS; - int retry = 15; - - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); - for (i = 0; i < jp->tables_per_task; i++) { - if (jp->tableinfo[i].adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = (nrt_ib_task_info_t *) - jp->tableinfo[i].table; - ib_tbl_ptr += j; - window_id = ib_tbl_ptr->win_id; - } else if (jp->tableinfo[i].adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = (nrt_hfi_task_info_t *) - jp->tableinfo[i].table; - hfi_tbl_ptr += j; - window_id = hfi_tbl_ptr->win_id; - } else { - fatal("nrt_unload_table: invalid adapter type: " - "%hu", adapter_type_code); - } - for (j = 0; j < jp->tableinfo[i].table_length; j++) { - err = _unload_window(jp->tableinfo[i].adapter_name, - jp->tableinfo[i].adapter_type, - jp->job_key, - window_id, retry); - if (err != NRT_SUCCESS) - rc = SLURM_ERROR; - } - } - return rc; -} - #endif -- GitLab From 76845e584935e536643f000cf05f9885937587f4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 29 Feb 2012 10:57:29 -0800 Subject: [PATCH 068/614] Update for NRT load table logic --- src/plugins/switch/nrt/nrt.c | 830 ++++++++++++----------------------- 1 file changed, 292 insertions(+), 538 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 32dba3b9da..6bae6eefe7 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -71,7 +71,6 @@ #define NRT_HASHCOUNT 128 #define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) -#if 1 pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; extern bool nrt_need_state_save; slurm_nrt_libstate_t * nrt_state = NULL; @@ -155,6 +154,8 @@ static int _allocate_window_single(char *adapter_name, nrt_adapter_t adapter_type); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); +static int _check_rdma_job_count(char *adapter_name, + nrt_adapter_t adapter_type); static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); static int _fake_unpack_adapters(Buf buf); @@ -183,6 +184,11 @@ static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); +static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo); +static int _wait_for_window_unloaded(char *adapter_name, + nrt_adapter_t adapter_type, + nrt_window_id_t window_id, int retry, + unsigned int max_windows); static char * _win_state_str(win_state_t state); static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, @@ -858,6 +864,27 @@ _win_state_str(win_state_t state) } #if NRT_DEBUG +/* Used by: slurmd */ +static void +_print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) +{ + int i; + + info("--Begin Adapter Status--"); + info(" adapter_name:%s adapter_type:%hu", + status_adapter->adapter_name, status_adapter->adapter_type); + for (i = 0; i < *status_adapter->window_count; i++) { + nrt_status_t *status = status_adapter->status_array[i]; + info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); + info(" uid[%d]:%u", i, (uint32_t) status->uid); + info(" window_id[%d]:%hu", i, status->window_id); + info(" bulk_xfer[%d]:%hu", i, status->bulk_transfer); + info(" rcontext_blocks[%d]:%u", i, status->rcontext_blocks); + info(" state[%d]:%s", i, _win_state_str(status->state)); + } + info("--End Adapter Status--"); +} + /* Used by: slurmd, slurmctld */ static void _print_nodeinfo(slurm_nrt_nodeinfo_t *n) @@ -947,6 +974,27 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) } info("--End NRT table--"); } + +/* Used by: slurmd, slurmctld */ +static void +_print_jobinfo(slurm_nrt_jobinfo_t *j) +{ + char buf[128]; + + assert(j); + assert(j->magic == NRT_JOBINFO_MAGIC); + + info("--Begin Jobinfo--"); + info(" job_key: %u", j->job_key); + info(" table_size: %u", j->tables_per_task); + info(" bulk_xfer: %u", j->bulk_xfer); + info(" tables_per_task: %hu", j->tables_per_task); + hostlist_ranged_string(j->nodenames, sizeof(buf), buf); + info(" nodenames: %s", buf); + info(" num_tasks: %d", j->num_tasks); + info(" tableinfo supressed"); + info("--End Jobinfo--"); +} #endif static slurm_nrt_libstate_t * @@ -1907,6 +1955,158 @@ nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) return SLURM_SUCCESS; } +/* + * Check up to "retry" times for "window_id" on "adapter_name" + * to switch to the NRT_WIN_AVAILABLE. Sleep one second between + * each retry. + * + * Used by: slurmd + */ +static int +_wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, + nrt_window_id_t window_id, int retry, + unsigned int max_windows) +{ + int err, i, j; + nrt_cmd_status_adapter_t status_adapter; + nrt_status_t *status_array = NULL; + nrt_window_id_t window_count; + nrt_status_t *status = NULL; + + status_array = xmalloc(sizeof(nrt_status_t) * max_windows); + status_adapter.adapter_name = adapter_name; + status_adapter.adapter_type = adapter_type; + status_adapter.status_array = &status_array; + status_adapter.window_count = &window_count; + for (i = 0; i < retry; i++) { + if (i > 0) + sleep(1); + + err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, + &status_adapter); + if (err != NRT_SUCCESS) { + error("nrt_status_adapter(%s, %d): %s", adapter_name, + (int) adapter_type, nrt_err_str(err)); + break; + } +#if NRT_DEBUG + info("_wait_for_window_unloaded"); + _print_adapter_status(&status_adapter); +#endif + for (j = 0; j < window_count; j++) { + status = status_adapter.status_array[j]; + if (status->window_id == window_id) + break; + } + if (j >= window_count) { + error("nrt_status_adapter(%s, %hu), window %hu not " + "found", + adapter_name, (int)adapter_type, window_id); + break; + } + if (status->state == NRT_WIN_AVAILABLE) + return SLURM_SUCCESS; + debug2("nrt_status_adapter(%s, %d), window %u state %s", + adapter_name, (int) adapter_type, window_id, + _win_state_str(status->state)); + } + xfree(status_array); + + return SLURM_ERROR; +} + +/* + * Look through the table and find all of the NRT that are for an adapter on + * this node. Wait until the window from each local NRT is in the + * NRT_WIN_AVAILABLE. + * + * Used by: slurmd + */ +static int +_wait_for_all_windows(nrt_tableinfo_t *tableinfo) +{ + int err, i, rc = SLURM_SUCCESS; + int retry = 15; + nrt_window_id_t window_id = 0; + nrt_cmd_query_adapter_names_t adapter_names; + unsigned int max_windows, num_adapter_names; + + adapter_names.adapter_type = tableinfo->adapter_type; + adapter_names.max_windows = &max_windows; + adapter_names.num_adapter_names = &num_adapter_names; + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, + &adapter_names); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_names, %u): %s", + adapter_names.adapter_type, nrt_err_str(err)); + rc = SLURM_ERROR; + max_windows = 16; /* FIXME: What should this be? */ + } + + for (i = 0; i < tableinfo->table_length; i++) { + if (tableinfo->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) tableinfo->table; + ib_tbl_ptr += i; + window_id = ib_tbl_ptr->win_id; + } else if (adapter_names.adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) tableinfo->table; + hfi_tbl_ptr += i; + window_id = hfi_tbl_ptr->win_id; + } else { + fatal("_wait_for_all_windows: Missing support for " + "adapter type %hu", tableinfo->adapter_type); + } + + err = _wait_for_window_unloaded(tableinfo->adapter_name, + tableinfo->adapter_type, + window_id, retry, max_windows); + if (err != SLURM_SUCCESS) { + error("Window %hu adapter %s did not " + "become free within %d seconds", + window_id, tableinfo->adapter_name, retry); + rc = err; + } + } + + return rc; +} + +static int +_check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) +{ + uint16_t job_count = 0; + uint16_t *job_keys = NULL; + int err, i; + +#if 1 + err = NRT_SUCCESS; +#else +/* FIXME: Address this later, RDMA jobs are those using bulk transters */ + err = nrt_rdma_jobs(NRT_VERSION, adapter_name, adapter_type, + &job_count, &job_keys); +#endif + if (err != NRT_SUCCESS) { + error("nrt_rdma_jobs(): %s", nrt_err_str(err)); + return SLURM_ERROR; + } +#if NRT_DEBUG + info("_check_rdma_job_count: nrt_rdma_jobs:"); + info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + for (i = 0; i < job_count; i++) + info(" job_keys[%d]:%hu", i, job_keys[i]); +#endif + if (job_keys) + free(job_keys); + if (job_count >= 4) { + error("RDMA job_count is too high: %hu", job_count); + return SLURM_ERROR; + } + + return SLURM_SUCCESS; +} + /* Load a network table on node. If table contains more than one window * for a given adapter, load the table only once for that adapter. * @@ -1915,6 +2115,70 @@ nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) extern int nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) { + int i; + int err; + char *adapter_name; + int rc; + nrt_cmd_load_table_t load_table; + nrt_table_info_t table_info; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + +#if NRT_DEBUG + info("nrt_load_table"); + _print_jobinfo(jp); +#endif + for (i = 0; i < jp->tables_per_task; i++) { +#if NRT_DEBUG + _print_table(jp->tableinfo[i].table, + jp->tableinfo[i].table_length, + jp->tableinfo[i].adapter_type); +#endif + adapter_name = jp->tableinfo[i].adapter_name; + rc = _wait_for_all_windows(&jp->tableinfo[i]); + if (rc != SLURM_SUCCESS) + return rc; + + if (adapter_name == NULL) + continue; + if (jp->bulk_xfer && (i == 0)) { + rc = _check_rdma_job_count(adapter_name, + jp->tableinfo[i]. + adapter_type); + if (rc != SLURM_SUCCESS) + return rc; + } + +/* FIXME: Ne need to set a bunch of these paramters appropriately */ +#define TBD 0 + table_info.num_tasks = jp->tableinfo[i].table_length; + table_info.job_key = jp->job_key; + table_info.uid = uid; + table_info.network_id = TBD; + table_info.pid = pid; + table_info.adapter_type = jp->tableinfo[i].adapter_type; + table_info.is_user_space = TBD; + table_info.is_ipv4 = TBD; + table_info.context_id = TBD; + table_info.table_id = TBD; + strncpy(table_info.job_name, "TBD", NRT_MAX_JOB_NAME_LEN); + strncpy(table_info.protocol_name, "TBD", NRT_MAX_PROTO_NAME_LEN); + table_info.use_bulk_transfer = jp->bulk_xfer; + table_info.bulk_transfer_resources = TBD; + table_info.immed_send_slots_per_win = TBD; + table_info.num_cau_indexes = TBD; + load_table.table_info = &table_info; + load_table.per_task_input = jp->tableinfo[i].table; + err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); + if (err != NRT_SUCCESS) { + error("unable to load table: [%d] %s", + err, nrt_err_str(err)); + return SLURM_ERROR; + } + } + umask(nrt_umask); + return SLURM_SUCCESS; } @@ -1977,39 +2241,40 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, extern int nrt_unload_table(slurm_nrt_jobinfo_t *jp) { - nrt_window_id_t window_id; + nrt_window_id_t window_id = 0; int err, i, j, rc = SLURM_SUCCESS; int retry = 15; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); for (i = 0; i < jp->tables_per_task; i++) { - if (jp->tableinfo[i].adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = (nrt_ib_task_info_t *) - jp->tableinfo[i].table; - ib_tbl_ptr += j; - window_id = ib_tbl_ptr->win_id; - } else if (jp->tableinfo[i].adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = (nrt_hfi_task_info_t *) - jp->tableinfo[i].table; - hfi_tbl_ptr += j; - window_id = hfi_tbl_ptr->win_id; - } else { - fatal("nrt_unload_table: invalid adapter type: %hu", - jp->tableinfo[i].adapter_type); - } for (j = 0; j < jp->tableinfo[i].table_length; j++) { - err = _unload_window(jp->tableinfo[i].adapter_name, - jp->tableinfo[i].adapter_type, - jp->job_key, - window_id, retry); - if (err != NRT_SUCCESS) - rc = SLURM_ERROR; - } - } - return rc; + if (jp->tableinfo[i].adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = (nrt_ib_task_info_t *) + jp->tableinfo[i].table; + ib_tbl_ptr += j; + window_id = ib_tbl_ptr->win_id; + } else if (jp->tableinfo[i].adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = (nrt_hfi_task_info_t *) + jp->tableinfo[i].table; + hfi_tbl_ptr += j; + window_id = hfi_tbl_ptr->win_id; + } else { + fatal("nrt_unload_table: invalid adapter " + "type: %hu", + jp->tableinfo[i].adapter_type); + } + err = _unload_window(jp->tableinfo[i].adapter_name, + jp->tableinfo[i].adapter_type, + jp->job_key, + window_id, retry); + if (err != NRT_SUCCESS) + rc = SLURM_ERROR; + } + } + return rc; } extern int @@ -2337,514 +2602,3 @@ extern char *nrt_err_str(int rc) snprintf(str, sizeof(str), "%d", rc); return str; } -#else -/******************************************************************************/ -/* THIS IS OLD CODE, LIKELY TO BE MODIFIED AND MERGED INTO THE ABOVE #ifdef */ -/******************************************************************************/ -#define JOB_DESC_LEN 64 /* Length of job description */ -#define NRT_AUTO_WINMEM 0 -#define NRT_MAX_WIN 15 -#define NRT_MIN_WIN 0 - -char* nrt_conf = NULL; - -/* - * Globals - */ - - -/* slurmd/slurmstepd global variables */ -hostlist_t adapter_list; -uint16_t adapter_type_code = 0; - -static void _hash_rebuild(nrt_libstate_t *state); -static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, - uint16_t adapter_type); - - -#if NRT_DEBUG -/* Used by: slurmd */ -static void -_print_adapter_resources(char *adapter_name, uint16_t adapter_type, - adap_resources_t *adapter_res) -{ - int i; - - info("--Begin Adapter Resources--"); - info(" adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - info(" node_number:%u", adapter_res->node_number); - info(" num_spigots:%hu", adapter_res->num_spigots); - for (i = 0; i < adapter_res->num_spigots; i++) { - info(" lid[%d]:%hu", i, adapter_res->lid[i]); - info(" network_id[%d]:%"PRIu64"", - i, adapter_res->network_id[i]); - info(" lmc[%d]:%hu", i, adapter_res->lmc[i]); - info(" spigot_id[%d]:%hu", i, adapter_res->spigot_id[i]); - } - info(" window_count:%hu", adapter_res->window_count); - for (i = 0; i < adapter_res->window_count; i++) - info(" window_list[%d]:%hu", i, adapter_res->window_list[i]); - info(" rcontext_block_count:%"PRIu64"", - adapter_res->rcontext_block_count); - info("--End Adapter Resources--"); -} - -/* Used by: slurmd */ -static void -_print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) -{ - int i; - - info("--Begin Adapter Status--"); - info(" adapter_name:%s adapter_type:%hu", - status_adapter->adapter_name, status_adapter->adapter_type); - for (i = 0; i < status_adapter->window_count; i++) { - nrt_status_t *status = status_adapter->status_array[i]; - info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); - info(" uid[%d]:%u", i, (uint32_t) status->uid); - info(" window_id[%d]:%hu", i, status->window_id); - info(" bulk_xfer[%d]:%hu", i, status->bulk_transfer); - info(" rcontext_blocks[%d]:%u", i, status->rcontext_blocks); - info(" state[%d]:%s", i, _win_state_str(status->state)); - } - info("--End Adapter Status--"); -} - -/* Used by: slurmd, slurmctld */ -static void -_print_jobinfo(nrt_jobinfo_t *j) -{ - char buf[128]; - - assert(j); - assert(j->magic == NRT_JOBINFO_MAGIC); - - info("--Begin Jobinfo--"); - info(" job_key: %u", j->job_key); - info(" table_size: %u", j->tables_per_task); - info(" bulk_xfer: %u", j->bulk_xfer); - info(" tables_per_task: %hu", j->tables_per_task); - hostlist_ranged_string(j->nodenames, sizeof(buf), buf); - info(" nodenames: %s", buf); - info(" num_tasks: %d", j->num_tasks); - info(" tableinfo supressed"); - info("--End Jobinfo--"); -} -#endif - -/* Cache the lid and network_id of a given adapter. Ex: sni0 with lid 10 - * gets cached in array index 0 with a lid = 10 and a name = sni0. - * - * Used by: slurmd - */ -static void -_cache_lid(struct nrt_adapter *ap) -{ - int j; - assert(ap); - - int adapter_num = ap->adapter_name[3] - (int) '0'; - - for (j = 0; j < MAX_SPIGOTS; j++) { - lid_cache[adapter_num].lid[j] = ap->lid[j]; - lid_cache[adapter_num].network_id[j] = ap->network_id[j]; - } - strncpy(lid_cache[adapter_num].adapter_name, ap->adapter_name, - NRT_MAX_DEVICENAME_SIZE); - lid_cache[adapter_num].adapter_type = ap->adapter_type; -} - - -/* Check lid cache for an adapter name and return the network id. - * - * Used by: slurmd - */ -static uint64_t -_get_network_id_from_adapter(char *adapter_name) -{ - int i; - - for (i = 0; i < NRT_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].adapter_name, - NRT_MAX_DEVICENAME_SIZE)) { -/* FIXME: Return which spigot's network_id? */ - return lid_cache[i].network_id[0]; - } - } - - return (uint16_t) -1; -} - - -static int _set_up_adapter(struct nrt_adapter *nrt_adapter, char *adapter_name, - uint16_t adapter_type) -{ - adap_resources_t res; - nrt_status_t *status = NULL; - nrt_window_t *tmp_winlist = NULL; - uint16_t win_count = 0; - int err, i, j; - - err = nrt_adapter_resources(NRT_VERSION, adapter_name, adapter_type, - &res); - if (err != NRT_SUCCESS) { - error("nrt_adapter_resources(%s, %hu): %s", - adapter_name, adapter_type, nrt_err_str(err)); - return SLURM_ERROR; - } -#if NRT_DEBUG - info("_set_up_adapter: nrt_adapter_resources():"); - _print_adapter_resources(adapter_name, adapter_type, &res); -#endif - - strncpy(nrt_adapter->adapter_name, adapter_name, - NRT_MAX_DEVICENAME_SIZE); - nrt_adapter->adapter_type = adapter_type; - for (j = 0; j < MAX_SPIGOTS; j++) { - nrt_adapter->lid[j] = res.lid[j]; - nrt_adapter->network_id[j] = res.network_id[j]; - } - nrt_adapter->window_count = res.window_count; - free(res.window_list); - _cache_lid(nrt_adapter); - err = nrt_status_adapter(NRT_VERSION, adapter_name, adapter_type, - &win_count, &status); - umask(nrt_umask); - if (err != NRT_SUCCESS) { - error("nrt_status_adapter(%s, %u): %s", adapter_name, - adapter_type, nrt_err_str(err)); - slurm_seterrno_ret(ESTATUS); - } -#if NRT_DEBUG - info("_set_up_adapter: nrt_status_adapter():"); - _print_adapter_status(adapter_name, adapter_type, win_count, status); -#endif - tmp_winlist = (nrt_window_t *) xmalloc(sizeof(nrt_window_t) * - res.window_count); - for (i = 0; i < res.window_count; i++) { - tmp_winlist[i].window_id = status->window_id; - tmp_winlist[i].state = status->state; - } - free(status); - nrt_adapter->window_list = tmp_winlist; - - return SLURM_SUCCESS; -} - -/* Check for existence of sniX, where X is from 0 to NRT_MAXADAPTERS. - * For all that exist, record vital adapter info plus status for all windows - * available on that adapter. Cache lid to adapter name mapping locally. - * - * Used by: slurmd - */ -static int -_get_adapters(struct nrt_adapter *list, int *count) -{ - hostlist_iterator_t adapter_iter; - char *adapter_name = NULL; - int i, rc; - - assert(list != NULL); - assert(adapter_list != NULL); - - adapter_iter = hostlist_iterator_create(adapter_list); - for (i = 0; (adapter_name = hostlist_next(adapter_iter)); i++) { - rc = _set_up_adapter(list + i, adapter_name, - adapter_type_code); - if (rc != SLURM_SUCCESS) { - fatal("Failed to set up adapter %s of type %hu", - adapter_name, adapter_type_code); - } - free(adapter_name); - } - hostlist_iterator_destroy(adapter_iter); - - assert(i > 0); - *count = i; - info("Number of adapters is = %d", *count); - - if (!*count) - slurm_seterrno_ret(ENOADAPTER); - - return 0; -} - -/* - * Check up to "retry" times for "window_id" on "adapter_name" - * to switch to the NRT_WIN_AVAILABLE. Sleep one second between - * each retry. - * - * Used by: slurmd - */ -static int -_wait_for_window_unloaded(char *adapter_name, int adapter_type, - nrt_window_id_t window_id, int retry, - unsigned int max_windows) -{ - int err, i, j; - nrt_cmd_status_adapter_t status_adapter; - nrt_status_t *status_array = NULL; - nrt_window_id_t window_count; - nrt_status_t *status = NULL; - - status_array = xmalloc(sizeof(nrt_status_t) * max_windows); - status_adapter.adapter_name = adapter_name; - status_adapter.adapter_type = adapter_type; - adapter_status.status_array = &status_array; - adapter_status.window_count = &window_count; - for (i = 0; i < retry; i++) { - if (i > 0) - sleep(1); - - err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, - &status_adapter); - if (err != NRT_SUCCESS) { - error("nrt_status_adapter(%s, %d): %s", adapter_name, - (int) adapter_type, nrt_err_str(err)); - break; - } -#if NRT_DEBUG - info("_wait_for_window_unloaded"); - _print_adapter_status(&status_adapter); -#endif - for (j = 0; j < window_count; j++) { - status = status_adapter.status_array[j]; - if (status->window_id == window_id) - break; - } - if (j >= window_count) { - error("nrt_status_adapter(%s, %hu), window %hu not " - "found", - adapter_name, (int)adapter_type, window_id); - break; - } - if (status->state == NRT_WIN_AVAILABLE) - return SLURM_SUCCESS; - debug2("nrt_status_adapter(%s, %d), window %u state %s", - adapter_name, (int) adapter_type, window_id, - _win_state_str(status->state)); - } - xfree(status_array); - - return SLURM_ERROR; -} - - -/* - * Look through the table and find all of the NRT that are for an adapter on - * this node. Wait until the window from each local NRT is in the - * NRT_WIN_AVAILABLE. - * - * Used by: slurmd - */ -static int -_wait_for_all_windows(nrt_tableinfo_t *tableinfo) -{ - int err, i, rc = SLURM_SUCCESS; - int retry = 15; - nrt_window_id_t window_id; - nrt_cmd_query_adapter_names_t adapter_names; - unsigned int max_windows, num_adapter_names; - - adapter_names.adapter_type = tableinfo->adapter_type; - adapter_names.max_windows = &max_windows; - adapter_names.num_adapter_names = &num_adapter_names; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, - &adapter_names); - if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); - rc = SLURM_ERROR; - max_windows = 16; /* FIXME: What should this be? */ - } - - for (i = 0; i < tableinfo->table_length; i++) { - if (tableinfo->adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = (nrt_ib_task_info_t *) tableinfo->table; - ib_tbl_ptr += i; - window_id = ib_tbl_ptr->win_id; - } else if (adapter_type_code == NRT_HFI) { - nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = (nrt_hfi_task_info_t *) tableinfo->table; - hfi_tbl_ptr += i; - window_id = hfi_tbl_ptr->win_id; - } else { - fatal("_wait_for_all_windows: Missing support for " - "adapter type %hu", tableinfo->adapter_type); - } - err = _wait_for_window_unloaded(tableinfo->adapter_name, - tableinfo->adapter_type, - window_id, retry, max_windows); - if (err != SLURM_SUCCESS) { - error("Window %hu adapter %s did not " - "become free within %d seconds", - window_id, tableinfo->adapter_name, retry); - rc = err; - } - } - - return rc; -} - -static int -_check_rdma_job_count(char *adapter_name, uint16_t adapter_type) -{ - uint16_t job_count; - uint16_t *job_keys; - int err, i; - -#if 1 - err = NRT_SUCESS; -#else -/* FIXME: Address this later, RDMA jobs are those using bulk transters */ - err = nrt_rdma_jobs(NRT_VERSION, adapter_name, adapter_type, - &job_count, &job_keys); -#endif - if (err != NRT_SUCCESS) { - error("nrt_rdma_jobs(): %s", nrt_err_str(err)); - return SLURM_ERROR; - } -#if NRT_DEBUG - info("_check_rdma_job_count: nrt_rdma_jobs:"); - info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); - for (i = 0; i < job_count; i++) - info(" job_keys[%d]:%hu", i, job_keys[i]); -#endif - free(job_keys); - if (job_count >= 4) { - error("RDMA job_count is too high: %hu", job_count); - return SLURM_ERROR; - } - - return SLURM_SUCCESS; -} - - -/* Load a network table on node. If table contains more than one window - * for a given adapter, load the table only once for that adapter. - * - * Used by: slurmd - */ -extern int -nrt_load_table(nrt_jobinfo_t *jp, int uid, int pid) -{ - int i; - int err; - char *adapter_name; - uint64_t network_id; - uint bulk_xfer_resources = 0; - int rc; - nrt_cmd_load_table_t load_table; - nrt_table_info_t table_info; - -#if NRT_DEBUG - int j; - - info("nrt_load_table"); -#endif - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); - - for (i = 0; i < jp->tables_per_task; i++) { -#if NRT_DEBUG - _print_table(jp->tableinfo[i].table, - jp->tableinfo[i].table_length); - _print_jobinfo(jp); -#endif - adapter_name = jp->tableinfo[i].adapter_name; - network_id = _get_network_id_from_adapter(adapter_name); - - rc = _wait_for_all_windows(&jp->tableinfo[i]); - if (rc != SLURM_SUCCESS) - return rc; - - if (adapter_name == NULL) - continue; - if (jp->bulk_xfer && (i == 0)) { - rc = _check_rdma_job_count(adapter_name, - adapter_type_code); - if (rc != SLURM_SUCCESS) - return rc; - } -#if NRT_DEBUG - info("attempting nrt_load_table:"); - info("adapter_name:%s adapter_type:%hu", adapter_name, - adapter_type_code); - info(" network_id:%"PRIu64" uid:%u pid:%u", network_id, - (uint32_t)uid, (uint32_t)pid); - info(" job_key:%u", jp->job_key); - info(" bulk_xfer:%u bulk_xfer_res:%u", jp->bulk_xfer, - bulk_xfer_resources); - for (j = 0; j < jp->tableinfo[i].table_length; j++) { - if (adapter_type_code == NRT_IB) { - nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = (nrt_ib_task_info_t *) - jp->tableinfo[i].table; - ib_tbl_ptr += j; - info(" task_id[%d]:%hu", j, - ib_tbl_ptr->task_id); - info(" win_id[%d]:%hu", j, - ib_tbl_ptr->win_id); - info(" node_number[%d]:%u", j, - ib_tbl_ptr->node_number); - info(" device_name[%d]:%s", j, - ib_tbl_ptr->device_name); - info(" base_lid[%d]:%hu", j, - ib_tbl_ptr->base_lid); - info(" port_id[%d]:%hu", j, - ib_tbl_ptr->port_id); - info(" lmc[%d]:%hu", j, ib_tbl_ptr->lmc); - info(" port_status[%d]:%hu", j, - ib_tbl_ptr->port_status); - } else if (adapter_type_code == NRT_HFI) { - nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = (nrt_hfi_task_info_t *) - jp->tableinfo[i].table; - hfi_tbl_ptr += j; - info(" task_id[%d]:%hu", j, - hfi_tbl_ptr->task_id); - info(" lpar_id[%d]:%hu", j, - hfi_tbl_ptr->lpar_id); - info(" lid[%d]:%hu", j, - hfi_tbl_ptr->lid); - info(" win_id[%d]:%hu", j, - hfi_tbl_ptr->win_id); - } else { - fatal("nrt_load_table: invalid adapter type: " - "%hu", adapter_type_code); - } - } -#endif -/* FIXME: Ne need to set a bunch of these paramters appropriately */ -#define TBD 0 - table_info.num_tasks = jp->tableinfo[i].table_length; - table_info.job_key = jp->job_key; - table_info.uid = uid; - table_info.network_id = TBD; - table_info.pid = pid; - table_info.adapter_type = adapter_type_code; - table_info.is_user_space = TBD; - table_info.is_ipv4 = TBD; - table_info.context_id = TBD; - table_info.table_id = TBD; - strncpy(table_info.job_name, "TBD", NRT_MAX_JOB_NAME_LEN); - strncpy(table_info.protocol_name, "TBD", NRT_MAX_PROTO_NAME_LEN); - table_info.use_bulk_transfer = jp->bulk_xfer; - table_info.bulk_transfer_resources = TBD; - table_info.immed_send_slots_per_win = TBD; - table_info.num_cau_indexes = TBD; - load_table.table_info = &table_info; - load_table.per_task_input = jp->tableinfo[i].table; - err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); - if (err != NRT_SUCCESS) { - error("unable to load table: [%d] %s", - err, nrt_err_str(err)); - return SLURM_ERROR; - } - } - umask(nrt_umask); - - return SLURM_SUCCESS; -} -#endif -- GitLab From dc532a23a2e5e27d85e8aaa9f49f512144677a09 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 5 Mar 2012 19:38:57 -0800 Subject: [PATCH 069/614] minor edits to the shr_64 file and some minor edits --- src/plugins/switch/nrt/libpermapi/shr_64.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index c5aa1a1992..402f708591 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -45,6 +45,8 @@ #include "src/common/hostlist.h" #include +#include "src/srun/srun_job.h" + /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task * manager, and is available for the caller to communicate directly @@ -82,6 +84,11 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, */ extern void pe_rm_free(rmhandle_t *resource_mgr) { + srun_job_t *job = (srun_job_t *)*resource_mgr; + /* We are at the end so don't worry about freeing the + srun_job_t pointer */ + resource_mgr = NULL; + info("got pr_rm_free called"); } @@ -244,7 +251,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, * OUT resource_mgr - Pointer to the rmhandle_t handle returned by the * pe_rm_init function. This handle should be used by all other * resource manager API calls. - * IN/OUT rm_id - Pointer to a character string that defines a + * IN rm_id - Pointer to a character string that defines a * resource manager ID, for checkpoint and restart cases. This * pointer can be set to NULL, which means there is no previous * resource manager session or job running. When it is set to a @@ -264,6 +271,12 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg) { + srun_job_t *job = NULL; + /* SLURM was originally written against 1300, so we will + * return that, no matter what comes in so we always work. + */ + *rmapi_version = 1300; + *resource_mgr = (void *)job; info("got pr_rm_init called"); return 0; } -- GitLab From 21750dfbb5e7813bc59829a0cb743c3894d0e104 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 5 Mar 2012 19:39:15 -0800 Subject: [PATCH 070/614] change strndup to xstrndup --- src/plugins/switch/nrt/switch_nrt.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 5ab6e625b0..9585792215 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -407,8 +407,8 @@ static char *_adapter_name_check(char *network) if (regexec(&re, network, nmatch, pmatch, 0) == REG_NOMATCH) { return NULL; } - name = strndup(network + pmatch[1].rm_so, - (size_t)(pmatch[1].rm_eo - pmatch[1].rm_so)); + name = xstrndup(network + pmatch[1].rm_so, + (size_t)(pmatch[1].rm_eo - pmatch[1].rm_so)); regfree(&re); return name; @@ -468,8 +468,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, nprocs, sn_all, adapter_name, bulk_xfer); hostlist_destroy(list); - if (adapter_name) - free(adapter_name); + xfree(adapter_name); return err; } -- GitLab From a5d36a981eb581cbe894f74c979a793ef1c3d9f6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 6 Mar 2012 15:56:08 -0800 Subject: [PATCH 071/614] This gets switch/nrt initializaion starting, albeit with bugs --- src/plugins/switch/nrt/nrt.c | 153 ++++++++++++++++++++++++++++++----- 1 file changed, 132 insertions(+), 21 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6bae6eefe7..1dddb0288a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -144,6 +144,7 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; /* Local functions */ +static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, @@ -863,6 +864,30 @@ _win_state_str(win_state_t state) } } +static char * +_adapter_type_str(nrt_adapter_t type) +{ + static char buf[10]; + + switch (type) { + case NRT_IB: + return "IB"; + case NRT_HFI: + return "HFI"; + case NRT_IPONLY: + return "IP_ONLY"; + case NRT_HPCE: + return "HPC_Ethernet"; + case NRT_KMUX: + return "Kernel_Emulated_HPCE"; + default: + snprintf(buf, sizeof(buf), "%d", type); + return buf; + } + + return NULL; /* Never used */ +} + #if NRT_DEBUG /* Used by: slurmd */ static void @@ -1114,7 +1139,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; - nrt_status_t *status_array = NULL; + nrt_status_t **status_array = NULL; nrt_window_id_t window_count; #if NRT_DEBUG @@ -1128,6 +1153,12 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; } +#if NRT_DEBUG + for (i = 0; i < num_adapter_types; i++) { + info("nrt_command(adapter_types): %s", + _adapter_type_str(adapter_types.adapter_types[i])); + } +#endif for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; @@ -1136,31 +1167,60 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); + error("nrt_command(adapter_names, %s): %s", + _adapter_type_str(adapter_names.adapter_type), + nrt_err_str(err)); rc = SLURM_ERROR; continue; } - status_array = xmalloc(sizeof(nrt_status_t) * max_windows); +#if NRT_DEBUG + for (j = 0; j < num_adapter_names; j++) { + info("nrt_command(adapter_names, %s, %s)", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names.adapter_type)); + } +#endif + status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); + for (j = 0; j < max_windows; j++) { + status_array[j] = xmalloc(sizeof(nrt_status_t) * + max_windows); + } for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; - adapter_status.status_array = &status_array; + adapter_status.status_array = status_array; adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { - error("nrt_command(status_adapter, %s, %u): %s", + error("nrt_command(status_adapter, %s, %s): %s", adapter_status.adapter_name, - adapter_status.adapter_type, + _adapter_type_str(adapter_status. + adapter_type), nrt_err_str(err)); rc = SLURM_ERROR; continue; } - +#if NRT_DEBUG + error("nrt_command(status_adapter, %s, %s), count:%hu", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type), + window_count); + for (k = 0; k < window_count; k++) { + if (adapter_status.status_array[k]->state == + NRT_WIN_UNAVAILABLE) + continue; + info("window_id:%d uid:%d pid:%d state:%s", + adapter_status.status_array[k]->window_id, + adapter_status.status_array[k]->uid, + adapter_status.status_array[k]->client_pid, + _win_state_str(adapter_status. + status_array[k]->state)); + } +#endif adapter_ptr = &n->adapter_list[n->adapter_count]; strncpy(adapter_ptr->adapter_name, adapter_status.adapter_name, @@ -1174,6 +1234,9 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) adapter_ptr->window_count); n->adapter_count++; for (k = 0; k < window_count; k++) { + if (adapter_status.status_array[k]->state == + NRT_WIN_UNAVAILABLE) + continue; slurm_nrt_window_t *window_ptr; window_ptr = adapter_ptr->window_list + k; window_ptr->window_id = adapter_status. @@ -1187,6 +1250,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) client_pid; } } + for (j = 0; j < max_windows; j++) { +//FIXME: invalid memory magic here +// xfree(status_array[j]); + } xfree(status_array); } #if NRT_DEBUG @@ -2447,7 +2514,7 @@ nrt_clear_node_state(void) unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_window_id_t window_count; - nrt_status_t *status_array = NULL; + nrt_status_t **status_array = NULL; nrt_cmd_clean_window_t clean_window; #if NRT_DEBUG @@ -2461,6 +2528,12 @@ nrt_clear_node_state(void) error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; } +#if NRT_DEBUG + for (i = 0; i < num_adapter_types; i++) { + info("nrt_command(adapter_types): %s", + _adapter_type_str(adapter_types.adapter_types[i])); + } +#endif for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; @@ -2469,33 +2542,65 @@ nrt_clear_node_state(void) err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); + error("nrt_command(adapter_names, %s): %s", + _adapter_type_str(adapter_names.adapter_type), + nrt_err_str(err)); rc = SLURM_ERROR; continue; } - status_array = xmalloc(sizeof(nrt_status_t) * max_windows); +#if NRT_DEBUG + for (j = 0; j < num_adapter_names; j++) { + info("nrt_command(adapter_names, %s, %s)", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names.adapter_type)); + } +#endif + status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); + for (j = 0; j < max_windows; j++) { + status_array[j] = xmalloc(sizeof(nrt_status_t) * + max_windows); + } for (j = 0; j < num_adapter_names; j++) { adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; - adapter_status.status_array = &status_array; + adapter_status.status_array = status_array; adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); if (err != NRT_SUCCESS) { - error("nrt_command(clean_status, %s, %u): %s", + error("nrt_command(status_adapter, %s, %s): %s", adapter_status.adapter_name, - adapter_status.adapter_type, + _adapter_type_str(adapter_status. + adapter_type), nrt_err_str(err)); rc = SLURM_ERROR; continue; } - +#if NRT_DEBUG + error("nrt_command(status_adapter, %s, %s), count:%hu", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type), + window_count); for (k = 0; k < window_count; k++) { + if (adapter_status.status_array[k]->state == + NRT_WIN_UNAVAILABLE) + continue; + info("window_id:%d uid:%d pid:%d state:%s", + adapter_status.status_array[k]->window_id, + adapter_status.status_array[k]->uid, + adapter_status.status_array[k]->client_pid, + _win_state_str(adapter_status. + status_array[k]->state)); + } +#endif + for (k = 0; k < window_count; k++) { + if (adapter_status.status_array[k]->state == + NRT_WIN_UNAVAILABLE) + continue; clean_window.adapter_name = adapter_names. - adapter_names[i]; + adapter_names[j]; clean_window.adapter_type = adapter_names. adapter_type; clean_window.leave_inuse_or_kill = KILL; @@ -2507,22 +2612,28 @@ nrt_clear_node_state(void) &clean_window); if (err != NRT_SUCCESS) { error("nrt_command(clean_window, " - "%s, %u, %u): %s", + "%s, %s, %u): %s", clean_window.adapter_name, - clean_window.adapter_type, + _adapter_type_str(clean_window. + adapter_type), clean_window.window_id, nrt_err_str(err)); rc = SLURM_ERROR; continue; } #if NRT_DEBUG - info("nrt_command(clean_window, %s, %u, %u)", + info("nrt_command(clean_window, %s, %s, %u)", clean_window.adapter_name, - clean_window.adapter_type, + _adapter_type_str(clean_window. + adapter_type), clean_window.window_id); #endif } } + for (j = 0; j < max_windows; j++) { +//FIXME: invalid memory magic here +// xfree(status_array[j]); + } xfree(status_array); } #if NRT_DEBUG -- GitLab From bad0ac13df4df39fb0ad38152de731c97477fc0c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 8 Mar 2012 13:06:34 -0800 Subject: [PATCH 072/614] NRT - not working yet poe interface, but does talk to the slurmctld --- src/plugins/switch/nrt/libpermapi/Makefile.am | 24 +- src/plugins/switch/nrt/libpermapi/Makefile.in | 90 +++++- src/plugins/switch/nrt/libpermapi/shr_64.c | 268 +++++++++++++++++- 3 files changed, 365 insertions(+), 17 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am index cab6b872bf..f313f46b39 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.am +++ b/src/plugins/switch/nrt/libpermapi/Makefile.am @@ -11,6 +11,26 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common pkglib_LTLIBRARIES = libpermapi.la -libpermapi_la_SOURCES = shr_64.c -libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ +CPPFLAGS = -DMYSELF_SO=\"$(libdir)/slurm/libpermapi.so\" + +convenience_libs = \ $(top_builddir)/src/api/libslurm.o -ldl -lpthread + +srun_dir = $(top_srcdir)/src/srun + +libpermapi_la_SOURCES = shr_64.c \ + $(srun_dir)/opt.c \ + $(srun_dir)/srun_job.c \ + $(srun_dir)/srun_pty.c \ + $(srun_dir)/debugger.c \ + $(srun_dir)/fname.c \ + $(srun_dir)/allocate.c \ + $(srun_dir)/multi_prog.c \ + $(srun_dir)/task_state.c + +libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ + $(convenience_libs) + +force: +$(convenience_libs) : force + @cd `dirname $@` && $(MAKE) `basename $@` diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index 677438fa43..e83d89c887 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -108,7 +108,8 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) libpermapi_la_LIBADD = -am_libpermapi_la_OBJECTS = shr_64.lo +am_libpermapi_la_OBJECTS = shr_64.lo opt.lo srun_job.lo srun_pty.lo \ + debugger.lo fname.lo allocate.lo multi_prog.lo task_state.lo libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -155,7 +156,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CMD_LDFLAGS = @CMD_LDFLAGS@ CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ +CPPFLAGS = -DMYSELF_SO=\"$(libdir)/slurm/libpermapi.so\" CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -340,10 +341,23 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common # making a .la pkglib_LTLIBRARIES = libpermapi.la -libpermapi_la_SOURCES = shr_64.c -libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ +convenience_libs = \ $(top_builddir)/src/api/libslurm.o -ldl -lpthread +srun_dir = $(top_srcdir)/src/srun +libpermapi_la_SOURCES = shr_64.c \ + $(srun_dir)/opt.c \ + $(srun_dir)/srun_job.c \ + $(srun_dir)/srun_pty.c \ + $(srun_dir)/debugger.c \ + $(srun_dir)/fname.c \ + $(srun_dir)/allocate.c \ + $(srun_dir)/multi_prog.c \ + $(srun_dir)/task_state.c + +libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ + $(convenience_libs) + all: all-am .SUFFIXES: @@ -418,7 +432,15 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_pty.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task_state.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -441,6 +463,62 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +opt.lo: $(srun_dir)/opt.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opt.lo -MD -MP -MF $(DEPDIR)/opt.Tpo -c -o opt.lo `test -f '$(srun_dir)/opt.c' || echo '$(srcdir)/'`$(srun_dir)/opt.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/opt.Tpo $(DEPDIR)/opt.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/opt.c' object='opt.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opt.lo `test -f '$(srun_dir)/opt.c' || echo '$(srcdir)/'`$(srun_dir)/opt.c + +srun_job.lo: $(srun_dir)/srun_job.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srun_job.lo -MD -MP -MF $(DEPDIR)/srun_job.Tpo -c -o srun_job.lo `test -f '$(srun_dir)/srun_job.c' || echo '$(srcdir)/'`$(srun_dir)/srun_job.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/srun_job.Tpo $(DEPDIR)/srun_job.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/srun_job.c' object='srun_job.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srun_job.lo `test -f '$(srun_dir)/srun_job.c' || echo '$(srcdir)/'`$(srun_dir)/srun_job.c + +srun_pty.lo: $(srun_dir)/srun_pty.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srun_pty.lo -MD -MP -MF $(DEPDIR)/srun_pty.Tpo -c -o srun_pty.lo `test -f '$(srun_dir)/srun_pty.c' || echo '$(srcdir)/'`$(srun_dir)/srun_pty.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/srun_pty.Tpo $(DEPDIR)/srun_pty.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/srun_pty.c' object='srun_pty.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srun_pty.lo `test -f '$(srun_dir)/srun_pty.c' || echo '$(srcdir)/'`$(srun_dir)/srun_pty.c + +debugger.lo: $(srun_dir)/debugger.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debugger.lo -MD -MP -MF $(DEPDIR)/debugger.Tpo -c -o debugger.lo `test -f '$(srun_dir)/debugger.c' || echo '$(srcdir)/'`$(srun_dir)/debugger.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/debugger.Tpo $(DEPDIR)/debugger.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/debugger.c' object='debugger.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debugger.lo `test -f '$(srun_dir)/debugger.c' || echo '$(srcdir)/'`$(srun_dir)/debugger.c + +fname.lo: $(srun_dir)/fname.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fname.lo -MD -MP -MF $(DEPDIR)/fname.Tpo -c -o fname.lo `test -f '$(srun_dir)/fname.c' || echo '$(srcdir)/'`$(srun_dir)/fname.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fname.Tpo $(DEPDIR)/fname.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/fname.c' object='fname.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fname.lo `test -f '$(srun_dir)/fname.c' || echo '$(srcdir)/'`$(srun_dir)/fname.c + +allocate.lo: $(srun_dir)/allocate.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT allocate.lo -MD -MP -MF $(DEPDIR)/allocate.Tpo -c -o allocate.lo `test -f '$(srun_dir)/allocate.c' || echo '$(srcdir)/'`$(srun_dir)/allocate.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/allocate.Tpo $(DEPDIR)/allocate.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/allocate.c' object='allocate.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o allocate.lo `test -f '$(srun_dir)/allocate.c' || echo '$(srcdir)/'`$(srun_dir)/allocate.c + +multi_prog.lo: $(srun_dir)/multi_prog.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multi_prog.lo -MD -MP -MF $(DEPDIR)/multi_prog.Tpo -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multi_prog.Tpo $(DEPDIR)/multi_prog.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/multi_prog.c' object='multi_prog.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c + +task_state.lo: $(srun_dir)/task_state.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task_state.lo -MD -MP -MF $(DEPDIR)/task_state.Tpo -c -o task_state.lo `test -f '$(srun_dir)/task_state.c' || echo '$(srcdir)/'`$(srun_dir)/task_state.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/task_state.Tpo $(DEPDIR)/task_state.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/task_state.c' object='task_state.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task_state.lo `test -f '$(srun_dir)/task_state.c' || echo '$(srcdir)/'`$(srun_dir)/task_state.c + mostlyclean-libtool: -rm -f *.lo @@ -650,6 +728,10 @@ uninstall-am: uninstall-pkglibLTLIBRARIES tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES +force: +$(convenience_libs) : force + @cd `dirname $@` && $(MAKE) `basename $@` + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 402f708591..cc2e48e6b4 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -36,16 +36,28 @@ \*****************************************************************************/ #include +#include +#include +#include #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "src/common/xmalloc.h" +#include "src/common/xstring.h" #include "src/common/list.h" #include "src/common/hostlist.h" #include #include "src/srun/srun_job.h" +#include "src/srun/opt.h" +#include "src/srun/allocate.h" + +void *my_handle = NULL; +srun_job_t *job = NULL; + + +extern char **environ; /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task @@ -84,11 +96,12 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, */ extern void pe_rm_free(rmhandle_t *resource_mgr) { - srun_job_t *job = (srun_job_t *)*resource_mgr; - /* We are at the end so don't worry about freeing the + //srun_job_t *job = (srun_job_t *)*resource_mgr; + /* We are at the end so don't worry about freeing the srun_job_t pointer */ resource_mgr = NULL; + dlclose(my_handle); info("got pr_rm_free called"); } @@ -105,6 +118,9 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { info("got pr_rm_free_event called"); + if (job_event) { + xfree(*job_event); + } return 0; } @@ -128,24 +144,24 @@ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) * A job status change occurred, which results in one of the * following job states. In this case, the caller may need to take * appropriate action. - * JOB_STATE_RUNNING + * JOB_STATE_RUNNING * Indicates that the job has started. POE uses the * pe_rm_get_job_info function to return the job * information. When a job state of JOB_STATE_RUNNING has been * returned, the job has started running and POE can obtain the * job information by way of the pe_rm_get_job_info function call. - * JOB_STATE_NOTRUN + * JOB_STATE_NOTRUN * Indicates that the job was not run, and POE will terminate. - * JOB_STATE_PREEMPTED + * JOB_STATE_PREEMPTED * Indicates that the job was preempted. - * JOB_STATE_RESUMED + * JOB_STATE_RESUMED * Indicates that the job has resumed. * JOB_TIMER_EVENT * Indicates that no events occurred during the period * specified by pe_rm_timeout. * * IN resource_mgr - * IN job_event - The address of the pointer to the job_event_t + * OUT job_event - The address of the pointer to the job_event_t * type. If an event is generated successfully by the resource * manager, that event is saved at the location specified, and * pe_rm_get_event returns 0 (or a nonzero value, if the event @@ -169,7 +185,21 @@ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, int rm_timeout, char ** error_msg) { - info("got pr_rm_get_event called"); + job_event_t *ret_event = NULL; + job_info_t *job_info = NULL; + info("got pr_rm_get_event called %d %p %p", rm_timeout, + job_event, *job_event); + ret_event = xmalloc(sizeof(job_event_t)); + *job_event = ret_event; + ret_event->event = JOB_STATE_EVENT; + job_info = xmalloc(sizeof(job_info_t)); + ret_event->event_data = (void *)job_info; + job_info->procs = 1; + job_info->host_count = 1; + job_info->hosts = xmalloc(sizeof(host_usage_t)); + job_info->hosts->task_count = 1; + job_info->hosts->host_name = xstrdup("snowflake"); + return 0; } @@ -271,13 +301,29 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg) { - srun_job_t *job = NULL; /* SLURM was originally written against 1300, so we will * return that, no matter what comes in so we always work. */ *rmapi_version = 1300; *resource_mgr = (void *)job; - info("got pr_rm_init called"); +#ifdef MYSELF_SO + /* Since POE opens this lib without RTLD_LAZY | RTLD_GLOBAL we + just open ourself again with those options and bada bing + bada boom we are good to go with the symbols we need. + */ + my_handle = dlopen(MYSELF_SO, RTLD_LAZY | RTLD_GLOBAL); + if (!my_handle) { + debug("%s", dlerror()); + return 1; + } +#else + fatal("I haven't been told where I am. This should never happen."); +#endif + info("got pr_rm_init called %s", rm_id); + + /* Set up slurmctld message handler */ + slurmctld_msg_init(); + return 0; } @@ -321,7 +367,207 @@ extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, char** error_msg) { - info("got pr_rm_submit_job called"); + resource_allocation_response_msg_t *resp; + job_request_t *pe_job_req = NULL; + job_info_t *pe_job_info = NULL; + + info("got pr_rm_submit_job called %d", job_cmd.job_format); + if (job_cmd.job_format != 1) { + /* We don't handle files */ + error("SLURM doesn't handle files to submit_job"); + return 1; + } + + pe_job_req = (job_request_t *)job_cmd.job_command; + + info("job_type\t= %d", pe_job_req->job_type); + info("num_nodes\t= %d", pe_job_req->num_nodes); + info("tasks_per_node\t= %d", pe_job_req->tasks_per_node); + info("total_tasks\t= %d", pe_job_req->total_tasks); + info("usage_mode\t= %d", pe_job_req->node_usage); + //info("netowrk_usage\t= %d", pe_job_req->network_usage); + info("check_pointable\t= %d", pe_job_req->check_pointable); + info("check_dir\t= %s", pe_job_req->check_dir); + info("task_affinity\t= %s", pe_job_req->task_affinity); + info("pthreads\t= %d", pe_job_req->parallel_threads); + info("pool\t= %s", pe_job_req->pool); + info("save_job\t= %s", pe_job_req->save_job_file); + info("require\t= %s", pe_job_req->requirements); + info("node_topology\t= %s", pe_job_req->node_topology); + + int i; + char *saved_argv = getenv("MP_I_SAVED_ARGV"), + *tmp_char = NULL, *walking_char = NULL; + int my_argc = 1; + char **my_argv; + tmp_char = saved_argv; + i = 0; + while (tmp_char[i]) { + if (tmp_char[i] != ' ') { + i++; + continue; + } + i++; + while (tmp_char[i] && tmp_char[i] == ' ') { + i++; + } + my_argc++; + } + my_argv = (char **) xmalloc((my_argc + 1) * sizeof(char *)); + tmp_char = xstrdup(saved_argv); + walking_char = tmp_char; + my_argc = 0; + i = 0; + while (tmp_char[i]) { + if (tmp_char[i] != ' ') { + i++; + continue; + } + tmp_char[i] = '\0'; + i++; + my_argv[my_argc] = xstrdup(walking_char); + my_argc++; + + while (tmp_char[i] && tmp_char[i] == ' ') + i++; + walking_char = tmp_char + i; + } + if (walking_char) { + my_argv[my_argc] = xstrdup(walking_char); + my_argc++; + } + xfree(tmp_char); + + /* if (environ == NULL) { */ + /* error("no environ"); */ + /* return 1; */ + /* } */ + /* for (i=0; environ[i]; i++) { */ + /* info("%s", environ[i]); */ + /* } */ + + initialize_and_process_args(my_argc, my_argv); + i = 0; + while(my_argv[i]) { + //info("freeing %s", my_argv[i]); + xfree(my_argv[i]); + i++; + } + xfree(my_argv); + + /* opt.min_nodes = pe_job_req->num_nodes; */ + /* if (pe_job_req->tasks_per_node != -1) */ + /* opt.ntasks_per_node = pe_job_req->tasks_per_node; */ + /* opt.ntasks = pe_job_req->total_tasks; */ + info("got part of %s", opt.partition); + if (!opt.partition) + opt.partition = xstrdup(pe_job_req->pool); +/* /\* now global "opt" should be filled in and available, */ +/* * create a job from opt */ +/* *\/ */ +/* if (opt.test_only) { */ +/* int rc = allocate_test(); */ +/* if (rc) { */ +/* slurm_perror("allocation failure"); */ +/* exit (1); */ +/* } */ +/* exit (0); */ + +/* } else if (opt.no_alloc) { */ +/* info("do not allocate resources"); */ +/* job = job_create_noalloc(); */ +/* if (create_job_step(job, false) < 0) { */ +/* exit(error_exit); */ +/* } */ +/* } else if ((resp = existing_allocation())) { */ +/* select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, */ +/* &resp->node_cnt); */ +/* if (opt.nodes_set_env && !opt.nodes_set_opt && */ +/* (opt.min_nodes > resp->node_cnt)) { */ +/* /\* This signifies the job used the --no-kill option */ +/* * and a node went DOWN or it used a node count range */ +/* * specification, was checkpointed from one size and */ +/* * restarted at a different size *\/ */ +/* error("SLURM_NNODES environment varariable " */ +/* "conflicts with allocated node count (%u!=%u).", */ +/* opt.min_nodes, resp->node_cnt); */ +/* /\* Modify options to match resource allocation. */ +/* * NOTE: Some options are not supported *\/ */ +/* opt.min_nodes = resp->node_cnt; */ +/* xfree(opt.alloc_nodelist); */ +/* if (!opt.ntasks_set) */ +/* opt.ntasks = opt.min_nodes; */ +/* } */ +/* if (opt.alloc_nodelist == NULL) */ +/* opt.alloc_nodelist = xstrdup(resp->node_list); */ +/* if (opt.exclusive) */ +/* _step_opt_exclusive(); */ +/* _set_env_vars(resp); */ +/* if (_validate_relative(resp)) */ +/* exit(error_exit); */ +/* job = job_step_create_allocation(resp); */ +/* slurm_free_resource_allocation_response_msg(resp); */ + +/* if (opt.begin != 0) { */ +/* error("--begin is ignored because nodes" */ +/* " are already allocated."); */ +/* } */ +/* if (!job || create_job_step(job, false) < 0) */ +/* exit(error_exit); */ +/* } else { */ +/* /\* Combined job allocation and job step launch *\/ */ +/* #if defined HAVE_FRONT_END && (!defined HAVE_BG || defined HAVE_BG_L_P || !defined HAVE_BG_FILES) */ +/* uid_t my_uid = getuid(); */ +/* if ((my_uid != 0) && */ +/* (my_uid != slurm_get_slurm_user_id())) { */ +/* error("srun task launch not supported on this system"); */ +/* exit(error_exit); */ +/* } */ +/* #endif */ + if (opt.relative_set && opt.relative) { + fatal("--relative option invalid for job allocation " + "request"); + } + + if (!opt.job_name_set_env && opt.job_name_set_cmd) + setenvfs("SLURM_JOB_NAME=%s", opt.job_name); + else if (!opt.job_name_set_env && opt.argc) + setenvfs("SLURM_JOB_NAME=%s", opt.argv[0]); + + if ( !(resp = allocate_nodes()) ) + return error_exit; + + //got_alloc = true; + //_print_job_information(resp); + //_set_env_vars(resp); + /* if (_validate_relative(resp)) { */ + /* slurm_complete_job(resp->job_id, 1); */ + /* return error_exit; */ + /* } */ + job = job_create_allocation(resp); + + opt.exclusive = false; /* not applicable for this step */ + opt.time_limit = NO_VAL;/* not applicable for step, only job */ + xfree(opt.constraints); /* not applicable for this step */ + if (!opt.job_name_set_cmd && opt.job_name_set_env) { + /* 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=%u", opt.uid); */ + + if (!job || create_job_step(job, true) < 0) { + slurm_complete_job(resp->job_id, 1); + return error_exit; + } + + slurm_free_resource_allocation_response_msg(resp); + /* } */ + //*resource_mgr = (void *)pe_job; return 0; } -- GitLab From d4f8743bcda404e1f00a776195ebc15e20e64fd5 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 8 Mar 2012 16:05:37 -0800 Subject: [PATCH 073/614] now in the next state. unsure where to go waiting on IBM. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 49 +++++++++++++++++----- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index cc2e48e6b4..9c8916e3b3 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -186,19 +186,16 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, int rm_timeout, char ** error_msg) { job_event_t *ret_event = NULL; - job_info_t *job_info = NULL; + int *state; info("got pr_rm_get_event called %d %p %p", rm_timeout, job_event, *job_event); + ret_event = xmalloc(sizeof(job_event_t)); *job_event = ret_event; ret_event->event = JOB_STATE_EVENT; - job_info = xmalloc(sizeof(job_info_t)); - ret_event->event_data = (void *)job_info; - job_info->procs = 1; - job_info->host_count = 1; - job_info->hosts = xmalloc(sizeof(host_usage_t)); - job_info->hosts->task_count = 1; - job_info->hosts->host_name = xstrdup("snowflake"); + state = xmalloc(sizeof(int)); + *state = JOB_STATE_RUNNING; + ret_event->event_data = (void *)state; return 0; } @@ -220,7 +217,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, * environment of the process that originally called the function. * * IN resource_mgr - * IN job_info - The address of the pointer to the job_info_t + * OUT job_info - The address of the pointer to the job_info_t * type. The job_info_t type contains the job information * returned by the resource manager for the handle that is * specified. The caller itself must free the data areas that @@ -235,7 +232,39 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char ** error_msg) { - info("got pr_rm_get_job_info called"); + job_info_t *ret_info = xmalloc(sizeof(job_info_t)); + + info("got pr_rm_get_job_info called %p %p", job_info, *job_info); + + *job_info = ret_info; + + ret_info->job_name = xstrdup("test"); + ret_info->rm_id = xstrdup("1"); + ret_info->procs = 1; + ret_info->max_instances = 1; + ret_info->job_key = 1; + ret_info->check_pointable = 0; + ret_info->protocol = NULL; + ret_info->mode = NULL; + ret_info->instance = NULL; + ret_info->devicename = NULL; + ret_info->num_network = 1; + ret_info->host_count = 1; + + ret_info->hosts = xmalloc(sizeof(host_usage_t)); + ret_info->hosts->task_count = 1; + ret_info->hosts->task_ids = xmalloc(sizeof(int)); + *ret_info->hosts->task_ids = 1; + ret_info->hosts->host_name = xstrdup("snowflake"); + ret_info->hosts->virtual_ip = xstrdup("127.0.0.1"); + ret_info->hosts->host_address = xstrdup("127.0.0.1"); + + ret_info->rset_name = NULL; + ret_info->master_virtual_ip = NULL; + ret_info->mdcr_jobid = 1; + ret_info->mdcr_netmask = NULL; + ret_info->ckptdir = NULL; + return 0; } -- GitLab From 3f4d053cdfe26c7fc96258ddfc9617ca4b2674a1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 9 Mar 2012 08:26:32 -0800 Subject: [PATCH 074/614] Handle down pnsd daemon better --- src/plugins/switch/nrt/nrt.c | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 1dddb0288a..0a5e381ed1 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -251,8 +251,16 @@ _fill_in_adapter_cache(void) #endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, - &adapter_types); + for (i = 0; i < 2; i++) { + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_EAGAIN) + break; + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + error("Is pnsd daemon started? Retrying..."); + /* Run "/opt/ibmhpc/pecurrent/ppe.pami/pnsd/pnsd -A" */ + sleep(5); + } if (err != NRT_SUCCESS) { error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; @@ -1147,8 +1155,16 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) #endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, - &adapter_types); + for (i = 0; i < 2; i++) { + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_EAGAIN) + break; + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + error("Is pnsd daemon started? Retrying..."); + /* Run "/opt/ibmhpc/pecurrent/ppe.pami/pnsd/pnsd -A" */ + sleep(5); + } if (err != NRT_SUCCESS) { error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; @@ -2522,8 +2538,16 @@ nrt_clear_node_state(void) #endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; - err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, - &adapter_types); + for (i = 0; i < 2; i++) { + err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, + &adapter_types); + if (err != NRT_EAGAIN) + break; + error("nrt_command(adapter_types): %s", nrt_err_str(err)); + error("Is pnsd daemon started? Retrying..."); + /* Run "/opt/ibmhpc/pecurrent/ppe.pami/pnsd/pnsd -A" */ + sleep(5); + } if (err != NRT_SUCCESS) { error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; -- GitLab From 7d96a29c95a754ead8fe8392cb92345293cce0e8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 9 Mar 2012 10:10:47 -0800 Subject: [PATCH 075/614] Major updates for nrt_command(NRT_CMD_STATUS_ADAPTER) logic --- src/plugins/switch/nrt/nrt.c | 173 ++++++++++++++++------------- src/plugins/switch/nrt/slurm_nrt.h | 2 + 2 files changed, 100 insertions(+), 75 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 0a5e381ed1..e73ca494ac 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -859,6 +859,8 @@ _win_state_str(win_state_t state) return "Unavailable"; else if (state == NRT_WIN_INVALID) return "Invalid"; + else if (state == NRT_WIN_AVAILABLE) + return "Available"; else if (state == NRT_WIN_RESERVED) return "Reserved"; else if (state == NRT_WIN_READY) @@ -938,14 +940,14 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" type: %hu", a->adapter_type); info(" window_count: %hu", a->window_count); w = a->window_list; - for (j = 0; j < a->window_count; j++) { + for (j = 0; j < MIN(a->window_count, NRT_DEBUG_CNT); j++) { #if (NRT_DEBUG < 2) if (w[j].state != NRT_WIN_AVAILABLE) continue; #endif - info(" window %hu: %s", w->window_id, + info(" window %hu: %s", w[j].window_id, _win_state_str(w->state)); - info(" job_key %hu", w->job_key); + info(" job_key %hu", w[j].job_key); } } info("--End Node Info--"); @@ -1191,15 +1193,24 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } #if NRT_DEBUG for (j = 0; j < num_adapter_names; j++) { - info("nrt_command(adapter_names, %s, %s)", + info("nrt_command(adapter_names, %s, %s) " + "max_windows: %hu", adapter_names.adapter_names[j], - _adapter_type_str(adapter_names.adapter_type)); + _adapter_type_str(adapter_names.adapter_type), + max_windows); } #endif status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); for (j = 0; j < max_windows; j++) { - status_array[j] = xmalloc(sizeof(nrt_status_t) * - max_windows); + /* + * WARNING: DO NOT USE xmalloc here! + * + * The nrt_command(NRT_CMD_STATUS_ADAPTER) function + * changes pointer values and returns memory that is + * allocated with malloc() and deallocated with free() + */ + status_array[j] = malloc(sizeof(nrt_status_t) * + max_windows); } for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; @@ -1221,20 +1232,17 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; } #if NRT_DEBUG - error("nrt_command(status_adapter, %s, %s), count:%hu", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type), - window_count); - for (k = 0; k < window_count; k++) { - if (adapter_status.status_array[k]->state == - NRT_WIN_UNAVAILABLE) - continue; + info("nrt_command(status_adapter, %s, %s), " + "window_count:%hu", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type), + window_count); + for (k = 0; k < MIN(window_count, NRT_DEBUG_CNT); k++){ info("window_id:%d uid:%d pid:%d state:%s", - adapter_status.status_array[k]->window_id, - adapter_status.status_array[k]->uid, - adapter_status.status_array[k]->client_pid, - _win_state_str(adapter_status. - status_array[k]->state)); + (*status_array)[k].window_id, + (*status_array)[k].uid, + (*status_array)[k].client_pid, + _win_state_str((*status_array)[k].state)); } #endif adapter_ptr = &n->adapter_list[n->adapter_count]; @@ -1247,28 +1255,20 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) window_count[0]; adapter_ptr->window_list = xmalloc(sizeof(slurm_nrt_window_t) * - adapter_ptr->window_count); + window_count); n->adapter_count++; for (k = 0; k < window_count; k++) { - if (adapter_status.status_array[k]->state == - NRT_WIN_UNAVAILABLE) - continue; slurm_nrt_window_t *window_ptr; window_ptr = adapter_ptr->window_list + k; - window_ptr->window_id = adapter_status. - status_array[k]-> + window_ptr->window_id = (*status_array)[k]. window_id; - window_ptr->state = adapter_status. - status_array[k]-> - state; - window_ptr->job_key = adapter_status. - status_array[k]-> - client_pid; + window_ptr->state = (*status_array)[k].state; + window_ptr->job_key = (*status_array)[k]. + client_pid; } } for (j = 0; j < max_windows; j++) { -//FIXME: invalid memory magic here -// xfree(status_array[j]); + free(status_array[j]); } xfree(status_array); } @@ -2051,16 +2051,27 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, unsigned int max_windows) { int err, i, j; + int rc = SLURM_ERROR; nrt_cmd_status_adapter_t status_adapter; - nrt_status_t *status_array = NULL; + nrt_status_t **status_array = NULL; nrt_window_id_t window_count; - nrt_status_t *status = NULL; - status_array = xmalloc(sizeof(nrt_status_t) * max_windows); + status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); + for (j = 0; j < max_windows; j++) { + /* + * WARNING: DO NOT USE xmalloc here! + * + * The nrt_command(NRT_CMD_STATUS_ADAPTER) function + * changes pointer values and returns memory that is + * allocated with malloc() and deallocated with free() + */ + status_array[j] = malloc(sizeof(nrt_status_t) * max_windows); + } status_adapter.adapter_name = adapter_name; status_adapter.adapter_type = adapter_type; - status_adapter.status_array = &status_array; + status_adapter.status_array = status_array; status_adapter.window_count = &window_count; + for (i = 0; i < retry; i++) { if (i > 0) sleep(1); @@ -2077,25 +2088,32 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, _print_adapter_status(&status_adapter); #endif for (j = 0; j < window_count; j++) { - status = status_adapter.status_array[j]; - if (status->window_id == window_id) + if ((*status_array)[j].window_id == window_id) break; } if (j >= window_count) { - error("nrt_status_adapter(%s, %hu), window %hu not " + error("nrt_status_adapter(%s, %s), window %hu not " "found", - adapter_name, (int)adapter_type, window_id); + adapter_name, _adapter_type_str(adapter_type), + window_id); break; } - if (status->state == NRT_WIN_AVAILABLE) - return SLURM_SUCCESS; - debug2("nrt_status_adapter(%s, %d), window %u state %s", - adapter_name, (int) adapter_type, window_id, - _win_state_str(status->state)); + if ((*status_array)[j].state == NRT_WIN_AVAILABLE) { + rc = SLURM_SUCCESS; + break; + } + debug2("nrt_status_adapter(%s, %s), window %u state %s", + adapter_name, + _adapter_type_str(adapter_type), window_id, + _win_state_str((*status_array)[j].state)); } + + for (j = 0; j < max_windows; j++) { + free(status_array[j]); + } xfree(status_array); - return SLURM_ERROR; + return rc; } /* @@ -2574,15 +2592,24 @@ nrt_clear_node_state(void) } #if NRT_DEBUG for (j = 0; j < num_adapter_names; j++) { - info("nrt_command(adapter_names, %s, %s)", - adapter_names.adapter_names[j], - _adapter_type_str(adapter_names.adapter_type)); + info("nrt_command(adapter_names, %s, %s) " + "max_windows: %hu", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names.adapter_type), + max_windows); } #endif status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); for (j = 0; j < max_windows; j++) { - status_array[j] = xmalloc(sizeof(nrt_status_t) * - max_windows); + /* + * WARNING: DO NOT USE xmalloc here! + * + * The nrt_command(NRT_CMD_STATUS_ADAPTER) function + * changes pointer values and returns memory that is + * allocated with malloc() and deallocated with free() + */ + status_array[j] = malloc(sizeof(nrt_status_t) * + max_windows); } for (j = 0; j < num_adapter_names; j++) { adapter_status.adapter_name = adapter_names. @@ -2603,33 +2630,27 @@ nrt_clear_node_state(void) continue; } #if NRT_DEBUG - error("nrt_command(status_adapter, %s, %s), count:%hu", + error("nrt_command(status_adapter, %s, %s), " + "window_count:%hu", adapter_status.adapter_name, _adapter_type_str(adapter_status.adapter_type), window_count); - for (k = 0; k < window_count; k++) { - if (adapter_status.status_array[k]->state == - NRT_WIN_UNAVAILABLE) - continue; + /* Only log first NRT_DEBUG_CNT windows here */ + for (k = 0; k < MIN(window_count, NRT_DEBUG_CNT); k++){ info("window_id:%d uid:%d pid:%d state:%s", - adapter_status.status_array[k]->window_id, - adapter_status.status_array[k]->uid, - adapter_status.status_array[k]->client_pid, - _win_state_str(adapter_status. - status_array[k]->state)); + (*status_array)[k].window_id, + (*status_array)[k].uid, + (*status_array)[k].client_pid, + _win_state_str((*status_array)[k].state)); } #endif for (k = 0; k < window_count; k++) { - if (adapter_status.status_array[k]->state == - NRT_WIN_UNAVAILABLE) - continue; clean_window.adapter_name = adapter_names. adapter_names[j]; clean_window.adapter_type = adapter_names. adapter_type; clean_window.leave_inuse_or_kill = KILL; - clean_window.window_id = adapter_status. - status_array[k]-> + clean_window.window_id = (*status_array)[k]. window_id; err = nrt_command(NRT_VERSION, NRT_CMD_CLEAN_WINDOW, @@ -2646,17 +2667,19 @@ nrt_clear_node_state(void) continue; } #if NRT_DEBUG - info("nrt_command(clean_window, %s, %s, %u)", - clean_window.adapter_name, - _adapter_type_str(clean_window. - adapter_type), - clean_window.window_id); + if (k < NRT_DEBUG_CNT) { + info("nrt_command(clean_window, " + "%s, %s, %u)", + clean_window.adapter_name, + _adapter_type_str(clean_window. + adapter_type), + clean_window.window_id); + } #endif } } for (j = 0; j < max_windows; j++) { -//FIXME: invalid memory magic here -// xfree(status_array[j]); + free(status_array[j]); } xfree(status_array); } diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 139aa2994a..2060bd597e 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -78,6 +78,8 @@ enum { }; #define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ +#define NRT_DEBUG_CNT 16 /* Count of windows, adapters, etc to log + * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) -- GitLab From 89529e3250f369114b86c4804f04132880100197 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 9 Mar 2012 11:55:56 -0800 Subject: [PATCH 076/614] Lots of minor NRT updates --- src/plugins/switch/nrt/nrt.c | 36 +++++++++++++++++++++++------ src/plugins/switch/nrt/switch_nrt.c | 11 +++++---- 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e73ca494ac..567779ac9e 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -742,6 +742,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, /* Reserve a window on each adapter for this task */ for (i = 0; i < adapter_cnt; i++) { adapter = &node->adapter_list[i]; + if (adapter->adapter_type != adapter_type) + continue; window = _find_free_window(adapter); if (window == NULL) { error("No free windows on node %s adapter %s", @@ -906,8 +908,9 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) int i; info("--Begin Adapter Status--"); - info(" adapter_name:%s adapter_type:%hu", - status_adapter->adapter_name, status_adapter->adapter_type); + info(" adapter_name:%s adapter_type:%s", + status_adapter->adapter_name, + _adapter_type_str(status_adapter->adapter_type)); for (i = 0; i < *status_adapter->window_count; i++) { nrt_status_t *status = status_adapter->status_array[i]; info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); @@ -936,8 +939,9 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_count: %u", n->adapter_count); for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; - info(" adapter: %s", a->adapter_name); - info(" type: %hu", a->adapter_type); + info(" adapter_name: %s", a->adapter_name); + info(" adapter_type: %s", + _adapter_type_str(a->adapter_type)); info(" window_count: %hu", a->window_count); w = a->window_list; for (j = 0; j < MIN(a->window_count, NRT_DEBUG_CNT); j++) { @@ -962,7 +966,7 @@ _print_libstate(const slurm_nrt_libstate_t *l) assert(l); assert(l->magic == NRT_LIBSTATE_MAGIC); - info("--Begin libstate--\n"); + info("--Begin libstate--"); info(" node_count = %u", l->node_count); info(" node_max = %u", l->node_max); info(" hash_max = %u", l->hash_max); @@ -1024,7 +1028,10 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %u", j->bulk_xfer); info(" tables_per_task: %hu", j->tables_per_task); - hostlist_ranged_string(j->nodenames, sizeof(buf), buf); + if (j->nodenames) + hostlist_ranged_string(j->nodenames, sizeof(buf), buf); + else + strcpy(buf, "(NULL)"); info(" nodenames: %s", buf); info(" num_tasks: %d", j->num_tasks); info(" tableinfo supressed"); @@ -1693,7 +1700,9 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, slurm_seterrno_ret(EINVAL); jp->bulk_xfer = (uint8_t) bulk_xfer; - jp->job_key = _next_key(); + jp->job_key = _next_key(); + jp->nodenames = hostlist_copy(hl); + jp->num_tasks = nprocs; hi = hostlist_iterator_create(hl); @@ -1732,7 +1741,12 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, jp->tableinfo[i].table = xmalloc(nprocs * table_rec_len); } +#if NRT_DEBUG + info("Allocating windows: adapter_name:%s adapter_type:%s", + adapter_name, _adapter_type_str(adapter_type)); +#else debug("Allocating windows"); +#endif nnodes = hostlist_count(hl); full_node_cnt = nprocs % nnodes; min_procs_per_node = nprocs / nnodes; @@ -1835,6 +1849,10 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); assert(buf); +#if NRT_DEBUG + info("nrt_pack_jobinfo:"); + _print_jobinfo(j); +#endif pack32(j->magic, buf); pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); @@ -1921,6 +1939,10 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) goto unpack_error; } +#if NRT_DEBUG + info("nrt_unpack_jobinfo:"); + _print_jobinfo(j); +#endif return SLURM_SUCCESS; unpack_error: diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 9585792215..4dfb6daba7 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -1,6 +1,6 @@ /***************************************************************************** \ - * nrt.c - Library routines for initiating jobs using IBM's NRT (Network - * Routing Table) + * switch_nrt.c - Swtich plugin interface, This calls functions in nrt.c + * which contains the interface to IBM's NRT (Network Routing Table) API ***************************************************************************** * Copyright (C) 2004-2007 The Regents of the University of California. * Copyright (C) 2008 Lawrence Livermore National Security. @@ -425,7 +425,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, char *adapter_name = NULL; #if NRT_DEBUG - info("switch_p_build_jobinfo(): network:%s", network); + info("switch_p_build_jobinfo(): nodelist:%s network:%s", + nodelist, network); #else debug3("network = \"%s\"", network); #endif @@ -464,8 +465,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, (strstr(network, "bulk_xfer") || strstr(network, "BULK_XFER"))) bulk_xfer = 1; - err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, - nprocs, sn_all, adapter_name, + err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, + list, nprocs, sn_all, adapter_name, bulk_xfer); hostlist_destroy(list); xfree(adapter_name); -- GitLab From 29cb26e6f4d67db650c5a46ab050c17219d545fa Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 9 Mar 2012 13:51:12 -0800 Subject: [PATCH 077/614] Various logging improvements --- src/plugins/switch/nrt/nrt.c | 45 ++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 567779ac9e..26e5ca9f41 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -756,6 +756,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + strncpy(ib_table->device_name, adapter->adapter_name, + NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; ib_table->task_id = task_id; ib_table->win_id = window->window_id; @@ -835,6 +837,8 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + strncpy(ib_table->device_name, adapter_name, + NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; ib_table->task_id = task_id; ib_table->win_id = window->window_id; @@ -911,7 +915,8 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) info(" adapter_name:%s adapter_type:%s", status_adapter->adapter_name, _adapter_type_str(status_adapter->adapter_type)); - for (i = 0; i < *status_adapter->window_count; i++) { + for (i = 0; i < MIN(*status_adapter->window_count, NRT_DEBUG_CNT); + i++) { nrt_status_t *status = status_adapter->status_array[i]; info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); info(" uid[%d]:%u", i, (uint32_t) status->uid); @@ -919,6 +924,7 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) info(" bulk_xfer[%d]:%hu", i, status->bulk_transfer); info(" rcontext_blocks[%d]:%u", i, status->rcontext_blocks); info(" state[%d]:%s", i, _win_state_str(status->state)); + info(" --------"); } info("--End Adapter Status--"); } @@ -1018,6 +1024,7 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) static void _print_jobinfo(slurm_nrt_jobinfo_t *j) { + int i; char buf[128]; assert(j); @@ -1034,7 +1041,11 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) strcpy(buf, "(NULL)"); info(" nodenames: %s", buf); info(" num_tasks: %d", j->num_tasks); - info(" tableinfo supressed"); + for (i = 0; i < j->tables_per_task; i++) { + _print_table(j->tableinfo[i].table, + j->tableinfo[i].table_length, + j->tableinfo[i].adapter_type); + } info("--End Jobinfo--"); } #endif @@ -1170,7 +1181,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) if (err != NRT_EAGAIN) break; error("nrt_command(adapter_types): %s", nrt_err_str(err)); - error("Is pnsd daemon started? Retrying..."); + error("Is PNSD daemon started? Retrying..."); /* Run "/opt/ibmhpc/pecurrent/ppe.pami/pnsd/pnsd -A" */ sleep(5); } @@ -1734,8 +1745,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, table_rec_len = sizeof(nrt_ib_task_info_t); else if (adapter_type == NRT_HFI) table_rec_len = sizeof(nrt_hfi_task_info_t); - else - fatal("Unsupported adapter_type: %u", adapter_type); + else { + fatal("Unsupported adapter_type: %s", + _adapter_type_str(adapter_type)); + } for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; jp->tableinfo[i].table = xmalloc(nprocs * table_rec_len); @@ -1790,8 +1803,11 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, #if NRT_DEBUG info("nrt_build_jobinfo"); - _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length, - adapter_type); + for (i = 0; i < nnodes; i++) { + _print_table(jp->tableinfo[i].table, + jp->tableinfo[i].table_length, + jp->tableinfo[i].adapter_type); + } #endif hostlist_iterator_destroy(hi); @@ -2216,7 +2232,8 @@ _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) } #if NRT_DEBUG info("_check_rdma_job_count: nrt_rdma_jobs:"); - info("adapter_name:%s adapter_type:%hu", adapter_name, adapter_type); + info("adapter_name:%s adapter_type:%s", adapter_name, + _adapter_type_str(adapter_type)); for (i = 0; i < job_count; i++) info(" job_keys[%d]:%hu", i, job_keys[i]); #endif @@ -2302,6 +2319,9 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) } umask(nrt_umask); +#if NRT_DEBUG + info("nrt_load_table complete"); +#endif return SLURM_SUCCESS; } @@ -2370,6 +2390,10 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); +#if NRT_DEBUG + info("nrt_unload_table"); + _print_jobinfo(jp); +#endif for (i = 0; i < jp->tables_per_task; i++) { for (j = 0; j < jp->tableinfo[i].table_length; j++) { if (jp->tableinfo[i].adapter_type == NRT_IB) { @@ -2386,8 +2410,9 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) window_id = hfi_tbl_ptr->win_id; } else { fatal("nrt_unload_table: invalid adapter " - "type: %hu", - jp->tableinfo[i].adapter_type); + "type: %s", + _adapter_type_str(jp->tableinfo[i]. + adapter_type)); } err = _unload_window(jp->tableinfo[i].adapter_name, jp->tableinfo[i].adapter_type, -- GitLab From 5ca33ed63949d72c9bb41c9cf43d469f2078439f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 9 Mar 2012 15:09:41 -0800 Subject: [PATCH 078/614] Minor changes in NRT logging --- src/plugins/switch/nrt/nrt.c | 42 ++++++++++++++++++++++-------- src/plugins/switch/nrt/slurm_nrt.h | 4 +-- 2 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 26e5ca9f41..896dd078dd 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -912,9 +912,11 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) int i; info("--Begin Adapter Status--"); - info(" adapter_name:%s adapter_type:%s", - status_adapter->adapter_name, + info(" adapter_name:%s", status_adapter->adapter_name); + info(" adapter_type:%s", _adapter_type_str(status_adapter->adapter_type)); + info(" window_count:%hu", *status_adapter->window_count); + info(" --------"); for (i = 0; i < MIN(*status_adapter->window_count, NRT_DEBUG_CNT); i++) { nrt_status_t *status = status_adapter->status_array[i]; @@ -1014,7 +1016,8 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) info(" lid: %u", hfi_tbl_ptr->lid); info(" win_id: %hu", hfi_tbl_ptr->win_id); } else { - fatal("Unsupported adapter type: %u", adapter_type); + fatal("Unsupported adapter_type: %s", + _adapter_type_str(adapter_type)); } } info("--End NRT table--"); @@ -1701,6 +1704,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, int min_procs_per_node; int max_procs_per_node; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; + int adapter_type_count = 0; int table_rec_len = 0; assert(jp); @@ -1726,13 +1730,23 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, host = hostlist_next(hi); _lock(); node = _find_node(nrt_state, host); + if (node && node->adapter_list) { + for (i = 0; i < node->adapter_count; i++) { + if ((node->adapter_list[i].adapter_type != NRT_IB) && + (node->adapter_list[i].adapter_type != NRT_HFI)) + continue; + if (adapter_type == NRT_MAX_ADAPTER_TYPES) { + adapter_type = node->adapter_list[i]. + adapter_type; + } + adapter_type_count++; + } + } if (sn_all) { - jp->tables_per_task = node ? node->adapter_count : 0; + jp->tables_per_task = adapter_type_count; } else { jp->tables_per_task = 1; } - if (node && node->adapter_list) - adapter_type = node->adapter_list->adapter_type; _unlock(); if (host != NULL) free(host); @@ -1831,6 +1845,8 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) for (i = 0, ib_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ib_tbl_ptr++) { + packmem(ib_tbl_ptr->device_name, + NRT_MAX_DEVICENAME_SIZE, buf); pack32(ib_tbl_ptr->task_id, buf); pack32(ib_tbl_ptr->base_lid, buf); pack16(ib_tbl_ptr->win_id, buf); @@ -1897,6 +1913,9 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) for (i = 0, ib_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ib_tbl_ptr++) { + safe_unpackmem(ib_tbl_ptr->device_name, &size, buf); + if (size != NRT_MAX_DEVICENAME_SIZE) + goto unpack_error; safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack32(&ib_tbl_ptr->base_lid, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); @@ -2176,8 +2195,9 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_NAMES, &adapter_names); if (err != NRT_SUCCESS) { - error("nrt_command(adapter_names, %u): %s", - adapter_names.adapter_type, nrt_err_str(err)); + error("nrt_command(adapter_names, %s): %s", + _adapter_type_str(adapter_names.adapter_type), + nrt_err_str(err)); rc = SLURM_ERROR; max_windows = 16; /* FIXME: What should this be? */ } @@ -2195,7 +2215,8 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) window_id = hfi_tbl_ptr->win_id; } else { fatal("_wait_for_all_windows: Missing support for " - "adapter type %hu", tableinfo->adapter_type); + "adapter_type:%s", + _adapter_type_str(tableinfo->adapter_type)); } err = _wait_for_window_unloaded(tableinfo->adapter_name, @@ -2312,8 +2333,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) load_table.per_task_input = jp->tableinfo[i].table; err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); if (err != NRT_SUCCESS) { - error("unable to load table: [%d] %s", - err, nrt_err_str(err)); + error("nrt_command(load table): %s", nrt_err_str(err)); return SLURM_ERROR; } } diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 2060bd597e..54a925b59b 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -78,8 +78,8 @@ enum { }; #define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ -#define NRT_DEBUG_CNT 16 /* Count of windows, adapters, etc to log - * use this to limit volume of logging */ +#define NRT_DEBUG_CNT 8 /* Count of windows, adapters, etc to log + * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) -- GitLab From 40bb665a357c8a87a896e223c5a93d7ebfc20b1f Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 12 Mar 2012 11:50:10 -0700 Subject: [PATCH 079/614] ok poe plugin gets to pe_rm_connect with the hardcoded stuff now. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 24 +++++++++++++--------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 9c8916e3b3..e7dca9b6fc 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -238,33 +238,37 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, *job_info = ret_info; - ret_info->job_name = xstrdup("test"); - ret_info->rm_id = xstrdup("1"); + ret_info->job_name = xstrdup("hostname"); + ret_info->rm_id = NULL; ret_info->procs = 1; ret_info->max_instances = 1; ret_info->job_key = 1; ret_info->check_pointable = 0; - ret_info->protocol = NULL; - ret_info->mode = NULL; - ret_info->instance = NULL; - ret_info->devicename = NULL; + ret_info->protocol = xmalloc(sizeof(char *)*2); + ret_info->protocol[0] = xstrdup("mpi"); + ret_info->mode = xmalloc(sizeof(char *)*2); + ret_info->mode[0] = xstrdup("IP/US"); + ret_info->instance = xmalloc(sizeof(int)); + *ret_info->instance = 1; + ret_info->devicename = xmalloc(sizeof(char *)*2); + ret_info->devicename[0] = xstrdup("sn_all"); ret_info->num_network = 1; ret_info->host_count = 1; ret_info->hosts = xmalloc(sizeof(host_usage_t)); ret_info->hosts->task_count = 1; ret_info->hosts->task_ids = xmalloc(sizeof(int)); - *ret_info->hosts->task_ids = 1; - ret_info->hosts->host_name = xstrdup("snowflake"); + *ret_info->hosts->task_ids = 0; + ret_info->hosts->host_name = xstrdup("localhost"); ret_info->hosts->virtual_ip = xstrdup("127.0.0.1"); ret_info->hosts->host_address = xstrdup("127.0.0.1"); ret_info->rset_name = NULL; - ret_info->master_virtual_ip = NULL; + ret_info->master_virtual_ip = xstrdup("127.0.0.1"); ret_info->mdcr_jobid = 1; ret_info->mdcr_netmask = NULL; ret_info->ckptdir = NULL; - + info("sending %d and %s", ret_info->instance[0], ret_info->devicename[0]); return 0; } -- GitLab From 857913fb08ff2e4e1a73511ef84714fde68a8baa Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 12 Mar 2012 11:50:43 -0700 Subject: [PATCH 080/614] Change pr_* to the correct pe_* --- src/plugins/switch/nrt/libpermapi/shr_64.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index e7dca9b6fc..dba952722f 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -84,7 +84,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { - info("got pr_rm_connect called"); + info("got pe_rm_connect called"); return 0; } @@ -102,7 +102,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) resource_mgr = NULL; dlclose(my_handle); - info("got pr_rm_free called"); + info("got pe_rm_free called"); } @@ -117,7 +117,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { - info("got pr_rm_free_event called"); + info("got pe_rm_free_event called"); if (job_event) { xfree(*job_event); } @@ -187,7 +187,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, { job_event_t *ret_event = NULL; int *state; - info("got pr_rm_get_event called %d %p %p", rm_timeout, + info("got pe_rm_get_event called %d %p %p", rm_timeout, job_event, *job_event); ret_event = xmalloc(sizeof(job_event_t)); @@ -234,7 +234,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, { job_info_t *ret_info = xmalloc(sizeof(job_info_t)); - info("got pr_rm_get_job_info called %p %p", job_info, *job_info); + info("got pe_rm_get_job_info called %p %p", job_info, *job_info); *job_info = ret_info; @@ -352,7 +352,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, #else fatal("I haven't been told where I am. This should never happen."); #endif - info("got pr_rm_init called %s", rm_id); + info("got pe_rm_init called %s", rm_id); /* Set up slurmctld message handler */ slurmctld_msg_init(); @@ -379,7 +379,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { - info("got pr_rm_send_event called"); + info("got pe_rm_send_event called"); return 0; } @@ -404,7 +404,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, job_request_t *pe_job_req = NULL; job_info_t *pe_job_info = NULL; - info("got pr_rm_submit_job called %d", job_cmd.job_format); + info("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { /* We don't handle files */ error("SLURM doesn't handle files to submit_job"); -- GitLab From fe32f5adf559903c6940ae6496ac5fa894a84e6d Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 13 Mar 2012 16:44:22 -0700 Subject: [PATCH 081/614] ok, we are at the point of launching the pmdv12 --- src/plugins/switch/nrt/libpermapi/shr_64.c | 189 ++++++++++++++++++++- 1 file changed, 185 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index dba952722f..5773d14eeb 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -39,6 +39,7 @@ #include #include #include +#include #ifdef HAVE_CONFIG_H # include "config.h" @@ -52,13 +53,127 @@ #include "src/srun/srun_job.h" #include "src/srun/opt.h" #include "src/srun/allocate.h" +#include "src/srun/task_state.h" void *my_handle = NULL; srun_job_t *job = NULL; - +task_state_t task_state; extern char **environ; +static int +_is_local_file (fname_t *fname) +{ + if (fname->name == NULL) + return 1; + + if (fname->taskid != -1) + return 1; + + return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); +} + +static slurm_step_layout_t * +_get_slurm_step_layout(srun_job_t *job) +{ + job_step_create_response_msg_t *resp; + + if (!job || !job->step_ctx) + return (NULL); + + slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); + if (!resp) + return (NULL); + return (resp->step_layout); +} + +static void +_set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) +{ + bool err_shares_out = false; + int file_flags; + + if (opt.open_mode == OPEN_MODE_APPEND) + file_flags = O_CREAT|O_WRONLY|O_APPEND; + else if (opt.open_mode == OPEN_MODE_TRUNCATE) + file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; + else { + slurm_ctl_conf_t *conf; + conf = slurm_conf_lock(); + if (conf->job_file_append) + file_flags = O_CREAT|O_WRONLY|O_APPEND; + else + file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; + slurm_conf_unlock(); + } + + /* + * create stdin file descriptor + */ + if (_is_local_file(job->ifname)) { + if ((job->ifname->name == NULL) || + (job->ifname->taskid != -1)) { + cio_fds->in.fd = STDIN_FILENO; + } else { + cio_fds->in.fd = open(job->ifname->name, O_RDONLY); + if (cio_fds->in.fd == -1) { + error("Could not open stdin file: %m"); + exit(error_exit); + } + } + if (job->ifname->type == IO_ONE) { + cio_fds->in.taskid = job->ifname->taskid; + cio_fds->in.nodeid = slurm_step_layout_host_id( + _get_slurm_step_layout(job), + job->ifname->taskid); + } + } + + /* + * create stdout file descriptor + */ + if (_is_local_file(job->ofname)) { + if ((job->ofname->name == NULL) || + (job->ofname->taskid != -1)) { + cio_fds->out.fd = STDOUT_FILENO; + } else { + cio_fds->out.fd = open(job->ofname->name, + file_flags, 0644); + if (cio_fds->out.fd == -1) { + error("Could not open stdout file: %m"); + exit(error_exit); + } + } + if (job->ofname->name != NULL + && job->efname->name != NULL + && !strcmp(job->ofname->name, job->efname->name)) { + err_shares_out = true; + } + } + + /* + * create seperate stderr file descriptor only if stderr is not sharing + * the stdout file descriptor + */ + if (err_shares_out) { + debug3("stdout and stderr sharing a file"); + cio_fds->err.fd = cio_fds->out.fd; + cio_fds->err.taskid = cio_fds->out.taskid; + } else if (_is_local_file(job->efname)) { + if ((job->efname->name == NULL) || + (job->efname->taskid != -1)) { + cio_fds->err.fd = STDERR_FILENO; + } else { + cio_fds->err.fd = open(job->efname->name, + file_flags, 0644); + if (cio_fds->err.fd == -1) { + error("Could not open stderr file: %m"); + exit(error_exit); + } + } + } +} + /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task * manager, and is available for the caller to communicate directly @@ -84,7 +199,73 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { - info("got pe_rm_connect called"); + srun_job_t **job_ptr = (srun_job_t **)resource_mgr; + srun_job_t *job = *job_ptr; + slurm_step_launch_params_t launch_params; + int my_argc = 1; + char **my_argv = xmalloc(sizeof(char *)*my_argc+1); + my_argv[0] = xstrdup("/etc/pmdv12"); + + info("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); + + task_state = task_state_create(1); + slurm_step_launch_params_t_init(&launch_params); + launch_params.gid = opt.gid; + launch_params.alias_list = job->alias_list; + launch_params.argc = my_argc; + launch_params.argv = my_argv; + launch_params.multi_prog = opt.multi_prog ? true : false; + launch_params.cwd = opt.cwd; + launch_params.slurmd_debug = opt.slurmd_debug; + launch_params.buffered_stdio = !opt.unbuffered; + launch_params.labelio = opt.labelio ? true : false; + launch_params.remote_output_filename =fname_remote_string(job->ofname); + launch_params.remote_input_filename = fname_remote_string(job->ifname); + launch_params.remote_error_filename = fname_remote_string(job->efname); + launch_params.task_prolog = opt.task_prolog; + launch_params.task_epilog = opt.task_epilog; + launch_params.cpu_bind = opt.cpu_bind; + launch_params.cpu_bind_type = opt.cpu_bind_type; + launch_params.mem_bind = opt.mem_bind; + launch_params.mem_bind_type = opt.mem_bind_type; + launch_params.open_mode = opt.open_mode; + if (opt.acctg_freq >= 0) + launch_params.acctg_freq = opt.acctg_freq; + launch_params.pty = opt.pty; + launch_params.cpus_per_task = 1; + launch_params.task_dist = opt.distribution; + launch_params.ckpt_dir = opt.ckpt_dir; + launch_params.restart_dir = opt.restart_dir; + launch_params.preserve_env = opt.preserve_env; + launch_params.spank_job_env = opt.spank_job_env; + launch_params.spank_job_env_size = opt.spank_job_env_size; + + _set_stdio_fds(job, &launch_params.local_fds); + rm_sockfds[0] = launch_params.local_fds.in.fd; + rm_sockfds[1] = launch_params.local_fds.out.fd; + rm_sockfds[2] = launch_params.local_fds.err.fd; + + launch_params.parallel_debug = false; + + update_job_state(job, SRUN_JOB_LAUNCHING); + if (slurm_step_launch(job->step_ctx, &launch_params, NULL) != + SLURM_SUCCESS) { + error("Application launch failed: %m"); + slurm_step_launch_wait_finish(job->step_ctx); + goto cleanup; + } + + update_job_state(job, SRUN_JOB_STARTING); + if (slurm_step_launch_wait_start(job->step_ctx) == SLURM_SUCCESS) { + update_job_state(job, SRUN_JOB_RUNNING); + } else { + info("Job step %u.%u aborted before step completely launched.", + job->jobid, job->stepid); + } +cleanup: + xfree(my_argv[0]); + xfree(my_argv); + info("done launching"); return 0; } @@ -338,7 +519,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, * return that, no matter what comes in so we always work. */ *rmapi_version = 1300; - *resource_mgr = (void *)job; + *resource_mgr = (void *)&job; #ifdef MYSELF_SO /* Since POE opens this lib without RTLD_LAZY | RTLD_GLOBAL we just open ourself again with those options and bada bing @@ -600,7 +781,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, slurm_free_resource_allocation_response_msg(resp); /* } */ - //*resource_mgr = (void *)pe_job; + //*resource_mgr = (void *)job; return 0; } -- GitLab From 71e7fca827fdc74aa7f0237bd6c5cbb6f3d76c6c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 14 Mar 2012 09:24:58 -0700 Subject: [PATCH 082/614] NRT - do away with having to have OBJECT_MODE=64 for NRT libs to be found by default on a 64bit system. This was used with AIX back in the day and is no longer relavant. --- auxdir/x_ac_nrt.m4 | 6 +----- configure | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index 344e5f1424..5eac595372 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -16,11 +16,7 @@ AC_DEFUN([X_AC_NRT], [ - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi + nrt_default_dirs="/usr/lib64 /usr/lib" AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Specify path to libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) diff --git a/configure b/configure index ba022728ee..1eebe777c1 100755 --- a/configure +++ b/configure @@ -21261,11 +21261,7 @@ fi - if test "$OBJECT_MODE" = "64"; then - nrt_default_dirs="/usr/lib64" - else - nrt_default_dirs="/usr/lib" - fi + nrt_default_dirs="/usr/lib64 /usr/lib" # Check whether --with-libnrt was given. -- GitLab From 9702768f5ab9e18c02a590900a71251616c8d3c5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 23 Mar 2012 15:31:50 -0700 Subject: [PATCH 083/614] Add logic to read NRT port info --- src/plugins/switch/nrt/nrt.c | 61 +++++++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 896dd078dd..5dab8bf1e8 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -94,8 +94,8 @@ typedef struct slurm_nrt_window { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; - uint16_t lid; /* FIXME: No information about where loaded from */ -// uint64_t network_id; + nrt_logical_id_t lid; + nrt_network_id_t network_id; nrt_window_id_t window_count; slurm_nrt_window_t *window_list; } slurm_nrt_adapter_t; @@ -950,6 +950,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_name: %s", a->adapter_name); info(" adapter_type: %s", _adapter_type_str(a->adapter_type)); + info(" lid: %u", a->lid); + info(" network_id: %lu", a->network_id); info(" window_count: %hu", a->window_count); w = a->window_list; for (j = 0; j < MIN(a->window_count, NRT_DEBUG_CNT); j++) { @@ -1170,6 +1172,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; + nrt_cmd_query_adapter_info_t query_adapter_info; + nrt_adapter_info_t adapter_info; nrt_status_t **status_array = NULL; nrt_window_id_t window_count; @@ -1178,6 +1182,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) #endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; + adapter_info.window_list = NULL; for (i = 0; i < 2; i++) { err = nrt_command(NRT_VERSION, NRT_CMD_QUERY_ADAPTER_TYPES, &adapter_types); @@ -1287,11 +1292,57 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) window_ptr->job_key = (*status_array)[k]. client_pid; } + + /* Now get adapter info (port_id, network_id, etc.) */ + query_adapter_info.adapter_name = adapter_names. + adapter_names[j]; + query_adapter_info.adapter_type = adapter_names. + adapter_type; + query_adapter_info.adapter_info = &adapter_info; + adapter_info.window_list = xmalloc(max_windows * + sizeof(nrt_window_id_t)); + err = nrt_command(NRT_VERSION, + NRT_CMD_QUERY_ADAPTER_INFO, + &query_adapter_info); + if (err != NRT_SUCCESS) { + error("nrt_command(adapter_into, %s, %s): %s", + query_adapter_info.adapter_name, + _adapter_type_str(query_adapter_info. + adapter_type), + nrt_err_str(err)); + rc = SLURM_ERROR; + continue; + } +#if NRT_DEBUG + info("nrt_command(adapter_info, %s, %s), ports:%hu", + query_adapter_info.adapter_name, + _adapter_type_str(query_adapter_info.adapter_type), + adapter_info.num_ports); + for (k = 0; k < adapter_info.num_ports; k++) { + info("port_id:%hu status:%hu lid:%u " + "network_id:%lu", + adapter_info.port[k].port_id, + adapter_info.port[k].status, + adapter_info.port[k].lid, + adapter_info.port[k].network_id); + } +#endif + for (k = 0; k < adapter_info.num_ports; k++) { + if (adapter_info.port[k].status != 1) + continue; + adapter_ptr->lid = adapter_info.port[k].lid; + adapter_ptr->network_id = adapter_info.port[k]. + network_id; + break; + } } - for (j = 0; j < max_windows; j++) { - free(status_array[j]); + if (status_array) { + for (j = 0; j < max_windows; j++) { + free(status_array[j]); + } + xfree(status_array); } - xfree(status_array); + xfree(adapter_info.window_list); } #if NRT_DEBUG _print_nodeinfo(n); -- GitLab From 2339ae096041ab2262a81645786d0a786a831d40 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 09:08:54 -0700 Subject: [PATCH 084/614] Modify config for switch/nrt to find nrt.h header --- auxdir/x_ac_nrt.m4 | 1 + configure | 1 + src/plugins/switch/nrt/Makefile.am | 3 +-- src/plugins/switch/nrt/Makefile.in | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index 5eac595372..2064b8c5ec 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -30,6 +30,7 @@ AC_DEFUN([X_AC_NRT], if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" NRT_LDFLAGS="-L$nrt_dir -lnrt" + NRT_CPPFLAGS="-I/opt/ibmhpc/pecurrent/base/include" break; fi diff --git a/configure b/configure index 1eebe777c1..466a16e591 100755 --- a/configure +++ b/configure @@ -21281,6 +21281,7 @@ $as_echo_n "checking whether to enable IBM NRT support... " >&6; } if test -f "$nrt_dir/libnrt.so"; then ac_have_nrt="yes" NRT_LDFLAGS="-L$nrt_dir -lnrt" + NRT_CPPFLAGS="-I/opt/ibmhpc/pecurrent/base/include" break; fi diff --git a/src/plugins/switch/nrt/Makefile.am b/src/plugins/switch/nrt/Makefile.am index 56e95a9224..295f3b21a3 100644 --- a/src/plugins/switch/nrt/Makefile.am +++ b/src/plugins/switch/nrt/Makefile.am @@ -1,11 +1,10 @@ # Makefile for switch/nrt plugin (NRT = IBM's Network Routing Table) -CPPFLAGS = -DNRT_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS) SWITCH_NRT_LA_SOURCES = \ diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 7962ca13c8..32d2a8459a 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -200,7 +200,7 @@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CMD_LDFLAGS = @CMD_LDFLAGS@ CPP = @CPP@ -CPPFLAGS = -DNRT_CONFIG_FILE=\"$(sysconfdir)/nrt.conf\" +CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -380,7 +380,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(NRT_CPPFLAGS) SWITCH_NRT_LA_SOURCES = \ nrt.c \ nrt_keys.h \ -- GitLab From 9ddec00c7b56d92ea0bd218384855c948098e51d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 10:46:34 -0700 Subject: [PATCH 085/614] NRT build updates --- Makefile.in | 1 + auxdir/Makefile.in | 1 + auxdir/x_ac_nrt.m4 | 40 ++++++++++--- config.h.in | 3 - configure | 57 +++++++++++++++---- configure.ac | 4 +- contribs/Makefile.in | 1 + contribs/arrayrun/Makefile.in | 1 + contribs/cray/Makefile.in | 1 + contribs/lua/Makefile.in | 1 + contribs/pam/Makefile.in | 1 + contribs/perlapi/Makefile.in | 1 + contribs/perlapi/libslurm/Makefile.in | 1 + contribs/perlapi/libslurmdb/Makefile.in | 1 + contribs/phpext/Makefile.in | 1 + contribs/sjobexit/Makefile.in | 1 + contribs/slurmdb-direct/Makefile.in | 1 + contribs/torque/Makefile.in | 1 + doc/Makefile.in | 1 + doc/html/Makefile.in | 1 + doc/man/Makefile.in | 1 + doc/man/man1/Makefile.in | 1 + doc/man/man3/Makefile.in | 1 + doc/man/man5/Makefile.in | 1 + doc/man/man8/Makefile.in | 1 + src/Makefile.in | 1 + src/api/Makefile.in | 1 + src/common/Makefile.in | 1 + src/database/Makefile.in | 1 + src/db_api/Makefile.in | 1 + src/plugins/Makefile.in | 1 + src/plugins/accounting_storage/Makefile.in | 1 + .../accounting_storage/common/Makefile.in | 1 + .../accounting_storage/filetxt/Makefile.in | 1 + .../accounting_storage/mysql/Makefile.in | 1 + .../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/crypto/Makefile.in | 1 + src/plugins/crypto/munge/Makefile.in | 1 + src/plugins/crypto/openssl/Makefile.in | 1 + src/plugins/gres/Makefile.in | 1 + src/plugins/gres/gpu/Makefile.in | 1 + src/plugins/gres/nic/Makefile.in | 1 + src/plugins/job_submit/Makefile.in | 1 + src/plugins/job_submit/cnode/Makefile.in | 1 + src/plugins/job_submit/defaults/Makefile.in | 1 + src/plugins/job_submit/logging/Makefile.in | 1 + src/plugins/job_submit/lua/Makefile.in | 1 + src/plugins/job_submit/partition/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/cgroup/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/wiki2/Makefile.in | 1 + src/plugins/select/Makefile.in | 1 + src/plugins/select/bluegene/Makefile.in | 1 + src/plugins/select/bluegene/ba/Makefile.in | 1 + .../select/bluegene/ba_bgq/Makefile.in | 1 + src/plugins/select/bluegene/bl/Makefile.in | 1 + .../select/bluegene/bl_bgq/Makefile.in | 1 + src/plugins/select/bluegene/sfree/Makefile.in | 1 + src/plugins/select/cons_res/Makefile.in | 1 + src/plugins/select/cray/Makefile.in | 1 + src/plugins/select/cray/libalps/Makefile.in | 1 + .../select/cray/libemulate/Makefile.in | 1 + src/plugins/select/linear/Makefile.in | 1 + 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/switch/nrt/Makefile.in | 1 + src/plugins/switch/nrt/libpermapi/Makefile.in | 1 + src/plugins/task/Makefile.in | 1 + src/plugins/task/affinity/Makefile.in | 1 + src/plugins/task/cgroup/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/node_rank/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/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/slurmctld/Makefile.in | 1 + src/slurmd/Makefile.in | 1 + src/slurmd/common/Makefile.in | 1 + src/slurmd/slurmd/Makefile.in | 1 + src/slurmd/slurmstepd/Makefile.in | 1 + src/slurmdbd/Makefile.in | 1 + src/smap/Makefile.in | 1 + src/sprio/Makefile.in | 1 + src/squeue/Makefile.in | 1 + src/sreport/Makefile.in | 1 + src/srun/Makefile.in | 1 + 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/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 + 157 files changed, 232 insertions(+), 25 deletions(-) diff --git a/Makefile.in b/Makefile.in index b47b3d5537..4bce57b75d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -255,6 +255,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 08308c0c35..a024c54555 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -169,6 +169,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/auxdir/x_ac_nrt.m4 b/auxdir/x_ac_nrt.m4 index 2064b8c5ec..fa1dd962a9 100644 --- a/auxdir/x_ac_nrt.m4 +++ b/auxdir/x_ac_nrt.m4 @@ -13,13 +13,34 @@ # This macro must be placed after AC_PROG_CC or equivalent. ##***************************************************************************** - AC_DEFUN([X_AC_NRT], [ - nrt_default_dirs="/usr/lib64 /usr/lib" + nrt_default_dirs="/usr/include" + AC_ARG_WITH([nrth], AS_HELP_STRING(--with-nrth=PATH,Parent directory of nrt.h), [ nrt_default_dirs="$withval $nrt_default_dirs"]) + AC_MSG_CHECKING([Checking NRT header file]) + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + # search for required NRT API libraries + if test -f "$nrt_dir/nrt.h"; then + ac_have_nrt_h="yes" + NRT_CPPFLAGS="-I$nrt_dir" + break; + fi + done + if test "x$ac_have_nrt_h" != "xyes" ; then + AC_MSG_RESULT([no]) + AC_MSG_NOTICE([Cannot support IBM NRT API without nrt.h]) + else + AC_MSG_RESULT([yes]) + fi + AC_SUBST(NRT_CPPFLAGS) - AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Specify path to libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) + nrt_default_dirs="/usr/lib64 /usr/lib" + AC_ARG_WITH([libnrt], AS_HELP_STRING(--with-libnrt=PATH,Parent directory of libnrt.so), [ nrt_default_dirs="$withval $nrt_default_dirs"]) AC_MSG_CHECKING([whether to enable IBM NRT support]) for nrt_dir in $nrt_default_dirs; do # skip dirs that don't exist @@ -28,15 +49,14 @@ AC_DEFUN([X_AC_NRT], fi # search for required NRT API libraries if test -f "$nrt_dir/libnrt.so"; then - ac_have_nrt="yes" + ac_have_libnrt="yes" NRT_LDFLAGS="-L$nrt_dir -lnrt" - NRT_CPPFLAGS="-I/opt/ibmhpc/pecurrent/base/include" break; fi - done + AC_SUBST(NRT_LDFLAGS) - if test "x$ac_have_nrt" != "xyes" ; then + if test "x$ac_have_libnrt" != "xyes" ; then AC_MSG_RESULT([no]) AC_MSG_NOTICE([Cannot support IBM NRT API without libnrt.]) else @@ -44,5 +64,9 @@ AC_DEFUN([X_AC_NRT], AC_DEFINE(HAVE_LIBNRT, 1, [define if you have libnrt.]) fi - AC_SUBST(NRT_LDFLAGS) + if test "x$ac_have_nrt_h" == "xyes" && test "x$ac_have_libnrt" == "xyes"; then + ac_have_nrt="yes" + fi + AM_CONDITIONAL(HAVE_NRT, test "x$ac_have_nrt" = "xyes") + AC_SUBST(HAVE_NRT) ]) diff --git a/config.h.in b/config.h.in index 493f2121c8..28c7a0fdfe 100644 --- a/config.h.in +++ b/config.h.in @@ -185,9 +185,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H -/* Define to 1 if you have the header file. */ -#undef HAVE_NRT_H - /* define if numa library installed */ #undef HAVE_NUMA diff --git a/configure b/configure index 466a16e591..e52a056be8 100755 --- a/configure +++ b/configure @@ -655,6 +655,7 @@ HAVE_NRT HAVE_NRT_FALSE HAVE_NRT_TRUE NRT_LDFLAGS +NRT_CPPFLAGS HAVE_FEDERATION HAVE_FEDERATION_FALSE HAVE_FEDERATION_TRUE @@ -933,6 +934,7 @@ with_slurmctld_port with_slurmd_port with_slurmdbd_port with_slurmctld_port_count +with_nrth with_libnrt with_readline with_ssl @@ -1647,7 +1649,8 @@ Optional Packages: --with-slurmdbd-port=N set slurmdbd default port [6819] --with-slurmctld-port-count=N set slurmctld default port count [1] - --with-libnrt=PATH Specify path to libnrt.so + --with-nrth=PATH Parent directory of nrt.h + --with-libnrt=PATH Parent directory of libnrt.so --without-readline compile without readline support --with-ssl=PATH Specify path to OpenSSL installation --with-munge=PATH Specify path to munge installation @@ -17850,7 +17853,7 @@ for ac_header in mcheck.h values.h socket.h sys/socket.h \ pty.h utmp.h \ sys/syslog.h linux/sched.h \ kstat.h paths.h limits.h sys/statfs.h sys/ptrace.h sys/termios.h \ - llapi.h nrt.h \ + llapi.h \ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -21261,15 +21264,46 @@ fi - nrt_default_dirs="/usr/lib64 /usr/lib" + nrt_default_dirs="/usr/include" +# Check whether --with-nrth was given. +if test "${with_nrth+set}" = set; then : + withval=$with_nrth; nrt_default_dirs="$withval $nrt_default_dirs" +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking Checking NRT header file" >&5 +$as_echo_n "checking Checking NRT header file... " >&6; } + for nrt_dir in $nrt_default_dirs; do + # skip dirs that don't exist + if test ! -z "$nrt_dir" -a ! -d "$nrt_dir" ; then + continue; + fi + # search for required NRT API libraries + if test -f "$nrt_dir/nrt.h"; then + ac_have_nrt_h="yes" + NRT_CPPFLAGS="-I$nrt_dir" + break; + fi + done + if test "x$ac_have_nrt_h" != "xyes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support IBM NRT API without nrt.h" >&5 +$as_echo "$as_me: Cannot support IBM NRT API without nrt.h" >&6;} + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + fi + + + + nrt_default_dirs="/usr/lib64 /usr/lib" # Check whether --with-libnrt was given. if test "${with_libnrt+set}" = set; then : withval=$with_libnrt; nrt_default_dirs="$withval $nrt_default_dirs" fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable IBM NRT support" >&5 $as_echo_n "checking whether to enable IBM NRT support... " >&6; } for nrt_dir in $nrt_default_dirs; do @@ -21279,15 +21313,14 @@ $as_echo_n "checking whether to enable IBM NRT support... " >&6; } fi # search for required NRT API libraries if test -f "$nrt_dir/libnrt.so"; then - ac_have_nrt="yes" + ac_have_libnrt="yes" NRT_LDFLAGS="-L$nrt_dir -lnrt" - NRT_CPPFLAGS="-I/opt/ibmhpc/pecurrent/base/include" break; fi - done - if test "x$ac_have_nrt" != "xyes" ; then + + if test "x$ac_have_libnrt" != "xyes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support IBM NRT API without libnrt." >&5 @@ -21300,9 +21333,10 @@ $as_echo "#define HAVE_LIBNRT 1" >>confdefs.h fi - - - if test "x$ac_have_nrt" = "xyes"; then + if test "x$ac_have_nrt_h" == "xyes" && test "x$ac_have_libnrt" == "xyes"; then + ac_have_nrt="yes" + fi + if test "x$ac_have_nrt" = "xyes"; then HAVE_NRT_TRUE= HAVE_NRT_FALSE='#' else @@ -21313,6 +21347,7 @@ fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for job_attachpid in -ljob" >&5 $as_echo_n "checking for job_attachpid in -ljob... " >&6; } if ${ac_cv_lib_job_job_attachpid+:} false; then : diff --git a/configure.ac b/configure.ac index cdadcbe585..d2415a1f7b 100644 --- a/configure.ac +++ b/configure.ac @@ -118,7 +118,7 @@ AC_CHECK_HEADERS(mcheck.h values.h socket.h sys/socket.h \ pty.h utmp.h \ sys/syslog.h linux/sched.h \ kstat.h paths.h limits.h sys/statfs.h sys/ptrace.h sys/termios.h \ - llapi.h nrt.h \ + llapi.h \ ) AC_HEADER_SYS_WAIT AC_HEADER_TIME @@ -293,8 +293,6 @@ AC_SUBST(HAVE_FEDERATION) dnl check for whether to include IBM NRT (Network Resource Table) support dnl X_AC_NRT -AM_CONDITIONAL(HAVE_NRT, test "x$ac_have_nrt" = "xyes") -AC_SUBST(HAVE_NRT) dnl check for SGI job container support dnl diff --git a/contribs/Makefile.in b/contribs/Makefile.in index 9af6d4b5a4..08e9f313dd 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 7a6ddfe892..9429d9277f 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index 58cee807d0..24745050c2 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -196,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index 6c83ca2229..9760e831d6 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 54d1f68dba..b18b404810 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -222,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index 3838ac6285..b7ea2a761e 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index ab8cdb9a30..9e2b86a234 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index 2c062a078c..e10c2864df 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index a35f7039bd..a4c63df5ae 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index 298ed9b2f2..3f4babd5da 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -195,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index d4359e4b3c..10ca5f3600 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -195,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 794776a901..4ab96ebaad 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -195,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 41dbaf04d3..444733988e 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index dc5fcba08f..4ef566a16d 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -193,6 +193,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 44a68abee9..dc927a7555 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index 08ceb3accd..5833d5d7cd 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -196,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index 16d2486eb8..b32b580340 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -193,6 +193,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index f3390950a9..6fecadc7ff 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -196,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index 766120f7f5..df9db05073 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -196,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/Makefile.in b/src/Makefile.in index 4407b88a21..c3e4f2c56d 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -213,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 0bc7485139..f98499df4f 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -245,6 +245,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 0eb68e3415..047ede3ed9 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -290,6 +290,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/database/Makefile.in b/src/database/Makefile.in index fee752b51b..550eea5d0d 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -220,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index fbaa9d0f6b..9a278cf0d5 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -230,6 +230,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 940696ec0e..de008c24eb 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 50684f9a40..022a19269e 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index d08b53910c..c31391378b 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -191,6 +191,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index bff51eb2e6..40304492d5 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -218,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index 0ab44a3ac4..b8da21928f 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -268,6 +268,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index 74a5971aa6..da4f7fa55b 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -217,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 58c1638d86..eb667badbb 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -263,6 +263,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index 8cbe68841c..26be898229 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -218,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 2b7daf7cc7..2e2bf3d0a7 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index 03b1a833ad..64d654c54e 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 49cdb50324..827ddb8451 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -217,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index ba817468a5..7688bb51ab 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index 29f937409e..dcbb80e383 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index 9869b5e19e..cad1526ba1 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -220,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 6b7689f434..38535cfa0f 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -226,6 +226,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index 4adb818233..de8e3da9c8 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index 17b255a891..7c42d6d856 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index 4e19316a8e..db49f318aa 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index 5d536efd30..c6671e3f03 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -217,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index a256811bd2..018df070a1 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -222,6 +222,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index e91bdc923a..f406e857ca 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index 9a8a7f5f79..c365971068 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index b9f71e4554..023eb80311 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index ae4f9af57c..8771acc4e6 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index 82fa346f47..769c77a16d 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index b8ee748958..3294f5f2e8 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index b95bdd2c60..8a50b8c4dd 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index 130564f3e0..0b6cd5f7ac 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -220,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 86a92f95d0..138fab2d2b 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index c7ac16c137..384b3e7e68 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index c850f36caa..b2148bf837 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 65701e4b24..878f78f451 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index e1318758e0..df125354b3 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index 1ec55571bc..e6fb03418a 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 90b34460a3..408b7cba17 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index 85168e1fb4..9297582fa0 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -224,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index d563d7be44..6bcd69ac1d 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index 304f548c2e..071995bd0e 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -224,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index 51738a9b73..3dc0f82983 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 72f955d5e8..c684d9403e 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index 93df09e58e..ef2485b14b 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 7ace0ec9f5..f4ec9c4ed4 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index 1bab9e2d14..fee21f5640 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index a9c8382428..b5dbe97a34 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index 25eb62f475..7ca8e38a42 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index d6816e8357..be0c50543e 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 3340c753af..54762b3509 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index 60d9f036f3..dc0ce62a98 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index 1afe021fce..e7f37ba762 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index a20c74a2ea..7b416f0e99 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index 16446887a8..8f7d8e2395 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -217,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index d39230d93b..6b4c72090e 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index aac4e3528c..3976ed4038 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index f3b11e5bf4..952f336839 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index 74be16075e..caf1f62bc1 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index 02bb1a6f08..0f111fef44 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 9e863553f3..0f593f2bb8 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index af1840036c..1ed20cb9f9 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 1a281ce39d..2fb83382b5 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index 909c7f560a..64bb1e9b3b 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index a874ad0af5..643a6433b3 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in index 6185dac210..fa22855a80 100644 --- a/src/plugins/proctrack/rms/Makefile.in +++ b/src/plugins/proctrack/rms/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index 830dc4f2b4..2c270d50bb 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index b459649b89..d611f18c73 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index d10e1f2c68..2e1eed8aab 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index 4dbe0babdf..3258e06dbc 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index a5c8728dd5..c75dd7a005 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index b524d3c3f5..6ee40a5741 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -217,6 +217,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index 5807d79045..4fc4f586b3 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -220,6 +220,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index 0d5277effd..a49af4ded4 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 4218d839ca..089369a731 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -377,6 +377,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index 6e260e9bc5..9b944ccbc0 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -203,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index 165126443a..239974855b 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -213,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index e37f58ed80..e8a69c0693 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -194,6 +194,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index 8d74a3a863..de69325fb0 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -203,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index 737cec9a96..72ed5cbbf4 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -195,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index 63a1f5af6c..f320c3aa63 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index 31284d8727..ddcc9f678e 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -262,6 +262,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index 3ee7e814d1..6a2ba2b1ca 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -201,6 +201,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index 602d064108..88c5c52af7 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -195,6 +195,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index f51d83be93..1f4a08785e 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index 1759846311..44ad7df040 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in index 94d15dc3b1..5f4c94aa9e 100644 --- a/src/plugins/switch/elan/Makefile.in +++ b/src/plugins/switch/elan/Makefile.in @@ -221,6 +221,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in index e1f3d5b1e1..7ff088e86d 100644 --- a/src/plugins/switch/federation/Makefile.in +++ b/src/plugins/switch/federation/Makefile.in @@ -224,6 +224,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index e1182a4d2d..7ded0b31eb 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index 32d2a8459a..caa8f54912 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -260,6 +260,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index e83d89c887..1b47e6786d 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index 5d7872d0a2..f7264aaa98 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 6355c943e5..401bf09763 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -227,6 +227,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index 7f1be1315e..dbbf6a562b 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -218,6 +218,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 1aedf5fd50..575a2c880a 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index 054b7fe13f..8c0f9573b8 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -216,6 +216,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index a2b02e32f8..41d0102569 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -210,6 +210,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index 08287d6fb0..43b9300b03 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 2bf2c92680..39dd1963c8 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index ffa63a27c5..e411bfa74c 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index a61c4a5542..ca0f3f9e33 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index a7ce0895d4..d08f3dfc53 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -204,6 +204,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 07d6690452..01288ec08f 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -198,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 8c11f73839..59a1ad1b3f 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -197,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 5c2d561443..19f1afd4c2 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -197,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 8e3e9eaa75..74cdc35d43 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 42dc7b7bfe..fe72c80f90 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -198,6 +198,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 1f6321dc18..555e42a0a4 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -213,6 +213,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 7dc30f4279..61e4b72a10 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -200,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 43372472cb..75ba6b3145 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -207,6 +207,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index b93e5cc3e8..7e7ea2652c 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index 96c88414ab..c75a2bd83f 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -191,6 +191,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index 23ea2a9bad..b75f018fcd 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -200,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index 1262f44993..b24818d913 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -203,6 +203,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index e39cc91025..f026e86b74 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 1cb87b6d57..0594f5f9a4 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -219,6 +219,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index a594fe4ca5..9b5d423656 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index a19ded7480..bb8599cb7e 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -200,6 +200,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index ffb0bad73c..4ec0143215 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 6a51432a5b..22aa7e68a3 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index e38de17f4b..a9dd6f7638 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -197,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index b6b24d8cf8..8f2bf60458 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -197,6 +197,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 10f38b569e..50ba0ad9b7 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -196,6 +196,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 5bbf756067..5fef4dadaf 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -199,6 +199,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index 96697f14bf..ddd80d810b 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -223,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index b8f7566042..3167735d98 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -215,6 +215,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 550340a122..8536859023 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -168,6 +168,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index c89e61ddb5..a0de75fb6f 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -208,6 +208,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index 6414629469..5ea7e2d377 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -231,6 +231,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 71812e6221..e49d637c78 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -223,6 +223,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index dd43a4c2f1..88d3379d5a 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -211,6 +211,7 @@ MYSQL_LIBS = @MYSQL_LIBS@ NCURSES = @NCURSES@ NM = @NM@ NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ NRT_LDFLAGS = @NRT_LDFLAGS@ NUMA_LIBS = @NUMA_LIBS@ OBJDUMP = @OBJDUMP@ -- GitLab From d67551015aeb712911fa3cea0ee750f66f1836e0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 11:53:28 -0700 Subject: [PATCH 086/614] More work on NRT load call Add job name to call. Add logging for call. --- src/common/switch.c | 7 +-- src/common/switch.h | 3 +- src/plugins/switch/elan/switch_elan.c | 3 +- .../switch/federation/switch_federation.c | 3 +- src/plugins/switch/none/switch_none.c | 3 +- src/plugins/switch/nrt/nrt.c | 49 +++++++++++++++++-- src/plugins/switch/nrt/slurm_nrt.h | 3 +- src/plugins/switch/nrt/switch_nrt.c | 6 ++- src/slurmd/slurmstepd/mgr.c | 4 +- 9 files changed, 66 insertions(+), 15 deletions(-) diff --git a/src/common/switch.c b/src/common/switch.c index bbfc9c9ae4..9d0a73d824 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -82,7 +82,7 @@ typedef struct slurm_switch_ops { int (*node_fini) ( void ); int (*job_preinit) ( switch_jobinfo_t *jobinfo ); int (*job_init) ( switch_jobinfo_t *jobinfo, - uid_t uid ); + uid_t uid, char *job_name ); int (*job_fini) ( switch_jobinfo_t *jobinfo ); int (*job_postfini) ( switch_jobinfo_t *jobinfo, uid_t pgid, @@ -450,12 +450,13 @@ extern int interconnect_preinit(switch_jobinfo_t *jobinfo) return (*(g_context->ops.job_preinit)) (jobinfo); } -extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid) +extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_init)) (jobinfo, uid); + return (*(g_context->ops.job_init)) (jobinfo, uid, job_name); } extern int interconnect_fini(switch_jobinfo_t *jobinfo) diff --git a/src/common/switch.h b/src/common/switch.h index 9dcc78bcd1..11eeed0ed6 100644 --- a/src/common/switch.h +++ b/src/common/switch.h @@ -271,7 +271,8 @@ extern int interconnect_preinit(switch_jobinfo_t *jobinfo); * than the process executing interconnect_fini() [e.g. QsNet]) * */ -extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid); +extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name); /* * This function is run from the same process as interconnect_init() diff --git a/src/plugins/switch/elan/switch_elan.c b/src/plugins/switch/elan/switch_elan.c index 8e1415aa41..6b7ea0138c 100644 --- a/src/plugins/switch/elan/switch_elan.c +++ b/src/plugins/switch/elan/switch_elan.c @@ -614,7 +614,8 @@ int switch_p_job_preinit ( switch_jobinfo_t *jobinfo ) /* * prepare node for interconnect use */ -int switch_p_job_init ( switch_jobinfo_t *jobinfo, uid_t uid ) +extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name) { char buf[4096]; diff --git a/src/plugins/switch/federation/switch_federation.c b/src/plugins/switch/federation/switch_federation.c index 6a794f566b..6af1939f6e 100644 --- a/src/plugins/switch/federation/switch_federation.c +++ b/src/plugins/switch/federation/switch_federation.c @@ -557,7 +557,8 @@ int switch_p_job_preinit(switch_jobinfo_t *jobinfo) return SLURM_SUCCESS; } -int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) +extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name) { pid_t pid; diff --git a/src/plugins/switch/none/switch_none.c b/src/plugins/switch/none/switch_none.c index 1194b3600d..a1ad68b81c 100644 --- a/src/plugins/switch/none/switch_none.c +++ b/src/plugins/switch/none/switch_none.c @@ -179,7 +179,8 @@ int switch_p_job_preinit ( switch_jobinfo_t *jobinfo ) return SLURM_SUCCESS; } -int switch_p_job_init ( switch_jobinfo_t *jobinfo, uid_t uid ) +extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name) { return SLURM_SUCCESS; } diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 5dab8bf1e8..340bd963c5 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1053,6 +1053,35 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) } info("--End Jobinfo--"); } + +static void +_print_load_table(nrt_cmd_load_table_t *load_table) +{ + nrt_table_info_t *table_info = load_table->table_info; + + info("--- Begin load table ---"); + info(" num_tasks: %u", table_info->num_tasks); + info(" job_key: %u", table_info->job_key); + info(" uid: %u", (uint32_t)table_info->uid); + info(" pid: %u", (uint32_t)table_info->pid); + info(" network_id: %lu", table_info->network_id); + info(" adapter_type: %s",_adapter_type_str(table_info->adapter_type)); + info(" is_user_space: %hu", (int)table_info->is_user_space); + info(" is_ipv4: %hu", (int)table_info->is_ipv4); + info(" context_id: %u", table_info->context_id); + info(" table_id: %u", table_info->table_id); + info(" job_name: %s", table_info->job_name); + info(" protocol_name: %s", table_info->protocol_name); + info(" use_bulk_transfer: %hu", (int)table_info->use_bulk_transfer); + info(" bulk_transfer_resources: %u", + table_info->bulk_transfer_resources); + info(" immed_send_slots_per_win: %u", + table_info->immed_send_slots_per_win); + info(" num_cau_indexes: %u", table_info->num_cau_indexes); + _print_table(load_table->per_task_input, table_info->num_tasks, + table_info->adapter_type); + info("--- End load table ---"); +} #endif static slurm_nrt_libstate_t * @@ -2325,7 +2354,7 @@ _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) * Used by: slurmd */ extern int -nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) +nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) { int i; int err; @@ -2364,6 +2393,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) /* FIXME: Ne need to set a bunch of these paramters appropriately */ #define TBD 0 +#define TBD1 "mpi" table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; table_info.uid = uid; @@ -2374,14 +2404,27 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid) table_info.is_ipv4 = TBD; table_info.context_id = TBD; table_info.table_id = TBD; - strncpy(table_info.job_name, "TBD", NRT_MAX_JOB_NAME_LEN); - strncpy(table_info.protocol_name, "TBD", NRT_MAX_PROTO_NAME_LEN); + if (job_name) { + char *sep = strrchr(job_name,'/'); + if (sep) + sep++; + else + sep = job_name; + strncpy(table_info.job_name, sep, + NRT_MAX_JOB_NAME_LEN); + } else { + table_info.job_name[0] = '\0'; + } + strncpy(table_info.protocol_name, TBD1, NRT_MAX_PROTO_NAME_LEN); table_info.use_bulk_transfer = jp->bulk_xfer; table_info.bulk_transfer_resources = TBD; table_info.immed_send_slots_per_win = TBD; table_info.num_cau_indexes = TBD; load_table.table_info = &table_info; load_table.per_task_input = jp->tableinfo[i].table; +#if NRT_DEBUG + _print_load_table(&load_table); +#endif err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); if (err != NRT_SUCCESS) { error("nrt_command(load table): %s", nrt_err_str(err)); diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 54a925b59b..9e9ba1a4dd 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -101,7 +101,8 @@ extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); extern void nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp); -extern int nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid); +extern int nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, + char *job_name); extern int nrt_init(void); extern int nrt_fini(void); extern int nrt_unload_table(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 4dfb6daba7..0d88a868d6 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -616,7 +616,8 @@ extern int switch_p_job_preinit(switch_jobinfo_t *jobinfo) return SLURM_SUCCESS; } -extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) +extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, + char *job_name) { pid_t pid; @@ -624,7 +625,8 @@ extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid) info("switch_p_job_init()"); #endif pid = getpid(); - return nrt_load_table((slurm_nrt_jobinfo_t *)jobinfo, uid, pid); + return nrt_load_table((slurm_nrt_jobinfo_t *)jobinfo, uid, pid, + job_name); } extern int switch_p_job_fini (switch_jobinfo_t *jobinfo) diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 8a556a5c7c..5756c5f828 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -972,8 +972,8 @@ job_manager(slurmd_job_t *job) } /* Call interconnect_init() before becoming user */ - if (!job->batch && - (interconnect_init(job->switch_job, job->uid) < 0)) { + if (!job->batch && job->argv && + (interconnect_init(job->switch_job, job->uid, job->argv[0]) < 0)) { /* error("interconnect_init: %m"); already logged */ rc = ESLURM_INTERCONNECT_FAILURE; io_close_task_fds(job); -- GitLab From f2f5e87acda5d06f0c09729bf97182e8ffa759f9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 13:14:24 -0700 Subject: [PATCH 087/614] NRT Network_id support Transfter an NRT network_id on job registration from slurmd to slurmctld and have slurmctld pick and xmit back to slurmd the network_id to be loaded for a starting job --- src/plugins/switch/nrt/nrt.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 340bd963c5..7f12fbfe90 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -122,7 +122,7 @@ struct slurm_nrt_jobinfo { uint32_t magic; /* version from nrt_version() */ /* adapter from lid in table */ - /* network_id from lid in table */ + nrt_network_id_t network_id; /* uid from getuid() */ /* pid from getpid() */ nrt_job_key_t job_key; @@ -1037,6 +1037,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info("--Begin Jobinfo--"); info(" job_key: %u", j->job_key); + info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %u", j->bulk_xfer); info(" tables_per_task: %hu", j->tables_per_task); @@ -1408,9 +1409,9 @@ nrt_build_nodeinfo(slurm_nrt_nodeinfo_t *n, char *name) extern int nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) { - int i, j; struct slurm_nrt_adapter *a; - int offset; + uint16_t dummy16; + int i, j, offset; assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); @@ -1426,7 +1427,10 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; packmem(a->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); - pack16(a->adapter_type, buf); + dummy16 = a->adapter_type; + pack16(dummy16, buf); /* adapter_type is an int */ + pack32(a->lid, buf); + pack64(a->network_id, buf); pack16(a->window_count, buf); for (j = 0; j < a->window_count; j++) { uint32_t state = a->window_list[j].state; @@ -1463,6 +1467,8 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) strncpy(da->adapter_name, sa->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); da->adapter_type = sa->adapter_type; + da->lid = sa->lid; + da->network_id = sa->network_id; da->window_count = sa->window_count; da->window_list = (slurm_nrt_window_t *) xmalloc(sizeof(slurm_nrt_window_t) * @@ -1488,8 +1494,9 @@ _fake_unpack_adapters(Buf buf) { uint32_t adapter_count; uint16_t window_count; - uint32_t dummy32; uint16_t dummy16; + uint32_t dummy32; + uint64_t dummy64; char *dummyptr; int i, j; @@ -1500,6 +1507,8 @@ _fake_unpack_adapters(Buf buf) if (dummy32 != NRT_MAX_ADAPTER_NAME_LEN) goto unpack_error; safe_unpack16(&dummy16, buf); + safe_unpack32(&dummy32, buf); + safe_unpack64(&dummy64, buf); safe_unpack16(&window_count, buf); for (j = 0; j < window_count; j++) { safe_unpack16(&dummy16, buf); @@ -1599,7 +1608,9 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) goto unpack_error; memcpy(tmp_a->adapter_name, name_ptr, size); safe_unpack16(&dummy16, buf); - tmp_a->adapter_type = dummy16; + tmp_a->adapter_type = dummy16; /* adapter_type is an int */ + safe_unpack32(&tmp_a->lid, buf); + safe_unpack64(&tmp_a->network_id, buf); safe_unpack16(&tmp_a->window_count, buf); tmp_w = (slurm_nrt_window_t *) xmalloc(sizeof(slurm_nrt_window_t) * @@ -1820,6 +1831,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, adapter_type; } adapter_type_count++; + jp->network_id = node->adapter_list[i].network_id; } } if (sn_all) { @@ -1969,6 +1981,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); pack16(j->tables_per_task, buf); + pack64(j->network_id, buf); for (i = 0; i < j->tables_per_task; i++) { _pack_tableinfo(&j->tableinfo[i], buf); } @@ -2046,6 +2059,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack32(&j->job_key, buf); safe_unpack8(&j->bulk_xfer, buf); safe_unpack16(&j->tables_per_task, buf); + safe_unpack64(&j->network_id, buf); j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); @@ -2394,14 +2408,15 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) /* FIXME: Ne need to set a bunch of these paramters appropriately */ #define TBD 0 #define TBD1 "mpi" +#define TBD2 1 table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; table_info.uid = uid; - table_info.network_id = TBD; + table_info.network_id = jp->network_id; table_info.pid = pid; table_info.adapter_type = jp->tableinfo[i].adapter_type; table_info.is_user_space = TBD; - table_info.is_ipv4 = TBD; + table_info.is_ipv4 = TBD2; table_info.context_id = TBD; table_info.table_id = TBD; if (job_name) { @@ -2425,7 +2440,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) #if NRT_DEBUG _print_load_table(&load_table); #endif - err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); + err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, + &load_table); if (err != NRT_SUCCESS) { error("nrt_command(load table): %s", nrt_err_str(err)); return SLURM_ERROR; @@ -2574,7 +2590,7 @@ _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) #if NRT_DEBUG info("_pack_libstate"); _print_libstate(lp); - #endif +#endif offset = get_buf_offset(buffer); pack32(lp->magic, buffer); pack32(lp->node_count, buffer); -- GitLab From 3734abd5793e7fe260fbccf677722a79fe5fc729 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 15:08:34 -0700 Subject: [PATCH 088/614] add NRT port_id and LMC fields --- src/plugins/switch/nrt/nrt.c | 95 ++++++++++++++++++++++++------------ 1 file changed, 64 insertions(+), 31 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7f12fbfe90..f0effa7942 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -96,6 +96,8 @@ typedef struct slurm_nrt_adapter { nrt_adapter_t adapter_type; nrt_logical_id_t lid; nrt_network_id_t network_id; + nrt_port_id_t port_id; + uint64_t special; nrt_window_id_t window_count; slurm_nrt_window_t *window_list; } slurm_nrt_adapter_t; @@ -148,11 +150,11 @@ static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, - nrt_adapter_t adapter_type); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, - nrt_adapter_t adapter_type); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -723,7 +725,8 @@ _find_free_window(slurm_nrt_adapter_t *adapter) static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, - nrt_job_key_t job_key, nrt_adapter_t adapter_type) + nrt_job_key_t job_key, nrt_adapter_t adapter_type, + nrt_logical_id_t base_lid) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; @@ -759,8 +762,11 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, strncpy(ib_table->device_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; - ib_table->task_id = task_id; - ib_table->win_id = window->window_id; + ib_table->base_lid = base_lid; + ib_table->port_id = 1; + ib_table->lmc = 0; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; @@ -790,7 +796,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, - nrt_job_key_t job_key, nrt_adapter_t adapter_type) + nrt_job_key_t job_key, nrt_adapter_t adapter_type, + nrt_logical_id_t base_lid) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; @@ -840,8 +847,11 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, strncpy(ib_table->device_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; - ib_table->task_id = task_id; - ib_table->win_id = window->window_id; + ib_table->base_lid = base_lid; + ib_table->port_id = 1; + ib_table->lmc = 0; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; @@ -952,6 +962,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) _adapter_type_str(a->adapter_type)); info(" lid: %u", a->lid); info(" network_id: %lu", a->network_id); + info(" port_id: %hu", a->port_id); + info(" special: %lu", a->special); info(" window_count: %hu", a->window_count); w = a->window_list; for (j = 0; j < MIN(a->window_count, NRT_DEBUG_CNT); j++) { @@ -1045,7 +1057,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) hostlist_ranged_string(j->nodenames, sizeof(buf), buf); else strcpy(buf, "(NULL)"); - info(" nodenames: %s", buf); + info(" nodenames: %s (slurmctld internal use only)", buf); info(" num_tasks: %d", j->num_tasks); for (i = 0; i < j->tables_per_task; i++) { _print_table(j->tableinfo[i].table, @@ -1350,11 +1362,12 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) adapter_info.num_ports); for (k = 0; k < adapter_info.num_ports; k++) { info("port_id:%hu status:%hu lid:%u " - "network_id:%lu", + "network_id:%lu special:%lu", adapter_info.port[k].port_id, adapter_info.port[k].status, adapter_info.port[k].lid, - adapter_info.port[k].network_id); + adapter_info.port[k].network_id, + adapter_info.port[k].special); } #endif for (k = 0; k < adapter_info.num_ports; k++) { @@ -1363,6 +1376,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) adapter_ptr->lid = adapter_info.port[k].lid; adapter_ptr->network_id = adapter_info.port[k]. network_id; + adapter_ptr->port_id = adapter_info.port[k]. + port_id; + adapter_ptr->special = adapter_info.port[k]. + special; break; } } @@ -1431,6 +1448,8 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) pack16(dummy16, buf); /* adapter_type is an int */ pack32(a->lid, buf); pack64(a->network_id, buf); + pack8(a->port_id, buf); + pack64(a->special, buf); pack16(a->window_count, buf); for (j = 0; j < a->window_count; j++) { uint32_t state = a->window_list[j].state; @@ -1469,6 +1488,8 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) da->adapter_type = sa->adapter_type; da->lid = sa->lid; da->network_id = sa->network_id; + da->port_id = sa->port_id; + da->special = sa->special; da->window_count = sa->window_count; da->window_list = (slurm_nrt_window_t *) xmalloc(sizeof(slurm_nrt_window_t) * @@ -1494,6 +1515,7 @@ _fake_unpack_adapters(Buf buf) { uint32_t adapter_count; uint16_t window_count; + uint8_t dummy8; uint16_t dummy16; uint32_t dummy32; uint64_t dummy64; @@ -1509,6 +1531,8 @@ _fake_unpack_adapters(Buf buf) safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); safe_unpack64(&dummy64, buf); + safe_unpack8 (&dummy8, buf); + safe_unpack64(&dummy64, buf); safe_unpack16(&window_count, buf); for (j = 0; j < window_count; j++) { safe_unpack16(&dummy16, buf); @@ -1611,6 +1635,8 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) tmp_a->adapter_type = dummy16; /* adapter_type is an int */ safe_unpack32(&tmp_a->lid, buf); safe_unpack64(&tmp_a->network_id, buf); + safe_unpack8(&tmp_a->port_id, buf); + safe_unpack64(&tmp_a->special, buf); safe_unpack16(&tmp_a->window_count, buf); tmp_w = (slurm_nrt_window_t *) xmalloc(sizeof(slurm_nrt_window_t) * @@ -1795,6 +1821,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, int min_procs_per_node; int max_procs_per_node; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; + nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; int table_rec_len = 0; @@ -1831,6 +1858,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, adapter_type; } adapter_type_count++; +/* FIXME: It's unclear how this works, each node would have different logical_id + * although the network_id seems to be common for our IB switches */ + base_lid = MIN(base_lid, + node->adapter_list[i].lid); jp->network_id = node->adapter_list[i].network_id; } } @@ -1888,13 +1919,15 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, jp->tableinfo, host, proc_cnt, jp->job_key, - adapter_type); + adapter_type, + base_lid); } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, host, proc_cnt, jp->job_key, - adapter_type); + adapter_type, + base_lid); } if (rc != SLURM_SUCCESS) { _unlock(); @@ -1909,11 +1942,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, #if NRT_DEBUG info("nrt_build_jobinfo"); - for (i = 0; i < nnodes; i++) { - _print_table(jp->tableinfo[i].table, - jp->tableinfo[i].table_length, - jp->tableinfo[i].adapter_type); - } + _print_jobinfo(jp); #endif hostlist_iterator_destroy(hi); @@ -1939,8 +1968,10 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) i++, ib_tbl_ptr++) { packmem(ib_tbl_ptr->device_name, NRT_MAX_DEVICENAME_SIZE, buf); - pack32(ib_tbl_ptr->task_id, buf); pack32(ib_tbl_ptr->base_lid, buf); + pack8(ib_tbl_ptr->lmc, buf); + pack8(ib_tbl_ptr->port_id, buf); + pack32(ib_tbl_ptr->task_id, buf); pack16(ib_tbl_ptr->win_id, buf); } } else if (tableinfo->adapter_type == NRT_HFI) { @@ -2009,8 +2040,10 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpackmem(ib_tbl_ptr->device_name, &size, buf); if (size != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; - safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack32(&ib_tbl_ptr->base_lid, buf); + safe_unpack8(&ib_tbl_ptr->lmc, buf); + safe_unpack8(&ib_tbl_ptr->port_id, buf); + safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); } } else if (tableinfo->adapter_type == NRT_HFI) { @@ -2406,19 +2439,19 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } /* FIXME: Ne need to set a bunch of these paramters appropriately */ -#define TBD 0 -#define TBD1 "mpi" -#define TBD2 1 +#define TBD0 0 +#define TBD1 1 +#define TBDM "mpi" table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; table_info.uid = uid; table_info.network_id = jp->network_id; table_info.pid = pid; table_info.adapter_type = jp->tableinfo[i].adapter_type; - table_info.is_user_space = TBD; - table_info.is_ipv4 = TBD2; - table_info.context_id = TBD; - table_info.table_id = TBD; + table_info.is_user_space = TBD0; + table_info.is_ipv4 = TBD0; + table_info.context_id = TBD0; + table_info.table_id = TBD0; if (job_name) { char *sep = strrchr(job_name,'/'); if (sep) @@ -2430,11 +2463,11 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } else { table_info.job_name[0] = '\0'; } - strncpy(table_info.protocol_name, TBD1, NRT_MAX_PROTO_NAME_LEN); + strncpy(table_info.protocol_name, TBDM, NRT_MAX_PROTO_NAME_LEN); table_info.use_bulk_transfer = jp->bulk_xfer; - table_info.bulk_transfer_resources = TBD; - table_info.immed_send_slots_per_win = TBD; - table_info.num_cau_indexes = TBD; + table_info.bulk_transfer_resources = TBD0; + table_info.immed_send_slots_per_win = TBD0; + table_info.num_cau_indexes = TBD0; load_table.table_info = &table_info; load_table.per_task_input = jp->tableinfo[i].table; #if NRT_DEBUG -- GitLab From 76cd43a775ae49d8e47ecc54db4e259a10982a97 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 15:38:50 -0700 Subject: [PATCH 089/614] NRT logging improvements --- src/plugins/switch/nrt/nrt.c | 39 ++++++++++++------------------ src/plugins/switch/nrt/slurm_nrt.h | 2 +- 2 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f0effa7942..0b2debeba6 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -925,17 +925,17 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) info(" adapter_name:%s", status_adapter->adapter_name); info(" adapter_type:%s", _adapter_type_str(status_adapter->adapter_type)); - info(" window_count:%hu", *status_adapter->window_count); + info(" window_count:%hu", *(status_adapter->window_count)); info(" --------"); - for (i = 0; i < MIN(*status_adapter->window_count, NRT_DEBUG_CNT); + for (i = 0; i < MIN(*(status_adapter->window_count), NRT_DEBUG_CNT); i++) { - nrt_status_t *status = status_adapter->status_array[i]; - info(" client_pid[%d]:%u", i, (uint32_t)status->client_pid); - info(" uid[%d]:%u", i, (uint32_t) status->uid); - info(" window_id[%d]:%hu", i, status->window_id); - info(" bulk_xfer[%d]:%hu", i, status->bulk_transfer); - info(" rcontext_blocks[%d]:%u", i, status->rcontext_blocks); - info(" state[%d]:%s", i, _win_state_str(status->state)); + nrt_status_t *status = *(status_adapter->status_array); + info(" bulk_xfer:%hu", status[i].bulk_transfer); + info(" client_pid:%u", (uint32_t)status[i].client_pid); + info(" rcontext_blocks:%u", status[i].rcontext_blocks); + info(" state:%s", _win_state_str(status[i].state)); + info(" uid:%u", (uint32_t) status[i].uid); + info(" window_id:%hu", status[i].window_id); info(" --------"); } info("--End Adapter Status--"); @@ -1300,18 +1300,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; } #if NRT_DEBUG - info("nrt_command(status_adapter, %s, %s), " - "window_count:%hu", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type), - window_count); - for (k = 0; k < MIN(window_count, NRT_DEBUG_CNT); k++){ - info("window_id:%d uid:%d pid:%d state:%s", - (*status_array)[k].window_id, - (*status_array)[k].uid, - (*status_array)[k].client_pid, - _win_state_str((*status_array)[k].state)); - } + error("nrt_command(status_adapter, %s, %s)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type)); + _print_adapter_status(&adapter_status); #endif adapter_ptr = &n->adapter_list[n->adapter_count]; strncpy(adapter_ptr->adapter_name, @@ -2263,8 +2255,9 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &status_adapter); if (err != NRT_SUCCESS) { - error("nrt_status_adapter(%s, %d): %s", adapter_name, - (int) adapter_type, nrt_err_str(err)); + error("nrt_status_adapter(%s, %s): %s", adapter_name, + _adapter_type_str(adapter_type), + nrt_err_str(err)); break; } #if NRT_DEBUG diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 9e9ba1a4dd..2ed6cbe662 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -78,7 +78,7 @@ enum { }; #define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ -#define NRT_DEBUG_CNT 8 /* Count of windows, adapters, etc to log +#define NRT_DEBUG_CNT 4 /* Count of windows, adapters, etc to log * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) -- GitLab From 035b8216b3d9e8d0bf9a1c2f36da039e818bbb68 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 26 Mar 2012 15:45:35 -0700 Subject: [PATCH 090/614] NRT logging correction --- src/plugins/switch/nrt/nrt.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 0b2debeba6..03f6805638 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2833,11 +2833,11 @@ nrt_clear_node_state(void) continue; } #if NRT_DEBUG - error("nrt_command(status_adapter, %s, %s), " - "window_count:%hu", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type), - window_count); + info("nrt_command(status_adapter, %s, %s), " + "window_count:%hu", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type), + window_count); /* Only log first NRT_DEBUG_CNT windows here */ for (k = 0; k < MIN(window_count, NRT_DEBUG_CNT); k++){ info("window_id:%d uid:%d pid:%d state:%s", -- GitLab From 8afeaca0496cf05b3690f93f8fd6d2fc17532a57 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 30 Mar 2012 11:58:52 -0700 Subject: [PATCH 091/614] NRT updates per IBM info. --- src/plugins/switch/nrt/nrt.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 03f6805638..970f620732 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -36,6 +36,9 @@ * You should have received a copy of the GNU General Public License along * with SLURM; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + ***************************************************************************** + * NOTE: The NRT API communicates with IBM's Protocol Network Services Deamon + * (PNSD). PNSD logs are written to /tmp/serverlog. \*****************************************************************************/ #include @@ -2442,8 +2445,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.pid = pid; table_info.adapter_type = jp->tableinfo[i].adapter_type; table_info.is_user_space = TBD0; - table_info.is_ipv4 = TBD0; - table_info.context_id = TBD0; + table_info.is_ipv4 = TBD1; + table_info.context_id = 0; table_info.table_id = TBD0; if (job_name) { char *sep = strrchr(job_name,'/'); @@ -2459,8 +2462,12 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) strncpy(table_info.protocol_name, TBDM, NRT_MAX_PROTO_NAME_LEN); table_info.use_bulk_transfer = jp->bulk_xfer; table_info.bulk_transfer_resources = TBD0; - table_info.immed_send_slots_per_win = TBD0; - table_info.num_cau_indexes = TBD0; + /* The following fields only apply to Power7 processors + * and have no effect on x86 processors: + * immed_send_slots_per_win + * num_cau_indexes */ + table_info.immed_send_slots_per_win = 0; + table_info.num_cau_indexes = 0; load_table.table_info = &table_info; load_table.per_task_input = jp->tableinfo[i].table; #if NRT_DEBUG -- GitLab From db675ea73f136058f8d11dfada5a422dd31d610b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 30 Mar 2012 12:34:44 -0700 Subject: [PATCH 092/614] Add support for job specification of NRT network type Parse job's network option to set NRT switch user_space and ipv4 flags appropriately. --- src/plugins/switch/nrt/nrt.c | 38 ++++++++++--- src/plugins/switch/nrt/slurm_nrt.h | 3 +- src/plugins/switch/nrt/switch_nrt.c | 87 +++++++++++++++-------------- 3 files changed, 77 insertions(+), 51 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 970f620732..5efa30cae5 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -131,7 +131,9 @@ struct slurm_nrt_jobinfo { /* uid from getuid() */ /* pid from getpid() */ nrt_job_key_t job_key; - uint8_t bulk_xfer; /* flag */ + uint8_t bulk_xfer; /* flag */ + uint8_t ip_v6; /* flag */ + uint8_t user_space; /* flag */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -1054,7 +1056,9 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" job_key: %u", j->job_key); info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); - info(" bulk_xfer: %u", j->bulk_xfer); + info(" bulk_xfer: %hu", j->bulk_xfer); + info(" ip_v6: %hu", j->ip_v6); + info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); if (j->nodenames) hostlist_ranged_string(j->nodenames, sizeof(buf), buf); @@ -1802,7 +1806,8 @@ _next_key(void) */ extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, int bulk_xfer) + bool sn_all, char *adapter_name, bool bulk_xfer, + bool ip_v6, bool user_space) { int nnodes; hostlist_iterator_t hi; @@ -1827,10 +1832,12 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, if (nprocs <= 0) slurm_seterrno_ret(EINVAL); - jp->bulk_xfer = (uint8_t) bulk_xfer; - jp->job_key = _next_key(); - jp->nodenames = hostlist_copy(hl); - jp->num_tasks = nprocs; + jp->bulk_xfer = (uint8_t) bulk_xfer; + jp->ip_v6 = (uint8_t) ip_v6; + jp->job_key = _next_key(); + jp->nodenames = hostlist_copy(hl); + jp->num_tasks = nprocs; + jp->user_space = (uint8_t) user_space; hi = hostlist_iterator_create(hl); @@ -2006,6 +2013,8 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); + pack8(j->ip_v6, buf); + pack8(j->user_space, buf); pack16(j->tables_per_task, buf); pack64(j->network_id, buf); for (i = 0; i < j->tables_per_task; i++) { @@ -2086,6 +2095,8 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); safe_unpack32(&j->job_key, buf); safe_unpack8(&j->bulk_xfer, buf); + safe_unpack8(&j->ip_v6, buf); + safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); safe_unpack64(&j->network_id, buf); @@ -2438,14 +2449,23 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) #define TBD0 0 #define TBD1 1 #define TBDM "mpi" + bzero(&table_info, sizeof(nrt_table_info_t)); table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; table_info.uid = uid; table_info.network_id = jp->network_id; table_info.pid = pid; table_info.adapter_type = jp->tableinfo[i].adapter_type; - table_info.is_user_space = TBD0; - table_info.is_ipv4 = TBD1; + if (jp->user_space) { + table_info.is_ipv4 = 0; + table_info.is_user_space = 1; + } else if (jp->ip_v6) { + table_info.is_ipv4 = 0; + table_info.is_user_space = 0; + } else { + table_info.is_ipv4 = 1; + table_info.is_user_space = 0; + } table_info.context_id = 0; table_info.table_id = TBD0; if (job_name) { diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 2ed6cbe662..f6c5464748 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -96,7 +96,8 @@ extern int nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *np, Buf buf); extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, int bulk_xfer); + bool sn_all, char *adapter_name, bool bulk_xfer, + bool ip_v6, bool user_space); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 0d88a868d6..8693f028ec 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -419,9 +419,9 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, char *network) { hostlist_t list = NULL; + bool bulk_xfer = false, ip_v6 = false, user_space = false; bool sn_all; int i, err, nprocs = 0; - int bulk_xfer = 0; char *adapter_name = NULL; #if NRT_DEBUG @@ -430,49 +430,54 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, #else debug3("network = \"%s\"", network); #endif - if (network && (strstr(network, "ip") || strstr(network, "IP"))) { - debug2("NRT: \"ip\" found in network string, " - "no network tables allocated"); - return SLURM_SUCCESS; + if (network && + (strstr(network, "bulk_xfer") || + strstr(network, "BULK_XFER"))) + bulk_xfer = true; + + if (network && + (strstr(network, "ipv6") || + strstr(network, "IPV6"))) + ip_v6 = true; + + if (network && + (strstr(network, "us") || + strstr(network, "US"))) + user_space = true; + + if (!network) { + /* default to sn_all */ + sn_all = true; + } else if (strstr(network, "sn_all") || + strstr(network, "SN_ALL")) { + debug3("Found sn_all in network string"); + sn_all = true; + } else if (strstr(network, "sn_single") || + strstr(network, "SN_SINGLE")) { + debug3("Found sn_single in network string"); + sn_all = false; + } else if ((adapter_name = _adapter_name_check(network))) { + debug3("Found adapter %s in network string", adapter_name); + sn_all = false; } else { - if (!network) { - /* default to sn_all */ - sn_all = true; - } else if (strstr(network, "sn_all") || - strstr(network, "SN_ALL")) { - debug3("Found sn_all in network string"); - sn_all = true; - } else if (strstr(network, "sn_single") || - strstr(network, "SN_SINGLE")) { - debug3("Found sn_single in network string"); - sn_all = false; - } else if ((adapter_name = _adapter_name_check(network))) { - debug3("Found adapter %s in network string", - adapter_name); - sn_all = false; - } else { - /* default to sn_all */ - sn_all = true; - } + /* default to sn_all */ + sn_all = true; + } - list = hostlist_create(nodelist); - if (!list) - fatal("hostlist_create(%s): %m", nodelist); - for (i = 0; i < hostlist_count(list); i++) - nprocs += tasks_per_node[i]; - - if (network && - (strstr(network, "bulk_xfer") || - strstr(network, "BULK_XFER"))) - bulk_xfer = 1; - err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, - list, nprocs, sn_all, adapter_name, - bulk_xfer); - hostlist_destroy(list); - xfree(adapter_name); + list = hostlist_create(nodelist); + if (!list) + fatal("hostlist_create(%s): %m", nodelist); + for (i = 0; i < hostlist_count(list); i++) + nprocs += tasks_per_node[i]; - return err; - } + err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, + nprocs, sn_all, adapter_name, bulk_xfer, + ip_v6, user_space); + + hostlist_destroy(list); + xfree(adapter_name); + + return err; } extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) -- GitLab From 75a1be48ac756f713a6ad7d7651bbd5e6ca0c6ae Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 30 Mar 2012 14:44:34 -0700 Subject: [PATCH 093/614] Set NRT protocol based upon job network field If job network field contains lapi or pami, set switch network protocol appropriately --- src/plugins/switch/nrt/nrt.c | 17 +++++++++++++---- src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 13 +++++++++++-- 3 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 5efa30cae5..910dbe3512 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -134,6 +134,7 @@ struct slurm_nrt_jobinfo { uint8_t bulk_xfer; /* flag */ uint8_t ip_v6; /* flag */ uint8_t user_space; /* flag */ + char *protocol; /* MPI, UPC, LAPI, PAMI, etc. */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -1060,6 +1061,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" ip_v6: %hu", j->ip_v6); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); + info(" protocol: %s", j->protocol); if (j->nodenames) hostlist_ranged_string(j->nodenames, sizeof(buf), buf); else @@ -1807,7 +1809,7 @@ _next_key(void) extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, bool sn_all, char *adapter_name, bool bulk_xfer, - bool ip_v6, bool user_space) + bool ip_v6, bool user_space, char *protocol) { int nnodes; hostlist_iterator_t hi; @@ -1838,6 +1840,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, jp->nodenames = hostlist_copy(hl); jp->num_tasks = nprocs; jp->user_space = (uint8_t) user_space; + jp->protocol = xstrdup(protocol); hi = hostlist_iterator_create(hl); @@ -2017,6 +2020,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack8(j->user_space, buf); pack16(j->tables_per_task, buf); pack64(j->network_id, buf); + packstr(j->protocol, buf); for (i = 0; i < j->tables_per_task; i++) { _pack_tableinfo(&j->tableinfo[i], buf); } @@ -2085,6 +2089,7 @@ unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { + uint32_t uint32_tmp; int i; assert(j); @@ -2099,6 +2104,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); safe_unpack64(&j->network_id, buf); + safe_unpackstr_xmalloc(&j->protocol, &uint32_tmp, buf); j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); @@ -2115,6 +2121,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) unpack_error: error("nrt_unpack_jobinfo error"); + xfree(j->protocol); if (j->tableinfo) { for (i = 0; i < j->tables_per_task; i++) xfree(j->tableinfo[i].table); @@ -2183,6 +2190,7 @@ nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) } jp->magic = 0; + xfree(jp->protocol); if ((jp->tables_per_task > 0) && (jp->tableinfo != NULL)) { for (i = 0; i < jp->tables_per_task; i++) { tableinfo = &jp->tableinfo[i]; @@ -2447,8 +2455,6 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) /* FIXME: Ne need to set a bunch of these paramters appropriately */ #define TBD0 0 -#define TBD1 1 -#define TBDM "mpi" bzero(&table_info, sizeof(nrt_table_info_t)); table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; @@ -2479,7 +2485,10 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } else { table_info.job_name[0] = '\0'; } - strncpy(table_info.protocol_name, TBDM, NRT_MAX_PROTO_NAME_LEN); + if (jp->protocol) { + strncpy(table_info.protocol_name, jp->protocol, + NRT_MAX_PROTO_NAME_LEN); + } table_info.use_bulk_transfer = jp->bulk_xfer; table_info.bulk_transfer_resources = TBD0; /* The following fields only apply to Power7 processors diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index f6c5464748..01f38c5c2b 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -97,7 +97,7 @@ extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, bool sn_all, char *adapter_name, bool bulk_xfer, - bool ip_v6, bool user_space); + bool ip_v6, bool user_space, char *protocol); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 8693f028ec..98db5c8aec 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -422,7 +422,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, bool bulk_xfer = false, ip_v6 = false, user_space = false; bool sn_all; int i, err, nprocs = 0; - char *adapter_name = NULL; + char *adapter_name = NULL, *protocol = "mpi"; #if NRT_DEBUG info("switch_p_build_jobinfo(): nodelist:%s network:%s", @@ -445,6 +445,15 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, strstr(network, "US"))) user_space = true; + if (network && + (strstr(network, "pami") || + strstr(network, "PAMI"))) + protocol = "pami"; + if (network && + (strstr(network, "lapi") || + strstr(network, "LAPI"))) + protocol = "lapi"; + if (!network) { /* default to sn_all */ sn_all = true; @@ -472,7 +481,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, nprocs, sn_all, adapter_name, bulk_xfer, - ip_v6, user_space); + ip_v6, user_space, protocol); hostlist_destroy(list); xfree(adapter_name); -- GitLab From a34749d8b80ed7fabc493521ae2a487bf4fa9d30 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 2 Apr 2012 11:02:44 -0700 Subject: [PATCH 094/614] Add simple UPC test case --- testsuite/expect/Makefile.am | 2 + testsuite/expect/Makefile.in | 2 + testsuite/expect/README | 1 + testsuite/expect/globals | 1 + testsuite/expect/test1.94 | 172 +++++++++++++++++++++++++++++ testsuite/expect/test1.94.prog.upc | 31 ++++++ 6 files changed, 209 insertions(+) create mode 100755 testsuite/expect/test1.94 create mode 100644 testsuite/expect/test1.94.prog.upc diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am index 713f2aacb7..d888ba7a86 100644 --- a/testsuite/expect/Makefile.am +++ b/testsuite/expect/Makefile.am @@ -102,6 +102,8 @@ EXTRA_DIST = \ test1.91.prog.c \ test1.92 \ test1.93 \ + test1.94 \ + test1.94.prog.c \ test2.1 \ test2.2 \ test2.3 \ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 8536859023..a67da0d399 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -389,6 +389,8 @@ EXTRA_DIST = \ test1.91.prog.c \ test1.92 \ test1.93 \ + test1.94 \ + test1.94.prog.c \ test2.1 \ test2.2 \ test2.3 \ diff --git a/testsuite/expect/README b/testsuite/expect/README index a16c7ee3ef..8bbfe35a42 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -193,6 +193,7 @@ test1.90 Test of memory affinity support for NUMA systems. test1.91 Test of CPU affinity for multi-core systems. test1.92 Test of task distribution support on multi-core systems. test1.93 Test of LAM-MPI functionality +test1.94 Basic UPC (Unified Parallel C) test via srun. **NOTE** The above tests for mutliple processor/partition systems only test2.# Testing of scontrol options (to be run as unprivileged user). diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 180de00ba7..c1e3c69cb5 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -104,6 +104,7 @@ cset partition "" # OR for other versions of MPICH, use this cset mpicc "/usr/local/bin/mpicc" cset use_pmi 0 +cset upcc "/usr/local/bin/upcc" # If using XCPU job launch, specify directory location as needed cset xcpu_dir "/mnt/xcpu" diff --git a/testsuite/expect/test1.94 b/testsuite/expect/test1.94 new file mode 100755 index 0000000000..5cbe14dd34 --- /dev/null +++ b/testsuite/expect/test1.94 @@ -0,0 +1,172 @@ +#!/usr/bin/expect +############################################################################ +# Purpose: Test of SLURM functionality +# Basic UPC (Unified Parallel C) test via srun. +# +# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR +# "WARNING: ..." with an explanation of why the test can't be made, OR +# "FAILURE: ..." otherwise with an explanation of the failure, OR +# anything else indicates a failure mode that must be investigated. +############################################################################ +# Written by Morris Jette +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ +source ./globals + +set test_id "1.94" +set exit_code 0 +set file_in "test$test_id.input" +set file_out "test$test_id.output" +set file_err "test$test_id.error" +set test_prog "test$test_id.prog" +set job_id 0 +set task_cnt 6 + +print_header $test_id + +# +# Test for existence of UPC compiler +# +if {[info exists upcc] == 0} { + send_user "\nWARNING: upcc not defined, can't perform mpi testing\n" + exit 0 +} +if {[file executable $upcc] == 0} { + send_user "\nWARNING: $upcc does not exists\n" + exit 0 +} +if {[test_front_end] != 0} { + send_user "\nWARNING: This test is incompatible with front-end systems\n" + exit 0 +} +if {[test_aix] == 1} { + send_user "WARNING: Test is incompatible with AIX\n" + exit 0 +} + +# +# Delete left-over program and rebuild it +# +exec $bin_rm -f $test_prog ${test_prog}.o +exec $upcc -o $test_prog ${test_prog}.upc + + +# Delete left-over stdout/err files +file delete $file_out $file_err + +# +# Build input script file +# +make_bash_script $file_in " + $srun -n $task_cnt $test_prog +" + +# +# Spawn an sbatch job that uses stdout/err and confirm their contents +# +set timeout $max_job_delay +set no_start 0 +set sbatch_pid [spawn $sbatch -N1-3 -n $task_cnt --output=$file_out --error=$file_err -t1 $file_in] +expect { + -re "Submitted batch job ($number)" { + set job_id $expect_out(1,string) + exp_continue + } + -re "Batch job submission failed" { + set no_start 1 + exp_continue + } + -re "Unable to contact" { + send_user "\nFAILURE: slurm appears to be down\n" + exit 1 + } + timeout { + send_user "\nFAILURE: srun not responding\n" + slow_kill $sbatch_pid + set exit_code 1 + } + eof { + wait + } +} + +if {$no_start != 0} { + send_user "\nWARNING: partition too small for test\n" + if {$job_id != 0} { + cancel_job $job_id + } + exit 0 +} +if {$job_id == 0} { + send_user "\nFAILURE: batch submit failure\n" + exit 1 +} + +# +# Wait for job to complete +# +if {[wait_for_job $job_id "DONE"] != 0} { + send_user "\nFAILURE: waiting for job to complete\n" + set exit_code 1 +} + +# +# Check for desired output in stdout +# +if {[wait_for_file $file_out] == 0} { + set matches 0 + set complete 0 + spawn $bin_cat $file_out + expect { + -re "Hello from ($number) of $task_cnt" { + incr matches + exp_continue + } + -re "Failed to mmap" { + send_user "\nFAILURE: insufficient shared memory. " + send_user "Rebuild UPCC with --disable-pshm option.\n" + exp_continue + } + eof { + wait + } + } + if {$matches == 0} { + send_user "\nFAILURE: No MPI communications occurred\n" + send_user " The version of MPI you are using may be incompatible " + send_user "with the configured switch\n" + send_user " Core files may be present from failed MPI tasks\n\n" + set exit_code 1 + } elseif {$matches != $task_cnt} { + send_user "\nFAILURE: unexpected output ($matches of $expected)\n" + set exit_code 1 + } +} else { + set exit_code 1 +} + +if {$exit_code == 0} { + exec $bin_rm -f $file_in $file_out $file_err $test_prog ${test_prog}.o + send_user "\nSUCCESS\n" +} else { + send_user "Check contents of $file_err\n" +} + +exit $exit_code diff --git a/testsuite/expect/test1.94.prog.upc b/testsuite/expect/test1.94.prog.upc new file mode 100644 index 0000000000..56eaf3a050 --- /dev/null +++ b/testsuite/expect/test1.94.prog.upc @@ -0,0 +1,31 @@ +/*****************************************************************************\ + * test1.94.prog.upc - Basic UPC (Unified Parallel C) test via srun. + ***************************************************************************** + * Written by Morris Jette + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#include +#include + +int main(int argc, char * argv[]) +{ + printf("Hello from %d of %d\n", MYTHREAD, THREADS); +} -- GitLab From 548dd47d6aa8911ed1a8b453d1c42b343c8047a2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 2 Apr 2012 11:15:46 -0700 Subject: [PATCH 095/614] Expand UPC test --- testsuite/expect/test1.94 | 18 ++++++++++++------ testsuite/expect/test1.94.prog.upc | 11 +++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/testsuite/expect/test1.94 b/testsuite/expect/test1.94 index 5cbe14dd34..85706bb0e5 100755 --- a/testsuite/expect/test1.94 +++ b/testsuite/expect/test1.94 @@ -132,13 +132,19 @@ if {[wait_for_job $job_id "DONE"] != 0} { # if {[wait_for_file $file_out] == 0} { set matches 0 - set complete 0 + set sum 0 + set total 0 spawn $bin_cat $file_out expect { -re "Hello from ($number) of $task_cnt" { incr matches + incr sum $expect_out(1,string) exp_continue } + -re "Total is ($number)" { + set total $expect_out(1,string) + exp_continue + } -re "Failed to mmap" { send_user "\nFAILURE: insufficient shared memory. " send_user "Rebuild UPCC with --disable-pshm option.\n" @@ -149,13 +155,13 @@ if {[wait_for_file $file_out] == 0} { } } if {$matches == 0} { - send_user "\nFAILURE: No MPI communications occurred\n" - send_user " The version of MPI you are using may be incompatible " - send_user "with the configured switch\n" - send_user " Core files may be present from failed MPI tasks\n\n" + send_user "\nFAILURE: No UPC communications occurred\n" set exit_code 1 } elseif {$matches != $task_cnt} { - send_user "\nFAILURE: unexpected output ($matches of $expected)\n" + send_user "\nFAILURE: unexpected output ($matches of $task_cnt)\n" + set exit_code 1 + } elseif {$sum != $total} { + send_user "\nFAILURE: Problem with global variables ($sum != $total)\n" set exit_code 1 } } else { diff --git a/testsuite/expect/test1.94.prog.upc b/testsuite/expect/test1.94.prog.upc index 56eaf3a050..6ca5f24ae1 100644 --- a/testsuite/expect/test1.94.prog.upc +++ b/testsuite/expect/test1.94.prog.upc @@ -25,7 +25,18 @@ #include #include +shared int inx[THREADS]; + int main(int argc, char * argv[]) { printf("Hello from %d of %d\n", MYTHREAD, THREADS); + inx[MYTHREAD] = MYTHREAD; + upc_barrier; + if (MYTHREAD == 0) { + int i, total = 0; + for (i = 0; i < THREADS; i++) + total += inx[i]; + printf("Total is %d\n", total); + } + return 0; } -- GitLab From aeec885cca377d1fd3c1a19d917a3218a8a47478 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 9 Apr 2012 10:43:57 -0700 Subject: [PATCH 096/614] Cosmetic mods, change spaces to tabs --- testsuite/expect/test1.94 | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/testsuite/expect/test1.94 b/testsuite/expect/test1.94 index 85706bb0e5..b0dd011600 100755 --- a/testsuite/expect/test1.94 +++ b/testsuite/expect/test1.94 @@ -53,8 +53,8 @@ if {[file executable $upcc] == 0} { exit 0 } if {[test_front_end] != 0} { - send_user "\nWARNING: This test is incompatible with front-end systems\n" - exit 0 + send_user "\nWARNING: This test is incompatible with front-end systems\n" + exit 0 } if {[test_aix] == 1} { send_user "WARNING: Test is incompatible with AIX\n" @@ -136,24 +136,24 @@ if {[wait_for_file $file_out] == 0} { set total 0 spawn $bin_cat $file_out expect { - -re "Hello from ($number) of $task_cnt" { + -re "Hello from ($number) of $task_cnt" { incr matches incr sum $expect_out(1,string) - exp_continue - } + exp_continue + } -re "Total is ($number)" { set total $expect_out(1,string) - exp_continue + exp_continue } -re "Failed to mmap" { send_user "\nFAILURE: insufficient shared memory. " send_user "Rebuild UPCC with --disable-pshm option.\n" exp_continue } - eof { + eof { wait - } - } + } + } if {$matches == 0} { send_user "\nFAILURE: No UPC communications occurred\n" set exit_code 1 -- GitLab From 5fe1ce52f53384f745299e4ed49d4d6b3c1bb3a7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Apr 2012 10:41:29 -0700 Subject: [PATCH 097/614] Format change to NRT logging output --- src/plugins/switch/nrt/nrt.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 910dbe3512..e6c06804c2 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -928,20 +928,20 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) int i; info("--Begin Adapter Status--"); - info(" adapter_name:%s", status_adapter->adapter_name); - info(" adapter_type:%s", + info(" adapter_name: %s", status_adapter->adapter_name); + info(" adapter_type: %s", _adapter_type_str(status_adapter->adapter_type)); - info(" window_count:%hu", *(status_adapter->window_count)); + info(" window_count: %hu", *(status_adapter->window_count)); info(" --------"); for (i = 0; i < MIN(*(status_adapter->window_count), NRT_DEBUG_CNT); i++) { nrt_status_t *status = *(status_adapter->status_array); - info(" bulk_xfer:%hu", status[i].bulk_transfer); - info(" client_pid:%u", (uint32_t)status[i].client_pid); - info(" rcontext_blocks:%u", status[i].rcontext_blocks); - info(" state:%s", _win_state_str(status[i].state)); - info(" uid:%u", (uint32_t) status[i].uid); - info(" window_id:%hu", status[i].window_id); + info(" bulk_xfer: %hu", status[i].bulk_transfer); + info(" client_pid: %u", (uint32_t)status[i].client_pid); + info(" rcontext_blocks: %u", status[i].rcontext_blocks); + info(" state: %s", _win_state_str(status[i].state)); + info(" uid: %u", (uint32_t) status[i].uid); + info(" window_id: %hu", status[i].window_id); info(" --------"); } info("--End Adapter Status--"); -- GitLab From 69dbba8c3eb8ecead12041ef6d103608cbff8996 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Apr 2012 11:00:32 -0700 Subject: [PATCH 098/614] Add IP V4 address to SLURM adapter info --- src/plugins/switch/nrt/nrt.c | 41 ++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e6c06804c2..ab43a61074 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -97,6 +97,7 @@ typedef struct slurm_nrt_window { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; + in_addr_t ipv4_addr; nrt_logical_id_t lid; nrt_network_id_t network_id; nrt_port_id_t port_id; @@ -954,6 +955,7 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) int i, j; struct slurm_nrt_adapter *a; slurm_nrt_window_t *w; + unsigned char *p; assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); @@ -966,6 +968,9 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_name: %s", a->adapter_name); info(" adapter_type: %s", _adapter_type_str(a->adapter_type)); + p = (unsigned char *) &a->ipv4_addr; + info(" ipv4_addr: %d.%d.%d.%d", p[0], p[1], p[2], p[3]); + info(" ipv6_addr: TBD"); info(" lid: %u", a->lid); info(" network_id: %lu", a->network_id); info(" port_id: %hu", a->port_id); @@ -1035,6 +1040,18 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) info(" lpar_id: %u", hfi_tbl_ptr->lpar_id); info(" lid: %u", hfi_tbl_ptr->lid); info(" win_id: %hu", hfi_tbl_ptr->win_id); + } else if ((adapter_type == NRT_IPONLY) || + (adapter_type == NRT_HPCE)) { /* HPC Ethernet */ + nrt_ip_task_info_t *ip_tbl_ptr; + unsigned char *p; + ip_tbl_ptr = table; + ip_tbl_ptr += i; + info(" task_id: %u", ip_tbl_ptr->task_id); + info(" node_number: %u", ip_tbl_ptr->node_number); + p = (unsigned char *) &ip_tbl_ptr->ip.ipv4_addr; + info(" ipv4_addr: %d.%d.%d.%d", + p[0], p[1], p[2], p[3]); + info(" ipv6_addr: TBD"); } else { fatal("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); @@ -1362,18 +1379,25 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) _adapter_type_str(query_adapter_info.adapter_type), adapter_info.num_ports); for (k = 0; k < adapter_info.num_ports; k++) { + unsigned char *p; + p = (unsigned char *) &adapter_info.port[k]. + ipv4_addr; info("port_id:%hu status:%hu lid:%u " - "network_id:%lu special:%lu", + "network_id:%lu special:%lu " + "ipv4_addr:%d.%d.%d.%d", adapter_info.port[k].port_id, adapter_info.port[k].status, adapter_info.port[k].lid, adapter_info.port[k].network_id, - adapter_info.port[k].special); + adapter_info.port[k].special, + p[0], p[1], p[2], p[3]); } #endif for (k = 0; k < adapter_info.num_ports; k++) { if (adapter_info.port[k].status != 1) continue; + adapter_ptr->ipv4_addr = adapter_info.port[k]. + ipv4_addr; adapter_ptr->lid = adapter_info.port[k].lid; adapter_ptr->network_id = adapter_info.port[k]. network_id; @@ -1383,6 +1407,11 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) special; break; } + if ((adapter_ptr->ipv4_addr == 0) && + (adapter_info.num_ports > 0)) { + adapter_ptr->ipv4_addr = adapter_info.port[0]. + ipv4_addr; + } } if (status_array) { for (j = 0; j < max_windows; j++) { @@ -1447,6 +1476,7 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) packmem(a->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); dummy16 = a->adapter_type; pack16(dummy16, buf); /* adapter_type is an int */ + pack32(a->ipv4_addr, buf); pack32(a->lid, buf); pack64(a->network_id, buf); pack8(a->port_id, buf); @@ -1487,6 +1517,7 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) strncpy(da->adapter_name, sa->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); da->adapter_type = sa->adapter_type; + da->ipv4_addr = sa->ipv4_addr; da->lid = sa->lid; da->network_id = sa->network_id; da->port_id = sa->port_id; @@ -1531,6 +1562,7 @@ _fake_unpack_adapters(Buf buf) goto unpack_error; safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); + safe_unpack32(&dummy32, buf); safe_unpack64(&dummy64, buf); safe_unpack8 (&dummy8, buf); safe_unpack64(&dummy64, buf); @@ -1634,6 +1666,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) memcpy(tmp_a->adapter_name, name_ptr, size); safe_unpack16(&dummy16, buf); tmp_a->adapter_type = dummy16; /* adapter_type is an int */ + safe_unpack32(&tmp_a->ipv4_addr, buf); safe_unpack32(&tmp_a->lid, buf); safe_unpack64(&tmp_a->network_id, buf); safe_unpack8(&tmp_a->port_id, buf); @@ -2869,8 +2902,8 @@ nrt_clear_node_state(void) continue; } #if NRT_DEBUG - info("nrt_command(status_adapter, %s, %s), " - "window_count:%hu", + info("nrt_command(status_adapter, %s, %s) " + "window_count: %hu", adapter_status.adapter_name, _adapter_type_str(adapter_status.adapter_type), window_count); -- GitLab From 5518d4a9ef29802d52ce2f31ea4f97b2fd9271f3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Apr 2012 12:42:54 -0700 Subject: [PATCH 099/614] Add logic to pass IP table records and correct some logging --- src/plugins/switch/nrt/nrt.c | 58 ++++++++++++++++++++++++++--- src/plugins/switch/nrt/switch_nrt.c | 7 ++++ 2 files changed, 59 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ab43a61074..11db548aa5 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -774,6 +774,13 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table->lmc = 0; ib_table->task_id = task_id; ib_table->win_id = window->window_id; + } else if (adapter_type == NRT_IPONLY) { + nrt_ip_task_info_t *ip_table; + ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; + ip_table->node_number = 0; + ip_table->task_id = task_id; + memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, + sizeof(in_addr_t)); } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; @@ -787,6 +794,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, strncpy(tableinfo[i].adapter_name, adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[i].adapter_type = adapter_type; } return SLURM_SUCCESS; @@ -1326,9 +1334,9 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; } #if NRT_DEBUG - error("nrt_command(status_adapter, %s, %s)", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type)); + info("nrt_command(status_adapter, %s, %s)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type)); _print_adapter_status(&adapter_status); #endif adapter_ptr = &n->adapter_list[n->adapter_count]; @@ -1888,9 +1896,18 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, node = _find_node(nrt_state, host); if (node && node->adapter_list) { for (i = 0; i < node->adapter_count; i++) { - if ((node->adapter_list[i].adapter_type != NRT_IB) && - (node->adapter_list[i].adapter_type != NRT_HFI)) - continue; + nrt_adapter_t ad_type; + ad_type = node->adapter_list[i].adapter_type; + if ((ad_type == NRT_IPONLY) || + (ad_type == NRT_HPCE)) { + if (jp->user_space) + continue; + } + if ((ad_type == NRT_IB) || + (ad_type == NRT_HFI)) { + if (!jp->user_space) + continue; + } if (adapter_type == NRT_MAX_ADAPTER_TYPES) { adapter_type = node->adapter_list[i]. adapter_type; @@ -1918,6 +1935,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, sizeof(nrt_tableinfo_t)); if (adapter_type == NRT_IB) table_rec_len = sizeof(nrt_ib_task_info_t); + else if (adapter_type == NRT_IPONLY) + table_rec_len = sizeof(nrt_ip_task_info_t); else if (adapter_type == NRT_HFI) table_rec_len = sizeof(nrt_hfi_task_info_t); else { @@ -2012,6 +2031,17 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack32(ib_tbl_ptr->task_id, buf); pack16(ib_tbl_ptr->win_id, buf); } + } else if (tableinfo->adapter_type == NRT_IPONLY) { + nrt_ip_task_info_t *ip_tbl_ptr; + for (i = 0, ip_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, ip_tbl_ptr++) { + packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, + sizeof(in_addr_t), buf); + pack32(ip_tbl_ptr->node_number, buf); + pack16(ip_tbl_ptr->reserved, buf); + pack32(ip_tbl_ptr->task_id, buf); + } } else if (tableinfo->adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_tbl_ptr; for (i = 0, hfi_tbl_ptr = tableinfo->table; @@ -2087,6 +2117,22 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); } + } else if (tableinfo->adapter_type == NRT_IPONLY) { + nrt_ip_task_info_t *ip_tbl_ptr; + tableinfo->table = (nrt_ip_task_info_t *) + xmalloc(tableinfo->table_length * + sizeof(nrt_ip_task_info_t)); + for (i = 0, ip_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, ip_tbl_ptr++) { + safe_unpackmem((char *) &ip_tbl_ptr->ip.ipv4_addr, + &size, buf); + if (size != sizeof(in_addr_t)) + goto unpack_error; + safe_unpack32(&ip_tbl_ptr->node_number, buf); + safe_unpack16(&ip_tbl_ptr->reserved, buf); + safe_unpack32(&ip_tbl_ptr->task_id, buf); + } } else if (tableinfo->adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_tbl_ptr; tableinfo->table = (nrt_hfi_task_info_t *) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 98db5c8aec..75c5d5de3c 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -435,6 +435,13 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, strstr(network, "BULK_XFER"))) bulk_xfer = true; + if (network && + (strstr(network, "ipv4") || + strstr(network, "IPV4"))) { + ip_v6 = false; + user_space = false; + } + if (network && (strstr(network, "ipv6") || strstr(network, "IPV6"))) -- GitLab From bc58be4f72723c3f1c8bfef32cb51ca2318b3b49 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Apr 2012 16:42:26 -0700 Subject: [PATCH 100/614] Add num_tasks to NRT job info record --- src/plugins/switch/nrt/nrt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 11db548aa5..c8b072515a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2083,6 +2083,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack8(j->user_space, buf); pack16(j->tables_per_task, buf); pack64(j->network_id, buf); + pack32(j->num_tasks, buf); packstr(j->protocol, buf); for (i = 0; i < j->tables_per_task; i++) { _pack_tableinfo(&j->tableinfo[i], buf); @@ -2183,6 +2184,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); safe_unpack64(&j->network_id, buf); + safe_unpack32(&j->num_tasks, buf); safe_unpackstr_xmalloc(&j->protocol, &uint32_tmp, buf); j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * -- GitLab From f5ef4faf6c67e236ff299abd7044adfe624c6c1c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 23 Apr 2012 15:47:22 -0700 Subject: [PATCH 101/614] Improve NRT logging, no fundamental change in logic --- src/plugins/switch/nrt/nrt.c | 39 +++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c8b072515a..cfeea7b74b 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -154,6 +154,7 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; /* Local functions */ static char * _adapter_type_str(nrt_adapter_t type); +static char * _nrt_state_str(win_state_t state); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, @@ -189,6 +190,7 @@ static void _lock(void); static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); +static char * _port_status_str(nrt_port_status_t status); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, @@ -883,6 +885,22 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, return SLURM_SUCCESS; } +static char * +_port_status_str(nrt_port_status_t status) +{ + if (status == 0) + return "Down"; + else if (status == 1) + return "Up"; + else if (status == 2) + return "Unconfig"; + else { + static char buf[16]; + snprintf(buf, sizeof(buf), "%d", status); + return buf; + } +} + static char * _win_state_str(win_state_t state) { @@ -935,16 +953,17 @@ static void _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) { int i; + nrt_window_id_t window_cnt; + nrt_status_t *status = *(status_adapter->status_array); info("--Begin Adapter Status--"); info(" adapter_name: %s", status_adapter->adapter_name); info(" adapter_type: %s", _adapter_type_str(status_adapter->adapter_type)); - info(" window_count: %hu", *(status_adapter->window_count)); + window_cnt = *(status_adapter->window_count); + info(" window_count: %hu", window_cnt); info(" --------"); - for (i = 0; i < MIN(*(status_adapter->window_count), NRT_DEBUG_CNT); - i++) { - nrt_status_t *status = *(status_adapter->status_array); + for (i = 0; i < MIN(window_cnt, NRT_DEBUG_CNT); i++) { info(" bulk_xfer: %hu", status[i].bulk_transfer); info(" client_pid: %u", (uint32_t)status[i].client_pid); info(" rcontext_blocks: %u", status[i].rcontext_blocks); @@ -953,6 +972,11 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) info(" window_id: %hu", status[i].window_id); info(" --------"); } + if (i < window_cnt) { + info(" suppress data for windows %hu through %hu", + status[i].window_id, status[--window_cnt].window_id); + info(" --------"); + } info("--End Adapter Status--"); } @@ -1390,11 +1414,12 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) unsigned char *p; p = (unsigned char *) &adapter_info.port[k]. ipv4_addr; - info("port_id:%hu status:%hu lid:%u " + info("port_id:%hu status:%s lid:%u " "network_id:%lu special:%lu " "ipv4_addr:%d.%d.%d.%d", adapter_info.port[k].port_id, - adapter_info.port[k].status, + _port_status_str(adapter_info.port[k]. + status), adapter_info.port[k].lid, adapter_info.port[k].network_id, adapter_info.port[k].special, @@ -3004,7 +3029,7 @@ nrt_clear_node_state(void) xfree(status_array); } #if NRT_DEBUG - info("nrt_clear_node_state: complete: %d", rc); + info("nrt_clear_node_state: complete:%d", rc); #endif return rc; } -- GitLab From ce0835e37d5fff03100f969ac888c66f178e9a0a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Apr 2012 15:51:36 -0700 Subject: [PATCH 102/614] Able to do NRT load/unload in simplest case --- src/plugins/switch/nrt/nrt.c | 132 ++++++++++++++++++++++------------- 1 file changed, 82 insertions(+), 50 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index cfeea7b74b..3d7050b514 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -154,15 +154,16 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; /* Local functions */ static char * _adapter_type_str(nrt_adapter_t type); -static char * _nrt_state_str(win_state_t state); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, + bool user_space); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, + bool user_space); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -735,7 +736,7 @@ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid) + nrt_logical_id_t base_lid, bool user_space) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; @@ -756,16 +757,25 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, adapter = &node->adapter_list[i]; if (adapter->adapter_type != adapter_type) continue; - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; + if (user_space) { + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - if (adapter_type == NRT_IB) { + if (!user_space || (adapter_type == NRT_IPONLY)) { + nrt_ip_task_info_t *ip_table; + ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; + ip_table->node_number = 0; + ip_table->task_id = task_id; + memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, + sizeof(in_addr_t)); + } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; strncpy(ib_table->device_name, adapter->adapter_name, @@ -776,13 +786,6 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table->lmc = 0; ib_table->task_id = task_id; ib_table->win_id = window->window_id; - } else if (adapter_type == NRT_IPONLY) { - nrt_ip_task_info_t *ip_table; - ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; - ip_table->node_number = 0; - ip_table->task_id = task_id; - memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, - sizeof(in_addr_t)); } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; @@ -814,7 +817,7 @@ static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid) + nrt_logical_id_t base_lid, bool user_space) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; @@ -848,17 +851,26 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, return SLURM_ERROR; } - /* Reserve a window on the adapter for this task */ - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; + if (user_space) { + /* Reserve a window on the adapter for this task */ + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s adapter %s", + node->name, adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - if (adapter_type == NRT_IB) { + if (!user_space || (adapter_type == NRT_IPONLY)) { + nrt_ip_task_info_t *ip_table; + ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; + ip_table->node_number = 0; + ip_table->task_id = task_id; + memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, + sizeof(in_addr_t)); + } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; strncpy(ib_table->device_name, adapter_name, @@ -1098,6 +1110,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) { int i; char buf[128]; + nrt_adapter_t adapter_type; assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); @@ -1118,9 +1131,12 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" nodenames: %s (slurmctld internal use only)", buf); info(" num_tasks: %d", j->num_tasks); for (i = 0; i < j->tables_per_task; i++) { + if (j->user_space) + adapter_type = j->tableinfo[i].adapter_type; + else + adapter_type = NRT_IPONLY; _print_table(j->tableinfo[i].table, - j->tableinfo[i].table_length, - j->tableinfo[i].adapter_type); + j->tableinfo[i].table_length, adapter_type); } info("--End Jobinfo--"); } @@ -1129,6 +1145,7 @@ static void _print_load_table(nrt_cmd_load_table_t *load_table) { nrt_table_info_t *table_info = load_table->table_info; + nrt_adapter_t adapter_type; info("--- Begin load table ---"); info(" num_tasks: %u", table_info->num_tasks); @@ -1137,7 +1154,7 @@ _print_load_table(nrt_cmd_load_table_t *load_table) info(" pid: %u", (uint32_t)table_info->pid); info(" network_id: %lu", table_info->network_id); info(" adapter_type: %s",_adapter_type_str(table_info->adapter_type)); - info(" is_user_space: %hu", (int)table_info->is_user_space); + info(" is_user_space: %d", (int)table_info->is_user_space); info(" is_ipv4: %hu", (int)table_info->is_ipv4); info(" context_id: %u", table_info->context_id); info(" table_id: %u", table_info->table_id); @@ -1149,8 +1166,12 @@ _print_load_table(nrt_cmd_load_table_t *load_table) info(" immed_send_slots_per_win: %u", table_info->immed_send_slots_per_win); info(" num_cau_indexes: %u", table_info->num_cau_indexes); + if (table_info->is_user_space) + adapter_type = table_info->adapter_type; + else + adapter_type = NRT_IPONLY; _print_table(load_table->per_task_input, table_info->num_tasks, - table_info->adapter_type); + adapter_type); info("--- End load table ---"); } #endif @@ -1922,21 +1943,21 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, if (node && node->adapter_list) { for (i = 0; i < node->adapter_count; i++) { nrt_adapter_t ad_type; + if (adapter_name && + strcmp(adapter_name, + node->adapter_list[i].adapter_name)) { + continue; + } ad_type = node->adapter_list[i].adapter_type; if ((ad_type == NRT_IPONLY) || (ad_type == NRT_HPCE)) { if (jp->user_space) continue; } - if ((ad_type == NRT_IB) || - (ad_type == NRT_HFI)) { - if (!jp->user_space) - continue; - } - if (adapter_type == NRT_MAX_ADAPTER_TYPES) { - adapter_type = node->adapter_list[i]. - adapter_type; - } + if (adapter_type == NRT_MAX_ADAPTER_TYPES) + adapter_type = ad_type; + else if (adapter_type != ad_type) + continue; adapter_type_count++; /* FIXME: It's unclear how this works, each node would have different logical_id * although the network_id seems to be common for our IB switches */ @@ -1947,21 +1968,26 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, } if (sn_all) { jp->tables_per_task = adapter_type_count; - } else { + } else if (adapter_type_count >= 1) { jp->tables_per_task = 1; + } else { + jp->tables_per_task = 0; + info("switch/nrt: no adapter found for job"); } _unlock(); if (host != NULL) free(host); hostlist_iterator_reset(hi); + if (jp->tables_per_task == 0) + return SLURM_FAILURE; /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * sizeof(nrt_tableinfo_t)); - if (adapter_type == NRT_IB) - table_rec_len = sizeof(nrt_ib_task_info_t); - else if (adapter_type == NRT_IPONLY) + if (!jp->user_space) table_rec_len = sizeof(nrt_ip_task_info_t); + else if (adapter_type == NRT_IB) + table_rec_len = sizeof(nrt_ib_task_info_t); else if (adapter_type == NRT_HFI) table_rec_len = sizeof(nrt_hfi_task_info_t); else { @@ -2002,14 +2028,16 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, host, proc_cnt, jp->job_key, adapter_type, - base_lid); + base_lid, + jp->user_space); } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, host, proc_cnt, jp->job_key, adapter_type, - base_lid); + base_lid, + jp->user_space); } if (rc != SLURM_SUCCESS) { _unlock(); @@ -2540,9 +2568,13 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) #endif for (i = 0; i < jp->tables_per_task; i++) { #if NRT_DEBUG + nrt_adapter_t adapter_type; + if (jp->user_space) + adapter_type = jp->tableinfo[i].adapter_type; + else + adapter_type = NRT_IPONLY; _print_table(jp->tableinfo[i].table, - jp->tableinfo[i].table_length, - jp->tableinfo[i].adapter_type); + jp->tableinfo[i].table_length, adapter_type); #endif adapter_name = jp->tableinfo[i].adapter_name; rc = _wait_for_all_windows(&jp->tableinfo[i]); -- GitLab From 507e9bdb5647b85524e1cfba3ca329bc25c20b44 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 24 Apr 2012 17:07:49 -0700 Subject: [PATCH 103/614] Fix some bugs in handling multi-node NRT allocation --- src/plugins/switch/nrt/nrt.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 3d7050b514..5d48c61235 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -156,12 +156,14 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, - nrt_task_id_t task_id, nrt_job_key_t job_key, + int node_id, nrt_task_id_t task_id, + nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, - nrt_task_id_t task_id, nrt_job_key_t job_key, + int node_id, nrt_task_id_t task_id, + nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space); static slurm_nrt_libstate_t *_alloc_libstate(void); @@ -734,7 +736,7 @@ _find_free_window(slurm_nrt_adapter_t *adapter) */ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, nrt_task_id_t task_id, + char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space) { @@ -771,13 +773,15 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (!user_space || (adapter_type == NRT_IPONLY)) { nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; - ip_table->node_number = 0; + ip_table += task_id; + ip_table->node_number = node_id; ip_table->task_id = task_id; memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, sizeof(in_addr_t)); } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table += task_id; strncpy(ib_table->device_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; @@ -790,6 +794,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; hfi_table += task_id; + hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; } else { @@ -815,7 +820,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, */ static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, - char *hostname, nrt_task_id_t task_id, + char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space) { @@ -866,13 +871,15 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, if (!user_space || (adapter_type == NRT_IPONLY)) { nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; - ip_table->node_number = 0; + ip_table += task_id; + ip_table->node_number = node_id; ip_table->task_id = task_id; memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, sizeof(in_addr_t)); } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table += task_id; strncpy(ib_table->device_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); ib_table += task_id; @@ -885,6 +892,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; hfi_table += task_id; + hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; } else { @@ -1100,6 +1108,7 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) fatal("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); } + info(" ------"); } info("--End NRT table--"); } @@ -1901,7 +1910,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, int nnodes; hostlist_iterator_t hi; char *host = NULL; - int proc_cnt = 0; + int task_id; int i, j; slurm_nrt_nodeinfo_t *node; int rc; @@ -2009,7 +2018,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, full_node_cnt = nprocs % nnodes; min_procs_per_node = nprocs / nnodes; max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - proc_cnt = 0; + task_id = 0; _lock(); for (i = 0; i < nnodes; i++) { host = hostlist_next(hi); @@ -2025,7 +2034,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, if (adapter_name == NULL) { rc = _allocate_windows_all(jp->tables_per_task, jp->tableinfo, - host, proc_cnt, + host, i, task_id, jp->job_key, adapter_type, base_lid, @@ -2033,7 +2042,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, - host, proc_cnt, + host, i, task_id, jp->job_key, adapter_type, base_lid, @@ -2043,7 +2052,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, _unlock(); goto fail; } - proc_cnt++; + task_id++; } free(host); } -- GitLab From c5bce6ebe9ea9a57d5bcc34472f1f15688db63de Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Apr 2012 10:05:59 -0700 Subject: [PATCH 104/614] Add some support for job --network option in switch/nrt --- doc/man/man1/salloc.1 | 45 +++++++++++++++++++------- doc/man/man1/sbatch.1 | 45 +++++++++++++++++++------- doc/man/man1/srun.1 | 45 +++++++++++++++++++------- src/plugins/switch/nrt/nrt.c | 50 +++++++++++++++++++++++++++-- src/plugins/switch/nrt/slurm_nrt.h | 1 + src/plugins/switch/nrt/switch_nrt.c | 42 ++++++------------------ 6 files changed, 159 insertions(+), 69 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index be2939adf2..24675db087 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -729,18 +729,41 @@ that the \fB\-\-cpus\-per\-task\fR option will change this default. .TP \fB\-\-network\fR=<\fItype\fR> Specify the communication protocol to be used. -This option is supported on AIX systems. -Since POE is used to launch tasks, this option is not normally used or -is specified using the \fBSLURM_NETWORK\fR environment variable. The interpretation of \fItype\fR is system dependent. -For systems with an IBM Federation switch, the following -comma\-separated and case insensitive types are recognized: -\fBIP\fR (the default is user\-space), \fBSN_ALL\fR, \fBSN_SINGLE\fR, -\fBBULK_XFER\fR and adapter names (e.g. \fBSNI0\fR and \fBSNI1\fR). -For more information, on IBM systems see \fIpoe\fR documentation on -the environment variables \fBMP_EUIDEVICE\fR and \fBMP_USE_BULK_XFER\fR. -Note that only four jobs steps may be active at once on a node with the -\fBBULK_XFER\fR option due to limitations in the Federation switch driver. +This option is current supported on systems with IBM's Parallel Environment (PE). +See IBM's LoadLeveler job command keyword documentation about the keyword +"network" for more information. +Multiple values may be specified in a comma separated list. +Supported values include: +.RS +.TP 12 +\fBBULK_XFER\fR +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +.TP +\fBIPV4\fR +Use Internet Protocol (IP) version 4 communications (default) +.TP +\fBIPV6\fR +Use Internet Protocol (IP) version 6 communications +.TP +\fBLAPI\fR +Use the LAPI protocol +.TP +\fBPAMI\fR +Use the PAMI protocol +.TP +\fBSN_ALL\fR +Use all available switch networks (default) +.TP +\fBSN_SINGLE\fR +Use one available switch networks +.TP +\fBUS\fR +Use User Space communications +.TP +Specific adapter name +One specific adapter name may be specified (e.g. "eth0") +.RE .TP \fB\-\-nice\fR[=\fIadjustment\fR] diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 807342d43a..987c01a8fd 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -782,18 +782,41 @@ that the \fB\-\-cpus\-per\-task\fR option will change this default. .TP \fB\-\-network\fR=<\fItype\fR> Specify the communication protocol to be used. -This option is supported on AIX systems. -Since POE is used to launch tasks, this option is not normally used or -is specified using the \fBSLURM_NETWORK\fR environment variable. The interpretation of \fItype\fR is system dependent. -For systems with an IBM Federation switch, the following -comma\-separated and case insensitive types are recognized: -\fBIP\fR (the default is user\-space), \fBSN_ALL\fR, \fBSN_SINGLE\fR, -\fBBULK_XFER\fR and adapter names (e.g. \fBSNI0\fR and \fBSNI1\fR). -For more information, on IBM systems see \fIpoe\fR documentation on -the environment variables \fBMP_EUIDEVICE\fR and \fBMP_USE_BULK_XFER\fR. -Note that only four jobs steps may be active at once on a node with the -\fBBULK_XFER\fR option due to limitations in the Federation switch driver. +This option is current supported on systems with IBM's Parallel Environment (PE). +See IBM's LoadLeveler job command keyword documentation about the keyword +"network" for more information. +Multiple values may be specified in a comma separated list. +Supported values include: +.RS +.TP 12 +\fBBULK_XFER\fR +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +.TP +\fBIPV4\fR +Use Internet Protocol (IP) version 4 communications (default) +.TP +\fBIPV6\fR +Use Internet Protocol (IP) version 6 communications +.TP +\fBLAPI\fR +Use the LAPI protocol +.TP +\fBPAMI\fR +Use the PAMI protocol +.TP +\fBSN_ALL\fR +Use all available switch networks (default) +.TP +\fBSN_SINGLE\fR +Use one available switch networks +.TP +\fBUS\fR +Use User Space communications +.TP +Specific adapter name +One specific adapter name may be specified (e.g. "eth0") +.RE .TP \fB\-\-nice\fR[=\fIadjustment\fR] diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 490321e20e..c931e3ae2b 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -832,18 +832,41 @@ that the \fB\-\-cpus\-per\-task\fR option will change this default. .TP \fB\-\-network\fR=<\fItype\fR> Specify the communication protocol to be used. -This option is supported on AIX systems. -Since POE is used to launch tasks, this option is not normally used or -is specified using the \fBSLURM_NETWORK\fR environment variable. The interpretation of \fItype\fR is system dependent. -For systems with an IBM Federation switch, the following -comma\-separated and case insensitive types are recognized: -\fBIP\fR (the default is user\-space), \fBSN_ALL\fR, \fBSN_SINGLE\fR, -\fBBULK_XFER\fR and adapter names (e.g. \fBSNI0\fR and \fBSNI1\fR). -For more information, on IBM systems see \fIpoe\fR documentation on -the environment variables \fBMP_EUIDEVICE\fR and \fBMP_USE_BULK_XFER\fR. -Note that only four jobs steps may be active at once on a node with the -\fBBULK_XFER\fR option due to limitations in the Federation switch driver. +This option is current supported on systems with IBM's Parallel Environment (PE). +See IBM's LoadLeveler job command keyword documentation about the keyword +"network" for more information. +Multiple values may be specified in a comma separated list. +Supported values include: +.RS +.TP 12 +\fBBULK_XFER\fR +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +.TP +\fBIPV4\fR +Use Internet Protocol (IP) version 4 communications (default) +.TP +\fBIPV6\fR +Use Internet Protocol (IP) version 6 communications +.TP +\fBLAPI\fR +Use the LAPI protocol +.TP +\fBPAMI\fR +Use the PAMI protocol +.TP +\fBSN_ALL\fR +Use all available switch networks (default) +.TP +\fBSN_SINGLE\fR +Use one available switch networks +.TP +\fBUS\fR +Use User Space communications +.TP +Specific adapter name +One specific adapter name may be specified (e.g. "eth0") +.RE .TP \fB\-\-nice\fR[=\fIadjustment\fR] diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 5d48c61235..2ebd827425 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -748,6 +748,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, assert(tableinfo); assert(hostname); + debug("in _allocate_windows_all"); node = _find_node(nrt_state, hostname); if (node == NULL) { error("Failed to find node in node_list: %s", hostname); @@ -870,7 +871,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, if (!user_space || (adapter_type == NRT_IPONLY)) { nrt_ip_task_info_t *ip_table; - ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; + ip_table = (nrt_ip_task_info_t *) tableinfo[0].table; ip_table += task_id; ip_table->node_number = node_id; ip_table->task_id = task_id; @@ -878,7 +879,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, sizeof(in_addr_t)); } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; - ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table = (nrt_ib_task_info_t *) tableinfo[0].table; ib_table += task_id; strncpy(ib_table->device_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); @@ -890,7 +891,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; - hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; + hfi_table = (nrt_hfi_task_info_t *) tableinfo[0].table; hfi_table += task_id; hfi_table += task_id; hfi_table->task_id = task_id; @@ -2709,6 +2710,8 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, error("Unable to clean window for job_key %hu, " "nrt_clean_window(%s, %u): %s", job_key, adapter_name, adapter_type, nrt_err_str(err)); + if (err != NRT_EAGAIN) + break; } return SLURM_FAILURE; @@ -3146,3 +3149,44 @@ extern char *nrt_err_str(int rc) snprintf(str, sizeof(str), "%d", rc); return str; } + + +/* return an adapter name from within a job's "network" string + * IN network - job's "network" specification + * IN list - hostlist of allocated nodes + * RET - A network name, must xfree() or NULL if none found */ +extern char *nrt_adapter_name_check(char *network, hostlist_t hl) +{ + int i; + hostlist_iterator_t hi; + slurm_nrt_nodeinfo_t *node; + char *host, *net_str = NULL, *token = NULL, *last = NULL; + char *adapter_name = NULL; + + if (!network || !hl) + return NULL; + + hi = hostlist_iterator_create(hl); + host = hostlist_next(hi); + hostlist_iterator_destroy(hi); + _lock(); + node = _find_node(nrt_state, host); + if (node && node->adapter_list) { + net_str = xstrdup(network); + token = strtok_r(network, ",", &last); + } + while (token) { + for (i = 0; i < node->adapter_count; i++) { + if (!strcmp(token,node->adapter_list[i].adapter_name)){ + adapter_name = xstrdup(token); + break; + } + } + if (adapter_name) + break; + token = strtok_r(NULL, ",", &last); + } + _unlock(); + xfree(net_str); + return adapter_name; +} diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 01f38c5c2b..f2022c8828 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -83,6 +83,7 @@ enum { #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) +extern char *nrt_adapter_name_check(char *network, hostlist_t hl); extern int nrt_clear_node_state(void); extern char *nrt_err_str(int rc); extern int nrt_slurmctld_init(void); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 75c5d5de3c..90454a0976 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -389,31 +389,6 @@ extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) return nrt_alloc_jobinfo((slurm_nrt_jobinfo_t **)switch_job); } -static char *_adapter_name_check(char *network) -{ - regex_t re; - char *pattern = "(sni[[:digit:]])"; - size_t nmatch = 5; - regmatch_t pmatch[5]; - char *name; - - if (!network) - return NULL; - if (regcomp(&re, pattern, REG_EXTENDED) != 0) { - error("sockname regex compilation failed"); - return NULL; - } - memset(pmatch, 0, sizeof(regmatch_t)*nmatch); - if (regexec(&re, network, nmatch, pmatch, 0) == REG_NOMATCH) { - return NULL; - } - name = xstrndup(network + pmatch[1].rm_so, - (size_t)(pmatch[1].rm_eo - pmatch[1].rm_so)); - regfree(&re); - - return name; -} - extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, uint16_t *tasks_per_node, int cyclic_alloc, char *network) @@ -430,6 +405,13 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, #else debug3("network = \"%s\"", network); #endif + + list = hostlist_create(nodelist); + if (!list) + fatal("hostlist_create(%s): %m", nodelist); + for (i = 0; i < hostlist_count(list); i++) + nprocs += tasks_per_node[i]; + if (network && (strstr(network, "bulk_xfer") || strstr(network, "BULK_XFER"))) @@ -472,20 +454,14 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, strstr(network, "SN_SINGLE")) { debug3("Found sn_single in network string"); sn_all = false; - } else if ((adapter_name = _adapter_name_check(network))) { - debug3("Found adapter %s in network string", adapter_name); + } else if ((adapter_name = nrt_adapter_name_check(network, list))) { + info("Found adapter %s in network string", adapter_name); sn_all = false; } else { /* default to sn_all */ sn_all = true; } - list = hostlist_create(nodelist); - if (!list) - fatal("hostlist_create(%s): %m", nodelist); - for (i = 0; i < hostlist_count(list); i++) - nprocs += tasks_per_node[i]; - err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, nprocs, sn_all, adapter_name, bulk_xfer, ip_v6, user_space, protocol); -- GitLab From 8e88cb8a4268e229cac07b398275b911180b87d9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Apr 2012 14:16:25 -0700 Subject: [PATCH 105/614] Start NRT job key at random point after slurmctld coldstart The local pnsd daemons cache recently used job keys and there re-use after a short period of time generates errors --- src/plugins/switch/nrt/nrt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2ebd827425..7839f567ec 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1198,7 +1198,9 @@ _alloc_libstate(void) tmp->node_list = NULL; tmp->hash_max = 0; tmp->hash_table = NULL; - tmp->key_index = 1; + /* Start key from random point, old key values are cached, + * which seems to prevent re-use for a while */ + tmp->key_index = (uint16_t) time(NULL); return tmp; } -- GitLab From 63bd22e867d6b37a3b0cd06f49f72e2d42b005c1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Apr 2012 14:16:45 -0700 Subject: [PATCH 106/614] Some NRT fixes for IP communications --- src/plugins/switch/nrt/nrt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7839f567ec..4aa84f48af 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2589,9 +2589,11 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) jp->tableinfo[i].table_length, adapter_type); #endif adapter_name = jp->tableinfo[i].adapter_name; - rc = _wait_for_all_windows(&jp->tableinfo[i]); - if (rc != SLURM_SUCCESS) - return rc; + if (jp->user_space) { + rc = _wait_for_all_windows(&jp->tableinfo[i]); + if (rc != SLURM_SUCCESS) + return rc; + } if (adapter_name == NULL) continue; @@ -2738,6 +2740,8 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) info("nrt_unload_table"); _print_jobinfo(jp); #endif + if (!jp->user_space) + return rc; for (i = 0; i < jp->tables_per_task; i++) { for (j = 0; j < jp->tableinfo[i].table_length; j++) { if (jp->tableinfo[i].adapter_type == NRT_IB) { -- GitLab From adaadae600f4bf0591f1ac8d382bf87f83d1eae3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Apr 2012 14:59:31 -0700 Subject: [PATCH 107/614] Fix packing of NRT table info for IP over IB --- src/plugins/switch/nrt/nrt.c | 45 ++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4aa84f48af..f2cfb81e8b 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -192,13 +192,15 @@ static int _job_step_window_state(slurm_nrt_jobinfo_t *jp, static void _lock(void); static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); -static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); +static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, + nrt_adapter_t adapter_type, Buf buf); static char * _port_status_str(nrt_port_status_t status); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); -static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf); +static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, + nrt_adapter_t adapter_type, Buf buf); static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo); static int _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, @@ -2078,12 +2080,13 @@ fail: } static void -_pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +_pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, + Buf buf) { int i; pack32(tableinfo->table_length, buf); - if (tableinfo->adapter_type == NRT_IB) { + if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; for (i = 0, ib_tbl_ptr = tableinfo->table; i < tableinfo->table_length; @@ -2096,7 +2099,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack32(ib_tbl_ptr->task_id, buf); pack16(ib_tbl_ptr->win_id, buf); } - } else if (tableinfo->adapter_type == NRT_IPONLY) { + } else if (adapter_type == NRT_IPONLY) { nrt_ip_task_info_t *ip_tbl_ptr; for (i = 0, ip_tbl_ptr = tableinfo->table; i < tableinfo->table_length; @@ -2107,7 +2110,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack16(ip_tbl_ptr->reserved, buf); pack32(ip_tbl_ptr->task_id, buf); } - } else if (tableinfo->adapter_type == NRT_HFI) { + } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_tbl_ptr; for (i = 0, hfi_tbl_ptr = tableinfo->table; i < tableinfo->table_length; @@ -2121,8 +2124,8 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) pack8(tmp_8, buf); } } else { - fatal("_pack_tableinfo: Missing support for adapter " - "type %hu", tableinfo->adapter_type); + fatal("_pack_tableinfo: Missing support for adapter type %hu", + adapter_type); } packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); } @@ -2132,6 +2135,7 @@ extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { int i; + nrt_adapter_t adapter_type; assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); @@ -2150,8 +2154,13 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack64(j->network_id, buf); pack32(j->num_tasks, buf); packstr(j->protocol, buf); + for (i = 0; i < j->tables_per_task; i++) { - _pack_tableinfo(&j->tableinfo[i], buf); + if (!j->user_space) + adapter_type = NRT_IPONLY; + else + adapter_type = j->tableinfo[i].adapter_type; + _pack_tableinfo(&j->tableinfo[i], adapter_type, buf); } return SLURM_SUCCESS; @@ -2159,14 +2168,15 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) /* return 0 on success, -1 on failure */ static int -_unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) +_unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, + Buf buf) { uint32_t size; char *name_ptr; int i; safe_unpack32(&tableinfo->table_length, buf); - if (tableinfo->adapter_type == NRT_IB) { + if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; tableinfo->table = (nrt_ib_task_info_t *) xmalloc(tableinfo->table_length * @@ -2183,7 +2193,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); } - } else if (tableinfo->adapter_type == NRT_IPONLY) { + } else if (adapter_type == NRT_IPONLY) { nrt_ip_task_info_t *ip_tbl_ptr; tableinfo->table = (nrt_ip_task_info_t *) xmalloc(tableinfo->table_length * @@ -2199,7 +2209,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) safe_unpack16(&ip_tbl_ptr->reserved, buf); safe_unpack32(&ip_tbl_ptr->task_id, buf); } - } else if (tableinfo->adapter_type == NRT_HFI) { + } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_tbl_ptr; tableinfo->table = (nrt_hfi_task_info_t *) xmalloc(tableinfo->table_length * @@ -2217,7 +2227,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf) } } else { fatal("_unpack_tableinfo: Missing support for adapter " - "type %hu", tableinfo->adapter_type); + "type %hu", adapter_type); } safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != NRT_MAX_DEVICENAME_SIZE) @@ -2234,6 +2244,7 @@ unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { + nrt_adapter_t adapter_type; uint32_t uint32_tmp; int i; @@ -2255,7 +2266,11 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); for (i = 0; i < j->tables_per_task; i++) { - if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) + if (!j->user_space) + adapter_type = NRT_IPONLY; + else + adapter_type = j->tableinfo[i].adapter_type; + if (_unpack_tableinfo(&j->tableinfo[i], adapter_type, buf)) goto unpack_error; } -- GitLab From 43ec77577ffa115c2e4cb67dc30bcaa638a6ac10 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 25 Apr 2012 16:12:20 -0700 Subject: [PATCH 108/614] Change switch build_jobinfo call for proper task distribition Prior code assumed even task distribution (as required by switch/elan). --- doc/html/switchplugins.shtml | 18 +++++------- src/common/switch.c | 8 +++--- src/common/switch.h | 4 +-- src/plugins/switch/none/switch_none.c | 2 +- src/plugins/switch/nrt/nrt.c | 40 ++++++++++----------------- src/plugins/switch/nrt/slurm_nrt.h | 3 +- src/plugins/switch/nrt/switch_nrt.c | 10 +++---- src/slurmctld/step_mgr.c | 2 +- 8 files changed, 36 insertions(+), 51 deletions(-) diff --git a/doc/html/switchplugins.shtml b/doc/html/switchplugins.shtml index 4a599ce6a3..eaa72f383d 100644 --- a/doc/html/switchplugins.shtml +++ b/doc/html/switchplugins.shtml @@ -5,7 +5,7 @@

    Overview

    This document describes SLURM switch (interconnect) plugins and the API that defines them. It is intended as a resource to programmers wishing to write their own SLURM -switch plugins. This is version 0 of the API. +switch plugins. This is version 100 of the API. Note that many of the API functions are used only by one of the daemons. For example the slurmctld daemon builds a job step's switch credential (switch_p_build_jobinfo) while the @@ -22,9 +22,6 @@ abbreviation for the type of switch. We recommend, for example:

    • none—A plugin that implements the API without providing any actual switch service. This is the case for Ethernet and Myrinet interconnects.
    • -
    • elanQuadrics Elan3 or Elan4 -interconnect.
    • -
    • federation—IBM Federation interconnects.
    • nrt—IBM Network Resource Table (presently under development).

    The plugin_name and @@ -204,7 +201,7 @@ the plugin should return SLURM_ERROR and set the errno to an appropriate value to indicate the reason for failure.

    int switch_p_build_jobinfo (switch_jobinfo_t switch_job, -char *nodelist, int *tasks_per_node, int cyclic_alloc, char *network);

    +char *nodelist, uint16_t *tasks_per_node, uint32_t **tids, char *network);

    Description: Build a job's switch credential. It is recommended that the credential's magic number be validated.

    Arguments:
    @@ -213,12 +210,11 @@ switch credential to be updated
    nodelist    (input) List of nodes allocated to the job. This may contain expressions to specify node ranges (e.g. "linux[1-20]" or "linux[2,4,6,8]").
    -tasks_per_node    (input) List +tasks_per_node    (input) count of processes per node to be initiated as part of the job.
    -cyclic_alloc    (input) Non-zero -if job's processes are to be allocated across nodes in a cyclic fashion (task 0 on node 0, -task 1 on node 1, etc). If zero, processes are allocated sequentially on a node before -moving to the next node (tasks 0 and 1 on node 0, tasks 2 and 3 on node 1, etc.).
    +tids    (input) List of task +IDs to be initiated. The first array index is the node ID. The second array +index ranges from 0 to tasks_per_node of that node ID minus 1.
    network    (input) Job's network specification from srun command.

    Returns: SLURM_SUCCESS if successful. On failure, @@ -514,6 +510,6 @@ plugin that transmitted it. It is at the discretion of the plugin author whether to maintain data format compatibility across different versions of the plugin.

    -

    Last modified 21 December 2011

    +

    Last modified 25 April 2012

    diff --git a/src/common/switch.c b/src/common/switch.c index 9d0a73d824..0ef1a1320b 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -64,7 +64,7 @@ typedef struct slurm_switch_ops { int (*build_jobinfo) ( switch_jobinfo_t *jobinfo, char *nodelist, uint16_t *tasks_per_node, - int cyclic_alloc, + uint32_t **tids, char *network); switch_jobinfo_t *(*copy_jobinfo) ( switch_jobinfo_t *jobinfo ); void (*free_jobinfo) ( switch_jobinfo_t *jobinfo ); @@ -358,14 +358,14 @@ extern int switch_alloc_jobinfo(switch_jobinfo_t **jobinfo) } extern int switch_build_jobinfo(switch_jobinfo_t *jobinfo, - char *nodelist, uint16_t *tasks_per_node, - int cyclic_alloc, char *network) + char *nodelist, uint16_t *tasks_per_node, uint32_t **tids, + char *network) { if ( switch_init() < 0 ) return SLURM_ERROR; return (*(g_context->ops.build_jobinfo))( jobinfo, nodelist, - tasks_per_node, cyclic_alloc, network ); + tasks_per_node, tids, network ); } extern switch_jobinfo_t *switch_copy_jobinfo(switch_jobinfo_t *jobinfo) diff --git a/src/common/switch.h b/src/common/switch.h index 11eeed0ed6..6ea4ff9694 100644 --- a/src/common/switch.h +++ b/src/common/switch.h @@ -124,8 +124,8 @@ extern int switch_alloc_jobinfo (switch_jobinfo_t **jobinfo); * NOTE: storage must be freed using g_switch_free_jobinfo */ extern int switch_build_jobinfo (switch_jobinfo_t *jobinfo, - char *nodelist, uint16_t *tasks_per_node, - int cyclic_alloc, char *network); + char *nodelist, uint16_t *tasks_per_node, uint32_t **tids, + char *network); /* copy a switch job credential * IN jobinfo - the switch job credential to be copied diff --git a/src/plugins/switch/none/switch_none.c b/src/plugins/switch/none/switch_none.c index a1ad68b81c..389d90d8e3 100644 --- a/src/plugins/switch/none/switch_none.c +++ b/src/plugins/switch/none/switch_none.c @@ -120,7 +120,7 @@ int switch_p_alloc_jobinfo ( switch_jobinfo_t **switch_job ) } int switch_p_build_jobinfo ( switch_jobinfo_t *switch_job, char *nodelist, - uint16_t *tasks_per_node, int cyclic_alloc, char *network) + uint16_t *tasks_per_node, uint32_t **tids, char *network ) { return SLURM_SUCCESS; } diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f2cfb81e8b..4aa4a7f5db 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1908,21 +1908,17 @@ _next_key(void) * Used by: slurmctld */ extern int -nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, bool bulk_xfer, - bool ip_v6, bool user_space, char *protocol) +nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, + uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, + char *adapter_name, bool bulk_xfer, bool ip_v6, + bool user_space, char *protocol) { - int nnodes; + int nnodes, nprocs = 0; hostlist_iterator_t hi; char *host = NULL; - int task_id; int i, j; slurm_nrt_nodeinfo_t *node; int rc; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; @@ -1930,9 +1926,13 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); - assert(!hostlist_is_empty(hl)); + assert(tasks_per_node); - if (nprocs <= 0) + nnodes = hostlist_count(hl); + for (i = 0; i < nnodes; i++) + nprocs += tasks_per_node[i]; + + if ((nnodes <= 0) || (nprocs <= 0)) slurm_seterrno_ret(EINVAL); jp->bulk_xfer = (uint8_t) bulk_xfer; @@ -2019,27 +2019,17 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, #else debug("Allocating windows"); #endif - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - task_id = 0; _lock(); for (i = 0; i < nnodes; i++) { host = hostlist_next(hi); if (!host) error("Failed to get next host"); - if (i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { + for (j = 0; j < tasks_per_node[i]; j++) { if (adapter_name == NULL) { rc = _allocate_windows_all(jp->tables_per_task, jp->tableinfo, - host, i, task_id, + host, i, tids[i][j], jp->job_key, adapter_type, base_lid, @@ -2047,7 +2037,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, - host, i, task_id, + host, i, + tids[i][j], jp->job_key, adapter_type, base_lid, @@ -2057,7 +2048,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, _unlock(); goto fail; } - task_id++; } free(host); } diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index f2022c8828..9ec1fc2dd5 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -96,7 +96,8 @@ extern int nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *np, Buf buf); extern int nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *np, Buf buf); extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); -extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int nprocs, +extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, + uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, bool bulk_xfer, bool ip_v6, bool user_space, char *protocol); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 90454a0976..a04c5fd643 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -390,13 +390,13 @@ extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) } extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, - uint16_t *tasks_per_node, int cyclic_alloc, + uint16_t *tasks_per_node, uint32_t **tids, char *network) { hostlist_t list = NULL; bool bulk_xfer = false, ip_v6 = false, user_space = false; bool sn_all; - int i, err, nprocs = 0; + int err; char *adapter_name = NULL, *protocol = "mpi"; #if NRT_DEBUG @@ -409,8 +409,6 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, list = hostlist_create(nodelist); if (!list) fatal("hostlist_create(%s): %m", nodelist); - for (i = 0; i < hostlist_count(list); i++) - nprocs += tasks_per_node[i]; if (network && (strstr(network, "bulk_xfer") || @@ -463,8 +461,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, - nprocs, sn_all, adapter_name, bulk_xfer, - ip_v6, user_space, protocol); + tasks_per_node, tids, sn_all, adapter_name, + bulk_xfer, ip_v6, user_space, protocol); hostlist_destroy(list); xfree(adapter_name); diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index cf0f9bd550..b130a0e241 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -2040,7 +2040,7 @@ step_create(job_step_create_request_msg_t *step_specs, if (switch_build_jobinfo(step_ptr->switch_job, step_ptr->step_layout->node_list, step_ptr->step_layout->tasks, - step_ptr->cyclic_alloc, + step_ptr->step_layout->tids, step_ptr->network) < 0) { error("switch_build_jobinfo: %m"); delete_step_record (job_ptr, step_ptr->step_id); -- GitLab From 1d2055cecd13a190eaa5b0a3446766891a90ea85 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 11:17:26 -0700 Subject: [PATCH 109/614] Remove switch/elan, switch/federation and proctrack/rms plugins Remove vestigial plugins rather than updating them for changes in switch plugin logic necessitated for IBM NRT interface. --- Makefile.am | 1 - Makefile.in | 7 - aclocal.m4 | 2 - auxdir/Makefile.in | 6 - config.h.in | 12 - configure | 288 +- configure.ac | 16 - contribs/Makefile.in | 6 - contribs/arrayrun/Makefile.in | 6 - contribs/cray/Makefile.in | 6 - contribs/lua/Makefile.in | 6 - contribs/pam/Makefile.in | 6 - contribs/perlapi/Makefile.in | 6 - contribs/perlapi/libslurm/Makefile.in | 6 - contribs/perlapi/libslurmdb/Makefile.in | 6 - contribs/phpext/Makefile.in | 6 - contribs/sjobexit/Makefile.in | 6 - contribs/slurmdb-direct/Makefile.in | 6 - contribs/torque/Makefile.in | 6 - doc/Makefile.in | 6 - doc/html/Makefile.in | 6 - doc/man/Makefile.in | 6 - doc/man/man1/Makefile.in | 6 - doc/man/man3/Makefile.in | 6 - doc/man/man5/Makefile.am | 2 - doc/man/man5/Makefile.in | 8 - doc/man/man5/nrt.conf.5 | 75 - doc/man/man8/Makefile.in | 6 - etc/federation.conf.example | 10 - slurm.spec | 31 +- src/Makefile.in | 6 - src/api/Makefile.in | 6 - src/common/Makefile.in | 6 - src/database/Makefile.in | 6 - src/db_api/Makefile.in | 6 - src/plugins/Makefile.in | 6 - src/plugins/accounting_storage/Makefile.in | 6 - .../accounting_storage/common/Makefile.in | 6 - .../accounting_storage/filetxt/Makefile.in | 6 - .../accounting_storage/mysql/Makefile.in | 6 - .../accounting_storage/none/Makefile.in | 6 - .../accounting_storage/pgsql/Makefile.in | 6 - .../accounting_storage/slurmdbd/Makefile.in | 6 - src/plugins/auth/Makefile.in | 6 - src/plugins/auth/authd/Makefile.in | 6 - src/plugins/auth/munge/Makefile.in | 6 - src/plugins/auth/none/Makefile.in | 6 - src/plugins/checkpoint/Makefile.in | 6 - src/plugins/checkpoint/aix/Makefile.in | 6 - src/plugins/checkpoint/blcr/Makefile.in | 6 - src/plugins/checkpoint/none/Makefile.in | 6 - src/plugins/checkpoint/ompi/Makefile.in | 6 - src/plugins/crypto/Makefile.in | 6 - src/plugins/crypto/munge/Makefile.in | 6 - src/plugins/crypto/openssl/Makefile.in | 6 - src/plugins/gres/Makefile.in | 6 - src/plugins/gres/gpu/Makefile.in | 6 - src/plugins/gres/nic/Makefile.in | 6 - src/plugins/job_submit/Makefile.in | 6 - src/plugins/job_submit/cnode/Makefile.in | 6 - src/plugins/job_submit/defaults/Makefile.in | 6 - src/plugins/job_submit/logging/Makefile.in | 6 - src/plugins/job_submit/lua/Makefile.in | 6 - src/plugins/job_submit/partition/Makefile.in | 6 - src/plugins/jobacct_gather/Makefile.in | 6 - src/plugins/jobacct_gather/aix/Makefile.in | 6 - src/plugins/jobacct_gather/linux/Makefile.in | 6 - src/plugins/jobacct_gather/none/Makefile.in | 6 - src/plugins/jobcomp/Makefile.in | 6 - src/plugins/jobcomp/filetxt/Makefile.in | 6 - src/plugins/jobcomp/mysql/Makefile.in | 6 - src/plugins/jobcomp/none/Makefile.in | 6 - src/plugins/jobcomp/pgsql/Makefile.in | 6 - src/plugins/jobcomp/script/Makefile.in | 6 - src/plugins/mpi/Makefile.in | 6 - src/plugins/mpi/lam/Makefile.in | 6 - src/plugins/mpi/mpich1_p4/Makefile.in | 6 - src/plugins/mpi/mpich1_shmem/Makefile.in | 6 - src/plugins/mpi/mpichgm/Makefile.in | 6 - src/plugins/mpi/mpichmx/Makefile.in | 6 - src/plugins/mpi/mvapich/Makefile.in | 6 - src/plugins/mpi/none/Makefile.in | 6 - src/plugins/mpi/openmpi/Makefile.in | 6 - src/plugins/preempt/Makefile.in | 6 - src/plugins/preempt/none/Makefile.in | 6 - .../preempt/partition_prio/Makefile.in | 6 - src/plugins/preempt/qos/Makefile.in | 6 - src/plugins/priority/Makefile.in | 6 - src/plugins/priority/basic/Makefile.in | 6 - src/plugins/priority/multifactor/Makefile.in | 6 - src/plugins/proctrack/Makefile.am | 2 +- src/plugins/proctrack/Makefile.in | 10 +- src/plugins/proctrack/aix/Makefile.in | 6 - src/plugins/proctrack/cgroup/Makefile.in | 6 - src/plugins/proctrack/linuxproc/Makefile.in | 6 - src/plugins/proctrack/lua/Makefile.in | 6 - src/plugins/proctrack/pgid/Makefile.in | 6 - src/plugins/proctrack/rms/Makefile.am | 17 - src/plugins/proctrack/rms/Makefile.in | 653 ---- src/plugins/proctrack/rms/proctrack_rms.c | 383 --- src/plugins/proctrack/sgi_job/Makefile.in | 6 - src/plugins/sched/Makefile.in | 6 - src/plugins/sched/backfill/Makefile.in | 6 - src/plugins/sched/builtin/Makefile.in | 6 - src/plugins/sched/hold/Makefile.in | 6 - src/plugins/sched/wiki/Makefile.in | 6 - src/plugins/sched/wiki2/Makefile.in | 6 - src/plugins/select/Makefile.in | 6 - src/plugins/select/bluegene/Makefile.in | 6 - src/plugins/select/bluegene/ba/Makefile.in | 6 - .../select/bluegene/ba_bgq/Makefile.in | 6 - src/plugins/select/bluegene/bl/Makefile.in | 6 - .../select/bluegene/bl_bgq/Makefile.in | 6 - src/plugins/select/bluegene/sfree/Makefile.in | 6 - src/plugins/select/cons_res/Makefile.in | 6 - src/plugins/select/cray/Makefile.in | 6 - src/plugins/select/cray/libalps/Makefile.in | 6 - .../select/cray/libemulate/Makefile.in | 6 - src/plugins/select/linear/Makefile.in | 6 - src/plugins/switch/Makefile.am | 2 +- src/plugins/switch/Makefile.in | 8 +- src/plugins/switch/elan/Makefile.am | 35 - src/plugins/switch/elan/Makefile.in | 674 ----- src/plugins/switch/elan/qsw.c | 1507 ---------- src/plugins/switch/elan/qsw.h | 142 - src/plugins/switch/elan/switch_elan.c | 842 ------ src/plugins/switch/federation/Makefile.am | 32 - src/plugins/switch/federation/Makefile.in | 675 ----- src/plugins/switch/federation/federation.c | 2629 ----------------- src/plugins/switch/federation/federation.h | 112 - .../switch/federation/federation_keys.h | 61 - .../switch/federation/switch_federation.c | 674 ----- src/plugins/switch/none/Makefile.in | 6 - src/plugins/switch/nrt/Makefile.in | 6 - src/plugins/switch/nrt/libpermapi/Makefile.in | 6 - src/plugins/task/Makefile.in | 6 - src/plugins/task/affinity/Makefile.in | 6 - src/plugins/task/cgroup/Makefile.in | 6 - src/plugins/task/none/Makefile.in | 6 - src/plugins/topology/3d_torus/Makefile.in | 6 - src/plugins/topology/Makefile.in | 6 - src/plugins/topology/node_rank/Makefile.in | 6 - src/plugins/topology/none/Makefile.in | 6 - src/plugins/topology/tree/Makefile.in | 6 - src/sacct/Makefile.in | 6 - src/sacctmgr/Makefile.in | 6 - src/salloc/Makefile.in | 6 - src/sattach/Makefile.in | 6 - src/sbatch/Makefile.in | 6 - src/sbcast/Makefile.in | 6 - src/scancel/Makefile.in | 6 - src/scontrol/Makefile.in | 6 - src/sinfo/Makefile.in | 6 - src/slurmctld/Makefile.in | 6 - src/slurmd/Makefile.in | 6 - src/slurmd/common/Makefile.in | 6 - src/slurmd/slurmd/Makefile.in | 6 - src/slurmd/slurmstepd/Makefile.in | 6 - src/slurmdbd/Makefile.in | 6 - src/smap/Makefile.in | 6 - src/sprio/Makefile.in | 6 - src/squeue/Makefile.in | 6 - src/sreport/Makefile.in | 6 - src/srun/Makefile.in | 6 - src/srun_cr/Makefile.in | 6 - src/sshare/Makefile.in | 6 - src/sstat/Makefile.in | 6 - src/strigger/Makefile.in | 6 - src/sview/Makefile.in | 6 - testsuite/Makefile.in | 6 - testsuite/expect/Makefile.in | 6 - testsuite/slurm_unit/Makefile.in | 6 - testsuite/slurm_unit/api/Makefile.in | 6 - testsuite/slurm_unit/api/manual/Makefile.in | 6 - testsuite/slurm_unit/common/Makefile.am | 14 +- testsuite/slurm_unit/common/Makefile.in | 40 +- 176 files changed, 17 insertions(+), 9817 deletions(-) delete mode 100644 doc/man/man5/nrt.conf.5 delete mode 100644 etc/federation.conf.example delete mode 100644 src/plugins/proctrack/rms/Makefile.am delete mode 100644 src/plugins/proctrack/rms/Makefile.in delete mode 100644 src/plugins/proctrack/rms/proctrack_rms.c delete mode 100644 src/plugins/switch/elan/Makefile.am delete mode 100644 src/plugins/switch/elan/Makefile.in delete mode 100644 src/plugins/switch/elan/qsw.c delete mode 100644 src/plugins/switch/elan/qsw.h delete mode 100644 src/plugins/switch/elan/switch_elan.c delete mode 100644 src/plugins/switch/federation/Makefile.am delete mode 100644 src/plugins/switch/federation/Makefile.in delete mode 100644 src/plugins/switch/federation/federation.c delete mode 100644 src/plugins/switch/federation/federation.h delete mode 100644 src/plugins/switch/federation/federation_keys.h delete mode 100644 src/plugins/switch/federation/switch_federation.c diff --git a/Makefile.am b/Makefile.am index d8122c9936..ef26c31993 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,6 @@ SUBDIRS = auxdir src testsuite doc EXTRA_DIST = \ etc/bluegene.conf.example \ - etc/federation.conf.example \ etc/slurm.conf.example \ etc/slurmdbd.conf.example \ etc/slurm.epilog.clean \ diff --git a/Makefile.in b/Makefile.in index 4bce57b75d..c7707f8382 100644 --- a/Makefile.in +++ b/Makefile.in @@ -62,9 +62,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -210,9 +208,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -220,8 +216,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ @@ -379,7 +373,6 @@ ACLOCAL_AMFLAGS = -I auxdir SUBDIRS = auxdir src testsuite doc EXTRA_DIST = \ etc/bluegene.conf.example \ - etc/federation.conf.example \ etc/slurm.conf.example \ etc/slurmdbd.conf.example \ etc/slurm.epilog.clean \ diff --git a/aclocal.m4 b/aclocal.m4 index 5c1b30b6e0..e326551b8f 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1362,9 +1362,7 @@ m4_include([auxdir/x_ac_cflags.m4]) m4_include([auxdir/x_ac_cray.m4]) m4_include([auxdir/x_ac_databases.m4]) m4_include([auxdir/x_ac_debug.m4]) -m4_include([auxdir/x_ac_elan.m4]) m4_include([auxdir/x_ac_env.m4]) -m4_include([auxdir/x_ac_federation.m4]) m4_include([auxdir/x_ac_gpl_licensed.m4]) m4_include([auxdir/x_ac_hwloc.m4]) m4_include([auxdir/x_ac_iso.m4]) diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index a024c54555..5356d78dcc 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -54,9 +54,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -124,9 +122,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -134,8 +130,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/config.h.in b/config.h.in index 28c7a0fdfe..bd68e87ff1 100644 --- a/config.h.in +++ b/config.h.in @@ -133,15 +133,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_KSTAT_H -/* define if you have libelan3. */ -#undef HAVE_LIBELAN3 - -/* define if you have libelanctrl. */ -#undef HAVE_LIBELANCTRL - -/* define if you have libelanhosts. */ -#undef HAVE_LIBELANHOSTS - /* Define to 1 if you have the `expat' library (-lexpat). */ #undef HAVE_LIBEXPAT @@ -151,9 +142,6 @@ /* define if you have libnrt. */ #undef HAVE_LIBNRT -/* define if you have libntbl. */ -#undef HAVE_LIBNTBL - /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H diff --git a/configure b/configure index e52a056be8..a909b5716b 100755 --- a/configure +++ b/configure @@ -656,14 +656,6 @@ HAVE_NRT_FALSE HAVE_NRT_TRUE NRT_LDFLAGS NRT_CPPFLAGS -HAVE_FEDERATION -HAVE_FEDERATION_FALSE -HAVE_FEDERATION_TRUE -FEDERATION_LDFLAGS -HAVE_ELAN -HAVE_ELAN_FALSE -HAVE_ELAN_TRUE -ELAN_LIBS SLURM_PREFIX SLURMCTLD_PORT_COUNT SLURMDBD_PORT @@ -20997,273 +20989,6 @@ fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rms_prgcreate in -lrmscall" >&5 -$as_echo_n "checking for rms_prgcreate in -lrmscall... " >&6; } -if ${ac_cv_lib_rmscall_rms_prgcreate+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lrmscall $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char rms_prgcreate (); -int -main () -{ -return rms_prgcreate (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_rmscall_rms_prgcreate=yes -else - ac_cv_lib_rmscall_rms_prgcreate=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rmscall_rms_prgcreate" >&5 -$as_echo "$ac_cv_lib_rmscall_rms_prgcreate" >&6; } -if test "x$ac_cv_lib_rmscall_rms_prgcreate" = xyes; then : - ac_elan_have_rmscall=yes; ELAN_LIBS="-lrmscall" -fi - - - if test "$ac_elan_have_rmscall" != "yes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support QsNet without librmscall" >&5 -$as_echo "$as_me: Cannot support QsNet without librmscall" >&6;} - fi - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elan3_create in -lelan3" >&5 -$as_echo_n "checking for elan3_create in -lelan3... " >&6; } -if ${ac_cv_lib_elan3_elan3_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelan3 $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char elan3_create (); -int -main () -{ -return elan3_create (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elan3_elan3_create=yes -else - ac_cv_lib_elan3_elan3_create=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elan3_elan3_create" >&5 -$as_echo "$ac_cv_lib_elan3_elan3_create" >&6; } -if test "x$ac_cv_lib_elan3_elan3_create" = xyes; then : - ac_elan_have_elan3=yes -else - ac_elan_noelan3=1 -fi - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elanctrl_open in -lelanctrl" >&5 -$as_echo_n "checking for elanctrl_open in -lelanctrl... " >&6; } -if ${ac_cv_lib_elanctrl_elanctrl_open+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelanctrl $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char elanctrl_open (); -int -main () -{ -return elanctrl_open (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elanctrl_elanctrl_open=yes -else - ac_cv_lib_elanctrl_elanctrl_open=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elanctrl_elanctrl_open" >&5 -$as_echo "$ac_cv_lib_elanctrl_elanctrl_open" >&6; } -if test "x$ac_cv_lib_elanctrl_elanctrl_open" = xyes; then : - ac_elan_have_elanctrl=yes -else - ac_elan_noelanctrl=1 -fi - - - if test "$ac_elan_have_elan3" = "yes"; then - -$as_echo "#define HAVE_LIBELAN3 1" >>confdefs.h - - ELAN_LIBS="$ELAN_LIBS -lelan3" - test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes" - elif test "$ac_elan_have_elanctrl" = "yes"; then - -$as_echo "#define HAVE_LIBELANCTRL 1" >>confdefs.h - - ELAN_LIBS="$ELAN_LIBS -lelanctrl" - test "$ac_elan_have_rmscall" = "yes" && ac_have_elan="yes" - else - { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support QsNet without libelan3 or libelanctrl!" >&5 -$as_echo "$as_me: Cannot support QsNet without libelan3 or libelanctrl!" >&6;} - fi - - if test "$ac_have_elan" = yes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elanhost_config_create in -lelanhosts" >&5 -$as_echo_n "checking for elanhost_config_create in -lelanhosts... " >&6; } -if ${ac_cv_lib_elanhosts_elanhost_config_create+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lelanhosts $LIBS" -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char elanhost_config_create (); -int -main () -{ -return elanhost_config_create (); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - ac_cv_lib_elanhosts_elanhost_config_create=yes -else - ac_cv_lib_elanhosts_elanhost_config_create=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_elanhosts_elanhost_config_create" >&5 -$as_echo "$ac_cv_lib_elanhosts_elanhost_config_create" >&6; } -if test "x$ac_cv_lib_elanhosts_elanhost_config_create" = xyes; then : - ac_elan_have_elanhosts=yes -fi - - - if test "$ac_elan_have_elanhosts" = "yes"; then - -$as_echo "#define HAVE_LIBELANHOSTS 1" >>confdefs.h - - ELAN_LIBS="$ELAN_LIBS -lelanhosts" - else - ac_have_elan="no" - { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot build QsNet modules without libelanhosts" >&5 -$as_echo "$as_me: Cannot build QsNet modules without libelanhosts" >&6;} - fi - fi - - - - if test "x$ac_have_elan" = "xyes"; then - HAVE_ELAN_TRUE= - HAVE_ELAN_FALSE='#' -else - HAVE_ELAN_TRUE='#' - HAVE_ELAN_FALSE= -fi - - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable AIX Federation switch support" >&5 -$as_echo_n "checking whether to enable AIX Federation switch support... " >&6; } - ntbl_default_dirs="/usr/lib" - for ntbl_dir in $ntbl_default_dirs; do - # skip dirs that don't exist - if test ! -z "$ntbl_dir" -a ! -d "$ntbl_dir" ; then - continue; - fi - - if test "$OBJECT_MODE" = "64"; then - libntbl="ntbl_64" - else - libntbl="ntbl" - fi - - # search for required NTBL API libraries - if test -f "$ntbl_dir/lib${libntbl}.so"; then - ac_have_federation="yes" - FEDERATION_LDFLAGS="-l$libntbl" - break; - fi - - done - - if test "x$ac_have_federation" != "xyes" ; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot support Federation without libntbl" >&5 -$as_echo "$as_me: Cannot support Federation without libntbl" >&6;} - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -$as_echo "#define HAVE_LIBNTBL 1" >>confdefs.h - - fi - - - - if test "x$ac_have_federation" = "xyes"; then - HAVE_FEDERATION_TRUE= - HAVE_FEDERATION_FALSE='#' -else - HAVE_FEDERATION_TRUE='#' - HAVE_FEDERATION_FALSE= -fi - - - - - nrt_default_dirs="/usr/include" # Check whether --with-nrth was given. @@ -22256,7 +21981,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -22497,14 +22222,6 @@ if test -z "${DEBUG_MODULES_TRUE}" && test -z "${DEBUG_MODULES_FALSE}"; then as_fn_error $? "conditional \"DEBUG_MODULES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${HAVE_ELAN_TRUE}" && test -z "${HAVE_ELAN_FALSE}"; then - as_fn_error $? "conditional \"HAVE_ELAN\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi -if test -z "${HAVE_FEDERATION_TRUE}" && test -z "${HAVE_FEDERATION_FALSE}"; then - as_fn_error $? "conditional \"HAVE_FEDERATION\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${HAVE_NRT_TRUE}" && test -z "${HAVE_NRT_FALSE}"; then as_fn_error $? "conditional \"HAVE_NRT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -23639,7 +23356,6 @@ do "src/plugins/proctrack/cgroup/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/cgroup/Makefile" ;; "src/plugins/proctrack/pgid/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/pgid/Makefile" ;; "src/plugins/proctrack/linuxproc/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/linuxproc/Makefile" ;; - "src/plugins/proctrack/rms/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/rms/Makefile" ;; "src/plugins/proctrack/sgi_job/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/sgi_job/Makefile" ;; "src/plugins/proctrack/lua/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/proctrack/lua/Makefile" ;; "src/plugins/sched/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/sched/Makefile" ;; @@ -23661,8 +23377,6 @@ do "src/plugins/select/cray/libemulate/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/cray/libemulate/Makefile" ;; "src/plugins/select/linear/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/linear/Makefile" ;; "src/plugins/switch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/Makefile" ;; - "src/plugins/switch/elan/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/elan/Makefile" ;; - "src/plugins/switch/federation/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/federation/Makefile" ;; "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; "src/plugins/switch/nrt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/Makefile" ;; "src/plugins/switch/nrt/libpermapi/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/nrt/libpermapi/Makefile" ;; diff --git a/configure.ac b/configure.ac index d2415a1f7b..a787fb331a 100644 --- a/configure.ac +++ b/configure.ac @@ -277,19 +277,6 @@ else fi AC_SUBST(SLURM_PREFIX) -dnl check for whether to include Elan support -dnl -X_AC_ELAN -AM_CONDITIONAL(HAVE_ELAN, test "x$ac_have_elan" = "xyes") -AC_SUBST(HAVE_ELAN) - -dnl check for whether to include Federation support -dnl -X_AC_FEDERATION -AM_CONDITIONAL(HAVE_FEDERATION, test "x$ac_have_federation" = "xyes") -AC_SUBST(HAVE_FEDERATION) - - dnl check for whether to include IBM NRT (Network Resource Table) support dnl X_AC_NRT @@ -497,7 +484,6 @@ AC_CONFIG_FILES([Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile - src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile @@ -519,8 +505,6 @@ AC_CONFIG_FILES([Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile - src/plugins/switch/elan/Makefile - src/plugins/switch/federation/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile diff --git a/contribs/Makefile.in b/contribs/Makefile.in index 08e9f313dd..87c903494f 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 9429d9277f..0eaf45d0e9 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index 24745050c2..1956d6238a 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -151,9 +149,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -161,8 +157,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index 9760e831d6..a8feb06c6e 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index b18b404810..385784037e 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -177,9 +175,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -187,8 +183,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index b7ea2a761e..6ee27d50dc 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index 9e2b86a234..18878c3d2f 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index e10c2864df..2c9d622b64 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index a4c63df5ae..eabfbc185a 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index 3f4babd5da..b4f5de24dd 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -150,9 +148,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -160,8 +156,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index 10ca5f3600..5a7f9457f5 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -150,9 +148,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -160,8 +156,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 4ab96ebaad..2c0cef4cdf 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -150,9 +148,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -160,8 +156,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 444733988e..539dd3ef03 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 4ef566a16d..3bf9fcaf69 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -148,9 +146,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -158,8 +154,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index dc927a7555..6d188094c9 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index 5833d5d7cd..a94ec5fbcd 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -151,9 +149,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -161,8 +157,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index b32b580340..8ce629878c 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -148,9 +146,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -158,8 +154,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/doc/man/man5/Makefile.am b/doc/man/man5/Makefile.am index aaf3698190..f8a9ca37a7 100644 --- a/doc/man/man5/Makefile.am +++ b/doc/man/man5/Makefile.am @@ -6,7 +6,6 @@ man5_MANS = bluegene.conf.5 \ cgroup.conf.5 \ cray.conf.5 \ gres.conf.5 \ - nrt.conf.5 \ slurm.conf.5 \ slurmdbd.conf.5 \ topology.conf.5 \ @@ -17,7 +16,6 @@ html_DATA = \ bluegene.conf.html \ cgroup.conf.html \ gres.conf.html \ - nrt.conf.html \ slurm.conf.html \ slurmdbd.conf.html \ topology.conf.html \ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index 6fecadc7ff..e484deab85 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -151,9 +149,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -161,8 +157,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ @@ -320,7 +314,6 @@ man5_MANS = bluegene.conf.5 \ cgroup.conf.5 \ cray.conf.5 \ gres.conf.5 \ - nrt.conf.5 \ slurm.conf.5 \ slurmdbd.conf.5 \ topology.conf.5 \ @@ -330,7 +323,6 @@ man5_MANS = bluegene.conf.5 \ @HAVE_MAN2HTML_TRUE@ bluegene.conf.html \ @HAVE_MAN2HTML_TRUE@ cgroup.conf.html \ @HAVE_MAN2HTML_TRUE@ gres.conf.html \ -@HAVE_MAN2HTML_TRUE@ nrt.conf.html \ @HAVE_MAN2HTML_TRUE@ slurm.conf.html \ @HAVE_MAN2HTML_TRUE@ slurmdbd.conf.html \ @HAVE_MAN2HTML_TRUE@ topology.conf.html \ diff --git a/doc/man/man5/nrt.conf.5 b/doc/man/man5/nrt.conf.5 deleted file mode 100644 index 95241eab1e..0000000000 --- a/doc/man/man5/nrt.conf.5 +++ /dev/null @@ -1,75 +0,0 @@ -.TH "nrt.conf" "5" "January 2012" "nrt.conf 2.4" "SLURM configuration file" - -.SH "NAME" -nrt.conf \- Slurm configuration file for the IBM Network Resource Table (NRT) specific information - -.SH "DESCRIPTION" -\fBnrt.conf\fP is an ASCII file which defines parameters used by -SLURM's switch/nrt plugin in support of IBM systems in which the Network -Resource Table (NRT) Application Programming Interface (API) is used to -manage its network. -The file location can be modified at system build time using the -DEFAULT_SLURM_CONF parameter or at execution time by setting the SLURM_CONF -environment variable. The file will always be located in the -same directory as the \fBslurm.conf\fP file. -.LP -Parameter names are case insensitive. -Any text following a "#" in the configuration file is treated -as a comment through the end of that line. -The size of each line in the file is limited to 1024 characters. -Changes to the configuration file take effect upon restart of -SLURM daemons. -.LP -The configuration parameters available include: - -.TP -\fBAdapterName\fR= -Name of switch adapter(s). This can use the same name format as the SLURM -hostname expression (numeric values or ranges in square brackets). For example, -"sni0", "sni[0-1]", "sni[0,1]" or "sni[0-1,2]". - -.TP -\fBAdapterType\fR= -The adapter type. Valid values include: -.RS -.TP 12 -\fBIB\fR -InfiniBand switch type -.TP -\fBHPCE\fR -HPCE switch type -.RE - -.SH "EXAMPLE" -.LP -.br -### -.br -# SLURM Network Resource Table (NRT) configuration file -.br -### -.br -AdapterName=sni[0-1] -.br -AdapterType=IB - -.SH "COPYING" -Copyright (C) 2012 SchedMD LLC. -Produced at SchedMD LLC (cf, DISCLAIMER). -.LP -This file is part of SLURM, a resource management program. -For details, see . -.LP -SLURM is free software; you can redistribute it and/or modify it under -the terms of the GNU General Public License as published by the Free -Software Foundation; either version 2 of the License, or (at your option) -any later version. -.LP -SLURM is distributed in the hope that it will be useful, but WITHOUT ANY -WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -FOR A PARTICULAR PURPOSE. See the GNU General Public License for more -details. - -.SH "SEE ALSO" -.LP -\fBslurm.conf\fR(5) diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index df9db05073..6875a7edb2 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -151,9 +149,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -161,8 +157,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/etc/federation.conf.example b/etc/federation.conf.example deleted file mode 100644 index 5c376ae43f..0000000000 --- a/etc/federation.conf.example +++ /dev/null @@ -1,10 +0,0 @@ -# -# Global specifications for Federation Switch Plugin -# -# AdapterName: Adapter names can be in these forms -# sni0 -# sni[0-1] -# sni[0,1] -# sni[0-1,2] - -AdapterName=sni[0-1] diff --git a/slurm.spec b/slurm.spec index f5f20ac67c..10e25db699 100644 --- a/slurm.spec +++ b/slurm.spec @@ -12,7 +12,6 @@ # --with bluegene %_with_bluegene 1 build bluegene RPM # --with cray_xt %_with_cray_xt 1 build for Cray XT system # --with debug %_with_debug 1 enable extra debugging within SLURM -# --with elan %_with_elan 1 build switch-elan RPM # --with lua %_with_lua 1 build SLURM lua bindings (proctrack only for now) # --without munge %_without_munge 1 don't build auth-munge RPM # --with mysql %_with_mysql 1 require mysql support @@ -43,7 +42,6 @@ %slurm_without_opt bluegene %slurm_without_opt cray %slurm_without_opt debug -%slurm_without_opt elan %slurm_without_opt sun_const %slurm_without_opt srun2aprun @@ -255,16 +253,6 @@ Requires: slurm SLURM plugin interfaces to IBM Blue Gene system %endif -%if %{slurm_with elan} -%package switch-elan -Summary: SLURM switch plugin for Quadrics Elan3 or Elan4. -Group: System Environment/Base -Requires: slurm qsnetlibs -BuildRequires: qsnetlibs -%description switch-elan -SLURM switch plugin for Quadrics Elan3 or Elan4. -%endif - %package slurmdbd Summary: SLURM database daemon Group: System Environment/Base @@ -316,13 +304,13 @@ Wrappers to write directly to the slurmdb. %if %{slurm_with aix} %package aix -Summary: SLURM interfaces to IBM AIX and Federation switch. +Summary: SLURM interfaces to IBM AIX. Group: System Environment/Base Requires: slurm BuildRequires: proctrack >= 3 Obsoletes: slurm-aix-federation %description aix -SLURM plugins for IBM AIX and Federation switch. +SLURM plugins for IBM AIX. %endif %if %{slurm_with percs} @@ -497,10 +485,6 @@ test -f $RPM_BUILD_ROOT/etc/init.d/slurm && test -f $RPM_BUILD_ROOT/%{_bindir}/sview && echo %{_bindir}/sview >> $LIST -%if %{slurm_with aix} -install -D -m644 etc/federation.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/federation.conf.example -%endif - %if %{slurm_with bluegene} install -D -m644 etc/bluegene.conf.example ${RPM_BUILD_ROOT}%{_sysconfdir}/bluegene.conf.example mkdir -p ${RPM_BUILD_ROOT}/etc/ld.so.conf.d @@ -522,8 +506,6 @@ LIST=./aix.files touch $LIST test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/proctrack_aix.so && echo %{_libdir}/slurm/proctrack_aix.so >> $LIST -test -f $RPM_BUILD_ROOT/%{_libdir}/slurm/switch_federation.so && - echo %{_libdir}/slurm/switch_federation.so >> $LIST LIST=./percs.files touch $LIST @@ -691,14 +673,6 @@ rm -rf $RPM_BUILD_ROOT ############################################################################# -%if %{slurm_with elan} -%files switch-elan -%defattr(-,root,root) -%{_libdir}/slurm/switch_elan.so -%{_libdir}/slurm/proctrack_rms.so -%endif -############################################################################# - %files -f slurmdbd.files slurmdbd %defattr(-,root,root) %{_sbindir}/slurmdbd @@ -798,7 +772,6 @@ rm -rf $RPM_BUILD_ROOT %files -f aix.files aix %defattr(-,root,root) %{_libdir}/slurm/checkpoint_aix.so -%config %{_sysconfdir}/federation.conf.example %endif ############################################################################# diff --git a/src/Makefile.in b/src/Makefile.in index c3e4f2c56d..eca6190150 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -168,9 +166,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -178,8 +174,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index f98499df4f..207f94523e 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -199,10 +197,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ # This is needed if compiling on windows EXEEXT = -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -210,8 +206,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 047ede3ed9..50ad32a7ef 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -67,9 +67,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -244,10 +242,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ # This is needed if compiling on windows EXEEXT = -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -255,8 +251,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/database/Makefile.in b/src/database/Makefile.in index 550eea5d0d..5a7b8c6c1c 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -175,9 +173,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -185,8 +181,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index 9a278cf0d5..0d20a7ab98 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -184,10 +182,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ # This is needed if compiling on windows EXEEXT = -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -195,8 +191,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index de008c24eb..e31a702b65 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 022a19269e..b80cf1d679 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index c31391378b..f203cea7f6 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -146,9 +144,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -156,8 +152,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index 40304492d5..ad3e1b97b6 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -173,9 +171,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -183,8 +179,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index b8da21928f..8159f3b018 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -223,9 +221,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -233,8 +229,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index da4f7fa55b..852d50fc2a 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -172,9 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -182,8 +178,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index eb667badbb..6cb9dd6c8f 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -218,9 +216,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -228,8 +224,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index 26be898229..3e95916d41 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -173,9 +171,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -183,8 +179,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 2e2bf3d0a7..4858c0cf91 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index 64d654c54e..34fa1ed67d 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 827ddb8451..516b70defc 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -172,9 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -182,8 +178,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index 7688bb51ab..d7a7385c0b 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index dcbb80e383..76951b4124 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index cad1526ba1..da459bbc38 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -175,9 +173,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -185,8 +181,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 38535cfa0f..0ccd076763 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -181,9 +179,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -191,8 +187,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index de8e3da9c8..8992394b68 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index 7c42d6d856..f915d9f102 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index db49f318aa..483ccab883 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index c6671e3f03..c5e4942757 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -172,9 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -182,8 +178,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index 018df070a1..a8fcb1164c 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -177,9 +175,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -187,8 +183,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index f406e857ca..645dac0da1 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index c365971068..3bef6c68cb 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index 023eb80311..c8666446e4 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index 8771acc4e6..a0f4e1028d 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index 769c77a16d..cdaf4da783 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index 3294f5f2e8..274e85c931 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index 8a50b8c4dd..330343c378 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index 0b6cd5f7ac..e1594dbc82 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -175,9 +173,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -185,8 +181,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 138fab2d2b..85071cc127 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index 384b3e7e68..bff74cf1c0 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index b2148bf837..bdd6757a34 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 878f78f451..7ffbd0920f 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index df125354b3..1fc8386a32 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index e6fb03418a..3d3bd74355 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 408b7cba17..b5e34e05ff 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index 9297582fa0..577cc6d18f 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -179,9 +177,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -189,8 +185,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 6bcd69ac1d..677c3937ae 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index 071995bd0e..acf9f1a409 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -179,9 +177,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -189,8 +185,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index 3dc0f82983..797ce531d6 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index c684d9403e..9d105d0166 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index ef2485b14b..2893fd96de 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index f4ec9c4ed4..2502a9e42f 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index fee21f5640..48092fdac7 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index b5dbe97a34..6d32862cc2 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index 7ca8e38a42..d53825c530 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index be0c50543e..84679fb578 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 54762b3509..1bededfb48 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index dc0ce62a98..8a349c8460 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index e7f37ba762..b5da19a9a7 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index 7b416f0e99..8916c7a250 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index 8f7d8e2395..d771dbf2f5 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -172,9 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -182,8 +178,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index 6b4c72090e..f36e4dfa96 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index 3976ed4038..adc8185fb6 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index 952f336839..92773ce97e 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index caf1f62bc1..eafb839765 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/Makefile.am b/src/plugins/proctrack/Makefile.am index b08bac6b41..dc47053714 100644 --- a/src/plugins/proctrack/Makefile.am +++ b/src/plugins/proctrack/Makefile.am @@ -12,4 +12,4 @@ if HAVE_LUA LUA = lua endif -SUBDIRS = $(AIX_PROCTRACK) $(SGI_JOB) $(LUA) pgid linuxproc rms cgroup +SUBDIRS = $(AIX_PROCTRACK) $(SGI_JOB) $(LUA) pgid linuxproc cgroup diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index 0f111fef44..ec48168a10 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -99,7 +97,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = aix sgi_job lua pgid linuxproc rms cgroup +DIST_SUBDIRS = aix sgi_job lua pgid linuxproc cgroup DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ @@ -332,7 +326,7 @@ top_srcdir = @top_srcdir@ @HAVE_AIX_PROCTRACK_TRUE@AIX_PROCTRACK = aix @HAVE_SGI_JOB_TRUE@SGI_JOB = sgi_job @HAVE_LUA_TRUE@LUA = lua -SUBDIRS = $(AIX_PROCTRACK) $(SGI_JOB) $(LUA) pgid linuxproc rms cgroup +SUBDIRS = $(AIX_PROCTRACK) $(SGI_JOB) $(LUA) pgid linuxproc cgroup all: all-recursive .SUFFIXES: diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 0f593f2bb8..243e13aa02 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index 1ed20cb9f9..71abfc691e 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 2fb83382b5..815bdcf054 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index 64bb1e9b3b..5c9286a7dc 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index 643a6433b3..914a94466c 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/proctrack/rms/Makefile.am b/src/plugins/proctrack/rms/Makefile.am deleted file mode 100644 index 4dc679c011..0000000000 --- a/src/plugins/proctrack/rms/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for proctrack/aix plugin - -AUTOMAKE_OPTIONS = foreign - -PLUGIN_FLAGS = -module -avoid-version --export-dynamic - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common - -if HAVE_ELAN -pkglib_LTLIBRARIES = proctrack_rms.la -else -pkglib_LTLIBRARIES = -endif - -proctrack_rms_la_SOURCES = proctrack_rms.c -proctrack_rms_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) -proctrack_rms_la_LIBADD = -lrmscall diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in deleted file mode 100644 index fa22855a80..0000000000 --- a/src/plugins/proctrack/rms/Makefile.in +++ /dev/null @@ -1,653 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Makefile for proctrack/aix plugin - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = src/plugins/proctrack/rms -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ - $(top_srcdir)/auxdir/libtool.m4 \ - $(top_srcdir)/auxdir/ltoptions.m4 \ - $(top_srcdir)/auxdir/ltsugar.m4 \ - $(top_srcdir)/auxdir/ltversion.m4 \ - $(top_srcdir)/auxdir/lt~obsolete.m4 \ - $(top_srcdir)/auxdir/slurm.m4 \ - $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ - $(top_srcdir)/auxdir/x_ac_affinity.m4 \ - $(top_srcdir)/auxdir/x_ac_aix.m4 \ - $(top_srcdir)/auxdir/x_ac_blcr.m4 \ - $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ - $(top_srcdir)/auxdir/x_ac_cflags.m4 \ - $(top_srcdir)/auxdir/x_ac_cray.m4 \ - $(top_srcdir)/auxdir/x_ac_databases.m4 \ - $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ - $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ - $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ - $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ - $(top_srcdir)/auxdir/x_ac_iso.m4 \ - $(top_srcdir)/auxdir/x_ac_lua.m4 \ - $(top_srcdir)/auxdir/x_ac_man2html.m4 \ - $(top_srcdir)/auxdir/x_ac_munge.m4 \ - $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ - $(top_srcdir)/auxdir/x_ac_nrt.m4 \ - $(top_srcdir)/auxdir/x_ac_pam.m4 \ - $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ - $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ - $(top_srcdir)/auxdir/x_ac_readline.m4 \ - $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ - $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ - $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ - $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ - $(top_srcdir)/auxdir/x_ac_srun.m4 \ - $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ - $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkglibdir)" -LTLIBRARIES = $(pkglib_LTLIBRARIES) -proctrack_rms_la_DEPENDENCIES = -am_proctrack_rms_la_OBJECTS = proctrack_rms.lo -proctrack_rms_la_OBJECTS = $(am_proctrack_rms_la_OBJECTS) -proctrack_rms_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(proctrack_rms_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_ELAN_TRUE@am_proctrack_rms_la_rpath = -rpath $(pkglibdir) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm -depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(proctrack_rms_la_SOURCES) -DIST_SOURCES = $(proctrack_rms_la_SOURCES) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTHD_CFLAGS = @AUTHD_CFLAGS@ -AUTHD_LIBS = @AUTHD_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BGL_LOADED = @BGL_LOADED@ -BGQ_LOADED = @BGQ_LOADED@ -BG_INCLUDES = @BG_INCLUDES@ -BG_LDFLAGS = @BG_LDFLAGS@ -BG_L_P_LOADED = @BG_L_P_LOADED@ -BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ -BLCR_HOME = @BLCR_HOME@ -BLCR_LDFLAGS = @BLCR_LDFLAGS@ -BLCR_LIBS = @BLCR_LIBS@ -BLUEGENE_LOADED = @BLUEGENE_LOADED@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMD_LDFLAGS = @CMD_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ -EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ -FGREP = @FGREP@ -GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ -HAVEPGCONFIG = @HAVEPGCONFIG@ -HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ -HAVE_MAN2HTML = @HAVE_MAN2HTML@ -HAVE_NRT = @HAVE_NRT@ -HAVE_OPENSSL = @HAVE_OPENSSL@ -HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_LDFLAGS = @LIB_LDFLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ -MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ -MUNGE_LIBS = @MUNGE_LIBS@ -MYSQL_CFLAGS = @MYSQL_CFLAGS@ -MYSQL_LIBS = @MYSQL_LIBS@ -NCURSES = @NCURSES@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NRT_CPPFLAGS = @NRT_CPPFLAGS@ -NRT_LDFLAGS = @NRT_LDFLAGS@ -NUMA_LIBS = @NUMA_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_DIR = @PAM_DIR@ -PAM_LIBS = @PAM_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PGSQL_CFLAGS = @PGSQL_CFLAGS@ -PGSQL_LIBS = @PGSQL_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PROCTRACKDIR = @PROCTRACKDIR@ -PROJECT = @PROJECT@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ -RELEASE = @RELEASE@ -RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ -SED = @SED@ -SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ -SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLURMCTLD_PORT = @SLURMCTLD_PORT@ -SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ -SLURMDBD_PORT = @SLURMDBD_PORT@ -SLURMD_PORT = @SLURMD_PORT@ -SLURM_API_AGE = @SLURM_API_AGE@ -SLURM_API_CURRENT = @SLURM_API_CURRENT@ -SLURM_API_MAJOR = @SLURM_API_MAJOR@ -SLURM_API_REVISION = @SLURM_API_REVISION@ -SLURM_API_VERSION = @SLURM_API_VERSION@ -SLURM_MAJOR = @SLURM_MAJOR@ -SLURM_MICRO = @SLURM_MICRO@ -SLURM_MINOR = @SLURM_MINOR@ -SLURM_PREFIX = @SLURM_PREFIX@ -SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ -SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ -SO_LDFLAGS = @SO_LDFLAGS@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LDFLAGS = @SSL_LDFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -UTIL_LIBS = @UTIL_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_have_man2html = @ac_have_man2html@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lua_CFLAGS = @lua_CFLAGS@ -lua_LIBS = @lua_LIBS@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign -PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -@HAVE_ELAN_FALSE@pkglib_LTLIBRARIES = -@HAVE_ELAN_TRUE@pkglib_LTLIBRARIES = proctrack_rms.la -proctrack_rms_la_SOURCES = proctrack_rms.c -proctrack_rms_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) -proctrack_rms_la_LIBADD = -lrmscall -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/proctrack/rms/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/plugins/proctrack/rms/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ - } - -uninstall-pkglibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ - done - -clean-pkglibLTLIBRARIES: - -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) - @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -proctrack_rms.la: $(proctrack_rms_la_OBJECTS) $(proctrack_rms_la_DEPENDENCIES) - $(proctrack_rms_la_LINK) $(am_proctrack_rms_la_rpath) $(proctrack_rms_la_OBJECTS) $(proctrack_rms_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/proctrack_rms.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pkglibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pkglibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pkglibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkglibLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/proctrack/rms/proctrack_rms.c b/src/plugins/proctrack/rms/proctrack_rms.c deleted file mode 100644 index 6a95962f17..0000000000 --- a/src/plugins/proctrack/rms/proctrack_rms.c +++ /dev/null @@ -1,383 +0,0 @@ -/*****************************************************************************\ - * proctrack_rms.c - process tracking via QsNet rms kernel module - ***************************************************************************** - * Copyright (C) 2005 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#if HAVE_STDINT_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#endif - -#include - -#include -#include -#include -#include -#include - -#include "slurm/slurm.h" -#include "slurm/slurm_errno.h" -#include "src/common/log.h" -#include "src/slurmd/common/proctrack.h" - -const char plugin_name[] = "Process tracking for QsNet via the rms module"; -const char plugin_type[] = "proctrack/rms"; -const uint32_t plugin_version = 91; - -static int _prg_destructor_fork(void); -static void _prg_destructor_send(int fd, int prgid); - -#define MAX_IDS 512 - -extern int init (void) -{ - /* close librmscall's internal fd to /proc/rms/control */ - pthread_atfork(NULL, NULL, rmsmod_fini); - return SLURM_SUCCESS; -} - -extern int fini (void) -{ - return SLURM_SUCCESS; -} - - -/* - * When proctrack/rms is used in conjunction with switch/elan, - * slurm_container_plugin_create will not normally create the program - * description. It just retrieves the prgid created in switch/elan. - * - * When the program description cannot be retrieved (switch/elan is not - * being used, the job step is a batch script, etc.) then rms_prgcreate() - * is called here. - */ -extern int slurm_container_plugin_create (slurmd_job_t *job) -{ - int prgid; - /* - * Return a handle to an existing prgid or create a new one - */ - if (rms_getprgid ((int) job->jmgr_pid, &prgid) < 0) { - int fd = _prg_destructor_fork(); - /* Use slurmd job-step manager's pid as a unique identifier */ - prgid = job->jmgr_pid; - if ((rms_prgcreate (prgid, job->uid, 1)) < 0) { - error ("ptrack/rms: rms_prgcreate: %m"); - _prg_destructor_send(fd, -1); - return SLURM_ERROR; - } - _prg_destructor_send(fd, prgid); - } - debug3("proctrack/rms: prgid = %d", prgid); - - job->cont_id = (uint64_t)prgid; - return SLURM_SUCCESS; -} - -extern int slurm_container_plugin_add (slurmd_job_t *job, pid_t pid) -{ - return SLURM_SUCCESS; -} - -/* - * slurm_container_plugin_signal assumes that the slurmd jobstep manager - * is always the last process in the rms program description. - * No signals are sent to the last process. - */ -extern int slurm_container_plugin_signal (uint64_t id, int signal) -{ - pid_t *pids; - int nids = 0; - int i; - int rc; - - if (id <= 0) - return -1; - - pids = malloc(MAX_IDS * sizeof(pid_t)); - if (!pids) { - error("proctrack/rms container signal: malloc failed: %m"); - return -1; - } - if ((rc = rms_prginfo((int)id, MAX_IDS, pids, &nids)) < 0) { - error("proctrack/rms rms_prginfo failed %d: %m", rc); - free(pids); - /* - * Ignore errors, program desc has probably already - * been cleaned up. - */ - return -1; - } - - rc = -1; - for (i = nids-2; i >= 0 ; i--) { - debug2("proctrack/rms(pid %d) Sending signal %d to process %d", - getpid(), signal, pids[i]); - rc &= kill(pids[i], signal); - debug2(" rc = %d", rc); - } - free(pids); - debug3("proctrack/rms signal container returning %d", rc); - return rc; -} - - -/* - * The switch/elan plugin is really responsible for creating and - * destroying rms program descriptions. slurm_destroy_container simply - * returns SLURM_SUCCESS when the program description contains one and - * only one process, assumed to be the slurmd jobstep manager. - */ -extern int slurm_container_plugin_destroy (uint64_t id) -{ - debug2("proctrack/rms: destroying container %"PRIu64"", id); - if (id == 0) - return SLURM_SUCCESS; - - if (slurm_container_plugin_signal(id, 0) == -1) - return SLURM_SUCCESS; - - return SLURM_ERROR; -} - - -extern uint64_t slurm_container_plugin_find (pid_t pid) -{ - int prgid = 0; - - if (rms_getprgid ((int) pid, &prgid) < 0) - return (uint64_t) 0; - return (uint64_t) prgid; -} - -extern bool slurm_container_plugin_has_pid (uint64_t cont_id, pid_t pid) -{ - int prgid = 0; - - if (rms_getprgid ((int) pid, &prgid) < 0) - return false; - if ((uint64_t)prgid != cont_id) - return false; - - return true; -} - -extern int -slurm_container_plugin_wait(uint64_t cont_id) -{ - int delay = 1; - - if (cont_id == 0 || cont_id == 1) { - errno = EINVAL; - return SLURM_ERROR; - } - - /* Spin until the container is empty */ - while (slurm_container_plugin_signal(cont_id, 0) != -1) { - slurm_container_plugin_signal(cont_id, SIGKILL); - sleep(delay); - if (delay < 120) { - delay *= 2; - } else { - error("Unable to destroy container %"PRIu64"", cont_id); - } - } - - return SLURM_SUCCESS; -} - -/* - * This module assumes that the slurmstepd (running as root) is always the - * last process in the rms program description. We do not include - * the slurmstepd in the list of pids that we return. - */ -extern int -slurm_container_plugin_get_pids(uint64_t cont_id, pid_t **pids, int *npids) -{ - pid_t *p; - int np; - int len = 32; - - p = xmalloc(len * sizeof(pid_t)); - while(rms_prginfo((int)cont_id, len, p, &np) == -1) { - if (errno == EINVAL) { - /* array is too short, double its length */ - len *= 2; - xrealloc(p, len); - } else { - xfree(p); - *pids = NULL; - *npids = 0; - return SLURM_ERROR; - } - } - - /* Don't include the last pid (slurmstepd) in the list */ - if (np > 0) { - p[np-1] = 0; - np--; - } - - *npids = np; - *pids = p; - - return SLURM_SUCCESS; -} - -static void -_close_all_fd_except(int fd) -{ - int openmax; - int i; - - openmax = sysconf(_SC_OPEN_MAX); - for (i = 0; i <= openmax; i++) { - if (i != fd) - close(i); - } -} - - -/* - * Fork a child process that waits for a pipe to close, signalling that the - * parent process has exited. Then call rms_prgdestroy. - */ -static int -_prg_destructor_fork(void) -{ - pid_t pid; - int fdpair[2]; - int prgid; - int i; - int dummy; - - if (pipe(fdpair) < 0) { - error("_prg_destructor_fork: failed creating pipe"); - return -1; - } - - pid = fork(); - if (pid < 0) { - error("_prg_destructor_fork: failed to fork program destructor"); - } else if (pid > 0) { - /* parent */ - close(fdpair[0]); - waitpid(pid, (int *)NULL, 0); - return fdpair[1]; - } - - /****************************************/ - /* fork again so the destructor process - * will not be a child of the slurmd - */ - pid = fork(); - if (pid < 0) { - error("_prg_destructor_fork: second fork failed"); - } else if (pid > 0) { - exit(0); - } - - /* child */ - close(fdpair[1]); - - /* close librmscall's internal fd to /proc/rms/control */ - rmsmod_fini(); - - _close_all_fd_except(fdpair[0]); - /* Wait for the program description id from the child */ - if (read(fdpair[0], &prgid, sizeof(prgid)) != sizeof(prgid)) { - error("_prg_destructor_fork read failed: %m"); - exit(1); - } - - if (prgid == -1) - exit(1); - - /* - * Wait for the pipe to close, signalling that the parent - * has exited. - */ - while (read(fdpair[0], &dummy, sizeof(dummy)) > 0) {} - - /* - * Verify that program description is empty. If not, send a SIGKILL. - */ - for (i = 0; i < 30; i++) { - int maxids = 8; - pid_t pids[8]; - int nids = 0; - - if (rms_prginfo(prgid, maxids, pids, &nids) < 0) { - error("_prg_destructor_fork: rms_prginfo: %m"); - } - if (nids == 0) - break; - if (rms_prgsignal(prgid, SIGKILL) < 0) { - error("_prg_destructor_fork: rms_prgsignal: %m"); - } - sleep(1); - } - - if (rms_prgdestroy(prgid) < 0) { - error("rms_prgdestroy"); - } - exit(0); -} - - - -/* - * Send the prgid of the newly created program description to the process - * forked earlier by _prg_destructor_fork(), using the file descriptor - * "fd" which was returned by the call to _prg_destructor_fork(). - */ -static void -_prg_destructor_send(int fd, int prgid) -{ - debug3("_prg_destructor_send %d", prgid); - if (write (fd, &prgid, sizeof(prgid)) != sizeof(prgid)) { - error ("_prg_destructor_send failed: %m"); - } - /* Deliberately avoid closing fd. When this process exits, it - will close fd signalling to the child process that it is - time to call rms_prgdestroy */ - /*close(fd);*/ -} diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index 2c270d50bb..1eb6efb289 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index d611f18c73..1627fcba05 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index 2e1eed8aab..c12dfb9724 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index 3258e06dbc..1ab9d45dd7 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index c75dd7a005..1d12a690ac 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index 6ee40a5741..43bbaee9aa 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -172,9 +170,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -182,8 +178,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index 4fc4f586b3..32fc041f23 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -175,9 +173,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -185,8 +181,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index a49af4ded4..37ecffea2d 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 089369a731..d3a1230d8e 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -88,9 +88,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -332,9 +330,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -342,8 +338,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index 9b944ccbc0..aad67e8ffd 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -158,9 +156,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -168,8 +164,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index 239974855b..e55c6f277b 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -168,9 +166,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -178,8 +174,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index e8a69c0693..baa33c2812 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -149,9 +147,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -159,8 +155,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index de69325fb0..b95a076f0e 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -158,9 +156,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -168,8 +164,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index 72ed5cbbf4..d79cd3a52f 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -150,9 +148,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -160,8 +156,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index f320c3aa63..31489182b3 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index ddcc9f678e..17a01701a4 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -217,9 +215,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -227,8 +223,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index 6a2ba2b1ca..11697b6367 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -156,9 +154,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -166,8 +162,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index 88c5c52af7..c77b744468 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -150,9 +148,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -160,8 +156,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index 1f4a08785e..8e6d484ec9 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/switch/Makefile.am b/src/plugins/switch/Makefile.am index 4c24989539..7610a2d2af 100644 --- a/src/plugins/switch/Makefile.am +++ b/src/plugins/switch/Makefile.am @@ -1,3 +1,3 @@ # Makefile for switch plugins -SUBDIRS = elan federation none nrt +SUBDIRS = none nrt diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index 44ad7df040..b5e8650612 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ @@ -329,7 +323,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = elan federation none nrt +SUBDIRS = none nrt all: all-recursive .SUFFIXES: diff --git a/src/plugins/switch/elan/Makefile.am b/src/plugins/switch/elan/Makefile.am deleted file mode 100644 index 5717122e35..0000000000 --- a/src/plugins/switch/elan/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -# Makefile for switch/elan plugin - -AUTOMAKE_OPTIONS = foreign - -if HAVE_ELAN -elan_lib = switch_elan.la -else -elan_lib = -endif - -PLUGIN_FLAGS = -module -avoid-version --export-dynamic - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common - -pkglib_LTLIBRARIES = $(elan_lib) - -if HAVE_ELAN -# Quadrics elan3 or elan4 switch plugin. -switch_elan_la_SOURCES = \ - switch_elan.c \ - qsw.c qsw.h - -# Add libslurm to switch_elan to provide some symbols that are not -# available in slurmctld (slurm_setenvpf) - -switch_elan_la_LIBADD = $(ELAN_LIBS) \ - $(top_builddir)/src/api/libslurm.la - -switch_elan_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) - -else -EXTRA_switch_elan_la_SOURCES = \ - switch_elan.c \ - qsw.c qsw.h -endif diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in deleted file mode 100644 index 5f4c94aa9e..0000000000 --- a/src/plugins/switch/elan/Makefile.in +++ /dev/null @@ -1,674 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Makefile for switch/elan plugin - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = src/plugins/switch/elan -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ - $(top_srcdir)/auxdir/libtool.m4 \ - $(top_srcdir)/auxdir/ltoptions.m4 \ - $(top_srcdir)/auxdir/ltsugar.m4 \ - $(top_srcdir)/auxdir/ltversion.m4 \ - $(top_srcdir)/auxdir/lt~obsolete.m4 \ - $(top_srcdir)/auxdir/slurm.m4 \ - $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ - $(top_srcdir)/auxdir/x_ac_affinity.m4 \ - $(top_srcdir)/auxdir/x_ac_aix.m4 \ - $(top_srcdir)/auxdir/x_ac_blcr.m4 \ - $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ - $(top_srcdir)/auxdir/x_ac_cflags.m4 \ - $(top_srcdir)/auxdir/x_ac_cray.m4 \ - $(top_srcdir)/auxdir/x_ac_databases.m4 \ - $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ - $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ - $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ - $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ - $(top_srcdir)/auxdir/x_ac_iso.m4 \ - $(top_srcdir)/auxdir/x_ac_lua.m4 \ - $(top_srcdir)/auxdir/x_ac_man2html.m4 \ - $(top_srcdir)/auxdir/x_ac_munge.m4 \ - $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ - $(top_srcdir)/auxdir/x_ac_nrt.m4 \ - $(top_srcdir)/auxdir/x_ac_pam.m4 \ - $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ - $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ - $(top_srcdir)/auxdir/x_ac_readline.m4 \ - $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ - $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ - $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ - $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ - $(top_srcdir)/auxdir/x_ac_srun.m4 \ - $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ - $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkglibdir)" -LTLIBRARIES = $(pkglib_LTLIBRARIES) -am__DEPENDENCIES_1 = -@HAVE_ELAN_TRUE@switch_elan_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ -@HAVE_ELAN_TRUE@ $(top_builddir)/src/api/libslurm.la -am__switch_elan_la_SOURCES_DIST = switch_elan.c qsw.c qsw.h -@HAVE_ELAN_TRUE@am_switch_elan_la_OBJECTS = switch_elan.lo qsw.lo -am__EXTRA_switch_elan_la_SOURCES_DIST = switch_elan.c qsw.c qsw.h -switch_elan_la_OBJECTS = $(am_switch_elan_la_OBJECTS) -switch_elan_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(switch_elan_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_ELAN_TRUE@am_switch_elan_la_rpath = -rpath $(pkglibdir) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm -depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(switch_elan_la_SOURCES) $(EXTRA_switch_elan_la_SOURCES) -DIST_SOURCES = $(am__switch_elan_la_SOURCES_DIST) \ - $(am__EXTRA_switch_elan_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTHD_CFLAGS = @AUTHD_CFLAGS@ -AUTHD_LIBS = @AUTHD_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BGL_LOADED = @BGL_LOADED@ -BGQ_LOADED = @BGQ_LOADED@ -BG_INCLUDES = @BG_INCLUDES@ -BG_LDFLAGS = @BG_LDFLAGS@ -BG_L_P_LOADED = @BG_L_P_LOADED@ -BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ -BLCR_HOME = @BLCR_HOME@ -BLCR_LDFLAGS = @BLCR_LDFLAGS@ -BLCR_LIBS = @BLCR_LIBS@ -BLUEGENE_LOADED = @BLUEGENE_LOADED@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMD_LDFLAGS = @CMD_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ -EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ -FGREP = @FGREP@ -GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ -HAVEPGCONFIG = @HAVEPGCONFIG@ -HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ -HAVE_MAN2HTML = @HAVE_MAN2HTML@ -HAVE_NRT = @HAVE_NRT@ -HAVE_OPENSSL = @HAVE_OPENSSL@ -HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_LDFLAGS = @LIB_LDFLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ -MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ -MUNGE_LIBS = @MUNGE_LIBS@ -MYSQL_CFLAGS = @MYSQL_CFLAGS@ -MYSQL_LIBS = @MYSQL_LIBS@ -NCURSES = @NCURSES@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NRT_CPPFLAGS = @NRT_CPPFLAGS@ -NRT_LDFLAGS = @NRT_LDFLAGS@ -NUMA_LIBS = @NUMA_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_DIR = @PAM_DIR@ -PAM_LIBS = @PAM_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PGSQL_CFLAGS = @PGSQL_CFLAGS@ -PGSQL_LIBS = @PGSQL_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PROCTRACKDIR = @PROCTRACKDIR@ -PROJECT = @PROJECT@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ -RELEASE = @RELEASE@ -RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ -SED = @SED@ -SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ -SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLURMCTLD_PORT = @SLURMCTLD_PORT@ -SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ -SLURMDBD_PORT = @SLURMDBD_PORT@ -SLURMD_PORT = @SLURMD_PORT@ -SLURM_API_AGE = @SLURM_API_AGE@ -SLURM_API_CURRENT = @SLURM_API_CURRENT@ -SLURM_API_MAJOR = @SLURM_API_MAJOR@ -SLURM_API_REVISION = @SLURM_API_REVISION@ -SLURM_API_VERSION = @SLURM_API_VERSION@ -SLURM_MAJOR = @SLURM_MAJOR@ -SLURM_MICRO = @SLURM_MICRO@ -SLURM_MINOR = @SLURM_MINOR@ -SLURM_PREFIX = @SLURM_PREFIX@ -SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ -SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ -SO_LDFLAGS = @SO_LDFLAGS@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LDFLAGS = @SSL_LDFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -UTIL_LIBS = @UTIL_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_have_man2html = @ac_have_man2html@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lua_CFLAGS = @lua_CFLAGS@ -lua_LIBS = @lua_LIBS@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign -@HAVE_ELAN_FALSE@elan_lib = -@HAVE_ELAN_TRUE@elan_lib = switch_elan.la -PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -pkglib_LTLIBRARIES = $(elan_lib) - -# Quadrics elan3 or elan4 switch plugin. -@HAVE_ELAN_TRUE@switch_elan_la_SOURCES = \ -@HAVE_ELAN_TRUE@ switch_elan.c \ -@HAVE_ELAN_TRUE@ qsw.c qsw.h - - -# Add libslurm to switch_elan to provide some symbols that are not -# available in slurmctld (slurm_setenvpf) -@HAVE_ELAN_TRUE@switch_elan_la_LIBADD = $(ELAN_LIBS) \ -@HAVE_ELAN_TRUE@ $(top_builddir)/src/api/libslurm.la - -@HAVE_ELAN_TRUE@switch_elan_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) -@HAVE_ELAN_FALSE@EXTRA_switch_elan_la_SOURCES = \ -@HAVE_ELAN_FALSE@ switch_elan.c \ -@HAVE_ELAN_FALSE@ qsw.c qsw.h - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/switch/elan/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/plugins/switch/elan/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ - } - -uninstall-pkglibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ - done - -clean-pkglibLTLIBRARIES: - -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) - @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -switch_elan.la: $(switch_elan_la_OBJECTS) $(switch_elan_la_DEPENDENCIES) - $(switch_elan_la_LINK) $(am_switch_elan_la_rpath) $(switch_elan_la_OBJECTS) $(switch_elan_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/qsw.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch_elan.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pkglibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pkglibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pkglibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkglibLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/switch/elan/qsw.c b/src/plugins/switch/elan/qsw.c deleted file mode 100644 index 6516f2719b..0000000000 --- a/src/plugins/switch/elan/qsw.c +++ /dev/null @@ -1,1507 +0,0 @@ -/*****************************************************************************\ - * qsw.c - Library routines for initiating jobs on QsNet. - * $Id$ - ***************************************************************************** - * Copyright (C) 2002 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jim Garlick - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#ifdef WITH_PTHREADS -# include -#endif /* WITH_PTHREADS */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* INT_MAX */ -#include - -#if HAVE_LIBELANCTRL -# include -# include - -/* These are taken from elan3/elanvp.h, which we don't - * want to include here since we are using the new - * version-nonspecific libelanctrl. - * (XXX: What is the equivalent in libelanctrl?) - * - * slurm/482: the elan USER context range is now split - * into two segments, regular user context and RMS - * context ranges. Do not allow a context range - * (lowcontext -- highcontext) to span these two segments, - * as this will generate and elan initialization error - * when MPI tries to attach to the capability. For now, - * restrict SLURM's range to the RMS one (starting at 0x400) - * - */ -# define ELAN_USER_BASE_CONTEXT_NUM 0x400 /* act. RMS_BASE_CONTEXT_NUM */ -# define ELAN_USER_TOP_CONTEXT_NUM 0x7ff - -# define Version cap_version -# define HighNode cap_highnode -# define LowNode cap_lownode -# define HighContext cap_highcontext -# define LowContext cap_lowcontext -# define MyContext cap_mycontext -# define Bitmap cap_bitmap -# define Type cap_type -# define UserKey cap_userkey -# define RailMask cap_railmask -# define Values key_values -#elif HAVE_LIBELAN3 -# include -# include -#else -# error "Must have either libelan3 or libelanctrl to compile this module!" -#endif /* HAVE_LIBELANCTRL */ - -#include -#include - -#include "slurm/slurm_errno.h" - -#include "src/common/slurm_xlator.h" - -#include "src/plugins/switch/elan/qsw.h" - -/* - * Definitions local to this module. - */ -#define _DEBUG 0 -#define QSW_JOBINFO_MAGIC 0xf00ff00e -#define QSW_LIBSTATE_MAGIC 0xf00ff00f - -/* we will allocate program descriptions in this range */ -/* XXX note: do not start at zero as libelan shifts to get unique shm id */ -#define QSW_PRG_START 1 -#define QSW_PRG_END INT_MAX -#define QSW_PRG_INVAL (-1) - -/* we allocate elan hardware context numbers in this range */ -#define QSW_CTX_START ELAN_USER_BASE_CONTEXT_NUM - -/* XXX: Temporary workaround for slurm/222 (qws sw-kernel/5478) - * (sys_validate_cap does not allow ELAN_USER_TOP_CONTEXT_NUM) - */ -#define QSW_CTX_END ELAN_USER_TOP_CONTEXT_NUM - 1 -#define QSW_CTX_INVAL (-1) - - -/* - * We are going to some trouble to keep these defs private so slurm - * hackers not interested in the interconnect details can just pass around - * the opaque types. All use of the data structure internals is local to this - * module. - */ -struct step_ctx { - uint32_t st_prognum; - uint32_t st_low; - uint32_t st_high; - uint16_t st_low_node; - uint16_t st_high_node; -}; - -struct qsw_libstate { - uint32_t ls_magic; - uint32_t ls_prognum; - List step_ctx_list; -}; - -struct qsw_jobinfo { - uint32_t j_magic; - uint32_t j_prognum; - ELAN_CAPABILITY j_cap; -}; - -/* Lock on library state */ -#define _lock_qsw() do { \ - int err; \ - err = pthread_mutex_lock(&qsw_lock); \ - assert(err == 0); \ -} while (0) -#define _unlock_qsw() do { \ - int err; \ - err = pthread_mutex_unlock(&qsw_lock); \ - assert(err == 0); \ -} while (0) - -/* - * Globals - */ -static inline void _dump_step_ctx(const char *head, - struct step_ctx *step_ctx_p); -static qsw_libstate_t qsw_internal_state = NULL; -static pthread_mutex_t qsw_lock = PTHREAD_MUTEX_INITIALIZER; -static elanhost_config_t elanconf = NULL; -static int shmid = -1; - - -static inline void _step_ctx_del(void *ptr) -{ - struct step_ctx *step_ctx_p = (struct step_ctx *) ptr; - - xfree(step_ctx_p); -} - -/* - * Allocate a qsw_libstate_t. - * lsp (IN) store pointer to new instantiation here - * RETURN 0 on success, -1 on failure (sets errno) - */ -int -qsw_alloc_libstate(qsw_libstate_t *lsp) -{ - qsw_libstate_t new; - - assert(lsp != NULL); - new = (qsw_libstate_t)xmalloc(sizeof(struct qsw_libstate)); - if (!new) - slurm_seterrno_ret(ENOMEM); - new->ls_magic = QSW_LIBSTATE_MAGIC; - new->step_ctx_list = list_create(_step_ctx_del); - if (!new->step_ctx_list) { - qsw_free_libstate(new); - slurm_seterrno_ret(ENOMEM); - } - *lsp = new; - return 0; -} - -/* - * Free a qsw_libstate_t. - * ls (IN) qsw_libstate_t to free - */ -void -qsw_free_libstate(qsw_libstate_t ls) -{ - assert(ls->ls_magic == QSW_LIBSTATE_MAGIC); - if (ls->step_ctx_list) - list_destroy(ls->step_ctx_list); - ls->ls_magic = 0; - xfree(ls); -} - -static inline void _dump_step_ctx(const char *head, struct step_ctx *step_ctx_p) -{ -#if _DEBUG - info("%s: prog:%u context:%u:%u nodes:%u:%u", head, - step_ctx_p->st_prognum, step_ctx_p->st_low, step_ctx_p->st_high, - step_ctx_p->st_low_node, step_ctx_p->st_high_node); -#endif -} - -static void -_pack_step_ctx(struct step_ctx *step_ctx_p, Buf buffer) -{ - _dump_step_ctx("_pack_step_ctx", step_ctx_p); - pack32(step_ctx_p->st_prognum, buffer); - pack32(step_ctx_p->st_low, buffer); - pack32(step_ctx_p->st_high, buffer); - pack16(step_ctx_p->st_low_node, buffer); - pack16(step_ctx_p->st_high_node,buffer); -} - -/* - * Pack libstate structure in a format that can be shipped over the - * network and unpacked on a different architecture. - * ls (IN) libstate structure to be packed - * buffer (IN/OUT) where to store packed data - * RETURN #bytes unused in 'data' - */ -int -qsw_pack_libstate(qsw_libstate_t ls, Buf buffer) -{ - int offset; - uint16_t step_ctx_cnt; - ListIterator iter; - struct step_ctx *step_ctx_p; - - assert(ls->ls_magic == QSW_LIBSTATE_MAGIC); - offset = get_buf_offset(buffer); - - pack32(ls->ls_magic, buffer); - pack32(ls->ls_prognum, buffer); - - if (ls->step_ctx_list) - step_ctx_cnt = list_count(ls->step_ctx_list); - else - step_ctx_cnt = 0; - pack16(step_ctx_cnt, buffer); - if (step_ctx_cnt) { - iter = list_iterator_create(ls->step_ctx_list); - while ((step_ctx_p = list_next(iter))) - _pack_step_ctx(step_ctx_p, buffer); - list_iterator_destroy(iter); - } - - return (get_buf_offset(buffer) - offset); -} - - -static int -_unpack_step_ctx(struct step_ctx *step_ctx_p, Buf buffer) -{ - safe_unpack32(&step_ctx_p->st_prognum, buffer); - safe_unpack32(&step_ctx_p->st_low, buffer); - safe_unpack32(&step_ctx_p->st_high, buffer); - safe_unpack16(&step_ctx_p->st_low_node, buffer); - safe_unpack16(&step_ctx_p->st_high_node, buffer); - _dump_step_ctx("_unpack_step_ctx", step_ctx_p); - return 0; -unpack_error: - return -1; -} - - -/* - * Unpack libstate packed by qsw_pack_libstate. - * ls (IN/OUT) where to put libstate structure - * buffer (IN/OUT) where to get packed data - * RETURN #bytes unused or -1 on error (sets errno) - */ -int -qsw_unpack_libstate(qsw_libstate_t ls, Buf buffer) -{ - int offset, i; - uint16_t step_ctx_cnt; - struct step_ctx *step_ctx_p; - - assert(ls->ls_magic == QSW_LIBSTATE_MAGIC); - offset = get_buf_offset(buffer); - - safe_unpack32(&ls->ls_magic, buffer); - safe_unpack32(&ls->ls_prognum, buffer); - safe_unpack16(&step_ctx_cnt, buffer); - - for (i=0; istep_ctx_list, step_ctx_p); - } - - if (ls->ls_magic != QSW_LIBSTATE_MAGIC) - goto unpack_error; - - return SLURM_SUCCESS; - - unpack_error: - slurm_seterrno_ret(EBADMAGIC_QSWLIBSTATE); /* corrupted libstate */ - return SLURM_ERROR; -} - -/* - * Seed the random number generator. This can be called multiple times, - * but srand48 will only be called once per program invocation. - */ -static void -_srand_if_needed(void) -{ - static int done = 0; - - if (!done) { - srand48(getpid()); - done = 1; - } -} - -static void -_copy_libstate(qsw_libstate_t dest, qsw_libstate_t src) -{ - ListIterator iter; - struct step_ctx *src_step_ctx_p, *dest_step_ctx_p; - - assert(src->ls_magic == QSW_LIBSTATE_MAGIC); - assert(dest->ls_magic == QSW_LIBSTATE_MAGIC); - dest->ls_prognum = src->ls_prognum; - iter = list_iterator_create(src->step_ctx_list); - while ((src_step_ctx_p = list_next(iter))) { - dest_step_ctx_p = xmalloc(sizeof(struct step_ctx)); - dest_step_ctx_p->st_prognum = src_step_ctx_p->st_prognum; - dest_step_ctx_p->st_low = src_step_ctx_p->st_low; - dest_step_ctx_p->st_high = src_step_ctx_p->st_high; - dest_step_ctx_p->st_low_node = src_step_ctx_p->st_low_node; - dest_step_ctx_p->st_high_node = src_step_ctx_p->st_high_node; - list_push(dest->step_ctx_list, dest_step_ctx_p); - } - list_iterator_destroy(iter); -} - -/* - * Initialize this library, optionally restoring a previously saved state. - * oldstate (IN) old state retrieved from qsw_fini() or NULL - * RETURN 0 on success, -1 on failure (sets errno) - */ -int -qsw_init(qsw_libstate_t oldstate) -{ - qsw_libstate_t new; - - assert(qsw_internal_state == NULL); - _srand_if_needed(); - if (qsw_alloc_libstate(&new) < 0) - return -1; /* errno set by qsw_alloc_libstate */ - if (oldstate) - _copy_libstate(new, oldstate); - else { - new->ls_prognum = QSW_PRG_START + - (lrand48() % (QSW_PRG_END - QSW_PRG_START + 1)); - } - qsw_internal_state = new; - return 0; -} - -/* - * Finalize use of this library. If 'savestate' is non-NULL, final - * state is copied there before it is destroyed. - * savestate (OUT) place to put state - */ -void -qsw_fini(qsw_libstate_t savestate) -{ - assert(qsw_internal_state != NULL); - _lock_qsw(); - if (savestate) - _copy_libstate(savestate, qsw_internal_state); - qsw_free_libstate(qsw_internal_state); - qsw_internal_state = NULL; - if (elanconf) { - elanhost_config_destroy(elanconf); - elanconf = NULL; - } - _unlock_qsw(); -} - -int -qsw_clear(void) -{ - int rc = 0; - - _lock_qsw(); - assert(qsw_internal_state); - assert(qsw_internal_state->ls_magic == QSW_LIBSTATE_MAGIC); - if (qsw_internal_state->step_ctx_list) - list_destroy(qsw_internal_state->step_ctx_list); - qsw_internal_state->step_ctx_list = list_create(_step_ctx_del); - if (elanconf) - elanhost_config_destroy(elanconf); - if (!(elanconf = elanhost_config_create ())) { - rc = -1; - goto done; - } - qsw_internal_state->ls_prognum = QSW_PRG_START + - (lrand48() % (QSW_PRG_END - QSW_PRG_START + 1)); -done: _unlock_qsw(); - return rc; -} - -/* - * Allocate a qsw_jobinfo_t. - * jp (IN) store pointer to new instantiation here - * RETURN 0 on success, -1 on failure (sets errno) - */ -int -qsw_alloc_jobinfo(qsw_jobinfo_t *jp) -{ - qsw_jobinfo_t new; - - assert(jp != NULL); - new = (qsw_jobinfo_t)xmalloc(sizeof(struct qsw_jobinfo)); - if (!new) - slurm_seterrno_ret(ENOMEM); - new->j_magic = QSW_JOBINFO_MAGIC; - - *jp = new; - return 0; -} - -/* - * Make a copy of a qsw_jobinfo_t. - * j (IN) qsw_jobinfo_t to be copied - * RETURN qsw_jobinfo_t on success, NULL on failure - */ -qsw_jobinfo_t -qsw_copy_jobinfo(qsw_jobinfo_t j) -{ - qsw_jobinfo_t new; - if (qsw_alloc_jobinfo(&new)) - return NULL; - memcpy(new, j, sizeof(struct qsw_jobinfo)); - - return new; -} - -/* - * Free a qsw_jobinfo_t. - * ls (IN) qsw_jobinfo_t to free - */ -void -qsw_free_jobinfo(qsw_jobinfo_t j) -{ - if (j == NULL) - return; - assert(j->j_magic == QSW_JOBINFO_MAGIC); - j->j_magic = 0; - xfree(j); -} - -/* - * Pack jobinfo structure in a format that can be shipped over the - * network and unpacked on a different architecture. - * j (IN) jobinfo structure to be packed - * buffer (OUT) where to store packed data - * RETURN #bytes unused in 'data' or -1 on error (sets errno) - * NOTE: Keep in sync with QSW_PACK_SIZE above - */ -int -qsw_pack_jobinfo(qsw_jobinfo_t j, Buf buffer) -{ - int i, offset; - - assert(j->j_magic == QSW_JOBINFO_MAGIC); - offset = get_buf_offset(buffer); - - pack32(j->j_magic, buffer); - pack32(j->j_prognum, buffer); - for (i = 0; i < 4; i++) - pack32(j->j_cap.UserKey.Values[i], buffer); - pack16(j->j_cap.Type, buffer); -#if HAVE_LIBELANCTRL -# ifdef ELAN_CAP_ELAN3 - pack16(j->j_cap.cap_elan_type, buffer); -# else - j->j_cap.cap_spare = ELAN_CAP_UNINITIALISED; - pack16(j->j_cap.cap_spare, buffer); -# endif -#endif -#if HAVE_LIBELAN3 - pack16(j->j_cap.padding, buffer); -#endif - pack32(j->j_cap.Version, buffer); - pack32(j->j_cap.LowContext, buffer); - pack32(j->j_cap.HighContext, buffer); - pack32(j->j_cap.MyContext, buffer); - pack32(j->j_cap.LowNode, buffer); - pack32(j->j_cap.HighNode, buffer); -#if HAVE_LIBELAN3 - pack32(j->j_cap.Entries, buffer); -#endif - pack32(j->j_cap.RailMask, buffer); - for (i = 0; i < ELAN_BITMAPSIZE; i++) - pack32(j->j_cap.Bitmap[i], buffer); - - return (get_buf_offset(buffer) - offset); -} - -/* - * Unpack jobinfo structure packed by qsw_pack_jobinfo. - * j (IN/OUT) where to store libstate structure - * buffer (OUT) where to load packed data - * RETURN #bytes unused in 'data' or -1 on error (sets errno) - */ -int -qsw_unpack_jobinfo(qsw_jobinfo_t j, Buf buffer) -{ - int i, offset; - - assert(j->j_magic == QSW_JOBINFO_MAGIC); - offset = get_buf_offset(buffer); - - safe_unpack32(&j->j_magic, buffer); - safe_unpack32(&j->j_prognum, buffer); - for (i = 0; i < 4; i++) - safe_unpack32(&j->j_cap.UserKey.Values[i], buffer); - safe_unpack16(&j->j_cap.Type, buffer); -#if HAVE_LIBELANCTRL -# ifdef ELAN_CAP_ELAN3 - safe_unpack16(&j->j_cap.cap_elan_type, buffer); -# else - safe_unpack16(&j->j_cap.cap_spare, buffer); -# endif -#endif -#if HAVE_LIBELAN3 - safe_unpack16(&j->j_cap.padding, buffer); -#endif -{ - uint32_t tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.Version = (int) tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.LowContext = (int) tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.HighContext = (int) tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.MyContext = (int) tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.LowNode = (int) tmp32; - safe_unpack32(&tmp32, buffer); - j->j_cap.HighNode = (int) tmp32; -} -#if HAVE_LIBELAN3 - safe_unpack32(&j->j_cap.Entries, buffer); -#endif - safe_unpack32(&j->j_cap.RailMask, buffer); - for (i = 0; i < ELAN_BITMAPSIZE; i++) - safe_unpack32(&j->j_cap.Bitmap[i], buffer); - - if (j->j_magic != QSW_JOBINFO_MAGIC) - goto unpack_error; - - return SLURM_SUCCESS; - - unpack_error: - slurm_seterrno_ret(EBADMAGIC_QSWJOBINFO); - return SLURM_ERROR; -} - -/* - * Allocate a program description number. Program descriptions, which are the - * key abstraction maintained by the rms.o kernel module, must not be used - * more than once simultaneously on a single node. We allocate one to each - * parallel job which more than meets this requirement. A program description - * can be compared to a process group, except there is no way for a process to - * disassociate itself or its children from the program description. - * If the library is initialized, we allocate these consecutively, otherwise - * we generate a random one, assuming we are being called by a transient - * program like pdsh. Ref: rms_prgcreate(3). - */ -static int -_generate_prognum(void) -{ - int new; - - if (qsw_internal_state) { - _lock_qsw(); - new = qsw_internal_state->ls_prognum; - if (new == QSW_PRG_END) - qsw_internal_state->ls_prognum = QSW_PRG_START; - else - qsw_internal_state->ls_prognum++; - _unlock_qsw(); - } else { - _srand_if_needed(); - new = lrand48() % (QSW_PRG_END - QSW_PRG_START + 1); - new += QSW_PRG_START; - } - return new; -} - -/* - * Elan hardware context numbers are an adapter resource that must not be used - * more than once on a single node. One is allocated to each process on the - * node that will be communicating over Elan. In order for processes on the - * same node to communicate with one another and with other nodes across QsNet, - * they must use contexts in the hi-lo range of a common capability. - * If the library state is initialized, we allocate/free these, otherwise - * we generate a random one, assuming we are being called by a transient - * program like pdsh. Ref: rms_setcap(3). - * - * Returns -1 on allocation error. - */ -static int -_alloc_hwcontext(bitstr_t *nodeset, uint32_t prognum, int num) -{ - int new = -1; - static int seed = 0; - - assert(nodeset); - if (qsw_internal_state) { - bitoff_t bit; - ListIterator iter; - uint16_t low_node = bit_ffs(nodeset); - uint16_t high_node = bit_fls(nodeset); - struct step_ctx *step_ctx_p; - bitstr_t *busy_context = bit_alloc(QSW_CTX_END - - QSW_CTX_START + 1); - - assert(busy_context); - _lock_qsw(); - iter = list_iterator_create(qsw_internal_state->step_ctx_list); - while ((step_ctx_p = list_next(iter))) { - if ((high_node < step_ctx_p->st_low_node) - || (low_node > step_ctx_p->st_high_node)) - continue; - bit_nset(busy_context, step_ctx_p->st_low, - step_ctx_p->st_high); - } - list_iterator_destroy(iter); - bit = bit_noc(busy_context, num, seed); - if (bit != -1) { - seed = bit + num; - step_ctx_p = xmalloc(sizeof(struct step_ctx)); - step_ctx_p->st_prognum = prognum; - step_ctx_p->st_low = bit; - step_ctx_p->st_high = bit + num - 1; - step_ctx_p->st_low_node = low_node; - step_ctx_p->st_high_node = high_node; - _dump_step_ctx("_alloc_hwcontext", step_ctx_p); - list_push(qsw_internal_state->step_ctx_list, step_ctx_p); - new = bit + QSW_CTX_START; - } - _unlock_qsw(); - FREE_NULL_BITMAP(busy_context); - } else { - _srand_if_needed(); - new = lrand48() % - (QSW_CTX_END - (QSW_CTX_START + num - 1) - 1); - new += QSW_CTX_START; - } - assert(new == -1 || (new >= QSW_CTX_START && new <= QSW_CTX_END)); - return new; -} - -extern int qsw_restore_jobinfo(struct qsw_jobinfo *jobinfo) -{ - struct step_ctx *step_ctx_p; - ListIterator iter; - int duplicate = 0; - - assert(qsw_internal_state); - if (!jobinfo) - return 0; - - assert(jobinfo->j_magic == QSW_JOBINFO_MAGIC); - _lock_qsw(); - - /* check for duplicate */ - iter = list_iterator_create(qsw_internal_state->step_ctx_list); - while ((step_ctx_p = list_next(iter))) { - if (jobinfo->j_prognum == step_ctx_p->st_prognum) { - duplicate = 1; - break; - } - } - list_iterator_destroy(iter); - if (!duplicate) { /* need new record */ - step_ctx_p = xmalloc(sizeof(struct step_ctx)); - step_ctx_p->st_prognum = jobinfo->j_prognum; - } - step_ctx_p->st_low = jobinfo->j_cap.LowContext - QSW_CTX_START; - step_ctx_p->st_high = jobinfo->j_cap.HighContext - QSW_CTX_START; - step_ctx_p->st_low_node = jobinfo->j_cap.LowNode; - step_ctx_p->st_high_node = jobinfo->j_cap.HighNode; - _dump_step_ctx("qsw_restore_jobinfo", step_ctx_p); - if (!duplicate) - list_push(qsw_internal_state->step_ctx_list, step_ctx_p); - _unlock_qsw(); - return 0; -} - -static void -_free_hwcontext(uint32_t prog_num) -{ - ListIterator iter; - struct step_ctx *step_ctx_p; - - if (qsw_internal_state) { - _lock_qsw(); - iter = list_iterator_create(qsw_internal_state->step_ctx_list); - while ((step_ctx_p = list_next(iter))) { - if (prog_num != step_ctx_p->st_prognum) - continue; - _dump_step_ctx("_free_hwcontext", step_ctx_p); - list_delete_item(iter); - break; - } - if (!step_ctx_p) { - error("_free_hwcontext could not find prognum %u", - prog_num); - } - list_iterator_destroy(iter); - _unlock_qsw(); - } -} - -/* - * Initialize the elan capability for this job. - * Returns -1 on failure to allocate hw context. - */ -static int -_init_elan_capability(ELAN_CAPABILITY *cap, uint32_t prognum, int ntasks, - int nnodes, bitstr_t *nodeset, uint16_t *tasks_per_node, - int cyclic_alloc, int max_tasks_per_node) -{ - int i, node_index; - - _srand_if_needed(); - - /* start with a clean slate */ -#if HAVE_LIBELANCTRL - elan_nullcap(cap); -#else - elan3_nullcap(cap); -#endif - - /* initialize for single rail and either block or cyclic allocation */ - if (cyclic_alloc) - cap->Type = ELAN_CAP_TYPE_CYCLIC; - else - cap->Type = ELAN_CAP_TYPE_BLOCK; - cap->Type |= ELAN_CAP_TYPE_MULTI_RAIL; - cap->RailMask = 1; - -#if HAVE_LIBELANCTRL -# ifdef ELAN_CAP_ELAN3 - cap->cap_elan_type = ELAN_CAP_ELAN3; -# else - cap->cap_spare = ELAN_CAP_UNINITIALISED; -# endif -#endif - - /* UserKey is 128 bits of randomness which should be kept private */ - for (i = 0; i < 4; i++) - cap->UserKey.Values[i] = lrand48(); - - /* set up hardware context range */ - cap->LowContext = _alloc_hwcontext(nodeset, prognum, max_tasks_per_node); - if (cap->LowContext == -1) - return -1; - cap->HighContext = cap->LowContext + max_tasks_per_node - 1; - /* Note: not necessary to initialize cap->MyContext */ - - /* set the range of nodes to be used and number of processes */ - cap->LowNode = bit_ffs(nodeset); - assert(cap->LowNode != -1); - cap->HighNode = bit_fls(nodeset); - assert(cap->HighNode != -1); - -#if HAVE_LIBELAN3 - cap->Entries = ntasks; -#endif - -#if USE_OLD_LIBELAN - /* set the hw broadcast bit if consecutive nodes */ - if (abs(cap->HighNode - cap->LowNode) == nnodes - 1) - cap->Type |= ELAN_CAP_TYPE_BROADCASTABLE; -#else - /* set unconditionally per qsw gnat sw-elan/4334 */ - /* only time we don't want this is unsupported rev A hardware */ - cap->Type |= ELAN_CAP_TYPE_BROADCASTABLE; -#endif - /* - * Set up cap->Bitmap, which describes the mapping of processes to - * the nodes in the range of cap->LowNode - cap->Highnode. - * There are (ntasks * nnodes) significant bits in the mask, each - * representing a process slot. Bits are off for process slots - * corresponding to unallocated nodes. For example, if nodes 4 and 6 - * are running two processes per node, bits 0,1 (corresponding to the - * two processes on node 4) and bits 4,5 (corresponding to the two - * processes running on node 6) are set. - */ - node_index = 0; - for (i = cap->LowNode; i <= cap->HighNode; i++) { - if (bit_test(nodeset, i)) { - int j, bit, task_cnt; - task_cnt = tasks_per_node[node_index++]; - - for (j = 0; j < task_cnt; j++) { - if (cyclic_alloc) - bit = (i-cap->LowNode) + ( j * - (cap->HighNode - cap->LowNode + 1)); - else - bit = ((i-cap->LowNode) - * max_tasks_per_node) + j; - - assert(bit < (sizeof(cap->Bitmap) * 8)); - BT_SET(cap->Bitmap, bit); - } - } - } - - return 0; -} - -/* - * Create all the QsNet related information needed to set up a QsNet parallel - * program and store it in the qsw_jobinfo struct. - * Call this on the "client" process, e.g. pdsh, srun, slurmctld, etc.. - */ -int -qsw_setup_jobinfo(qsw_jobinfo_t j, int ntasks, bitstr_t *nodeset, - uint16_t *tasks_per_node, int cyclic_alloc) -{ - int i, max_tasks_per_node = 0; - int nnodes = bit_set_count(nodeset); - - assert(j != NULL); - assert(j->j_magic == QSW_JOBINFO_MAGIC); - assert(nodeset); - assert(tasks_per_node); - - /* sanity check on args */ - if ((ntasks <= 0) || (nnodes <= 0)) - slurm_seterrno_ret(EINVAL); - for (i = 0; i < nnodes; i++) { - if (tasks_per_node[i] > max_tasks_per_node) - max_tasks_per_node = tasks_per_node[i]; - } - /* Note: ELAN_MAX_VPS is 512 on "old" Elan driver, 16384 on new. */ - if ((max_tasks_per_node * nnodes) > ELAN_MAX_VPS) - slurm_seterrno_ret(EINVAL); - - /* initialize jobinfo */ - j->j_prognum = _generate_prognum(); - if (_init_elan_capability(&j->j_cap, j->j_prognum, ntasks, nnodes, - nodeset, tasks_per_node, cyclic_alloc, - max_tasks_per_node) == -1) { - slurm_seterrno_ret(EAGAIN); /* failed to allocate hw ctx */ - } - - return 0; -} - -void -qsw_teardown_jobinfo(qsw_jobinfo_t j) -{ - if (j) - _free_hwcontext(j->j_prognum); -} - -/* - * Here are the necessary steps to set up to run an Elan MPI parallel program - * (set of processes) on a node (possibly one of many allocated to the prog): - * - * Process 1 Process 2 | Process 3 - * read args | - * fork ------- rms_prgcreate | - * waitpid elan3_create | - * rms_prgaddcap | - * fork N procs ---+------ rms_setcap - * wait all | setup RMS_ env - * | setuid, etc. - * | exec mpi process - * | - * exit | - * rms_prgdestroy | - * exit | (one pair of processes per mpi proc!) - * - * - The first fork is required because rms_prgdestroy can't occur in the - * process that calls rms_prgcreate (since it is a member, ECHILD). - * - The second fork is required when running multiple processes per node - * because each process must announce its use of one of the hw contexts - * in the range allocated in the capability. - */ - -void -qsw_prog_fini(qsw_jobinfo_t jobinfo) -{ - if (shmid >= 0) { - debug2("qsw_prog_fini"); - shmctl (shmid, IPC_RMID, NULL); - debug2("qsw_prog_fini shmctl IPC_RMID complete"); - } - /* Do nothing... apparently this will be handled by - * callbacks in the kernel exit handlers ... - */ -#if 0 - if (jobinfo->j_ctx) { - elan3_control_close(jobinfo->j_ctx); - jobinfo->j_ctx = NULL; - } -#endif -} - -/* Key for Elan stats shared memory segment is the - * rms.o program description number, left shifted 9 less 1 - * to avoid conflicts with MPI shared memory - */ -static int elan_statkey (int prgid) -{ - return ((prgid << 9) - 1); -} - -/* - * Return the statkey to caller in keyp if shared memory was created - * Return -1 if shared memory creation failed. - */ -int qsw_statkey (qsw_jobinfo_t jobinfo, int *keyp) -{ - if (shmid < 0) - return (-1); - *keyp = elan_statkey (jobinfo->j_prognum); - return (0); -} - -/* - * Create shared memory segment for Elan stats use - * (ELAN_STATKEY env var is set in switch_elan.c) - */ -static int -_qsw_shmem_create (qsw_jobinfo_t jobinfo, uid_t uid) -{ - struct shmid_ds shm; - ELAN_CAPABILITY *cap = &jobinfo->j_cap; - key_t key = elan_statkey (jobinfo->j_prognum); - int maxLocal = cap->HighContext - cap->LowContext + 1; - int pgsize = getpagesize (); - - /* 8KB minimum stats page size */ - if (pgsize < 8192) - pgsize = 8192; - - if ((shmid = shmget (key, pgsize * (maxLocal + 1), IPC_CREAT|IPC_EXCL)) - < 0) - return (error ("Failed to create Elan state shmem: %m")); - - /* Ensure permissions on segment allow user read/write access - */ - shm.shm_perm.uid = uid; - shm.shm_perm.mode = 0600; - - if (shmctl (shmid, IPC_SET, &shm) < 0) - return (error ("Failed to set perms on Elan state shm: %m")); - - return (0); -} - - -static void -_close_all_fd_except(int fd) -{ - int openmax; - int i; - - openmax = sysconf(_SC_OPEN_MAX); - for (i = 0; i <= openmax; i++) { - if (i != fd) - close(i); - } -} - - -/* - * Process 1: After the fork, the child process is process 1, - * and will call rms_prgdestroy when the parent (slurmd job - * manager) exits. - */ -static int -_prg_destructor_fork() -{ - pid_t pid; - int fdpair[2]; - int prgid; - int i; - int dummy; - - if (pipe(fdpair) < 0) { - error("switch/elan: failed creating pipe"); - return -1; - } - - pid = fork(); - if (pid < 0) { - error("switch/elan: failed to fork program destructor"); - } else if (pid > 0) { - /* parent */ - close(fdpair[0]); - waitpid(pid, (int *)NULL, 0); - return fdpair[1]; - } - - /****************************************/ - /* - * fork again so the destructor process - * will not be a child of the slurmd - */ - pid = fork(); - if (pid < 0) { - error("switch/elan: second fork failed"); - } else if (pid > 0) { - exit(0); - } - - /* child */ - close(fdpair[1]); - - /* close librmscall's internal fd to /proc/rms/control */ - rmsmod_fini(); - - _close_all_fd_except(fdpair[0]); - /* Wait for the program description id from the child */ - if (read(fdpair[0], &prgid, sizeof(prgid)) != sizeof(prgid)) { - error("_prg_destructor_fork read failed: %m"); - exit(1); - } - - if (prgid == -1) - exit(1); - - /* - * Wait for the pipe to close, signalling that the parent - * has exited. - */ - while (read(fdpair[0], &dummy, sizeof(dummy)) > 0) {} - - /* - * Verify that program description is empty. If not, send a SIGKILL. - */ - for (i = 0; i < 30; i++) { - int maxids = 8; - pid_t pids[8]; - int nids = 0; - - if (rms_prginfo(prgid, maxids, pids, &nids) < 0) { - error("switch/elan: rms_prginfo: %m"); - } - if (nids == 0) - break; - if (rms_prgsignal(prgid, SIGKILL) < 0) { - error("switch/elan: rms_prgsignal: %m"); - } - sleep(1); - } - - if (rms_prgdestroy(prgid) < 0) { - error("rms_prgdestroy"); - } - exit(0); -} - - - -/* - * Send the prgid of the newly created program description to the process - * forked earlier by _prg_destructor_fork(), using the file descriptor - * "fd" which was returned by the call to _prg_destructor_fork(). - */ -static void -_prg_destructor_send(int fd, int prgid) -{ - debug3("_prg_destructor_send %d", prgid); - if (write (fd, &prgid, sizeof(prgid)) != sizeof(prgid)) { - error ("_prg_destructor_send failed: %m"); - } - /* Deliberately avoid closing fd. When this process exits, it - will close fd signalling to the child process that it is - time to call rms_prgdestroy */ - /*close(fd);*/ -} - -/* - * Process 2: Create the context and make capability available to children. - */ -int -qsw_prog_init(qsw_jobinfo_t jobinfo, uid_t uid) - -{ - int err; - int i, nrails; - int fd; - - if ((fd = _prg_destructor_fork()) == -1) - goto fail; -#if HAVE_LIBELANCTRL - nrails = elan_nrails(&jobinfo->j_cap); - - for (i = 0; i < nrails; i++) { - ELANCTRL_HANDLE handle; - /* - * Open up the Elan control device so we can create - * a new capability. - */ - if (elanctrl_open(&handle) != 0) { - slurm_seterrno(EELAN3CONTROL); - _prg_destructor_send(fd, -1); - goto fail; - } - - /* Push capability into device driver */ - if (elanctrl_create_cap(handle, &jobinfo->j_cap) < 0) { - error("elanctrl_create_cap: %m"); - slurm_seterrno(EELAN3CREATE); - /* elanctrl_close(handle); */ - _prg_destructor_send(fd, -1); - goto fail; - } - - /* elanctrl_close (handle); */ - } - -#else /* !HAVE_LIBELANCTRL */ - nrails = elan3_nrails(&jobinfo->j_cap); - - for (i = 0; i < nrails; i++) { - - ELAN3_CTX *ctx; - - /* see qsw gnat sw-elan/4334: elan3_control_open can ret -1 */ - if ((ctx = elan3_control_open(i)) == NULL - || ctx == (void *)-1) { - slurm_seterrno(EELAN3CONTROL); - _prg_destructor_send(fd, -1); - goto fail; - } - - - /* make cap known via rms_getcap/rms_ncaps to members - * of this prgnum */ - if (elan3_create(ctx, &jobinfo->j_cap) < 0) { - /* XXX masking errno value better than not knowing - * which function failed? */ - error("elan3_create(%d): %m", i); - slurm_seterrno(EELAN3CREATE); - _prg_destructor_send(fd, -1); - goto fail; - } - } -#endif - /* associate this process and its children with prgnum */ - if (rms_prgcreate(jobinfo->j_prognum, uid, 1) < 0) { - /* translate errno values to more descriptive ones */ - switch (errno) { - case EINVAL: - slurm_seterrno(EINVAL_PRGCREATE); - break; - default: - break; - } - _prg_destructor_send(fd, -1); - goto fail; - } - _prg_destructor_send(fd, jobinfo->j_prognum); - - if (rms_prgaddcap(jobinfo->j_prognum, 0, &jobinfo->j_cap) < 0) { - /* translate errno values to more descriptive ones */ - switch (errno) { - case ESRCH: - slurm_seterrno(ESRCH_PRGADDCAP); - break; - case EFAULT: - slurm_seterrno(EFAULT_PRGADDCAP); - break; - default: - break; - } - goto fail; - } - - - /* - * Create shared memory for libelan state - * Failure to create shared memory is not a fatal error. - */ - _qsw_shmem_create (jobinfo, uid); - - - /* note: _elan3_fini() destroys context and makes capability unavail */ - /* do it in qsw_prog_fini() after app terminates */ - return 0; -fail: - err = errno; /* presrve errno in case _elan3_fini touches it */ - qsw_prog_fini(jobinfo); - slurm_seterrno(err); - return -1; -} - -/* - * Process 3: Do the rms_setcap. - */ -int -qsw_setcap(qsw_jobinfo_t jobinfo, int procnum) -{ - /* - * Assign elan hardware context to current process. - * - arg1 (0 below) is an index into the kernel's list of caps for this - * program desc (added by rms_prgaddcap). There will be - * one per rail. - * - arg2 indexes the hw ctxt range in the capability - * [cap->LowContext, cap->HighContext] - */ - if (rms_setcap(0, procnum) < 0) { - /* translate errno values to more descriptive ones */ - switch (errno) { - case EINVAL: - slurm_seterrno(EINVAL_SETCAP); - break; - case EFAULT: - slurm_seterrno(EFAULT_SETCAP); - break; - default: - break; - } - return -1; - } - return 0; -} - - -/* - * Return the local elan address (for rail 0) or -1 on failure. - */ -int -qsw_getnodeid(void) -{ - int nodeid = -1; -#if HAVE_LIBELANCTRL - ELAN_DEV_IDX devidx = 0; - ELANCTRL_HANDLE handle; - ELAN_POSITION position; - - if (elanctrl_open(&handle) != 0) - slurm_seterrno_ret(EGETNODEID); - - if (elanctrl_get_position(handle, devidx, &position) != 0) { - elanctrl_close (handle); - slurm_seterrno_ret(EGETNODEID); - } - - nodeid = position.pos_nodeid; - - elanctrl_close (handle); -#else - ELAN3_CTX *ctx = _elan3_init(0); /* rail 0 */ - if (ctx) { - nodeid = ctx->devinfo.Position.NodeId; - elan3_control_close(ctx); - } -#endif - if (nodeid == -1) - slurm_seterrno(EGETNODEID); - return nodeid; - -} - -static int -_read_elanhost_config (void) -{ - int rc; - - if (!(elanconf = elanhost_config_create ())) - return (-1); - - if ((rc = elanhost_config_read (elanconf, NULL)) < 0) { - error ("Unable to read Elan config: %s", - elanhost_config_err (elanconf)); - elanhost_config_destroy (elanconf); - elanconf = NULL; - return (-1); - } - - return (0); -} - -int -qsw_maxnodeid(void) -{ - int maxid = -1; - - _lock_qsw(); - if (!elanconf && (_read_elanhost_config() < 0)) - goto done; - - maxid = elanhost_config_maxid (elanconf); - - done: - _unlock_qsw(); - return maxid; -} - -/* - * Given a hostname, return the elanid or -1 on error. - * Initializes the elanconfig from the default /etc/elanhosts - * config file. - */ -int -qsw_getnodeid_byhost(char *host) -{ - int id = -1; - - if (host == NULL) - return (-1); - - _lock_qsw(); - if (!elanconf && (_read_elanhost_config() < 0)) - goto done; - - xassert (elanconf != NULL); - - id = elanhost_host2elanid (elanconf, host); - - done: - _unlock_qsw(); - return id; -} - -/* - * Given an elanid, determine the hostname. Returns -1 on error or the number - * of characters copied on success. - * XXX - assumes RMS style hostnames (see above) - */ -int -qsw_gethost_bynodeid(char *buf, int len, int id) -{ - int rc = -1; - char *hostp; - - if (id < 0) slurm_seterrno_ret(EGETHOST_BYNODEID); - - _lock_qsw(); - if (!elanconf && (_read_elanhost_config() < 0)) - goto done; - - if (!(hostp = elanhost_elanid2host (elanconf, ELANHOST_EIP, id))) { - slurm_seterrno (EGETHOST_BYNODEID); - goto done; - } - - rc = slurm_strlcpy (buf, hostp, len); - - done: - _unlock_qsw(); - return (rc); -} - -/* - * Send the specified signal to all members of a program description. - * Returns -1 on failure and sets errno. Ref: rms_prgsignal(3). - */ -int -qsw_prgsignal(qsw_jobinfo_t jobinfo, int signum) -{ - if (rms_prgsignal(jobinfo->j_prognum, signum) < 0) { - /* translate errno values to more descriptive ones */ - switch (errno) { - case EINVAL: - slurm_seterrno(EINVAL_PRGSIGNAL); - break; - case ESRCH: - slurm_seterrno(ESRCH_PRGSIGNAL); - break; - default: - break; - } - return -1; - } - return 0; -} - -#define _USE_ELAN3_CAPABILITY_STRING 1 - -#ifndef _USE_ELAN3_CAPABILITY_STRING -#define TRUNC_BITMAP 1 -static void -_print_capbitmap(FILE *fp, ELAN_CAPABILITY *cap) -{ - int bit_max = sizeof(cap->Bitmap)*8 - 1; - int bit; -#if TRUNC_BITMAP - bit_max = bit_max >= 64 ? 64 : bit_max; -#endif - for (bit = bit_max; bit >= 0; bit--) - fprintf(fp, "%c", BT_TEST(cap->Bitmap, bit) ? '1' : '0'); - fprintf(fp, "\n"); -} -#endif /* !_USE_ELAN3_CAPABILITY_STRING */ - -char * -qsw_capability_string(struct qsw_jobinfo *j, char *buf, size_t size) -{ - ELAN_CAPABILITY *cap; - - assert(buf != NULL); - assert(j->j_magic == QSW_JOBINFO_MAGIC); - - cap = &j->j_cap; - -#if HAVE_LIBELANCTRL - snprintf(buf, size, "prg=%d ctx=%x.%x nodes=%d.%d", - j->j_prognum, cap->LowContext, cap->HighContext, - cap->LowNode, cap->HighNode); -#else - snprintf(buf, size, "prg=%d ctx=%x.%x nodes=%d.%d entries=%d", - j->j_prognum, cap->LowContext, cap->HighContext, - cap->LowNode, cap->HighNode, - cap->Entries); -#endif - - return buf; -} - -void -qsw_print_jobinfo(FILE *fp, struct qsw_jobinfo *jobinfo) -{ - ELAN_CAPABILITY *cap; - char str[8192]; - - assert(jobinfo->j_magic == QSW_JOBINFO_MAGIC); - - fprintf(fp, "__________________\n"); - fprintf(fp, "prognum=%d\n", jobinfo->j_prognum); - - cap = &jobinfo->j_cap; - /* use elan3_capability_string as a shorter alternative for now */ -#if _USE_ELAN3_CAPABILITY_STRING -# if HAVE_LIBELANCTRL - fprintf(fp, "%s\n", elan_capability_string(cap, str)); -# else - fprintf(fp, "%s\n", elan3_capability_string(cap, str)); -# endif -#else - fprintf(fp, "cap.UserKey=%8.8x.%8.8x.%8.8x.%8.8x\n", - cap->UserKey.Values[0], cap->UserKey.Values[1], - cap->UserKey.Values[2], cap->UserKey.Values[3]); - /*fprintf(fp, "cap.Version=%d\n", cap->Version);*/ - fprintf(fp, "cap.Type=0x%hx\n", cap->Type); - fprintf(fp, "cap.LowContext=%d\n", cap->LowContext); - fprintf(fp, "cap.HighContext=%d\n", cap->HighContext); - fprintf(fp, "cap.MyContext=%d\n", cap->MyContext); - fprintf(fp, "cap.LowNode=%d\n", cap->LowNode); - fprintf(fp, "cap.HighNode=%d\n", cap->HighNode); -#if HAVE_LIBELAN3 - fprintf(fp, "cap.padding=%hd\n", cap->padding); - fprintf(fp, "cap.Entries=%d\n", cap->Entries); -#endif - fprintf(fp, "cap.Railmask=0x%x\n", cap->RailMask); - fprintf(fp, "cap.Bitmap="); - _print_capbitmap(fp, cap); -#endif - fprintf(fp, "\n------------------\n"); -} diff --git a/src/plugins/switch/elan/qsw.h b/src/plugins/switch/elan/qsw.h deleted file mode 100644 index d488ec0674..0000000000 --- a/src/plugins/switch/elan/qsw.h +++ /dev/null @@ -1,142 +0,0 @@ -/*****************************************************************************\ - * qsw.h - Library routines for initiating jobs on QsNet. - ***************************************************************************** - * Copyright (C) 2002 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jim Garlick - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "src/common/slurm_xlator.h" - -#ifndef _QSW_INCLUDED -#define _QSW_INCLUDED - -#if HAVE_LIBELANCTRL -# include -#elif HAVE_LIBELAN3 -# include -#else -# error "Don't have either libelanctrl or libelan3!" -#endif - -/* opaque data structures - no peeking! */ -typedef struct qsw_libstate *qsw_libstate_t; -#ifndef __qsw_jobinfo_t_defined -# define __qsw_jobinfo_t_defined - typedef struct qsw_jobinfo *qsw_jobinfo_t; /* opaque data type */ -#endif - -#define QSW_LIBSTATE_PACK_MAX 12 -#define QSW_JOBINFO_PACK_MAX 120 -#define QSW_MAX_TASKS ELAN_MAX_VPS -#define QSW_PACK_SIZE (4 * (2+4+1+8+ELAN_BITMAPSIZE)) - -/* NOTE: error codes should be between ESLURM_SWITCH_MIN and - * ESLURM_SWITCH MAX as defined in slurm/slurm_errno.h */ -enum { - /* Quadrics Elan specific error codes */ - ENOSLURM = 3000, - EBADMAGIC_QSWLIBSTATE, - EBADMAGIC_QSWJOBINFO, - EINVAL_PRGCREATE, - ECHILD_PRGDESTROY, - EEXIST_PRGDESTROY, - EELAN3INIT, - EELAN3CONTROL, - EELAN3CREATE, - ESRCH_PRGADDCAP, - EFAULT_PRGADDCAP, - EINVAL_SETCAP, - EFAULT_SETCAP, - EGETNODEID, - EGETNODEID_BYHOST, - EGETHOST_BYNODEID, - ESRCH_PRGSIGNAL, - EINVAL_PRGSIGNAL -}; - -int qsw_alloc_libstate(qsw_libstate_t *lsp); -void qsw_free_libstate(qsw_libstate_t ls); - -int qsw_pack_libstate(qsw_libstate_t ls, Buf buffer); -int qsw_unpack_libstate(qsw_libstate_t ls, Buf buffer); - -int qsw_init(qsw_libstate_t restorestate); -void qsw_fini(qsw_libstate_t savestate); -int qsw_clear(void); - -int qsw_alloc_jobinfo(qsw_jobinfo_t *jp); -qsw_jobinfo_t qsw_copy_jobinfo(qsw_jobinfo_t j); -void qsw_free_jobinfo(qsw_jobinfo_t j); -int qsw_restore_jobinfo(struct qsw_jobinfo *jobinfo); - -int qsw_pack_jobinfo(qsw_jobinfo_t j, Buf buffer); -int qsw_unpack_jobinfo(qsw_jobinfo_t j, Buf buffer); - -int qsw_setup_jobinfo(qsw_jobinfo_t j, int ntasks, - bitstr_t *nodeset, uint16_t *tasks_per_node, - int cyclic_alloc); -void qsw_teardown_jobinfo(qsw_jobinfo_t j); - -int qsw_prog_init(qsw_jobinfo_t jobinfo, uid_t uid); -void qsw_prog_fini(qsw_jobinfo_t jobinfo); - -int qsw_prgdestroy(qsw_jobinfo_t jobinfo); /* was qsw_prog_reap */ - -int qsw_setcap(qsw_jobinfo_t jobinfo, int procnum); - /* was qsw_attach */ - -int qsw_prgsignal(qsw_jobinfo_t jobinfo, int signum); - /* was qsw_signal_job */ - - /* return max ElanID in configuration */ -int qsw_maxnodeid(void); - -int qsw_getnodeid(void); -int qsw_getnodeid_byhost(char *host); -int qsw_gethost_bynodeid(char *host, int len, int elanid); - -char * qsw_capability_string(qsw_jobinfo_t j, char *buf, size_t len); -void qsw_print_jobinfo(FILE *fp, struct qsw_jobinfo *jobinfo); - - /* Return Elan shared memory state key */ -int qsw_statkey (qsw_jobinfo_t jobinfo, int *keyp); - -#endif /* _QSW_INCLUDED */ diff --git a/src/plugins/switch/elan/switch_elan.c b/src/plugins/switch/elan/switch_elan.c deleted file mode 100644 index 6b7ea0138c..0000000000 --- a/src/plugins/switch/elan/switch_elan.c +++ /dev/null @@ -1,842 +0,0 @@ -/*****************************************************************************\ - * switch_elan.c - Library routines for initiating jobs on QsNet. - ***************************************************************************** - * Copyright (C) 2003-2007 The Regents of the University of California. - * Copyright (C) 2008 Lawrence Livermore National Security. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Kevin Tew , et. al. - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#ifdef WITH_PTHREADS -# include -#endif /* WITH_PTHREADS */ - -#include -#include -#include -#include -#include -#include -#include - -#include "slurm/slurm_errno.h" - -#include "src/common/slurm_xlator.h" - -#include "src/plugins/switch/elan/qsw.h" - -#define BUFFER_SIZE 1024 -#define QSW_STATE_VERSION "VER001" - -/* - * Static prototypes for network error resolver creation: - */ -static int _set_elan_ids(void); -static void *_neterr_thr(void *arg); - -static int neterr_retval = 0; -static pthread_t neterr_tid = 0; -static pthread_mutex_t neterr_mutex = PTHREAD_MUTEX_INITIALIZER; -static pthread_cond_t neterr_cond = PTHREAD_COND_INITIALIZER; - -/* Type for error string table entries */ -typedef struct { - int xe_number; - char *xe_message; -} slurm_errtab_t; - -static slurm_errtab_t slurm_errtab[] = { - {0, "No error"}, - {-1, "Unspecified error"}, - - /* Quadrics Elan routine error codes */ - - { ENOSLURM, /* oh no! */ - "Out of slurm" }, - { EBADMAGIC_QSWLIBSTATE, - "Bad magic in QSW libstate" }, - { EBADMAGIC_QSWJOBINFO, - "Bad magic in QSW jobinfo" }, - { EINVAL_PRGCREATE, - "Program identifier in use or CPU count invalid, try again" }, - { ECHILD_PRGDESTROY, - "Processes belonging to this program are still running" }, - { EEXIST_PRGDESTROY, - "Program identifier does not exist" }, - { EELAN3INIT, - "Too many processes using Elan or mapping failure" }, - { EELAN3CONTROL, - "Could not open elan3 control device" }, - { EELAN3CREATE, - "Could not create elan capability" }, - { ESRCH_PRGADDCAP, - "Program does not exist (addcap)" }, - { EFAULT_PRGADDCAP, - "Capability has invalid address (addcap)" }, - { EINVAL_SETCAP, - "Invalid context number (setcap)" }, - { EFAULT_SETCAP, - "Capability has invalid address (setcap)" }, - { EGETNODEID, - "Cannot determine local elan address" }, - { EGETNODEID_BYHOST, - "Cannot translate hostname to elan address" }, - { EGETHOST_BYNODEID, - "Cannot translate elan address to hostname" }, - { ESRCH_PRGSIGNAL, - "No such program identifier" }, - { EINVAL_PRGSIGNAL, - "Invalid signal number" } -}; - -/* - * These variables are required by the generic plugin interface. If they - * are not found in the plugin, the plugin loader will ignore it. - * - * plugin_name - a string giving a human-readable description of the - * plugin. There is no maximum length, but the symbol must refer to - * a valid string. - * - * plugin_type - a string suggesting the type of the plugin or its - * applicability to a particular form of data or method of data handling. - * If the low-level plugin API is used, the contents of this string are - * unimportant and may be anything. SLURM uses the higher-level plugin - * interface which requires this string to be of the form - * - * / - * - * where is a description of the intended application of - * the plugin (e.g., "switch" for SLURM switch) and is a description - * of how this plugin satisfies that application. SLURM will only load - * a switch plugin if the plugin_type string has a prefix of "switch/". - * - * plugin_version - an unsigned 32-bit integer giving the version number - * of the plugin. If major and minor revisions are desired, the major - * version number may be multiplied by a suitable magnitude constant such - * as 100 or 1000. Various SLURM versions will likely require a certain - * minimum version for their plugins as this API matures. - */ -const char plugin_name[] = "switch Quadrics Elan3 or Elan4 plugin"; -const char plugin_type[] = "switch/elan"; -const uint32_t plugin_version = 90; - -/* - * init() is called when the plugin is loaded, before any other functions - * are called. Put global initialization here. - */ -int init ( void ) -{ -#ifdef HAVE_FRONT_END - fatal("Plugin switch/elan is incompatible with front-end configuration"); -#endif - verbose("%s loaded", plugin_name); - return SLURM_SUCCESS; -} - -int fini ( void ) -{ - return SLURM_SUCCESS; -} - -/* - * switch functions for global state save/restore - */ -int switch_p_libstate_save (char *dir_name) -{ - int error_code = SLURM_SUCCESS; - qsw_libstate_t old_state = NULL; - Buf buffer = NULL; - int state_fd; - char *file_name; - - if (qsw_alloc_libstate(&old_state)) - return SLURM_ERROR; - qsw_fini(old_state); - buffer = init_buf(1024); - packstr(QSW_STATE_VERSION, buffer); - (void) qsw_pack_libstate(old_state, buffer); - file_name = xstrdup(dir_name); - xstrcat(file_name, "/qsw_state"); - (void) unlink(file_name); - state_fd = creat (file_name, 0600); - if (state_fd < 0) { - error ("Can't save state, error creating file %s %m", - file_name); - error_code = SLURM_ERROR; - } else { - char *buf = get_buf_data(buffer); - size_t len = get_buf_offset(buffer); - while(1) { - int wrote = write (state_fd, buf, len); - if ((wrote < 0) && (errno == EINTR)) - continue; - if (wrote == 0) - break; - if (wrote < 0) { - error ("Can't save switch state: %m"); - error_code = SLURM_ERROR; - break; - } - buf += wrote; - len -= wrote; - } - close (state_fd); - } - xfree(file_name); - - if (buffer) - free_buf(buffer); - if (old_state) - qsw_free_libstate(old_state); - - return error_code; -} - -int switch_p_libstate_restore (char *dir_name, bool recover) -{ - char *data = NULL, *file_name; - qsw_libstate_t old_state = NULL; - Buf buffer = NULL; - int error_code = SLURM_SUCCESS; - int state_fd, data_allocated = 0, data_read = 0, data_size = 0; - char *ver_str = NULL; - uint32_t ver_str_len; - - if (!recover) /* clean start, no recovery */ - return qsw_init(NULL); - - file_name = xstrdup(dir_name); - xstrcat(file_name, "/qsw_state"); - state_fd = open (file_name, O_RDONLY); - if (state_fd >= 0) { - data_allocated = BUFFER_SIZE; - data = xmalloc(data_allocated); - while (1) { - data_read = read (state_fd, &data[data_size], - BUFFER_SIZE); - if ((data_read < 0) && (errno == EINTR)) - continue; - if (data_read < 0) { - error ("Read error on %s, %m", file_name); - error_code = SLURM_ERROR; - break; - } else if (data_read == 0) - break; - data_size += data_read; - data_allocated += data_read; - xrealloc(data, data_allocated); - } - close (state_fd); - xfree(file_name); - } else { - error("No %s file for QSW state recovery", file_name); - error("Starting QSW with clean state"); - xfree(file_name); - return qsw_init(NULL); - } - - if (error_code == SLURM_SUCCESS) { - buffer = create_buf (data, data_size); - data = NULL; /* now in buffer, don't xfree() */ - if (buffer && (size_buf(buffer) >= sizeof(uint32_t) + - strlen(QSW_STATE_VERSION))) { - char *ptr = get_buf_data(buffer); - - if (!memcmp(&ptr[sizeof(uint32_t)], - QSW_STATE_VERSION, 3)) { - unpackstr_xmalloc(&ver_str, &ver_str_len, - buffer); - debug3("qsw_state file version: %s", ver_str); - } - } - } - - if (ver_str && (strcmp(ver_str, QSW_STATE_VERSION) == 0)) { - if ((qsw_alloc_libstate(&old_state)) - || (qsw_unpack_libstate(old_state, buffer) < 0)) - error_code = SLURM_ERROR; - } else - error("qsw_state file is in an unsupported format, ignored"); - - if (buffer) - free_buf(buffer); - xfree(data); - xfree(ver_str); - - if (error_code == SLURM_SUCCESS) - error_code = qsw_init(old_state); - if (old_state) - qsw_free_libstate(old_state); - - return error_code; -} - -int switch_p_libstate_clear ( void ) -{ - return qsw_clear(); -} - -/* - * switch functions for job step specific credential - */ -int switch_p_alloc_jobinfo(switch_jobinfo_t **jp) -{ - return qsw_alloc_jobinfo((qsw_jobinfo_t *)jp); -} - -int switch_p_build_jobinfo ( switch_jobinfo_t *switch_job, char *nodelist, - uint16_t *tasks_per_node, int cyclic_alloc, char *network) -{ - int node_set_size = QSW_MAX_TASKS; /* overkill but safe */ - hostlist_t host_list; - char *this_node_name; - bitstr_t *nodeset; - int node_id, error_code = SLURM_SUCCESS; - int i, nnodes, ntasks = 0; - - if (!tasks_per_node) { - slurm_seterrno(ENOMEM); - return SLURM_ERROR; - } - - if ((host_list = hostlist_create(nodelist)) == NULL) - fatal("hostlist_create(%s): %m", nodelist); - - nnodes = hostlist_count(host_list); - for (i = 0; i < nnodes; i++) - ntasks += tasks_per_node[i]; - - if (ntasks > node_set_size) { - slurm_seterrno(ESLURM_BAD_TASK_COUNT); - hostlist_destroy(host_list); - return SLURM_ERROR; - } - - if ((nodeset = bit_alloc (node_set_size)) == NULL) - fatal("bit_alloc: %m"); - - while ((this_node_name = hostlist_shift(host_list))) { - node_id = qsw_getnodeid_byhost(this_node_name); - if (node_id >= 0) - bit_set(nodeset, node_id); - else { - error("qsw_getnodeid_byhost(%s) failure", - this_node_name); - slurm_seterrno(ESLURM_INTERCONNECT_FAILURE); - error_code = SLURM_ERROR; - } - free(this_node_name); - } - hostlist_destroy(host_list); - - if (error_code == SLURM_SUCCESS) { - qsw_jobinfo_t j = (qsw_jobinfo_t) switch_job; - error_code = qsw_setup_jobinfo(j, ntasks, nodeset, - tasks_per_node, cyclic_alloc); - /* allocs hw context */ - } - - FREE_NULL_BITMAP(nodeset); - return error_code; -} - -switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *j) -{ - return (switch_jobinfo_t) qsw_copy_jobinfo((qsw_jobinfo_t) j); -} - -void switch_p_free_jobinfo(switch_jobinfo_t *k) -{ - qsw_free_jobinfo((qsw_jobinfo_t) k); -} - -int switch_p_pack_jobinfo(switch_jobinfo_t *k, Buf buffer) -{ - return qsw_pack_jobinfo((qsw_jobinfo_t) k, buffer); -} - -int switch_p_unpack_jobinfo(switch_jobinfo_t *k, Buf buffer) -{ - return qsw_unpack_jobinfo((qsw_jobinfo_t) k, buffer); -} - -void switch_p_print_jobinfo(FILE *fp, switch_jobinfo_t *jobinfo) -{ - qsw_print_jobinfo(fp, (qsw_jobinfo_t) jobinfo); -} - -char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, char *buf, - size_t size) -{ - return qsw_capability_string((struct qsw_jobinfo *) switch_jobinfo, - buf, size); -} - -/* - * switch functions for job initiation - */ - -static int _have_elan3 (void) -{ -#if HAVE_LIBELAN3 - return (1); -#else - struct stat st; - - if (stat ("/proc/qsnet/elan3/device0", &st) < 0) - return (0); - - return (1); -#endif /* HAVE_LIBELAN3 */ - return (0); -} - -/* Initialize node for use of the Elan interconnect by loading - * elanid/hostname pairs then spawning the Elan network error - * resolver thread. - * - * Main thread waits for neterr thread to successfully start before - * continuing. - */ -int switch_p_node_init ( void ) -{ - pthread_attr_t attr; - - /* - * Only need to run neterr resolver thread on Elan3 systems. - */ - if (!_have_elan3 ()) return SLURM_SUCCESS; - - /* - * Load neterr elanid/hostname values into kernel - */ - if (_set_elan_ids() < 0) - return SLURM_ERROR; - - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate: %m"); - - slurm_mutex_lock(&neterr_mutex); - - if (pthread_create(&neterr_tid, &attr, _neterr_thr, NULL)) { - error("pthread_create: %m"); - slurm_attr_destroy(&attr); - return SLURM_ERROR; - } - slurm_attr_destroy(&attr); - - /* - * Wait for successful startup of neterr thread before - * returning control to slurmd. - */ - pthread_cond_wait(&neterr_cond, &neterr_mutex); - pthread_mutex_unlock(&neterr_mutex); - - return neterr_retval; - - - return SLURM_SUCCESS; -} - -/* - * Use dlopen(3) for libelan3.so (when needed) - * This allows us to build a single version of the elan plugin - * for Elan3 and Elan4 on QsNetII systems. - */ -static void *elan3h = NULL; - -/* - * * Wrapper functions for needed libelan3 functions - * */ -static int _elan3_init_neterr_svc (int dbglvl) -{ - static int (*init_svc) (int); - - if (!(init_svc = dlsym (elan3h, "elan3_init_neterr_svc"))) - return (0); - - return (init_svc (dbglvl)); -} - - -static int _elan3_register_neterr_svc (void) -{ - static int (*reg_svc) (void); - - if (!(reg_svc = dlsym (elan3h, "elan3_register_neterr_svc"))) - return (0); - - return (reg_svc ()); -} - -static int _elan3_run_neterr_svc (void) -{ - static int (*run_svc) (); - - if (!(run_svc = dlsym (elan3h, "elan3_run_neterr_svc"))) - return (0); - - return (run_svc ()); -} - - -static int _elan3_load_neterr_svc (int i, char *host) -{ - static int (*load_svc) (int, char *); - - if (!(load_svc = dlsym (elan3h, "elan3_load_neterr_svc"))) - return (0); - - return (load_svc (i, host)); -} - -static void *_neterr_thr(void *arg) -{ - debug3("Starting Elan network error resolver thread"); - - if (!(elan3h = dlopen ("libelan3.so", RTLD_LAZY))) { - error ("Unable to open libelan3.so: %s", dlerror ()); - goto fail; - } - - if (!_elan3_init_neterr_svc(0)) { - error("elan3_init_neterr_svc: %m"); - goto fail; - } - - /* - * Attempt to register the neterr svc thread. If the address - * cannot be bound, then there is already a thread running, and - * we should just exit with success. - */ - if (!_elan3_register_neterr_svc()) { - if (errno != EADDRINUSE) { - error("elan3_register_neterr_svc: %m"); - goto fail; - } - info("Warning: Elan error resolver thread already running"); - } - - /* - * Signal main thread that we've successfully initialized - */ - slurm_mutex_lock(&neterr_mutex); - neterr_retval = 0; - pthread_cond_signal(&neterr_cond); - slurm_mutex_unlock(&neterr_mutex); - - /* - * Run the network error resolver thread. This should - * never return. If it does, there's not much we can do - * about it. - */ - _elan3_run_neterr_svc(); - - return NULL; - - fail: - slurm_mutex_lock(&neterr_mutex); - neterr_retval = SLURM_FAILURE; - pthread_cond_signal(&neterr_cond); - slurm_mutex_unlock(&neterr_mutex); - - return NULL; -} - -/* - * Called from slurmd just before termination. - * We don't really need to do anything special for Elan, but - * we'll call pthread_cancel() on the neterr resolver thread anyhow. - */ -extern int switch_p_node_fini ( void ) -{ -#if HAVE_LIBELAN3 - int i; - - if (!neterr_tid) - return SLURM_SUCCESS; - - for (i=0; i<4; i++) { - if (pthread_cancel(neterr_tid)) { - neterr_tid = 0; - return SLURM_SUCCESS; - } - usleep(1000); - } - error("Could not kill switch elan pthread"); - return SLURM_ERROR; -#else /* !HAVE_LIBELAN3 */ - - return SLURM_SUCCESS; -#endif /* HAVE_LIBELAN3 */ -} - -int switch_p_job_preinit ( switch_jobinfo_t *jobinfo ) -{ - return SLURM_SUCCESS; -} - -/* - * prepare node for interconnect use - */ -extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, - char *job_name) -{ - char buf[4096]; - - debug2("calling qsw_prog_init from process %lu", - (unsigned long) getpid()); - verbose("ELAN: %s", qsw_capability_string( - (qsw_jobinfo_t)jobinfo, buf, 4096)); - - if (qsw_prog_init((qsw_jobinfo_t)jobinfo, uid) < 0) { - /* - * Check for EBADF, which probably means the rms - * kernel module is not loaded. - */ - if (errno == EBADF) - error("Initializing interconnect: " - "is the rms kernel module loaded?"); - else - error ("qsw_prog_init: %m"); - - qsw_print_jobinfo(log_fp(), (qsw_jobinfo_t)jobinfo); - return SLURM_ERROR; - } - - return SLURM_SUCCESS; -} - -int switch_p_job_fini ( switch_jobinfo_t *jobinfo ) -{ - qsw_prog_fini((qsw_jobinfo_t)jobinfo); - return SLURM_SUCCESS; -} - -int switch_p_job_postfini ( switch_jobinfo_t *jobinfo, uid_t pgid, - uint32_t job_id, uint32_t step_id ) -{ - return SLURM_SUCCESS; -} - -int switch_p_job_attach ( switch_jobinfo_t *jobinfo, char ***env, - uint32_t nodeid, uint32_t procid, uint32_t nnodes, - uint32_t nprocs, uint32_t rank ) -{ - int id = -1; - debug3("nodeid=%lu nnodes=%lu procid=%lu nprocs=%lu rank=%lu", - (unsigned long) nodeid, (unsigned long) nnodes, - (unsigned long) procid, (unsigned long) nprocs, - (unsigned long) rank); - debug3("setting capability in process %lu", - (unsigned long) getpid()); - if (qsw_setcap((qsw_jobinfo_t) jobinfo, (int) procid) < 0) { - error("qsw_setcap: %m"); - return SLURM_ERROR; - } - - if (slurm_setenvpf(env, "RMS_RANK", "%lu", (unsigned long) rank ) - < 0) - return SLURM_ERROR; - if (slurm_setenvpf(env, "RMS_NODEID", "%lu", (unsigned long) nodeid) - < 0) - return SLURM_ERROR; - if (slurm_setenvpf(env, "RMS_PROCID", "%lu", (unsigned long) rank ) - < 0) - return SLURM_ERROR; - if (slurm_setenvpf(env, "RMS_NNODES", "%lu", (unsigned long) nnodes) - < 0) - return SLURM_ERROR; - if (slurm_setenvpf(env, "RMS_NPROCS", "%lu", (unsigned long) nprocs) - < 0) - return SLURM_ERROR; - - /* - * Tell libelan the key to use for Elan state shmem segment - */ - if (qsw_statkey ((qsw_jobinfo_t) jobinfo, &id) >= 0) - slurm_setenvpf (env, "ELAN_STATKEY", "%d", id); - - return SLURM_SUCCESS; -} - -extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, - int key, void *resulting_data) -{ - slurm_seterrno(EINVAL); - return SLURM_ERROR; -} - -static int -_set_elan_ids(void) -{ - int i; - - for (i = 0; i <= qsw_maxnodeid(); i++) { - char host[256]; - if (qsw_gethost_bynodeid(host, 256, i) < 0) - continue; - - if (_elan3_load_neterr_svc(i, host) < 0) - error("elan3_load_neterr_svc(%d, %s): %m", i, host); - } - - return SLURM_SUCCESS; -} - - -/* - * Linear search through table of errno values and strings, - * returns NULL on error, string on success. - */ -static char *_lookup_slurm_api_errtab(int errnum) -{ - char *res = NULL; - int i; - - for (i = 0; i < sizeof(slurm_errtab) / sizeof(slurm_errtab_t); i++) { - if (slurm_errtab[i].xe_number == errnum) { - res = slurm_errtab[i].xe_message; - break; - } - } - return res; -} - -extern int switch_p_get_errno(void) -{ - int err = slurm_get_errno(); - - if ((err >= ESLURM_SWITCH_MIN) && (err <= ESLURM_SWITCH_MAX)) - return err; - - return SLURM_SUCCESS; -} - -extern char *switch_p_strerror(int errnum) -{ - char *res = _lookup_slurm_api_errtab(errnum); - return (res ? res : strerror(errnum)); -} - -/* - * node switch state monitoring functions - * required for IBM Federation switch - */ -extern int switch_p_clear_node_state(void) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_alloc_node_info(switch_node_info_t *switch_node) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_build_node_info(switch_node_info_t switch_node) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_pack_node_info(switch_node_info_t switch_node, - Buf buffer) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_unpack_node_info(switch_node_info_t switch_node, - Buf buffer) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_free_node_info(switch_node_info_t *switch_node) -{ - return SLURM_SUCCESS; -} - -extern char*switch_p_sprintf_node_info(switch_node_info_t switch_node, - char *buf, size_t size) -{ - if ((buf != NULL) && size) { - buf[0] = '\0'; - return buf; - } - - return NULL; -} - -extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, - char *nodelist) -{ - qsw_teardown_jobinfo((qsw_jobinfo_t) jobinfo); /* frees hw context */ - - return SLURM_SUCCESS; -} - -extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, - char *nodelist) -{ - return SLURM_SUCCESS; -} - -extern bool switch_p_part_comp(void) -{ - return false; -} - -extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, - char *nodelist) -{ - return qsw_restore_jobinfo((qsw_jobinfo_t) jobinfo); -} - -extern int switch_p_slurmctld_init( void ) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_slurmd_init( void ) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_slurmd_step_init( void ) -{ - return SLURM_SUCCESS; -} diff --git a/src/plugins/switch/federation/Makefile.am b/src/plugins/switch/federation/Makefile.am deleted file mode 100644 index d90112c816..0000000000 --- a/src/plugins/switch/federation/Makefile.am +++ /dev/null @@ -1,32 +0,0 @@ -# Makefile for switch/federation plugin - -CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/federation.conf\" -AUTOMAKE_OPTIONS = foreign - -if HAVE_FEDERATION -federation_lib = switch_federation.la -else -federation_lib = -endif - -PLUGIN_FLAGS = -module -avoid-version --export-dynamic - -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common - -pkglib_LTLIBRARIES = $(federation_lib) - -if HAVE_FEDERATION -# Federation switch plugin. -switch_federation_la_SOURCES = \ - federation.c federation.h \ - federation_keys.h \ - switch_federation.c -switch_federation_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ - $(FEDERATION_LDFLAGS) - -else -EXTRA_switch_federation_la_SOURCES = \ - federation.c federation.h \ - federation_keys.h \ - switch_federation.c -endif diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in deleted file mode 100644 index 7ff088e86d..0000000000 --- a/src/plugins/switch/federation/Makefile.in +++ /dev/null @@ -1,675 +0,0 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - -# Makefile for switch/federation plugin - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -target_triplet = @target@ -subdir = src/plugins/switch/federation -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ - $(top_srcdir)/auxdir/libtool.m4 \ - $(top_srcdir)/auxdir/ltoptions.m4 \ - $(top_srcdir)/auxdir/ltsugar.m4 \ - $(top_srcdir)/auxdir/ltversion.m4 \ - $(top_srcdir)/auxdir/lt~obsolete.m4 \ - $(top_srcdir)/auxdir/slurm.m4 \ - $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ - $(top_srcdir)/auxdir/x_ac_affinity.m4 \ - $(top_srcdir)/auxdir/x_ac_aix.m4 \ - $(top_srcdir)/auxdir/x_ac_blcr.m4 \ - $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ - $(top_srcdir)/auxdir/x_ac_cflags.m4 \ - $(top_srcdir)/auxdir/x_ac_cray.m4 \ - $(top_srcdir)/auxdir/x_ac_databases.m4 \ - $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ - $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ - $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ - $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ - $(top_srcdir)/auxdir/x_ac_iso.m4 \ - $(top_srcdir)/auxdir/x_ac_lua.m4 \ - $(top_srcdir)/auxdir/x_ac_man2html.m4 \ - $(top_srcdir)/auxdir/x_ac_munge.m4 \ - $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ - $(top_srcdir)/auxdir/x_ac_nrt.m4 \ - $(top_srcdir)/auxdir/x_ac_pam.m4 \ - $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ - $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ - $(top_srcdir)/auxdir/x_ac_readline.m4 \ - $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ - $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ - $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ - $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ - $(top_srcdir)/auxdir/x_ac_srun.m4 \ - $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ - $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__installdirs = "$(DESTDIR)$(pkglibdir)" -LTLIBRARIES = $(pkglib_LTLIBRARIES) -switch_federation_la_LIBADD = -am__switch_federation_la_SOURCES_DIST = federation.c federation.h \ - federation_keys.h switch_federation.c -@HAVE_FEDERATION_TRUE@am_switch_federation_la_OBJECTS = federation.lo \ -@HAVE_FEDERATION_TRUE@ switch_federation.lo -am__EXTRA_switch_federation_la_SOURCES_DIST = federation.c \ - federation.h federation_keys.h switch_federation.c -switch_federation_la_OBJECTS = $(am_switch_federation_la_OBJECTS) -switch_federation_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(switch_federation_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_FEDERATION_TRUE@am_switch_federation_la_rpath = -rpath \ -@HAVE_FEDERATION_TRUE@ $(pkglibdir) -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm -depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(switch_federation_la_SOURCES) \ - $(EXTRA_switch_federation_la_SOURCES) -DIST_SOURCES = $(am__switch_federation_la_SOURCES_DIST) \ - $(am__EXTRA_switch_federation_la_SOURCES_DIST) -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTHD_CFLAGS = @AUTHD_CFLAGS@ -AUTHD_LIBS = @AUTHD_LIBS@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -BGL_LOADED = @BGL_LOADED@ -BGQ_LOADED = @BGQ_LOADED@ -BG_INCLUDES = @BG_INCLUDES@ -BG_LDFLAGS = @BG_LDFLAGS@ -BG_L_P_LOADED = @BG_L_P_LOADED@ -BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ -BLCR_HOME = @BLCR_HOME@ -BLCR_LDFLAGS = @BLCR_LDFLAGS@ -BLCR_LIBS = @BLCR_LIBS@ -BLUEGENE_LOADED = @BLUEGENE_LOADED@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CMD_LDFLAGS = @CMD_LDFLAGS@ -CPP = @CPP@ -CPPFLAGS = -DFEDERATION_CONFIG_FILE=\"$(sysconfdir)/federation.conf\" -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ -EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ -FGREP = @FGREP@ -GREP = @GREP@ -GTK_CFLAGS = @GTK_CFLAGS@ -GTK_LIBS = @GTK_LIBS@ -HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ -HAVEPGCONFIG = @HAVEPGCONFIG@ -HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ -HAVE_MAN2HTML = @HAVE_MAN2HTML@ -HAVE_NRT = @HAVE_NRT@ -HAVE_OPENSSL = @HAVE_OPENSSL@ -HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ -HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ -HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ -HWLOC_LIBS = @HWLOC_LIBS@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIB_LDFLAGS = @LIB_LDFLAGS@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAINT = @MAINT@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ -MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ -MUNGE_LIBS = @MUNGE_LIBS@ -MYSQL_CFLAGS = @MYSQL_CFLAGS@ -MYSQL_LIBS = @MYSQL_LIBS@ -NCURSES = @NCURSES@ -NM = @NM@ -NMEDIT = @NMEDIT@ -NRT_CPPFLAGS = @NRT_CPPFLAGS@ -NRT_LDFLAGS = @NRT_LDFLAGS@ -NUMA_LIBS = @NUMA_LIBS@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PAM_DIR = @PAM_DIR@ -PAM_LIBS = @PAM_LIBS@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -PGSQL_CFLAGS = @PGSQL_CFLAGS@ -PGSQL_LIBS = @PGSQL_LIBS@ -PKG_CONFIG = @PKG_CONFIG@ -PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ -PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ -PROCTRACKDIR = @PROCTRACKDIR@ -PROJECT = @PROJECT@ -PTHREAD_CC = @PTHREAD_CC@ -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ -RANLIB = @RANLIB@ -READLINE_LIBS = @READLINE_LIBS@ -REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ -RELEASE = @RELEASE@ -RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ -SED = @SED@ -SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ -SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -SLURMCTLD_PORT = @SLURMCTLD_PORT@ -SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ -SLURMDBD_PORT = @SLURMDBD_PORT@ -SLURMD_PORT = @SLURMD_PORT@ -SLURM_API_AGE = @SLURM_API_AGE@ -SLURM_API_CURRENT = @SLURM_API_CURRENT@ -SLURM_API_MAJOR = @SLURM_API_MAJOR@ -SLURM_API_REVISION = @SLURM_API_REVISION@ -SLURM_API_VERSION = @SLURM_API_VERSION@ -SLURM_MAJOR = @SLURM_MAJOR@ -SLURM_MICRO = @SLURM_MICRO@ -SLURM_MINOR = @SLURM_MINOR@ -SLURM_PREFIX = @SLURM_PREFIX@ -SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ -SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ -SO_LDFLAGS = @SO_LDFLAGS@ -SSL_CPPFLAGS = @SSL_CPPFLAGS@ -SSL_LDFLAGS = @SSL_LDFLAGS@ -SSL_LIBS = @SSL_LIBS@ -STRIP = @STRIP@ -UTIL_LIBS = @UTIL_LIBS@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_have_man2html = @ac_have_man2html@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -lua_CFLAGS = @lua_CFLAGS@ -lua_LIBS = @lua_LIBS@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target = @target@ -target_alias = @target_alias@ -target_cpu = @target_cpu@ -target_os = @target_os@ -target_vendor = @target_vendor@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AUTOMAKE_OPTIONS = foreign -@HAVE_FEDERATION_FALSE@federation_lib = -@HAVE_FEDERATION_TRUE@federation_lib = switch_federation.la -PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common -pkglib_LTLIBRARIES = $(federation_lib) - -# Federation switch plugin. -@HAVE_FEDERATION_TRUE@switch_federation_la_SOURCES = \ -@HAVE_FEDERATION_TRUE@ federation.c federation.h \ -@HAVE_FEDERATION_TRUE@ federation_keys.h \ -@HAVE_FEDERATION_TRUE@ switch_federation.c - -@HAVE_FEDERATION_TRUE@switch_federation_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ -@HAVE_FEDERATION_TRUE@ $(FEDERATION_LDFLAGS) - -@HAVE_FEDERATION_FALSE@EXTRA_switch_federation_la_SOURCES = \ -@HAVE_FEDERATION_FALSE@ federation.c federation.h \ -@HAVE_FEDERATION_FALSE@ federation_keys.h \ -@HAVE_FEDERATION_FALSE@ switch_federation.c - -all: all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ - && { if test -f $@; then exit 0; else break; fi; }; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/switch/federation/Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign src/plugins/switch/federation/Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh - -$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) - cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -$(am__aclocal_m4_deps): -install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ - } - -uninstall-pkglibLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ - done - -clean-pkglibLTLIBRARIES: - -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) - @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -switch_federation.la: $(switch_federation_la_OBJECTS) $(switch_federation_la_DEPENDENCIES) - $(switch_federation_la_LINK) $(am_switch_federation_la_rpath) $(switch_federation_la_OBJECTS) $(switch_federation_la_LIBADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/federation.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch_federation.Plo@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) -installdirs: - for dir in "$(DESTDIR)$(pkglibdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ - mostlyclean-am - -distclean: distclean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-pkglibLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-pkglibLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-pkglibLTLIBRARIES \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: diff --git a/src/plugins/switch/federation/federation.c b/src/plugins/switch/federation/federation.c deleted file mode 100644 index 749b4469df..0000000000 --- a/src/plugins/switch/federation/federation.c +++ /dev/null @@ -1,2629 +0,0 @@ -/*****************************************************************************\ - * federation.c - Library routines for initiating jobs on IBM Federation - ***************************************************************************** - * Copyright (C) 2004-2007 The Regents of the University of California. - * Copyright (C) 2008 Lawrence Livermore National Security. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jason King - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#include -#include -#include - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#if HAVE_LIBNTBL -# include -#else -# error "Must have libntbl to compile this module!" -#endif - -#include - -#include "slurm/slurm_errno.h" -#include "src/common/slurm_xlator.h" -#include "src/common/read_config.h" -#include "src/plugins/switch/federation/federation.h" -#include "src/plugins/switch/federation/federation_keys.h" - -/* - * Definitions local to this module - */ -#define FED_NODEINFO_MAGIC 0xc00cc00d -#define FED_JOBINFO_MAGIC 0xc00cc00e -#define FED_LIBSTATE_MAGIC 0xc00cc00f - -#define FED_ADAPTERNAME_LEN 5 -#define FED_HOSTLEN 20 -#define FED_VERBOSE_PRINT 0 -#define FED_NODECOUNT 128 -#define FED_HASHCOUNT 128 -#define FED_AUTO_WINMEM 0 -#define FED_MAX_WIN 15 -#define FED_MIN_WIN 0 -#define FED_DEBUG 0 - -#define BUFSIZE 4096 - -char* fed_conf = NULL; -extern bool fed_need_state_save; - -mode_t fed_umask; - -/* - * Data structures specific to Federation - * - * We are going to some trouble to keep these defs private so slurm - * hackers not interested in the interconnect details can just pass around - * the opaque types. All use of the data structure internals is local to this - * module. - */ - -typedef struct fed_window { - uint16_t id; - uint32_t status; - uint16_t job_key; -} fed_window_t; - -typedef struct fed_adapter { - char name[FED_ADAPTERNAME_LEN]; - uint16_t lid; - uint16_t network_id; - uint32_t max_winmem; - uint32_t min_winmem; - uint32_t avail_mem; - uint32_t window_count; - fed_window_t *window_list; -} fed_adapter_t; - -struct fed_nodeinfo { - uint32_t magic; - char name[FED_HOSTLEN]; - uint32_t adapter_count; - fed_adapter_t *adapter_list; - struct fed_nodeinfo *next; -}; - -struct fed_libstate { - uint32_t magic; - uint32_t node_count; - uint32_t node_max; - fed_nodeinfo_t *node_list; - uint32_t hash_max; - fed_nodeinfo_t **hash_table; - uint16_t key_index; -}; - -struct fed_jobinfo { - uint32_t magic; - /* version from ntbl_version() */ - /* adapter from lid in table */ - /* network_id from lid in table */ - /* uid from getuid() */ - /* pid from getpid() */ - uint16_t job_key; - char job_desc[DESCLEN]; - uint32_t window_memory; - uint8_t bulk_xfer; /* flag */ - uint16_t tables_per_task; - fed_tableinfo_t *tableinfo; - - hostlist_t nodenames; - int num_tasks; -}; - -typedef struct { - int status_number; - char *status_msg; -} fed_status_t; - -typedef struct { - char name[FED_ADAPTERNAME_LEN]; - uint16_t lid; - uint16_t network_id; -} fed_cache_entry_t; - -/* - * Globals - */ -fed_libstate_t *fed_state = NULL; -pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; - -/* slurmd/slurmstepd global variables */ -hostlist_t adapter_list; -static fed_cache_entry_t lid_cache[FED_MAXADAPTERS]; - - -#define FED_STATUS_UNKNOWN 99 -static fed_status_t fed_status_tab[]= { - {0, "NTBL_SUCCESS"}, - {1, "NTBL_EINVAL"}, - {2, "NTBL_EPERM"}, - {3, "NTBL_EIOCTL"}, - {4, "NTBL_EADAPTER"}, - {5, "NTBL_ESYSTEM"}, - {6, "NTBL_EMEM"}, - {7, "NTBL_ELID"}, - {8, "NTBL_EIO"}, - {9, "NTBL_UNLOADED_STATE"}, - {10, "NTBL_LOADED_STATE"}, - {11, "NTBL_DISABLED_STATE"}, - {12, "NTBL_ACTIVE_STATE"}, - {13, "NTBL_BUSY_STATE"}, - {14, "NTBL_NO_RDMA_AVAIL"}, - {FED_STATUS_UNKNOWN, "UNKNOWN_RESULT_CODE"} -}; - -static void _hash_rebuild(fed_libstate_t *state); -static int _set_up_adapter(fed_adapter_t *fed_adapter, char *adapter_name); -static int _parse_fed_file(hostlist_t *adapter_list); -static void _init_adapter_cache(void); -static int _fill_in_adapter_cache(void); - -/* The _lock() and _unlock() functions are used to lock/unlock a - * global mutex. Used to serialize access to the global library - * state variable fed_state. - */ -static void -_lock(void) -{ - int err = 1; - - while(err) { - err = pthread_mutex_lock(&global_lock); - } -} - -static void -_unlock(void) -{ - int err = 1; - - while(err) { - err = pthread_mutex_unlock(&global_lock); - } -} - -int -fed_slurmctld_init(void) -{ - return SLURM_SUCCESS; -} - -int -fed_slurmd_init(void) -{ - /* - * This is a work-around for the ntbl_* functions calling umask(0) - */ - fed_umask = umask(0077); - umask(fed_umask); - - /*_init_adapter_cache();*/ - - adapter_list = hostlist_create(NULL); - if (_parse_fed_file(&adapter_list) != SLURM_SUCCESS) - return SLURM_FAILURE; - assert(hostlist_count(adapter_list) <= FED_MAXADAPTERS); - return SLURM_SUCCESS; -} - -int -fed_slurmd_step_init(void) -{ - /* - * This is a work-around for the ntbl_* functions calling umask(0) - */ - fed_umask = umask(0077); - umask(fed_umask); - - _init_adapter_cache(); - - adapter_list = hostlist_create(NULL); - if (_parse_fed_file(&adapter_list) != SLURM_SUCCESS) - return SLURM_FAILURE; - assert(hostlist_count(adapter_list) <= FED_MAXADAPTERS); - - _fill_in_adapter_cache(); - - return SLURM_SUCCESS; -} - -static char * -_lookup_fed_status_tab(int status) -{ - char *res = NULL; - int i; - - for(i = 0; i < sizeof(fed_status_tab) / sizeof(fed_status_t); i++) { - if(fed_status_tab[i].status_number == status) { - res = fed_status_tab[i].status_msg; - break; - } - } - - if(!res) - res = fed_status_tab[FED_STATUS_UNKNOWN].status_msg; - - return res; -} - -/* Used by: slurmd, slurmctld */ -void fed_print_jobinfo(FILE *fp, fed_jobinfo_t *jobinfo) -{ - assert(jobinfo->magic == FED_JOBINFO_MAGIC); - - /* stubbed out */ -} - -/* Used by: slurmd, slurmctld */ -char *fed_sprint_jobinfo(fed_jobinfo_t *j, char *buf, - size_t size) -{ - int count; - char *tmp = buf; - int remaining = size; - - assert(buf); - assert(j); - assert(j->magic == FED_JOBINFO_MAGIC); - - count = snprintf(tmp, remaining, - "--Begin Jobinfo--\n" - " job_key: %u\n" - " job_desc: %s\n" - " window_memory: %u\n" - " table_size: %u\n" - "--End Jobinfo--\n", - j->job_key, - j->job_desc, - j->window_memory, - j->tables_per_task); - if(count < 0) - return buf; - remaining -= count; - tmp += count; - if(remaining < 1) - return buf; - - return buf; -} - -/* The lid caching functions were created to avoid unnecessary - * function calls each time we need to load network tables on a node. - * _init_cache() simply initializes the cache to sane values and - * needs to be called before any other cache functions are called. - * - * Used by: slurmd/slurmstepd - */ -static void -_init_adapter_cache(void) -{ - int i; - - for(i = 0; i < FED_MAXADAPTERS; i++) { - lid_cache[i].name[0] = 0; - lid_cache[i].lid = -1; - lid_cache[i].network_id = -1; - } -} - -/* Use ntbl_adapter_resources to cache information about local adapters. - * - * Used by: slurmstepd - */ -static int -_fill_in_adapter_cache(void) -{ - hostlist_iterator_t adapters; - char *adapter_name = NULL; - ADAPTER_RESOURCES res; - int num; - int rc; - int i; - - adapters = hostlist_iterator_create(adapter_list); - for (i = 0; (adapter_name = hostlist_next(adapters)); i++) { - rc = ntbl_adapter_resources(NTBL_VERSION, adapter_name, &res); - if (rc != NTBL_SUCCESS) - return SLURM_ERROR; - - num = adapter_name[3] - (int)'0'; - assert(num < FED_MAXADAPTERS); - lid_cache[num].lid = res.lid; - lid_cache[num].network_id = res.network_id; - strncpy(lid_cache[num].name, adapter_name, FED_ADAPTERNAME_LEN); - - free(res.window_list); - free(adapter_name); - } - hostlist_iterator_destroy(adapters); - umask(fed_umask); - - return SLURM_SUCCESS; -} - - -/* Cache the lid and network_id of a given adapter. Ex: sni0 with lid 10 - * gets cached in array index 0 with a lid = 10 and a name = sni0. - * - * Used by: slurmd - */ -static void -_cache_lid(fed_adapter_t *ap) -{ - assert(ap); - - int adapter_num = ap->name[3] - (int) '0'; - - lid_cache[adapter_num].lid = ap->lid; - lid_cache[adapter_num].network_id = ap->network_id; - strncpy(lid_cache[adapter_num].name, ap->name, FED_ADAPTERNAME_LEN); -} - - -/* Check lid cache for an adapter name and return the network id. - * - * Used by: slurmd - */ -static uint16_t -_get_network_id_from_adapter(char *adapter_name) -{ - int i; - - for (i = 0; i < FED_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].name, - FED_ADAPTERNAME_LEN)) - return lid_cache[i].network_id; - } - - return (uint16_t) -1; -} - - -/* Check lid cache for an adapter name and return the lid. - * - * Used by: slurmd - */ -static uint16_t -_get_lid_from_adapter(char *adapter_name) -{ - int i; - - for (i = 0; i < FED_MAXADAPTERS; i++) { - if (!strncmp(adapter_name, lid_cache[i].name, - FED_ADAPTERNAME_LEN)) - return lid_cache[i].lid; - } - - return (uint16_t) -1; -} - - -static int _set_up_adapter(fed_adapter_t *fed_adapter, char *adapter_name) -{ - ADAPTER_RESOURCES res; - struct NTBL_STATUS *status = NULL; - struct NTBL_STATUS *old = NULL; - fed_window_t *tmp_winlist = NULL; - int win_count = 0, i; - int error_code; - - info("adapter_name is %s", adapter_name); - - error_code = ntbl_adapter_resources(NTBL_VERSION, - adapter_name, - &res); - if(error_code != NTBL_SUCCESS) - return SLURM_ERROR; - strncpy(fed_adapter->name, - adapter_name, - FED_ADAPTERNAME_LEN); - fed_adapter->lid = res.lid; - fed_adapter->network_id = res.network_id; - /* FUTURE: check that we don't lose information when converting - * from 64 to 32 bit unsigned ints in the next three assignments. - */ - fed_adapter->max_winmem = res.max_window_memory; - fed_adapter->min_winmem = res.min_window_memory; - fed_adapter->avail_mem = res.avail_adapter_memory; - fed_adapter->window_count = res.window_count; - free(res.window_list); - _cache_lid(fed_adapter); - error_code = ntbl_status_adapter(NTBL_VERSION, - adapter_name, - &win_count, - &status); - umask(fed_umask); - if(error_code) - slurm_seterrno_ret(ESTATUS); - tmp_winlist = (fed_window_t *)xmalloc(sizeof(fed_window_t) * - res.window_count); - if(!tmp_winlist) - slurm_seterrno_ret(ENOMEM); - for(i = 0; i < res.window_count; i++) { - tmp_winlist[i].id = status->window_id; - tmp_winlist[i].status = status->rc; - old = status; - status = status->next; - free(old); - } - fed_adapter->window_list = tmp_winlist; - return SLURM_SUCCESS; -} - -static char *_get_fed_conf(void) -{ - char *val = getenv("SLURM_CONF"); - char *rc; - int i; - - if (!val) - return xstrdup(FEDERATION_CONFIG_FILE); - - /* Replace file name on end of path */ - i = strlen(val) - strlen("slurm.conf") + strlen("federation.conf") + 1; - rc = xmalloc(i); - strcpy(rc, val); - val = strrchr(rc, (int)'/'); - if (val) /* absolute path */ - val++; - else /* not absolute path */ - val = rc; - strcpy(val, "federation.conf"); - return rc; -} - -static int _parse_fed_file(hostlist_t *adapter_list) -{ - s_p_options_t options[] = {{"AdapterName", S_P_STRING}, {NULL}}; - s_p_hashtbl_t *tbl; - char *adapter_name; - - debug("Reading the federation.conf file"); - if (!fed_conf) - fed_conf = _get_fed_conf(); - - tbl = s_p_hashtbl_create(options); - if(s_p_parse_file(tbl, NULL, fed_conf, false) == SLURM_ERROR) - fatal("something wrong with opening/reading federation " - "conf file"); - - if (s_p_get_string(&adapter_name, "AdapterName", tbl)) { - int rc; - rc = hostlist_push(*adapter_list, adapter_name); - if (rc == 0) - error("Adapter name format is incorrect."); - xfree(adapter_name); - } - - s_p_hashtbl_destroy(tbl); - - return SLURM_SUCCESS; -} - -/* Check for existence of sniX, where X is from 0 to FED_MAXADAPTERS. - * For all that exist, record vital adapter info plus status for all windows - * available on that adapter. Cache lid to adapter name mapping locally. - * - * Used by: slurmd - */ -static int -_get_adapters(fed_adapter_t *list, int *count) -{ - hostlist_iterator_t adapter_iter; - char *adapter = NULL; - int i; - - assert(list != NULL); - assert(adapter_list != NULL); - - adapter_iter = hostlist_iterator_create(adapter_list); - for (i = 0; (adapter = hostlist_next(adapter_iter)); i++) { - if(_set_up_adapter(list + i, adapter) == SLURM_ERROR) - fatal("Failed to set up adapter %s.", adapter); - free(adapter); - } - hostlist_iterator_destroy(adapter_iter); - - assert(i > 0); - *count = i; - info("Number of adapters is = %d", *count); - - if(!*count) - slurm_seterrno_ret(ENOADAPTER); - - return 0; -} - -/* Used by: slurmd, slurmctld */ -int -fed_alloc_jobinfo(fed_jobinfo_t **j) -{ - fed_jobinfo_t *new; - - assert(j != NULL); - new = (fed_jobinfo_t *)xmalloc(sizeof(fed_jobinfo_t)); - if (!new) - slurm_seterrno_ret(ENOMEM); - new->magic = FED_JOBINFO_MAGIC; - new->job_key = -1; - new->window_memory = 0; - new->tables_per_task = 0; - new->tableinfo = NULL; - *j = new; - - return 0; -} - -/* Used by: slurmd, slurmctld */ -int -fed_alloc_nodeinfo(fed_nodeinfo_t **n) -{ - fed_nodeinfo_t *new; - - assert(n); - - new = (fed_nodeinfo_t *)xmalloc(sizeof(fed_nodeinfo_t)); - if(!new) - slurm_seterrno_ret(ENOMEM); - new->adapter_list = (fed_adapter_t *)xmalloc(sizeof(fed_adapter_t) - * FED_MAXADAPTERS); - if(!new->adapter_list) { - xfree(new); - slurm_seterrno_ret(ENOMEM); - } - new->magic = FED_NODEINFO_MAGIC; - new->adapter_count = 0; - new->next = NULL; - - *n = new; - - return 0; -} - -/* Assumes a pre-allocated nodeinfo structure and uses _get_adapters - * to do the dirty work. We probably collect more information about - * the adapters on a give node than we need to but it was done - * in the interest of being prepared for future requirements. - * - * Used by: slurmd - */ -int -fed_build_nodeinfo(fed_nodeinfo_t *n, char *name) -{ - int count; - int err; - - assert(n); - assert(n->magic == FED_NODEINFO_MAGIC); - assert(name); - - strncpy(n->name, name, FED_HOSTLEN); - _lock(); - err = _get_adapters(n->adapter_list, &count); - _unlock(); - if(err != 0) - return err; - n->adapter_count = count; - return 0; -} -#if FED_DEBUG -static int -_print_adapter_resources(ADAPTER_RESOURCES *r, char *buf, size_t size) -{ - int count; - - assert(r); - assert(buf); - assert(size > 0); - - count = snprintf(buf, size, - "--Begin Adapter Resources--\n" - " device_type = %x\n" - " lid = %d\n" - " network_id = %d\n" - " max_window_memory = %lld\n" - " min_window_memory = %lld\n" - " avail_adapter_memory = %lld\n" - " fifo_slot_size = %lld\n" - " window_count = %d\n" - " window_list = %d\n" -#if NTBL_VERSION == 120 - " reserved = %lld\n" -#else - " rcontext_block_count = %lld\n" -#endif - "--End Adapter Resources--\n", - r->device_type, - r->lid, - r->network_id, - r->max_window_memory, - r->min_window_memory, - r->avail_adapter_memory, - r->fifo_slot_size, - r->window_count, - r->window_list[0], -#if NTBL_VERSION == 120 - r->reserved); -#else - r->rcontext_block_count); -#endif - - return count; -} - -static int -_print_window_status(struct NTBL_STATUS *s, char *buf, size_t size) -{ - int count; - - assert(s); - assert(buf); - assert(size > 0); - - switch(s->rc) { - case NTBL_UNLOADED_STATE: - count = snprintf(buf, size, -#if FED_VERBOSE_PRINT - "--Begin NTBL Status For Window %d on %s--\n" - " window_id = %u\n" - " adapter = %s\n" - " return code = %s\n" - "--End NTBL Status For Window %d on %s--\n", - s->window_id, s->adapter, - s->window_id, - s->adapter, - _lookup_fed_status_tab(s->rc), - s->window_id, s->adapter); -#else - "window %u on %s: %s\n", - s->window_id, s->adapter, - _lookup_fed_status_tab(s->rc)); -#endif - break; - case NTBL_LOADED_STATE: - case NTBL_DISABLED_STATE: - case NTBL_ACTIVE_STATE: - case NTBL_BUSY_STATE: - count = snprintf(buf, size, -#if FED_VERBOSE_PRINT - "--Begin NTBL Status For Window %d on %s--\n" - " user_name = %s\n" - " client_pid = %d\n" - " uid = %d\n" - " window_id = %u\n" - " adapter = %s\n" - " memory_requested = %llu\n" - " memory_allocated = %llu\n" - " time_loaded = %s\n" - " description = %s\n" - " return code = %s\n" - "--End NTBL Status For Window %d on %s--\n", - s->window_id, s->adapter, - s->user_name, - s->client_pid, - s->uid, - s->window_id, - s->adapter, - s->memory_requested, - s->memory_allocated, - s->time_loaded, - s->description, - _lookup_fed_status_tab(s->rc), - s->window_id, s->adapter); -#else - "window %u on %s: %s\n", - s->window_id, s->adapter, - _lookup_fed_status_tab(s->rc)); -#endif - break; - default: - count = snprintf(buf, size, - "Uknown NTBL Return Code For Window %d: %s\n", - s->window_id, - _lookup_fed_status_tab(s->rc)); - } - - return count; -} -#endif -static int -_print_window_struct(fed_window_t *w, char *buf, size_t size) -{ - int count; - - assert(w); - assert(buf); - assert(size > 0); - - - count = snprintf(buf, size, - " Window %u: %s\n", - w->id, - _lookup_fed_status_tab(w->status)); - - return count; -} - -/* Writes out nodeinfo structure to a buffer. Maintains the - * snprintf semantics by only filling the buffer up to the value - * of size. If FED_VERBOSE_PRINT is defined this function will - * dump the entire structure, otherwise only the "useful" part. - * - * Used by: slurmd, slurmctld - */ -char * -fed_print_nodeinfo(fed_nodeinfo_t *n, char *buf, size_t size) -{ - fed_adapter_t *a; - int i,j; - fed_window_t *w; - int remaining = size; - int count; - char *tmp = buf; - - assert(n); - assert(buf); - assert(size > 0); - assert(n->magic == FED_NODEINFO_MAGIC); - - count = snprintf(tmp, remaining, - "Node: %s\n", - n->name); - if(count < 0) - return buf; - remaining -= count; - tmp += count; - if(remaining < 1) - return buf; - for(i = 0; i < n->adapter_count; i++) { - a = n->adapter_list + i; - count = snprintf(tmp, remaining, -#if FED_VERBOSE_PRINT - " Adapter: %s\n" - " lid: %u\n" - " network_id: %u\n" - " max_window_memory: %u\n" - " min_window_memory: %u\n" - " avail_adapter_memory: %u\n" - " window_count: %u\n", - a->name, - a->lid, - a->network_id, - a->max_winmem, - a->min_winmem, - a->avail_mem, - a->window_count); -#else - " Adapter: %s\n" - " Window count: %d\n" - " Active windows:\n", - a->name, - a->window_count); -#endif - if(count < 0) - return buf; - remaining -= count; - tmp += count; - if(remaining < 1) - return buf; - - w = a->window_list; - for(j = 0; j < a->window_count; j++) { -#if FED_VERBOSE_PRINT - count = _print_window_struct(&w[j], tmp, remaining); -#else - - if(w[j].status != NTBL_UNLOADED_STATE) - count = _print_window_struct(&w[j], tmp, - remaining); - else - count = 0; -#endif - if(count < 0) - return buf; - remaining -= count; - tmp += count; - if(remaining < 1) - return buf; - } - } - - return buf; -} - -/* Note that when collecting max_winmem, min_winmem and avail_mem - * we convert these values from 64 to 32 bit unisgned integers. This - * was to make the pack/unpack implementation easier. I am taking a - * chance here that IBM will not release Federation adapters with more - * than 4GB of memory. - * - * Used by: all - */ -int -fed_pack_nodeinfo(fed_nodeinfo_t *n, Buf buf) -{ - int i,j; - fed_adapter_t *a; - int offset; - - assert(n); - assert(n->magic == FED_NODEINFO_MAGIC); - assert(buf); - - offset = get_buf_offset(buf); - pack32(n->magic, buf); - packmem(n->name, FED_HOSTLEN, buf); - pack32(n->adapter_count, buf); - for(i = 0; i < n->adapter_count; i++) { - a = n->adapter_list + i; - packmem(a->name, FED_ADAPTERNAME_LEN, buf); - pack16(a->lid, buf); - pack16(a->network_id, buf); - pack32(a->max_winmem, buf); - pack32(a->min_winmem, buf); - pack32(a->avail_mem, buf); - pack32(a->window_count, buf); - for(j = 0; j < a->window_count; j++) { - pack16(a->window_list[j].id, buf); - pack32(a->window_list[j].status, buf); - pack16(a->window_list[j].job_key, buf); - } - } - - return(get_buf_offset(buf) - offset); -} - -/* Used by: all */ -static int -_copy_node(fed_nodeinfo_t *dest, fed_nodeinfo_t *src) -{ - int i,j; - fed_adapter_t *sa = NULL; - fed_adapter_t *da = NULL; - - assert(dest); - assert(src); - assert(dest->magic == FED_NODEINFO_MAGIC); - assert(src->magic == FED_NODEINFO_MAGIC); - - strncpy(dest->name, src->name, FED_HOSTLEN); - dest->adapter_count = src->adapter_count; - for(i = 0; i < dest->adapter_count; i++) { - sa = src->adapter_list + i; - da = dest->adapter_list +i; - strncpy(da->name, sa->name, FED_ADAPTERNAME_LEN); - da->lid = sa->lid; - da->network_id = sa->network_id; - da->max_winmem = sa->max_winmem; - da->min_winmem = sa->min_winmem; - da->avail_mem = sa->avail_mem; - da->window_count = sa->window_count; - da->window_list = (fed_window_t *)xmalloc(sizeof(fed_window_t) * - da->window_count); - if(!da->window_list) { - slurm_seterrno_ret(ENOMEM); - } - for(j = 0; j < da->window_count; j++) - da->window_list[j] = sa->window_list[j]; - } - - return SLURM_SUCCESS; -} - -/* The idea behind keeping the hash table was to avoid a linear - * search of the node list each time we want to retrieve or - * modify a node's data. The _hash_index function translates - * a node name to an index into the hash table. - * - * Used by: slurmctld - */ -static int -_hash_index (char *name) -{ - int index = 0; - int j; - - assert(name); - - /* Multiply each character by its numerical position in the - * name string to add a bit of entropy, because host names such - * as cluster[0001-1000] can cause excessive index collisions. - */ - for (j = 1; *name; name++, j++) - index += (int)*name * j; - index %= fed_state->hash_max; - - return index; -} - -/* Tries to find a node fast using the hash table - * - * Used by: slurmctld - */ -static fed_nodeinfo_t * -_find_node(fed_libstate_t *lp, char *name) -{ - int i; - fed_nodeinfo_t *n; - - assert(name); - assert(lp); - - if (lp->node_count == 0) - return NULL; - - if (lp->hash_table) { - i = _hash_index(name); - n = lp->hash_table[i]; - while(n) { - assert(n->magic == FED_NODEINFO_MAGIC); - if(!strncmp(n->name, name, FED_HOSTLEN)) - return n; - n = n->next; - } - } - - return NULL; -} - -/* Add the hash entry for a newly created fed_nodeinfo_t - */ -static void -_hash_add_nodeinfo(fed_libstate_t *state, fed_nodeinfo_t *node) -{ - int index; - - assert(state); - assert(state->hash_table); - assert(state->hash_max >= state->node_count); - if(!strlen(node->name)) - return; - index = _hash_index(node->name); - node->next = state->hash_table[index]; - state->hash_table[index] = node; -} - -/* Recreates the hash table for the node list. - * - * Used by: slurmctld - */ -static void -_hash_rebuild(fed_libstate_t *state) -{ - int i; - - assert(state); - - if(state->hash_table) - xfree(state->hash_table); - if (state->node_count > state->hash_max || state->hash_max == 0) - state->hash_max += FED_HASHCOUNT; - state->hash_table = (fed_nodeinfo_t **) - xmalloc(sizeof(fed_nodeinfo_t *) * state->hash_max); - memset(state->hash_table, 0, - sizeof(fed_nodeinfo_t *) * state->hash_max); - for(i = 0; i < state->node_count; i++) - _hash_add_nodeinfo(state, &(state->node_list[i])); -} - -/* If the node is already in the node list then simply return - * a pointer to it, otherwise dynamically allocate memory to the - * node list if necessary. - * - * Used by: slurmctld - */ -static fed_nodeinfo_t * -_alloc_node(fed_libstate_t *lp, char *name) -{ - fed_nodeinfo_t *n = NULL; - int new_bufsize; - bool need_hash_rebuild = false; - - assert(lp); - - if(name != NULL) { - n = _find_node(lp, name); - if(n != NULL) - return n; - } - - fed_need_state_save = true; - - if(lp->node_count >= lp->node_max) { - lp->node_max += FED_NODECOUNT; - new_bufsize = lp->node_max * sizeof(fed_nodeinfo_t); - if(lp->node_list == NULL) - lp->node_list = (fed_nodeinfo_t *)xmalloc(new_bufsize); - else - lp->node_list = (fed_nodeinfo_t *)xrealloc(lp->node_list, - new_bufsize); - need_hash_rebuild = true; - } - if(lp->node_list == NULL) { - slurm_seterrno(ENOMEM); - return NULL; - } - - n = lp->node_list + (lp->node_count++); - n->magic = FED_NODEINFO_MAGIC; - n->name[0] = '\0'; - n->adapter_list = (fed_adapter_t *)xmalloc(FED_MAXADAPTERS * - sizeof(fed_adapter_t)); - - if(name != NULL) { - strncpy(n->name, name, FED_HOSTLEN); - if (need_hash_rebuild || lp->node_count > lp->hash_max) - _hash_rebuild(lp); - else - _hash_add_nodeinfo(lp, n); - } - - return n; -} -#if FED_DEBUG -/* Used by: slurmctld */ -static void -_print_libstate(const fed_libstate_t *l) -{ - int i; - char buf[3000]; - - assert(l); - - printf("--Begin libstate--\n"); - printf(" magic = %u\n", l->magic); - printf(" node_count = %u\n", l->node_count); - printf(" node_max = %u\n", l->node_max); - printf(" hash_max = %u\n", l->hash_max); - for(i = 0; i < l->node_count; i++) { - memset(buf, 0, 3000); - fed_print_nodeinfo(&l->node_list[i], buf, 3000); - printf("%s", buf); - } - printf("--End libstate--\n"); -} -#endif - - -/* Throw away adapter portion of the nodeinfo. - * - * Used by: _unpack_nodeinfo - */ -static int _fake_unpack_adapters(Buf buf) -{ - uint32_t adapter_count; - uint32_t window_count; - uint32_t dummy32; - uint16_t dummy16; - char *dummyptr; - int i, j; - - safe_unpack32(&adapter_count, buf); - for (i = 0; i < adapter_count; i++) { - /* no copy, just advances buf counters */ - safe_unpackmem_ptr(&dummyptr, &dummy32, buf); - if (dummy32 != FED_ADAPTERNAME_LEN) - goto unpack_error; - safe_unpack16(&dummy16, buf); - safe_unpack16(&dummy16, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&dummy32, buf); - safe_unpack32(&window_count, buf); - for (j = 0; j < window_count; j++) { - safe_unpack16(&dummy16, buf); - safe_unpack32(&dummy32, buf); - safe_unpack16(&dummy16, buf); - } - } - - return SLURM_SUCCESS; - -unpack_error: - return SLURM_ERROR; -} - - -/* Unpack nodeinfo and update persistent libstate. - * - * If believe_window_status is true, we honor the window status variables - * from the packed fed_nodeinfo_t. If it is false we set the status of - * all windows to NTBL_UNLOADED_STATE. - * - * Used by: slurmctld - */ -static int -_unpack_nodeinfo(fed_nodeinfo_t *n, Buf buf, bool believe_window_status) -{ - int i, j; - fed_adapter_t *tmp_a = NULL; - fed_window_t *tmp_w = NULL; - uint32_t size; - fed_nodeinfo_t *tmp_n = NULL; - char *name_ptr, name[FED_HOSTLEN]; - int magic; - - /* NOTE! We don't care at this point whether n is valid. - * If it's NULL, we will just forego the copy at the end. - */ - assert(buf); - - /* Extract node name from buffer - */ - safe_unpack32(&magic, buf); - if(magic != FED_NODEINFO_MAGIC) - slurm_seterrno_ret(EBADMAGIC_FEDNODEINFO); - safe_unpackmem_ptr(&name_ptr, &size, buf); - if(size != FED_HOSTLEN) - goto unpack_error; - memcpy(name, name_ptr, size); - - /* When the slurmctld is in normal operating mode (NOT backup mode), - * the global fed_state structure should NEVER be NULL at the time that - * this function is called. Therefore, if fed_state is NULL here, - * we assume that the controller is in backup mode. In backup mode, - * the slurmctld only unpacks RPCs to find out their identity. - * Most of the RPCs, including the one calling this function, are - * simply ignored. - * - * So, here we just do a fake unpack to advance the buffer pointer. - */ - if (fed_state == NULL) { - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { - slurm_seterrno_ret(EUNPACK); - } else { - return SLURM_SUCCESS; - } - } - - /* If we already have nodeinfo for this node, we ignore this message. - * The slurmctld's view of window allocation is always better than - * the slurmd's view. We only need the slurmd's view if the slurmctld - * has no nodeinfo at all for that node. - */ - if (name != NULL) { - tmp_n = _find_node(fed_state, name); - if (tmp_n != NULL) { - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { - slurm_seterrno_ret(EUNPACK); - } else { - goto copy_node; - } - } - } - - /* Update global libstate with this nodes' info. - */ - tmp_n = _alloc_node(fed_state, name); - if(tmp_n == NULL) - return SLURM_ERROR; - tmp_n->magic = magic; - safe_unpack32(&tmp_n->adapter_count, buf); - for(i = 0; i < tmp_n->adapter_count; i++) { - tmp_a = tmp_n->adapter_list + i; - safe_unpackmem_ptr(&name_ptr, &size, buf); - if(size != FED_ADAPTERNAME_LEN) - goto unpack_error; - memcpy(tmp_a->name, name_ptr, size); - safe_unpack16(&tmp_a->lid, buf); - safe_unpack16(&tmp_a->network_id, buf); - safe_unpack32(&tmp_a->max_winmem, buf); - safe_unpack32(&tmp_a->min_winmem, buf); - safe_unpack32(&tmp_a->avail_mem, buf); - safe_unpack32(&tmp_a->window_count, buf); - tmp_w = (fed_window_t *)xmalloc(sizeof(fed_window_t) * - tmp_a->window_count); - if(!tmp_w) - slurm_seterrno_ret(ENOMEM); - for(j = 0; j < tmp_a->window_count; j++) { - safe_unpack16(&tmp_w[j].id, buf); - safe_unpack32(&tmp_w[j].status, buf); - safe_unpack16(&tmp_w[j].job_key, buf); - if (!believe_window_status) { - tmp_w[j].status = NTBL_UNLOADED_STATE; - tmp_w[j].job_key = 0; - } - } - tmp_a->window_list = tmp_w; - tmp_w = NULL; /* don't free on unpack error of next adapter */ - } - -copy_node: - /* Only copy the node_info structure if the caller wants it */ - if(n != NULL) - if(_copy_node(n, tmp_n) != SLURM_SUCCESS) - return SLURM_ERROR; - -#if FED_DEBUG - _print_libstate(fed_state); -#endif - - return SLURM_SUCCESS; - -unpack_error: - xfree(tmp_w); - slurm_seterrno_ret(EUNPACK); -} - -/* Unpack nodeinfo and update persistent libstate. - * - * Used by: slurmctld - */ -int -fed_unpack_nodeinfo(fed_nodeinfo_t *n, Buf buf) -{ - int rc; - - _lock(); - rc = _unpack_nodeinfo(n, buf, false); - _unlock(); - return rc; -} - - -/* Used by: slurmd, slurmctld */ -void -fed_free_nodeinfo(fed_nodeinfo_t *n, bool ptr_into_array) -{ - fed_adapter_t *adapter; - int i; - - if(!n) - return; - - assert(n->magic == FED_NODEINFO_MAGIC); - - if(n->adapter_list) { - adapter = n->adapter_list; - for (i = 0; i < n->adapter_count; i++) { - xfree(adapter[i].window_list); - } - xfree(n->adapter_list); - } - if (!ptr_into_array) - xfree(n); -} - -/* Assign a unique key to each job. The key is used later to - * gain access to the network table loaded on each node of a job. - * - * Federation documentation states that the job key must be greater - * than 0 and less than 0xFFF0. - * - * Used by: slurmctld - */ -static uint16_t -_next_key(void) -{ - uint16_t key; - - assert(fed_state); - - _lock(); - key = fed_state->key_index % 0xFFF0; - if (key == 0) - key++; - fed_state->key_index = key + 1; - _unlock(); - - return key; -} - -/* FIXME - this could be a little smarter than walking the whole list each time */ -static fed_window_t * -_find_free_window(fed_adapter_t *adapter) { - int i; - fed_window_t *window; - - for (i = FED_MIN_WIN; i < adapter->window_count; i++) { - window = &adapter->window_list[i]; - if (window->status == NTBL_UNLOADED_STATE) - return window; - } - - return (fed_window_t *) NULL; -} - - -static fed_window_t * -_find_window(fed_adapter_t *adapter, int window_id) { - int i; - fed_window_t *window; - - for (i = FED_MIN_WIN; i < adapter->window_count; i++) { - window = &adapter->window_list[i]; - if (window->id == window_id) - return window; - } - - debug3("Unable to _find_window %d on adapter %s", - window_id, adapter->name); - return (fed_window_t *) NULL; -} - - -/* For a given process, fill out an NTBL - * struct (an array of these makes up the network table loaded - * for each job). Assign adapters, lids and switch windows to - * each task in a job. - * - * Used by: slurmctld - */ -static int -_allocate_windows_all(int adapter_cnt, fed_tableinfo_t *tableinfo, - char *hostname, int task_id, uint16_t job_key) -{ - fed_nodeinfo_t *node; - fed_adapter_t *adapter; - fed_window_t *window; - NTBL *table; - int i; - - assert(tableinfo); - assert(hostname); - - node = _find_node(fed_state, hostname); - if(node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - - /* Reserve a window on each adapter for this task */ - for (i = 0; i < adapter_cnt; i++) { - adapter = &node->adapter_list[i]; - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->name); - return SLURM_ERROR; - } - window->status = NTBL_LOADED_STATE; - window->job_key = job_key; - - table = tableinfo[i].table[task_id]; - table->task_id = task_id; - table->lid = adapter->lid; - table->window_id = window->id; - - strncpy(tableinfo[i].adapter_name, adapter->name, - FED_ADAPTERNAME_LEN); - } - - return SLURM_SUCCESS; -} - - -/* For a given process, fill out an NTBL - * struct (an array of these makes up the network table loaded - * for each job). Assign a single adapter, lid and switch window to - * a task in a job. - * - * Used by: slurmctld - */ -static int -_allocate_window_single(char *adapter_name, fed_tableinfo_t *tableinfo, - char *hostname, int task_id, uint16_t job_key) -{ - fed_nodeinfo_t *node; - fed_adapter_t *adapter = NULL; - fed_window_t *window; - NTBL *table; - int i; - - assert(tableinfo); - assert(hostname); - - debug("in _allocate_window_single"); - node = _find_node(fed_state, hostname); - if(node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - - /* find the adapter */ - for (i = 0; i < node->adapter_count; i++) { - debug("adapter %s at index %d", node->adapter_list[i].name, i); - if (strcasecmp(node->adapter_list[i].name, adapter_name) - == 0) { - adapter = &node->adapter_list[i]; - debug("Found adapter %s", adapter_name); - break; - } - } - if (adapter == NULL) { - error("Failed to find adapter %s on node %s", - adapter_name, hostname); - return SLURM_ERROR; - } - - /* Reserve a window on the adapter for this task */ - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->name); - return SLURM_ERROR; - } - window->status = NTBL_LOADED_STATE; - window->job_key = job_key; - - table = tableinfo[0].table[task_id]; - table->task_id = task_id; - table->lid = adapter->lid; - table->window_id = window->id; - - strncpy(tableinfo[0].adapter_name, adapter_name, - FED_ADAPTERNAME_LEN); - - return SLURM_SUCCESS; -} - - -/* Find the correct NTBL structs and set the state - * of the switch windows for the specified task_id. - * - * Used by: slurmctld - */ -static int -_window_state_set(int adapter_cnt, fed_tableinfo_t *tableinfo, - char *hostname, int task_id, enum NTBL_RC state, - uint16_t job_key) -{ - fed_nodeinfo_t *node = NULL; - fed_adapter_t *adapter = NULL; - fed_window_t *window = NULL; - NTBL *table = NULL; - int i, j; - bool adapter_found; - - assert(tableinfo); - assert(hostname); - assert(adapter_cnt <= FED_MAXADAPTERS); - - node = _find_node(fed_state, hostname); - if (node == NULL) { - error("Failed to find node in node_list: %s", hostname); - return SLURM_ERROR; - } - if (node->adapter_list == NULL) { - error("Found node, but adapter_list is NULL"); - return SLURM_ERROR; - } - - for (i = 0; i < adapter_cnt; i++) { - if (tableinfo[i].table == NULL) { - error("tableinfo[%d].table is NULL", i); - return SLURM_ERROR; - } - table = tableinfo[i].table[task_id]; - if (table == NULL) { - error("tableinfo[%d].table[%d] is NULL", i, task_id); - return SLURM_ERROR; - } - - adapter_found = false; - /* Find the adapter that matches the one in tableinfo */ - for (j = 0; j < node->adapter_count; j++) { - adapter = &node->adapter_list[j]; - if (strcasecmp(adapter->name, - tableinfo[i].adapter_name) == 0 - && adapter->lid == table->lid) { - adapter_found = true; - break; - } - } - if (!adapter_found) { - if (table->lid != 0) - error("Did not find the correct adapter: " - "%hu vs. %hu", - adapter->lid, table->lid); - return SLURM_ERROR; - } - - debug3("Setting status %s adapter %s, " - "lid %hu, window %hu for task %d", - state == NTBL_UNLOADED_STATE ? "UNLOADED" : "LOADED", - adapter->name, - table->lid, table->window_id, task_id); - window = _find_window(adapter, table->window_id); - if (window) { - window->status = state; - window->job_key = - (state == NTBL_UNLOADED_STATE) ? 0 : job_key; - } - } - - return SLURM_SUCCESS; -} - - -#if FED_DEBUG -/* Used by: all */ -static void -_print_table(NTBL **table, int size) -{ - int i; - - assert(table); - assert(size > 0); - - printf("--Begin NTBL table--\n"); - for(i = 0; i < size; i++) { - printf(" task_id: %u\n", table[i]->task_id); - printf(" window_id: %u\n", table[i]->window_id); - printf(" lid: %u\n", table[i]->lid); - } - printf("--End NTBL table--\n"); -} - -/* Used by: all */ -static void -_print_index(char *index, int size) -{ - int i; - - assert(index); - assert(size > 0); - - printf("--Begin lid index--\n"); - for(i = 0; i < size; i++) { - printf(" task_id: %u\n", i); - printf(" name: %s\n", index + (i * FED_ADAPTERNAME_LEN)); - } - printf("--End lid index--\n"); -} -#endif - - -/* Find all of the windows used by this job step and set their - * status to "state". - * - * Used by: slurmctld - */ -static int -_job_step_window_state(fed_jobinfo_t *jp, hostlist_t hl, enum NTBL_RC state) -{ - hostlist_iterator_t hi; - char *host; - int proc_cnt; - int nprocs; - int nnodes; - int i, j; - int rc; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; - - xassert(!hostlist_is_empty(hl)); - xassert(jp); - xassert(jp->magic == FED_JOBINFO_MAGIC); - - if ((jp == NULL) - || (jp->magic != FED_JOBINFO_MAGIC) - || (hostlist_is_empty(hl))) - return SLURM_ERROR; - - if ((jp->tables_per_task == 0) - || !jp->tableinfo - || (jp->tableinfo[0].table_length == 0)) - return SLURM_SUCCESS; - - debug3("jp->tables_per_task = %d", jp->tables_per_task); - nprocs = jp->tableinfo[0].table_length; - hi = hostlist_iterator_create(hl); - - debug("Finding windows"); - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - - proc_cnt = 0; - _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if(!host) - error("Failed to get next host"); - - if(i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { - rc = _window_state_set(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - state, jp->job_key); - proc_cnt++; - } - free(host); - } - _unlock(); - - hostlist_iterator_destroy(hi); - return SLURM_SUCCESS; -} - -/* - * For one node, free all of the windows belonging to a particular - * job step (as identified by the job_key). - */ -static void inline -_free_windows_by_job_key(uint16_t job_key, char *nodename) -{ - fed_nodeinfo_t *node; - fed_adapter_t *adapter; - fed_window_t *window; - int i, j; - - /* debug3("_free_windows_by_job_key(%hu, %s)", job_key, nodename); */ - if ((node = _find_node(fed_state, nodename)) == NULL) - return; - - if (node->adapter_list == NULL) { - error("_free_windows_by_job_key, " - "adapter_list NULL for node %s", nodename); - return; - } - for (i = 0; i < node->adapter_count; i++) { - adapter = &node->adapter_list[i]; - if (adapter->window_list == NULL) { - error("_free_windows_by_job_key, " - "window_list NULL for node %s adapter %s", - nodename, adapter->name); - continue; - } - /* We could check here to see if this adapter's name - * is in the fed_jobinfo tablinfo list to avoid the next - * loop if the adapter isn't in use by the job step. - * However, the added searching and string comparisons - * probably aren't worth it, especially since MOST job - * steps will use all of the adapters. - */ - for (j = 0; j < adapter->window_count; j++) { - window = &adapter->window_list[j]; - - if (window->job_key == job_key) { - /* debug3("Freeing adapter %s window %d", - adapter->name, window->id); */ - window->status = NTBL_UNLOADED_STATE; - window->job_key = 0; - } - } - } -} - -/* Find all of the windows used by job step "jp" on the hosts - * designated in hostlist "hl" and mark their state NTBL_UNLOADED_STATE. - * - * Used by: slurmctld - */ -int -fed_job_step_complete(fed_jobinfo_t *jp, hostlist_t hl) -{ - hostlist_t uniq_hl; - hostlist_iterator_t hi; - char *nodename; - - xassert(!hostlist_is_empty(hl)); - xassert(jp); - xassert(jp->magic == FED_JOBINFO_MAGIC); - - if ((jp == NULL) - || (jp->magic != FED_JOBINFO_MAGIC) - || (hostlist_is_empty(hl))) - return SLURM_ERROR; - - if ((jp->tables_per_task == 0) - || !jp->tableinfo - || (jp->tableinfo[0].table_length == 0)) - return SLURM_SUCCESS; - - /* The hl hostlist may contain duplicate nodenames (poe -hostfile - * triggers duplicates in the hostlist). Since there - * is no reason to call _free_windows_by_job_key more than once - * per nodename, we create a new unique hostlist. - */ - uniq_hl = hostlist_copy(hl); - hostlist_uniq(uniq_hl); - hi = hostlist_iterator_create(uniq_hl); - - _lock(); - if (fed_state != NULL) { - while((nodename = hostlist_next(hi)) != NULL) { - _free_windows_by_job_key(jp->job_key, nodename); - free(nodename); - } - } else { /* fed_state == NULL */ - /* If there is no state at all, the job is already cleaned - * up. :) This should really only happen when the backup - * controller is calling job_fini() just before it takes over - * the role of active controller. - */ - debug("fed_job_step_complete called when fed_state == NULL"); - } - _unlock(); - - hostlist_iterator_destroy(hi); - hostlist_destroy(uniq_hl); - return SLURM_SUCCESS; -} - - -/* Find all of the windows used by job step "jp" and mark their - * state NTBL_LOADED_STATE. - * - * Used by the slurmctld at startup time to restore the allocation - * status of any job steps that were running at the time the previous - * slurmctld was shutdown. Also used to restore the allocation - * status after a call to switch_clear(). - */ -int -fed_job_step_allocated(fed_jobinfo_t *jp, hostlist_t hl) -{ - return _job_step_window_state(jp, hl, NTBL_LOADED_STATE); -} - - - -/* Setup everything for the job. Assign tasks across - * nodes based on the hostlist given and create the network table used - * on all nodes of the job. - * - * Used by: slurmctld - */ -int -fed_build_jobinfo(fed_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, int bulk_xfer) -{ - int nnodes; - hostlist_iterator_t hi; - char *host = NULL; - int proc_cnt = 0; - int i, j; - fed_nodeinfo_t *node; - int rc; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; - - assert(jp); - assert(jp->magic == FED_JOBINFO_MAGIC); - assert(!hostlist_is_empty(hl)); - - if(nprocs <= 0) - slurm_seterrno_ret(EINVAL); - - jp->bulk_xfer = (uint8_t) bulk_xfer; - jp->job_key = _next_key(); - snprintf(jp->job_desc, DESCLEN, - "slurm federation driver key=%d", jp->job_key); - jp->window_memory = FED_AUTO_WINMEM; - - hi = hostlist_iterator_create(hl); - - if (sn_all) { - /* - * Peek at the first host to figure out tables_per_task. - * This driver assumes that all nodes have the same number - * of adapters per node. Bad Things will happen if this - * assumption is incorrect. - */ - host = hostlist_next(hi); - _lock(); - node = _find_node(fed_state, host); - jp->tables_per_task = node ? node->adapter_count : 0; - _unlock(); - if (host != NULL) - free(host); - hostlist_iterator_reset(hi); - } else { - jp->tables_per_task = 1; - } - - /* Allocate memory for each fed_tableinfo_t */ - jp->tableinfo = (fed_tableinfo_t *) xmalloc(jp->tables_per_task - * sizeof(fed_tableinfo_t)); - for (i = 0; i < jp->tables_per_task; i++) { - jp->tableinfo[i].table_length = nprocs; - jp->tableinfo[i].table = (NTBL **) xmalloc(nprocs - * sizeof(NTBL *)); - for (j = 0; j < nprocs; j++) { - jp->tableinfo[i].table[j] = - (NTBL *) xmalloc(sizeof(NTBL)); - } - } - - debug("Allocating windows"); - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - proc_cnt = 0; - _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if(!host) - error("Failed to get next host"); - - if(i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { - if (adapter_name == NULL) { - rc = _allocate_windows_all(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - jp->job_key); - } else { - rc = _allocate_window_single(adapter_name, - jp->tableinfo, - host, proc_cnt, - jp->job_key); - } - if (rc != SLURM_SUCCESS) { - _unlock(); - goto fail; - } - proc_cnt++; - } - free(host); - } - _unlock(); - - -#if FED_DEBUG - _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); -#endif - - hostlist_iterator_destroy(hi); - return SLURM_SUCCESS; - -fail: - free(host); - hostlist_iterator_destroy(hi); - /* slurmctld will call fed_free_jobinfo on jp */ - return SLURM_FAILURE; -} - -void -_pack_tableinfo(fed_tableinfo_t *tableinfo, Buf buf) -{ - int i; - - pack32(tableinfo->table_length, buf); - for (i = 0; i < tableinfo->table_length; i++) { - pack16(tableinfo->table[i]->task_id, buf); - pack16(tableinfo->table[i]->lid, buf); - pack16(tableinfo->table[i]->window_id, buf); - } - packmem(tableinfo->adapter_name, FED_ADAPTERNAME_LEN, buf); -} - -/* Used by: all */ -int -fed_pack_jobinfo(fed_jobinfo_t *j, Buf buf) -{ - int i; - - assert(j); - assert(j->magic == FED_JOBINFO_MAGIC); - assert(buf); - - pack32(j->magic, buf); - pack16(j->job_key, buf); - packmem(j->job_desc, DESCLEN, buf); - pack32(j->window_memory, buf); - pack8(j->bulk_xfer, buf); - pack16(j->tables_per_task, buf); - for (i = 0; i < j->tables_per_task; i++) { - _pack_tableinfo(&j->tableinfo[i], buf); - } - - return SLURM_SUCCESS; -} - -/* return 0 on success, -1 on failure */ -static int -_unpack_tableinfo(fed_tableinfo_t *tableinfo, Buf buf) -{ - uint32_t size; - char *name_ptr; - int i; - - safe_unpack32(&tableinfo->table_length, buf); - tableinfo->table = (NTBL **) xmalloc(tableinfo->table_length - * sizeof(NTBL *)); - for (i = 0; i < tableinfo->table_length; i++) { - tableinfo->table[i] = (NTBL *) xmalloc(sizeof(NTBL)); - - safe_unpack16(&tableinfo->table[i]->task_id, buf); - safe_unpack16(&tableinfo->table[i]->lid, buf); - safe_unpack16(&tableinfo->table[i]->window_id, buf); - } - safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != FED_ADAPTERNAME_LEN) - goto unpack_error; - memcpy(tableinfo->adapter_name, name_ptr, size); - return 0; - -unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ - error("unpack error in _unpack_tableinfo"); - return -1; -} - -/* Used by: all */ -int -fed_unpack_jobinfo(fed_jobinfo_t *j, Buf buf) -{ - uint32_t size; - int i, k; - - assert(j); - assert(j->magic == FED_JOBINFO_MAGIC); - assert(buf); - - safe_unpack32(&j->magic, buf); - assert(j->magic == FED_JOBINFO_MAGIC); - safe_unpack16(&j->job_key, buf); - safe_unpackmem(j->job_desc, &size, buf); - if(size != DESCLEN) - goto unpack_error; - safe_unpack32(&j->window_memory, buf); - safe_unpack8(&j->bulk_xfer, buf); - safe_unpack16(&j->tables_per_task, buf); - - j->tableinfo = (fed_tableinfo_t *) xmalloc(j->tables_per_task - * sizeof(fed_tableinfo_t)); - if(!j->tableinfo) - slurm_seterrno_ret(ENOMEM); - for (i = 0; i < j->tables_per_task; i++) { - if (_unpack_tableinfo(&j->tableinfo[i], buf) != 0) - goto unpack_error; - } - - return SLURM_SUCCESS; - -unpack_error: - error("fed_unpack_jobinfo error"); - if (j->tableinfo) { - for (i = 0; i < j->tables_per_task; i++) { - for (k=0; ktableinfo[i].table_length; k++) - xfree(j->tableinfo[i].table[k]); - xfree(j->tableinfo[i].table); - } - xfree(j->tableinfo); - } - slurm_seterrno_ret(EUNPACK); - return SLURM_ERROR; -} - -/* Used by: all */ -fed_jobinfo_t * -fed_copy_jobinfo(fed_jobinfo_t *job) -{ - fed_jobinfo_t *new; - int i, k; - - assert(job); - assert(job->magic == FED_JOBINFO_MAGIC); - - if(fed_alloc_jobinfo(&new)) { - debug("fed_alloc_jobinfo failed"); - goto cleanup1; - } - memcpy(new, job, sizeof(fed_jobinfo_t)); - /* table will be empty (and table_size == 0) when the network string - * from poe does not contain "us". - * (See man poe: -euilib or MP_EUILIB) - */ - if (job->tables_per_task > 0) { - /* Allocate memory for each fed_tableinfo_t */ - new->tableinfo = (fed_tableinfo_t *)xmalloc( - job->tables_per_task * sizeof(fed_tableinfo_t)); - if (new->tableinfo == NULL) - goto cleanup2; - memcpy(new->tableinfo, job->tableinfo, - sizeof(fed_tableinfo_t) * job->tables_per_task); - - for (i = 0; i < job->tables_per_task; i++) { - new->tableinfo[i].table = - (NTBL **) xmalloc(job->tableinfo[i].table_length - * sizeof(NTBL *)); - if (new->tableinfo[i].table == NULL) - goto cleanup3; - - for (k = 0; k < new->tableinfo[i].table_length; k++) { - new->tableinfo[i].table[k] = - (NTBL *) xmalloc(sizeof(NTBL)); - if (new->tableinfo[i].table[k] == NULL) - goto cleanup4; - memcpy(new->tableinfo[i].table[k], - job->tableinfo[i].table[k], - sizeof(fed_tableinfo_t)); - } - - - } - } - - return new; - -cleanup4: - k--; - for ( ; k >= 0; k--) - xfree(new->tableinfo[i].table[k]); -cleanup3: - i--; - for ( ; i >= 0; i--) { - for (k = 0; k < new->tableinfo[i].table_length; k++) - xfree(new->tableinfo[i].table[k]); - xfree(new->tableinfo[i].table); - } - xfree(new->tableinfo); -cleanup2: - fed_free_jobinfo(new); -cleanup1: - error("Allocating new jobinfo"); - slurm_seterrno(ENOMEM); - return NULL; -} - -/* Used by: all */ -void -fed_free_jobinfo(fed_jobinfo_t *jp) -{ - int i, j; - fed_tableinfo_t *tableinfo; - - if (!jp) { - return; - } - - if (jp->magic != FED_JOBINFO_MAGIC) { - error("jp is not a switch/federation fed_jobinfo_t"); - return; - } - - jp->magic = 0; - if (jp->tables_per_task > 0 && jp->tableinfo != NULL) { - for (i = 0; i < jp->tables_per_task; i++) { - tableinfo = &jp->tableinfo[i]; - if (tableinfo->table == NULL) - continue; - for (j = 0; j < tableinfo->table_length; j++) { - if (tableinfo->table[j] == NULL) - continue; - xfree(tableinfo->table[j]); - } - xfree(tableinfo->table); - } - xfree(jp->tableinfo); - } - - xfree(jp); - jp = NULL; - - return; -} - -/* Return data to code for whom jobinfo is an opaque type. - * - * Used by: all - */ -int -fed_get_jobinfo(fed_jobinfo_t *jp, int key, void *data) -{ - fed_tableinfo_t **tableinfo = (fed_tableinfo_t **)data; - int *tables_per = (int *)data; - int *job_key = (int *)data; - - assert(jp); - assert(jp->magic == FED_JOBINFO_MAGIC); - - switch(key) { - case FED_JOBINFO_TABLEINFO: - *tableinfo = jp->tableinfo; - break; - case FED_JOBINFO_TABLESPERTASK: - *tables_per = jp->tables_per_task; - break; - case FED_JOBINFO_KEY: - *job_key = jp->job_key; - break; - default: - slurm_seterrno_ret(EINVAL); - } - - return SLURM_SUCCESS; -} - - -/* - * Check up to "retry" times for "window_id" on "adapter_name" - * to switch to the NTBL_UNLOADED_STATE. Sleep one second between - * each retry. - * - * Used by: slurmd - */ -static int -_wait_for_window_unloaded(char *adapter_name, unsigned short window_id, - int retry) -{ - int status; - int i; - - for (i = 0; i < retry; i++) { - ntbl_query_window(NTBL_VERSION, adapter_name, - window_id, &status); - if (status == NTBL_UNLOADED_STATE) - break; - debug2("Window %hu adapter %s is in use, sleeping 1 second", - window_id, adapter_name); - sleep(1); - } - - if (status != NTBL_UNLOADED_STATE) - return SLURM_ERROR; - - return SLURM_SUCCESS; -} - - -/* - * Look through the table and find all of the NTBL that are for an adapter on - * this node. Wait until the window from each local NTBL is in the - * NTBL_UNLOADED_STATE. - * - * Used by: slurmd - */ -static int -_wait_for_all_windows(fed_tableinfo_t *tableinfo) -{ - uint16_t lid; - int i; - int err; - int rc = SLURM_SUCCESS; - int retry = 15; - - lid = _get_lid_from_adapter(tableinfo->adapter_name); - - for (i = 0; i < tableinfo->table_length; i++) { - if (tableinfo->table[i]->lid == lid) { - err = _wait_for_window_unloaded( - tableinfo->adapter_name, - tableinfo->table[i]->window_id, - retry); - if (err != SLURM_SUCCESS) { - error("Window %hu adapter %s did not become" - " free within %d seconds", - tableinfo->table[i]->window_id, - tableinfo->adapter_name, - retry); - rc = err; - retry = 2; - } - } - } - - return rc; -} - - -static int -_check_rdma_job_count(char *adapter) -{ - unsigned int job_count; - unsigned int *job_keys; - int rc, z; - - rc = ntbl_rdma_jobs(NTBL_VERSION, adapter, - &job_count, &job_keys); - if (rc != NTBL_SUCCESS) { - error("ntbl_rdma_jobs(): %d", rc); - return SLURM_ERROR; - } - - debug3("Adapter %s, RDMA job_count = %u", - adapter, job_count); - for (z = 0; z < job_count; z++) - debug3(" job key = %u", job_keys[z]); - free(job_keys); - if (job_count >= 4) { - error("RDMA job_count is too high: %u", job_count); - return SLURM_ERROR; - } - - return SLURM_SUCCESS; -} - - -/* Load a network table on node. If table contains more than - * one window for a given adapter, load the table only once for that - * adapter. - * - * Used by: slurmd - */ -int -fed_load_table(fed_jobinfo_t *jp, int uid, int pid) -{ - int i; - int err; - unsigned long long winmem; - char *adapter; - uint16_t network_id; -/* ADAPTER_RESOURCES res; */ - int rc; - -#if FED_DEBUG - char buf[2000]; -#endif - assert(jp); - assert(jp->magic == FED_JOBINFO_MAGIC); - - for(i = 0; i < jp->tables_per_task; i++) { -#if FED_DEBUG - _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length); - printf("%s", fed_sprint_jobinfo(jp, buf, 2000)); -#endif - adapter = jp->tableinfo[i].adapter_name; - network_id = _get_network_id_from_adapter(adapter); - - rc = _wait_for_all_windows(&jp->tableinfo[i]); - if (rc != SLURM_SUCCESS) - return rc; - - if(adapter == NULL) - continue; - winmem = jp->window_memory; - if(jp->bulk_xfer) { - if (i == 0) { - rc = _check_rdma_job_count(adapter); - if (rc != SLURM_SUCCESS) - return rc; - } - - err = ntbl_load_table_rdma( - NTBL_VERSION, - adapter, - network_id, - uid, - pid, - jp->job_key, - jp->job_desc, - jp->bulk_xfer, - 0, /* rcontext_blocks */ - jp->tableinfo[i].table_length, - jp->tableinfo[i].table); - } else { - err = ntbl_load_table( - NTBL_VERSION, - adapter, - network_id, - uid, - pid, - jp->job_key, - jp->job_desc, - &winmem, - jp->tableinfo[i].table_length, - jp->tableinfo[i].table); - } - if(err != NTBL_SUCCESS) { - error("unable to load table: [%d] %s", - err, _lookup_fed_status_tab(err)); - return SLURM_ERROR; - } - } - umask(fed_umask); - - return SLURM_SUCCESS; -} - - -/* - * Try up to "retry" times to unload a window. - */ -static int -_unload_window(char *adapter, unsigned short job_key, unsigned short window_id, - int retry) -{ - int i; - int err; - - for (i = 0; i < retry; i++) { - err = ntbl_unload_window(NTBL_VERSION, adapter, - job_key, window_id); - if (err == NTBL_SUCCESS) - return SLURM_SUCCESS; - debug("Unable to unload window %hu adapter %s job_key %hu: %s", - window_id, adapter, job_key, _lookup_fed_status_tab(err)); - - err = ntbl_clean_window(NTBL_VERSION, adapter, - ALWAYS_KILL, window_id); - if (err == NTBL_SUCCESS) - return SLURM_SUCCESS; - error("Unable to clean window %hu adapter %s job_key %hu: %s", - window_id, adapter, job_key, _lookup_fed_status_tab(err)); - - sleep(1); - } - - return SLURM_FAILURE; -} - - -/* Assumes that, on error, new switch state information will be - * read from node. - * - * Used by: slurmd - */ -int -fed_unload_table(fed_jobinfo_t *jp) -{ - int i, j; - int err; - char *adapter_name; - NTBL **table; - uint32_t table_length; - int local_lid; - int rc = SLURM_SUCCESS; - int retry = 15; - - assert(jp); - assert(jp->magic == FED_JOBINFO_MAGIC); - for (i = 0; i < jp->tables_per_task; i++) { - table = jp->tableinfo[i].table; - table_length = jp->tableinfo[i].table_length; - adapter_name = jp->tableinfo[i].adapter_name; - local_lid = _get_lid_from_adapter(adapter_name); - - for(j = 0; j < table_length; j++) { - if(table[j]->lid != local_lid) - continue; - debug3("freeing adapter %s lid %d window %d job_key %d", - adapter_name, table[j]->lid, - table[j]->window_id, jp->job_key); - err = _unload_window(adapter_name, - jp->job_key, - table[j]->window_id, - retry); - if(err != SLURM_SUCCESS) { - rc = err; - slurm_seterrno(EUNLOAD); - retry = 2; - } - } - } - return rc; -} - -static fed_libstate_t * -_alloc_libstate(void) -{ - fed_libstate_t *tmp; - - tmp = (fed_libstate_t *)xmalloc(sizeof(fed_libstate_t)); - if(!tmp) { - slurm_seterrno(ENOMEM); - return NULL; - } - tmp->magic = FED_LIBSTATE_MAGIC; - tmp->node_count = 0; - tmp->node_max = 0; - tmp->node_list = NULL; - tmp->hash_max = 0; - tmp->hash_table = NULL; - tmp->key_index = 1; - - return tmp; -} - -/* Allocate and initialize memory for the persistent libstate. - * - * Used by: slurmctld - */ -int -fed_init(void) -{ - fed_libstate_t *tmp; - - tmp = _alloc_libstate(); - if(!tmp) - return SLURM_FAILURE; - _lock(); - assert(!fed_state); - fed_state = tmp; - _unlock(); - - return SLURM_SUCCESS; -} - -static void -_free_libstate(fed_libstate_t *lp) -{ - int i; - - if (!lp) - return; - if (lp->node_list != NULL) { - for (i = 0; i < lp->node_count; i++) - fed_free_nodeinfo(&lp->node_list[i], true); - xfree(lp->node_list); - } - xfree(lp->hash_table); - xfree(lp); -} - -int -fed_fini(void) -{ - xfree(fed_conf); - return SLURM_SUCCESS; -} - -/* Used by: slurmctld */ -static int -_pack_libstate(fed_libstate_t *lp, Buf buffer) -{ - int offset; - int i; - - assert(lp); - assert(lp->magic == FED_LIBSTATE_MAGIC); - - offset = get_buf_offset(buffer); - pack32(lp->magic, buffer); - pack32(lp->node_count, buffer); - for(i = 0; i < lp->node_count; i++) - (void)fed_pack_nodeinfo(&lp->node_list[i], buffer); - /* don't pack hash_table, we'll just rebuild on restore */ - pack16(lp->key_index, buffer); - - return(get_buf_offset(buffer) - offset); -} - -/* Used by: slurmctld */ -void -fed_libstate_save(Buf buffer, bool free_flag) -{ - _lock(); - - if (fed_state != NULL) - _pack_libstate(fed_state, buffer); - - /* Clean up fed_state since backup slurmctld can repeatedly - * save and restore state */ - if (free_flag) { - _free_libstate(fed_state); - fed_state = NULL; /* freed above */ - } - _unlock(); -} - -/* Used by: slurmctld */ -static int -_unpack_libstate(fed_libstate_t *lp, Buf buffer) -{ - int offset; - int node_count; - int i; - - assert(lp->magic == FED_LIBSTATE_MAGIC); - - offset = get_buf_offset(buffer); - - safe_unpack32(&lp->magic, buffer); - safe_unpack32(&node_count, buffer); - for(i = 0; i < node_count; i++) { - if (_unpack_nodeinfo(NULL, buffer, false) != SLURM_SUCCESS) - goto unpack_error; - } - if(lp->node_count != node_count) { - error("Failed to recover switch state of all nodes (%d of %u)", - lp->node_count, node_count); - return SLURM_ERROR; - } - safe_unpack16(&lp->key_index, buffer); - - return SLURM_SUCCESS; - -unpack_error: - error("unpack error in _unpack_libstate"); - slurm_seterrno_ret(EBADMAGIC_FEDLIBSTATE); - return SLURM_ERROR; -} - -/* Used by: slurmctld */ -int -fed_libstate_restore(Buf buffer) -{ - _lock(); - assert(!fed_state); - - fed_state = _alloc_libstate(); - if(!fed_state) { - error("fed_libstate_restore fed_state is NULL"); - _unlock(); - return SLURM_FAILURE; - } - _unpack_libstate(fed_state, buffer); - _unlock(); - - return SLURM_SUCCESS; -} - -int -fed_libstate_clear(void) -{ - int i, j, k; - struct fed_nodeinfo *node; - struct fed_adapter *adapter; - struct fed_window *window; - - debug3("Clearing state on all windows in global fed state"); - _lock(); - if (!fed_state || !fed_state->node_list) { - error("fed_state or node_list not initialized!"); - _unlock(); - return SLURM_ERROR; - } - - for (i = 0; i < fed_state->node_count; i++) { - node = &fed_state->node_list[i]; - if (!node->adapter_list) - continue; - for (j = 0; j < node->adapter_count; j++) { - adapter = &node->adapter_list[i]; - if (!adapter || !adapter->window_list) - continue; - for (k = 0; k < adapter->window_count; k++) { - window = &adapter->window_list[k]; - if (!window) - continue; - window->status = NTBL_UNLOADED_STATE; - } - } - } - _unlock(); - - return SLURM_SUCCESS; -} diff --git a/src/plugins/switch/federation/federation.h b/src/plugins/switch/federation/federation.h deleted file mode 100644 index d9e3e08496..0000000000 --- a/src/plugins/switch/federation/federation.h +++ /dev/null @@ -1,112 +0,0 @@ -/*****************************************************************************\ - ** federation.h - Library routines for initiating jobs on IBM Federation - ** $Id$ - ***************************************************************************** - * Copyright (C) 2004 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jason King - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include "src/common/slurm_xlator.h" - -#ifndef _FEDERATION_INCLUDED -#define _FEDERATION_INCLUDED - -#if HAVE_LIBNTBL -# include -#else -# error "Don't have required libntbl!" -#endif - -/* opaque data structures - no peeking! */ -typedef struct fed_libstate fed_libstate_t; -typedef struct fed_jobinfo fed_jobinfo_t; -typedef struct fed_nodeinfo fed_nodeinfo_t; - -/* NOTE: error codes should be between ESLURM_SWITCH_MIN and - * ESLURM_SWITCH MAX as defined in slurm/slurm_errno.h */ -enum { - /* Federation specific error codes */ - ESTATUS = 3000, - EADAPTER, - ENOADAPTER, - EBADMAGIC_FEDNODEINFO, - EBADMAGIC_FEDJOBINFO, - EBADMAGIC_FEDLIBSTATE, - EUNPACK, - EHOSTNAME, - ENOTSUPPORTED, - EVERSION, - EWINDOW, - EUNLOAD -}; - -#define FED_MAXADAPTERS 2 -#define FED_LIBSTATE_LEN (1024 * 1024 * 1) - -int fed_slurmctld_init(void); -int fed_slurmd_init(void); -int fed_slurmd_step_init(void); -int fed_alloc_nodeinfo(fed_nodeinfo_t **nh); -int fed_build_nodeinfo(fed_nodeinfo_t *np, char *hostname); -char *fed_print_nodeinfo(fed_nodeinfo_t *np, char *buf, size_t size); -int fed_pack_nodeinfo(fed_nodeinfo_t *np, Buf buf); -int fed_unpack_nodeinfo(fed_nodeinfo_t *np, Buf buf); -void fed_free_nodeinfo(fed_nodeinfo_t *np, bool ptr_into_array); -int fed_alloc_jobinfo(fed_jobinfo_t **jh); -int fed_build_jobinfo(fed_jobinfo_t *jp, hostlist_t hl, int nprocs, - bool sn_all, char *adapter_name, int bulk_xfer); -int fed_pack_jobinfo(fed_jobinfo_t *jp, Buf buf); -int fed_unpack_jobinfo(fed_jobinfo_t *jp, Buf buf); -fed_jobinfo_t *fed_copy_jobinfo(fed_jobinfo_t *jp); -void fed_free_jobinfo(fed_jobinfo_t *jp); -int fed_load_table(fed_jobinfo_t *jp, int uid, int pid); -int fed_init(void); -int fed_fini(void); -int fed_unload_table(fed_jobinfo_t *jp); -int fed_unpack_libstate(fed_libstate_t *lp, Buf buffer); -int fed_get_jobinfo(fed_jobinfo_t *jp, int key, void *data); -void fed_libstate_save(Buf buffer, bool free_flag); -int fed_libstate_restore(Buf buffer); -int fed_job_step_complete(fed_jobinfo_t *jp, hostlist_t hl); -int fed_job_step_allocated(fed_jobinfo_t *jp, hostlist_t hl); -int fed_libstate_clear(void); -int fed_slurmctld_init(void); -int fed_slurmd_init(void); -int fed_slurmd_step_init(void); - -#endif /* _FEDERATION_INCLUDED */ diff --git a/src/plugins/switch/federation/federation_keys.h b/src/plugins/switch/federation/federation_keys.h deleted file mode 100644 index 3553b2152c..0000000000 --- a/src/plugins/switch/federation/federation_keys.h +++ /dev/null @@ -1,61 +0,0 @@ -/*****************************************************************************\ - ** federation_keys.h - Key definitions used by the get_jobinfo functions - ** $Id$ - ***************************************************************************** - * Copyright (C) 2004 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jason King - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#ifndef _FEDERATION_KEYS_INCLUDED -#define _FEDERATION_KEYS_INCLUDED - -#define FED_ADAPTERNAME_LEN 5 - -enum { - /* Federation specific get_jobinfo keys */ - FED_JOBINFO_TABLEINFO, - FED_JOBINFO_TABLESPERTASK, - FED_JOBINFO_KEY, - FED_JOBINFO_PROTOCOL, - FED_JOBINFO_MODE -}; - -/* Information shared between slurm_ll_api and the slurm federation driver */ -typedef struct fed_tableinfo { - uint32_t table_length; - NTBL **table; - char adapter_name[FED_ADAPTERNAME_LEN]; -} fed_tableinfo_t; - -#endif /* _FEDERATION_KEYS_INCLUDED */ diff --git a/src/plugins/switch/federation/switch_federation.c b/src/plugins/switch/federation/switch_federation.c deleted file mode 100644 index 6af1939f6e..0000000000 --- a/src/plugins/switch/federation/switch_federation.c +++ /dev/null @@ -1,674 +0,0 @@ -/***************************************************************************** \ - * switch_federation.c - Library routines for initiating jobs on IBM - * Federation - ***************************************************************************** - * Copyright (C) 2004-2007 The Regents of the University of California. - * Copyright (C) 2008 Lawrence Livermore National Security. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Jason King - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#if HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include - -#include "slurm/slurm_errno.h" -#include "src/common/macros.h" -#include "src/common/slurm_xlator.h" -#include "src/plugins/switch/federation/federation.h" - -#define FED_BUF_SIZE 4096 - -bool fed_need_state_save = false; - -static void _spawn_state_save_thread(char *dir); -static int _switch_p_libstate_save(char * dir_name, bool free_flag); - -/* Type for error string table entries */ -typedef struct { - int xe_number; - char *xe_message; -} slurm_errtab_t; - -static slurm_errtab_t slurm_errtab[] = { - {0, "No error"}, - {-1, "Unspecified error"}, - - /* Federation routine error codes */ - - { ESTATUS, - "Cannot get adapter status" }, - { EADAPTER, - "Open of adapter failed" }, - { ENOADAPTER, - "No adapters found" }, - { EBADMAGIC_FEDNODEINFO, - "Bad magic in Federation nodeinfo" }, - { EBADMAGIC_FEDJOBINFO, - "Bad magic in Federation jobinfo" }, - { EBADMAGIC_FEDLIBSTATE, - "Bad magic in Federation libstate" }, - { EUNPACK, - "Error during unpack" }, - { EHOSTNAME, - "Cannot get hostname" }, - { ENOTSUPPORTED, - "This feature not currently supported" }, - { EVERSION, - "Header/library version mismatch" }, - { EWINDOW, - "Error allocating switch window" }, - { EUNLOAD, - "Error unloading switch window table" } -}; - -/* - * These variables are required by the generic plugin interface. If they - * are not found in the plugin, the plugin loader will ignore it. - * - * plugin_name - a string giving a human-readable description of the - * plugin. There is no maximum length, but the symbol must refer to - * a valid string. - * - * plugin_type - a string suggesting the type of the plugin or its - * applicability to a particular form of data or method of data handling. - * If the low-level plugin API is used, the contents of this string are - * unimportant and may be anything. SLURM uses the higher-level plugin - * interface which requires this string to be of the form - * - * / - * - * where is a description of the intended application of - * the plugin (e.g., "switch" for SLURM switch) and is a description - * of how this plugin satisfies that application. SLURM will only load - * a switch plugin if the plugin_type string has a prefix of "switch/". - * - * plugin_version - an unsigned 32-bit integer giving the version number - * of the plugin. If major and minor revisions are desired, the major - * version number may be multiplied by a suitable magnitude constant such - * as 100 or 1000. Various SLURM versions will likely require a certain - * minimum version for their plugins as this API matures. - */ -const char plugin_name[] = "switch FEDERATION plugin"; -const char plugin_type[] = "switch/federation"; -const uint32_t plugin_version = 100; - -/* - * init() is called when the plugin is loaded, before any other functions - * are called. Put global initialization here. - */ -int init ( void ) -{ - verbose("%s loaded", plugin_name); - - return SLURM_SUCCESS; -} - -int fini ( void ) -{ - return fed_fini(); -} - -int switch_p_slurmctld_init( void ) -{ - return fed_slurmctld_init(); -} - -int switch_p_slurmd_init( void ) -{ - return fed_slurmd_init(); -} - -int switch_p_slurmd_step_init( void ) -{ - return fed_slurmd_step_init(); -} - -/* - * Switch functions for global state save - * NOTE: Clears current switch state as needed for backup - * controller to repeatedly assume control primary server - */ -int switch_p_libstate_save ( char * dir_name ) -{ - return _switch_p_libstate_save(dir_name, true); -} - -/* save and purge the libstate if free_flag is true */ -static int _switch_p_libstate_save ( char * dir_name, bool free_flag ) -{ - Buf buffer; - char *file_name; - int ret = SLURM_SUCCESS; - int state_fd; - - buffer = init_buf(FED_LIBSTATE_LEN); - (void)fed_libstate_save(buffer, free_flag); - file_name = xstrdup(dir_name); - xstrcat(file_name, "/fed_state"); - (void)unlink(file_name); - state_fd = creat(file_name, 0600); - if(state_fd < 0) { - error ("Can't save state, error creating file %s %m", - file_name); - ret = SLURM_ERROR; - } else { - char *buf = get_buf_data(buffer); - size_t len =get_buf_offset(buffer); - while(1) { - int wrote = write (state_fd, buf, len); - if ((wrote < 0) && (errno == EINTR)) - continue; - if (wrote == 0) - break; - if (wrote < 0) { - error ("Can't save switch state: %m"); - ret = SLURM_ERROR; - break; - } - buf += wrote; - len -= wrote; - } - close(state_fd); - } - xfree(file_name); - - if(buffer) - free_buf(buffer); - - return ret; -} - - -/* - * Restore global nodeinfo from a file. - * - * NOTE: switch_p_libstate_restore is only called by slurmctld, and only - * once at start-up. We exploit (abuse?) this fact to spawn a pthread to - * periodically call _switch_p_libstate_save(). - */ -int switch_p_libstate_restore ( char * dir_name, bool recover ) -{ - char *data = NULL, *file_name; - Buf buffer = NULL; - int error_code = SLURM_SUCCESS; - int state_fd, data_allocated = 0, data_read = 0, data_size = 0; - - xassert(dir_name != NULL); - - _spawn_state_save_thread(xstrdup(dir_name)); - if (!recover) /* clean start, no recovery */ - return fed_init(); - - file_name = xstrdup(dir_name); - xstrcat(file_name, "/fed_state"); - state_fd = open (file_name, O_RDONLY); - if (state_fd >= 0) { - data_allocated = FED_BUF_SIZE; - data = xmalloc(data_allocated); - while (1) { - data_read = read (state_fd, &data[data_size], - FED_BUF_SIZE); - if ((data_read < 0) && (errno == EINTR)) - continue; - if (data_read < 0) { - error ("Read error on %s, %m", file_name); - error_code = SLURM_ERROR; - break; - } else if (data_read == 0) - break; - data_size += data_read; - data_allocated += data_read; - xrealloc(data, data_allocated); - } - close (state_fd); - xfree(file_name); - } else { - error("No %s file for Federation state recovery", file_name); - error("Starting Federation with clean state"); - xfree(file_name); - return fed_init(); - } - - if (error_code == SLURM_SUCCESS) { - buffer = create_buf (data, data_size); - data = NULL; /* now in buffer, don't xfree() */ - if (fed_libstate_restore(buffer) < 0) - error_code = SLURM_ERROR; - } - - if (buffer) - free_buf(buffer); - xfree(data); - - return error_code; -} - -int switch_p_libstate_clear(void) -{ - return fed_libstate_clear(); -} - -/* - * switch state monitoring functions - */ -/* NOTE: we assume that once the switch state is cleared, - * notification of this will be forwarded to slurmctld. We do not - * enforce that in this function. - */ -/* FIX ME! - should use adapter name from federation.conf file now that - * we have that file support. - */ -#define ZERO 48 -int switch_p_clear_node_state(void) -{ - int i, j; - ADAPTER_RESOURCES res; - char name[] = "sniN"; - int err; - - for(i = 0; i < FED_MAXADAPTERS; i++) { - name[3] = i + ZERO; - err = ntbl_adapter_resources(NTBL_VERSION, name, &res); - if(err != NTBL_SUCCESS) - continue; - for(j = 0; j < res.window_count; j++) - ntbl_clean_window(NTBL_VERSION, name, - ALWAYS_KILL, res.window_list[j]); - free(res.window_list); - } - - return SLURM_SUCCESS; -} - -int switch_p_alloc_node_info(switch_node_info_t **switch_node) -{ - return fed_alloc_nodeinfo((fed_nodeinfo_t **)switch_node); -} - -int switch_p_build_node_info(switch_node_info_t *switch_node) -{ - char hostname[256]; - char *tmp; - - if(gethostname(hostname, 256) < 0) - slurm_seterrno_ret(EHOSTNAME); - /* remove the domain portion, if necessary */ - tmp = strstr(hostname, "."); - if(tmp) - *tmp = '\0'; - return fed_build_nodeinfo((fed_nodeinfo_t *)switch_node, hostname); -} - -int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) -{ - return fed_pack_nodeinfo((fed_nodeinfo_t *)switch_node, buffer); -} - -int switch_p_unpack_node_info(switch_node_info_t *switch_node, Buf buffer) -{ - return fed_unpack_nodeinfo((fed_nodeinfo_t *)switch_node, buffer); -} - -void switch_p_free_node_info(switch_node_info_t **switch_node) -{ - if(switch_node) - fed_free_nodeinfo((fed_nodeinfo_t *)*switch_node, false); -} - -char * switch_p_sprintf_node_info(switch_node_info_t *switch_node, - char *buf, size_t size) -{ - return fed_print_nodeinfo((fed_nodeinfo_t *)switch_node, buf, size); -} - -/* - * switch functions for job step specific credential - */ -int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) -{ - return fed_alloc_jobinfo((fed_jobinfo_t **)switch_job); -} - -static char *adapter_name_check(char *network) -{ - regex_t re; - char *pattern = "(sni[[:digit:]])"; - size_t nmatch = 5; - regmatch_t pmatch[5]; - char *name; - - if (regcomp(&re, pattern, REG_EXTENDED) != 0) { - error("sockname regex compilation failed"); - return NULL; - } - memset(pmatch, 0, sizeof(regmatch_t)*nmatch); - if (regexec(&re, network, nmatch, pmatch, 0) == REG_NOMATCH) { - return NULL; - } - name = strndup(network + pmatch[1].rm_so, - (size_t)(pmatch[1].rm_eo - pmatch[1].rm_so)); - regfree(&re); - - return name; -} - -int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, - uint16_t *tasks_per_node, int cyclic_alloc, - char *network) -{ - hostlist_t list = NULL; - bool sn_all; - int i, err, nprocs = 0; - int bulk_xfer = 0; - char *adapter_name = NULL; - - debug3("network = \"%s\"", network); - if(strstr(network, "ip") || strstr(network, "IP")) { - debug2("federation: \"ip\" found in network string, " - "no network tables allocated"); - return SLURM_SUCCESS; - } else { - if (strstr(network, "sn_all") - || strstr(network, "SN_ALL")) { - debug3("Found sn_all in network string"); - sn_all = true; - } else if (strstr(network, "sn_single") - || strstr(network, "SN_SINGLE")) { - debug3("Found sn_single in network string"); - sn_all = false; - } else if ((adapter_name = adapter_name_check(network))) { - debug3("Found adapter %s in network string", - adapter_name); - sn_all = false; - } else { - /* default to sn_all */ - sn_all = true; - } - - list = hostlist_create(nodelist); - if(!list) - fatal("hostlist_create(%s): %m", nodelist); - for (i = 0; i < hostlist_count(list); i++) - nprocs += tasks_per_node[i]; - - if (strstr(network, "bulk_xfer") - || strstr(network, "BULK_XFER")) - bulk_xfer = 1; - err = fed_build_jobinfo((fed_jobinfo_t *)switch_job, list, - nprocs, sn_all, adapter_name, - bulk_xfer); - hostlist_destroy(list); - if (adapter_name) - free(adapter_name); - - return err; - } -} - -switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) -{ - switch_jobinfo_t *j; - - j = (switch_jobinfo_t *)fed_copy_jobinfo((fed_jobinfo_t *)switch_job); - if (!j) - error("fed_copy_jobinfo failed"); - - return j; -} - -void switch_p_free_jobinfo(switch_jobinfo_t *switch_job) -{ - return fed_free_jobinfo((fed_jobinfo_t *)switch_job); -} - -int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) -{ - return fed_pack_jobinfo((fed_jobinfo_t *)switch_job, buffer); -} - -int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) -{ - return fed_unpack_jobinfo((fed_jobinfo_t *)switch_job, buffer); -} - -extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, - void *resulting_data) -{ - return fed_get_jobinfo((fed_jobinfo_t *)switch_job, key, - resulting_data); -} - -static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) -{ - hostlist_t list = NULL; - int rc; - - list = hostlist_create(nodelist); - rc = fed_job_step_complete((fed_jobinfo_t *)jobinfo, list); - hostlist_destroy(list); - - return rc; -} - -extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) -{ - return _make_step_comp(jobinfo, nodelist); -} - -extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, - char *nodelist) -{ - return _make_step_comp(jobinfo, nodelist); -} - -extern bool switch_p_part_comp(void) -{ - return true; -} - -extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, char *nodelist) -{ - hostlist_t list = NULL; - int rc; - - list = hostlist_create(nodelist); - rc = fed_job_step_allocated((fed_jobinfo_t *)jobinfo, list); - hostlist_destroy(list); - - return rc; -} - -void switch_p_print_jobinfo(FILE *fp, switch_jobinfo_t *jobinfo) -{ - return; -} - -char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, char *buf, - size_t size) -{ - return NULL; -} - -/* - * switch functions for job initiation - */ -static int _ntbl_version_ok(void) -{ - return((ntbl_version() == NTBL_VERSION) ? 1 : 0); -} - -int switch_p_node_init(void) -{ - /* check to make sure the version of the library we compiled with - * matches the one dynamically linked - */ - if(!_ntbl_version_ok()) { - slurm_seterrno_ret(EVERSION); - } - - return SLURM_SUCCESS; -} - -int switch_p_node_fini(void) -{ - return SLURM_SUCCESS; -} - -int switch_p_job_preinit(switch_jobinfo_t *jobinfo) -{ - return SLURM_SUCCESS; -} - -extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, - char *job_name) -{ - pid_t pid; - - pid = getpid(); - return fed_load_table((fed_jobinfo_t *)jobinfo, uid, pid); -} - -int switch_p_job_fini (switch_jobinfo_t *jobinfo) -{ - return SLURM_SUCCESS; -} - -int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, - uint32_t job_id, uint32_t step_id) -{ - int err; - - /* - * Kill all processes in the job's session - */ - if(pgid) { - debug2("Sending SIGKILL to pgid %lu", - (unsigned long) pgid); - kill(-pgid, SIGKILL); - } else - debug("Job %u.%u: Bad pid valud %lu", job_id, - step_id, (unsigned long) pgid); - - err = fed_unload_table((fed_jobinfo_t *)jobinfo); - if(err != SLURM_SUCCESS) - return SLURM_ERROR; - - return SLURM_SUCCESS; -} - -int switch_p_job_attach(switch_jobinfo_t *jobinfo, char ***env, - uint32_t nodeid, uint32_t procid, uint32_t nnodes, - uint32_t nprocs, uint32_t rank) -{ -#if 0 - printf("nodeid = %u\n", nodeid); - printf("procid = %u\n", procid); - printf("nnodes = %u\n", nnodes); - printf("nprocs = %u\n", nprocs); - printf("rank = %u\n", rank); -#endif - return SLURM_SUCCESS; -} - -/* - * switch functions for other purposes - */ - -/* - * Linear search through table of errno values and strings, - * returns NULL on error, string on success. - */ -static char *_lookup_slurm_api_errtab(int errnum) -{ - char *res = NULL; - int i; - - for (i = 0; i < sizeof(slurm_errtab) / sizeof(slurm_errtab_t); i++) { - if (slurm_errtab[i].xe_number == errnum) { - res = slurm_errtab[i].xe_message; - break; - } - } - return res; -} - -extern int switch_p_get_errno(void) -{ - int err = slurm_get_errno(); - - if ((err >= ESLURM_SWITCH_MIN) && (err <= ESLURM_SWITCH_MAX)) - return err; - - return SLURM_SUCCESS; -} - -char *switch_p_strerror(int errnum) -{ - char *res = _lookup_slurm_api_errtab(errnum); - return (res ? res : strerror(errnum)); -} - - -static void *_state_save_thread(void *arg) -{ - char *dir_name = (char *)arg; - - while (1) { - sleep(300); - if (fed_need_state_save) { - fed_need_state_save = false; - _switch_p_libstate_save(dir_name, false); - } - } -} - -static void _spawn_state_save_thread(char *dir) -{ - pthread_attr_t attr; - pthread_t id; - - slurm_attr_init(&attr); - - if (pthread_create(&id, &attr, &_state_save_thread, (void *)dir) != 0) - error("Could not start federation state saving pthread"); - - slurm_attr_destroy(&attr); -} diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index 7ded0b31eb..b6f92a5070 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index caa8f54912..cfd5c35afa 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -215,9 +213,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -225,8 +221,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index 1b47e6786d..0b0f1f6db3 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index f7264aaa98..edf1f5d3d8 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 401bf09763..d11026f7f9 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -182,9 +180,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -192,8 +188,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index dbbf6a562b..b2389999c7 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -173,9 +171,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -183,8 +179,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 575a2c880a..88a263e851 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index 8c0f9573b8..b79eef8e71 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -171,9 +169,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -181,8 +177,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index 41d0102569..4e5552082d 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -165,9 +163,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -175,8 +171,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index 43b9300b03..b084e1b2e3 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 39dd1963c8..220dc6d847 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index e411bfa74c..c25deccdeb 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index ca0f3f9e33..ab7f00941e 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index d08f3dfc53..b2d3898667 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -159,9 +157,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -169,8 +165,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 01288ec08f..4f3dcae54d 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -153,9 +151,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -163,8 +159,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 59a1ad1b3f..3bb80faf12 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -152,9 +150,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -162,8 +158,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 19f1afd4c2..30f3180a7c 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -152,9 +150,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -162,8 +158,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 74cdc35d43..63ceadfb89 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -60,9 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index fe72c80f90..85279176e5 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -153,9 +151,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -163,8 +159,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 555e42a0a4..337eed40b5 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -168,9 +166,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -178,8 +174,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 61e4b72a10..e4e37071a6 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -60,9 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -155,9 +153,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -165,8 +161,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 75ba6b3145..b436f92927 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -162,9 +160,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -172,8 +168,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index 7e7ea2652c..a3a0b905a6 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index c75a2bd83f..f82c2956e0 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -56,9 +56,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -146,9 +144,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -156,8 +152,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index b75f018fcd..6545ba0cc0 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -155,9 +153,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -165,8 +161,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index b24818d913..ce23559052 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -158,9 +156,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -168,8 +164,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index f026e86b74..e8fe2784e1 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -58,9 +58,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 0594f5f9a4..3f81323901 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -65,9 +65,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -174,9 +172,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -184,8 +180,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index 9b5d423656..231adb3e1e 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -60,9 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index bb8599cb7e..d0f822a6e8 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -60,9 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -155,9 +153,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -165,8 +161,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 4ec0143215..738b0f3923 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 22aa7e68a3..93e5f8068c 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -59,9 +59,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index a9dd6f7638..7f31d1b3f2 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -152,9 +150,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -162,8 +158,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 8f2bf60458..ce8ca828c6 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -152,9 +150,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -162,8 +158,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 50ba0ad9b7..64037ce34c 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -151,9 +149,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -161,8 +157,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 5fef4dadaf..381afe0ba9 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -60,9 +60,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -154,9 +152,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -164,8 +160,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index ddd80d810b..ee5ad0cca1 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -61,9 +61,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -178,9 +176,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -188,8 +184,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 3167735d98..2b5414abf7 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -170,9 +168,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -180,8 +176,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index a67da0d399..158722611c 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -123,9 +121,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -133,8 +129,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index a0de75fb6f..8305cb6998 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -53,9 +53,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -163,9 +161,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -173,8 +169,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index 5ea7e2d377..55bc8acb8c 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -186,9 +184,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -196,8 +192,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index e49d637c78..5debc8ce1c 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -57,9 +57,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -178,9 +176,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -188,8 +184,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ diff --git a/testsuite/slurm_unit/common/Makefile.am b/testsuite/slurm_unit/common/Makefile.am index d44d04e5a6..c05b50eb38 100644 --- a/testsuite/slurm_unit/common/Makefile.am +++ b/testsuite/slurm_unit/common/Makefile.am @@ -1,20 +1,10 @@ AUTOMAKE_OPTIONS = foreign -if HAVE_ELAN -elan_testprogs = runqsw -elan_lib = $(top_builddir)/src/plugins/switch/elan/switch_elan.la -else -elan_testprogs = -elan_lib = -endif - INCLUDES = -I$(top_srcdir) -LDADD = $(top_builddir)/src/api/libslurm.o -ldl\ - $(elan_lib) +LDADD = $(top_builddir)/src/api/libslurm.o -ldl check_PROGRAMS = \ - $(TESTS) \ - $(elan_testprogs) + $(TESTS) TESTS = \ pack-test \ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index 88d3379d5a..b3f045692d 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -34,7 +34,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -check_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) +check_PROGRAMS = $(am__EXEEXT_1) TESTS = pack-test$(EXEEXT) log-test$(EXEEXT) bitstring-test$(EXEEXT) subdir = testsuite/slurm_unit/common DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -55,9 +55,7 @@ am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ $(top_srcdir)/auxdir/x_ac_cray.m4 \ $(top_srcdir)/auxdir/x_ac_databases.m4 \ $(top_srcdir)/auxdir/x_ac_debug.m4 \ - $(top_srcdir)/auxdir/x_ac_elan.m4 \ $(top_srcdir)/auxdir/x_ac_env.m4 \ - $(top_srcdir)/auxdir/x_ac_federation.m4 \ $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ $(top_srcdir)/auxdir/x_ac_iso.m4 \ @@ -85,28 +83,18 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__EXEEXT_1 = pack-test$(EXEEXT) log-test$(EXEEXT) \ bitstring-test$(EXEEXT) -@HAVE_ELAN_TRUE@am__EXEEXT_2 = runqsw$(EXEEXT) bitstring_test_SOURCES = bitstring-test.c bitstring_test_OBJECTS = bitstring-test.$(OBJEXT) bitstring_test_LDADD = $(LDADD) -@HAVE_ELAN_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/src/plugins/switch/elan/switch_elan.la -bitstring_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) +bitstring_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o log_test_SOURCES = log-test.c log_test_OBJECTS = log-test.$(OBJEXT) log_test_LDADD = $(LDADD) -log_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) +log_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o pack_test_SOURCES = pack-test.c pack_test_OBJECTS = pack-test.$(OBJEXT) pack_test_LDADD = $(LDADD) -pack_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) -runqsw_SOURCES = runqsw.c -runqsw_OBJECTS = runqsw.$(OBJEXT) -runqsw_LDADD = $(LDADD) -runqsw_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) +pack_test_DEPENDENCIES = $(top_builddir)/src/api/libslurm.o DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp am__depfiles_maybe = depfiles @@ -120,8 +108,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = bitstring-test.c log-test.c pack-test.c runqsw.c -DIST_SOURCES = bitstring-test.c log-test.c pack-test.c runqsw.c +SOURCES = bitstring-test.c log-test.c pack-test.c +DIST_SOURCES = bitstring-test.c log-test.c pack-test.c ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -166,9 +154,7 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -ELAN_LIBS = @ELAN_LIBS@ EXEEXT = @EXEEXT@ -FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ FGREP = @FGREP@ GREP = @GREP@ GTK_CFLAGS = @GTK_CFLAGS@ @@ -176,8 +162,6 @@ GTK_LIBS = @GTK_LIBS@ HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ HAVEPGCONFIG = @HAVEPGCONFIG@ HAVE_AIX = @HAVE_AIX@ -HAVE_ELAN = @HAVE_ELAN@ -HAVE_FEDERATION = @HAVE_FEDERATION@ HAVE_MAN2HTML = @HAVE_MAN2HTML@ HAVE_NRT = @HAVE_NRT@ HAVE_OPENSSL = @HAVE_OPENSSL@ @@ -331,14 +315,8 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign -@HAVE_ELAN_FALSE@elan_testprogs = -@HAVE_ELAN_TRUE@elan_testprogs = runqsw -@HAVE_ELAN_FALSE@elan_lib = -@HAVE_ELAN_TRUE@elan_lib = $(top_builddir)/src/plugins/switch/elan/switch_elan.la INCLUDES = -I$(top_srcdir) -LDADD = $(top_builddir)/src/api/libslurm.o -ldl\ - $(elan_lib) - +LDADD = $(top_builddir)/src/api/libslurm.o -ldl all: all-am .SUFFIXES: @@ -391,9 +369,6 @@ log-test$(EXEEXT): $(log_test_OBJECTS) $(log_test_DEPENDENCIES) pack-test$(EXEEXT): $(pack_test_OBJECTS) $(pack_test_DEPENDENCIES) @rm -f pack-test$(EXEEXT) $(LINK) $(pack_test_OBJECTS) $(pack_test_LDADD) $(LIBS) -runqsw$(EXEEXT): $(runqsw_OBJECTS) $(runqsw_DEPENDENCIES) - @rm -f runqsw$(EXEEXT) - $(LINK) $(runqsw_OBJECTS) $(runqsw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -404,7 +379,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstring-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log-test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pack-test.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runqsw.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -- GitLab From f30ccaa1dc19ee4b8c484461d2e99ee23854f244 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 11:49:18 -0700 Subject: [PATCH 110/614] Remove some vestigial logic --- src/common/slurm_step_layout.c | 44 ++++++++-------------------------- 1 file changed, 10 insertions(+), 34 deletions(-) diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index ffc0e2a9c9..55db052b9c 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -164,11 +164,10 @@ slurm_step_layout_t *fake_slurm_step_layout_create( { uint32_t cpn = 1; int cpu_cnt = 0, cpu_inx = 0, i, j; -/* char *name = NULL; */ hostlist_t hl = NULL; slurm_step_layout_t *step_layout = NULL; - if((node_cnt <= 0) || (task_cnt <= 0 && !cpus_per_node) || !tlist) { + if ((node_cnt <= 0) || (task_cnt <= 0 && !cpus_per_node) || !tlist) { error("there is a problem with your fake_step_layout request\n" "node_cnt = %u, task_cnt = %u, tlist = %s", node_cnt, task_cnt, tlist); @@ -177,7 +176,7 @@ slurm_step_layout_t *fake_slurm_step_layout_create( hl = hostlist_create(tlist); /* make out how many cpus there are on each node */ - if(task_cnt > 0) + if (task_cnt > 0) cpn = (task_cnt + node_cnt - 1) / node_cnt; step_layout = xmalloc(sizeof(slurm_step_layout_t)); @@ -185,17 +184,15 @@ slurm_step_layout_t *fake_slurm_step_layout_create( step_layout->node_cnt = node_cnt; step_layout->tasks = xmalloc(sizeof(uint16_t) * node_cnt); step_layout->tids = xmalloc(sizeof(uint32_t *) * node_cnt); -/* step_layout->node_addr = */ -/* xmalloc(sizeof(slurm_addr_t) * node_cnt); */ step_layout->task_cnt = 0; - for (i=0; inode_cnt; i++) { - if(cpus_per_node && cpu_count_reps) { + for (i = 0; i < step_layout->node_cnt; i++) { + if (cpus_per_node && cpu_count_reps) { step_layout->tasks[i] = cpus_per_node[cpu_inx]; step_layout->tids[i] = xmalloc(sizeof(uint32_t) * step_layout->tasks[i]); - for (j=0; jtasks[i]; j++) + for (j = 0; j < step_layout->tasks[i]; j++) step_layout->tids[i][j] = step_layout->task_cnt++; @@ -205,7 +202,7 @@ slurm_step_layout_t *fake_slurm_step_layout_create( cpu_cnt = 0; } } else { - if(step_layout->task_cnt >= task_cnt) { + if (step_layout->task_cnt >= task_cnt) { step_layout->tasks[i] = 0; step_layout->tids[i] = NULL; } else { @@ -213,7 +210,7 @@ slurm_step_layout_t *fake_slurm_step_layout_create( step_layout->tids[i] = xmalloc(sizeof(uint32_t) * cpn); - for (j=0; jtids[i][j] = step_layout->task_cnt++; if(step_layout->task_cnt >= task_cnt) { @@ -223,26 +220,9 @@ slurm_step_layout_t *fake_slurm_step_layout_create( } } } -/* name = hostlist_shift(hl); */ -/* if(!name) { */ -/* error("fake_slurm_step_layout_create: " */ -/* "We don't have the correct nodelist."); */ -/* goto error; */ -/* } */ -/* if(slurm_conf_get_addr(name, &step_layout->node_addr[i]) == */ -/* SLURM_ERROR) { */ -/* error("fake_slurm_step_layout_create: " */ -/* "we didn't get an addr for host %s.", name); */ - -/* } */ -/* free(name); */ } hostlist_destroy(hl); return step_layout; -/* error: */ -/* hostlist_destroy(hl); */ -/* slurm_step_layout_destroy(step_layout); */ -/* return NULL; */ } @@ -252,8 +232,8 @@ extern slurm_step_layout_t *slurm_step_layout_copy( slurm_step_layout_t *step_layout) { slurm_step_layout_t *layout; - int i=0; - if(!step_layout) + int i = 0; + if (!step_layout) return NULL; layout = xmalloc(sizeof(slurm_step_layout_t)); @@ -262,16 +242,12 @@ extern slurm_step_layout_t *slurm_step_layout_copy( layout->task_cnt = step_layout->task_cnt; layout->task_dist = step_layout->task_dist; -/* layout->node_addr = xmalloc(sizeof(slurm_addr_t) * layout->node_cnt); */ -/* memcpy(layout->node_addr, step_layout->node_addr, */ -/* (sizeof(slurm_addr_t) * layout->node_cnt)); */ - layout->tasks = xmalloc(sizeof(uint16_t) * layout->node_cnt); memcpy(layout->tasks, step_layout->tasks, (sizeof(uint16_t) * layout->node_cnt)); layout->tids = xmalloc(sizeof(uint32_t *) * layout->node_cnt); - for (i=0; inode_cnt; i++) { + for (i = 0; i < layout->node_cnt; i++) { layout->tids[i] = xmalloc(sizeof(uint32_t) * layout->tasks[i]); memcpy(layout->tids[i], step_layout->tids[i], (sizeof(uint32_t) * layout->tasks[i])); -- GitLab From ff1611f78594b51890401f86523170da1c61d4fc Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 11:49:37 -0700 Subject: [PATCH 111/614] Fix fake step credential for modified switch call --- src/api/step_ctx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index 0775543190..2a56666fee 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -205,7 +205,6 @@ slurm_step_ctx_create_no_alloc (const slurm_step_ctx_params_t *step_params, int sock = -1; short port = 0; int errnum = 0; - int cyclic = (step_params->task_dist == SLURM_DIST_CYCLIC); /* First copy the user's step_params into a step request struct */ step_req = _create_step_request(step_params); @@ -238,7 +237,8 @@ slurm_step_ctx_create_no_alloc (const slurm_step_ctx_params_t *step_params, if (switch_build_jobinfo(step_resp->switch_job, step_resp->step_layout->node_list, step_resp->step_layout->tasks, - cyclic, step_req->network) < 0) + step_resp->step_layout->tids, + step_req->network) < 0) fatal("switch_build_jobinfo: %m"); -- GitLab From b95f6753209ffc6487bcb7f73432948327cd66e2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 14:51:12 -0700 Subject: [PATCH 112/614] This gets IP V6 address in node info Log IP V6 address read from NRT and pass it from slurmctld. --- src/plugins/switch/nrt/nrt.c | 74 +++++++++++++++++++++++++++--------- 1 file changed, 55 insertions(+), 19 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4aa4a7f5db..32fc243c4f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -55,7 +55,10 @@ # error "Must have libnrt to compile this module!" #endif +#include +#include #include +#include #include "slurm/slurm_errno.h" #include "src/common/slurm_xlator.h" @@ -98,6 +101,7 @@ typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; in_addr_t ipv4_addr; + struct in6_addr ipv6_addr; nrt_logical_id_t lid; nrt_network_id_t network_id; nrt_port_id_t port_id; @@ -159,13 +163,13 @@ static int _allocate_windows_all(int adapter_cnt, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space); + bool user_space, bool ip_v6); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space); + bool user_space, bool ip_v6); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -740,7 +744,7 @@ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space) + nrt_logical_id_t base_lid, bool user_space, bool ip_v6) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; @@ -779,8 +783,14 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ip_table += task_id; ip_table->node_number = node_id; ip_table->task_id = task_id; - memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, - sizeof(in_addr_t)); + if (ip_v6) { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, + sizeof(struct in6_addr)); + } else { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, sizeof(in_addr_t)); + } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; @@ -825,7 +835,7 @@ static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space) + nrt_logical_id_t base_lid, bool user_space, bool ip_v6) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; @@ -877,8 +887,13 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, ip_table += task_id; ip_table->node_number = node_id; ip_table->task_id = task_id; - memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, - sizeof(in_addr_t)); + if (ip_v6) { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, sizeof(struct in6_addr)); + } else { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, sizeof(in_addr_t)); + } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; ib_table = (nrt_ib_task_info_t *) tableinfo[0].table; @@ -1010,7 +1025,7 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) int i, j; struct slurm_nrt_adapter *a; slurm_nrt_window_t *w; - unsigned char *p; + char addr_str[128]; assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); @@ -1023,9 +1038,10 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_name: %s", a->adapter_name); info(" adapter_type: %s", _adapter_type_str(a->adapter_type)); - p = (unsigned char *) &a->ipv4_addr; - info(" ipv4_addr: %d.%d.%d.%d", p[0], p[1], p[2], p[3]); - info(" ipv6_addr: TBD"); + inet_ntop(AF_INET, &a->ipv4_addr, addr_str, sizeof(addr_str)); + info(" ipv4_addr: %s", addr_str); + inet_ntop(AF_INET6, &a->ipv6_addr, addr_str, sizeof(addr_str)); + info(" ipv6_addr: %s", addr_str); info(" lid: %u", a->lid); info(" network_id: %lu", a->network_id); info(" port_id: %hu", a->port_id); @@ -1446,19 +1462,24 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) _adapter_type_str(query_adapter_info.adapter_type), adapter_info.num_ports); for (k = 0; k < adapter_info.num_ports; k++) { - unsigned char *p; - p = (unsigned char *) &adapter_info.port[k]. - ipv4_addr; + char addr_v4_str[128], addr_v6_str[128]; + inet_ntop(AF_INET, + &adapter_info.port[k].ipv4_addr, + addr_v4_str, sizeof(addr_v4_str)); + inet_ntop(AF_INET6, + &adapter_info.port[k].ipv6_addr, + addr_v6_str, sizeof(addr_v6_str)); info("port_id:%hu status:%s lid:%u " "network_id:%lu special:%lu " - "ipv4_addr:%d.%d.%d.%d", + "ipv4_addr:%s ipv6_addr:%s/%hu", adapter_info.port[k].port_id, _port_status_str(adapter_info.port[k]. status), adapter_info.port[k].lid, adapter_info.port[k].network_id, adapter_info.port[k].special, - p[0], p[1], p[2], p[3]); + addr_v4_str, addr_v6_str, + adapter_info.port[k].ipv6_prefix_len); } #endif for (k = 0; k < adapter_info.num_ports; k++) { @@ -1466,6 +1487,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; adapter_ptr->ipv4_addr = adapter_info.port[k]. ipv4_addr; + adapter_ptr->ipv6_addr = adapter_info.port[k]. + ipv6_addr; adapter_ptr->lid = adapter_info.port[k].lid; adapter_ptr->network_id = adapter_info.port[k]. network_id; @@ -1479,6 +1502,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) (adapter_info.num_ports > 0)) { adapter_ptr->ipv4_addr = adapter_info.port[0]. ipv4_addr; + adapter_ptr->ipv6_addr = adapter_info.port[0]. + ipv6_addr; } } if (status_array) { @@ -1545,6 +1570,8 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) dummy16 = a->adapter_type; pack16(dummy16, buf); /* adapter_type is an int */ pack32(a->ipv4_addr, buf); + for (j = 0; j < 4; j++) + pack32(a->ipv6_addr.in6_u.u6_addr32[j], buf); pack32(a->lid, buf); pack64(a->network_id, buf); pack8(a->port_id, buf); @@ -1586,6 +1613,7 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) NRT_MAX_ADAPTER_NAME_LEN); da->adapter_type = sa->adapter_type; da->ipv4_addr = sa->ipv4_addr; + da->ipv6_addr = sa->ipv6_addr; da->lid = sa->lid; da->network_id = sa->network_id; da->port_id = sa->port_id; @@ -1630,6 +1658,8 @@ _fake_unpack_adapters(Buf buf) goto unpack_error; safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); + for (j = 0; j < 4; j++) + safe_unpack32(&dummy32, buf); safe_unpack32(&dummy32, buf); safe_unpack64(&dummy64, buf); safe_unpack8 (&dummy8, buf); @@ -1735,6 +1765,10 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack16(&dummy16, buf); tmp_a->adapter_type = dummy16; /* adapter_type is an int */ safe_unpack32(&tmp_a->ipv4_addr, buf); + for (j = 0; j < 4; j++) { + safe_unpack32(&tmp_a->ipv6_addr.in6_u.u6_addr32[j], + buf); + } safe_unpack32(&tmp_a->lid, buf); safe_unpack64(&tmp_a->network_id, buf); safe_unpack8(&tmp_a->port_id, buf); @@ -2033,7 +2067,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->job_key, adapter_type, base_lid, - jp->user_space); + jp->user_space, + ip_v6); } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, @@ -2042,7 +2077,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->job_key, adapter_type, base_lid, - jp->user_space); + jp->user_space, + ip_v6); } if (rc != SLURM_SUCCESS) { _unlock(); -- GitLab From fe86b8f589690ea22e0b0314797e9cb0dad71df6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 16:38:38 -0700 Subject: [PATCH 113/614] gets switch/nrt IP V6 logic in place --- src/plugins/switch/nrt/nrt.c | 73 ++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 24 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 32fc243c4f..e4eb6d58af 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -137,7 +137,7 @@ struct slurm_nrt_jobinfo { /* pid from getpid() */ nrt_job_key_t job_key; uint8_t bulk_xfer; /* flag */ - uint8_t ip_v6; /* flag */ + uint8_t ip_v6; /* flag *///FIXME uint8_t user_space; /* flag */ char *protocol; /* MPI, UPC, LAPI, PAMI, etc. */ uint16_t tables_per_task; @@ -197,14 +197,16 @@ static void _lock(void); static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, - nrt_adapter_t adapter_type, Buf buf); + nrt_adapter_t adapter_type, Buf buf, + bool ip_v6); static char * _port_status_str(nrt_port_status_t status); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, - nrt_adapter_t adapter_type, Buf buf); + nrt_adapter_t adapter_type, Buf buf, + bool ip_v6); static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo); static int _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, @@ -1082,7 +1084,7 @@ _print_libstate(const slurm_nrt_libstate_t *l) } /* Used by: all */ static void -_print_table(void *table, int size, nrt_adapter_t adapter_type) +_print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) { int i; @@ -1114,15 +1116,20 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type) } else if ((adapter_type == NRT_IPONLY) || (adapter_type == NRT_HPCE)) { /* HPC Ethernet */ nrt_ip_task_info_t *ip_tbl_ptr; - unsigned char *p; + char addr_str[128]; ip_tbl_ptr = table; ip_tbl_ptr += i; info(" task_id: %u", ip_tbl_ptr->task_id); info(" node_number: %u", ip_tbl_ptr->node_number); - p = (unsigned char *) &ip_tbl_ptr->ip.ipv4_addr; - info(" ipv4_addr: %d.%d.%d.%d", - p[0], p[1], p[2], p[3]); - info(" ipv6_addr: TBD"); + if (ip_v4) { + inet_ntop(AF_INET, &ip_tbl_ptr->ip.ipv4_addr, + addr_str, sizeof(addr_str)); + info(" ipv4_addr: %s", addr_str); + } else { + inet_ntop(AF_INET6, &ip_tbl_ptr->ip.ipv6_addr, + addr_str, sizeof(addr_str)); + info(" ipv6_addr: %s", addr_str); + } } else { fatal("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); @@ -1164,7 +1171,8 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) else adapter_type = NRT_IPONLY; _print_table(j->tableinfo[i].table, - j->tableinfo[i].table_length, adapter_type); + j->tableinfo[i].table_length, adapter_type, + (j->ip_v6==0)); } info("--End Jobinfo--"); } @@ -1199,7 +1207,7 @@ _print_load_table(nrt_cmd_load_table_t *load_table) else adapter_type = NRT_IPONLY; _print_table(load_table->per_task_input, table_info->num_tasks, - adapter_type); + adapter_type, table_info->is_ipv4); info("--- End load table ---"); } #endif @@ -2107,9 +2115,9 @@ fail: static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf) + Buf buf, bool ip_v6) { - int i; + int i, j; pack32(tableinfo->table_length, buf); if (adapter_type == NRT_IB) { @@ -2130,8 +2138,15 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, ip_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ip_tbl_ptr++) { - packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, - sizeof(in_addr_t), buf); + if (ip_v6) { + for (j = 0; j < 4; j++) { + pack32(ip_tbl_ptr->ip.ipv6_addr. + in6_u.u6_addr32[j], buf); + } + } else { + packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, + sizeof(in_addr_t), buf); + } pack32(ip_tbl_ptr->node_number, buf); pack16(ip_tbl_ptr->reserved, buf); pack32(ip_tbl_ptr->task_id, buf); @@ -2186,7 +2201,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) adapter_type = NRT_IPONLY; else adapter_type = j->tableinfo[i].adapter_type; - _pack_tableinfo(&j->tableinfo[i], adapter_type, buf); + _pack_tableinfo(&j->tableinfo[i], adapter_type, buf, j->ip_v6); } return SLURM_SUCCESS; @@ -2195,11 +2210,11 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) /* return 0 on success, -1 on failure */ static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf) + Buf buf, bool ip_v6) { uint32_t size; char *name_ptr; - int i; + int i, j; safe_unpack32(&tableinfo->table_length, buf); if (adapter_type == NRT_IB) { @@ -2227,10 +2242,18 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, ip_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ip_tbl_ptr++) { - safe_unpackmem((char *) &ip_tbl_ptr->ip.ipv4_addr, - &size, buf); - if (size != sizeof(in_addr_t)) - goto unpack_error; + if (ip_v6) { + for (j = 0; j < 4; j++) { + safe_unpack32(&ip_tbl_ptr->ip.ipv6_addr. + in6_u.u6_addr32[j], buf); + } + } else { + safe_unpackmem((char *) + &ip_tbl_ptr->ip.ipv4_addr, + &size, buf); + if (size != sizeof(in_addr_t)) + goto unpack_error; + } safe_unpack32(&ip_tbl_ptr->node_number, buf); safe_unpack16(&ip_tbl_ptr->reserved, buf); safe_unpack32(&ip_tbl_ptr->task_id, buf); @@ -2296,7 +2319,8 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) adapter_type = NRT_IPONLY; else adapter_type = j->tableinfo[i].adapter_type; - if (_unpack_tableinfo(&j->tableinfo[i], adapter_type, buf)) + if (_unpack_tableinfo(&j->tableinfo[i], adapter_type, buf, + j->ip_v6)) goto unpack_error; } @@ -2627,7 +2651,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) else adapter_type = NRT_IPONLY; _print_table(jp->tableinfo[i].table, - jp->tableinfo[i].table_length, adapter_type); + jp->tableinfo[i].table_length, adapter_type, + jp->ip_v6); #endif adapter_name = jp->tableinfo[i].adapter_name; if (jp->user_space) { -- GitLab From 745b550609b98e994a745dc08f2d751a1addb180 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 16:53:24 -0700 Subject: [PATCH 114/614] Change some switch/nrt variable names --- src/plugins/switch/nrt/nrt.c | 84 ++++++++++++++--------------- src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 12 +++-- 3 files changed, 50 insertions(+), 48 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e4eb6d58af..00c97c2f37 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -137,7 +137,7 @@ struct slurm_nrt_jobinfo { /* pid from getpid() */ nrt_job_key_t job_key; uint8_t bulk_xfer; /* flag */ - uint8_t ip_v6; /* flag *///FIXME + uint8_t ip_v4; /* flag */ uint8_t user_space; /* flag */ char *protocol; /* MPI, UPC, LAPI, PAMI, etc. */ uint16_t tables_per_task; @@ -163,13 +163,13 @@ static int _allocate_windows_all(int adapter_cnt, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space, bool ip_v6); + bool user_space, bool ip_v4); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space, bool ip_v6); + bool user_space, bool ip_v4); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -198,7 +198,7 @@ static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, Buf buf, - bool ip_v6); + bool ip_v4); static char * _port_status_str(nrt_port_status_t status); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); @@ -206,7 +206,7 @@ static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, Buf buf, - bool ip_v6); + bool ip_v4); static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo); static int _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, @@ -746,7 +746,7 @@ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space, bool ip_v6) + nrt_logical_id_t base_lid, bool user_space, bool ip_v4) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; @@ -785,13 +785,13 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ip_table += task_id; ip_table->node_number = node_id; ip_table->task_id = task_id; - if (ip_v6) { + if (ip_v4) { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, sizeof(in_addr_t)); + } else { memcpy(&ip_table->ip.ipv6_addr, &adapter->ipv6_addr, sizeof(struct in6_addr)); - } else { - memcpy(&ip_table->ip.ipv4_addr, - &adapter->ipv4_addr, sizeof(in_addr_t)); } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; @@ -837,7 +837,7 @@ static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, int node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space, bool ip_v6) + nrt_logical_id_t base_lid, bool user_space, bool ip_v4) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; @@ -889,12 +889,12 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, ip_table += task_id; ip_table->node_number = node_id; ip_table->task_id = task_id; - if (ip_v6) { - memcpy(&ip_table->ip.ipv6_addr, - &adapter->ipv6_addr, sizeof(struct in6_addr)); - } else { + if (ip_v4) { memcpy(&ip_table->ip.ipv4_addr, &adapter->ipv4_addr, sizeof(in_addr_t)); + } else { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, sizeof(struct in6_addr)); } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; @@ -1155,7 +1155,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %hu", j->bulk_xfer); - info(" ip_v6: %hu", j->ip_v6); + info(" ip_v4: %hu", j->ip_v4); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); info(" protocol: %s", j->protocol); @@ -1172,7 +1172,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) adapter_type = NRT_IPONLY; _print_table(j->tableinfo[i].table, j->tableinfo[i].table_length, adapter_type, - (j->ip_v6==0)); + j->ip_v4); } info("--End Jobinfo--"); } @@ -1952,7 +1952,7 @@ _next_key(void) extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, - char *adapter_name, bool bulk_xfer, bool ip_v6, + char *adapter_name, bool bulk_xfer, bool ip_v4, bool user_space, char *protocol) { int nnodes, nprocs = 0; @@ -1978,7 +1978,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, slurm_seterrno_ret(EINVAL); jp->bulk_xfer = (uint8_t) bulk_xfer; - jp->ip_v6 = (uint8_t) ip_v6; + jp->ip_v4 = (uint8_t) ip_v4; jp->job_key = _next_key(); jp->nodenames = hostlist_copy(hl); jp->num_tasks = nprocs; @@ -2076,7 +2076,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, adapter_type, base_lid, jp->user_space, - ip_v6); + ip_v4); } else { rc = _allocate_window_single(adapter_name, jp->tableinfo, @@ -2086,7 +2086,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, adapter_type, base_lid, jp->user_space, - ip_v6); + ip_v4); } if (rc != SLURM_SUCCESS) { _unlock(); @@ -2115,7 +2115,7 @@ fail: static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf, bool ip_v6) + Buf buf, bool ip_v4) { int i, j; @@ -2138,14 +2138,14 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, ip_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ip_tbl_ptr++) { - if (ip_v6) { + if (ip_v4) { + packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, + sizeof(in_addr_t), buf); + } else { for (j = 0; j < 4; j++) { pack32(ip_tbl_ptr->ip.ipv6_addr. in6_u.u6_addr32[j], buf); } - } else { - packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, - sizeof(in_addr_t), buf); } pack32(ip_tbl_ptr->node_number, buf); pack16(ip_tbl_ptr->reserved, buf); @@ -2189,7 +2189,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); - pack8(j->ip_v6, buf); + pack8(j->ip_v4, buf); pack8(j->user_space, buf); pack16(j->tables_per_task, buf); pack64(j->network_id, buf); @@ -2201,7 +2201,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) adapter_type = NRT_IPONLY; else adapter_type = j->tableinfo[i].adapter_type; - _pack_tableinfo(&j->tableinfo[i], adapter_type, buf, j->ip_v6); + _pack_tableinfo(&j->tableinfo[i], adapter_type, buf, j->ip_v4); } return SLURM_SUCCESS; @@ -2210,7 +2210,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) /* return 0 on success, -1 on failure */ static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf, bool ip_v6) + Buf buf, bool ip_v4) { uint32_t size; char *name_ptr; @@ -2242,17 +2242,17 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, ip_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ip_tbl_ptr++) { - if (ip_v6) { - for (j = 0; j < 4; j++) { - safe_unpack32(&ip_tbl_ptr->ip.ipv6_addr. - in6_u.u6_addr32[j], buf); - } - } else { + if (ip_v4) { safe_unpackmem((char *) &ip_tbl_ptr->ip.ipv4_addr, &size, buf); if (size != sizeof(in_addr_t)) goto unpack_error; + } else { + for (j = 0; j < 4; j++) { + safe_unpack32(&ip_tbl_ptr->ip.ipv6_addr. + in6_u.u6_addr32[j], buf); + } } safe_unpack32(&ip_tbl_ptr->node_number, buf); safe_unpack16(&ip_tbl_ptr->reserved, buf); @@ -2305,7 +2305,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); safe_unpack32(&j->job_key, buf); safe_unpack8(&j->bulk_xfer, buf); - safe_unpack8(&j->ip_v6, buf); + safe_unpack8(&j->ip_v4, buf); safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); safe_unpack64(&j->network_id, buf); @@ -2320,7 +2320,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) else adapter_type = j->tableinfo[i].adapter_type; if (_unpack_tableinfo(&j->tableinfo[i], adapter_type, buf, - j->ip_v6)) + j->ip_v4)) goto unpack_error; } @@ -2652,7 +2652,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) adapter_type = NRT_IPONLY; _print_table(jp->tableinfo[i].table, jp->tableinfo[i].table_length, adapter_type, - jp->ip_v6); + jp->ip_v4); #endif adapter_name = jp->tableinfo[i].adapter_name; if (jp->user_space) { @@ -2683,12 +2683,12 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) if (jp->user_space) { table_info.is_ipv4 = 0; table_info.is_user_space = 1; - } else if (jp->ip_v6) { - table_info.is_ipv4 = 0; - table_info.is_user_space = 0; - } else { + } else if (jp->ip_v4) { table_info.is_ipv4 = 1; table_info.is_user_space = 0; + } else { /* IP V6 */ + table_info.is_ipv4 = 0; + table_info.is_user_space = 0; } table_info.context_id = 0; table_info.table_id = TBD0; diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 9ec1fc2dd5..2a2e33edf1 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -99,7 +99,7 @@ extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, bool bulk_xfer, - bool ip_v6, bool user_space, char *protocol); + bool ip_v4, bool user_space, char *protocol); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index a04c5fd643..c326a73e8f 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -394,7 +394,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, char *network) { hostlist_t list = NULL; - bool bulk_xfer = false, ip_v6 = false, user_space = false; + bool bulk_xfer = false, ip_v4 = true, user_space = false; bool sn_all; int err; char *adapter_name = NULL, *protocol = "mpi"; @@ -418,14 +418,16 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (network && (strstr(network, "ipv4") || strstr(network, "IPV4"))) { - ip_v6 = false; + ip_v4 = true; user_space = false; } if (network && (strstr(network, "ipv6") || - strstr(network, "IPV6"))) - ip_v6 = true; + strstr(network, "IPV6"))) { + ip_v4 = false; + user_space = false; + } if (network && (strstr(network, "us") || @@ -462,7 +464,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, tasks_per_node, tids, sn_all, adapter_name, - bulk_xfer, ip_v6, user_space, protocol); + bulk_xfer, ip_v4, user_space, protocol); hostlist_destroy(list); xfree(adapter_name); -- GitLab From 527bcd1a58cfd87b9a127c3d0b199c3ff302ff34 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 26 Apr 2012 17:06:05 -0700 Subject: [PATCH 115/614] Handle error in NRT data to switch/nrt If an adapter reports more switch windows than the maximum reported for the device type then return an error and reset the counts. Otherwise an invalid memory reference is generated. --- src/plugins/switch/nrt/nrt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 00c97c2f37..e3bcb50f4a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1422,6 +1422,15 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) _adapter_type_str(adapter_status.adapter_type)); _print_adapter_status(&adapter_status); #endif + if (window_count > max_windows) { + error("nrt_command(status_adapter, %s, %s): " + "window_count > max_windows (%u > %hu)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count, max_windows); + window_count = max_windows; + } adapter_ptr = &n->adapter_list[n->adapter_count]; strncpy(adapter_ptr->adapter_name, adapter_status.adapter_name, @@ -3105,6 +3114,15 @@ nrt_clear_node_state(void) _win_state_str((*status_array)[k].state)); } #endif + if (window_count > max_windows) { + error("nrt_command(status_adapter, %s, %s): " + "window_count > max_windows (%u > %hu)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count, max_windows); + window_count = max_windows; + } for (k = 0; k < window_count; k++) { clean_window.adapter_name = adapter_names. adapter_names[j]; -- GitLab From 4bb84c77621a608d212645da9e36a8640df472a7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 30 Apr 2012 17:09:24 -0700 Subject: [PATCH 116/614] Start of select/serial development work Start from select/cons_res and in the process of removing unused logic. --- configure | 3 +- configure.ac | 1 + doc/html/configurator.html.in | 2 + doc/man/man5/slurm.conf.5 | 8 +- slurm.spec | 1 + src/plugins/select/Makefile.am | 3 +- src/plugins/select/Makefile.in | 5 +- src/plugins/select/serial/Makefile.am | 15 + src/plugins/select/serial/Makefile.in | 656 ++++++ src/plugins/select/serial/dist_tasks.c | 306 +++ src/plugins/select/serial/dist_tasks.h | 53 + src/plugins/select/serial/job_test.c | 2434 +++++++++++++++++++++ src/plugins/select/serial/job_test.h | 69 + src/plugins/select/serial/select_serial.c | 2126 ++++++++++++++++++ src/plugins/select/serial/select_serial.h | 132 ++ src/salloc/salloc.c | 4 +- src/srun/allocate.c | 4 +- 17 files changed, 5812 insertions(+), 10 deletions(-) create mode 100644 src/plugins/select/serial/Makefile.am create mode 100644 src/plugins/select/serial/Makefile.in create mode 100644 src/plugins/select/serial/dist_tasks.c create mode 100644 src/plugins/select/serial/dist_tasks.h create mode 100644 src/plugins/select/serial/job_test.c create mode 100644 src/plugins/select/serial/job_test.h create mode 100644 src/plugins/select/serial/select_serial.c create mode 100644 src/plugins/select/serial/select_serial.h diff --git a/configure b/configure index 78957f23c4..a8a0facb16 100755 --- a/configure +++ b/configure @@ -22266,7 +22266,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sdiag/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/mpi/pmi2/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html doc/html/configurator.easy.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sdiag/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/rms/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/select/serial/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile src/plugins/switch/federation/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/mpi/pmi2/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html doc/html/configurator.easy.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -23663,6 +23663,7 @@ do "src/plugins/select/cray/libalps/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/cray/libalps/Makefile" ;; "src/plugins/select/cray/libemulate/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/cray/libemulate/Makefile" ;; "src/plugins/select/linear/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/linear/Makefile" ;; + "src/plugins/select/serial/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/select/serial/Makefile" ;; "src/plugins/switch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/Makefile" ;; "src/plugins/switch/elan/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/elan/Makefile" ;; "src/plugins/switch/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/switch/none/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8607e38c9b..90f80dcac3 100644 --- a/configure.ac +++ b/configure.ac @@ -520,6 +520,7 @@ AC_CONFIG_FILES([Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile + src/plugins/select/serial/Makefile src/plugins/switch/Makefile src/plugins/switch/elan/Makefile src/plugins/switch/none/Makefile diff --git a/doc/html/configurator.html.in b/doc/html/configurator.html.in index be6e768128..c61add2a48 100644 --- a/doc/html/configurator.html.in +++ b/doc/html/configurator.html.in @@ -640,6 +640,8 @@ Select one value for SelectType:
    resource allocation, does not manage individual processor allocation
    BlueGene: For IBM Blue Gene systems only
    + +Serial: Supports single CPU job allocations only

    Task Launch

    diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index d627e2d426..c32549e3bb 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1,4 +1,4 @@ -.TH "slurm.conf" "6" "April 2012" "slurm.conf 2.4" "Slurm configuration file" +.TH "slurm.conf" "5" "April 2012" "slurm.conf 2.4" "Slurm configuration file" .SH "NAME" slurm.conf \- Slurm configuration file @@ -1538,6 +1538,10 @@ Note that whole nodes can be allocated to jobs for selected partitions by using the \fIShared=Exclusive\fR option. See the partition \fBShared\fR parameter for more information. .TP +\fBselect/serial\fR +for allocating resources to single CPU jobs only. +Highly optimized for maximum throughput. +.TP \fBselect/bluegene\fR for a three\-dimensional BlueGene system. The default value is "select/bluegene" for BlueGene systems. @@ -3360,7 +3364,7 @@ See the \fBlogrotate\fR man page for more details. .SH "COPYING" Copyright (C) 2002\-2007 The Regents of the University of California. Copyright (C) 2008\-2010 Lawrence Livermore National Security. -Portions Copyright (C) 2010 SchedMD . +Portions Copyright (C) 2010-2012 SchedMD . Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). CODE\-OCEC\-09\-009. All rights reserved. .LP diff --git a/slurm.spec b/slurm.spec index af6c25e9b1..338d6bda94 100644 --- a/slurm.spec +++ b/slurm.spec @@ -736,6 +736,7 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/slurm/select_cray.so %{_libdir}/slurm/select_cons_res.so %{_libdir}/slurm/select_linear.so +%{_libdir}/slurm/select_serial.so %{_libdir}/slurm/switch_none.so %{_libdir}/slurm/task_none.so %{_libdir}/slurm/topology_3d_torus.so diff --git a/src/plugins/select/Makefile.am b/src/plugins/select/Makefile.am index dbcc83bb8b..a70777315b 100644 --- a/src/plugins/select/Makefile.am +++ b/src/plugins/select/Makefile.am @@ -4,7 +4,7 @@ if WITH_CXX BLUEGENE = bluegene endif -SUBDIRS = $(BLUEGENE) cons_res cray linear +SUBDIRS = $(BLUEGENE) cons_res cray linear serial # Each plugin here needs a plugin_id, here are the currect plug_ids # for each plugin. @@ -15,3 +15,4 @@ SUBDIRS = $(BLUEGENE) cons_res cray linear # bgq = 103 # cray + linear = 104 # cray + cons_res = 105 ==> Not current possible on Cray with ALPS/BASIL. +# serial = 106 diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index ed7d457eab..8c971feb3e 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -99,7 +99,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = bluegene cons_res cray linear +DIST_SUBDIRS = bluegene cons_res cray linear serial DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -328,7 +328,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_CXX_TRUE@BLUEGENE = bluegene -SUBDIRS = $(BLUEGENE) cons_res cray linear +SUBDIRS = $(BLUEGENE) cons_res cray linear serial all: all-recursive .SUFFIXES: @@ -685,6 +685,7 @@ uninstall-am: # bgq = 103 # cray + linear = 104 # cray + cons_res = 105 ==> Not current possible on Cray with ALPS/BASIL. +# serial = 106 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/src/plugins/select/serial/Makefile.am b/src/plugins/select/serial/Makefile.am new file mode 100644 index 0000000000..5ebea9d033 --- /dev/null +++ b/src/plugins/select/serial/Makefile.am @@ -0,0 +1,15 @@ +# Makefile for select/serial plugin + +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +pkglib_LTLIBRARIES = select_serial.la + +# serial job resource selection plugin. +select_serial_la_SOURCES = select_serial.c select_serial.h \ + dist_tasks.c dist_tasks.h \ + job_test.c job_test.h +select_serial_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/select/serial/Makefile.in b/src/plugins/select/serial/Makefile.in new file mode 100644 index 0000000000..d281f113fb --- /dev/null +++ b/src/plugins/select/serial/Makefile.in @@ -0,0 +1,656 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for select/serial plugin + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/select/serial +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_dlfcn.m4 \ + $(top_srcdir)/auxdir/x_ac_elan.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_federation.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +select_serial_la_LIBADD = +am_select_serial_la_OBJECTS = select_serial.lo dist_tasks.lo \ + job_test.lo +select_serial_la_OBJECTS = $(am_select_serial_la_OBJECTS) +select_serial_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(select_serial_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(select_serial_la_SOURCES) +DIST_SOURCES = $(select_serial_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ELAN_LIBS = @ELAN_LIBS@ +EXEEXT = @EXEEXT@ +FEDERATION_LDFLAGS = @FEDERATION_LDFLAGS@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_ELAN = @HAVE_ELAN@ +HAVE_FEDERATION = @HAVE_FEDERATION@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +pkglib_LTLIBRARIES = select_serial.la + +# serial job resource selection plugin. +select_serial_la_SOURCES = select_serial.c select_serial.h \ + dist_tasks.c dist_tasks.h \ + job_test.c job_test.h + +select_serial_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/select/serial/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/select/serial/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +select_serial.la: $(select_serial_la_OBJECTS) $(select_serial_la_DEPENDENCIES) + $(select_serial_la_LINK) -rpath $(pkglibdir) $(select_serial_la_OBJECTS) $(select_serial_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dist_tasks.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_test.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/select_serial.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/select/serial/dist_tasks.c b/src/plugins/select/serial/dist_tasks.c new file mode 100644 index 0000000000..80cf78c0ce --- /dev/null +++ b/src/plugins/select/serial/dist_tasks.c @@ -0,0 +1,306 @@ +/*****************************************************************************\ + * dist_tasks.c - Assign task count to {socket,core,thread} or CPU + * resources + ***************************************************************************** + * Copyright (C) 2006-2008 Hewlett-Packard Development Company, L.P. + * Written by Susanne M. Balle, + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#include "select_serial.h" +#include "dist_tasks.h" + +/* _compute_task_c_b_task_dist - compute the number of tasks on each + * of the node for the cyclic and block distribution. We need to do + * this in the case of consumable resources so that we have an exact + * count for the needed hardware resources which will be used later to + * update the different used resources per node structures. + * + * The most common case is when we have more resources than needed. In + * that case we just "take" what we need and "release" the remaining + * resources for other jobs. In the case where we oversubscribe the + * CPUs/Logical processors resources we keep the initial set of + * resources. + * + * IN/OUT job_ptr - pointer to job being scheduled. The per-node + * job_res->cpus array is recomputed here. + * + */ +static int _compute_c_b_task_dist(struct job_record *job_ptr) +{ + job_resources_t *job_res = job_ptr->job_resrcs; + + if (!job_res || !job_res->cpus) { + error("cons_res: _compute_c_b_task_dist given NULL job_res"); + return SLURM_ERROR; + } + if (job_res->nhosts != 1) { + error("cons_res: _compute_c_b_task_dist given nhosts==%u", + job_res->nhosts); + return SLURM_ERROR; + } + + xfree(job_res->cpus); + job_res->cpus = xmalloc(sizeof(uint16_t)); + job_res->cpus[0] = 1; + + return SLURM_SUCCESS; +} + +/* sync up core bitmap with new CPU count using a best-fit approach + * on the available sockets + * + * The CPU array contains the distribution of CPUs, which can include + * virtual CPUs (hyperthreads) + */ +static void _block_sync_core_bitmap(struct job_record *job_ptr, + const uint16_t cr_type) +{ + uint32_t c, s, i, j, n, size, csize, core_cnt; + uint16_t cpus, num_bits, vpus = 1; + job_resources_t *job_res = job_ptr->job_resrcs; + bool alloc_cores = false, alloc_sockets = false; + uint16_t ntasks_per_core = 0xffff; + int* sockets_cpu_cnt; + bool* sockets_used; + uint16_t sockets_nb; + uint16_t ncores_nb; + uint16_t nsockets_nb; + uint16_t req_cpus,best_fit_cpus = 0; + uint32_t best_fit_location = 0; + bool sufficient,best_fit_sufficient; + + if (!job_res) + return; + + size = bit_size(job_res->node_bitmap); + csize = bit_size(job_res->core_bitmap); + + sockets_nb = select_node_record[0].sockets; + sockets_cpu_cnt = xmalloc(sockets_nb * sizeof(int)); + sockets_used = xmalloc(sockets_nb * sizeof(bool)); + + for (c = 0, i = 0, n = 0; n < size; n++) { + + if (bit_test(job_res->node_bitmap, n) == 0) + continue; + + core_cnt = 0; + ncores_nb = select_node_record[n].cores; + nsockets_nb = select_node_record[n].sockets; + num_bits = nsockets_nb * ncores_nb; + + if ((c + num_bits) > csize) + fatal ("cons_res: _block_sync_core_bitmap index error"); + + cpus = job_res->cpus[i]; + vpus = MIN(select_node_record[n].vpus, ntasks_per_core); + + if ( nsockets_nb > sockets_nb) { + sockets_nb = nsockets_nb; + xrealloc(sockets_cpu_cnt, sockets_nb * sizeof(int)); + xrealloc(sockets_used,sockets_nb * sizeof(bool)); + } + + /* count cores provided by each socket */ + for (s = 0; s < nsockets_nb; s++) { + sockets_cpu_cnt[s]=0; + sockets_used[s]=false; + for ( j = c + (s * ncores_nb) ; + j < c + ((s+1) * ncores_nb) ; + j++ ) { + if ( bit_test(job_res->core_bitmap,j) ) + sockets_cpu_cnt[s]++; + } + } + + /* select cores in the sockets using a best-fit approach */ + while( cpus > 0 ) { + + best_fit_cpus = 0; + best_fit_sufficient = false; + + /* compute still required cores on the node */ + req_cpus = cpus / vpus; + if ( cpus % vpus ) + req_cpus++; + + /* search for the best socket, */ + /* starting from the last one to let more room */ + /* in the first one for system usage */ + for ( s = nsockets_nb - 1 ; (int) s >= (int) 0 ; s-- ) { + sufficient = sockets_cpu_cnt[s] >= req_cpus ; + if ( (best_fit_cpus == 0) || + (sufficient && !best_fit_sufficient ) || + (sufficient && (sockets_cpu_cnt[s] < + best_fit_cpus)) || + (!sufficient && (sockets_cpu_cnt[s] > + best_fit_cpus)) ) { + best_fit_cpus = sockets_cpu_cnt[s]; + best_fit_location = s; + best_fit_sufficient = sufficient; + } + } + + /* check that we have found a usable socket */ + if ( best_fit_cpus == 0 ) + break; + + debug3("dist_task: best_fit : using node[%u]:" + "socket[%u] : %u cores available", + n, best_fit_location, + sockets_cpu_cnt[best_fit_location]); + + /* select socket cores from last to first */ + /* socket[0]:Core[0] would be the last one */ + sockets_used[best_fit_location] = true; + + for ( j = c + ((best_fit_location+1) * ncores_nb) + - 1 ; + (int) j >= (int) (c + (best_fit_location * + ncores_nb)) ; + j-- ) { + + /* + * if no more cpus to select + * release remaining cores unless + * we are allocating whole sockets + */ + if ( cpus == 0 && alloc_sockets ) { + if ( bit_test(job_res->core_bitmap,j) ) + core_cnt++; + continue; + } + else if ( cpus == 0 ) { + bit_clear(job_res->core_bitmap,j); + continue; + } + + /* + * remove cores from socket count and + * cpus count using hyperthreading requirement + */ + if ( bit_test(job_res->core_bitmap,j) ) { + sockets_cpu_cnt[best_fit_location]--; + core_cnt++; + if (cpus < vpus) + cpus = 0; + else + cpus -= vpus; + } + + } + + /* loop again if more cpus required */ + if ( cpus > 0 ) + continue; + + /* release remaining cores of the unused sockets */ + for (s = 0; s < nsockets_nb; s++) { + if ( sockets_used[s] ) + continue; + bit_nclear(job_res->core_bitmap, + c+(s*ncores_nb), + c+((s+1)*ncores_nb)-1); + } + + } + + if (cpus > 0) { + /* cpu count should NEVER be greater than the number + * of set bits in the core bitmap for a given node */ + fatal("cons_res: cpus computation error"); + } + + /* adjust cpus count of the current node */ + if ((alloc_cores || alloc_sockets) && + (select_node_record[n].vpus > 1)) { + job_res->cpus[i] = core_cnt * + select_node_record[n].vpus; + } + i++; + + /* move c to the next node in core_bitmap */ + c += num_bits; + + } + + xfree(sockets_cpu_cnt); + xfree(sockets_used); +} + + +/* To effectively deal with heterogeneous nodes, we fake a cyclic + * distribution to figure out how many cpus are needed on each node. + * + * This routine is a slightly modified "version" of the routine + * _task_layout_block in src/common/dist_tasks.c. We do not need to + * assign tasks to job->hostid[] and job->tids[][] at this point so + * the cpu allocation is the same for cyclic and block. + * + * For the consumable resources support we need to determine what + * "node/CPU/Core/thread"-tuplets will be allocated for a given job. + * In the past we assumed that we only allocated one task per CPU (at + * that point the lowest level of logical processor) and didn't allow + * the use of overcommit. We have changed this philosophy and are now + * allowing people to overcommit their resources and expect the system + * administrator to enable the task/affinity plug-in which will then + * bind all of a job's tasks to its allocated resources thereby + * avoiding interference between co-allocated running jobs. + * + * In the consumable resources environment we need to determine the + * layout schema within slurmctld. + * + * We have a core_bitmap of all available cores. All we're doing here + * is removing cores that are not needed based on the task count, and + * the choice of cores to remove is based on the distribution: + * - "cyclic" removes cores "evenly", starting from the last socket, + * - "block" removes cores from the "last" socket(s) + * - "plane" removes cores "in chunks" + */ +extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type) +{ + int error_code; + + /* 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"); + return error_code; + } + + /* now sync up the core_bitmap with the allocated 'cpus' array + * based on the given distribution AND resource setting */ + _block_sync_core_bitmap(job_ptr, cr_type); + return SLURM_SUCCESS; +} diff --git a/src/plugins/select/serial/dist_tasks.h b/src/plugins/select/serial/dist_tasks.h new file mode 100644 index 0000000000..f2cbe28de3 --- /dev/null +++ b/src/plugins/select/serial/dist_tasks.h @@ -0,0 +1,53 @@ +/*****************************************************************************\ + * dist_tasks.h - Assign task count for each resources + ***************************************************************************** + * Copyright (C) 2006 Hewlett-Packard Development Company, L.P. + * Written by Susanne M. Balle, + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _SERIAL_DIST_TASKS_H +#define _SERIAL_DIST_TASKS_H + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#if HAVE_STRING_H +# include +#endif + +#include "select_serial.h" + +int cr_dist(struct job_record *job_ptr,const uint16_t cr_type); + +#endif /* !_SERIAL_DIST_TASKS_H */ diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c new file mode 100644 index 0000000000..0a955494a1 --- /dev/null +++ b/src/plugins/select/serial/job_test.c @@ -0,0 +1,2434 @@ +/*****************************************************************************\ + * job_test.c + ***************************************************************************** + * Copyright (C) 2005-2008 Hewlett-Packard Development Company, L.P. + * Written by Susanne M. Balle , who borrowed heavily + * from select/linear + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# if HAVE_STDINT_H +# include +# endif +# if HAVE_INTTYPES_H +# include +# endif +#endif +#include + +#include "dist_tasks.h" +#include "job_test.h" +#include "select_serial.h" + +static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint32_t cr_node_cnt, + uint16_t *cpu_cnt); +static int _eval_nodes_topo(struct job_record *job_ptr, bitstr_t *node_map, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint32_t cr_node_cnt, + uint16_t *cpu_cnt); + +/* _allocate_sockets - Given the job requirements, determine which sockets + * from the given node can be allocated (if any) to this + * job. Returns the number of cpus that can be used by + * this node AND a core-level bitmap of the selected + * sockets. + * + * IN job_ptr - pointer to job requirements + * IN/OUT core_map - core_bitmap of available cores + * IN node_i - index of node to be evaluated + */ +uint16_t _allocate_sockets(struct job_record *job_ptr, bitstr_t *core_map, + const uint32_t node_i) +{ + uint16_t cpu_count = 0, cpu_cnt = 0; + uint16_t si, cps, avail_cpus = 0, num_tasks = 0; + uint32_t core_begin = cr_get_coremap_offset(node_i); + uint32_t core_end = cr_get_coremap_offset(node_i+1); + uint32_t c; + uint16_t cpus_per_task = job_ptr->details->cpus_per_task; + uint16_t *used_cores, *free_cores, free_core_count = 0; + uint16_t i, j, sockets = select_node_record[node_i].sockets; + uint16_t cores_per_socket = select_node_record[node_i].cores; + uint16_t threads_per_core = select_node_record[node_i].vpus; + uint16_t min_cores = 1, min_sockets = 1, ntasks_per_socket = 0; + uint16_t ntasks_per_core = 0xffff; + + if (job_ptr->details && job_ptr->details->mc_ptr) { + multi_core_data_t *mc_ptr = job_ptr->details->mc_ptr; + if (mc_ptr->cores_per_socket != (uint16_t) NO_VAL) { + min_cores = mc_ptr->cores_per_socket; + } + if (mc_ptr->sockets_per_node != (uint16_t) NO_VAL){ + min_sockets = mc_ptr->sockets_per_node; + } + if (mc_ptr->ntasks_per_core) { + ntasks_per_core = mc_ptr->ntasks_per_core; + } + if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && + (mc_ptr->threads_per_core < ntasks_per_core)) { + ntasks_per_core = mc_ptr->threads_per_core; + } + ntasks_per_socket = mc_ptr->ntasks_per_socket; + } + + /* These are the job parameters that we must respect: + * + * job_ptr->details->mc_ptr->cores_per_socket (cr_core|cr_socket) + * - min # of cores per socket to allocate to this job + * job_ptr->details->mc_ptr->sockets_per_node (cr_core|cr_socket) + * - min # of sockets per node to allocate to this job + * job_ptr->details->mc_ptr->ntasks_per_core (cr_core|cr_socket) + * - number of tasks to launch per core + * job_ptr->details->mc_ptr->ntasks_per_socket (cr_core|cr_socket) + * - number of tasks to launch per socket + * + * job_ptr->details->ntasks_per_node (all cr_types) + * - total number of tasks to launch on this node + * job_ptr->details->cpus_per_task (all cr_types) + * - number of cpus to allocate per task + * + * These are the hardware constraints: + * cpus = sockets * cores_per_socket * threads_per_core + * + * These are the cores/sockets that are available: core_map + * + * NOTE: currently we only allocate at the socket level, the core + * level, or the cpu level. When hyperthreading is enabled + * in the BIOS, then there can be more than one thread/cpu + * per physical core. + * + * PROCEDURE: + * + * Step 1: Determine the current usage data: used_cores[], + * used_core_count, free_cores[], free_core_count + * + * Step 2: For core-level and socket-level: apply sockets_per_node + * and cores_per_socket to the "free" cores. + * + * Step 3: Compute task-related data: ntasks_per_core, + * ntasks_per_socket, ntasks_per_node and cpus_per_task + * and determine the number of tasks to run on this node + * + * Step 4: Mark the allocated resources in the job_cores bitmap + * and return "num_tasks" from Step 3. + * + * + * For socket and core counts, start by assuming that all available + * resources will be given to the job. Check min_* to ensure that + * there's enough resources. Reduce the resource count to match max_* + * (if necessary). Also reduce resource count (if necessary) to + * match ntasks_per_resource. + * + * NOTE: Memory is not used as a constraint here - should it? + * If not then it needs to be done somewhere else! + */ + + + /* Step 1: create and compute core-count-per-socket + * arrays and total core counts */ + free_cores = xmalloc(sockets * sizeof(uint16_t)); + used_cores = xmalloc(sockets * sizeof(uint16_t)); + + for (c = core_begin; c < core_end; c++) { + i = (uint16_t) (c - core_begin) / cores_per_socket; + if (bit_test(core_map, c)) { + free_cores[i]++; + free_core_count++; + } else { + used_cores[i]++; + } + } + /* if a socket is already in use, it cannot be used + * by this job */ + for (i = 0; i < sockets; i++) { + if (used_cores[i]) { + free_core_count -= free_cores[i]; + used_cores[i] += free_cores[i]; + free_cores[i] = 0; + } + } + xfree(used_cores); + used_cores = NULL; + + /* Step 2: check min_cores per socket and min_sockets per node */ + j = 0; + for (i = 0; i < sockets; i++) { + if (free_cores[i] < min_cores) { + /* cannot use this socket */ + free_core_count -= free_cores[i]; + free_cores[i] = 0; + continue; + } + /* count this socket as usable */ + j++; + } + if (j < min_sockets) { + /* cannot use this node */ + num_tasks = 0; + goto fini; + } + + if (free_core_count < 1) { + /* no available resources on this node */ + num_tasks = 0; + goto fini; + } + + /* Step 3: Compute task-related data: + * ntasks_per_socket, ntasks_per_node and cpus_per_task + * to determine the number of tasks to run on this node + * + * Note: cpus_per_task and ntasks_per_core need to play nice + * 2 tasks_per_core vs. 2 cpus_per_task + */ + avail_cpus = 0; + num_tasks = 0; + threads_per_core = MIN(threads_per_core, ntasks_per_core); + + for (i = 0; i < sockets; i++) { + uint16_t tmp = free_cores[i] * threads_per_core; + avail_cpus += tmp; + if (ntasks_per_socket) + num_tasks += MIN(tmp, ntasks_per_socket); + else + num_tasks += tmp; + } + + /* If job requested exclusive rights to the node don't do the + * min here since it will make it so we don't allocate the + * entire node. */ + if (job_ptr->details->ntasks_per_node && job_ptr->details->shared) + num_tasks = MIN(num_tasks, job_ptr->details->ntasks_per_node); + + if (cpus_per_task < 2) { + avail_cpus = num_tasks; + cps = num_tasks; + } else { + j = avail_cpus / cpus_per_task; + num_tasks = MIN(num_tasks, j); + if (job_ptr->details->ntasks_per_node) + avail_cpus = num_tasks * cpus_per_task; + } + if ((job_ptr->details->ntasks_per_node && + (num_tasks < job_ptr->details->ntasks_per_node)) || + (job_ptr->details->pn_min_cpus && + (avail_cpus < job_ptr->details->pn_min_cpus))) { + /* insufficient resources on this node */ + num_tasks = 0; + goto fini; + } + + /* Step 4 - make sure that ntasks_per_socket is enforced when + * allocating cores + */ + cps = num_tasks; + if (ntasks_per_socket > 1) { + cps = ntasks_per_socket; + if (cpus_per_task > 1) + cps = ntasks_per_socket * cpus_per_task; + } + si = 9999; + for (c = core_begin; c < core_end && avail_cpus > 0; c++) { + if (bit_test(core_map, c) == 0) + continue; + i = (uint16_t) (c - core_begin) / cores_per_socket; + if (free_cores[i] > 0) { + /* this socket has free cores, but make sure + * we don't use more than are needed for + * ntasks_per_socket */ + if (si != i) { + si = i; + cpu_cnt = threads_per_core; + } else { + if (cpu_cnt >= cps) { + /* do not allocate this core */ + bit_clear(core_map, c); + continue; + } + cpu_cnt += threads_per_core; + } + free_cores[i]--; + /* we have to ensure that cpu_count + * is not bigger than avail_cpus due to + * hyperthreading or this would break + * the selection logic providing more + * cpus than allowed after task-related data + * processing of stage 3 + */ + if (avail_cpus >= threads_per_core) { + avail_cpus -= threads_per_core; + cpu_count += threads_per_core; + } + else { + cpu_count += avail_cpus; + avail_cpus = 0; + } + + } else + bit_clear(core_map, c); + } + /* clear leftovers */ + if (c < core_end) + bit_nclear(core_map, c, core_end-1); + +fini: + /* if num_tasks == 0 then clear all bits on this node */ + if (!num_tasks) { + bit_nclear(core_map, core_begin, core_end-1); + cpu_count = 0; + } + xfree(free_cores); + return cpu_count; +} + + +/* _allocate_cores - Given the job requirements, determine which cores + * from the given node can be allocated (if any) to this + * job. Returns the number of cpus that can be used by + * this node AND a bitmap of the selected cores. + * + * IN job_ptr - pointer to job requirements + * IN/OUT core_map - bitmap of cores available for use/selected for use + * IN node_i - index of node to be evaluated + * IN cpu_type - if true, allocate CPUs rather than cores + */ +uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, + const uint32_t node_i, bool cpu_type) +{ + uint16_t cpu_count = 0, avail_cpus = 0, num_tasks = 0; + uint32_t core_begin = cr_get_coremap_offset(node_i); + uint32_t core_end = cr_get_coremap_offset(node_i+1); + uint32_t c; + uint16_t cpus_per_task = job_ptr->details->cpus_per_task; + uint16_t *free_cores, free_core_count = 0; + uint16_t i, j, sockets = select_node_record[node_i].sockets; + uint16_t cores_per_socket = select_node_record[node_i].cores; + uint16_t threads_per_core = select_node_record[node_i].vpus; + uint16_t min_cores = 1, min_sockets = 1; + uint16_t ntasks_per_core = 0xffff; + + if (job_ptr->details && job_ptr->details->mc_ptr) { + multi_core_data_t *mc_ptr = job_ptr->details->mc_ptr; + if (mc_ptr->cores_per_socket != (uint16_t) NO_VAL) { + min_cores = mc_ptr->cores_per_socket; + } + if (mc_ptr->sockets_per_node != (uint16_t) NO_VAL){ + min_sockets = mc_ptr->sockets_per_node; + } + if (mc_ptr->ntasks_per_core) { + ntasks_per_core = mc_ptr->ntasks_per_core; + } + if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && + (mc_ptr->threads_per_core < ntasks_per_core)) { + ntasks_per_core = mc_ptr->threads_per_core; + } + } + + /* These are the job parameters that we must respect: + * + * job_ptr->details->mc_ptr->cores_per_socket (cr_core|cr_socket) + * - number of cores per socket to allocate to this jobb + * job_ptr->details->mc_ptr->sockets_per_node (cr_core|cr_socket) + * - number of sockets per node to allocate to this job + * job_ptr->details->mc_ptr->ntasks_per_core (cr_core|cr_socket) + * - number of tasks to launch per core + * job_ptr->details->mc_ptr->ntasks_per_socket (cr_core|cr_socket) + * - number of tasks to launch per socket + * + * job_ptr->details->ntasks_per_node (all cr_types) + * - total number of tasks to launch on this node + * job_ptr->details->cpus_per_task (all cr_types) + * - number of cpus to allocate per task + * + * These are the hardware constraints: + * cpus = sockets * cores_per_socket * threads_per_core + * + * These are the cores that are available for use: core_map + * + * NOTE: currently we only allocate at the socket level, the core + * level, or the cpu level. When hyperthreading is enabled + * in the BIOS, then there can be more than one thread/cpu + * per physical core. + * + * PROCEDURE: + * + * Step 1: Determine the current usage data: free_cores[] and + * free_core_count + * + * Step 2: check min_cores per socket and min_sockets per node + * + * Step 3: Compute task-related data: use ntasks_per_core, + * ntasks_per_node and cpus_per_task to determine + * the number of tasks that can run on this node + * + * Step 4: Mark the allocated resources in the job_cores bitmap + * and return "num_tasks" from Step 3. + * + * + * Start by assuming that all "free" cores will be given to the + * job. Check min_* to ensure that there's enough resources. + * Reduce the core count to match max_* (if necessary). Also, + * reduce the core count (if necessary) to match ntasks_per_core. + * Note that we're not processing ntasks_per_socket, because the + * srun manpage says that ntasks_per_socket is only valid for + * CR_SOCKET. + */ + + /* Step 1: create and compute core-count-per-socket + * arrays and total core counts */ + free_cores = xmalloc(sockets * sizeof(uint16_t)); + + for (c = core_begin; c < core_end; c++) { + i = (uint16_t) (c - core_begin) / cores_per_socket; + if (bit_test(core_map, c)) { + free_cores[i]++; + free_core_count++; + } + } + + /* Step 2: check min_cores per socket and min_sockets per node */ + j = 0; + for (i = 0; i < sockets; i++) { + if (free_cores[i] < min_cores) { + /* cannot use this socket */ + free_core_count -= free_cores[i]; + free_cores[i] = 0; + continue; + } + /* count this socket as usable */ + j++; + } + if (j < min_sockets) { + /* cannot use this node */ + num_tasks = 0; + goto fini; + } + + if (free_core_count < 1) { + /* no available resources on this node */ + num_tasks = 0; + goto fini; + } + + /* Step 3: Compute task-related data: use ntasks_per_core, + * ntasks_per_node and cpus_per_task to determine + * the number of tasks to run on this node + * + * Note: cpus_per_task and ntasks_per_core need to play nice + * 2 tasks_per_core vs. 2 cpus_per_task + */ + threads_per_core = MIN(threads_per_core, ntasks_per_core); + num_tasks = avail_cpus = threads_per_core; + + /* convert from PER_CORE to TOTAL_FOR_NODE */ + avail_cpus *= free_core_count; + num_tasks *= free_core_count; + + /* If job requested exclusive rights to the node don't do the min here + * since it will make it so we don't allocate the entire node */ + if (job_ptr->details->ntasks_per_node && job_ptr->details->shared) + num_tasks = MIN(num_tasks, job_ptr->details->ntasks_per_node); + + if (cpus_per_task < 2) { + avail_cpus = num_tasks; + } else { + j = avail_cpus / cpus_per_task; + num_tasks = MIN(num_tasks, j); + if (job_ptr->details->ntasks_per_node) + avail_cpus = num_tasks * cpus_per_task; + } + + if ((job_ptr->details->ntasks_per_node && + (num_tasks < job_ptr->details->ntasks_per_node) && + (job_ptr->details->overcommit == 0)) || + (job_ptr->details->pn_min_cpus && + (avail_cpus < job_ptr->details->pn_min_cpus))) { + /* insufficient resources on this node */ + num_tasks = 0; + goto fini; + } + + /* Step 4 */ + for (c = core_begin; c < core_end && avail_cpus > 0; c++) { + if (bit_test(core_map, c) == 0) + continue; + i = (uint16_t) (c - core_begin) / cores_per_socket; + if (free_cores[i] == 0) + bit_clear(core_map, c); + else { + free_cores[i]--; + /* we have to ensure that cpu_count + * is not bigger than avail_cpus due to + * hyperthreading or this would break + * the selection logic providing more + * cpus than allowed after task-related data + * processing of stage 3 + */ + if (avail_cpus >= threads_per_core) { + avail_cpus -= threads_per_core; + cpu_count += threads_per_core; + } + else { + cpu_count += avail_cpus; + avail_cpus = 0; + } + } + } + + /* clear leftovers */ + if (c < core_end) + bit_nclear(core_map, c, core_end-1); + +fini: + if (!num_tasks) { + bit_nclear(core_map, core_begin, core_end-1); + cpu_count = 0; + } + xfree(free_cores); + return cpu_count; +} + + +/* + * _can_job_run_on_node - Given the job requirements, determine which + * resources from the given node (if any) can be + * allocated to this job. Returns the number of + * cpus that can be used by this node and a bitmap + * of available resources for allocation. + * NOTE: This process does NOT support overcommitting resources + * + * IN job_ptr - pointer to job requirements + * IN/OUT core_map - core_bitmap of available cores + * IN n - index of node to be evaluated + * IN cr_type - Consumable Resource setting + * IN test_only - ignore allocated memory check + * + * NOTE: The returned cpu_count may be less than the number of set bits in + * core_map for the given node. The cr_dist functions will determine + * which bits to deselect from the core_map to match the cpu_count. + */ +uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, + const uint32_t node_i, + struct node_use_record *node_usage, + uint16_t cr_type, + bool test_only) +{ + uint16_t cpus; + uint32_t avail_mem, req_mem, gres_cpus; + int core_start_bit, core_end_bit; + struct node_record *node_ptr = node_record_table_ptr + node_i; + List gres_list; + + if (!test_only && IS_NODE_COMPLETING(node_ptr)) { + /* Do not allocate more jobs to nodes with completing jobs */ + cpus = 0; + return cpus; + } + + if (cr_type & CR_CORE) + cpus = _allocate_cores(job_ptr, core_map, node_i, false); + else if (cr_type & CR_SOCKET) + cpus = _allocate_sockets(job_ptr, core_map, node_i); + else + cpus = _allocate_cores(job_ptr, core_map, node_i, true); + + core_start_bit = cr_get_coremap_offset(node_i); + core_end_bit = cr_get_coremap_offset(node_i+1) - 1; + node_ptr = select_node_record[node_i].node_ptr; + + if (cr_type & CR_MEMORY) { + /* Memory Check: check pn_min_memory to see if: + * - this node has enough memory (MEM_PER_CPU == 0) + * - there are enough free_cores (MEM_PER_CPU = 1) + */ + req_mem = job_ptr->details->pn_min_memory & ~MEM_PER_CPU; + avail_mem = select_node_record[node_i].real_memory; + if (!test_only) + avail_mem -= node_usage[node_i].alloc_memory; + if (job_ptr->details->pn_min_memory & MEM_PER_CPU) { + /* memory is per-cpu */ + while ((cpus > 0) && ((req_mem * cpus) > avail_mem)) + cpus--; + if ((cpus < job_ptr->details->ntasks_per_node) || + ((job_ptr->details->cpus_per_task > 1) && + (cpus < job_ptr->details->cpus_per_task))) + cpus = 0; + /* FIXME: Need to recheck min_cores, etc. here */ + } else { + /* memory is per node */ + if (req_mem > avail_mem) + cpus = 0; + } + } + + if (node_usage[node_i].gres_list) + gres_list = node_usage[node_i].gres_list; + else + gres_list = node_ptr->gres_list; + gres_cpus = gres_plugin_job_test(job_ptr->gres_list, + gres_list, test_only, + core_map, core_start_bit, + core_end_bit, job_ptr->job_id, + node_ptr->name); + if ((gres_cpus < job_ptr->details->ntasks_per_node) || + ((job_ptr->details->cpus_per_task > 1) && + (gres_cpus < job_ptr->details->cpus_per_task))) + gres_cpus = 0; + if (gres_cpus < cpus) + cpus = gres_cpus; + + if (cpus == 0) + bit_nclear(core_map, core_start_bit, core_end_bit); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: _can_job_run_on_node: %u cpus on %s(%d), " + "mem %u/%u", + cpus, select_node_record[node_i].node_ptr->name, + node_usage[node_i].node_state, + node_usage[node_i].alloc_memory, + select_node_record[node_i].real_memory); + } + + return cpus; +} + + +/* Test to see if a node already has running jobs for _other_ partitions. + * If (sharing_only) then only check sharing partitions. This is because + * the job was submitted to a single-row partition which does not share + * allocated CPUs with multi-row partitions. + */ +static int _is_node_busy(struct part_res_record *p_ptr, uint32_t node_i, + int sharing_only, struct part_record *my_part_ptr) +{ + uint32_t r, cpu_begin = cr_get_coremap_offset(node_i); + uint32_t i, cpu_end = cr_get_coremap_offset(node_i+1); + + for (; p_ptr; p_ptr = p_ptr->next) { + if (sharing_only && + ((p_ptr->num_rows < 2) || + (p_ptr->part_ptr == my_part_ptr))) + continue; + if (!p_ptr->row) + continue; + for (r = 0; r < p_ptr->num_rows; r++) { + if (!p_ptr->row[r].row_bitmap) + continue; + for (i = cpu_begin; i < cpu_end; i++) { + if (bit_test(p_ptr->row[r].row_bitmap, i)) + return 1; + } + } + } + return 0; +} + + +/* + * Determine which of these nodes are usable by this job + * + * Remove nodes from the bitmap that don't have enough memory or gres to + * support the job. + * + * Return SLURM_ERROR if a required node can't be used. + * + * if node_state = NODE_CR_RESERVED, clear bitmap (if node is required + * then should we return NODE_BUSY!?!) + * + * if node_state = NODE_CR_ONE_ROW, then this node can only be used by + * another NODE_CR_ONE_ROW job + * + * if node_state = NODE_CR_AVAILABLE AND: + * - job_node_req = NODE_CR_RESERVED, then we need idle nodes + * - job_node_req = NODE_CR_ONE_ROW, then we need idle or non-sharing nodes + */ +static int _verify_node_state(struct part_res_record *cr_part_ptr, + struct job_record *job_ptr, bitstr_t * bitmap, + uint16_t cr_type, + struct node_use_record *node_usage, + enum node_cr_state job_node_req) +{ + struct node_record *node_ptr; + uint32_t i, free_mem, gres_cpus, min_mem, size; + List gres_list; + + if (job_ptr->details->pn_min_memory & MEM_PER_CPU) { + uint16_t min_cpus; + min_mem = job_ptr->details->pn_min_memory & (~MEM_PER_CPU); + min_cpus = MAX(job_ptr->details->ntasks_per_node, + job_ptr->details->pn_min_cpus); + min_cpus = MAX(min_cpus, job_ptr->details->cpus_per_task); + if (min_cpus > 0) + min_mem *= min_cpus; + } else { + min_mem = job_ptr->details->pn_min_memory; + } + size = bit_size(bitmap); + for (i = 0; i < size; i++) { + if (!bit_test(bitmap, i)) + continue; + node_ptr = select_node_record[i].node_ptr; + + /* node-level memory check */ + if ((job_ptr->details->pn_min_memory) && + (cr_type & CR_MEMORY)) { + free_mem = select_node_record[i].real_memory; + free_mem -= node_usage[i].alloc_memory; + if (free_mem < min_mem) { + debug3("cons_res: _vns: node %s no mem %u < %u", + select_node_record[i].node_ptr->name, + free_mem, min_mem); + goto clear_bit; + } + } + + /* node-level gres check */ + if (node_usage[i].gres_list) + gres_list = node_usage[i].gres_list; + else + gres_list = node_ptr->gres_list; + gres_cpus = gres_plugin_job_test(job_ptr->gres_list, + gres_list, true, + NULL, 0, 0, job_ptr->job_id, + node_ptr->name); + if (gres_cpus == 0) { + debug3("cons_res: _vns: node %s lacks gres", + node_ptr->name); + goto clear_bit; + } + + /* exclusive node check */ + if (node_usage[i].node_state >= NODE_CR_RESERVED) { + debug3("cons_res: _vns: node %s in exclusive use", + node_ptr->name); + goto clear_bit; + + /* non-resource-sharing node check */ + } else if (node_usage[i].node_state >= NODE_CR_ONE_ROW) { + if ((job_node_req == NODE_CR_RESERVED) || + (job_node_req == NODE_CR_AVAILABLE)) { + debug3("cons_res: _vns: node %s non-sharing", + node_ptr->name); + goto clear_bit; + } + /* cannot use this node if it is running jobs + * in sharing partitions */ + if (_is_node_busy(cr_part_ptr, i, 1, + job_ptr->part_ptr)) { + debug3("cons_res: _vns: node %s sharing?", + node_ptr->name); + goto clear_bit; + } + + /* node is NODE_CR_AVAILABLE - check job request */ + } else { + if (job_node_req == NODE_CR_RESERVED) { + if (_is_node_busy(cr_part_ptr, i, 0, + job_ptr->part_ptr)) { + debug3("cons_res: _vns: node %s busy", + node_ptr->name); + goto clear_bit; + } + } else if (job_node_req == NODE_CR_ONE_ROW) { + /* cannot use this node if it is running jobs + * in sharing partitions */ + if (_is_node_busy(cr_part_ptr, i, 1, + job_ptr->part_ptr)) { + debug3("cons_res: _vns: node %s vbusy", + node_ptr->name); + goto clear_bit; + } + } + } + continue; /* node is usable, test next node */ + +clear_bit: /* This node is not usable by this job */ + bit_clear(bitmap, i); + if (job_ptr->details->req_node_bitmap && + bit_test(job_ptr->details->req_node_bitmap, i)) + return SLURM_ERROR; + + } + + return SLURM_SUCCESS; +} + + +/* given an "avail" node_bitmap, return a corresponding "avail" core_bitmap */ +bitstr_t *_make_core_bitmap(bitstr_t *node_map) +{ + uint32_t n, c, nodes, size; + uint32_t coff; + + nodes = bit_size(node_map); + size = cr_get_coremap_offset(nodes); + bitstr_t *core_map = bit_alloc(size); + if (!core_map) + return NULL; + + nodes = bit_size(node_map); + for (n = 0, c = 0; n < nodes; n++) { + if (bit_test(node_map, n)) { + coff = cr_get_coremap_offset(n+1); + while (c < coff) { + bit_set(core_map, c++); + } + } + } + return core_map; +} + + +/* + * Determine the number of CPUs that a given job can use on a specific node + * IN: job_ptr - pointer to job we are attempting to start + * IN: node_index - zero origin node being considered for use + * IN: cpu_cnt - array with count of CPU's available to job on each node + * RET: number of usable CPUs on the identified node + */ +static int _get_cpu_cnt(struct job_record *job_ptr, const int node_index, + uint16_t *cpu_cnt) +{ + int offset, cpus; + uint16_t *layout_ptr = job_ptr->details->req_node_layout; + + cpus = cpu_cnt[node_index]; + if (layout_ptr && + bit_test(job_ptr->details->req_node_bitmap, node_index)) { + offset = bit_get_pos_num(job_ptr->details->req_node_bitmap, + node_index); + cpus = MIN(cpus, layout_ptr[offset]); + } else if (layout_ptr) { + cpus = 0; /* should not happen? */ + } + + return cpus; +} + +/* Compute resource usage for the given job on all available resources + * + * IN: job_ptr - pointer to the job requesting resources + * IN: node_map - bitmap of available nodes + * IN/OUT: core_map - bitmap of available cores + * IN: cr_node_cnt - total number of nodes in the cluster + * IN: cr_type - resource type + * OUT: cpu_cnt - number of cpus that can be used by this job + * IN: test_only - ignore allocated memory check + */ +static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, + bitstr_t *core_map, uint32_t cr_node_cnt, + struct node_use_record *node_usage, + uint16_t cr_type, uint16_t **cpu_cnt_ptr, + bool test_only) +{ + uint16_t *cpu_cnt; + uint32_t n; + + cpu_cnt = xmalloc(cr_node_cnt * sizeof(uint16_t)); + for (n = 0; n < cr_node_cnt; n++) { + if (!bit_test(node_map, n)) + continue; + cpu_cnt[n] = _can_job_run_on_node(job_ptr, core_map, n, + node_usage, cr_type, + test_only); + } + *cpu_cnt_ptr = cpu_cnt; +} + +static bool _enough_nodes(int avail_nodes, int rem_nodes, + uint32_t min_nodes, uint32_t req_nodes) +{ + int needed_nodes; + + if (req_nodes > min_nodes) + needed_nodes = rem_nodes + min_nodes - req_nodes; + else + needed_nodes = rem_nodes; + + return (avail_nodes >= needed_nodes); +} + +static void _cpus_to_use(int *avail_cpus, int rem_cpus, int rem_nodes, + struct job_details *details_ptr, uint16_t *cpu_cnt) +{ + int resv_cpus; /* CPUs to be allocated on other nodes */ + + if (details_ptr->shared == 0) /* Use all CPUs on this node */ + return; + + resv_cpus = MAX((rem_nodes - 1), 0); + resv_cpus *= details_ptr->pn_min_cpus; /* At least 1 */ + rem_cpus -= resv_cpus; + + if (*avail_cpus > rem_cpus) { + *avail_cpus = MAX(rem_cpus, (int)details_ptr->pn_min_cpus); + *cpu_cnt = *avail_cpus; + } +} + +/* this is the heart of the selection process */ +static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint32_t cr_node_cnt, + uint16_t *cpu_cnt) +{ + int i, j, error_code = SLURM_ERROR; + int *consec_nodes; /* how many nodes we can add from this + * consecutive set of nodes */ + int *consec_cpus; /* how many nodes we can add from this + * consecutive set of nodes */ + int *consec_start; /* where this consecutive set starts (index) */ + int *consec_end; /* where this consecutive set ends (index) */ + int *consec_req; /* are nodes from this set required + * (in req_bitmap) */ + int consec_index, consec_size, sufficient; + int rem_cpus, rem_nodes; /* remaining resources desired */ + int total_cpus = 0; /* #CPUs allocated to job */ + int best_fit_nodes, best_fit_cpus, best_fit_req; + int best_fit_sufficient, best_fit_index = 0; + int avail_cpus, ll; /* ll = layout array index */ + bool required_node; + struct job_details *details_ptr = job_ptr->details; + bitstr_t *req_map = details_ptr->req_node_bitmap; + uint16_t *layout_ptr = details_ptr->req_node_layout; + + xassert(node_map); + if (cr_node_cnt != node_record_count) { + error("cons_res: node count inconsistent with slurmctld"); + return error_code; + } + if (bit_set_count(node_map) < min_nodes) + return error_code; + + if ((details_ptr->req_node_bitmap) && + (!bit_super_set(details_ptr->req_node_bitmap, node_map))) + return error_code; + + if (switch_record_cnt && switch_record_table) { + /* Perform optimized resource selection based upon topology */ + return _eval_nodes_topo(job_ptr, node_map, + min_nodes, max_nodes, req_nodes, + cr_node_cnt, cpu_cnt); + } + + consec_size = 50; /* start allocation for 50 sets of + * consecutive nodes */ + consec_cpus = xmalloc(sizeof(int) * consec_size); + consec_nodes = xmalloc(sizeof(int) * consec_size); + consec_start = xmalloc(sizeof(int) * consec_size); + consec_end = xmalloc(sizeof(int) * consec_size); + consec_req = xmalloc(sizeof(int) * consec_size); + + /* Build table with information about sets of consecutive nodes */ + consec_index = 0; + consec_cpus[consec_index] = consec_nodes[consec_index] = 0; + consec_req[consec_index] = -1; /* no required nodes here by default */ + + rem_cpus = details_ptr->min_cpus; + rem_nodes = MAX(min_nodes, req_nodes); + + for (i = 0, ll = -1; i < cr_node_cnt; i++) { + if (req_map) + required_node = bit_test(req_map, i); + else + required_node = false; + if (layout_ptr && required_node) + ll++; + if (bit_test(node_map, i)) { + if (consec_nodes[consec_index] == 0) + consec_start[consec_index] = i; + avail_cpus = cpu_cnt[i]; + if (layout_ptr && required_node) { + avail_cpus = MIN(avail_cpus, layout_ptr[ll]); + } else if (layout_ptr) { + avail_cpus = 0; /* should not happen? */ + } + if ((max_nodes > 0) && required_node) { + if (consec_req[consec_index] == -1) { + /* first required node in set */ + consec_req[consec_index] = i; + } + total_cpus += avail_cpus; + rem_cpus -= avail_cpus; + rem_nodes--; + /* leaving bitmap set, decrement max limit */ + max_nodes--; + } else { /* node not selected (yet) */ + bit_clear(node_map, i); + consec_cpus[consec_index] += avail_cpus; + consec_nodes[consec_index]++; + } + } else if (consec_nodes[consec_index] == 0) { + consec_req[consec_index] = -1; + /* already picked up any required nodes */ + /* re-use this record */ + } else { + consec_end[consec_index] = i - 1; + if (++consec_index >= consec_size) { + consec_size *= 2; + xrealloc(consec_cpus, sizeof(int)*consec_size); + xrealloc(consec_nodes,sizeof(int)*consec_size); + xrealloc(consec_start,sizeof(int)*consec_size); + xrealloc(consec_end, sizeof(int)*consec_size); + xrealloc(consec_req, sizeof(int)*consec_size); + } + consec_cpus[consec_index] = 0; + consec_nodes[consec_index] = 0; + consec_req[consec_index] = -1; + } + } + if (consec_nodes[consec_index] != 0) + consec_end[consec_index++] = i - 1; + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + for (i = 0; i < consec_index; i++) { + info("cons_res: eval_nodes:%d consec " + "c=%d n=%d b=%d e=%d r=%d", + i, consec_cpus[i], consec_nodes[i], + consec_start[i], consec_end[i], consec_req[i]); + } + } + + /* Compute CPUs already allocated to required nodes */ + if ((details_ptr->max_cpus != NO_VAL) && + (total_cpus > details_ptr->max_cpus)) { + info("Job %u can't use required nodes due to max CPU limit", + job_ptr->job_id); + goto fini; + } + + /* accumulate nodes from these sets of consecutive nodes until */ + /* sufficient resources have been accumulated */ + while (consec_index && (max_nodes > 0)) { + best_fit_cpus = best_fit_nodes = best_fit_sufficient = 0; + best_fit_req = -1; /* first required node, -1 if none */ + for (i = 0; i < consec_index; i++) { + if (consec_nodes[i] == 0) + continue; /* no usable nodes here */ + + if (details_ptr->contiguous && + details_ptr->req_node_bitmap && + (consec_req[i] == -1)) + break; /* not required nodes */ + + sufficient = (consec_cpus[i] >= rem_cpus) && + _enough_nodes(consec_nodes[i], rem_nodes, + min_nodes, req_nodes); + + /* if first possibility OR */ + /* contains required nodes OR */ + /* first set large enough for request OR */ + /* tightest fit (less resource waste) OR */ + /* nothing yet large enough, but this is biggest */ + if ((best_fit_nodes == 0) || + ((best_fit_req == -1) && (consec_req[i] != -1)) || + (sufficient && (best_fit_sufficient == 0)) || + (sufficient && (consec_cpus[i] < best_fit_cpus)) || + (!sufficient && (consec_cpus[i] > best_fit_cpus))) { + best_fit_cpus = consec_cpus[i]; + best_fit_nodes = consec_nodes[i]; + best_fit_index = i; + best_fit_req = consec_req[i]; + best_fit_sufficient = sufficient; + } + + if (details_ptr->contiguous && + details_ptr->req_node_bitmap) { + /* Must wait for all required nodes to be + * in a single consecutive block */ + int j, other_blocks = 0; + for (j = (i+1); j < consec_index; j++) { + if (consec_req[j] != -1) { + other_blocks = 1; + break; + } + } + if (other_blocks) { + best_fit_nodes = 0; + break; + } + } + } + if (best_fit_nodes == 0) + break; + + if (details_ptr->contiguous && + ((best_fit_cpus < rem_cpus) || + (!_enough_nodes(best_fit_nodes, rem_nodes, + min_nodes, req_nodes)))) + break; /* no hole large enough */ + if (best_fit_req != -1) { + /* This collection of nodes includes required ones + * select nodes from this set, first working up + * then down from the required nodes */ + for (i = best_fit_req; + i <= consec_end[best_fit_index]; i++) { + if ((max_nodes <= 0) || + ((rem_nodes <= 0) && (rem_cpus <= 0))) + break; + if (bit_test(node_map, i)) { + /* required node already in set */ + continue; + } + avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); + if (avail_cpus <= 0) + continue; + + /* This could result in 0, but if the user + * requested nodes here we will still give + * them and then the step layout will sort + * things out. */ + _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, + details_ptr, &cpu_cnt[i]); + total_cpus += avail_cpus; + /* enforce the max_cpus limit */ + if ((details_ptr->max_cpus != NO_VAL) && + (total_cpus > details_ptr->max_cpus)) { + debug2("1 can't use this node " + "since it would put us " + "over the limit"); + total_cpus -= avail_cpus; + continue; + } + bit_set(node_map, i); + rem_nodes--; + max_nodes--; + rem_cpus -= avail_cpus; + } + for (i = (best_fit_req - 1); + i >= consec_start[best_fit_index]; i--) { + if ((max_nodes <= 0) || + ((rem_nodes <= 0) && (rem_cpus <= 0))) + break; + if (bit_test(node_map, i)) + continue; + avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); + if (avail_cpus <= 0) + continue; + + /* This could result in 0, but if the user + * requested nodes here we will still give + * them and then the step layout will sort + * things out. */ + _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, + details_ptr, &cpu_cnt[i]); + total_cpus += avail_cpus; + /* enforce the max_cpus limit */ + if ((details_ptr->max_cpus != NO_VAL) && + (total_cpus > details_ptr->max_cpus)) { + debug2("2 can't use this node " + "since it would put us " + "over the limit"); + total_cpus -= avail_cpus; + continue; + } + rem_cpus -= avail_cpus; + bit_set(node_map, i); + rem_nodes--; + max_nodes--; + } + } else { + /* No required nodes, try best fit single node */ + int *cpus_array = NULL, array_len; + int best_fit = -1, best_size = 0; + int first = consec_start[best_fit_index]; + int last = consec_end[best_fit_index]; + if (rem_nodes <= 1) { + array_len = last - first + 1; + cpus_array = xmalloc(sizeof(int) * array_len); + for (i = first, j = 0; i <= last; i++, j++) { + if (bit_test(node_map, i)) + continue; + cpus_array[j] = _get_cpu_cnt(job_ptr, + i, cpu_cnt); + if (cpus_array[j] < rem_cpus) + continue; + if ((best_fit == -1) || + (cpus_array[j] < best_size)) { + best_fit = j; + best_size = cpus_array[j]; + if (best_size == rem_cpus) + break; + } + } + /* If we found a single node to use, + * clear cpu counts for all other nodes */ + for (i = first, j = 0; + ((i <= last) && (best_fit != -1)); + i++, j++) { + if (j != best_fit) + cpus_array[j] = 0; + } + } + + for (i = first, j = 0; i <= last; i++, j++) { + if ((max_nodes <= 0) || + ((rem_nodes <= 0) && (rem_cpus <= 0))) + break; + if (bit_test(node_map, i)) + continue; + + if (cpus_array) + avail_cpus = cpus_array[j]; + else { + avail_cpus = _get_cpu_cnt(job_ptr, i, + cpu_cnt); + } + if (avail_cpus <= 0) + continue; + + if ((max_nodes == 1) && + (avail_cpus < rem_cpus)) { + /* Job can only take one more node and + * this one has insufficient CPU */ + continue; + } + + /* This could result in 0, but if the user + * requested nodes here we will still give + * them and then the step layout will sort + * things out. */ + _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, + details_ptr, &cpu_cnt[i]); + total_cpus += avail_cpus; + /* enforce the max_cpus limit */ + if ((details_ptr->max_cpus != NO_VAL) && + (total_cpus > details_ptr->max_cpus)) { + debug2("3 can't use this node " + "since it would put us " + "over the limit"); + total_cpus -= avail_cpus; + continue; + } + rem_cpus -= avail_cpus; + bit_set(node_map, i); + rem_nodes--; + max_nodes--; + } + xfree(cpus_array); + } + + if (details_ptr->contiguous || + ((rem_nodes <= 0) && (rem_cpus <= 0))) { + error_code = SLURM_SUCCESS; + break; + } + consec_cpus[best_fit_index] = 0; + consec_nodes[best_fit_index] = 0; + } + + if (error_code && (rem_cpus <= 0) && + _enough_nodes(0, rem_nodes, min_nodes, req_nodes)) + error_code = SLURM_SUCCESS; + +fini: xfree(consec_cpus); + xfree(consec_nodes); + xfree(consec_start); + xfree(consec_end); + xfree(consec_req); + return error_code; +} + +/* + * A network topology aware version of _eval_nodes(). + * NOTE: The logic here is almost identical to that of _job_test_topo() + * in select_linear.c. Any bug found here is probably also there. + */ +static int _eval_nodes_topo(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint32_t cr_node_cnt, + uint16_t *cpu_cnt) +{ + bitstr_t **switches_bitmap; /* nodes on this switch */ + int *switches_cpu_cnt; /* total CPUs on switch */ + int *switches_node_cnt; /* total nodes on switch */ + int *switches_required; /* set if has required node */ + int leaf_switch_count = 0; /* Count of leaf node switches used */ + + bitstr_t *avail_nodes_bitmap = NULL; /* nodes on any switch */ + bitstr_t *req_nodes_bitmap = NULL; + int rem_cpus, rem_nodes; /* remaining resources desired */ + int avail_cpus; + int total_cpus = 0; /* #CPUs allocated to job */ + int i, j, rc = SLURM_SUCCESS; + int best_fit_inx, first, last; + int best_fit_nodes, best_fit_cpus; + int best_fit_location = 0, best_fit_sufficient; + bool sufficient; + long time_waiting = 0; + + if (job_ptr->req_switch) { + time_t time_now; + time_now = time(NULL); + if (job_ptr->wait4switch_start == 0) + job_ptr->wait4switch_start = time_now; + time_waiting = time_now - job_ptr->wait4switch_start; + } + + rem_cpus = job_ptr->details->min_cpus; + if (req_nodes > min_nodes) + rem_nodes = req_nodes; + else + rem_nodes = min_nodes; + + if (job_ptr->details->req_node_bitmap) { + req_nodes_bitmap = bit_copy(job_ptr->details->req_node_bitmap); + i = bit_set_count(req_nodes_bitmap); + if (i > max_nodes) { + info("job %u requires more nodes than currently " + "available (%u>%u)", + job_ptr->job_id, i, max_nodes); + rc = SLURM_ERROR; + goto fini; + } + } + + /* Construct a set of switch array entries, + * use the same indexes as switch_record_table in slurmctld */ + switches_bitmap = xmalloc(sizeof(bitstr_t *) * switch_record_cnt); + switches_cpu_cnt = xmalloc(sizeof(int) * switch_record_cnt); + switches_node_cnt = xmalloc(sizeof(int) * switch_record_cnt); + switches_required = xmalloc(sizeof(int) * switch_record_cnt); + avail_nodes_bitmap = bit_alloc(cr_node_cnt); + for (i=0; ijob_id); + rc = SLURM_ERROR; + goto fini; + } + + /* Check that specific required nodes are linked together */ + if (req_nodes_bitmap) { + rc = SLURM_ERROR; + for (i=0; ijob_id); + goto fini; + } + } + + if (req_nodes_bitmap) { + /* Accumulate specific required resources, if any */ + first = bit_ffs(req_nodes_bitmap); + last = bit_fls(req_nodes_bitmap); + for (i=first; ((i<=last) && (first>=0)); i++) { + if (!bit_test(req_nodes_bitmap, i)) + continue; + if (max_nodes <= 0) { + info("job %u requires nodes than allowed", + job_ptr->job_id); + rc = SLURM_ERROR; + goto fini; + } + bit_set(bitmap, i); + bit_clear(avail_nodes_bitmap, i); + avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); + /* This could result in 0, but if the user + * requested nodes here we will still give + * them and then the step layout will sort + * things out. */ + _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, + job_ptr->details, &cpu_cnt[i]); + rem_nodes--; + max_nodes--; + total_cpus += avail_cpus; + rem_cpus -= avail_cpus; + for (j=0; jdetails->max_cpus != NO_VAL) && + (total_cpus > job_ptr->details->max_cpus)) { + info("Job %u can't use required node due to max CPU " + "limit", job_ptr->job_id); + rc = SLURM_ERROR; + goto fini; + } + if ((rem_nodes <= 0) && (rem_cpus <= 0)) + goto fini; + + /* Update bitmaps and node counts for higher-level switches */ + for (j=0; jjob_id); + rc = SLURM_ERROR; + goto fini; + } + if (!switches_required[best_fit_inx] && req_nodes_bitmap ) { + debug("job %u: best_fit topology failure : no switch " + "including requested nodes and satisfying the " + "request found", job_ptr->job_id); + rc = SLURM_ERROR; + goto fini; + } + bit_and(avail_nodes_bitmap, switches_bitmap[best_fit_inx]); + if ((min_nodes < req_nodes) && + (min_nodes <= switches_node_cnt[best_fit_inx])) { + /* If job specifies a range of node counts, then allocate + * resources with a minimal switch configuration */ + rem_nodes = switches_node_cnt[best_fit_inx]; + } + + /* Identify usable leafs (within higher switch having best fit) */ + for (j=0; j 0) && ((rem_nodes > 0) || (rem_cpus > 0))) { + int *cpus_array = NULL, array_len; + best_fit_cpus = best_fit_nodes = best_fit_sufficient = 0; + for (j=0; j= rem_cpus) && + _enough_nodes(switches_node_cnt[j], + rem_nodes, min_nodes, + req_nodes); + /* If first possibility OR */ + /* first required switch OR */ + /* first set large enough for request OR */ + /* tightest fit (less resource waste) OR */ + /* nothing yet large enough, but this is biggest OR */ + /* 2 required switches of same level and cpus count */ + /* but the latter accumulated cpus amount is bigger */ + /* than the former one */ + if ((best_fit_nodes == 0) || + (!switches_required[best_fit_location] && + switches_required[j] ) || + (sufficient && (best_fit_sufficient == 0)) || + (sufficient && + (switches_cpu_cnt[j] < best_fit_cpus)) || + ((sufficient == 0) && + (switches_cpu_cnt[j] > best_fit_cpus)) || + (switches_required[best_fit_location] && + switches_required[j] && + switches_cpu_cnt[best_fit_location] == + switches_cpu_cnt[j] && + switches_required[best_fit_location] < + switches_required[j]) ) { + /* If first possibility OR */ + /* current best switch not required OR */ + /* current best switch required but this */ + /* better one too */ + if ((best_fit_nodes == 0) || + !switches_required[best_fit_location] || + (switches_required[best_fit_location] && + switches_required[j])) { + best_fit_cpus = switches_cpu_cnt[j]; + best_fit_nodes = switches_node_cnt[j]; + best_fit_location = j; + best_fit_sufficient = sufficient; + } + } + } + if (best_fit_nodes == 0) + break; + + leaf_switch_count++; + /* Use select nodes from this leaf */ + first = bit_ffs(switches_bitmap[best_fit_location]); + last = bit_fls(switches_bitmap[best_fit_location]); + + /* compute best-switch nodes available cpus array */ + array_len = last - first + 1; + cpus_array = xmalloc(sizeof(int) * array_len); + for (i=first, j=0; ((i<=last) && (first>=0)); i++, j++) { + if (!bit_test(switches_bitmap + [best_fit_location], i)) + cpus_array[j] = 0; + else + cpus_array[j] = _get_cpu_cnt(job_ptr, i, + cpu_cnt); + } + + if (job_ptr->req_switch > 0) { + if (time_waiting >= job_ptr->wait4switch) { + job_ptr->best_switch = true; + debug3("Job=%u Waited %ld sec for switches use=%d", + job_ptr->job_id, time_waiting, + leaf_switch_count); + } else if (leaf_switch_count>job_ptr->req_switch) { + /* Allocation is for more than requested number + * of switches */ + job_ptr->best_switch = false; + debug3("Job=%u waited %ld sec for switches=%u " + "found=%d wait %u", + job_ptr->job_id, time_waiting, + job_ptr->req_switch, + leaf_switch_count, + job_ptr->wait4switch); + } else { + job_ptr->best_switch = true; + } + } + + /* accumulate resources from this leaf on a best-fit basis */ + while ((max_nodes > 0) && ((rem_nodes > 0) || (rem_cpus > 0))) { + + /* pick a node using a best-fit approach */ + /* if rem_cpus < 0, then we will search for nodes + * with lower free cpus nb first + */ + int suff = 0, bfsuff = 0, bfloc = 0 , bfsize = 0; + int ca_bfloc = 0; + for (i=first, j=0; ((i<=last) && (first>=0)); + i++, j++) { + if (cpus_array[j] == 0) + continue; + suff = cpus_array[j] >= rem_cpus; + if ( (bfsize == 0) || + (suff && !bfsuff) || + (suff && (cpus_array[j] < bfsize)) || + (!suff && (cpus_array[j] > bfsize)) ) { + bfsuff = suff; + bfloc = i; + bfsize = cpus_array[j]; + ca_bfloc = j; + } + } + + /* no node found, break */ + if (bfsize == 0) + break; + + /* clear resources of this node from the switch */ + bit_clear(switches_bitmap[best_fit_location],bfloc); + switches_node_cnt[best_fit_location]--; + + switches_cpu_cnt[best_fit_location] -= bfsize; + cpus_array[ca_bfloc] = 0; + + /* if this node was already selected in an other */ + /* switch, skip it */ + if (bit_test(bitmap, bfloc)) { + continue; + } + + /* This could result in 0, but if the user + * requested nodes here we will still give + * them and then the step layout will sort + * things out. */ + _cpus_to_use(&bfsize, rem_cpus, rem_nodes, + job_ptr->details, &cpu_cnt[bfloc]); + + /* enforce the max_cpus limit */ + if ((job_ptr->details->max_cpus != NO_VAL) && + (total_cpus+bfsize > job_ptr->details->max_cpus)) { + debug2("5 can't use this node since it " + "would put us over the limit"); + continue; + } + + /* take the node into account */ + bit_set(bitmap, bfloc); + total_cpus += bfsize; + rem_nodes--; + max_nodes--; + rem_cpus -= bfsize; + } + + /* free best-switch nodes available cpus array */ + xfree(cpus_array); + + /* mark this switch as processed */ + switches_node_cnt[best_fit_location] = 0; + + } + + if ((rem_cpus <= 0) && + _enough_nodes(0, rem_nodes, min_nodes, req_nodes)) { + rc = SLURM_SUCCESS; + } else + rc = SLURM_ERROR; + + fini: FREE_NULL_BITMAP(avail_nodes_bitmap); + FREE_NULL_BITMAP(req_nodes_bitmap); + for (i=0; idetails->req_node_bitmap) + reqmap = job_ptr->details->req_node_bitmap; + + /* clear nodes from the bitmap that don't have available resources */ + for (i = 0; i < cr_node_cnt; i++) { + if (!bit_test(node_map, i)) + continue; + /* Make sure we don't say we can use a node exclusively + * that is bigger than our max cpu count. */ + if (((!job_ptr->details->shared) && + (job_ptr->details->max_cpus != NO_VAL) && + (job_ptr->details->max_cpus < cpu_cnt[i])) || + /* OR node has no CPUs */ + (cpu_cnt[i] < 1)) { + if (reqmap && bit_test(reqmap, i)) { + /* can't clear a required node! */ + return SLURM_ERROR; + } + bit_clear(node_map, i); + } + } + + /* NOTE: details->min_cpus is 1 by default, + * Only reset max_nodes if user explicitly sets a proc count */ + if ((job_ptr->details->min_cpus > 1) && + (max_nodes > job_ptr->details->min_cpus)) + max_nodes = job_ptr->details->min_cpus; + + origmap = bit_copy(node_map); + if (origmap == NULL) + fatal("bit_copy malloc failure"); + + ec = _eval_nodes(job_ptr, node_map, min_nodes, max_nodes, + req_nodes, cr_node_cnt, cpu_cnt); + + if (ec == SLURM_SUCCESS) { + FREE_NULL_BITMAP(origmap); + return ec; + } + + /* This nodeset didn't work. To avoid a possible knapsack problem, + * incrementally remove nodes with low cpu counts and retry */ + for (i = 0; i < cr_node_cnt; i++) { + most_cpus = MAX(most_cpus, cpu_cnt[i]); + } + + for (count = 1; count < most_cpus; count++) { + int nochange = 1; + bit_or(node_map, origmap); + for (i = 0; i < cr_node_cnt; i++) { + if ((cpu_cnt[i] > 0) && (cpu_cnt[i] <= count)) { + if (!bit_test(node_map, i)) + continue; + if (reqmap && bit_test(reqmap, i)) + continue; + nochange = 0; + bit_clear(node_map, i); + bit_clear(origmap, i); + } + } + if (nochange) + continue; + ec = _eval_nodes(job_ptr, node_map, min_nodes, max_nodes, + req_nodes, cr_node_cnt, cpu_cnt); + if (ec == SLURM_SUCCESS) { + FREE_NULL_BITMAP(origmap); + return ec; + } + } + FREE_NULL_BITMAP(origmap); + return ec; +} + + +/* Select the best set of resources for the given job + * IN: job_ptr - pointer to the job requesting resources + * IN: min_nodes - minimum number of nodes required + * IN: max_nodes - maximum number of nodes requested + * IN: req_nodes - number of requested nodes + * IN/OUT: node_map - bitmap of available nodes / bitmap of selected nodes + * IN: cr_node_cnt - total number of nodes in the cluster + * IN/OUT: core_map - bitmap of available cores / bitmap of selected cores + * IN: cr_type - resource type + * IN: test_only - ignore allocated memory check + * RET - array with number of CPUs available per node or NULL if not runnable + */ +static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, + uint32_t max_nodes, uint32_t req_nodes, + bitstr_t *node_map, uint32_t cr_node_cnt, + bitstr_t *core_map, + struct node_use_record *node_usage, + uint16_t cr_type, bool test_only) +{ + int rc; + uint16_t *cpu_cnt, *cpus = NULL; + uint32_t start, n, a; + bitstr_t *req_map = job_ptr->details->req_node_bitmap; + + if (bit_set_count(node_map) < min_nodes) + return NULL; + + /* get resource usage for this job from each available node */ + _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, + node_usage, cr_type, &cpu_cnt, test_only); + + /* clear all nodes that do not have any + * usable resources for this job */ + for (n = 0; n < cr_node_cnt; n++) { + if (bit_test(node_map, n) && (cpu_cnt[n] == 0)) { + /* no resources are available for this node */ + if (req_map && bit_test(req_map, n)) { + /* cannot clear a required node! */ + xfree(cpu_cnt); + return NULL; + } + bit_clear(node_map, n); + } + } + if (bit_set_count(node_map) < min_nodes) { + xfree(cpu_cnt); + return NULL; + } + + /* choose the best nodes for the job */ + rc = _choose_nodes(job_ptr, node_map, min_nodes, max_nodes, req_nodes, + cr_node_cnt, cpu_cnt); + + /* if successful, sync up the core_map with the node_map, and + * create a cpus array */ + if (rc == SLURM_SUCCESS) { + cpus = xmalloc(bit_set_count(node_map) * sizeof(uint16_t)); + start = 0; + a = 0; + for (n = 0; n < cr_node_cnt; n++) { + if (bit_test(node_map, n)) { + cpus[a++] = cpu_cnt[n]; + if (cr_get_coremap_offset(n) != start) { + bit_nclear(core_map, start, + (cr_get_coremap_offset(n))-1); + } + start = cr_get_coremap_offset(n + 1); + } + } + if (cr_get_coremap_offset(n) != start) { + bit_nclear(core_map, start, cr_get_coremap_offset(n)-1); + } + } + + xfree(cpu_cnt); + return cpus; +} + + +/* cr_job_test - does most of the real work for select_p_job_test(), which + * includes contiguous selection, load-leveling and max_share logic + * + * PROCEDURE: + * + * Step 1: compare nodes in "avail" bitmap with current node state data + * to find available nodes that match the job request + * + * Step 2: check resources in "avail" bitmap with allocated resources from + * higher priority partitions (busy resources are UNavailable) + * + * Step 3: select resource usage on remaining resources in "avail" bitmap + * for this job, with the placement influenced by existing + * allocations + */ +extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, int mode, + uint16_t cr_type, enum node_cr_state job_node_req, + uint32_t cr_node_cnt, + struct part_res_record *cr_part_ptr, + struct node_use_record *node_usage) +{ + int error_code = SLURM_SUCCESS, ll; /* ll = layout array index */ + uint16_t *layout_ptr = NULL; + bitstr_t *orig_map, *avail_cores, *free_cores; + bitstr_t *tmpcore = NULL, *reqmap = NULL; + bool test_only; + uint32_t c, i, k, n, csize, total_cpus, save_mem = 0; + int32_t build_cnt; + job_resources_t *job_res; + struct job_details *details_ptr; + struct part_res_record *p_ptr, *jp_ptr; + uint16_t *cpu_count; + + details_ptr = job_ptr->details; + layout_ptr = details_ptr->req_node_layout; + reqmap = details_ptr->req_node_bitmap; + + free_job_resources(&job_ptr->job_resrcs); + + if (mode == SELECT_MODE_TEST_ONLY) + test_only = true; + else /* SELECT_MODE_RUN_NOW || SELECT_MODE_WILL_RUN */ + test_only = false; + + /* check node_state and update the node bitmap as necessary */ + if (!test_only) { + error_code = _verify_node_state(cr_part_ptr, job_ptr, + bitmap, cr_type, node_usage, + job_node_req); + if (error_code != SLURM_SUCCESS) { + return error_code; + } + } + + /* This is the case if -O/--overcommit is true */ + if (details_ptr->min_cpus == details_ptr->min_nodes) { + struct multi_core_data *mc_ptr = details_ptr->mc_ptr; + + if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && + (mc_ptr->threads_per_core > 1)) + details_ptr->min_cpus *= mc_ptr->threads_per_core; + if ((mc_ptr->cores_per_socket != (uint16_t) NO_VAL) && + (mc_ptr->cores_per_socket > 1)) + details_ptr->min_cpus *= mc_ptr->cores_per_socket; + if ((mc_ptr->sockets_per_node != (uint16_t) NO_VAL) && + (mc_ptr->sockets_per_node > 1)) + details_ptr->min_cpus *= mc_ptr->sockets_per_node; + } + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: evaluating job %u on %u nodes", + job_ptr->job_id, bit_set_count(bitmap)); + } + + orig_map = bit_copy(bitmap); + avail_cores = _make_core_bitmap(bitmap); + + /* test to make sure that this job can succeed with all avail_cores + * if 'no' then return FAIL + * if 'yes' then we will seek the optimal placement for this job + * within avail_cores + */ + free_cores = bit_copy(avail_cores); + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, + bitmap, cr_node_cnt, free_cores, + node_usage, cr_type, test_only); + if (cpu_count == NULL) { + /* job cannot fit */ + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(free_cores); + FREE_NULL_BITMAP(avail_cores); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 0 fail: " + "insufficient resources"); + } + return SLURM_ERROR; + } else if (test_only) { + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(free_cores); + FREE_NULL_BITMAP(avail_cores); + xfree(cpu_count); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) + info("cons_res: cr_job_test: test 0 pass: test_only"); + return SLURM_SUCCESS; + } else if (!job_ptr->best_switch) { + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(free_cores); + FREE_NULL_BITMAP(avail_cores); + xfree(cpu_count); + return SLURM_ERROR; + } + if (cr_type == CR_MEMORY) { + /* CR_MEMORY does not care about existing CPU allocations, + * so we can jump right to job allocation from here */ + goto alloc_job; + } + xfree(cpu_count); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 0 pass - " + "job fits on given resources"); + } + + /* now that we know that this job can run with the given resources, + * let's factor in the existing allocations and seek the optimal set + * of resources for this job. Here is the procedure: + * + * Step 1: Seek idle CPUs across all partitions. If successful then + * place job and exit. If not successful, then continue. Two + * related items to note: + * 1. Jobs that don't share CPUs finish with step 1. + * 2. The remaining steps assume sharing or preemption. + * + * Step 2: Remove resources that are in use by higher-priority + * partitions, and test that job can still succeed. If not + * then exit. + * + * Step 3: Seek idle nodes among the partitions with the same + * priority as the job's partition. If successful then + * goto Step 6. If not then continue: + * + * Step 4: Seek placement within the job's partition. Search + * row-by-row. If no placement if found, then exit. If a row + * is found, then continue: + * + * Step 5: Place job and exit. FIXME! Here is where we need a + * placement algorithm that recognizes existing job + * boundaries and tries to "overlap jobs" as efficiently + * as possible. + * + * Step 6: Place job and exit. FIXME! here is we use a placement + * algorithm similar to Step 5 on jobs from lower-priority + * partitions. + */ + + + /*** Step 1 ***/ + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + + /* remove all existing allocations from free_cores */ + tmpcore = bit_copy(free_cores); + for (p_ptr = cr_part_ptr; p_ptr; p_ptr = p_ptr->next) { + if (!p_ptr->row) + continue; + for (i = 0; i < p_ptr->num_rows; i++) { + if (!p_ptr->row[i].row_bitmap) + continue; + bit_copybits(tmpcore, p_ptr->row[i].row_bitmap); + bit_not(tmpcore); /* set bits now "free" resources */ + bit_and(free_cores, tmpcore); + } + } + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, + bitmap, cr_node_cnt, free_cores, + node_usage, cr_type, test_only); + if ((cpu_count) && (job_ptr->best_switch)) { + /* job fits! We're done. */ + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 1 pass - " + "idle resources found"); + } + goto alloc_job; + } + + if (job_node_req == NODE_CR_ONE_ROW) { + /* This job CANNOT share CPUs regardless of priority, + * so we fail here. Note that Shared=EXCLUSIVE was already + * addressed in _verify_node_state() and job preemption + * removes jobs from simulated resource allocation map + * before this point. */ + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 1 fail - " + "no idle resources available"); + } + goto alloc_job; + } + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 1 fail - " + "not enough idle resources"); + } + + /*** Step 2 ***/ + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + + for (jp_ptr = cr_part_ptr; jp_ptr; jp_ptr = jp_ptr->next) { + if (jp_ptr->part_ptr == job_ptr->part_ptr) + break; + } + if (!jp_ptr) { + fatal("cons_res error: could not find partition for job %u", + job_ptr->job_id); + } + + /* remove existing allocations (jobs) from higher-priority partitions + * from avail_cores */ + for (p_ptr = cr_part_ptr; p_ptr; p_ptr = p_ptr->next) { + if (p_ptr->part_ptr->priority <= jp_ptr->part_ptr->priority) + continue; + if (!p_ptr->row) + continue; + for (i = 0; i < p_ptr->num_rows; i++) { + if (!p_ptr->row[i].row_bitmap) + continue; + bit_copybits(tmpcore, p_ptr->row[i].row_bitmap); + bit_not(tmpcore); /* set bits now "free" resources */ + bit_and(free_cores, tmpcore); + } + } + /* make these changes permanent */ + bit_copybits(avail_cores, free_cores); + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, + bitmap, cr_node_cnt, free_cores, + node_usage, cr_type, test_only); + if (!cpu_count) { + /* job needs resources that are currently in use by + * higher-priority jobs, so fail for now */ + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 2 fail - " + "resources busy with higher priority jobs"); + } + goto alloc_job; + } + xfree(cpu_count); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 2 pass - " + "available resources for this priority"); + } + + /*** Step 3 ***/ + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + + /* remove existing allocations (jobs) from same-priority partitions + * from avail_cores */ + for (p_ptr = cr_part_ptr; p_ptr; p_ptr = p_ptr->next) { + if (p_ptr->part_ptr->priority != jp_ptr->part_ptr->priority) + continue; + if (!p_ptr->row) + continue; + for (i = 0; i < p_ptr->num_rows; i++) { + if (!p_ptr->row[i].row_bitmap) + continue; + bit_copybits(tmpcore, p_ptr->row[i].row_bitmap); + bit_not(tmpcore); /* set bits now "free" resources */ + bit_and(free_cores, tmpcore); + } + } + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, + bitmap, cr_node_cnt, free_cores, + node_usage, cr_type, test_only); + if (cpu_count) { + /* jobs from low-priority partitions are the only thing left + * in our way. for now we'll ignore them, but FIXME: we need + * a good placement algorithm here that optimizes "job overlap" + * between this job (in these idle nodes) and the low-priority + * jobs */ + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 3 pass - " + "found resources"); + } + goto alloc_job; + } + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 3 fail - " + "not enough idle resources in same priority"); + } + + + /*** Step 4 ***/ + /* try to fit the job into an existing row + * + * tmpcore = worker core_bitmap + * free_cores = core_bitmap to be built + * avail_cores = static core_bitmap of all available cores + */ + + if (jp_ptr->row == NULL) { + /* there's no existing jobs in this partition, so place + * the job in avail_cores. FIXME: still need a good + * placement algorithm here that optimizes "job overlap" + * between this job (in these idle nodes) and existing + * jobs in the other partitions with <= priority to + * this partition */ + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, + req_nodes, bitmap, cr_node_cnt, + free_cores, node_usage, cr_type, + test_only); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 4 pass - " + "first row found"); + } + goto alloc_job; + } + + cr_sort_part_rows(jp_ptr); + c = jp_ptr->num_rows; + if (job_node_req != NODE_CR_AVAILABLE) + c = 1; + for (i = 0; i < c; i++) { + if (!jp_ptr->row[i].row_bitmap) + break; + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + bit_copybits(tmpcore, jp_ptr->row[i].row_bitmap); + bit_not(tmpcore); + bit_and(free_cores, tmpcore); + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, + req_nodes, bitmap, cr_node_cnt, + free_cores, node_usage, cr_type, + test_only); + if (cpu_count) { + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 4 pass - " + "row %i", i); + } + break; + } + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) + info("cons_res: cr_job_test: test 4 fail - row %i", i); + } + + if ((i < c) && !jp_ptr->row[i].row_bitmap) { + /* we've found an empty row, so use it */ + bit_copybits(bitmap, orig_map); + bit_copybits(free_cores, avail_cores); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: " + "test 4 trying empty row %i",i); + } + cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, + req_nodes, bitmap, cr_node_cnt, + free_cores, node_usage, cr_type, + test_only); + } + + if (!cpu_count) { + /* job can't fit into any row, so exit */ + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: test 4 fail - " + "busy partition"); + } + goto alloc_job; + + } + + /*** CONSTRUCTION ZONE FOR STEPs 5 AND 6 *** + * Note that while the job may have fit into a row, it should + * still be run through a good placement algorithm here that + * optimizes "job overlap" between this job (in these idle nodes) + * and existing jobs in the other partitions with <= priority to + * this partition */ + +alloc_job: + /* at this point we've found a good set of + * bits to allocate to this job: + * - bitmap is the set of nodes to allocate + * - free_cores is the set of allocated cores + * - cpu_count is the number of cpus per allocated node + * + * Next steps are to cleanup the worker variables, + * create the job_resources struct, + * distribute the job on the bits, and exit + */ + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(avail_cores); + FREE_NULL_BITMAP(tmpcore); + if ((!cpu_count) || (!job_ptr->best_switch)) { + /* we were sent here to cleanup and exit */ + FREE_NULL_BITMAP(free_cores); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: exiting cr_job_test with no " + "allocation"); + } + return SLURM_ERROR; + } + + /* At this point we have: + * - a bitmap of selected nodes + * - a free_cores bitmap of usable cores on each selected node + * - a per-alloc-node cpu_count array + */ + + if ((mode != SELECT_MODE_WILL_RUN) && (job_ptr->part_ptr == NULL)) + error_code = EINVAL; + if ((error_code == SLURM_SUCCESS) && (mode == SELECT_MODE_WILL_RUN)) { + /* Set a reasonable value for the number of allocated CPUs. + * Without computing task distribution this is only a guess */ + job_ptr->total_cpus = MAX(job_ptr->details->min_cpus, + job_ptr->details->min_nodes); + } + if ((error_code != SLURM_SUCCESS) || (mode != SELECT_MODE_RUN_NOW)) { + FREE_NULL_BITMAP(free_cores); + xfree(cpu_count); + return error_code; + } + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: distributing job %u", + job_ptr->job_id); + } + + /** create the struct_job_res **/ + job_res = create_job_resources(); + job_res->node_bitmap = bit_copy(bitmap); + job_res->nodes = bitmap2node_name(bitmap); + if (job_res->node_bitmap == NULL) + fatal("bit_copy malloc failure"); + job_res->nhosts = bit_set_count(bitmap); + job_res->ncpus = job_res->nhosts; + if (job_ptr->details->ntasks_per_node) + job_res->ncpus *= details_ptr->ntasks_per_node; + job_res->ncpus = MAX(job_res->ncpus, + details_ptr->min_cpus); + job_res->ncpus = MAX(job_res->ncpus, + details_ptr->pn_min_cpus); + job_res->node_req = job_node_req; + job_res->cpus = cpu_count; + job_res->cpus_used = xmalloc(job_res->nhosts * + sizeof(uint16_t)); + job_res->memory_allocated = xmalloc(job_res->nhosts * + sizeof(uint32_t)); + job_res->memory_used = xmalloc(job_res->nhosts * + sizeof(uint32_t)); + + /* store the hardware data for the selected nodes */ + error_code = build_job_resources(job_res, node_record_table_ptr, + select_fast_schedule); + if (error_code != SLURM_SUCCESS) { + free_job_resources(&job_res); + FREE_NULL_BITMAP(free_cores); + return error_code; + } + + /* sync up cpus with layout_ptr, total up + * all cpus, and load the core_bitmap */ + ll = -1; + total_cpus = 0; + c = 0; + csize = bit_size(job_res->core_bitmap); + for (i = 0, n = 0; n < cr_node_cnt; n++) { + uint32_t j; + if (layout_ptr && reqmap && bit_test(reqmap,n)) + ll++; + if (bit_test(bitmap, n) == 0) + continue; + j = cr_get_coremap_offset(n); + k = cr_get_coremap_offset(n + 1); + for (; j < k; j++, c++) { + if (bit_test(free_cores, j)) { + if (c >= csize) { + error("cons_res: cr_job_test " + "core_bitmap index error on " + "node %s", + select_node_record[n].node_ptr-> + name); + drain_nodes(select_node_record[n]. + node_ptr->name, + "Bad core count", + getuid()); + free_job_resources(&job_res); + FREE_NULL_BITMAP(free_cores); + return SLURM_ERROR; + } + bit_set(job_res->core_bitmap, c); + } + } + + if (layout_ptr && reqmap && bit_test(reqmap, n)) { + job_res->cpus[i] = MIN(job_res->cpus[i], + layout_ptr[ll]); + } else if (layout_ptr) { + job_res->cpus[i] = 0; + } + total_cpus += job_res->cpus[i]; + i++; + } + + /* When 'srun --overcommit' is used, ncpus is set to a minimum value + * in order to allocate the appropriate number of nodes based on the + * job request. + * For cons_res, all available logical processors will be allocated on + * each allocated node in order to accommodate the overcommit request. + */ + if (details_ptr->overcommit && details_ptr->num_tasks) + job_res->ncpus = MIN(total_cpus, details_ptr->num_tasks); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: cr_job_test: job %u ncpus %u cbits " + "%u/%u nbits %u", job_ptr->job_id, + job_res->ncpus, bit_set_count(free_cores), + bit_set_count(job_res->core_bitmap), job_res->nhosts); + } + FREE_NULL_BITMAP(free_cores); + + /* distribute the tasks and clear any unused cores */ + job_ptr->job_resrcs = job_res; + error_code = cr_dist(job_ptr, cr_type); + if (error_code != SLURM_SUCCESS) { + free_job_resources(&job_ptr->job_resrcs); + return error_code; + } + + /* translate job_res->cpus array into format with rep count */ + build_cnt = build_job_resources_cpu_array(job_res); + if (build_cnt >= 0) + job_ptr->total_cpus = build_cnt; + else + job_ptr->total_cpus = total_cpus; /* best guess */ + + if (!(cr_type & CR_MEMORY)) + return error_code; + + /* load memory allocated array */ + save_mem =details_ptr->pn_min_memory; + if (save_mem & MEM_PER_CPU) { + /* memory is per-cpu */ + save_mem &= (~MEM_PER_CPU); + for (i = 0; i < job_res->nhosts; i++) { + job_res->memory_allocated[i] = job_res->cpus[i] * + save_mem; + } + } else { + /* memory is per-node */ + for (i = 0; i < job_res->nhosts; i++) { + job_res->memory_allocated[i] = save_mem; + } + } + return error_code; +} diff --git a/src/plugins/select/serial/job_test.h b/src/plugins/select/serial/job_test.h new file mode 100644 index 0000000000..4fe422b220 --- /dev/null +++ b/src/plugins/select/serial/job_test.h @@ -0,0 +1,69 @@ +/*****************************************************************************\ + * job_test.h + ***************************************************************************** + * Copyright (C) 2006 Hewlett-Packard Development Company, L.P. + * Written by Susanne M. Balle, + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _SERIAL_JOB_TEST_H +#define _SERIAL_JOB_TEST_H + +#include +#include +#include + +#include "slurm/slurm.h" +#include "slurm/slurm_errno.h" + +#include "src/common/list.h" +#include "src/common/log.h" +#include "src/common/node_select.h" +#include "src/common/pack.h" +#include "src/common/slurm_protocol_api.h" +#include "src/common/xassert.h" +#include "src/common/xmalloc.h" +#include "src/common/xstring.h" +#include "src/common/slurm_resource_info.h" +#include "src/slurmctld/slurmctld.h" + + +/* _job_test - does most of the real work for select_p_job_test(), which + * pretty much just handles load-leveling and max_share logic */ +int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, + int mode, uint16_t cr_type, + enum node_cr_state job_node_req, uint32_t cr_node_cnt, + struct part_res_record *cr_part_ptr, + struct node_use_record *node_usage); + +#endif /* !_SERIAL_JOB_TEST_H */ diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c new file mode 100644 index 0000000000..0ac800ab8a --- /dev/null +++ b/src/plugins/select/serial/select_serial.c @@ -0,0 +1,2126 @@ +/*****************************************************************************\ + * select_serial.c - resource selection plugin supporting serial (since CPU) + * job allocations. + ***************************************************************************** + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +# if HAVE_STDINT_H +# include +# endif +# if HAVE_INTTYPES_H +# include +# endif +#endif + +#include "src/common/slurm_xlator.h" +#include "select_serial.h" +#include "dist_tasks.h" +#include "job_test.h" + + +#define NODEINFO_MAGIC 0x82aa + +/* These are defined here so when we link with something other than + * the slurmctld we will have these symbols defined. They will get + * overwritten when linking with the slurmctld. + */ +#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)); +#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; +#endif + +/* + * These variables are required by the generic plugin interface. If they + * are not found in the plugin, the plugin loader will ignore it. + * + * plugin_name - a string giving a human-readable description of the + * plugin. There is no maximum length, but the symbol must refer to + * a valid string. + * + * plugin_type - a string suggesting the type of the plugin or its + * applicability to a particular form of data or method of data handling. + * If the low-level plugin API is used, the contents of this string are + * unimportant and may be anything. SLURM uses the higher-level plugin + * interface which requires this string to be of the form + * + * / + * + * where is a description of the intended application of + * the plugin (e.g., "select" for SLURM node selection) and + * is a description of how this plugin satisfies that application. SLURM will + * only load select plugins if the plugin_type string has a + * prefix of "select/". + * + * plugin_version - an unsigned 32-bit integer giving the version number + * of the plugin. If major and minor revisions are desired, the major + * version number may be multiplied by a suitable magnitude constant such + * as 100 or 1000. Various SLURM versions will likely require a certain + * minimum version for their plugins as the node selection API matures. + */ +const char plugin_name[] = "Serial Job Resource Selection plugin"; +const char plugin_type[] = "select/serial"; +const uint32_t plugin_id = 106; +const uint32_t plugin_version = 100; +const uint32_t pstate_version = 7; /* version control on saved state */ + +uint16_t cr_type = CR_CPU; /* cr_type is overwritten in init() */ + +uint32_t select_debug_flags; +uint16_t select_fast_schedule; + +uint16_t *cr_node_num_cores = NULL; +uint32_t *cr_node_cores_offset = NULL; +struct part_res_record *select_part_record = NULL; +struct node_res_record *select_node_record = NULL; +struct node_use_record *select_node_usage = NULL; +static bool select_state_initializing = true; +static int select_node_cnt = 0; +static bool job_preemption_enabled = false; +static bool job_preemption_killing = false; +static bool job_preemption_tested = false; + +struct select_nodeinfo { + uint16_t magic; /* magic number */ + uint16_t alloc_cpus; +}; + +extern select_nodeinfo_t *select_p_select_nodeinfo_alloc(void); +extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo); + +/* Procedure Declarations */ +static int _add_job_to_res(struct job_record *job_ptr, int action); +static int _rm_job_from_res(struct part_res_record *part_record_ptr, + struct node_use_record *node_usage, + struct job_record *job_ptr, int action); +static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req, + List preemptee_candidates, List *preemptee_job_list); +static int _sort_usable_nodes_dec(struct job_record *job_a, + struct job_record *job_b); +static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req); +static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req, + List preemptee_candidates, List *preemptee_job_list); + +static void _dump_job_res(struct job_resources *job) { + char str[64]; + + if (job->core_bitmap) + bit_fmt(str, sizeof(str), job->core_bitmap); + else + sprintf(str, "[no core_bitmap]"); + info("DEBUG: Dump job_resources: nhosts %u cb %s", job->nhosts, str); +} + +static void _dump_nodes(void) +{ + struct node_record *node_ptr; + List gres_list; + int i; + + for (i=0; iname, + select_node_record[i].cpus, + select_node_record[i].cores, + select_node_record[i].sockets, + select_node_record[i].vpus, + select_node_record[i].real_memory, + select_node_usage[i].alloc_memory, + select_node_usage[i].node_state); + + if (select_node_usage[i].gres_list) + gres_list = select_node_usage[i].gres_list; + else + gres_list = node_ptr->gres_list; + if (gres_list) + gres_plugin_node_state_log(gres_list, node_ptr->name); + } +} + +static void _dump_part(struct part_res_record *p_ptr) +{ + uint16_t i; + info("part:%s rows:%u pri:%u ", p_ptr->part_ptr->name, p_ptr->num_rows, + p_ptr->part_ptr->priority); + if (!p_ptr->row) + return; + + for (i = 0; i < p_ptr->num_rows; i++) { + char str[64]; /* print first 64 bits of bitmaps */ + if (p_ptr->row[i].row_bitmap) { + bit_fmt(str, sizeof(str), p_ptr->row[i].row_bitmap); + } else { + sprintf(str, "[no row_bitmap]"); + } + info(" row%u: num_jobs %u: bitmap: %s", i, + p_ptr->row[i].num_jobs, str); + } +} + +static void _dump_state(struct part_res_record *p_ptr) +{ + _dump_nodes(); + + /* dump partition data */ + for (; p_ptr; p_ptr = p_ptr->next) { + _dump_part(p_ptr); + } + return; +} + +/* (re)set cr_node_num_cores arrays */ +static void _init_global_core_data(struct node_record *node_ptr, int node_cnt) +{ + uint32_t n; + + xfree(cr_node_num_cores); + cr_node_num_cores = xmalloc(node_cnt * sizeof(uint16_t)); + + xfree(cr_node_cores_offset); + cr_node_cores_offset = xmalloc((node_cnt+1) * sizeof(uint32_t)); + + for (n = 0; n < node_cnt; n++) { + uint16_t cores; + if (select_fast_schedule) { + cores = node_ptr[n].config_ptr->cores; + cores *= node_ptr[n].config_ptr->sockets; + } else { + cores = node_ptr[n].cores; + cores *= node_ptr[n].sockets; + } + cr_node_num_cores[n] = cores; + if (n > 0) { + cr_node_cores_offset[n] = cr_node_cores_offset[n-1] + + cr_node_num_cores[n-1] ; + } else + cr_node_cores_offset[0] = 0; + } + + /* an extra value is added to get the total number of cores */ + /* as cr_get_coremap_offset is sometimes used to get the total */ + /* number of cores in the cluster */ + cr_node_cores_offset[node_cnt] = cr_node_cores_offset[node_cnt-1] + + cr_node_num_cores[node_cnt-1] ; + +} + + +/* return the coremap index to the first core of the given node */ +extern uint32_t cr_get_coremap_offset(uint32_t node_index) +{ + return cr_node_cores_offset[node_index]; +} + + +/* Helper function for _dup_part_data: create a duplicate part_row_data array */ +static struct part_row_data *_dup_row_data(struct part_row_data *orig_row, + uint16_t num_rows) +{ + struct part_row_data *new_row; + int i, j; + + if (num_rows == 0 || !orig_row) + return NULL; + + new_row = xmalloc(num_rows * sizeof(struct part_row_data)); + for (i = 0; i < num_rows; i++) { + new_row[i].num_jobs = orig_row[i].num_jobs; + new_row[i].job_list_size = orig_row[i].job_list_size; + if (orig_row[i].row_bitmap) + new_row[i].row_bitmap= bit_copy(orig_row[i]. + row_bitmap); + if (new_row[i].job_list_size == 0) + continue; + /* copy the job list */ + new_row[i].job_list = xmalloc(new_row[i].job_list_size * + sizeof(bitstr_t *)); + for (j = 0; j < new_row[i].num_jobs; j++) { + new_row[i].job_list[j] = orig_row[i].job_list[j]; + } + } + return new_row; +} + + +/* Create a duplicate part_res_record list */ +static struct part_res_record *_dup_part_data(struct part_res_record *orig_ptr) +{ + struct part_res_record *new_part_ptr, *new_ptr; + + if (orig_ptr == NULL) + return NULL; + + new_part_ptr = xmalloc(sizeof(struct part_res_record)); + new_ptr = new_part_ptr; + + while (orig_ptr) { + new_ptr->part_ptr = orig_ptr->part_ptr; + new_ptr->num_rows = orig_ptr->num_rows; + new_ptr->row = _dup_row_data(orig_ptr->row, + orig_ptr->num_rows); + if (orig_ptr->next) { + new_ptr->next = xmalloc(sizeof(struct part_res_record)); + new_ptr = new_ptr->next; + } + orig_ptr = orig_ptr->next; + } + return new_part_ptr; +} + + +/* Create a duplicate part_res_record list */ +static struct node_use_record *_dup_node_usage(struct node_use_record *orig_ptr) +{ + struct node_use_record *new_use_ptr, *new_ptr; + List gres_list; + uint32_t i; + + if (orig_ptr == NULL) + return NULL; + + new_use_ptr = xmalloc(select_node_cnt * sizeof(struct node_use_record)); + new_ptr = new_use_ptr; + + for (i = 0; i < select_node_cnt; i++) { + new_ptr[i].node_state = orig_ptr[i].node_state; + new_ptr[i].alloc_memory = orig_ptr[i].alloc_memory; + if (orig_ptr[i].gres_list) + gres_list = orig_ptr[i].gres_list; + else + gres_list = node_record_table_ptr[i].gres_list; + new_ptr[i].gres_list = gres_plugin_node_state_dup(gres_list); + } + return new_use_ptr; +} + +/* delete the given row data */ +static void _destroy_row_data(struct part_row_data *row, uint16_t num_rows) { + uint16_t i; + for (i = 0; i < num_rows; i++) { + FREE_NULL_BITMAP(row[i].row_bitmap); + if (row[i].job_list) { + uint32_t j; + for (j = 0; j < row[i].num_jobs; j++) + row[i].job_list[j] = NULL; + xfree(row[i].job_list); + } + } + xfree(row); +} + +/* delete the given list of partition data */ +static void _destroy_part_data(struct part_res_record *this_ptr) +{ + while (this_ptr) { + struct part_res_record *tmp = this_ptr; + this_ptr = this_ptr->next; + tmp->part_ptr = NULL; + + if (tmp->row) { + _destroy_row_data(tmp->row, tmp->num_rows); + tmp->row = NULL; + } + xfree(tmp); + } +} + + +/* (re)create the global select_part_record array */ +static void _create_part_data(void) +{ + ListIterator part_iterator; + struct part_record *p_ptr; + struct part_res_record *this_ptr; + int num_parts; + + _destroy_part_data(select_part_record); + select_part_record = NULL; + + num_parts = list_count(part_list); + if (!num_parts) + return; + info("cons_res: preparing for %d partitions", num_parts); + + select_part_record = xmalloc(sizeof(struct part_res_record)); + this_ptr = select_part_record; + + part_iterator = list_iterator_create(part_list); + if (part_iterator == NULL) + fatal ("memory allocation failure"); + + while ((p_ptr = (struct part_record *) list_next(part_iterator))) { + this_ptr->part_ptr = p_ptr; + this_ptr->num_rows = p_ptr->max_share; + if (this_ptr->num_rows & SHARED_FORCE) + this_ptr->num_rows &= (~SHARED_FORCE); + /* SHARED=EXCLUSIVE sets max_share = 0 */ + if (this_ptr->num_rows < 1) + this_ptr->num_rows = 1; + /* we'll leave the 'row' array blank for now */ + this_ptr->row = NULL; + num_parts--; + if (num_parts) { + this_ptr->next =xmalloc(sizeof(struct part_res_record)); + this_ptr = this_ptr->next; + } + } + list_iterator_destroy(part_iterator); + + /* should we sort the select_part_record list by priority here? */ +} + + +/* List sort function: sort by the job's expected end time */ +static int _cr_job_list_sort(void *x, void *y) +{ + struct job_record *job1_ptr = (struct job_record *) x; + struct job_record *job2_ptr = (struct job_record *) y; + return (int) difftime(job1_ptr->end_time, job2_ptr->end_time); +} + + +/* delete the given select_node_record and select_node_usage arrays */ +static void _destroy_node_data(struct node_use_record *node_usage, + struct node_res_record *node_data) +{ + int i; + + xfree(node_data); + if (node_usage) { + for (i = 0; i < select_node_cnt; i++) { + if (node_usage[i].gres_list) { + list_destroy(node_usage[i].gres_list); + } + } + xfree(node_usage); + } +} + + +static void _add_job_to_row(struct job_resources *job, + struct part_row_data *r_ptr) +{ + /* add the job to the row_bitmap */ + if (r_ptr->row_bitmap && r_ptr->num_jobs == 0) { + /* if no jobs, clear the existing row_bitmap first */ + uint32_t size = bit_size(r_ptr->row_bitmap); + bit_nclear(r_ptr->row_bitmap, 0, size-1); + } + add_job_to_cores(job, &(r_ptr->row_bitmap), cr_node_num_cores); + + /* add the job to the job_list */ + if (r_ptr->num_jobs >= r_ptr->job_list_size) { + r_ptr->job_list_size += 8; + xrealloc(r_ptr->job_list, r_ptr->job_list_size * + sizeof(struct job_resources *)); + } + r_ptr->job_list[r_ptr->num_jobs++] = job; +} + + +/* test for conflicting core_bitmap bits */ +static int _can_job_fit_in_row(struct job_resources *job, + struct part_row_data *r_ptr) +{ + if ((r_ptr->num_jobs == 0) || !r_ptr->row_bitmap) + return 1; + + return job_fits_into_cores(job, r_ptr->row_bitmap, cr_node_num_cores); +} + + +/* helper script for cr_sort_part_rows() */ +static void _swap_rows(struct part_row_data *a, struct part_row_data *b) +{ + struct part_row_data tmprow; + + tmprow.row_bitmap = a->row_bitmap; + tmprow.num_jobs = a->num_jobs; + tmprow.job_list = a->job_list; + tmprow.job_list_size = a->job_list_size; + + a->row_bitmap = b->row_bitmap; + a->num_jobs = b->num_jobs; + a->job_list = b->job_list; + a->job_list_size = b->job_list_size; + + b->row_bitmap = tmprow.row_bitmap; + b->num_jobs = tmprow.num_jobs; + b->job_list = tmprow.job_list; + b->job_list_size = tmprow.job_list_size; + + return; +} + + +/* sort the rows of a partition from "most allocated" to "least allocated" */ +extern void cr_sort_part_rows(struct part_res_record *p_ptr) +{ + uint32_t i, j, a, b; + + if (!p_ptr->row) + return; + + for (i = 0; i < p_ptr->num_rows; i++) { + if (p_ptr->row[i].row_bitmap) + a = bit_set_count(p_ptr->row[i].row_bitmap); + else + a = 0; + for (j = i+1; j < p_ptr->num_rows; j++) { + if (!p_ptr->row[j].row_bitmap) + continue; + b = bit_set_count(p_ptr->row[j].row_bitmap); + if (b > a) { + _swap_rows(&(p_ptr->row[i]), &(p_ptr->row[j])); + } + } + } + return; +} + + +/* + * _build_row_bitmaps: A job has been removed from the given partition, + * so the row_bitmap(s) need to be reconstructed. + * Optimize the jobs into the least number of rows, + * and make the lower rows as dense as possible. + * + * IN/OUT: p_ptr - the partition that has jobs to be optimized + */ +static void _build_row_bitmaps(struct part_res_record *p_ptr, + struct job_record *job_ptr) +{ + uint32_t i, j, num_jobs, size; + int x, *jstart; + struct part_row_data *this_row, *orig_row; + struct job_resources **tmpjobs, *job; + + if (!p_ptr->row) + return; + + if (p_ptr->num_rows == 1) { + this_row = &(p_ptr->row[0]); + if (this_row->num_jobs == 0) { + if (this_row->row_bitmap) { + size = bit_size(this_row->row_bitmap); + bit_nclear(this_row->row_bitmap, 0, size-1); + } + } else { + xassert(job_ptr); + xassert(job_ptr->job_resrcs); + remove_job_from_cores(job_ptr->job_resrcs, + &this_row->row_bitmap, + cr_node_num_cores); + } + return; + } + + /* gather data */ + num_jobs = 0; + for (i = 0; i < p_ptr->num_rows; i++) { + if (p_ptr->row[i].num_jobs) { + num_jobs += p_ptr->row[i].num_jobs; + } + } + if (num_jobs == 0) { + size = bit_size(p_ptr->row[0].row_bitmap); + for (i = 0; i < p_ptr->num_rows; i++) { + if (p_ptr->row[i].row_bitmap) { + bit_nclear(p_ptr->row[i].row_bitmap, 0, + size-1); + } + } + return; + } + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("DEBUG: _build_row_bitmaps (before):"); + _dump_part(p_ptr); + } + debug3("cons_res: build_row_bitmaps reshuffling %u jobs", num_jobs); + + /* make a copy, in case we cannot do better than this */ + orig_row = _dup_row_data(p_ptr->row, p_ptr->num_rows); + if (orig_row == NULL) + return; + + /* get row_bitmap size from first row (we can safely assume that the + * first row_bitmap exists because there exists at least one job. */ + size = bit_size(p_ptr->row[0].row_bitmap); + + /* create a master job list and clear out ALL row data */ + tmpjobs = xmalloc(num_jobs * sizeof(struct job_resources *)); + jstart = xmalloc(num_jobs * sizeof(int)); + x = 0; + for (i = 0; i < p_ptr->num_rows; i++) { + for (j = 0; j < p_ptr->row[i].num_jobs; j++) { + tmpjobs[x] = p_ptr->row[i].job_list[j]; + p_ptr->row[i].job_list[j] = NULL; + jstart[x] = bit_ffs(tmpjobs[x]->node_bitmap); + jstart[x] = cr_get_coremap_offset(jstart[x]); + jstart[x] += bit_ffs(tmpjobs[x]->core_bitmap); + x++; + } + p_ptr->row[i].num_jobs = 0; + if (p_ptr->row[i].row_bitmap) { + bit_nclear(p_ptr->row[i].row_bitmap, 0, size-1); + } + } + + /* VERY difficult: Optimal placement of jobs in the matrix + * - how to order jobs to be added to the matrix? + * - "by size" does not guarantee optimal placement + * + * - for now, try sorting jobs by first bit set + * - if job allocations stay "in blocks", then this should work OK + * - may still get scenarios where jobs should switch rows + * - fixme: JOB SHUFFLING BETWEEN ROWS NEEDS TESTING + */ + for (i = 0; i < num_jobs; i++) { + for (j = i+1; j < num_jobs; j++) { + if (jstart[j] < jstart[i] + || (jstart[j] == jstart[i] && + tmpjobs[j]->ncpus > tmpjobs[i]->ncpus)) { + x = jstart[i]; + jstart[i] = jstart[j]; + jstart[j] = x; + job = tmpjobs[i]; + tmpjobs[i] = tmpjobs[j]; + tmpjobs[j] = job; + } + } + } + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + for (i = 0; i < num_jobs; i++) { + char cstr[64], nstr[64]; + if (tmpjobs[i]->core_bitmap) { + bit_fmt(cstr, (sizeof(cstr)-1) , + tmpjobs[i]->core_bitmap); + } else + sprintf(cstr, "[no core_bitmap]"); + if (tmpjobs[i]->node_bitmap) { + bit_fmt(nstr, (sizeof(nstr)-1), + tmpjobs[i]->node_bitmap); + } else + sprintf(nstr, "[no node_bitmap]"); + info("DEBUG: jstart %d job nb %s cb %s", jstart[i], + nstr, cstr); + } + } + + /* add jobs to the rows */ + for (j = 0; j < num_jobs; j++) { + for (i = 0; i < p_ptr->num_rows; i++) { + if (_can_job_fit_in_row(tmpjobs[j], &(p_ptr->row[i]))) { + /* job fits in row, so add it */ + _add_job_to_row(tmpjobs[j], &(p_ptr->row[i])); + tmpjobs[j] = NULL; + break; + } + } + /* job should have been added, so shuffle the rows */ + cr_sort_part_rows(p_ptr); + } + + /* test for dangling jobs */ + for (j = 0; j < num_jobs; j++) { + if (tmpjobs[j]) + break; + } + if (j < num_jobs) { + /* we found a dangling job, which means our packing + * algorithm couldn't improve apon the existing layout. + * Thus, we'll restore the original layout here */ + debug3("cons_res: build_row_bitmap: dangling job found"); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("DEBUG: _build_row_bitmaps (post-algorithm):"); + _dump_part(p_ptr); + } + + _destroy_row_data(p_ptr->row, p_ptr->num_rows); + p_ptr->row = orig_row; + orig_row = NULL; + + /* still need to rebuild row_bitmaps */ + for (i = 0; i < p_ptr->num_rows; i++) { + if (p_ptr->row[i].row_bitmap) + bit_nclear(p_ptr->row[i].row_bitmap, 0, + size-1); + if (p_ptr->row[i].num_jobs == 0) + continue; + for (j = 0; j < p_ptr->row[i].num_jobs; j++) { + add_job_to_cores(p_ptr->row[i].job_list[j], + &(p_ptr->row[i].row_bitmap), + cr_node_num_cores); + } + } + } + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("DEBUG: _build_row_bitmaps (after):"); + _dump_part(p_ptr); + } + + if (orig_row) + _destroy_row_data(orig_row, p_ptr->num_rows); + xfree(tmpjobs); + xfree(jstart); + return; + + /* LEFTOVER DESIGN THOUGHTS, PRESERVED HERE */ + + /* 1. sort jobs by size + * 2. only load core bitmaps with largest jobs that conflict + * 3. sort rows by set count + * 4. add remaining jobs, starting with fullest rows + * 5. compute set count: if disparity between rows got closer, then + * switch non-conflicting jobs that were added + */ + + /* + * Step 1: remove empty rows between non-empty rows + * Step 2: try to collapse rows + * Step 3: sort rows by size + * Step 4: try to swap jobs from different rows to pack rows + */ + + /* WORK IN PROGRESS - more optimization should go here, such as: + * + * - try collapsing jobs from higher rows to lower rows + * + * - produce a load array to identify cores with less load. Test + * to see if those cores are in the lower row. If not, try to swap + * those jobs with jobs in the lower row. If the job can be swapped + * AND the lower row set_count increases, then SUCCESS! else swap + * back. The goal is to pack the lower rows and "bubble up" clear + * bits to the higher rows. + */ +} + + +/* allocate resources to the given job + * - add 'struct job_resources' resources to 'struct part_res_record' + * - add job's memory requirements to 'struct node_res_record' + * + * if action = 0 then add cores and memory (starting new job) + * if action = 1 then only add memory (adding suspended job) + * if action = 2 then only add cores (suspended job is resumed) + */ +static int _add_job_to_res(struct job_record *job_ptr, int action) +{ + struct job_resources *job = job_ptr->job_resrcs; + struct node_record *node_ptr; + struct part_res_record *p_ptr; + List gres_list; + int i, n; + bitstr_t *core_bitmap; + + if (!job || !job->core_bitmap) { + error("job %u has no select data", job_ptr->job_id); + return SLURM_ERROR; + } + + debug3("cons_res: _add_job_to_res: job %u act %d ", job_ptr->job_id, + action); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) + _dump_job_res(job); + + for (i = 0, n = -1; i < select_node_cnt; i++) { + if (!bit_test(job->node_bitmap, i)) + continue; + n++; + + node_ptr = select_node_record[i].node_ptr; + if (action != 2) { + if (select_node_usage[i].gres_list) + gres_list = select_node_usage[i].gres_list; + else + gres_list = node_ptr->gres_list; + core_bitmap = copy_job_resources_node(job, n); + gres_plugin_job_alloc(job_ptr->gres_list, gres_list, + job->nhosts, n, job->cpus[n], + job_ptr->job_id, node_ptr->name, + core_bitmap); + gres_plugin_node_state_log(gres_list, node_ptr->name); + FREE_NULL_BITMAP(core_bitmap); + } + + if (action != 2) { + if (job->memory_allocated[n] == 0) + continue; /* node lost by job resizing */ + select_node_usage[i].alloc_memory += + job->memory_allocated[n]; + if ((select_node_usage[i].alloc_memory > + select_node_record[i].real_memory)) { + error("cons_res: node %s memory is " + "overallocated (%u) for job %u", + node_ptr->name, + select_node_usage[i].alloc_memory, + job_ptr->job_id); + } + } + } + + /* add cores */ + if (action != 1) { + for (p_ptr = select_part_record; p_ptr; p_ptr = p_ptr->next) { + if (p_ptr->part_ptr == job_ptr->part_ptr) + break; + } + if (!p_ptr) { + error("cons_res: could not find cr partition %s", + job_ptr->part_ptr->name); + return SLURM_ERROR; + } + if (!p_ptr->row) { + p_ptr->row = xmalloc(p_ptr->num_rows * + sizeof(struct part_row_data)); + } + + /* find a row to add this job */ + for (i = 0; i < p_ptr->num_rows; i++) { + if (!_can_job_fit_in_row(job, &(p_ptr->row[i]))) + continue; + debug3("cons_res: adding job %u to part %s row %u", + job_ptr->job_id, p_ptr->part_ptr->name, i); + _add_job_to_row(job, &(p_ptr->row[i])); + break; + } + if (i >= p_ptr->num_rows) { + /* ERROR: could not find a row for this job */ + error("cons_res: ERROR: job overflow: " + "could not find row for job"); + /* just add the job to the last row for now */ + _add_job_to_row(job, &(p_ptr->row[p_ptr->num_rows-1])); + } + /* update the node state */ + for (i = 0; i < select_node_cnt; i++) { + if (bit_test(job->node_bitmap, i)) + select_node_usage[i].node_state += + job->node_req; + } + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("DEBUG: _add_job_to_res (after):"); + _dump_part(p_ptr); + } + } + + return SLURM_SUCCESS; +} + +/* deallocate resources previously allocated to the given job + * - subtract 'struct job_resources' resources from 'struct part_res_record' + * - subtract job's memory requirements from 'struct node_res_record' + * + * if action = 0 then subtract cores and memory (running job was terminated) + * if action = 1 then only subtract memory (suspended job was terminated) + * if action = 2 then only subtract cores (job is suspended) + * + */ +static int _rm_job_from_res(struct part_res_record *part_record_ptr, + struct node_use_record *node_usage, + struct job_record *job_ptr, int action) +{ + struct job_resources *job = job_ptr->job_resrcs; + struct node_record *node_ptr; + int first_bit, last_bit; + int i, n; + List gres_list; + + if (select_state_initializing) { + /* Ignore job removal until select/cons_res data structures + * values are set by select_p_reconfigure() */ + return SLURM_SUCCESS; + } + if (!job || !job->core_bitmap) { + error("job %u has no select data", job_ptr->job_id); + return SLURM_ERROR; + } + + debug3("cons_res: _rm_job_from_res: job %u action %d", job_ptr->job_id, + action); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) + _dump_job_res(job); + + first_bit = bit_ffs(job->node_bitmap); + if (first_bit == -1) + last_bit = -2; + else + last_bit = bit_fls(job->node_bitmap); + for (i = first_bit, n = -1; i <= last_bit; i++) { + if (!bit_test(job->node_bitmap, i)) + continue; + n++; + + node_ptr = node_record_table_ptr + i; + if (action != 2) { + if (node_usage[i].gres_list) + gres_list = node_usage[i].gres_list; + else + gres_list = node_ptr->gres_list; + gres_plugin_job_dealloc(job_ptr->gres_list, gres_list, + n, job_ptr->job_id, + node_ptr->name); + gres_plugin_node_state_log(gres_list, node_ptr->name); + } + + if (action != 2) { + if (job->memory_allocated[n] == 0) + continue; /* no memory allocated */ + if (node_usage[i].alloc_memory < + job->memory_allocated[n]) { + error("cons_res: node %s memory is " + "under-allocated (%u-%u) for job %u", + node_ptr->name, + node_usage[i].alloc_memory, + job->memory_allocated[n], + job_ptr->job_id); + node_usage[i].alloc_memory = 0; + } else { + node_usage[i].alloc_memory -= + job->memory_allocated[n]; + } + } + } + + /* subtract cores */ + if (action != 1) { + /* reconstruct rows with remaining jobs */ + struct part_res_record *p_ptr; + + if (!job_ptr->part_ptr) { + error("cons_res: removed job %u does not have a " + "partition assigned", + job_ptr->job_id); + return SLURM_ERROR; + } + + for (p_ptr = part_record_ptr; p_ptr; p_ptr = p_ptr->next) { + if (p_ptr->part_ptr == job_ptr->part_ptr) + break; + } + if (!p_ptr) { + error("cons_res: removed job %u could not find part %s", + job_ptr->job_id, job_ptr->part_ptr->name); + return SLURM_ERROR; + } + + if (!p_ptr->row) + return SLURM_SUCCESS; + + /* remove the job from the job_list */ + n = 0; + for (i = 0; i < p_ptr->num_rows; i++) { + uint32_t j; + for (j = 0; j < p_ptr->row[i].num_jobs; j++) { + if (p_ptr->row[i].job_list[j] != job) + continue; + debug3("cons_res: removed job %u from " + "part %s row %u", + job_ptr->job_id, + p_ptr->part_ptr->name, i); + for (; j < p_ptr->row[i].num_jobs-1; j++) { + p_ptr->row[i].job_list[j] = + p_ptr->row[i].job_list[j+1]; + } + p_ptr->row[i].job_list[j] = NULL; + p_ptr->row[i].num_jobs -= 1; + /* found job - we're done */ + n = 1; + i = p_ptr->num_rows; + break; + } + } + + if (n) { + /* job was found and removed, so refresh the bitmaps */ + _build_row_bitmaps(p_ptr, job_ptr); + + /* Adjust the node_state of all nodes affected by + * the removal of this job. If all cores are now + * available, set node_state = NODE_CR_AVAILABLE + */ + for (i = 0, n = -1; i < select_node_cnt; i++) { + if (bit_test(job->node_bitmap, i) == 0) + continue; + n++; + if (job->cpus[n] == 0) + continue; /* node lost by job resize */ + if (node_usage[i].node_state >= + job->node_req) { + node_usage[i].node_state -= + job->node_req; + } else { + error("cons_res:_rm_job_from_res: " + "node_state mis-count"); + node_usage[i].node_state = + NODE_CR_AVAILABLE; + } + } + } + } + + return SLURM_SUCCESS; +} + +static struct multi_core_data * _create_default_mc(void) +{ + struct multi_core_data *mc_ptr; + mc_ptr = xmalloc(sizeof(struct multi_core_data)); + mc_ptr->sockets_per_node = (uint16_t) NO_VAL; + mc_ptr->cores_per_socket = (uint16_t) NO_VAL; + mc_ptr->threads_per_core = (uint16_t) NO_VAL; +/* mc_ptr is initialized to zero by xmalloc*/ +/* mc_ptr->ntasks_per_socket = 0; */ +/* mc_ptr->ntasks_per_core = 0; */ +/* mc_ptr->plane_size = 0; */ + return mc_ptr; +} + +/* Determine the node requirements for the job: + * - does the job need exclusive nodes? (NODE_CR_RESERVED) + * - can the job run on shared nodes? (NODE_CR_ONE_ROW) + * - can the job run on overcommitted resources? (NODE_CR_AVAILABLE) + */ +static uint16_t _get_job_node_req(struct job_record *job_ptr) +{ + int max_share = job_ptr->part_ptr->max_share; + + if (max_share == 0) /* Partition Shared=EXCLUSIVE */ + return NODE_CR_RESERVED; + + /* Partition is Shared=FORCE */ + if (max_share & SHARED_FORCE) + return NODE_CR_AVAILABLE; + + /* Partition is Shared=NO or Shared=YES */ + if (job_ptr->details->shared == 0) + /* user has requested exclusive nodes */ + return NODE_CR_RESERVED; + + if ((max_share > 1) && (job_ptr->details->shared == 1)) + /* part allows sharing, and the user has requested it */ + return NODE_CR_AVAILABLE; + + return NODE_CR_ONE_ROW; +} + +static int _find_job (void *x, void *key) +{ + struct job_record *job_ptr = (struct job_record *) x; + if (job_ptr == (struct job_record *) key) + return 1; + return 0; +} + +static bool _is_preemptable(struct job_record *job_ptr, + List preemptee_candidates) +{ + if (!preemptee_candidates) + return false; + if (list_find_first(preemptee_candidates, _find_job, job_ptr)) + return true; + return false; +} + +/* Determine if a job can ever run */ +static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req) +{ + int rc; + + rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + SELECT_MODE_TEST_ONLY, cr_type, job_node_req, + select_node_cnt, select_part_record, + select_node_usage); + return rc; +} + +/* + * Sort the usable_node element to put jobs in the correct + * preemption order. + */ +static int _sort_usable_nodes_dec(struct job_record *job_a, + struct job_record *job_b) +{ + if (job_a->details->usable_nodes > job_b->details->usable_nodes) + return -1; + else if (job_a->details->usable_nodes < job_b->details->usable_nodes) + return 1; + + return 0; +} + +/* Allocate resources for a job now, if possible */ +static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req, + List preemptee_candidates, List *preemptee_job_list) +{ + int rc; + bitstr_t *orig_map = NULL, *save_bitmap; + struct job_record *tmp_job_ptr; + ListIterator job_iterator, preemptee_iterator; + struct part_res_record *future_part; + struct node_use_record *future_usage; + bool remove_some_jobs = false; + uint16_t pass_count = 0; + uint16_t mode; + + save_bitmap = bit_copy(bitmap); +top: orig_map = bit_copy(save_bitmap); + if (!orig_map) + fatal("bit_copy: malloc failure"); + + rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + SELECT_MODE_RUN_NOW, cr_type, job_node_req, + select_node_cnt, select_part_record, + select_node_usage); + + if ((rc != SLURM_SUCCESS) && preemptee_candidates) { + /* Remove preemptable jobs from simulated environment */ + future_part = _dup_part_data(select_part_record); + if (future_part == NULL) { + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(save_bitmap); + return SLURM_ERROR; + } + future_usage = _dup_node_usage(select_node_usage); + if (future_usage == NULL) { + _destroy_part_data(future_part); + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(save_bitmap); + return SLURM_ERROR; + } + + job_iterator = list_iterator_create(preemptee_candidates); + if (job_iterator == NULL) + fatal ("memory allocation failure"); + while ((tmp_job_ptr = (struct job_record *) + list_next(job_iterator))) { + if (!IS_JOB_RUNNING(tmp_job_ptr) && + !IS_JOB_SUSPENDED(tmp_job_ptr)) + continue; + mode = slurm_job_preempt_mode(tmp_job_ptr); + if ((mode != PREEMPT_MODE_REQUEUE) && + (mode != PREEMPT_MODE_CHECKPOINT) && + (mode != PREEMPT_MODE_CANCEL)) + continue; /* can't remove job */ + /* Remove preemptable job now */ + _rm_job_from_res(future_part, future_usage, + tmp_job_ptr, 0); + bit_or(bitmap, orig_map); + rc = cr_job_test(job_ptr, bitmap, min_nodes, + max_nodes, req_nodes, + SELECT_MODE_WILL_RUN, + cr_type, job_node_req, + select_node_cnt, + future_part, future_usage); + tmp_job_ptr->details->usable_nodes = 0; + /* + * If successful, set the last job's usable count to a + * large value so that it will be first after sorting. + * usable_nodes count set to zero above to eliminate + * values previously set to 9999. + * Note: usable_count is only used for sorting purposes + */ + if (rc == SLURM_SUCCESS) { + tmp_job_ptr->details->usable_nodes = 9999; + list_iterator_reset(job_iterator); + while ((tmp_job_ptr = (struct job_record *) + list_next(job_iterator))) { + if (tmp_job_ptr->details->usable_nodes + == 9999) + break; + tmp_job_ptr->details->usable_nodes = + bit_overlap(bitmap, + tmp_job_ptr-> + node_bitmap); + } + while ((tmp_job_ptr = (struct job_record *) + list_next(job_iterator))) { + tmp_job_ptr->details->usable_nodes = 0; + } + if (pass_count++ || + (list_count(preemptee_candidates) == 1)) + break; + list_sort(preemptee_candidates, + (ListCmpF)_sort_usable_nodes_dec); + FREE_NULL_BITMAP(orig_map); + list_iterator_destroy(job_iterator); + goto top; + } + } + list_iterator_destroy(job_iterator); + + if ((rc == SLURM_SUCCESS) && preemptee_job_list && + preemptee_candidates) { + /* Build list of preemptee jobs whose resources are + * actually used */ + if (*preemptee_job_list == NULL) { + *preemptee_job_list = list_create(NULL); + if (*preemptee_job_list == NULL) + fatal("list_create malloc failure"); + } + preemptee_iterator = list_iterator_create( + preemptee_candidates); + if (preemptee_iterator == NULL) + fatal ("memory allocation failure"); + while ((tmp_job_ptr = (struct job_record *) + list_next(preemptee_iterator))) { + mode = slurm_job_preempt_mode(tmp_job_ptr); + if ((mode != PREEMPT_MODE_REQUEUE) && + (mode != PREEMPT_MODE_CHECKPOINT) && + (mode != PREEMPT_MODE_CANCEL)) + continue; + if (tmp_job_ptr->details->usable_nodes == 0) + continue; + list_append(*preemptee_job_list, + tmp_job_ptr); + remove_some_jobs = true; + } + list_iterator_destroy(preemptee_iterator); + if (!remove_some_jobs) { + list_destroy(*preemptee_job_list); + *preemptee_job_list = NULL; + } + } + + _destroy_part_data(future_part); + _destroy_node_data(future_usage, NULL); + } + FREE_NULL_BITMAP(orig_map); + FREE_NULL_BITMAP(save_bitmap); + + return rc; +} + +/* _will_run_test - determine when and where a pending job can start, removes + * jobs from node table at termination time and run _test_job() after + * each one. Used by SLURM's sched/backfill plugin and Moab. */ +static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t job_node_req, + List preemptee_candidates, List *preemptee_job_list) +{ + struct part_res_record *future_part; + struct node_use_record *future_usage; + struct job_record *tmp_job_ptr; + List cr_job_list; + ListIterator job_iterator, preemptee_iterator; + bitstr_t *orig_map; + int action, rc = SLURM_ERROR; + time_t now = time(NULL); + + orig_map = bit_copy(bitmap); + if (!orig_map) + fatal("bit_copy: malloc failure"); + + /* Try to run with currently available nodes */ + rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + SELECT_MODE_WILL_RUN, cr_type, job_node_req, + select_node_cnt, select_part_record, + select_node_usage); + if (rc == SLURM_SUCCESS) { + FREE_NULL_BITMAP(orig_map); + job_ptr->start_time = time(NULL); + return SLURM_SUCCESS; + } + + /* Job is still pending. Simulate termination of jobs one at a time + * to determine when and where the job can start. */ + future_part = _dup_part_data(select_part_record); + if (future_part == NULL) { + FREE_NULL_BITMAP(orig_map); + return SLURM_ERROR; + } + future_usage = _dup_node_usage(select_node_usage); + if (future_usage == NULL) { + _destroy_part_data(future_part); + FREE_NULL_BITMAP(orig_map); + return SLURM_ERROR; + } + + /* Build list of running and suspended jobs */ + cr_job_list = list_create(NULL); + if (!cr_job_list) + fatal("list_create: memory allocation error"); + job_iterator = list_iterator_create(job_list); + if (job_iterator == NULL) + fatal ("memory allocation failure"); + while ((tmp_job_ptr = (struct job_record *) list_next(job_iterator))) { + if (!IS_JOB_RUNNING(tmp_job_ptr) && + !IS_JOB_SUSPENDED(tmp_job_ptr)) + continue; + if (tmp_job_ptr->end_time == 0) { + error("Job %u has zero end_time", tmp_job_ptr->job_id); + continue; + } + if (_is_preemptable(tmp_job_ptr, preemptee_candidates)) { + uint16_t mode = slurm_job_preempt_mode(tmp_job_ptr); + if (mode == PREEMPT_MODE_OFF) + continue; + if (mode == PREEMPT_MODE_SUSPEND) + action = 2; /* remove cores, keep memory */ + else + action = 0; /* remove cores and memory */ + /* Remove preemptable job now */ + _rm_job_from_res(future_part, future_usage, + tmp_job_ptr, action); + } else + list_append(cr_job_list, tmp_job_ptr); + } + list_iterator_destroy(job_iterator); + + /* Test with all preemptable jobs gone */ + if (preemptee_candidates) { + bit_or(bitmap, orig_map); + rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, + req_nodes, SELECT_MODE_WILL_RUN, cr_type, + job_node_req, select_node_cnt, future_part, + future_usage); + if (rc == SLURM_SUCCESS) + job_ptr->start_time = now + 1; + } + + /* Remove the running jobs one at a time from exp_node_cr and try + * scheduling the pending job after each one. */ + if (rc != SLURM_SUCCESS) { + list_sort(cr_job_list, _cr_job_list_sort); + job_iterator = list_iterator_create(cr_job_list); + if (job_iterator == NULL) + fatal ("memory allocation failure"); + while ((tmp_job_ptr = list_next(job_iterator))) { + int ovrlap; + bit_or(bitmap, orig_map); + ovrlap = bit_overlap(bitmap, tmp_job_ptr->node_bitmap); + if (ovrlap == 0) /* job has no usable nodes */ + continue; /* skip it */ + debug2("cons_res: _will_run_test, job %u: overlap=%d", + tmp_job_ptr->job_id, ovrlap); + _rm_job_from_res(future_part, future_usage, + tmp_job_ptr, 0); + rc = cr_job_test(job_ptr, bitmap, min_nodes, + max_nodes, req_nodes, + SELECT_MODE_WILL_RUN, cr_type, + job_node_req, select_node_cnt, + future_part, future_usage); + if (rc == SLURM_SUCCESS) { + if (tmp_job_ptr->end_time <= now) + job_ptr->start_time = now + 1; + else + job_ptr->start_time = tmp_job_ptr-> + end_time; + break; + } + } + list_iterator_destroy(job_iterator); + } + + if ((rc == SLURM_SUCCESS) && preemptee_job_list && + preemptee_candidates) { + /* Build list of preemptee jobs whose resources are + * actually used. List returned even if not killed + * in selected plugin, but by Moab or something else. */ + if (*preemptee_job_list == NULL) { + *preemptee_job_list = list_create(NULL); + if (*preemptee_job_list == NULL) + fatal("list_create malloc failure"); + } + preemptee_iterator =list_iterator_create(preemptee_candidates); + if (preemptee_iterator == NULL) + fatal ("memory allocation failure"); + while ((tmp_job_ptr = (struct job_record *) + list_next(preemptee_iterator))) { + if (bit_overlap(bitmap, + tmp_job_ptr->node_bitmap) == 0) + continue; + list_append(*preemptee_job_list, tmp_job_ptr); + } + list_iterator_destroy(preemptee_iterator); + } + + list_destroy(cr_job_list); + _destroy_part_data(future_part); + _destroy_node_data(future_usage, NULL); + FREE_NULL_BITMAP(orig_map); + return rc; +} + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init(void) +{ + cr_type = slurmctld_conf.select_type_param; + if (cr_type) + verbose("%s loaded with argument %u", plugin_name, cr_type); + select_debug_flags = slurm_get_debug_flags(); + + return SLURM_SUCCESS; +} + +extern int fini(void) +{ + _destroy_node_data(select_node_usage, select_node_record); + select_node_record = NULL; + select_node_usage = NULL; + _destroy_part_data(select_part_record); + select_part_record = NULL; + xfree(cr_node_num_cores); + xfree(cr_node_cores_offset); + + if (cr_type) + verbose("%s shutting down ...", plugin_name); + + return SLURM_SUCCESS; +} + +/* + * The remainder of this file implements the standard SLURM + * node selection API. + */ + +extern int select_p_state_save(char *dir_name) +{ + /* nothing to save */ + return SLURM_SUCCESS; +} + +/* This is Part 2 of a 4-part procedure which can be found in + * src/slurmctld/read_config.c. See select_p_node_init for the + * whole story. + */ +extern int select_p_state_restore(char *dir_name) +{ + /* nothing to restore */ + return SLURM_SUCCESS; +} + +/* This is Part 3 of a 4-part procedure which can be found in + * src/slurmctld/read_config.c. See select_p_node_init for the + * whole story. + */ +extern int select_p_job_init(List job_list) +{ + /* nothing to initialize for jobs */ + return SLURM_SUCCESS; +} + +/* This plugin does not generate a node ranking. */ +extern bool select_p_node_ranking(struct node_record *node_ptr, int node_cnt) +{ + return false; +} + +/* This is Part 1 of a 4-part procedure which can be found in + * src/slurmctld/read_config.c. The whole story goes like this: + * + * Step 1: select_g_node_init : initializes the global node arrays + * Step 2: select_g_state_restore : NO-OP - nothing to restore + * Step 3: select_g_job_init : NO-OP - nothing to initialize + * Step 4: select_g_select_nodeinfo_set: called from reset_job_bitmaps() with + * each valid recovered job_ptr AND from + * select_nodes(), this procedure adds + * job data to the 'select_part_record' + * global array + */ +extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) +{ + int i, tot_core; + + info("cons_res: select_p_node_init"); + if ((cr_type & (CR_CPU | CR_SOCKET | CR_CORE)) == 0) { + fatal("Invalid SelectTypeParameter: %s", + sched_param_type_string(cr_type)); + } + if (node_ptr == NULL) { + error("select_p_node_init: node_ptr == NULL"); + return SLURM_ERROR; + } + if (node_cnt < 0) { + error("select_p_node_init: node_cnt < 0"); + return SLURM_ERROR; + } + + /* initial global core data structures */ + select_state_initializing = true; + select_fast_schedule = slurm_get_fast_schedule(); + _init_global_core_data(node_ptr, node_cnt); + + _destroy_node_data(select_node_usage, select_node_record); + select_node_cnt = node_cnt; + select_node_record = xmalloc(node_cnt * + sizeof(struct node_res_record)); + select_node_usage = xmalloc(node_cnt * + sizeof(struct node_use_record)); + + for (i = 0; i < select_node_cnt; i++) { + select_node_record[i].node_ptr = &node_ptr[i]; + if (select_fast_schedule) { + struct config_record *config_ptr; + config_ptr = node_ptr[i].config_ptr; + select_node_record[i].cpus = config_ptr->cpus; + select_node_record[i].sockets = config_ptr->sockets; + select_node_record[i].cores = config_ptr->cores; + select_node_record[i].vpus = config_ptr->threads; + select_node_record[i].real_memory = config_ptr-> + real_memory; + } else { + select_node_record[i].cpus = node_ptr[i].cpus; + select_node_record[i].sockets = node_ptr[i].sockets; + select_node_record[i].cores = node_ptr[i].cores; + select_node_record[i].vpus = node_ptr[i].threads; + select_node_record[i].real_memory = node_ptr[i]. + real_memory; + } + tot_core = select_node_record[i].sockets * + select_node_record[i].cores; + if (tot_core >= select_node_record[i].cpus) + select_node_record[i].vpus = 1; + select_node_usage[i].node_state = NODE_CR_AVAILABLE; + gres_plugin_node_state_dealloc_all(select_node_record[i]. + node_ptr->gres_list); + } + _create_part_data(); + + return SLURM_SUCCESS; +} + +extern int select_p_block_init(List part_list) +{ + return SLURM_SUCCESS; +} + + +/* + * select_p_job_test - Given a specification of scheduling requirements, + * identify the nodes which "best" satisfy the request. + * "best" is defined as either a minimal number of consecutive nodes + * or if sharing resources then sharing them with a job of similar size. + * IN/OUT job_ptr - pointer to job being considered for initiation, + * set's start_time when job expected to start + * IN/OUT bitmap - usable nodes are set on input, nodes not required to + * satisfy the request are cleared, other left set + * IN min_nodes - minimum count of nodes + * IN req_nodes - requested (or desired) count of nodes + * IN max_nodes - maximum count of nodes (0==don't care) + * IN mode - SELECT_MODE_RUN_NOW: try to schedule job now + * SELECT_MODE_TEST_ONLY: test if job can ever run + * SELECT_MODE_WILL_RUN: determine when and where job can run + * IN preemptee_candidates - List of pointers to jobs which can be preempted. + * IN/OUT preemptee_job_list - Pointer to list of job pointers. These are the + * jobs to be preempted to initiate the pending job. Not set + * if mode=SELECT_MODE_TEST_ONLY or input pointer is NULL. + * RET zero on success, EINVAL otherwise + * globals (passed via select_p_node_init): + * node_record_count - count of nodes configured + * node_record_table_ptr - pointer to global node table + * NOTE: the job information that is considered for scheduling includes: + * req_node_bitmap: bitmap of specific nodes required by the job + * contiguous: allocated nodes must be sequentially located + * num_cpus: minimum number of processors required by the job + * NOTE: bitmap must be a superset of req_nodes at the time that + * select_p_job_test is called + */ +extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, + uint32_t min_nodes, uint32_t max_nodes, + uint32_t req_nodes, uint16_t mode, + List preemptee_candidates, + List *preemptee_job_list) +{ + int rc = EINVAL; + uint16_t job_node_req; + bool debug_cpu_bind = false, debug_check = false; + + xassert(bitmap); + + if (!debug_check) { + debug_check = true; + if (slurm_get_debug_flags() & DEBUG_FLAG_CPU_BIND) + debug_cpu_bind = true; + } + + if (!job_ptr->details) + return EINVAL; + + if (!job_ptr->details->mc_ptr) + job_ptr->details->mc_ptr = _create_default_mc(); + job_node_req = _get_job_node_req(job_ptr); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("cons_res: select_p_job_test: job %u node_req %u mode %d", + job_ptr->job_id, job_node_req, mode); + info("cons_res: select_p_job_test: min_n %u max_n %u req_n %u " + "avail_n %u", + min_nodes, max_nodes, req_nodes, bit_set_count(bitmap)); + _dump_state(select_part_record); + } + if (mode == SELECT_MODE_WILL_RUN) { + rc = _will_run_test(job_ptr, bitmap, min_nodes, max_nodes, + req_nodes, job_node_req, + preemptee_candidates, preemptee_job_list); + } else if (mode == SELECT_MODE_TEST_ONLY) { + rc = _test_only(job_ptr, bitmap, min_nodes, max_nodes, + req_nodes, job_node_req); + } else if (mode == SELECT_MODE_RUN_NOW) { + rc = _run_now(job_ptr, bitmap, min_nodes, max_nodes, + req_nodes, job_node_req, + preemptee_candidates, preemptee_job_list); + } else + fatal("select_p_job_test: Mode %d is invalid", mode); + + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + if (job_ptr->job_resrcs) + log_job_resources(job_ptr->job_id, job_ptr->job_resrcs); + else { + info("no job_resources info for job %u", + job_ptr->job_id); + } + } else if (debug_cpu_bind && job_ptr->job_resrcs) { + log_job_resources(job_ptr->job_id, job_ptr->job_resrcs); + } + + return rc; +} + +extern int select_p_job_begin(struct job_record *job_ptr) +{ + return SLURM_SUCCESS; +} + +/* Determine if allocated nodes are usable (powered up) */ +extern int select_p_job_ready(struct job_record *job_ptr) +{ + int i, i_first, i_last; + struct node_record *node_ptr; + + if (!IS_JOB_RUNNING(job_ptr) && !IS_JOB_SUSPENDED(job_ptr)) { + /* Gang scheduling might suspend job immediately */ + return 0; + } + + if ((job_ptr->node_bitmap == NULL) || + ((i_first = bit_ffs(job_ptr->node_bitmap)) == -1)) + return READY_NODE_STATE; + i_last = bit_fls(job_ptr->node_bitmap); + + for (i=i_first; i<=i_last; i++) { + if (bit_test(job_ptr->node_bitmap, i) == 0) + continue; + node_ptr = node_record_table_ptr + i; + if (IS_NODE_POWER_SAVE(node_ptr) || IS_NODE_POWER_UP(node_ptr)) + return 0; + } + + return READY_NODE_STATE; +} + +extern int select_p_job_resized(struct job_record *job_ptr, + struct node_record *node_ptr) +{ + return SLURM_ERROR; +} + +extern bool select_p_job_expand_allow(void) +{ + return false; +} + +extern int select_p_job_expand(struct job_record *from_job_ptr, + struct job_record *to_job_ptr) +{ + return SLURM_ERROR; +} + +extern int select_p_job_signal(struct job_record *job_ptr, int signal) +{ + xassert(job_ptr); + xassert(job_ptr->magic == JOB_MAGIC); + + return SLURM_SUCCESS; +} + +extern int select_p_job_fini(struct job_record *job_ptr) +{ + xassert(job_ptr); + xassert(job_ptr->magic == JOB_MAGIC); + + _rm_job_from_res(select_part_record, select_node_usage, job_ptr, 0); + + return SLURM_SUCCESS; +} + +/* NOTE: This function is not called with gang scheduling because it + * needs to track how many jobs are running or suspended on each node. + * This sum is compared with the partition's Shared parameter */ +extern int select_p_job_suspend(struct job_record *job_ptr, bool indf_susp) +{ + xassert(job_ptr); + + if (!indf_susp) + return SLURM_SUCCESS; + + return _rm_job_from_res(select_part_record, select_node_usage, + job_ptr, 2); +} + +/* See NOTE with select_p_job_suspend above */ +extern int select_p_job_resume(struct job_record *job_ptr, bool indf_susp) +{ + xassert(job_ptr); + + if (!indf_susp) + return SLURM_SUCCESS; + + return _add_job_to_res(job_ptr, 2); +} + + +extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, + select_jobinfo_t *jobinfo, + uint32_t node_count) +{ + return NULL; +} + +extern int select_p_step_finish(struct step_record *step_ptr) +{ + return SLURM_SUCCESS; +} + +extern int select_p_pack_select_info(time_t last_query_time, + uint16_t show_flags, Buf *buffer_ptr, + uint16_t protocol_version) +{ + /* This function is always invalid on normal Linux clusters */ + return SLURM_ERROR; +} + +extern int select_p_select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, + Buf buffer, + uint16_t protocol_version) +{ + pack16(nodeinfo->alloc_cpus, buffer); + + return SLURM_SUCCESS; +} + +extern int select_p_select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, + Buf buffer, + uint16_t protocol_version) +{ + select_nodeinfo_t *nodeinfo_ptr = NULL; + + nodeinfo_ptr = select_p_select_nodeinfo_alloc(); + *nodeinfo = nodeinfo_ptr; + + safe_unpack16(&nodeinfo_ptr->alloc_cpus, buffer); + + return SLURM_SUCCESS; + +unpack_error: + error("select_nodeinfo_unpack: error unpacking here"); + select_p_select_nodeinfo_free(nodeinfo_ptr); + *nodeinfo = NULL; + + return SLURM_ERROR; +} + +extern select_nodeinfo_t *select_p_select_nodeinfo_alloc(void) +{ + select_nodeinfo_t *nodeinfo = xmalloc(sizeof(struct select_nodeinfo)); + + nodeinfo->magic = NODEINFO_MAGIC; + + return nodeinfo; +} + +extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) +{ + if(nodeinfo) { + if (nodeinfo->magic != NODEINFO_MAGIC) { + error("select_p_select_nodeinfo_free: " + "nodeinfo magic bad"); + return EINVAL; + } + nodeinfo->magic = 0; + xfree(nodeinfo); + } + return SLURM_SUCCESS; +} + +extern int select_p_select_nodeinfo_set_all(void) +{ + struct part_res_record *p_ptr; + struct node_record *node_ptr = NULL; + int i=0, n=0, c, start, end; + uint16_t tmp, tmp_16 = 0; + static time_t last_set_all = 0; + uint32_t node_threads, node_cpus; + select_nodeinfo_t *nodeinfo = NULL; + + /* only set this once when the last_node_update is newer than + the last time we set things up. */ + if(last_set_all && (last_node_update < last_set_all)) { + debug2("Node select info for set all hasn't " + "changed since %ld", + (long)last_set_all); + return SLURM_NO_CHANGE_IN_DATA; + } + last_set_all = last_node_update; + + for (n=0; n < select_node_cnt; n++) { + node_ptr = &(node_record_table_ptr[n]); + + /* We have to use the '_g_' here to make sure we get + the correct data to work on. i.e. cray calls this + plugin from within select/cray which has it's own + struct. + */ + select_g_select_nodeinfo_get(node_ptr->select_nodeinfo, + SELECT_NODEDATA_PTR, 0, + (void *)&nodeinfo); + if(!nodeinfo) { + error("no nodeinfo returned from structure"); + continue; + } + + if (slurmctld_conf.fast_schedule) { + node_cpus = node_ptr->config_ptr->cpus; + node_threads = node_ptr->config_ptr->threads; + } else { + node_cpus = node_ptr->cpus; + node_threads = node_ptr->threads; + } + + start = cr_get_coremap_offset(n); + end = cr_get_coremap_offset(n+1); + tmp_16 = 0; + for (p_ptr = select_part_record; p_ptr; p_ptr = p_ptr->next) { + if (!p_ptr->row) + continue; + for (i = 0; i < p_ptr->num_rows; i++) { + if (!p_ptr->row[i].row_bitmap) + continue; + tmp = 0; + for (c = start; c < end; c++) { + if (bit_test(p_ptr->row[i].row_bitmap, + c)) + tmp++; + } + /* get the row with the largest cpu + count on it. */ + if (tmp > tmp_16) + tmp_16 = tmp; + } + } + + /* The minimum allocatable unit may a core, so scale + * threads up to the proper CPU count */ + if ((end - start) < node_cpus) + tmp_16 *= node_threads; + + nodeinfo->alloc_cpus = tmp_16; + } + + return SLURM_SUCCESS; +} + +extern int select_p_select_nodeinfo_set(struct job_record *job_ptr) +{ + int rc; + xassert(job_ptr); + xassert(job_ptr->magic == JOB_MAGIC); + + if (!IS_JOB_RUNNING(job_ptr) && !IS_JOB_SUSPENDED(job_ptr)) + return SLURM_SUCCESS; + + rc = _add_job_to_res(job_ptr, 0); + gres_plugin_job_state_log(job_ptr->gres_list, job_ptr->job_id); + + return rc; +} + +extern int select_p_select_nodeinfo_get(select_nodeinfo_t *nodeinfo, + enum select_nodedata_type dinfo, + enum node_states state, + void *data) +{ + int rc = SLURM_SUCCESS; + uint16_t *uint16 = (uint16_t *) data; + char **tmp_char = (char **) data; + select_nodeinfo_t **select_nodeinfo = (select_nodeinfo_t **) data; + + if (nodeinfo == NULL) { + error("get_nodeinfo: nodeinfo not set"); + return SLURM_ERROR; + } + + if (nodeinfo->magic != NODEINFO_MAGIC) { + error("get_nodeinfo: jobinfo magic bad"); + return SLURM_ERROR; + } + + switch (dinfo) { + case SELECT_NODEDATA_SUBGRP_SIZE: + *uint16 = 0; + break; + case SELECT_NODEDATA_SUBCNT: + if (state == NODE_STATE_ALLOCATED) + *uint16 = nodeinfo->alloc_cpus; + else + *uint16 = 0; + break; + case SELECT_NODEDATA_PTR: + *select_nodeinfo = nodeinfo; + break; + case SELECT_NODEDATA_RACK_MP: + case SELECT_NODEDATA_EXTRA_INFO: + *tmp_char = NULL; + break; + default: + error("Unsupported option %d for get_nodeinfo.", dinfo); + rc = SLURM_ERROR; + break; + } + return rc; +} + +extern int select_p_select_jobinfo_alloc(void) +{ + return SLURM_SUCCESS; +} + +extern int select_p_select_jobinfo_free(select_jobinfo_t *jobinfo) +{ + return SLURM_SUCCESS; +} + +extern int select_p_select_jobinfo_set(select_jobinfo_t *jobinfo, + enum select_jobdata_type data_type, + void *data) +{ + return SLURM_SUCCESS; +} + +extern int select_p_select_jobinfo_get(select_jobinfo_t *jobinfo, + enum select_jobdata_type data_type, + void *data) +{ + return SLURM_ERROR; +} + +extern select_jobinfo_t *select_p_select_jobinfo_copy( + select_jobinfo_t *jobinfo) +{ + return NULL; +} + +extern int select_p_select_jobinfo_pack(select_jobinfo_t *jobinfo, Buf buffer, + uint16_t protocol_version) +{ + return SLURM_SUCCESS; +} + +extern int select_p_select_jobinfo_unpack(select_jobinfo_t *jobinfo, + Buf buffer, + uint16_t protocol_version) +{ + return SLURM_SUCCESS; +} + +extern char *select_p_select_jobinfo_sprint(select_jobinfo_t *jobinfo, + char *buf, size_t size, int mode) +{ + if (buf && size) { + buf[0] = '\0'; + return buf; + } else + return NULL; +} + +extern char *select_p_select_jobinfo_xstrdup(select_jobinfo_t *jobinfo, + int mode) +{ + return NULL; +} + +extern int select_p_update_block(update_part_msg_t *part_desc_ptr) +{ + return SLURM_SUCCESS; +} + +extern int select_p_update_sub_node(update_part_msg_t *part_desc_ptr) +{ + return SLURM_SUCCESS; +} + +extern int select_p_get_info_from_plugin(enum select_plugindata_info info, + struct job_record *job_ptr, + void *data) +{ + int rc = SLURM_SUCCESS; + uint32_t *tmp_32 = (uint32_t *) data; + List *tmp_list = (List *) data; + + switch (info) { + case SELECT_CR_PLUGIN: + /* Treat like select/cons_res with repect to allocating + * individual CPUs */ + *tmp_32 = 1; + break; + case SELECT_CONFIG_INFO: + *tmp_list = NULL; + break; + default: + error("select_p_get_info_from_plugin info %d invalid", info); + rc = SLURM_ERROR; + break; + } + return rc; +} + +/* For right now, we just update the node's memory size. In order to update + * socket, core, thread or cpu count, we would need to rebuild many bitmaps. */ +extern int select_p_update_node_config(int index) +{ + if (index >= select_node_cnt) { + error("select_p_update_node_config: index too large %d>%d", + index, select_node_cnt); + return SLURM_ERROR; + } + + if (select_fast_schedule) + return SLURM_SUCCESS; + + select_node_record[index].real_memory = select_node_record[index]. + node_ptr->real_memory; + return SLURM_SUCCESS; +} + +extern int select_p_update_node_state(struct node_record *node_ptr) +{ + return SLURM_SUCCESS; +} + +extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) +{ + return SLURM_SUCCESS; +} + +extern int select_p_reconfigure(void) +{ + ListIterator job_iterator; + struct job_record *job_ptr; + int rc = SLURM_SUCCESS; + + info("cons_res: select_p_reconfigure"); + select_debug_flags = slurm_get_debug_flags(); + + /* Rebuild the global data structures */ + job_preemption_enabled = false; + job_preemption_killing = false; + job_preemption_tested = false; + rc = select_p_node_init(node_record_table_ptr, node_record_count); + if (rc != SLURM_SUCCESS) + return rc; + + /* reload job data */ + job_iterator = list_iterator_create(job_list); + if (job_iterator == NULL) + fatal ("memory allocation failure"); + while ((job_ptr = (struct job_record *) list_next(job_iterator))) { + if (IS_JOB_RUNNING(job_ptr)) { + /* add the job */ + _add_job_to_res(job_ptr, 0); + } else if (IS_JOB_SUSPENDED(job_ptr)) { + /* add the job in a suspended state */ + _add_job_to_res(job_ptr, 2); + } + } + list_iterator_destroy(job_iterator); + select_state_initializing = false; + + return SLURM_SUCCESS; +} + +extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +{ + xassert(avail_bitmap); + return bit_pick_cnt(avail_bitmap, node_cnt); +} + +extern void select_p_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) +{ + return; +} +extern void select_p_ba_fini(void) +{ + return; +} + +extern int *select_p_ba_get_dims(void) +{ + return NULL; +} diff --git a/src/plugins/select/serial/select_serial.h b/src/plugins/select/serial/select_serial.h new file mode 100644 index 0000000000..95f06c0327 --- /dev/null +++ b/src/plugins/select/serial/select_serial.h @@ -0,0 +1,132 @@ +/*****************************************************************************\ + * select_serial.n - resource selection plugin supporting serial (since CPU) + * job allocations. + ***************************************************************************** + * Copyright (C) 2006 Hewlett-Packard Development Company, L.P. +* Portions Copyright (C) 2010 SchedMD . + * Written by Susanne M. Balle, + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _SELECT_SERIAL_H +#define _SELECT_SERIAL_H + +#include +#include +#include + +#include "slurm/slurm.h" +#include "slurm/slurm_errno.h" + +#include "src/common/bitstring.h" +#include "src/common/gres.h" +#include "src/common/list.h" +#include "src/common/log.h" +#include "src/common/node_select.h" +#include "src/common/pack.h" +#include "src/common/slurm_protocol_api.h" +#include "src/common/xassert.h" +#include "src/common/xmalloc.h" +#include "src/common/xstring.h" +#include "src/common/slurm_resource_info.h" +#include "src/common/slurm_topology.h" +#include "src/slurmctld/preempt.h" +#include "src/slurmctld/slurmctld.h" + +#include "src/slurmd/slurmd/slurmd.h" + +/* + * node_res_record.node_state assists with the unique state of each node. + * When a job is allocated, these flags provide protection for nodes in a + * Shared=NO or Shared=EXCLUSIVE partition from other jobs. + * + * NOTES: + * - If node is in use by Shared=NO part, some CPUs/memory may be available + * - Caution with NODE_CR_AVAILABLE: a Sharing partition could be full. + * + * - these values are staggered so that they can be incremented as multiple + * jobs are allocated to each node. This is needed to be able to support + * preemption, which can override these protections. + */ +enum node_cr_state { + NODE_CR_AVAILABLE = 0, /* The node may be IDLE or IN USE (shared) */ + NODE_CR_ONE_ROW = 1, /* node is in use by Shared=NO part */ + NODE_CR_RESERVED = 100, /* node is in use by Shared=EXCLUSIVE part */ +}; + +/* a partition's per-row CPU allocation data */ +struct part_row_data { + bitstr_t *row_bitmap; /* contains all jobs for this row */ + uint32_t num_jobs; /* Number of jobs in this row */ + struct job_resources **job_list;/* List of jobs in this row */ + uint32_t job_list_size; /* Size of job_list array */ +}; + +/* partition CPU allocation data */ +struct part_res_record { + struct part_res_record *next; /* Ptr to next part_res_record */ + uint16_t num_rows; /* Number of row_bitmaps */ + struct part_record *part_ptr; /* controller part record pointer */ + struct part_row_data *row; /* array of rows containing jobs */ +}; + +/* per-node resource data */ +struct node_res_record { + struct node_record *node_ptr; /* ptr to the actual node */ + uint16_t cpus; /* count of processors configured */ + uint16_t sockets; /* count of sockets configured */ + uint16_t cores; /* count of cores configured */ + uint16_t vpus; /* count of virtual cpus (hyperthreads) + * configured per core */ + uint32_t real_memory; /* MB of real memory configured */ +}; + +/* per-node resource usage record */ +struct node_use_record { + uint32_t alloc_memory; /* real memory reserved by already + * scheduled jobs */ + List gres_list; /* list of gres state info managed by + * plugins */ + uint16_t node_state; /* see node_cr_state comments */ +}; + +extern uint32_t select_debug_flags; +extern uint16_t select_fast_schedule; + +extern struct part_res_record *select_part_record; +extern struct node_res_record *select_node_record; +extern struct node_use_record *select_node_usage; + +extern void cr_sort_part_rows(struct part_res_record *p_ptr); +extern uint32_t cr_get_coremap_offset(uint32_t node_index); + +#endif /* !_SELECT_SERIAL_H */ diff --git a/src/salloc/salloc.c b/src/salloc/salloc.c index ea08eb7771..5ed2ddb531 100644 --- a/src/salloc/salloc.c +++ b/src/salloc/salloc.c @@ -587,7 +587,6 @@ static void _set_submit_dir_env(void) /* Returns 0 on success, -1 on failure */ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) { - int i; #ifdef HAVE_REAL_CRAY uint64_t pagg_id = job_getjid(getpid()); /* @@ -673,7 +672,8 @@ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) desc->priority = 0; #ifdef HAVE_BG if (opt.geometry[0] > 0) { - for (i=0; igeometry[i] = opt.geometry[i]; } #endif diff --git a/src/srun/allocate.c b/src/srun/allocate.c index 660d7891df..a94603a2b2 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -546,7 +546,6 @@ job_desc_msg_create_from_opts (void) { job_desc_msg_t *j = xmalloc(sizeof(*j)); hostlist_t hl = NULL; - int i; slurm_init_job_desc_msg(j); @@ -649,7 +648,8 @@ job_desc_msg_create_from_opts (void) j->job_id = opt.jobid; #ifdef HAVE_BG if (opt.geometry[0] > 0) { - for (i=0; igeometry[i] = opt.geometry[i]; } #endif -- GitLab From e3320b26edeac98c1f87fbb7bb3e95c49a3ba67f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 08:55:32 -0700 Subject: [PATCH 117/614] Improve suspend/resume allocation tracking --- src/plugins/select/serial/select_serial.c | 72 ++++++++++++++--------- 1 file changed, 45 insertions(+), 27 deletions(-) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 0ac800ab8a..b6d0a3ac4a 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -770,20 +770,34 @@ static int _add_job_to_res(struct job_record *job_ptr, int action) struct part_res_record *p_ptr; List gres_list; int i, n; + int i_first, i_last; bitstr_t *core_bitmap; if (!job || !job->core_bitmap) { - error("job %u has no select data", job_ptr->job_id); + error("select/serial: job %u has no select data", + job_ptr->job_id); return SLURM_ERROR; } - debug3("cons_res: _add_job_to_res: job %u act %d ", job_ptr->job_id, - action); + debug3("select/serial: _add_job_to_res: job %u act %d ", + job_ptr->job_id, action); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) _dump_job_res(job); - for (i = 0, n = -1; i < select_node_cnt; i++) { + i_first = bit_ffs(job->node_bitmap); + if (i_first == -1) { + error("select/serial: job %u allocated no nodes", + job_ptr->job_id); + i_last = -2; + } else { + i_last = bit_fls(job->node_bitmap); + if (i_first != i_last) { + error("select/serial: job %u allocated more than one " + "node", job_ptr->job_id); + } + } + for (i = i_first, n = -1; i < i_last; i++) { if (!bit_test(job->node_bitmap, i)) continue; n++; @@ -810,7 +824,7 @@ static int _add_job_to_res(struct job_record *job_ptr, int action) job->memory_allocated[n]; if ((select_node_usage[i].alloc_memory > select_node_record[i].real_memory)) { - error("cons_res: node %s memory is " + error("select/serial: node %s memory is " "overallocated (%u) for job %u", node_ptr->name, select_node_usage[i].alloc_memory, @@ -826,7 +840,7 @@ static int _add_job_to_res(struct job_record *job_ptr, int action) break; } if (!p_ptr) { - error("cons_res: could not find cr partition %s", + error("select/serial: could not find cr partition %s", job_ptr->part_ptr->name); return SLURM_ERROR; } @@ -839,26 +853,26 @@ static int _add_job_to_res(struct job_record *job_ptr, int action) for (i = 0; i < p_ptr->num_rows; i++) { if (!_can_job_fit_in_row(job, &(p_ptr->row[i]))) continue; - debug3("cons_res: adding job %u to part %s row %u", + debug3("select/serial: adding job %u to part %s row %u", job_ptr->job_id, p_ptr->part_ptr->name, i); _add_job_to_row(job, &(p_ptr->row[i])); break; } if (i >= p_ptr->num_rows) { /* ERROR: could not find a row for this job */ - error("cons_res: ERROR: job overflow: " + error("select/serial: job overflow: " "could not find row for job"); /* just add the job to the last row for now */ _add_job_to_row(job, &(p_ptr->row[p_ptr->num_rows-1])); } /* update the node state */ - for (i = 0; i < select_node_cnt; i++) { + for (i = i_first; i < i_last; i++) { if (bit_test(job->node_bitmap, i)) select_node_usage[i].node_state += job->node_req; } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("DEBUG: _add_job_to_res (after):"); + info("select/serial: _add_job_to_res (after):"); _dump_part(p_ptr); } } @@ -881,7 +895,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, { struct job_resources *job = job_ptr->job_resrcs; struct node_record *node_ptr; - int first_bit, last_bit; + int i_first, i_last; int i, n; List gres_list; @@ -891,21 +905,24 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, return SLURM_SUCCESS; } if (!job || !job->core_bitmap) { - error("job %u has no select data", job_ptr->job_id); + error("select/serial: job %u has no select data", + job_ptr->job_id); return SLURM_ERROR; } - debug3("cons_res: _rm_job_from_res: job %u action %d", job_ptr->job_id, - action); + debug3("select/serial: _rm_job_from_res: job %u action %d", + job_ptr->job_id, action); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) _dump_job_res(job); - first_bit = bit_ffs(job->node_bitmap); - if (first_bit == -1) - last_bit = -2; - else - last_bit = bit_fls(job->node_bitmap); - for (i = first_bit, n = -1; i <= last_bit; i++) { + i_first = bit_ffs(job->node_bitmap); + if (i_first == -1) { + error("select/serial: job %u allocated no nodes", + job_ptr->job_id); + i_last = -2; + } else + i_last = bit_fls(job->node_bitmap); + for (i = i_first, n = -1; i <= i_last; i++) { if (!bit_test(job->node_bitmap, i)) continue; n++; @@ -927,7 +944,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, continue; /* no memory allocated */ if (node_usage[i].alloc_memory < job->memory_allocated[n]) { - error("cons_res: node %s memory is " + error("select/serial: node %s memory is " "under-allocated (%u-%u) for job %u", node_ptr->name, node_usage[i].alloc_memory, @@ -947,7 +964,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, struct part_res_record *p_ptr; if (!job_ptr->part_ptr) { - error("cons_res: removed job %u does not have a " + error("select/serial: removed job %u does not have a " "partition assigned", job_ptr->job_id); return SLURM_ERROR; @@ -958,7 +975,8 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, break; } if (!p_ptr) { - error("cons_res: removed job %u could not find part %s", + error("select/serial: removed job %u could not find " + "part %s", job_ptr->job_id, job_ptr->part_ptr->name); return SLURM_ERROR; } @@ -973,7 +991,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, for (j = 0; j < p_ptr->row[i].num_jobs; j++) { if (p_ptr->row[i].job_list[j] != job) continue; - debug3("cons_res: removed job %u from " + debug3("select/serial: removed job %u from " "part %s row %u", job_ptr->job_id, p_ptr->part_ptr->name, i); @@ -998,7 +1016,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, * the removal of this job. If all cores are now * available, set node_state = NODE_CR_AVAILABLE */ - for (i = 0, n = -1; i < select_node_cnt; i++) { + for (i = i_first, n = -1; i < i_last; i++) { if (bit_test(job->node_bitmap, i) == 0) continue; n++; @@ -1009,8 +1027,8 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, node_usage[i].node_state -= job->node_req; } else { - error("cons_res:_rm_job_from_res: " - "node_state mis-count"); + error("select/serial: _rm_job_from_res:" + " node_state mis-count"); node_usage[i].node_state = NODE_CR_AVAILABLE; } -- GitLab From dbcff948573410b4417d187b8ea819ba3dc5e921 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 10:32:33 -0700 Subject: [PATCH 118/614] Clean up some node sharing logic --- src/plugins/select/serial/select_serial.c | 43 +++++++++++------------ 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index b6d0a3ac4a..4ea37b8116 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -143,13 +143,13 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, struct job_record *job_ptr, int action); static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req, + uint32_t req_nodes, uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list); static int _sort_usable_nodes_dec(struct job_record *job_a, struct job_record *job_b); static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req); + uint32_t req_nodes, uint16_t job_node_share); static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t job_node_req, @@ -1058,7 +1058,7 @@ static struct multi_core_data * _create_default_mc(void) * - can the job run on shared nodes? (NODE_CR_ONE_ROW) * - can the job run on overcommitted resources? (NODE_CR_AVAILABLE) */ -static uint16_t _get_job_node_req(struct job_record *job_ptr) +static uint16_t _get_job_node_share(struct job_record *job_ptr) { int max_share = job_ptr->part_ptr->max_share; @@ -1102,12 +1102,12 @@ static bool _is_preemptable(struct job_record *job_ptr, /* Determine if a job can ever run */ static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req) + uint32_t req_nodes, uint16_t job_node_share) { int rc; rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, - SELECT_MODE_TEST_ONLY, cr_type, job_node_req, + SELECT_MODE_TEST_ONLY, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); return rc; @@ -1131,7 +1131,7 @@ static int _sort_usable_nodes_dec(struct job_record *job_a, /* Allocate resources for a job now, if possible */ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req, + uint32_t req_nodes, uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list) { int rc; @@ -1150,7 +1150,7 @@ top: orig_map = bit_copy(save_bitmap); fatal("bit_copy: malloc failure"); rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, - SELECT_MODE_RUN_NOW, cr_type, job_node_req, + SELECT_MODE_RUN_NOW, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); @@ -1190,7 +1190,7 @@ top: orig_map = bit_copy(save_bitmap); rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - cr_type, job_node_req, + cr_type, job_node_share, select_node_cnt, future_part, future_usage); tmp_job_ptr->details->usable_nodes = 0; @@ -1277,7 +1277,7 @@ top: orig_map = bit_copy(save_bitmap); * each one. Used by SLURM's sched/backfill plugin and Moab. */ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req, + uint32_t req_nodes, uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list) { struct part_res_record *future_part; @@ -1295,7 +1295,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, /* Try to run with currently available nodes */ rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, - SELECT_MODE_WILL_RUN, cr_type, job_node_req, + SELECT_MODE_WILL_RUN, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); if (rc == SLURM_SUCCESS) { @@ -1354,7 +1354,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_or(bitmap, orig_map); rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, cr_type, - job_node_req, select_node_cnt, future_part, + job_node_share, select_node_cnt, future_part, future_usage); if (rc == SLURM_SUCCESS) job_ptr->start_time = now + 1; @@ -1380,7 +1380,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, cr_type, - job_node_req, select_node_cnt, + job_node_share, select_node_cnt, future_part, future_usage); if (rc == SLURM_SUCCESS) { if (tmp_job_ptr->end_time <= now) @@ -1608,7 +1608,7 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, List *preemptee_job_list) { int rc = EINVAL; - uint16_t job_node_req; + uint16_t job_node_share; bool debug_cpu_bind = false, debug_check = false; xassert(bitmap); @@ -1624,26 +1624,25 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, if (!job_ptr->details->mc_ptr) job_ptr->details->mc_ptr = _create_default_mc(); - job_node_req = _get_job_node_req(job_ptr); + job_node_share = _get_job_node_share(job_ptr); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: select_p_job_test: job %u node_req %u mode %d", - job_ptr->job_id, job_node_req, mode); - info("cons_res: select_p_job_test: min_n %u max_n %u req_n %u " - "avail_n %u", - min_nodes, max_nodes, req_nodes, bit_set_count(bitmap)); + info("select/serial: select_p_job_test: job %u node_share %u " + "mode %d avail_n %u", + job_ptr->job_id, job_node_share, mode, + bit_set_count(bitmap)); _dump_state(select_part_record); } if (mode == SELECT_MODE_WILL_RUN) { rc = _will_run_test(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_req, + req_nodes, job_node_share, preemptee_candidates, preemptee_job_list); } else if (mode == SELECT_MODE_TEST_ONLY) { rc = _test_only(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_req); + req_nodes, job_node_share); } else if (mode == SELECT_MODE_RUN_NOW) { rc = _run_now(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_req, + req_nodes, job_node_share, preemptee_candidates, preemptee_job_list); } else fatal("select_p_job_test: Mode %d is invalid", mode); -- GitLab From 312e4267e8cc1f870a2eb9ea1f637c994f504060 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 11:43:41 -0700 Subject: [PATCH 119/614] Modify select/serial to reject on multi-cpu jobs --- src/plugins/select/serial/select_serial.c | 55 +++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 4ea37b8116..570d72c87f 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -1570,6 +1570,57 @@ extern int select_p_block_init(List part_list) return SLURM_SUCCESS; } +static bool _is_job_spec_serial(struct job_record *job_ptr) +{ + struct job_details *details_ptr = job_ptr->details; + struct multi_core_data *mc_ptr = NULL; + + if (details_ptr) { + if ((details_ptr->cpus_per_task > 1) && + (details_ptr->cpus_per_task != (uint16_t) NO_VAL)) + return false; + if ((details_ptr->min_cpus > 1) && + (details_ptr->min_cpus != NO_VAL)) + return false; + if ((details_ptr->min_nodes > 1) && + (details_ptr->min_nodes != NO_VAL)) + return false; + if ((details_ptr->ntasks_per_node > 1) && + (details_ptr->ntasks_per_node != (uint16_t) NO_VAL)) + return false; + if ((details_ptr->num_tasks > 1) && + (details_ptr->num_tasks != NO_VAL)) + return false; + if (details_ptr->pn_min_cpus > 1) + return false; + if (details_ptr->req_node_bitmap && + (bit_set_count(details_ptr->req_node_bitmap) > 1)) + return false; + mc_ptr = details_ptr->mc_ptr; + } + + if (mc_ptr) { + /* If data structure exists then heck once and destroy it */ + if ((mc_ptr->cores_per_socket != (uint16_t) NO_VAL) && + (mc_ptr->cores_per_socket > 1)) + return false; + if ((mc_ptr->ntasks_per_core != (uint16_t) INFINITE) && + (mc_ptr->ntasks_per_core > 1)) + return false; + if ((mc_ptr->ntasks_per_socket != (uint16_t) INFINITE) && + (mc_ptr->ntasks_per_socket > 1)) + return false; + if ((mc_ptr->sockets_per_node != (uint16_t) NO_VAL) && + (mc_ptr->sockets_per_node > 1)) + return false; + if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && + (mc_ptr->threads_per_core > 1)) + return false; + xfree(job_ptr->details->mc_ptr); + } + + return true; +} /* * select_p_job_test - Given a specification of scheduling requirements, @@ -1621,6 +1672,10 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, if (!job_ptr->details) return EINVAL; + if ((min_nodes > 1) || !_is_job_spec_serial(job_ptr)) { + info("select/serial: job %u not serial", job_ptr->job_id); + return SLURM_ERROR; + } if (!job_ptr->details->mc_ptr) job_ptr->details->mc_ptr = _create_default_mc(); -- GitLab From 8825240b5972d3f5c9445800593dde312ddce577 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 12:48:18 -0700 Subject: [PATCH 120/614] Remove much of the node select logic for select/serial --- src/plugins/select/serial/job_test.c | 966 +--------------------- src/plugins/select/serial/job_test.h | 1 - src/plugins/select/serial/select_serial.c | 16 +- 3 files changed, 43 insertions(+), 940 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 0a955494a1..dda802e0a9 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -51,13 +51,7 @@ #include "select_serial.h" static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint32_t cr_node_cnt, - uint16_t *cpu_cnt); -static int _eval_nodes_topo(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint32_t cr_node_cnt, - uint16_t *cpu_cnt); + uint32_t cr_node_cnt, uint16_t *cpu_cnt); /* _allocate_sockets - Given the job requirements, determine which sockets * from the given node can be allocated (if any) to this @@ -810,33 +804,6 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map) return core_map; } - -/* - * Determine the number of CPUs that a given job can use on a specific node - * IN: job_ptr - pointer to job we are attempting to start - * IN: node_index - zero origin node being considered for use - * IN: cpu_cnt - array with count of CPU's available to job on each node - * RET: number of usable CPUs on the identified node - */ -static int _get_cpu_cnt(struct job_record *job_ptr, const int node_index, - uint16_t *cpu_cnt) -{ - int offset, cpus; - uint16_t *layout_ptr = job_ptr->details->req_node_layout; - - cpus = cpu_cnt[node_index]; - if (layout_ptr && - bit_test(job_ptr->details->req_node_bitmap, node_index)) { - offset = bit_get_pos_num(job_ptr->details->req_node_bitmap, - node_index); - cpus = MIN(cpus, layout_ptr[offset]); - } else if (layout_ptr) { - cpus = 0; /* should not happen? */ - } - - return cpus; -} - /* Compute resource usage for the given job on all available resources * * IN: job_ptr - pointer to the job requesting resources @@ -867,860 +834,40 @@ static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, *cpu_cnt_ptr = cpu_cnt; } -static bool _enough_nodes(int avail_nodes, int rem_nodes, - uint32_t min_nodes, uint32_t req_nodes) -{ - int needed_nodes; - - if (req_nodes > min_nodes) - needed_nodes = rem_nodes + min_nodes - req_nodes; - else - needed_nodes = rem_nodes; - - return (avail_nodes >= needed_nodes); -} - -static void _cpus_to_use(int *avail_cpus, int rem_cpus, int rem_nodes, - struct job_details *details_ptr, uint16_t *cpu_cnt) -{ - int resv_cpus; /* CPUs to be allocated on other nodes */ - - if (details_ptr->shared == 0) /* Use all CPUs on this node */ - return; - - resv_cpus = MAX((rem_nodes - 1), 0); - resv_cpus *= details_ptr->pn_min_cpus; /* At least 1 */ - rem_cpus -= resv_cpus; - - if (*avail_cpus > rem_cpus) { - *avail_cpus = MAX(rem_cpus, (int)details_ptr->pn_min_cpus); - *cpu_cnt = *avail_cpus; - } -} - /* this is the heart of the selection process */ static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint32_t cr_node_cnt, - uint16_t *cpu_cnt) + uint32_t cr_node_cnt, uint16_t *cpu_cnt) { - int i, j, error_code = SLURM_ERROR; - int *consec_nodes; /* how many nodes we can add from this - * consecutive set of nodes */ - int *consec_cpus; /* how many nodes we can add from this - * consecutive set of nodes */ - int *consec_start; /* where this consecutive set starts (index) */ - int *consec_end; /* where this consecutive set ends (index) */ - int *consec_req; /* are nodes from this set required - * (in req_bitmap) */ - int consec_index, consec_size, sufficient; - int rem_cpus, rem_nodes; /* remaining resources desired */ - int total_cpus = 0; /* #CPUs allocated to job */ - int best_fit_nodes, best_fit_cpus, best_fit_req; - int best_fit_sufficient, best_fit_index = 0; - int avail_cpus, ll; /* ll = layout array index */ - bool required_node; + int i; struct job_details *details_ptr = job_ptr->details; - bitstr_t *req_map = details_ptr->req_node_bitmap; - uint16_t *layout_ptr = details_ptr->req_node_layout; + xassert(cpu_cnt); xassert(node_map); if (cr_node_cnt != node_record_count) { - error("cons_res: node count inconsistent with slurmctld"); - return error_code; - } - if (bit_set_count(node_map) < min_nodes) - return error_code; - - if ((details_ptr->req_node_bitmap) && - (!bit_super_set(details_ptr->req_node_bitmap, node_map))) - return error_code; - - if (switch_record_cnt && switch_record_table) { - /* Perform optimized resource selection based upon topology */ - return _eval_nodes_topo(job_ptr, node_map, - min_nodes, max_nodes, req_nodes, - cr_node_cnt, cpu_cnt); - } - - consec_size = 50; /* start allocation for 50 sets of - * consecutive nodes */ - consec_cpus = xmalloc(sizeof(int) * consec_size); - consec_nodes = xmalloc(sizeof(int) * consec_size); - consec_start = xmalloc(sizeof(int) * consec_size); - consec_end = xmalloc(sizeof(int) * consec_size); - consec_req = xmalloc(sizeof(int) * consec_size); - - /* Build table with information about sets of consecutive nodes */ - consec_index = 0; - consec_cpus[consec_index] = consec_nodes[consec_index] = 0; - consec_req[consec_index] = -1; /* no required nodes here by default */ - - rem_cpus = details_ptr->min_cpus; - rem_nodes = MAX(min_nodes, req_nodes); - - for (i = 0, ll = -1; i < cr_node_cnt; i++) { - if (req_map) - required_node = bit_test(req_map, i); - else - required_node = false; - if (layout_ptr && required_node) - ll++; - if (bit_test(node_map, i)) { - if (consec_nodes[consec_index] == 0) - consec_start[consec_index] = i; - avail_cpus = cpu_cnt[i]; - if (layout_ptr && required_node) { - avail_cpus = MIN(avail_cpus, layout_ptr[ll]); - } else if (layout_ptr) { - avail_cpus = 0; /* should not happen? */ - } - if ((max_nodes > 0) && required_node) { - if (consec_req[consec_index] == -1) { - /* first required node in set */ - consec_req[consec_index] = i; - } - total_cpus += avail_cpus; - rem_cpus -= avail_cpus; - rem_nodes--; - /* leaving bitmap set, decrement max limit */ - max_nodes--; - } else { /* node not selected (yet) */ - bit_clear(node_map, i); - consec_cpus[consec_index] += avail_cpus; - consec_nodes[consec_index]++; - } - } else if (consec_nodes[consec_index] == 0) { - consec_req[consec_index] = -1; - /* already picked up any required nodes */ - /* re-use this record */ - } else { - consec_end[consec_index] = i - 1; - if (++consec_index >= consec_size) { - consec_size *= 2; - xrealloc(consec_cpus, sizeof(int)*consec_size); - xrealloc(consec_nodes,sizeof(int)*consec_size); - xrealloc(consec_start,sizeof(int)*consec_size); - xrealloc(consec_end, sizeof(int)*consec_size); - xrealloc(consec_req, sizeof(int)*consec_size); - } - consec_cpus[consec_index] = 0; - consec_nodes[consec_index] = 0; - consec_req[consec_index] = -1; - } - } - if (consec_nodes[consec_index] != 0) - consec_end[consec_index++] = i - 1; - - if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - for (i = 0; i < consec_index; i++) { - info("cons_res: eval_nodes:%d consec " - "c=%d n=%d b=%d e=%d r=%d", - i, consec_cpus[i], consec_nodes[i], - consec_start[i], consec_end[i], consec_req[i]); - } - } - - /* Compute CPUs already allocated to required nodes */ - if ((details_ptr->max_cpus != NO_VAL) && - (total_cpus > details_ptr->max_cpus)) { - info("Job %u can't use required nodes due to max CPU limit", - job_ptr->job_id); - goto fini; - } - - /* accumulate nodes from these sets of consecutive nodes until */ - /* sufficient resources have been accumulated */ - while (consec_index && (max_nodes > 0)) { - best_fit_cpus = best_fit_nodes = best_fit_sufficient = 0; - best_fit_req = -1; /* first required node, -1 if none */ - for (i = 0; i < consec_index; i++) { - if (consec_nodes[i] == 0) - continue; /* no usable nodes here */ - - if (details_ptr->contiguous && - details_ptr->req_node_bitmap && - (consec_req[i] == -1)) - break; /* not required nodes */ - - sufficient = (consec_cpus[i] >= rem_cpus) && - _enough_nodes(consec_nodes[i], rem_nodes, - min_nodes, req_nodes); - - /* if first possibility OR */ - /* contains required nodes OR */ - /* first set large enough for request OR */ - /* tightest fit (less resource waste) OR */ - /* nothing yet large enough, but this is biggest */ - if ((best_fit_nodes == 0) || - ((best_fit_req == -1) && (consec_req[i] != -1)) || - (sufficient && (best_fit_sufficient == 0)) || - (sufficient && (consec_cpus[i] < best_fit_cpus)) || - (!sufficient && (consec_cpus[i] > best_fit_cpus))) { - best_fit_cpus = consec_cpus[i]; - best_fit_nodes = consec_nodes[i]; - best_fit_index = i; - best_fit_req = consec_req[i]; - best_fit_sufficient = sufficient; - } - - if (details_ptr->contiguous && - details_ptr->req_node_bitmap) { - /* Must wait for all required nodes to be - * in a single consecutive block */ - int j, other_blocks = 0; - for (j = (i+1); j < consec_index; j++) { - if (consec_req[j] != -1) { - other_blocks = 1; - break; - } - } - if (other_blocks) { - best_fit_nodes = 0; - break; - } - } - } - if (best_fit_nodes == 0) - break; - - if (details_ptr->contiguous && - ((best_fit_cpus < rem_cpus) || - (!_enough_nodes(best_fit_nodes, rem_nodes, - min_nodes, req_nodes)))) - break; /* no hole large enough */ - if (best_fit_req != -1) { - /* This collection of nodes includes required ones - * select nodes from this set, first working up - * then down from the required nodes */ - for (i = best_fit_req; - i <= consec_end[best_fit_index]; i++) { - if ((max_nodes <= 0) || - ((rem_nodes <= 0) && (rem_cpus <= 0))) - break; - if (bit_test(node_map, i)) { - /* required node already in set */ - continue; - } - avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); - if (avail_cpus <= 0) - continue; - - /* This could result in 0, but if the user - * requested nodes here we will still give - * them and then the step layout will sort - * things out. */ - _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, - details_ptr, &cpu_cnt[i]); - total_cpus += avail_cpus; - /* enforce the max_cpus limit */ - if ((details_ptr->max_cpus != NO_VAL) && - (total_cpus > details_ptr->max_cpus)) { - debug2("1 can't use this node " - "since it would put us " - "over the limit"); - total_cpus -= avail_cpus; - continue; - } - bit_set(node_map, i); - rem_nodes--; - max_nodes--; - rem_cpus -= avail_cpus; - } - for (i = (best_fit_req - 1); - i >= consec_start[best_fit_index]; i--) { - if ((max_nodes <= 0) || - ((rem_nodes <= 0) && (rem_cpus <= 0))) - break; - if (bit_test(node_map, i)) - continue; - avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); - if (avail_cpus <= 0) - continue; - - /* This could result in 0, but if the user - * requested nodes here we will still give - * them and then the step layout will sort - * things out. */ - _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, - details_ptr, &cpu_cnt[i]); - total_cpus += avail_cpus; - /* enforce the max_cpus limit */ - if ((details_ptr->max_cpus != NO_VAL) && - (total_cpus > details_ptr->max_cpus)) { - debug2("2 can't use this node " - "since it would put us " - "over the limit"); - total_cpus -= avail_cpus; - continue; - } - rem_cpus -= avail_cpus; - bit_set(node_map, i); - rem_nodes--; - max_nodes--; - } - } else { - /* No required nodes, try best fit single node */ - int *cpus_array = NULL, array_len; - int best_fit = -1, best_size = 0; - int first = consec_start[best_fit_index]; - int last = consec_end[best_fit_index]; - if (rem_nodes <= 1) { - array_len = last - first + 1; - cpus_array = xmalloc(sizeof(int) * array_len); - for (i = first, j = 0; i <= last; i++, j++) { - if (bit_test(node_map, i)) - continue; - cpus_array[j] = _get_cpu_cnt(job_ptr, - i, cpu_cnt); - if (cpus_array[j] < rem_cpus) - continue; - if ((best_fit == -1) || - (cpus_array[j] < best_size)) { - best_fit = j; - best_size = cpus_array[j]; - if (best_size == rem_cpus) - break; - } - } - /* If we found a single node to use, - * clear cpu counts for all other nodes */ - for (i = first, j = 0; - ((i <= last) && (best_fit != -1)); - i++, j++) { - if (j != best_fit) - cpus_array[j] = 0; - } - } - - for (i = first, j = 0; i <= last; i++, j++) { - if ((max_nodes <= 0) || - ((rem_nodes <= 0) && (rem_cpus <= 0))) - break; - if (bit_test(node_map, i)) - continue; - - if (cpus_array) - avail_cpus = cpus_array[j]; - else { - avail_cpus = _get_cpu_cnt(job_ptr, i, - cpu_cnt); - } - if (avail_cpus <= 0) - continue; - - if ((max_nodes == 1) && - (avail_cpus < rem_cpus)) { - /* Job can only take one more node and - * this one has insufficient CPU */ - continue; - } - - /* This could result in 0, but if the user - * requested nodes here we will still give - * them and then the step layout will sort - * things out. */ - _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, - details_ptr, &cpu_cnt[i]); - total_cpus += avail_cpus; - /* enforce the max_cpus limit */ - if ((details_ptr->max_cpus != NO_VAL) && - (total_cpus > details_ptr->max_cpus)) { - debug2("3 can't use this node " - "since it would put us " - "over the limit"); - total_cpus -= avail_cpus; - continue; - } - rem_cpus -= avail_cpus; - bit_set(node_map, i); - rem_nodes--; - max_nodes--; - } - xfree(cpus_array); - } - - if (details_ptr->contiguous || - ((rem_nodes <= 0) && (rem_cpus <= 0))) { - error_code = SLURM_SUCCESS; - break; - } - consec_cpus[best_fit_index] = 0; - consec_nodes[best_fit_index] = 0; - } - - if (error_code && (rem_cpus <= 0) && - _enough_nodes(0, rem_nodes, min_nodes, req_nodes)) - error_code = SLURM_SUCCESS; - -fini: xfree(consec_cpus); - xfree(consec_nodes); - xfree(consec_start); - xfree(consec_end); - xfree(consec_req); - return error_code; -} - -/* - * A network topology aware version of _eval_nodes(). - * NOTE: The logic here is almost identical to that of _job_test_topo() - * in select_linear.c. Any bug found here is probably also there. - */ -static int _eval_nodes_topo(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint32_t cr_node_cnt, - uint16_t *cpu_cnt) -{ - bitstr_t **switches_bitmap; /* nodes on this switch */ - int *switches_cpu_cnt; /* total CPUs on switch */ - int *switches_node_cnt; /* total nodes on switch */ - int *switches_required; /* set if has required node */ - int leaf_switch_count = 0; /* Count of leaf node switches used */ - - bitstr_t *avail_nodes_bitmap = NULL; /* nodes on any switch */ - bitstr_t *req_nodes_bitmap = NULL; - int rem_cpus, rem_nodes; /* remaining resources desired */ - int avail_cpus; - int total_cpus = 0; /* #CPUs allocated to job */ - int i, j, rc = SLURM_SUCCESS; - int best_fit_inx, first, last; - int best_fit_nodes, best_fit_cpus; - int best_fit_location = 0, best_fit_sufficient; - bool sufficient; - long time_waiting = 0; - - if (job_ptr->req_switch) { - time_t time_now; - time_now = time(NULL); - if (job_ptr->wait4switch_start == 0) - job_ptr->wait4switch_start = time_now; - time_waiting = time_now - job_ptr->wait4switch_start; - } - - rem_cpus = job_ptr->details->min_cpus; - if (req_nodes > min_nodes) - rem_nodes = req_nodes; - else - rem_nodes = min_nodes; - - if (job_ptr->details->req_node_bitmap) { - req_nodes_bitmap = bit_copy(job_ptr->details->req_node_bitmap); - i = bit_set_count(req_nodes_bitmap); - if (i > max_nodes) { - info("job %u requires more nodes than currently " - "available (%u>%u)", - job_ptr->job_id, i, max_nodes); - rc = SLURM_ERROR; - goto fini; - } - } - - /* Construct a set of switch array entries, - * use the same indexes as switch_record_table in slurmctld */ - switches_bitmap = xmalloc(sizeof(bitstr_t *) * switch_record_cnt); - switches_cpu_cnt = xmalloc(sizeof(int) * switch_record_cnt); - switches_node_cnt = xmalloc(sizeof(int) * switch_record_cnt); - switches_required = xmalloc(sizeof(int) * switch_record_cnt); - avail_nodes_bitmap = bit_alloc(cr_node_cnt); - for (i=0; ijob_id); - rc = SLURM_ERROR; - goto fini; - } - - /* Check that specific required nodes are linked together */ - if (req_nodes_bitmap) { - rc = SLURM_ERROR; - for (i=0; ijob_id); - goto fini; - } - } - - if (req_nodes_bitmap) { - /* Accumulate specific required resources, if any */ - first = bit_ffs(req_nodes_bitmap); - last = bit_fls(req_nodes_bitmap); - for (i=first; ((i<=last) && (first>=0)); i++) { - if (!bit_test(req_nodes_bitmap, i)) - continue; - if (max_nodes <= 0) { - info("job %u requires nodes than allowed", - job_ptr->job_id); - rc = SLURM_ERROR; - goto fini; - } - bit_set(bitmap, i); - bit_clear(avail_nodes_bitmap, i); - avail_cpus = _get_cpu_cnt(job_ptr, i, cpu_cnt); - /* This could result in 0, but if the user - * requested nodes here we will still give - * them and then the step layout will sort - * things out. */ - _cpus_to_use(&avail_cpus, rem_cpus, rem_nodes, - job_ptr->details, &cpu_cnt[i]); - rem_nodes--; - max_nodes--; - total_cpus += avail_cpus; - rem_cpus -= avail_cpus; - for (j=0; jdetails->max_cpus != NO_VAL) && - (total_cpus > job_ptr->details->max_cpus)) { - info("Job %u can't use required node due to max CPU " - "limit", job_ptr->job_id); - rc = SLURM_ERROR; - goto fini; - } - if ((rem_nodes <= 0) && (rem_cpus <= 0)) - goto fini; - - /* Update bitmaps and node counts for higher-level switches */ - for (j=0; jjob_id); - rc = SLURM_ERROR; - goto fini; - } - if (!switches_required[best_fit_inx] && req_nodes_bitmap ) { - debug("job %u: best_fit topology failure : no switch " - "including requested nodes and satisfying the " - "request found", job_ptr->job_id); - rc = SLURM_ERROR; - goto fini; - } - bit_and(avail_nodes_bitmap, switches_bitmap[best_fit_inx]); - if ((min_nodes < req_nodes) && - (min_nodes <= switches_node_cnt[best_fit_inx])) { - /* If job specifies a range of node counts, then allocate - * resources with a minimal switch configuration */ - rem_nodes = switches_node_cnt[best_fit_inx]; - } - - /* Identify usable leafs (within higher switch having best fit) */ - for (j=0; j 0) && ((rem_nodes > 0) || (rem_cpus > 0))) { - int *cpus_array = NULL, array_len; - best_fit_cpus = best_fit_nodes = best_fit_sufficient = 0; - for (j=0; j= rem_cpus) && - _enough_nodes(switches_node_cnt[j], - rem_nodes, min_nodes, - req_nodes); - /* If first possibility OR */ - /* first required switch OR */ - /* first set large enough for request OR */ - /* tightest fit (less resource waste) OR */ - /* nothing yet large enough, but this is biggest OR */ - /* 2 required switches of same level and cpus count */ - /* but the latter accumulated cpus amount is bigger */ - /* than the former one */ - if ((best_fit_nodes == 0) || - (!switches_required[best_fit_location] && - switches_required[j] ) || - (sufficient && (best_fit_sufficient == 0)) || - (sufficient && - (switches_cpu_cnt[j] < best_fit_cpus)) || - ((sufficient == 0) && - (switches_cpu_cnt[j] > best_fit_cpus)) || - (switches_required[best_fit_location] && - switches_required[j] && - switches_cpu_cnt[best_fit_location] == - switches_cpu_cnt[j] && - switches_required[best_fit_location] < - switches_required[j]) ) { - /* If first possibility OR */ - /* current best switch not required OR */ - /* current best switch required but this */ - /* better one too */ - if ((best_fit_nodes == 0) || - !switches_required[best_fit_location] || - (switches_required[best_fit_location] && - switches_required[j])) { - best_fit_cpus = switches_cpu_cnt[j]; - best_fit_nodes = switches_node_cnt[j]; - best_fit_location = j; - best_fit_sufficient = sufficient; - } - } - } - if (best_fit_nodes == 0) + if (details_ptr->req_node_bitmap) + bit_or(node_map, details_ptr->req_node_bitmap); + i = bit_ffs(node_map); + if (i < 0) + return SLURM_ERROR; + for ( ; i < node_record_count; i++) { + if (cpu_cnt[i]) break; - - leaf_switch_count++; - /* Use select nodes from this leaf */ - first = bit_ffs(switches_bitmap[best_fit_location]); - last = bit_fls(switches_bitmap[best_fit_location]); - - /* compute best-switch nodes available cpus array */ - array_len = last - first + 1; - cpus_array = xmalloc(sizeof(int) * array_len); - for (i=first, j=0; ((i<=last) && (first>=0)); i++, j++) { - if (!bit_test(switches_bitmap - [best_fit_location], i)) - cpus_array[j] = 0; - else - cpus_array[j] = _get_cpu_cnt(job_ptr, i, - cpu_cnt); - } - - if (job_ptr->req_switch > 0) { - if (time_waiting >= job_ptr->wait4switch) { - job_ptr->best_switch = true; - debug3("Job=%u Waited %ld sec for switches use=%d", - job_ptr->job_id, time_waiting, - leaf_switch_count); - } else if (leaf_switch_count>job_ptr->req_switch) { - /* Allocation is for more than requested number - * of switches */ - job_ptr->best_switch = false; - debug3("Job=%u waited %ld sec for switches=%u " - "found=%d wait %u", - job_ptr->job_id, time_waiting, - job_ptr->req_switch, - leaf_switch_count, - job_ptr->wait4switch); - } else { - job_ptr->best_switch = true; - } - } - - /* accumulate resources from this leaf on a best-fit basis */ - while ((max_nodes > 0) && ((rem_nodes > 0) || (rem_cpus > 0))) { - - /* pick a node using a best-fit approach */ - /* if rem_cpus < 0, then we will search for nodes - * with lower free cpus nb first - */ - int suff = 0, bfsuff = 0, bfloc = 0 , bfsize = 0; - int ca_bfloc = 0; - for (i=first, j=0; ((i<=last) && (first>=0)); - i++, j++) { - if (cpus_array[j] == 0) - continue; - suff = cpus_array[j] >= rem_cpus; - if ( (bfsize == 0) || - (suff && !bfsuff) || - (suff && (cpus_array[j] < bfsize)) || - (!suff && (cpus_array[j] > bfsize)) ) { - bfsuff = suff; - bfloc = i; - bfsize = cpus_array[j]; - ca_bfloc = j; - } - } - - /* no node found, break */ - if (bfsize == 0) - break; - - /* clear resources of this node from the switch */ - bit_clear(switches_bitmap[best_fit_location],bfloc); - switches_node_cnt[best_fit_location]--; - - switches_cpu_cnt[best_fit_location] -= bfsize; - cpus_array[ca_bfloc] = 0; - - /* if this node was already selected in an other */ - /* switch, skip it */ - if (bit_test(bitmap, bfloc)) { - continue; - } - - /* This could result in 0, but if the user - * requested nodes here we will still give - * them and then the step layout will sort - * things out. */ - _cpus_to_use(&bfsize, rem_cpus, rem_nodes, - job_ptr->details, &cpu_cnt[bfloc]); - - /* enforce the max_cpus limit */ - if ((job_ptr->details->max_cpus != NO_VAL) && - (total_cpus+bfsize > job_ptr->details->max_cpus)) { - debug2("5 can't use this node since it " - "would put us over the limit"); - continue; - } - - /* take the node into account */ - bit_set(bitmap, bfloc); - total_cpus += bfsize; - rem_nodes--; - max_nodes--; - rem_cpus -= bfsize; - } - - /* free best-switch nodes available cpus array */ - xfree(cpus_array); - - /* mark this switch as processed */ - switches_node_cnt[best_fit_location] = 0; - } - - if ((rem_cpus <= 0) && - _enough_nodes(0, rem_nodes, min_nodes, req_nodes)) { - rc = SLURM_SUCCESS; - } else - rc = SLURM_ERROR; - - fini: FREE_NULL_BITMAP(avail_nodes_bitmap); - FREE_NULL_BITMAP(req_nodes_bitmap); - for (i=0; i= node_record_count) + return SLURM_ERROR; + bit_nclear(node_map, 0, (node_record_count - 1)); + bit_set(node_map, i); + return SLURM_SUCCESS; } /* this is an intermediary step between _select_nodes and _eval_nodes * to tackle the knapsack problem. This code incrementally removes nodes * with low cpu counts for the job and re-evaluates each result */ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint32_t cr_node_cnt, - uint16_t *cpu_cnt) + uint32_t cr_node_cnt, uint16_t *cpu_cnt) { int i, count, ec, most_cpus = 0; bitstr_t *origmap, *reqmap = NULL; @@ -1747,18 +894,11 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, } } - /* NOTE: details->min_cpus is 1 by default, - * Only reset max_nodes if user explicitly sets a proc count */ - if ((job_ptr->details->min_cpus > 1) && - (max_nodes > job_ptr->details->min_cpus)) - max_nodes = job_ptr->details->min_cpus; - origmap = bit_copy(node_map); if (origmap == NULL) fatal("bit_copy malloc failure"); - ec = _eval_nodes(job_ptr, node_map, min_nodes, max_nodes, - req_nodes, cr_node_cnt, cpu_cnt); + ec = _eval_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); if (ec == SLURM_SUCCESS) { FREE_NULL_BITMAP(origmap); @@ -1787,8 +927,7 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, } if (nochange) continue; - ec = _eval_nodes(job_ptr, node_map, min_nodes, max_nodes, - req_nodes, cr_node_cnt, cpu_cnt); + ec = _eval_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); if (ec == SLURM_SUCCESS) { FREE_NULL_BITMAP(origmap); return ec; @@ -1801,9 +940,6 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, /* Select the best set of resources for the given job * IN: job_ptr - pointer to the job requesting resources - * IN: min_nodes - minimum number of nodes required - * IN: max_nodes - maximum number of nodes requested - * IN: req_nodes - number of requested nodes * IN/OUT: node_map - bitmap of available nodes / bitmap of selected nodes * IN: cr_node_cnt - total number of nodes in the cluster * IN/OUT: core_map - bitmap of available cores / bitmap of selected cores @@ -1811,8 +947,7 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, * IN: test_only - ignore allocated memory check * RET - array with number of CPUs available per node or NULL if not runnable */ -static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, - uint32_t max_nodes, uint32_t req_nodes, +static uint16_t *_select_nodes(struct job_record *job_ptr, bitstr_t *node_map, uint32_t cr_node_cnt, bitstr_t *core_map, struct node_use_record *node_usage, @@ -1823,7 +958,7 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, uint32_t start, n, a; bitstr_t *req_map = job_ptr->details->req_node_bitmap; - if (bit_set_count(node_map) < min_nodes) + if (bit_set_count(node_map) == 0) return NULL; /* get resource usage for this job from each available node */ @@ -1843,14 +978,13 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, bit_clear(node_map, n); } } - if (bit_set_count(node_map) < min_nodes) { + if (bit_set_count(node_map) == 0) { xfree(cpu_cnt); return NULL; } /* choose the best nodes for the job */ - rc = _choose_nodes(job_ptr, node_map, min_nodes, max_nodes, req_nodes, - cr_node_cnt, cpu_cnt); + rc = _choose_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); /* if successful, sync up the core_map with the node_map, and * create a cpus array */ @@ -1893,9 +1027,7 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, * for this job, with the placement influenced by existing * allocations */ -extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, int mode, +extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, uint16_t cr_type, enum node_cr_state job_node_req, uint32_t cr_node_cnt, struct part_res_record *cr_part_ptr, @@ -1934,21 +1066,6 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, } } - /* This is the case if -O/--overcommit is true */ - if (details_ptr->min_cpus == details_ptr->min_nodes) { - struct multi_core_data *mc_ptr = details_ptr->mc_ptr; - - if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && - (mc_ptr->threads_per_core > 1)) - details_ptr->min_cpus *= mc_ptr->threads_per_core; - if ((mc_ptr->cores_per_socket != (uint16_t) NO_VAL) && - (mc_ptr->cores_per_socket > 1)) - details_ptr->min_cpus *= mc_ptr->cores_per_socket; - if ((mc_ptr->sockets_per_node != (uint16_t) NO_VAL) && - (mc_ptr->sockets_per_node > 1)) - details_ptr->min_cpus *= mc_ptr->sockets_per_node; - } - if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { info("cons_res: cr_job_test: evaluating job %u on %u nodes", job_ptr->job_id, bit_set_count(bitmap)); @@ -1963,8 +1080,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, * within avail_cores */ free_cores = bit_copy(avail_cores); - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, - bitmap, cr_node_cnt, free_cores, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); if (cpu_count == NULL) { /* job cannot fit */ @@ -2052,8 +1168,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_and(free_cores, tmpcore); } } - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, - bitmap, cr_node_cnt, free_cores, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); if ((cpu_count) && (job_ptr->best_switch)) { /* job fits! We're done. */ @@ -2111,8 +1226,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, } /* make these changes permanent */ bit_copybits(avail_cores, free_cores); - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, - bitmap, cr_node_cnt, free_cores, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); if (!cpu_count) { /* job needs resources that are currently in use by @@ -2148,9 +1262,8 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_and(free_cores, tmpcore); } } - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, - bitmap, cr_node_cnt, free_cores, - node_usage, cr_type, test_only); + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, + node_usage, cr_type, test_only); if (cpu_count) { /* jobs from low-priority partitions are the only thing left * in our way. for now we'll ignore them, but FIXME: we need @@ -2186,8 +1299,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, * this partition */ bit_copybits(bitmap, orig_map); bit_copybits(free_cores, avail_cores); - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, - req_nodes, bitmap, cr_node_cnt, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { @@ -2209,8 +1321,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_copybits(tmpcore, jp_ptr->row[i].row_bitmap); bit_not(tmpcore); bit_and(free_cores, tmpcore); - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, - req_nodes, bitmap, cr_node_cnt, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); if (cpu_count) { @@ -2232,8 +1343,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, info("cons_res: cr_job_test: " "test 4 trying empty row %i",i); } - cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, - req_nodes, bitmap, cr_node_cnt, + cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); } @@ -2287,12 +1397,8 @@ alloc_job: if ((mode != SELECT_MODE_WILL_RUN) && (job_ptr->part_ptr == NULL)) error_code = EINVAL; - if ((error_code == SLURM_SUCCESS) && (mode == SELECT_MODE_WILL_RUN)) { - /* Set a reasonable value for the number of allocated CPUs. - * Without computing task distribution this is only a guess */ - job_ptr->total_cpus = MAX(job_ptr->details->min_cpus, - job_ptr->details->min_nodes); - } + if ((error_code == SLURM_SUCCESS) && (mode == SELECT_MODE_WILL_RUN)) + job_ptr->total_cpus = 1; if ((error_code != SLURM_SUCCESS) || (mode != SELECT_MODE_RUN_NOW)) { FREE_NULL_BITMAP(free_cores); xfree(cpu_count); diff --git a/src/plugins/select/serial/job_test.h b/src/plugins/select/serial/job_test.h index 4fe422b220..d61cb213a6 100644 --- a/src/plugins/select/serial/job_test.h +++ b/src/plugins/select/serial/job_test.h @@ -60,7 +60,6 @@ /* _job_test - does most of the real work for select_p_job_test(), which * pretty much just handles load-leveling and max_share logic */ int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, int mode, uint16_t cr_type, enum node_cr_state job_node_req, uint32_t cr_node_cnt, struct part_res_record *cr_part_ptr, diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 570d72c87f..182419bc8b 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -1106,7 +1106,7 @@ static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, { int rc; - rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + rc = cr_job_test(job_ptr, bitmap, SELECT_MODE_TEST_ONLY, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); @@ -1149,7 +1149,7 @@ top: orig_map = bit_copy(save_bitmap); if (!orig_map) fatal("bit_copy: malloc failure"); - rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + rc = cr_job_test(job_ptr, bitmap, SELECT_MODE_RUN_NOW, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); @@ -1187,8 +1187,7 @@ top: orig_map = bit_copy(save_bitmap); _rm_job_from_res(future_part, future_usage, tmp_job_ptr, 0); bit_or(bitmap, orig_map); - rc = cr_job_test(job_ptr, bitmap, min_nodes, - max_nodes, req_nodes, + rc = cr_job_test(job_ptr, bitmap, SELECT_MODE_WILL_RUN, cr_type, job_node_share, select_node_cnt, @@ -1294,7 +1293,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, fatal("bit_copy: malloc failure"); /* Try to run with currently available nodes */ - rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, + rc = cr_job_test(job_ptr, bitmap, SELECT_MODE_WILL_RUN, cr_type, job_node_share, select_node_cnt, select_part_record, select_node_usage); @@ -1352,8 +1351,8 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, /* Test with all preemptable jobs gone */ if (preemptee_candidates) { bit_or(bitmap, orig_map); - rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, SELECT_MODE_WILL_RUN, cr_type, + rc = cr_job_test(job_ptr, bitmap, + SELECT_MODE_WILL_RUN, cr_type, job_node_share, select_node_cnt, future_part, future_usage); if (rc == SLURM_SUCCESS) @@ -1377,8 +1376,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, tmp_job_ptr->job_id, ovrlap); _rm_job_from_res(future_part, future_usage, tmp_job_ptr, 0); - rc = cr_job_test(job_ptr, bitmap, min_nodes, - max_nodes, req_nodes, + rc = cr_job_test(job_ptr, bitmap, SELECT_MODE_WILL_RUN, cr_type, job_node_share, select_node_cnt, future_part, future_usage); -- GitLab From 2b666aeee6f068562ef7a73911511d91c81040e4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 13:46:34 -0700 Subject: [PATCH 121/614] Remove select/serial socket-based logic --- src/plugins/select/serial/job_test.c | 360 +-------------------------- 1 file changed, 4 insertions(+), 356 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index dda802e0a9..9f6b81bb52 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -50,264 +50,6 @@ #include "job_test.h" #include "select_serial.h" -static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t cr_node_cnt, uint16_t *cpu_cnt); - -/* _allocate_sockets - Given the job requirements, determine which sockets - * from the given node can be allocated (if any) to this - * job. Returns the number of cpus that can be used by - * this node AND a core-level bitmap of the selected - * sockets. - * - * IN job_ptr - pointer to job requirements - * IN/OUT core_map - core_bitmap of available cores - * IN node_i - index of node to be evaluated - */ -uint16_t _allocate_sockets(struct job_record *job_ptr, bitstr_t *core_map, - const uint32_t node_i) -{ - uint16_t cpu_count = 0, cpu_cnt = 0; - uint16_t si, cps, avail_cpus = 0, num_tasks = 0; - uint32_t core_begin = cr_get_coremap_offset(node_i); - uint32_t core_end = cr_get_coremap_offset(node_i+1); - uint32_t c; - uint16_t cpus_per_task = job_ptr->details->cpus_per_task; - uint16_t *used_cores, *free_cores, free_core_count = 0; - uint16_t i, j, sockets = select_node_record[node_i].sockets; - uint16_t cores_per_socket = select_node_record[node_i].cores; - uint16_t threads_per_core = select_node_record[node_i].vpus; - uint16_t min_cores = 1, min_sockets = 1, ntasks_per_socket = 0; - uint16_t ntasks_per_core = 0xffff; - - if (job_ptr->details && job_ptr->details->mc_ptr) { - multi_core_data_t *mc_ptr = job_ptr->details->mc_ptr; - if (mc_ptr->cores_per_socket != (uint16_t) NO_VAL) { - min_cores = mc_ptr->cores_per_socket; - } - if (mc_ptr->sockets_per_node != (uint16_t) NO_VAL){ - min_sockets = mc_ptr->sockets_per_node; - } - if (mc_ptr->ntasks_per_core) { - ntasks_per_core = mc_ptr->ntasks_per_core; - } - if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && - (mc_ptr->threads_per_core < ntasks_per_core)) { - ntasks_per_core = mc_ptr->threads_per_core; - } - ntasks_per_socket = mc_ptr->ntasks_per_socket; - } - - /* These are the job parameters that we must respect: - * - * job_ptr->details->mc_ptr->cores_per_socket (cr_core|cr_socket) - * - min # of cores per socket to allocate to this job - * job_ptr->details->mc_ptr->sockets_per_node (cr_core|cr_socket) - * - min # of sockets per node to allocate to this job - * job_ptr->details->mc_ptr->ntasks_per_core (cr_core|cr_socket) - * - number of tasks to launch per core - * job_ptr->details->mc_ptr->ntasks_per_socket (cr_core|cr_socket) - * - number of tasks to launch per socket - * - * job_ptr->details->ntasks_per_node (all cr_types) - * - total number of tasks to launch on this node - * job_ptr->details->cpus_per_task (all cr_types) - * - number of cpus to allocate per task - * - * These are the hardware constraints: - * cpus = sockets * cores_per_socket * threads_per_core - * - * These are the cores/sockets that are available: core_map - * - * NOTE: currently we only allocate at the socket level, the core - * level, or the cpu level. When hyperthreading is enabled - * in the BIOS, then there can be more than one thread/cpu - * per physical core. - * - * PROCEDURE: - * - * Step 1: Determine the current usage data: used_cores[], - * used_core_count, free_cores[], free_core_count - * - * Step 2: For core-level and socket-level: apply sockets_per_node - * and cores_per_socket to the "free" cores. - * - * Step 3: Compute task-related data: ntasks_per_core, - * ntasks_per_socket, ntasks_per_node and cpus_per_task - * and determine the number of tasks to run on this node - * - * Step 4: Mark the allocated resources in the job_cores bitmap - * and return "num_tasks" from Step 3. - * - * - * For socket and core counts, start by assuming that all available - * resources will be given to the job. Check min_* to ensure that - * there's enough resources. Reduce the resource count to match max_* - * (if necessary). Also reduce resource count (if necessary) to - * match ntasks_per_resource. - * - * NOTE: Memory is not used as a constraint here - should it? - * If not then it needs to be done somewhere else! - */ - - - /* Step 1: create and compute core-count-per-socket - * arrays and total core counts */ - free_cores = xmalloc(sockets * sizeof(uint16_t)); - used_cores = xmalloc(sockets * sizeof(uint16_t)); - - for (c = core_begin; c < core_end; c++) { - i = (uint16_t) (c - core_begin) / cores_per_socket; - if (bit_test(core_map, c)) { - free_cores[i]++; - free_core_count++; - } else { - used_cores[i]++; - } - } - /* if a socket is already in use, it cannot be used - * by this job */ - for (i = 0; i < sockets; i++) { - if (used_cores[i]) { - free_core_count -= free_cores[i]; - used_cores[i] += free_cores[i]; - free_cores[i] = 0; - } - } - xfree(used_cores); - used_cores = NULL; - - /* Step 2: check min_cores per socket and min_sockets per node */ - j = 0; - for (i = 0; i < sockets; i++) { - if (free_cores[i] < min_cores) { - /* cannot use this socket */ - free_core_count -= free_cores[i]; - free_cores[i] = 0; - continue; - } - /* count this socket as usable */ - j++; - } - if (j < min_sockets) { - /* cannot use this node */ - num_tasks = 0; - goto fini; - } - - if (free_core_count < 1) { - /* no available resources on this node */ - num_tasks = 0; - goto fini; - } - - /* Step 3: Compute task-related data: - * ntasks_per_socket, ntasks_per_node and cpus_per_task - * to determine the number of tasks to run on this node - * - * Note: cpus_per_task and ntasks_per_core need to play nice - * 2 tasks_per_core vs. 2 cpus_per_task - */ - avail_cpus = 0; - num_tasks = 0; - threads_per_core = MIN(threads_per_core, ntasks_per_core); - - for (i = 0; i < sockets; i++) { - uint16_t tmp = free_cores[i] * threads_per_core; - avail_cpus += tmp; - if (ntasks_per_socket) - num_tasks += MIN(tmp, ntasks_per_socket); - else - num_tasks += tmp; - } - - /* If job requested exclusive rights to the node don't do the - * min here since it will make it so we don't allocate the - * entire node. */ - if (job_ptr->details->ntasks_per_node && job_ptr->details->shared) - num_tasks = MIN(num_tasks, job_ptr->details->ntasks_per_node); - - if (cpus_per_task < 2) { - avail_cpus = num_tasks; - cps = num_tasks; - } else { - j = avail_cpus / cpus_per_task; - num_tasks = MIN(num_tasks, j); - if (job_ptr->details->ntasks_per_node) - avail_cpus = num_tasks * cpus_per_task; - } - if ((job_ptr->details->ntasks_per_node && - (num_tasks < job_ptr->details->ntasks_per_node)) || - (job_ptr->details->pn_min_cpus && - (avail_cpus < job_ptr->details->pn_min_cpus))) { - /* insufficient resources on this node */ - num_tasks = 0; - goto fini; - } - - /* Step 4 - make sure that ntasks_per_socket is enforced when - * allocating cores - */ - cps = num_tasks; - if (ntasks_per_socket > 1) { - cps = ntasks_per_socket; - if (cpus_per_task > 1) - cps = ntasks_per_socket * cpus_per_task; - } - si = 9999; - for (c = core_begin; c < core_end && avail_cpus > 0; c++) { - if (bit_test(core_map, c) == 0) - continue; - i = (uint16_t) (c - core_begin) / cores_per_socket; - if (free_cores[i] > 0) { - /* this socket has free cores, but make sure - * we don't use more than are needed for - * ntasks_per_socket */ - if (si != i) { - si = i; - cpu_cnt = threads_per_core; - } else { - if (cpu_cnt >= cps) { - /* do not allocate this core */ - bit_clear(core_map, c); - continue; - } - cpu_cnt += threads_per_core; - } - free_cores[i]--; - /* we have to ensure that cpu_count - * is not bigger than avail_cpus due to - * hyperthreading or this would break - * the selection logic providing more - * cpus than allowed after task-related data - * processing of stage 3 - */ - if (avail_cpus >= threads_per_core) { - avail_cpus -= threads_per_core; - cpu_count += threads_per_core; - } - else { - cpu_count += avail_cpus; - avail_cpus = 0; - } - - } else - bit_clear(core_map, c); - } - /* clear leftovers */ - if (c < core_end) - bit_nclear(core_map, c, core_end-1); - -fini: - /* if num_tasks == 0 then clear all bits on this node */ - if (!num_tasks) { - bit_nclear(core_map, core_begin, core_end-1); - cpu_count = 0; - } - xfree(free_cores); - return cpu_count; -} - - /* _allocate_cores - Given the job requirements, determine which cores * from the given node can be allocated (if any) to this * job. Returns the number of cpus that can be used by @@ -333,23 +75,6 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, uint16_t min_cores = 1, min_sockets = 1; uint16_t ntasks_per_core = 0xffff; - if (job_ptr->details && job_ptr->details->mc_ptr) { - multi_core_data_t *mc_ptr = job_ptr->details->mc_ptr; - if (mc_ptr->cores_per_socket != (uint16_t) NO_VAL) { - min_cores = mc_ptr->cores_per_socket; - } - if (mc_ptr->sockets_per_node != (uint16_t) NO_VAL){ - min_sockets = mc_ptr->sockets_per_node; - } - if (mc_ptr->ntasks_per_core) { - ntasks_per_core = mc_ptr->ntasks_per_core; - } - if ((mc_ptr->threads_per_core != (uint16_t) NO_VAL) && - (mc_ptr->threads_per_core < ntasks_per_core)) { - ntasks_per_core = mc_ptr->threads_per_core; - } - } - /* These are the job parameters that we must respect: * * job_ptr->details->mc_ptr->cores_per_socket (cr_core|cr_socket) @@ -553,8 +278,6 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, if (cr_type & CR_CORE) cpus = _allocate_cores(job_ptr, core_map, node_i, false); - else if (cr_type & CR_SOCKET) - cpus = _allocate_sockets(job_ptr, core_map, node_i); else cpus = _allocate_cores(job_ptr, core_map, node_i, true); @@ -835,8 +558,8 @@ static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, } /* this is the heart of the selection process */ -static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t cr_node_cnt, uint16_t *cpu_cnt) +static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, + uint32_t cr_node_cnt, uint16_t *cpu_cnt) { int i; struct job_details *details_ptr = job_ptr->details; @@ -863,80 +586,6 @@ static int _eval_nodes(struct job_record *job_ptr, bitstr_t *node_map, return SLURM_SUCCESS; } -/* this is an intermediary step between _select_nodes and _eval_nodes - * to tackle the knapsack problem. This code incrementally removes nodes - * with low cpu counts for the job and re-evaluates each result */ -static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t cr_node_cnt, uint16_t *cpu_cnt) -{ - int i, count, ec, most_cpus = 0; - bitstr_t *origmap, *reqmap = NULL; - - if (job_ptr->details->req_node_bitmap) - reqmap = job_ptr->details->req_node_bitmap; - - /* clear nodes from the bitmap that don't have available resources */ - for (i = 0; i < cr_node_cnt; i++) { - if (!bit_test(node_map, i)) - continue; - /* Make sure we don't say we can use a node exclusively - * that is bigger than our max cpu count. */ - if (((!job_ptr->details->shared) && - (job_ptr->details->max_cpus != NO_VAL) && - (job_ptr->details->max_cpus < cpu_cnt[i])) || - /* OR node has no CPUs */ - (cpu_cnt[i] < 1)) { - if (reqmap && bit_test(reqmap, i)) { - /* can't clear a required node! */ - return SLURM_ERROR; - } - bit_clear(node_map, i); - } - } - - origmap = bit_copy(node_map); - if (origmap == NULL) - fatal("bit_copy malloc failure"); - - ec = _eval_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); - - if (ec == SLURM_SUCCESS) { - FREE_NULL_BITMAP(origmap); - return ec; - } - - /* This nodeset didn't work. To avoid a possible knapsack problem, - * incrementally remove nodes with low cpu counts and retry */ - for (i = 0; i < cr_node_cnt; i++) { - most_cpus = MAX(most_cpus, cpu_cnt[i]); - } - - for (count = 1; count < most_cpus; count++) { - int nochange = 1; - bit_or(node_map, origmap); - for (i = 0; i < cr_node_cnt; i++) { - if ((cpu_cnt[i] > 0) && (cpu_cnt[i] <= count)) { - if (!bit_test(node_map, i)) - continue; - if (reqmap && bit_test(reqmap, i)) - continue; - nochange = 0; - bit_clear(node_map, i); - bit_clear(origmap, i); - } - } - if (nochange) - continue; - ec = _eval_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); - if (ec == SLURM_SUCCESS) { - FREE_NULL_BITMAP(origmap); - return ec; - } - } - FREE_NULL_BITMAP(origmap); - return ec; -} - /* Select the best set of resources for the given job * IN: job_ptr - pointer to the job requesting resources @@ -1061,13 +710,12 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, error_code = _verify_node_state(cr_part_ptr, job_ptr, bitmap, cr_type, node_usage, job_node_req); - if (error_code != SLURM_SUCCESS) { + if (error_code != SLURM_SUCCESS) return error_code; - } } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: evaluating job %u on %u nodes", + info("select/serial: cr_job_test: evaluating job %u on %u nodes", job_ptr->job_id, bit_set_count(bitmap)); } -- GitLab From 48ef8946132bf6a5fd44231be5f36785776fd571 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 14:47:24 -0700 Subject: [PATCH 122/614] Clean up of CPU pick for job allocation --- src/plugins/select/serial/job_test.c | 242 +++------------------- src/plugins/select/serial/select_serial.c | 32 +-- 2 files changed, 32 insertions(+), 242 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 9f6b81bb52..9a50fb8b1e 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -58,185 +58,24 @@ * IN job_ptr - pointer to job requirements * IN/OUT core_map - bitmap of cores available for use/selected for use * IN node_i - index of node to be evaluated - * IN cpu_type - if true, allocate CPUs rather than cores */ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, - const uint32_t node_i, bool cpu_type) + const uint32_t node_i) { - uint16_t cpu_count = 0, avail_cpus = 0, num_tasks = 0; uint32_t core_begin = cr_get_coremap_offset(node_i); uint32_t core_end = cr_get_coremap_offset(node_i+1); uint32_t c; - uint16_t cpus_per_task = job_ptr->details->cpus_per_task; - uint16_t *free_cores, free_core_count = 0; - uint16_t i, j, sockets = select_node_record[node_i].sockets; - uint16_t cores_per_socket = select_node_record[node_i].cores; - uint16_t threads_per_core = select_node_record[node_i].vpus; - uint16_t min_cores = 1, min_sockets = 1; - uint16_t ntasks_per_core = 0xffff; - - /* These are the job parameters that we must respect: - * - * job_ptr->details->mc_ptr->cores_per_socket (cr_core|cr_socket) - * - number of cores per socket to allocate to this jobb - * job_ptr->details->mc_ptr->sockets_per_node (cr_core|cr_socket) - * - number of sockets per node to allocate to this job - * job_ptr->details->mc_ptr->ntasks_per_core (cr_core|cr_socket) - * - number of tasks to launch per core - * job_ptr->details->mc_ptr->ntasks_per_socket (cr_core|cr_socket) - * - number of tasks to launch per socket - * - * job_ptr->details->ntasks_per_node (all cr_types) - * - total number of tasks to launch on this node - * job_ptr->details->cpus_per_task (all cr_types) - * - number of cpus to allocate per task - * - * These are the hardware constraints: - * cpus = sockets * cores_per_socket * threads_per_core - * - * These are the cores that are available for use: core_map - * - * NOTE: currently we only allocate at the socket level, the core - * level, or the cpu level. When hyperthreading is enabled - * in the BIOS, then there can be more than one thread/cpu - * per physical core. - * - * PROCEDURE: - * - * Step 1: Determine the current usage data: free_cores[] and - * free_core_count - * - * Step 2: check min_cores per socket and min_sockets per node - * - * Step 3: Compute task-related data: use ntasks_per_core, - * ntasks_per_node and cpus_per_task to determine - * the number of tasks that can run on this node - * - * Step 4: Mark the allocated resources in the job_cores bitmap - * and return "num_tasks" from Step 3. - * - * - * Start by assuming that all "free" cores will be given to the - * job. Check min_* to ensure that there's enough resources. - * Reduce the core count to match max_* (if necessary). Also, - * reduce the core count (if necessary) to match ntasks_per_core. - * Note that we're not processing ntasks_per_socket, because the - * srun manpage says that ntasks_per_socket is only valid for - * CR_SOCKET. - */ - - /* Step 1: create and compute core-count-per-socket - * arrays and total core counts */ - free_cores = xmalloc(sockets * sizeof(uint16_t)); + uint16_t free_core_count = 0; for (c = core_begin; c < core_end; c++) { - i = (uint16_t) (c - core_begin) / cores_per_socket; - if (bit_test(core_map, c)) { - free_cores[i]++; + if (bit_test(core_map, c)) free_core_count++; - } } - /* Step 2: check min_cores per socket and min_sockets per node */ - j = 0; - for (i = 0; i < sockets; i++) { - if (free_cores[i] < min_cores) { - /* cannot use this socket */ - free_core_count -= free_cores[i]; - free_cores[i] = 0; - continue; - } - /* count this socket as usable */ - j++; - } - if (j < min_sockets) { - /* cannot use this node */ - num_tasks = 0; - goto fini; - } - - if (free_core_count < 1) { - /* no available resources on this node */ - num_tasks = 0; - goto fini; - } - - /* Step 3: Compute task-related data: use ntasks_per_core, - * ntasks_per_node and cpus_per_task to determine - * the number of tasks to run on this node - * - * Note: cpus_per_task and ntasks_per_core need to play nice - * 2 tasks_per_core vs. 2 cpus_per_task - */ - threads_per_core = MIN(threads_per_core, ntasks_per_core); - num_tasks = avail_cpus = threads_per_core; - - /* convert from PER_CORE to TOTAL_FOR_NODE */ - avail_cpus *= free_core_count; - num_tasks *= free_core_count; - - /* If job requested exclusive rights to the node don't do the min here - * since it will make it so we don't allocate the entire node */ - if (job_ptr->details->ntasks_per_node && job_ptr->details->shared) - num_tasks = MIN(num_tasks, job_ptr->details->ntasks_per_node); - - if (cpus_per_task < 2) { - avail_cpus = num_tasks; - } else { - j = avail_cpus / cpus_per_task; - num_tasks = MIN(num_tasks, j); - if (job_ptr->details->ntasks_per_node) - avail_cpus = num_tasks * cpus_per_task; - } + if (free_core_count < 1) + bit_nclear(core_map, core_begin, core_end - 1); - if ((job_ptr->details->ntasks_per_node && - (num_tasks < job_ptr->details->ntasks_per_node) && - (job_ptr->details->overcommit == 0)) || - (job_ptr->details->pn_min_cpus && - (avail_cpus < job_ptr->details->pn_min_cpus))) { - /* insufficient resources on this node */ - num_tasks = 0; - goto fini; - } - - /* Step 4 */ - for (c = core_begin; c < core_end && avail_cpus > 0; c++) { - if (bit_test(core_map, c) == 0) - continue; - i = (uint16_t) (c - core_begin) / cores_per_socket; - if (free_cores[i] == 0) - bit_clear(core_map, c); - else { - free_cores[i]--; - /* we have to ensure that cpu_count - * is not bigger than avail_cpus due to - * hyperthreading or this would break - * the selection logic providing more - * cpus than allowed after task-related data - * processing of stage 3 - */ - if (avail_cpus >= threads_per_core) { - avail_cpus -= threads_per_core; - cpu_count += threads_per_core; - } - else { - cpu_count += avail_cpus; - avail_cpus = 0; - } - } - } - - /* clear leftovers */ - if (c < core_end) - bit_nclear(core_map, c, core_end-1); - -fini: - if (!num_tasks) { - bit_nclear(core_map, core_begin, core_end-1); - cpu_count = 0; - } - xfree(free_cores); - return cpu_count; + return free_core_count; } @@ -276,10 +115,7 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, return cpus; } - if (cr_type & CR_CORE) - cpus = _allocate_cores(job_ptr, core_map, node_i, false); - else - cpus = _allocate_cores(job_ptr, core_map, node_i, true); + cpus = _allocate_cores(job_ptr, core_map, node_i); core_start_bit = cr_get_coremap_offset(node_i); core_end_bit = cr_get_coremap_offset(node_i+1) - 1; @@ -402,13 +238,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, List gres_list; if (job_ptr->details->pn_min_memory & MEM_PER_CPU) { - uint16_t min_cpus; min_mem = job_ptr->details->pn_min_memory & (~MEM_PER_CPU); - min_cpus = MAX(job_ptr->details->ntasks_per_node, - job_ptr->details->pn_min_cpus); - min_cpus = MAX(min_cpus, job_ptr->details->cpus_per_task); - if (min_cpus > 0) - min_mem *= min_cpus; } else { min_mem = job_ptr->details->pn_min_memory; } @@ -424,7 +254,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, free_mem = select_node_record[i].real_memory; free_mem -= node_usage[i].alloc_memory; if (free_mem < min_mem) { - debug3("cons_res: _vns: node %s no mem %u < %u", + debug3("select/serial: node %s no mem %u < %u", select_node_record[i].node_ptr->name, free_mem, min_mem); goto clear_bit; @@ -441,14 +271,14 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, NULL, 0, 0, job_ptr->job_id, node_ptr->name); if (gres_cpus == 0) { - debug3("cons_res: _vns: node %s lacks gres", + debug3("select/serial: node %s lacks gres", node_ptr->name); goto clear_bit; } /* exclusive node check */ if (node_usage[i].node_state >= NODE_CR_RESERVED) { - debug3("cons_res: _vns: node %s in exclusive use", + debug3("select/serial: node %s in exclusive use", node_ptr->name); goto clear_bit; @@ -456,7 +286,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, } else if (node_usage[i].node_state >= NODE_CR_ONE_ROW) { if ((job_node_req == NODE_CR_RESERVED) || (job_node_req == NODE_CR_AVAILABLE)) { - debug3("cons_res: _vns: node %s non-sharing", + debug3("select/serial: node %s non-sharing", node_ptr->name); goto clear_bit; } @@ -464,7 +294,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, * in sharing partitions */ if (_is_node_busy(cr_part_ptr, i, 1, job_ptr->part_ptr)) { - debug3("cons_res: _vns: node %s sharing?", + debug3("select/serial: node %s sharing?", node_ptr->name); goto clear_bit; } @@ -474,7 +304,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, if (job_node_req == NODE_CR_RESERVED) { if (_is_node_busy(cr_part_ptr, i, 0, job_ptr->part_ptr)) { - debug3("cons_res: _vns: node %s busy", + debug3("select/serial: node %s busy", node_ptr->name); goto clear_bit; } @@ -483,7 +313,7 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, * in sharing partitions */ if (_is_node_busy(cr_part_ptr, i, 1, job_ptr->part_ptr)) { - debug3("cons_res: _vns: node %s vbusy", + debug3("select/serial: node %s vbusy", node_ptr->name); goto clear_bit; } @@ -494,9 +324,9 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, clear_bit: /* This node is not usable by this job */ bit_clear(bitmap, i); if (job_ptr->details->req_node_bitmap && - bit_test(job_ptr->details->req_node_bitmap, i)) + bit_test(job_ptr->details->req_node_bitmap, i)) { return SLURM_ERROR; - + } } return SLURM_SUCCESS; @@ -513,7 +343,7 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map) size = cr_get_coremap_offset(nodes); bitstr_t *core_map = bit_alloc(size); if (!core_map) - return NULL; + fatal("bit_alloc: malloc failure"); nodes = bit_size(node_map); for (n = 0, c = 0; n < nodes; n++) { @@ -605,7 +435,6 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, int rc; uint16_t *cpu_cnt, *cpus = NULL; uint32_t start, n, a; - bitstr_t *req_map = job_ptr->details->req_node_bitmap; if (bit_set_count(node_map) == 0) return NULL; @@ -614,24 +443,6 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, node_usage, cr_type, &cpu_cnt, test_only); - /* clear all nodes that do not have any - * usable resources for this job */ - for (n = 0; n < cr_node_cnt; n++) { - if (bit_test(node_map, n) && (cpu_cnt[n] == 0)) { - /* no resources are available for this node */ - if (req_map && bit_test(req_map, n)) { - /* cannot clear a required node! */ - xfree(cpu_cnt); - return NULL; - } - bit_clear(node_map, n); - } - } - if (bit_set_count(node_map) == 0) { - xfree(cpu_cnt); - return NULL; - } - /* choose the best nodes for the job */ rc = _choose_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); @@ -715,7 +526,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("select/serial: cr_job_test: evaluating job %u on %u nodes", + info("select/serial: evaluating job %u on %u nodes", job_ptr->job_id, bit_set_count(bitmap)); } @@ -736,7 +547,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, FREE_NULL_BITMAP(free_cores); FREE_NULL_BITMAP(avail_cores); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 0 fail: " + info("select/serial: cr_job_test: test 0 fail: " "insufficient resources"); } return SLURM_ERROR; @@ -746,14 +557,9 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, FREE_NULL_BITMAP(avail_cores); xfree(cpu_count); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) - info("cons_res: cr_job_test: test 0 pass: test_only"); + info("select/serial: cr_job_test: test 0 pass: " + "test_only"); return SLURM_SUCCESS; - } else if (!job_ptr->best_switch) { - FREE_NULL_BITMAP(orig_map); - FREE_NULL_BITMAP(free_cores); - FREE_NULL_BITMAP(avail_cores); - xfree(cpu_count); - return SLURM_ERROR; } if (cr_type == CR_MEMORY) { /* CR_MEMORY does not care about existing CPU allocations, @@ -762,7 +568,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, } xfree(cpu_count); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 0 pass - " + info("select/serial: cr_job_test: test 0 pass - " "job fits on given resources"); } @@ -818,7 +624,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, } cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); - if ((cpu_count) && (job_ptr->best_switch)) { + if (cpu_count) { /* job fits! We're done. */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { info("cons_res: cr_job_test: test 1 pass - " @@ -1027,7 +833,7 @@ alloc_job: FREE_NULL_BITMAP(orig_map); FREE_NULL_BITMAP(avail_cores); FREE_NULL_BITMAP(tmpcore); - if ((!cpu_count) || (!job_ptr->best_switch)) { + if (!cpu_count) { /* we were sent here to cleanup and exit */ FREE_NULL_BITMAP(free_cores); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 182419bc8b..ac2ea7cbff 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -1039,20 +1039,6 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, return SLURM_SUCCESS; } -static struct multi_core_data * _create_default_mc(void) -{ - struct multi_core_data *mc_ptr; - mc_ptr = xmalloc(sizeof(struct multi_core_data)); - mc_ptr->sockets_per_node = (uint16_t) NO_VAL; - mc_ptr->cores_per_socket = (uint16_t) NO_VAL; - mc_ptr->threads_per_core = (uint16_t) NO_VAL; -/* mc_ptr is initialized to zero by xmalloc*/ -/* mc_ptr->ntasks_per_socket = 0; */ -/* mc_ptr->ntasks_per_core = 0; */ -/* mc_ptr->plane_size = 0; */ - return mc_ptr; -} - /* Determine the node requirements for the job: * - does the job need exclusive nodes? (NODE_CR_RESERVED) * - can the job run on shared nodes? (NODE_CR_ONE_ROW) @@ -1675,8 +1661,6 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, return SLURM_ERROR; } - if (!job_ptr->details->mc_ptr) - job_ptr->details->mc_ptr = _create_default_mc(); job_node_share = _get_job_node_share(job_ptr); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { @@ -1868,7 +1852,7 @@ extern select_nodeinfo_t *select_p_select_nodeinfo_alloc(void) extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) { - if(nodeinfo) { + if (nodeinfo) { if (nodeinfo->magic != NODEINFO_MAGIC) { error("select_p_select_nodeinfo_free: " "nodeinfo magic bad"); @@ -1892,7 +1876,7 @@ extern int select_p_select_nodeinfo_set_all(void) /* only set this once when the last_node_update is newer than the last time we set things up. */ - if(last_set_all && (last_node_update < last_set_all)) { + if (last_set_all && (last_node_update < last_set_all)) { debug2("Node select info for set all hasn't " "changed since %ld", (long)last_set_all); @@ -1904,14 +1888,14 @@ extern int select_p_select_nodeinfo_set_all(void) node_ptr = &(node_record_table_ptr[n]); /* We have to use the '_g_' here to make sure we get - the correct data to work on. i.e. cray calls this - plugin from within select/cray which has it's own - struct. - */ + * the correct data to work on. i.e. cray calls this + * plugin from within select/cray which has it's own + * struct. + */ select_g_select_nodeinfo_get(node_ptr->select_nodeinfo, SELECT_NODEDATA_PTR, 0, (void *)&nodeinfo); - if(!nodeinfo) { + if (!nodeinfo) { error("no nodeinfo returned from structure"); continue; } @@ -2125,7 +2109,7 @@ extern int select_p_update_node_config(int index) return SLURM_SUCCESS; select_node_record[index].real_memory = select_node_record[index]. - node_ptr->real_memory; + node_ptr->real_memory; return SLURM_SUCCESS; } -- GitLab From de424813751897b8fe6565ec77f009037152ef5b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 1 May 2012 17:17:31 -0700 Subject: [PATCH 123/614] Major re-write of CPU selection logic for job allocation in select/serial --- src/plugins/select/serial/dist_tasks.c | 241 ++----------------------- src/plugins/select/serial/job_test.c | 100 ++++------ 2 files changed, 43 insertions(+), 298 deletions(-) diff --git a/src/plugins/select/serial/dist_tasks.c b/src/plugins/select/serial/dist_tasks.c index 80cf78c0ce..72f8faa83c 100644 --- a/src/plugins/select/serial/dist_tasks.c +++ b/src/plugins/select/serial/dist_tasks.c @@ -1,10 +1,7 @@ /*****************************************************************************\ - * dist_tasks.c - Assign task count to {socket,core,thread} or CPU - * resources + * dist_tasks.c - Assign specific CPUs to the job ***************************************************************************** - * Copyright (C) 2006-2008 Hewlett-Packard Development Company, L.P. - * Written by Susanne M. Balle, - * CODE-OCEC-09-009. All rights reserved. + * Copyright (C) 2012 SchedMD LLC. * * This file is part of SLURM, a resource management program. * For details, see . @@ -39,22 +36,7 @@ #include "select_serial.h" #include "dist_tasks.h" -/* _compute_task_c_b_task_dist - compute the number of tasks on each - * of the node for the cyclic and block distribution. We need to do - * this in the case of consumable resources so that we have an exact - * count for the needed hardware resources which will be used later to - * update the different used resources per node structures. - * - * The most common case is when we have more resources than needed. In - * that case we just "take" what we need and "release" the remaining - * resources for other jobs. In the case where we oversubscribe the - * CPUs/Logical processors resources we keep the initial set of - * resources. - * - * IN/OUT job_ptr - pointer to job being scheduled. The per-node - * job_res->cpus array is recomputed here. - * - */ +/* Compute the number of CPUs to use on each node */ static int _compute_c_b_task_dist(struct job_record *job_ptr) { job_resources_t *job_res = job_ptr->job_resrcs; @@ -76,231 +58,30 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) return SLURM_SUCCESS; } -/* sync up core bitmap with new CPU count using a best-fit approach - * on the available sockets - * - * The CPU array contains the distribution of CPUs, which can include - * virtual CPUs (hyperthreads) - */ +/* Select the specific cores in the job's allocation */ static void _block_sync_core_bitmap(struct job_record *job_ptr, const uint16_t cr_type) { - uint32_t c, s, i, j, n, size, csize, core_cnt; - uint16_t cpus, num_bits, vpus = 1; job_resources_t *job_res = job_ptr->job_resrcs; - bool alloc_cores = false, alloc_sockets = false; - uint16_t ntasks_per_core = 0xffff; - int* sockets_cpu_cnt; - bool* sockets_used; - uint16_t sockets_nb; - uint16_t ncores_nb; - uint16_t nsockets_nb; - uint16_t req_cpus,best_fit_cpus = 0; - uint32_t best_fit_location = 0; - bool sufficient,best_fit_sufficient; + int c_first, c_size; - if (!job_res) + if (!job_res || !job_res->core_bitmap) return; - size = bit_size(job_res->node_bitmap); - csize = bit_size(job_res->core_bitmap); - - sockets_nb = select_node_record[0].sockets; - sockets_cpu_cnt = xmalloc(sockets_nb * sizeof(int)); - sockets_used = xmalloc(sockets_nb * sizeof(bool)); - - for (c = 0, i = 0, n = 0; n < size; n++) { - - if (bit_test(job_res->node_bitmap, n) == 0) - continue; - - core_cnt = 0; - ncores_nb = select_node_record[n].cores; - nsockets_nb = select_node_record[n].sockets; - num_bits = nsockets_nb * ncores_nb; - - if ((c + num_bits) > csize) - fatal ("cons_res: _block_sync_core_bitmap index error"); - - cpus = job_res->cpus[i]; - vpus = MIN(select_node_record[n].vpus, ntasks_per_core); - - if ( nsockets_nb > sockets_nb) { - sockets_nb = nsockets_nb; - xrealloc(sockets_cpu_cnt, sockets_nb * sizeof(int)); - xrealloc(sockets_used,sockets_nb * sizeof(bool)); - } - - /* count cores provided by each socket */ - for (s = 0; s < nsockets_nb; s++) { - sockets_cpu_cnt[s]=0; - sockets_used[s]=false; - for ( j = c + (s * ncores_nb) ; - j < c + ((s+1) * ncores_nb) ; - j++ ) { - if ( bit_test(job_res->core_bitmap,j) ) - sockets_cpu_cnt[s]++; - } - } - - /* select cores in the sockets using a best-fit approach */ - while( cpus > 0 ) { - - best_fit_cpus = 0; - best_fit_sufficient = false; - - /* compute still required cores on the node */ - req_cpus = cpus / vpus; - if ( cpus % vpus ) - req_cpus++; - - /* search for the best socket, */ - /* starting from the last one to let more room */ - /* in the first one for system usage */ - for ( s = nsockets_nb - 1 ; (int) s >= (int) 0 ; s-- ) { - sufficient = sockets_cpu_cnt[s] >= req_cpus ; - if ( (best_fit_cpus == 0) || - (sufficient && !best_fit_sufficient ) || - (sufficient && (sockets_cpu_cnt[s] < - best_fit_cpus)) || - (!sufficient && (sockets_cpu_cnt[s] > - best_fit_cpus)) ) { - best_fit_cpus = sockets_cpu_cnt[s]; - best_fit_location = s; - best_fit_sufficient = sufficient; - } - } - - /* check that we have found a usable socket */ - if ( best_fit_cpus == 0 ) - break; - - debug3("dist_task: best_fit : using node[%u]:" - "socket[%u] : %u cores available", - n, best_fit_location, - sockets_cpu_cnt[best_fit_location]); - - /* select socket cores from last to first */ - /* socket[0]:Core[0] would be the last one */ - sockets_used[best_fit_location] = true; - - for ( j = c + ((best_fit_location+1) * ncores_nb) - - 1 ; - (int) j >= (int) (c + (best_fit_location * - ncores_nb)) ; - j-- ) { - - /* - * if no more cpus to select - * release remaining cores unless - * we are allocating whole sockets - */ - if ( cpus == 0 && alloc_sockets ) { - if ( bit_test(job_res->core_bitmap,j) ) - core_cnt++; - continue; - } - else if ( cpus == 0 ) { - bit_clear(job_res->core_bitmap,j); - continue; - } - - /* - * remove cores from socket count and - * cpus count using hyperthreading requirement - */ - if ( bit_test(job_res->core_bitmap,j) ) { - sockets_cpu_cnt[best_fit_location]--; - core_cnt++; - if (cpus < vpus) - cpus = 0; - else - cpus -= vpus; - } - - } - - /* loop again if more cpus required */ - if ( cpus > 0 ) - continue; - - /* release remaining cores of the unused sockets */ - for (s = 0; s < nsockets_nb; s++) { - if ( sockets_used[s] ) - continue; - bit_nclear(job_res->core_bitmap, - c+(s*ncores_nb), - c+((s+1)*ncores_nb)-1); - } - - } - - if (cpus > 0) { - /* cpu count should NEVER be greater than the number - * of set bits in the core bitmap for a given node */ - fatal("cons_res: cpus computation error"); - } - - /* adjust cpus count of the current node */ - if ((alloc_cores || alloc_sockets) && - (select_node_record[n].vpus > 1)) { - job_res->cpus[i] = core_cnt * - select_node_record[n].vpus; - } - i++; - - /* move c to the next node in core_bitmap */ - c += num_bits; - - } - - xfree(sockets_cpu_cnt); - xfree(sockets_used); + c_size = bit_size(job_res->core_bitmap); + c_first = bit_ffs(job_res->core_bitmap); + bit_nclear(job_res->core_bitmap, 0, c_size - 1); + bit_set(job_res->core_bitmap, c_first); } - -/* To effectively deal with heterogeneous nodes, we fake a cyclic - * distribution to figure out how many cpus are needed on each node. - * - * This routine is a slightly modified "version" of the routine - * _task_layout_block in src/common/dist_tasks.c. We do not need to - * assign tasks to job->hostid[] and job->tids[][] at this point so - * the cpu allocation is the same for cyclic and block. - * - * For the consumable resources support we need to determine what - * "node/CPU/Core/thread"-tuplets will be allocated for a given job. - * In the past we assumed that we only allocated one task per CPU (at - * that point the lowest level of logical processor) and didn't allow - * the use of overcommit. We have changed this philosophy and are now - * allowing people to overcommit their resources and expect the system - * administrator to enable the task/affinity plug-in which will then - * bind all of a job's tasks to its allocated resources thereby - * avoiding interference between co-allocated running jobs. - * - * In the consumable resources environment we need to determine the - * layout schema within slurmctld. - * - * We have a core_bitmap of all available cores. All we're doing here - * is removing cores that are not needed based on the task count, and - * the choice of cores to remove is based on the distribution: - * - "cyclic" removes cores "evenly", starting from the last socket, - * - "block" removes cores from the "last" socket(s) - * - "plane" removes cores "in chunks" - */ extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type) { int error_code; - /* 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"); + if (error_code != SLURM_SUCCESS) return error_code; - } - /* now sync up the core_bitmap with the allocated 'cpus' array - * based on the given distribution AND resource setting */ _block_sync_core_bitmap(job_ptr, cr_type); return SLURM_SUCCESS; } diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 9a50fb8b1e..ca7eca317f 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -493,13 +493,12 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, struct part_res_record *cr_part_ptr, struct node_use_record *node_usage) { - int error_code = SLURM_SUCCESS, ll; /* ll = layout array index */ + int error_code = SLURM_SUCCESS; uint16_t *layout_ptr = NULL; bitstr_t *orig_map, *avail_cores, *free_cores; - bitstr_t *tmpcore = NULL, *reqmap = NULL; + bitstr_t *tmpcore = NULL; bool test_only; - uint32_t c, i, k, n, csize, total_cpus, save_mem = 0; - int32_t build_cnt; + uint32_t c, i, j, k, n, csize, save_mem = 0; job_resources_t *job_res; struct job_details *details_ptr; struct part_res_record *p_ptr, *jp_ptr; @@ -507,7 +506,6 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, details_ptr = job_ptr->details; layout_ptr = details_ptr->req_node_layout; - reqmap = details_ptr->req_node_bitmap; free_job_resources(&job_ptr->job_resrcs); @@ -859,6 +857,13 @@ alloc_job: return error_code; } + n = bit_ffs(bitmap); + if (n < 0) { + FREE_NULL_BITMAP(free_cores); + xfree(cpu_count); + return error_code; + } + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { info("cons_res: cr_job_test: distributing job %u", job_ptr->job_id); @@ -896,64 +901,32 @@ alloc_job: return error_code; } - /* sync up cpus with layout_ptr, total up - * all cpus, and load the core_bitmap */ - ll = -1; - total_cpus = 0; c = 0; csize = bit_size(job_res->core_bitmap); - for (i = 0, n = 0; n < cr_node_cnt; n++) { - uint32_t j; - if (layout_ptr && reqmap && bit_test(reqmap,n)) - ll++; - if (bit_test(bitmap, n) == 0) + j = cr_get_coremap_offset(n); + k = cr_get_coremap_offset(n + 1); + for (; j < k; j++, c++) { + if (!bit_test(free_cores, j)) continue; - j = cr_get_coremap_offset(n); - k = cr_get_coremap_offset(n + 1); - for (; j < k; j++, c++) { - if (bit_test(free_cores, j)) { - if (c >= csize) { - error("cons_res: cr_job_test " - "core_bitmap index error on " - "node %s", - select_node_record[n].node_ptr-> - name); - drain_nodes(select_node_record[n]. - node_ptr->name, - "Bad core count", - getuid()); - free_job_resources(&job_res); - FREE_NULL_BITMAP(free_cores); - return SLURM_ERROR; - } - bit_set(job_res->core_bitmap, c); - } - } - - if (layout_ptr && reqmap && bit_test(reqmap, n)) { - job_res->cpus[i] = MIN(job_res->cpus[i], - layout_ptr[ll]); - } else if (layout_ptr) { - job_res->cpus[i] = 0; + if (c >= csize) { + error("select/serial: cr_job_test " + "core_bitmap index error on node %s", + select_node_record[n].node_ptr->name); + drain_nodes(select_node_record[n].node_ptr->name, + "Bad core count", getuid()); + free_job_resources(&job_res); + FREE_NULL_BITMAP(free_cores); + return SLURM_ERROR; } - total_cpus += job_res->cpus[i]; - i++; + bit_set(job_res->core_bitmap, c); + break; } - /* When 'srun --overcommit' is used, ncpus is set to a minimum value - * in order to allocate the appropriate number of nodes based on the - * job request. - * For cons_res, all available logical processors will be allocated on - * each allocated node in order to accommodate the overcommit request. - */ - if (details_ptr->overcommit && details_ptr->num_tasks) - job_res->ncpus = MIN(total_cpus, details_ptr->num_tasks); - if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: job %u ncpus %u cbits " - "%u/%u nbits %u", job_ptr->job_id, - job_res->ncpus, bit_set_count(free_cores), - bit_set_count(job_res->core_bitmap), job_res->nhosts); + info("select/serial: cr_job_test: job %u ncpus %u cbits %u/%d " + "nbits %u", job_ptr->job_id, + job_res->ncpus, bit_set_count(free_cores), 1, + job_res->nhosts); } FREE_NULL_BITMAP(free_cores); @@ -966,11 +939,7 @@ alloc_job: } /* translate job_res->cpus array into format with rep count */ - build_cnt = build_job_resources_cpu_array(job_res); - if (build_cnt >= 0) - job_ptr->total_cpus = build_cnt; - else - job_ptr->total_cpus = total_cpus; /* best guess */ + job_ptr->total_cpus = build_job_resources_cpu_array(job_res); if (!(cr_type & CR_MEMORY)) return error_code; @@ -980,15 +949,10 @@ alloc_job: if (save_mem & MEM_PER_CPU) { /* memory is per-cpu */ save_mem &= (~MEM_PER_CPU); - for (i = 0; i < job_res->nhosts; i++) { - job_res->memory_allocated[i] = job_res->cpus[i] * - save_mem; - } + job_res->memory_allocated[0] = job_res->cpus[0] * save_mem; } else { /* memory is per-node */ - for (i = 0; i < job_res->nhosts; i++) { - job_res->memory_allocated[i] = save_mem; - } + job_res->memory_allocated[0] = save_mem; } return error_code; } -- GitLab From 9a0e08ef9999fb56a12edd283d4af7c2b6c01412 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 2 May 2012 16:44:27 -0700 Subject: [PATCH 124/614] Merge change from master --- doc/man/man1/sinfo.1 | 4 ++-- src/sinfo/opts.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man/man1/sinfo.1 b/doc/man/man1/sinfo.1 index 8202904e1e..39a405a3d7 100644 --- a/doc/man/man1/sinfo.1 +++ b/doc/man/man1/sinfo.1 @@ -96,10 +96,10 @@ when running with various options are "%N %.5D %9P %6t" .TP .I "\-\-long \-\-Node" -"%N %.5D %9P %11T %.4c %.8z %.6m %.8d %.6w %8f %20R" +"%N %.5D %9P %11T %.4c %.8z %.6m %.8d %.6w %8f %20E" .TP .I "\-\-list\-reasons" -"%20R %9u %19H %N" +"%20E %9u %19H %N" .TP .I "\-\-long \-\-list\-reasons" "%20R %12u %19H %6t %N" diff --git a/src/sinfo/opts.c b/src/sinfo/opts.c index d74c878d48..3f38b9a3de 100644 --- a/src/sinfo/opts.c +++ b/src/sinfo/opts.c @@ -269,13 +269,13 @@ extern void parse_command_line(int argc, char *argv[]) } else if ( params.node_flag ) { params.node_field_flag = true; /* compute size later */ params.format = params.long_output ? - "%N %.6D %.9P %.11T %.4c %.8z %.6m %.8d %.6w %.8f %20R" : + "%N %.6D %.9P %.11T %.4c %.8z %.6m %.8d %.6w %.8f %20E" : "%N %.6D %.9P %6t"; } else if (params.list_reasons) { params.format = params.long_output ? - "%20R %12U %19H %6t %N" : - "%20R %9u %19H %N"; + "%20E %12U %19H %6t %N" : + "%20E %9u %19H %N"; } else if ((env_val = getenv ("SINFO_FORMAT"))) { params.format = xstrdup(env_val); -- GitLab From a16fbaa202cf04b96adce83eb507b26cc86b2c24 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 08:29:50 -0700 Subject: [PATCH 125/614] Modify tests for select/serial --- testsuite/expect/globals | 30 ++++++++++++++++++++++++++++++ testsuite/expect/test1.15 | 6 ++++-- testsuite/expect/test1.2 | 9 +++++---- testsuite/expect/test1.9 | 9 +++++---- 4 files changed, 44 insertions(+), 10 deletions(-) diff --git a/testsuite/expect/globals b/testsuite/expect/globals index b0fa6822d9..d9a274b4d8 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1275,6 +1275,36 @@ proc test_cray { } { return $cray } +################################################################ +# +# Proc: test_serial +# +# Purpose: Determine if the system runs only serial jobs +# +# Returns 1 if the system is serial, 0 otherwise +# +################################################################ + +proc test_serial { } { + global scontrol bin_bash bin_grep + + log_user 0 + set serial 0 + spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectType" + expect { + "select/serial" { + set serial 1 + exp_continue + } + eof { + wait + } + } + log_user 1 + + return $serial +} + ################################################################ # # Proc: test_emulated diff --git a/testsuite/expect/test1.15 b/testsuite/expect/test1.15 index 54461c98ec..7d7f265431 100755 --- a/testsuite/expect/test1.15 +++ b/testsuite/expect/test1.15 @@ -42,10 +42,12 @@ print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit $exit_code } # diff --git a/testsuite/expect/test1.2 b/testsuite/expect/test1.2 index cce46c6f4c..b1d4541220 100755 --- a/testsuite/expect/test1.2 +++ b/testsuite/expect/test1.2 @@ -43,12 +43,13 @@ print_header $test_id if {[test_bluegene]} { # We never launch more than one task on emulated Bluegene set task_cnt 1 -} else { - set task_cnt 10 -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + set task_cnt 1 +} else { + set task_cnt 10 } # diff --git a/testsuite/expect/test1.9 b/testsuite/expect/test1.9 index 7fc2c2f077..9dc84f5a93 100755 --- a/testsuite/expect/test1.9 +++ b/testsuite/expect/test1.9 @@ -42,12 +42,13 @@ print_header $test_id if {[test_bluegene]} { # We never launch more than one task on emulated Bluegene set task_cnt 1 -} else { - set task_cnt 5 -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + set task_cnt 1 +} else { + set task_cnt 5 } # -- GitLab From 786b13368f571011e10b332fec54282376bda602 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 13:57:21 -0700 Subject: [PATCH 126/614] Remove unused function arguments --- src/plugins/select/serial/select_serial.c | 27 ++++++++--------------- 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index ac2ea7cbff..5b05df4033 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -142,17 +142,14 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, struct node_use_record *node_usage, struct job_record *job_ptr, int action); static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_share, + uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list); static int _sort_usable_nodes_dec(struct job_record *job_a, struct job_record *job_b); static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_share); + uint16_t job_node_share); static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_req, + uint16_t job_node_req, List preemptee_candidates, List *preemptee_job_list); static void _dump_job_res(struct job_resources *job) { @@ -1087,8 +1084,7 @@ static bool _is_preemptable(struct job_record *job_ptr, /* Determine if a job can ever run */ static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_share) + uint16_t job_node_share) { int rc; @@ -1116,8 +1112,7 @@ static int _sort_usable_nodes_dec(struct job_record *job_a, /* Allocate resources for a job now, if possible */ static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_share, + uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list) { int rc; @@ -1261,8 +1256,7 @@ top: orig_map = bit_copy(save_bitmap); * jobs from node table at termination time and run _test_job() after * each one. Used by SLURM's sched/backfill plugin and Moab. */ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, - uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes, uint16_t job_node_share, + uint16_t job_node_share, List preemptee_candidates, List *preemptee_job_list) { struct part_res_record *future_part; @@ -1671,15 +1665,12 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, _dump_state(select_part_record); } if (mode == SELECT_MODE_WILL_RUN) { - rc = _will_run_test(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_share, + rc = _will_run_test(job_ptr, bitmap, job_node_share, preemptee_candidates, preemptee_job_list); } else if (mode == SELECT_MODE_TEST_ONLY) { - rc = _test_only(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_share); + rc = _test_only(job_ptr, bitmap, job_node_share); } else if (mode == SELECT_MODE_RUN_NOW) { - rc = _run_now(job_ptr, bitmap, min_nodes, max_nodes, - req_nodes, job_node_share, + rc = _run_now(job_ptr, bitmap, job_node_share, preemptee_candidates, preemptee_job_list); } else fatal("select_p_job_test: Mode %d is invalid", mode); -- GitLab From 566c9376b2fdc538b1fd336450c4efd71d1c3e60 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 14:02:35 -0700 Subject: [PATCH 127/614] Change bitmap loops to use first/last bit's set --- src/plugins/select/serial/job_test.c | 31 ++++++++++++++++------------ 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index ca7eca317f..3e1e6cc2a0 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -72,9 +72,6 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, free_core_count++; } - if (free_core_count < 1) - bit_nclear(core_map, core_begin, core_end - 1); - return free_core_count; } @@ -234,16 +231,20 @@ static int _verify_node_state(struct part_res_record *cr_part_ptr, enum node_cr_state job_node_req) { struct node_record *node_ptr; - uint32_t i, free_mem, gres_cpus, min_mem, size; + uint32_t i, free_mem, gres_cpus, min_mem; + int i_first, i_last; List gres_list; - if (job_ptr->details->pn_min_memory & MEM_PER_CPU) { + if (job_ptr->details->pn_min_memory & MEM_PER_CPU) min_mem = job_ptr->details->pn_min_memory & (~MEM_PER_CPU); - } else { + else min_mem = job_ptr->details->pn_min_memory; - } - size = bit_size(bitmap); - for (i = 0; i < size; i++) { + i_first = bit_ffs(bitmap); + if (i_first >= 0) + i_last = bit_fls(bitmap); + else + i_last = -2; + for (i = i_first; i <= i_last; i++) { if (!bit_test(bitmap, i)) continue; node_ptr = select_node_record[i].node_ptr; @@ -332,12 +333,12 @@ clear_bit: /* This node is not usable by this job */ return SLURM_SUCCESS; } - /* given an "avail" node_bitmap, return a corresponding "avail" core_bitmap */ bitstr_t *_make_core_bitmap(bitstr_t *node_map) { uint32_t n, c, nodes, size; uint32_t coff; + int i_first, i_last; nodes = bit_size(node_map); size = cr_get_coremap_offset(nodes); @@ -345,10 +346,14 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map) if (!core_map) fatal("bit_alloc: malloc failure"); - nodes = bit_size(node_map); - for (n = 0, c = 0; n < nodes; n++) { + i_first = bit_ffs(node_map); + if (i_first >= 0) + i_last = bit_fls(node_map); + else + i_last = -2; + for (n = i_first, c = 0; n <= i_last; n++) { if (bit_test(node_map, n)) { - coff = cr_get_coremap_offset(n+1); + coff = cr_get_coremap_offset(n + 1); while (c < coff) { bit_set(core_map, c++); } -- GitLab From 281464b9071422277f91cc3f641fc5596be9efe1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 14:05:06 -0700 Subject: [PATCH 128/614] Correct log header for select/serial --- src/plugins/select/serial/job_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 3e1e6cc2a0..0e1258f6a0 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -840,7 +840,7 @@ alloc_job: /* we were sent here to cleanup and exit */ FREE_NULL_BITMAP(free_cores); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: exiting cr_job_test with no " + info("select/serial: exiting cr_job_test with no " "allocation"); } return SLURM_ERROR; @@ -870,7 +870,7 @@ alloc_job: } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: distributing job %u", + info("select/serial: cr_job_test: distributing job %u", job_ptr->job_id); } -- GitLab From f1baf1e0980b6a206f9e777ddc20e58043472e16 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 15:09:09 -0700 Subject: [PATCH 129/614] General select/serial clean up This corrects some logging message headers, streamlines som ecode, adds other comments, etc. --- src/plugins/select/serial/dist_tasks.c | 4 +- src/plugins/select/serial/job_test.c | 78 ++++++++++++-------------- 2 files changed, 37 insertions(+), 45 deletions(-) diff --git a/src/plugins/select/serial/dist_tasks.c b/src/plugins/select/serial/dist_tasks.c index 72f8faa83c..8ddef4efd4 100644 --- a/src/plugins/select/serial/dist_tasks.c +++ b/src/plugins/select/serial/dist_tasks.c @@ -42,11 +42,11 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) job_resources_t *job_res = job_ptr->job_resrcs; if (!job_res || !job_res->cpus) { - error("cons_res: _compute_c_b_task_dist given NULL job_res"); + error("select/serial: _compute_c_b_task_dist job_res==NULL"); return SLURM_ERROR; } if (job_res->nhosts != 1) { - error("cons_res: _compute_c_b_task_dist given nhosts==%u", + error("select/serial: _compute_c_b_task_dist given nhosts==%u", job_res->nhosts); return SLURM_ERROR; } diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 0e1258f6a0..2ba6886bc4 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -63,7 +63,7 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, const uint32_t node_i) { uint32_t core_begin = cr_get_coremap_offset(node_i); - uint32_t core_end = cr_get_coremap_offset(node_i+1); + uint32_t core_end = cr_get_coremap_offset(node_i + 1); uint32_t c; uint16_t free_core_count = 0; @@ -115,32 +115,16 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, cpus = _allocate_cores(job_ptr, core_map, node_i); core_start_bit = cr_get_coremap_offset(node_i); - core_end_bit = cr_get_coremap_offset(node_i+1) - 1; + core_end_bit = cr_get_coremap_offset(node_i + 1) - 1; node_ptr = select_node_record[node_i].node_ptr; - if (cr_type & CR_MEMORY) { - /* Memory Check: check pn_min_memory to see if: - * - this node has enough memory (MEM_PER_CPU == 0) - * - there are enough free_cores (MEM_PER_CPU = 1) - */ + if ((cr_type & CR_MEMORY) && cpus) { req_mem = job_ptr->details->pn_min_memory & ~MEM_PER_CPU; avail_mem = select_node_record[node_i].real_memory; if (!test_only) avail_mem -= node_usage[node_i].alloc_memory; - if (job_ptr->details->pn_min_memory & MEM_PER_CPU) { - /* memory is per-cpu */ - while ((cpus > 0) && ((req_mem * cpus) > avail_mem)) - cpus--; - if ((cpus < job_ptr->details->ntasks_per_node) || - ((job_ptr->details->cpus_per_task > 1) && - (cpus < job_ptr->details->cpus_per_task))) - cpus = 0; - /* FIXME: Need to recheck min_cores, etc. here */ - } else { - /* memory is per node */ - if (req_mem > avail_mem) - cpus = 0; - } + if (req_mem > avail_mem) + cpus = 0; } if (node_usage[node_i].gres_list) @@ -163,7 +147,7 @@ uint16_t _can_job_run_on_node(struct job_record *job_ptr, bitstr_t *core_map, bit_nclear(core_map, core_start_bit, core_end_bit); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: _can_job_run_on_node: %u cpus on %s(%d), " + info("select/serial: _can_job_run_on_node: %u cpus on %s(%d), " "mem %u/%u", cpus, select_node_record[node_i].node_ptr->name, node_usage[node_i].node_state, @@ -380,14 +364,22 @@ static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, { uint16_t *cpu_cnt; uint32_t n; + int i_first, i_last; cpu_cnt = xmalloc(cr_node_cnt * sizeof(uint16_t)); - for (n = 0; n < cr_node_cnt; n++) { + i_first = bit_ffs(node_map); + if (i_first >= 0) + i_last = bit_fls(node_map); + else + i_last = -2; + for (n = i_first; n <= i_last; n++) { if (!bit_test(node_map, n)) continue; cpu_cnt[n] = _can_job_run_on_node(job_ptr, core_map, n, node_usage, cr_type, test_only); + if (cpu_cnt[n]) + break; /* select/serial: only need one node */ } *cpu_cnt_ptr = cpu_cnt; } @@ -412,7 +404,7 @@ static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, return SLURM_ERROR; for ( ; i < node_record_count; i++) { if (cpu_cnt[i]) - break; + break; /* select/serial: only need one node */ } if (i >= node_record_count) return SLURM_ERROR; @@ -448,7 +440,7 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, node_usage, cr_type, &cpu_cnt, test_only); - /* choose the best nodes for the job */ + /* choose first node for the job */ rc = _choose_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); /* if successful, sync up the core_map with the node_map, and @@ -499,7 +491,6 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, struct node_use_record *node_usage) { int error_code = SLURM_SUCCESS; - uint16_t *layout_ptr = NULL; bitstr_t *orig_map, *avail_cores, *free_cores; bitstr_t *tmpcore = NULL; bool test_only; @@ -510,7 +501,6 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, uint16_t *cpu_count; details_ptr = job_ptr->details; - layout_ptr = details_ptr->req_node_layout; free_job_resources(&job_ptr->job_resrcs); @@ -630,7 +620,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, if (cpu_count) { /* job fits! We're done. */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 1 pass - " + info("select/serial: cr_job_test: test 1 pass - " "idle resources found"); } goto alloc_job; @@ -643,13 +633,13 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, * removes jobs from simulated resource allocation map * before this point. */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 1 fail - " + info("select/serial: cr_job_test: test 1 fail - " "no idle resources available"); } goto alloc_job; } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 1 fail - " + info("select/serial: cr_job_test: test 1 fail - " "not enough idle resources"); } @@ -662,7 +652,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, break; } if (!jp_ptr) { - fatal("cons_res error: could not find partition for job %u", + fatal("select/serial: could not find partition for job %u", job_ptr->job_id); } @@ -689,14 +679,14 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, /* job needs resources that are currently in use by * higher-priority jobs, so fail for now */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 2 fail - " + info("select/serial: cr_job_test: test 2 fail - " "resources busy with higher priority jobs"); } goto alloc_job; } xfree(cpu_count); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 2 pass - " + info("select/serial: cr_job_test: test 2 pass - " "available resources for this priority"); } @@ -728,13 +718,13 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, * between this job (in these idle nodes) and the low-priority * jobs */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 3 pass - " + info("select/serial: cr_job_test: test 3 pass - " "found resources"); } goto alloc_job; } if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 3 fail - " + info("select/serial: cr_job_test: test 3 fail - " "not enough idle resources in same priority"); } @@ -760,7 +750,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, free_cores, node_usage, cr_type, test_only); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 4 pass - " + info("select/serial: cr_job_test: test 4 pass - " "first row found"); } goto alloc_job; @@ -783,13 +773,15 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, test_only); if (cpu_count) { if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 4 pass - " - "row %i", i); + info("select/serial: cr_job_test: " + "test 4 pass - row %i", i); } break; } - if (select_debug_flags & DEBUG_FLAG_CPU_BIND) - info("cons_res: cr_job_test: test 4 fail - row %i", i); + if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { + info("select/serial: cr_job_test: " + "test 4 fail - row %i", i); + } } if ((i < c) && !jp_ptr->row[i].row_bitmap) { @@ -797,7 +789,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, bit_copybits(bitmap, orig_map); bit_copybits(free_cores, avail_cores); if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: " + info("select/serial: cr_job_test: " "test 4 trying empty row %i",i); } cpu_count = _select_nodes(job_ptr, bitmap, cr_node_cnt, @@ -808,7 +800,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, if (!cpu_count) { /* job can't fit into any row, so exit */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { - info("cons_res: cr_job_test: test 4 fail - " + info("select/serial: cr_job_test: test 4 fail - " "busy partition"); } goto alloc_job; @@ -950,7 +942,7 @@ alloc_job: return error_code; /* load memory allocated array */ - save_mem =details_ptr->pn_min_memory; + save_mem = details_ptr->pn_min_memory; if (save_mem & MEM_PER_CPU) { /* memory is per-cpu */ save_mem &= (~MEM_PER_CPU); -- GitLab From de57a17e216175b5a6f443410e2f34ea606c2000 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 09:39:16 -0700 Subject: [PATCH 130/614] Add response to EpilogComplete RPC --- src/slurmctld/proc_req.c | 5 +++-- src/slurmd/slurmd/req.c | 18 +++++++++++++----- src/slurmd/slurmd/slurmd.c | 10 ++-------- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 9b9ccee11d..4a505da91e 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1284,18 +1284,19 @@ static void _slurm_rpc_epilog_complete(slurm_msg_t * msg) START_TIMER; debug2("Processing RPC: MESSAGE_EPILOG_COMPLETE uid=%d", uid); - lock_slurmctld(job_write_lock); if (!validate_slurm_user(uid)) { - unlock_slurmctld(job_write_lock); error("Security violation, EPILOG_COMPLETE RPC from uid=%d", uid); + slurm_send_rc_msg(msg, SLURM_ERROR); return; } + lock_slurmctld(job_write_lock); if (job_epilog_complete(epilog_msg->job_id, epilog_msg->node_name, epilog_msg->return_code)) run_scheduler = true; unlock_slurmctld(job_write_lock); +slurm_send_rc_msg(msg, SLURM_SUCCESS); /* FIXME: Placeholder for now */ END_TIMER2("_slurm_rpc_epilog_complete"); if (epilog_msg->return_code) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 470153f3fe..f6136e54ea 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -237,6 +237,7 @@ slurmd_req(slurm_msg_t *msg) switch(msg->msg_type) { case REQUEST_BATCH_JOB_LAUNCH: + debug2("Processing RPC: REQUEST_BATCH_JOB_LAUNCH"); /* Mutex locking moved into _rpc_batch_job() due to * very slow prolog on Blue Gene system. Only batch * jobs are supported on Blue Gene (no job steps). */ @@ -289,6 +290,7 @@ slurmd_req(slurm_msg_t *msg) slurm_free_signal_job_msg(msg->data); break; case REQUEST_SUSPEND: + debug2("Processing RPC: REQUEST_SUSPEND"); _rpc_suspend_job(msg); last_slurmctld_msg = time(NULL); slurm_free_suspend_msg(msg->data); @@ -306,24 +308,29 @@ slurmd_req(slurm_msg_t *msg) slurm_free_kill_job_msg(msg->data); break; case REQUEST_UPDATE_JOB_TIME: + debug2("Processing RPC: REQUEST_UPDATE_JOB_TIME"); _rpc_update_time(msg); last_slurmctld_msg = time(NULL); slurm_free_update_job_time_msg(msg->data); break; case REQUEST_SHUTDOWN: + debug2("Processing RPC: REQUEST_SHUTDOWN"); _rpc_shutdown(msg); slurm_free_shutdown_msg(msg->data); break; case REQUEST_RECONFIGURE: + debug2("Processing RPC: REQUEST_RECONFIGURE"); _rpc_reconfig(msg); last_slurmctld_msg = time(NULL); /* No body to free */ break; case REQUEST_REBOOT_NODES: + debug2("Processing RPC: REQUEST_REBOOT_NODES"); _rpc_reboot(msg); slurm_free_reboot_msg(msg->data); break; case REQUEST_NODE_REGISTRATION_STATUS: + debug2("Processing RPC: REQUEST_NODE_REGISTRATION_STATUS"); /* Treat as ping (for slurmctld agent, just return SUCCESS) */ rc = _rpc_ping(msg); last_slurmctld_msg = time(NULL); @@ -338,6 +345,7 @@ slurmd_req(slurm_msg_t *msg) /* No body to free */ break; case REQUEST_HEALTH_CHECK: + debug2("Processing RPC: REQUEST_HEALTH_CHECK"); _rpc_health_check(msg); last_slurmctld_msg = time(NULL); /* No body to free */ @@ -2964,10 +2972,11 @@ static int _epilog_complete(uint32_t jobid, int rc) { int ret = SLURM_SUCCESS; - slurm_msg_t msg; + slurm_msg_t msg, resp; epilog_complete_msg_t req; slurm_msg_t_init(&msg); + slurm_msg_t_init(&resp); req.job_id = jobid; req.return_code = rc; @@ -2980,13 +2989,12 @@ _epilog_complete(uint32_t jobid, int rc) msg.msg_type = MESSAGE_EPILOG_COMPLETE; msg.data = &req; - /* Note: No return code to message, slurmctld will resend - * TERMINATE_JOB request if message send fails */ - if (slurm_send_only_controller_msg(&msg) < 0) { + if (slurm_send_recv_controller_msg(&msg, &resp) < 0) { error("Unable to send epilog complete message: %m"); ret = SLURM_ERROR; - } else + } else { debug ("Job %u: sent epilog complete msg: rc = %d", jobid, rc); + } switch_g_free_node_info(&req.switch_nodeinfo); return ret; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index cf3a4affbd..d7e42b367a 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -538,14 +538,12 @@ cleanup: extern int send_registration_msg(uint32_t status, bool startup) { - int ret_val = SLURM_SUCCESS; + int rc, ret_val = SLURM_SUCCESS; slurm_msg_t req; - slurm_msg_t resp; slurm_node_registration_status_msg_t *msg = xmalloc (sizeof (slurm_node_registration_status_msg_t)); slurm_msg_t_init(&req); - slurm_msg_t_init(&resp); msg->startup = (uint16_t) startup; _fill_registration_msg(msg); @@ -554,18 +552,14 @@ send_registration_msg(uint32_t status, bool startup) req.msg_type = MESSAGE_NODE_REGISTRATION_STATUS; req.data = msg; - if (slurm_send_recv_controller_msg(&req, &resp) < 0) { + if (slurm_send_recv_controller_rc_msg(&req, &rc) < 0) { error("Unable to register: %m"); ret_val = SLURM_FAILURE; } else { sent_reg_time = time(NULL); - slurm_free_return_code_msg(resp.data); } slurm_free_node_registration_status_msg (msg); - /* XXX look at response msg - */ - return ret_val; } -- GitLab From 720ed91c08d3e3ac26c61b644b6e4a823a16ddb6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 10:05:57 -0700 Subject: [PATCH 131/614] Remove response to EPILOG_COMPLETE RPC --- src/slurmctld/proc_req.c | 2 -- src/slurmd/slurmd/req.c | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 4a505da91e..137caefd4b 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1287,7 +1287,6 @@ static void _slurm_rpc_epilog_complete(slurm_msg_t * msg) if (!validate_slurm_user(uid)) { error("Security violation, EPILOG_COMPLETE RPC from uid=%d", uid); - slurm_send_rc_msg(msg, SLURM_ERROR); return; } @@ -1296,7 +1295,6 @@ static void _slurm_rpc_epilog_complete(slurm_msg_t * msg) epilog_msg->return_code)) run_scheduler = true; unlock_slurmctld(job_write_lock); -slurm_send_rc_msg(msg, SLURM_SUCCESS); /* FIXME: Placeholder for now */ END_TIMER2("_slurm_rpc_epilog_complete"); if (epilog_msg->return_code) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index f6136e54ea..5d395b1ba5 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -2972,11 +2972,10 @@ static int _epilog_complete(uint32_t jobid, int rc) { int ret = SLURM_SUCCESS; - slurm_msg_t msg, resp; + slurm_msg_t msg; epilog_complete_msg_t req; slurm_msg_t_init(&msg); - slurm_msg_t_init(&resp); req.job_id = jobid; req.return_code = rc; @@ -2989,7 +2988,9 @@ _epilog_complete(uint32_t jobid, int rc) msg.msg_type = MESSAGE_EPILOG_COMPLETE; msg.data = &req; - if (slurm_send_recv_controller_msg(&msg, &resp) < 0) { + /* Note: No return code to message, slurmctld will resend + * TERMINATE_JOB request if message send fails */ + if (slurm_send_only_controller_msg(&msg) < 0) { error("Unable to send epilog complete message: %m"); ret = SLURM_ERROR; } else { -- GitLab From 2e1a2ed8cd18a67b755a383b6a4ebaac9dede00f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 3 May 2012 12:21:03 -0700 Subject: [PATCH 132/614] Remove unnecessary function arguments --- src/plugins/select/serial/job_test.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/plugins/select/serial/job_test.h b/src/plugins/select/serial/job_test.h index d61cb213a6..6cf9e73edd 100644 --- a/src/plugins/select/serial/job_test.h +++ b/src/plugins/select/serial/job_test.h @@ -56,9 +56,6 @@ #include "src/common/slurm_resource_info.h" #include "src/slurmctld/slurmctld.h" - -/* _job_test - does most of the real work for select_p_job_test(), which - * pretty much just handles load-leveling and max_share logic */ int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, uint16_t cr_type, enum node_cr_state job_node_req, uint32_t cr_node_cnt, -- GitLab From 8c82c08dc6887faefbe470735a97b4c5b810f68b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 11:17:22 -0700 Subject: [PATCH 133/614] Correction to slurmctld agent kill message type check --- src/slurmctld/agent.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index f3a8879843..3d556090a2 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -818,6 +818,7 @@ static void *_thread_per_group_rpc(void *args) xsignal(SIGUSR1, _sig_handler); xsignal_unblock(sig_array); is_kill_msg = ( (msg_type == REQUEST_KILL_TIMELIMIT) || + (msg_type == REQUEST_KILL_PREEMPTED) || (msg_type == REQUEST_TERMINATE_JOB) ); srun_agent = ( (msg_type == SRUN_PING) || (msg_type == SRUN_EXEC) || -- GitLab From 33ce45c14bf6a42055c089c903c7eade2f17bd8b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 11:35:50 -0700 Subject: [PATCH 134/614] Bump RPC versions from 2.4 to 2.5 --- META | 8 ++++---- src/common/slurm_protocol_common.h | 3 ++- src/common/slurm_protocol_util.c | 11 +++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/META b/META index 44b842aa6e..e379040674 100644 --- a/META +++ b/META @@ -8,10 +8,10 @@ Meta: 1 Name: slurm Major: 2 - Minor: 4 + Minor: 5 Micro: 0 - Version: 2.4.0 - Release: 0.pre4 + Version: 2.5.0 + Release: 0.pre1 ## # When changing API_CURRENT update src/common/slurm_protocol_common.h # with a new SLURM_PROTOCOL_VERSION signifing the old one and the version @@ -20,6 +20,6 @@ # and _get_slurm_version() # need to be updated also when changes are added also. ## - API_CURRENT: 24 + API_CURRENT: 25 API_AGE: 0 API_REVISION: 0 diff --git a/src/common/slurm_protocol_common.h b/src/common/slurm_protocol_common.h index 187fd388c2..b68886a1fa 100644 --- a/src/common/slurm_protocol_common.h +++ b/src/common/slurm_protocol_common.h @@ -70,7 +70,8 @@ * In slurm_protocol_util.c check_header_version(), and init_header() * need to be updated also when changes are added */ #define SLURM_PROTOCOL_VERSION ((SLURM_API_MAJOR << 8) | SLURM_API_AGE) -#define SLURM_2_4_PROTOCOL_VERSION SLURM_PROTOCOL_VERSION +#define SLURM_2_5_PROTOCOL_VERSION SLURM_PROTOCOL_VERSION +#define SLURM_2_4_PROTOCOL_VERSION ((24 << 8) | 0) #define SLURM_2_3_PROTOCOL_VERSION ((23 << 8) | 0) #define SLURM_2_2_PROTOCOL_VERSION ((22 << 8) | 0) #define SLURM_2_1_PROTOCOL_VERSION ((21 << 8) | 0) diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c index b513bbec23..ee6b9d94e5 100644 --- a/src/common/slurm_protocol_util.c +++ b/src/common/slurm_protocol_util.c @@ -52,8 +52,10 @@ uint16_t _get_slurm_version(uint32_t rpc_version) { uint16_t version; - if (rpc_version >= 10) + if (rpc_version >= 11) version = SLURM_PROTOCOL_VERSION; + else if (rpc_version >= 10) + version = SLURM_2_4_PROTOCOL_VERSION; else if (rpc_version >= 9) version = SLURM_2_3_PROTOCOL_VERSION; else if (rpc_version >= 8) @@ -84,6 +86,7 @@ int check_header_version(header_t * header) if (slurmdbd_conf) { if ((header->version != SLURM_PROTOCOL_VERSION) && + (header->version != SLURM_2_4_PROTOCOL_VERSION) && (header->version != SLURM_2_3_PROTOCOL_VERSION) && (header->version != SLURM_2_2_PROTOCOL_VERSION) && (header->version != SLURM_2_1_PROTOCOL_VERSION)) @@ -147,9 +150,9 @@ int check_header_version(header_t * header) case REQUEST_UPDATE_NODE: case REQUEST_UPDATE_PARTITION: case REQUEST_UPDATE_RESERVATION: - if ((header->version == SLURM_2_3_PROTOCOL_VERSION) - || (header->version == SLURM_2_2_PROTOCOL_VERSION) - || (header->version == SLURM_2_1_PROTOCOL_VERSION)) + if ((header->version == SLURM_2_3_PROTOCOL_VERSION) || + (header->version == SLURM_2_2_PROTOCOL_VERSION) || + (header->version == SLURM_2_1_PROTOCOL_VERSION)) break; default: debug("unsupported RPC %d", header->msg_type); -- GitLab From 400453c7c808545c748b8d5554892f74e1a7bb10 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 15:28:02 -0700 Subject: [PATCH 135/614] Pass slurmd communication port to slurmstepd at startup --- src/slurmd/common/slurmstepd_init.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 0a07da3adc..a9d5982cb8 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -64,6 +64,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) pack16(conf->task_plugin_param, buffer); packstr(conf->node_topo_addr, buffer); packstr(conf->node_topo_pattern, buffer); + pack32((uint32_t)conf->port, buffer); } extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) @@ -77,7 +78,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpack32(&conf->real_memory_size, buffer); safe_unpack16(&conf->block_map_size, buffer); safe_unpack16_array(&conf->block_map, &uint32_tmp, buffer); - safe_unpack16_array(&conf->block_map_inv, &uint32_tmp, buffer); + safe_unpack16_array(&conf->block_map_inv, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->spooldir, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->node_name, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->logfile, &uint32_tmp, buffer); @@ -96,6 +97,8 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpack16(&conf->task_plugin_param, buffer); safe_unpackstr_xmalloc(&conf->node_topo_addr, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->node_topo_pattern, &uint32_tmp, buffer); + safe_unpack32(&uint32_tmp, buffer); + conf->port = uint32_tmp; return SLURM_SUCCESS; unpack_error: -- GitLab From fa7c07798a99307e893fe5030d4c777fad511a4e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 15:28:20 -0700 Subject: [PATCH 136/614] Route REQUEST_COMPLETE_BATCH_SCRIPT RPC from slurmstepd through slurmd This will eventually permit the slurmctld to respond to the slurmd with a new task launch RPC --- src/slurmd/slurmd/req.c | 46 +++++++++++++++++++++++++++++++++++++ src/slurmd/slurmstepd/mgr.c | 23 ++++++++++++++++--- 2 files changed, 66 insertions(+), 3 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 5d395b1ba5..eecb216c66 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -92,6 +92,9 @@ #define _LIMIT_INFO 0 +#define RETRY_DELAY 15 /* retry every 15 seconds */ +#define MAX_RETRY 240 /* retry 240 times (one hour max) */ + #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif @@ -141,6 +144,7 @@ static void _rpc_batch_job(slurm_msg_t *); static void _rpc_job_notify(slurm_msg_t *); static void _rpc_signal_tasks(slurm_msg_t *); static void _rpc_checkpoint_tasks(slurm_msg_t *); +static void _rpc_complete_batch(slurm_msg_t *); static void _rpc_terminate_tasks(slurm_msg_t *); static void _rpc_timelimit(slurm_msg_t *); static void _rpc_reattach_tasks(slurm_msg_t *); @@ -307,6 +311,11 @@ slurmd_req(slurm_msg_t *msg) _rpc_terminate_job(msg); slurm_free_kill_job_msg(msg->data); break; + case REQUEST_COMPLETE_BATCH_SCRIPT: + debug2("Processing RPC: REQUEST_COMPLETE_BATCH_SCRIPT"); + _rpc_complete_batch(msg); + slurm_free_complete_batch_script_msg(msg->data); + break; case REQUEST_UPDATE_JOB_TIME: debug2("Processing RPC: REQUEST_UPDATE_JOB_TIME"); _rpc_update_time(msg); @@ -3371,6 +3380,43 @@ _rpc_abort_job(slurm_msg_t *msg) xfree(resv_id); } +/* This complete batch RPC came from slurmstepd because we have select/serial + * configured. Terminate the job here. Forward the batch completion RPC to + * slurmctld and possible get a new batch launch RPC in response. */ +static void +_rpc_complete_batch(slurm_msg_t *msg) +{ + int i, rc, msg_rc; + slurm_msg_t req_msg; + uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); + complete_batch_script_msg_t *req = msg->data; + + if (!_slurm_authorized_user(uid)) { + error("Security violation: kill_job(%u) from uid %d", + req->job_id, uid); + if (msg->conn_fd >= 0) + slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); + return; + } + slurm_send_rc_msg (msg, SLURM_SUCCESS); + +/* FIXME: Call _rpc_terminate_job() logic */ + slurm_msg_t_init(&req_msg); +/* FIXME: Change to new enum */ + req_msg.msg_type= REQUEST_COMPLETE_BATCH_SCRIPT; + req_msg.data = msg->data; + for (i = 0; i <= MAX_RETRY; i++) { + msg_rc = slurm_send_recv_controller_rc_msg(&req_msg, &rc); + if (msg_rc == SLURM_SUCCESS) + break; + info("Retrying job complete RPC for job %u", req->job_id); + sleep(RETRY_DELAY); + } + if (i > MAX_RETRY) + error("Unable to send job complete message: %m"); +/* FIXME: Get response and optionally launch batch job */ +} + static void _rpc_terminate_job(slurm_msg_t *msg) { diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index c380158025..03dc850f79 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1962,9 +1962,15 @@ _send_launch_resp(slurmd_job_t *job, int rc) static int _send_complete_batch_script_msg(slurmd_job_t *job, int err, int status) { - int rc, i; + int rc, i, msg_rc; slurm_msg_t req_msg; complete_batch_script_msg_t req; + char * select_type; + bool msg_to_ctld; + + select_type = slurm_get_select_type(); + msg_to_ctld = strcmp(select_type, "select/serial"); + xfree(select_type); req.job_id = job->jobid; req.job_rc = status; @@ -1978,8 +1984,19 @@ _send_complete_batch_script_msg(slurmd_job_t *job, int err, int status) info("sending REQUEST_COMPLETE_BATCH_SCRIPT, error:%u", err); /* Note: these log messages don't go to slurmd.log from here */ - for (i=0; i<=MAX_RETRY; i++) { - if (slurm_send_recv_controller_rc_msg(&req_msg, &rc) == 0) + for (i = 0; i <= MAX_RETRY; i++) { + if (msg_to_ctld) { + msg_rc = slurm_send_recv_controller_rc_msg(&req_msg, + &rc); + } else { + if (i == 0) { + slurm_set_addr_char(&req_msg.address, + conf->port, "localhost"); + } + msg_rc = slurm_send_recv_rc_msg_only_one(&req_msg, + &rc, 0); + } + if (msg_rc == SLURM_SUCCESS) break; info("Retrying job complete RPC for %u.%u", job->jobid, job->stepid); -- GitLab From c141013ca93d2c969c64197c6602dd6af0f8a814 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 16:12:39 -0700 Subject: [PATCH 137/614] Have slurmd run epilog as part of select/serial batch job completion Do not wait for slurmctld to request job termination --- src/slurmd/slurmd/req.c | 107 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 105 insertions(+), 2 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index eecb216c66..04bb60ef33 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3380,6 +3380,107 @@ _rpc_abort_job(slurm_msg_t *msg) xfree(resv_id); } +/* This is a variant of _rpc_terminate_job for use with select/serial */ +static void +_rpc_terminate_batch_job(uint32_t job_id) +{ + int rc = SLURM_SUCCESS; + int nsteps = 0; + int delay; + time_t now = time(NULL); + slurm_ctl_conf_t *cf; + + slurmd_release_resources(job_id); + + if (_waiter_init(job_id) == SLURM_ERROR) + return; + + /* + * "revoke" all future credentials for this jobid + */ + if (slurm_cred_revoke(conf->vctx, job_id, now, now) < 0) { + debug("revoking cred for job %u: %m", job_id); + } else { + save_cred_state(conf->vctx); + debug("credential for job %u revoked", job_id); + } + + /* + * Tasks might be stopped (possibly by a debugger) + * so send SIGCONT first. + */ + _kill_all_active_steps(job_id, SIGCONT, true); + if (errno == ESLURMD_STEP_SUSPENDED) { + /* + * If the job step is currently suspended, we don't + * bother with a "nice" termination. + */ + debug2("Job is currently suspended, terminating"); + nsteps = _terminate_all_steps(job_id, true); + } else { + nsteps = _kill_all_active_steps(job_id, SIGTERM, true); + } + +#ifndef HAVE_AIX + if ((nsteps == 0) && !conf->epilog) { + slurm_cred_begin_expiration(conf->vctx, job_id); + save_cred_state(conf->vctx); + _waiter_complete(job_id); + _epilog_complete(job_id, rc); + return; + } +#endif + + /* + * Check for corpses + */ + cf = slurm_conf_lock(); + delay = MAX(cf->kill_wait, 5); + slurm_conf_unlock(); + if (!_pause_for_job_completion(job_id, NULL, delay) && + _terminate_all_steps(job_id, true) ) { + /* + * Block until all user processes are complete. + */ + _pause_for_job_completion(job_id, NULL, 0); + } + + /* + * Begin expiration period for cached information about job. + * If expiration period has already begun, then do not run + * the epilog again, as that script has already been executed + * for this job. + */ + if (slurm_cred_begin_expiration(conf->vctx, job_id) < 0) { + debug("Not running epilog for jobid %d: %m", job_id); + goto done; + } + + save_cred_state(conf->vctx); + + /* NOTE: We lack the job's UID and SPANK environment variables */ + rc = _run_epilog(job_id, 0, NULL, NULL, 0); + if (rc) { + int term_sig, exit_status; + if (WIFSIGNALED(rc)) { + exit_status = 0; + term_sig = WTERMSIG(rc); + } else { + exit_status = WEXITSTATUS(rc); + term_sig = 0; + } + error("[job %u] epilog failed status=%d:%d", + job_id, exit_status, term_sig); + rc = ESLURMD_EPILOG_FAILED; + } else + debug("completed epilog for jobid %u", job_id); + + done: + _wait_state_completed(job_id, 5); + _waiter_complete(job_id); + _epilog_complete(job_id, rc); +} + /* This complete batch RPC came from slurmstepd because we have select/serial * configured. Terminate the job here. Forward the batch completion RPC to * slurmctld and possible get a new batch launch RPC in response. */ @@ -3398,9 +3499,11 @@ _rpc_complete_batch(slurm_msg_t *msg) slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); return; } - slurm_send_rc_msg (msg, SLURM_SUCCESS); -/* FIXME: Call _rpc_terminate_job() logic */ + slurm_send_rc_msg(msg, SLURM_SUCCESS); +/* FIXME: Add UID to RPC and pass as argument here for _run_epilog() */ + _rpc_terminate_batch_job(req->job_id); + slurm_msg_t_init(&req_msg); /* FIXME: Change to new enum */ req_msg.msg_type= REQUEST_COMPLETE_BATCH_SCRIPT; -- GitLab From 68180e3961e36acc01bca5b16763c02e069ed483 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 16:18:10 -0700 Subject: [PATCH 138/614] Eliminate slurmctld log due to race condition with select/serial --- src/slurmctld/job_mgr.c | 11 ++++++++++- src/slurmctld/node_scheduler.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 6c458b5285..41a4a13604 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8113,6 +8113,7 @@ fini: static void _send_job_kill(struct job_record *job_ptr) { + static int select_serial = -1; kill_job_msg_t *kill_job = NULL; agent_arg_t *agent_args = NULL; #ifdef HAVE_FRONT_END @@ -8122,6 +8123,13 @@ static void _send_job_kill(struct job_record *job_ptr) struct node_record *node_ptr; #endif + if (select_serial == -1) { + if (strcmp(slurmctld_conf.select_type, "select/serial")) + select_serial = 0; + else + select_serial = 1; + } + xassert(job_ptr); xassert(job_ptr->details); @@ -8162,7 +8170,8 @@ static void _send_job_kill(struct job_record *job_ptr) } #endif if (agent_args->node_count == 0) { - if (job_ptr->details->expanding_jobid == 0) { + if ((job_ptr->details->expanding_jobid == 0) && + (select_serial == 0)) { error("Job %u allocated no nodes to be killed on", job_ptr->job_id); } diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 3ced2e8bf9..4f380a2aae 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -213,6 +213,7 @@ extern void set_job_alias_list(struct job_record *job_ptr) extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, bool suspended, bool preempted) { + static int select_serial = -1; int i; kill_job_msg_t *kill_job = NULL; agent_arg_t *agent_args = NULL; @@ -225,6 +226,13 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, xassert(job_ptr); xassert(job_ptr->details); + if (select_serial == -1) { + if (strcmp(slurmctld_conf.select_type, "select/serial")) + select_serial = 0; + else + select_serial = 1; + } + license_job_return(job_ptr); acct_policy_job_fini(job_ptr); if (slurm_sched_freealloc(job_ptr) != SLURM_SUCCESS) @@ -337,7 +345,8 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, } if (agent_args->node_count == 0) { - if (job_ptr->details->expanding_jobid == 0) { + if ((job_ptr->details->expanding_jobid == 0) && + (select_serial == 0)) { error("Job %u allocated no nodes to be killed on", job_ptr->job_id); } -- GitLab From 4f86a1dfbfbc3a4ebc87bdf41e26b4de9ec5a1fb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 16:42:06 -0700 Subject: [PATCH 139/614] Make the batch job complete RPC imply epilog complete on that node This eliminates one of four RPCs needed for each job. --- src/common/slurm_protocol_defs.c | 1 + src/common/slurm_protocol_defs.h | 1 + src/common/slurm_protocol_pack.c | 2 ++ src/slurmctld/proc_req.c | 3 +++ src/slurmd/slurmd/req.c | 9 +++------ 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 8f185e547d..aa9c9e289c 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -2414,6 +2414,7 @@ extern int slurm_free_msg_data(slurm_msg_type_t type, void *data) case REQUEST_COMPLETE_JOB_ALLOCATION: slurm_free_complete_job_allocation_msg(data); break; + case REQUEST_COMPLETE_BATCH_JOB: case REQUEST_COMPLETE_BATCH_SCRIPT: slurm_free_complete_batch_script_msg(data); break; diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 15a7a92734..9bd1c76dce 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -286,6 +286,7 @@ typedef enum { REQUEST_JOB_STEP_PIDS, RESPONSE_JOB_STEP_PIDS, REQUEST_FORWARD_DATA, + REQUEST_COMPLETE_BATCH_JOB, REQUEST_LAUNCH_TASKS = 6001, RESPONSE_LAUNCH_TASKS, diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index e4b80ac1e4..be3cf82027 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -904,6 +904,7 @@ pack_msg(slurm_msg_t const *msg, Buf buffer) (complete_job_allocation_msg_t *)msg->data, buffer, msg->protocol_version); break; + case REQUEST_COMPLETE_BATCH_JOB: case REQUEST_COMPLETE_BATCH_SCRIPT: _pack_complete_batch_script_msg( (complete_batch_script_msg_t *)msg->data, buffer, @@ -1441,6 +1442,7 @@ unpack_msg(slurm_msg_t * msg, Buf buffer) (complete_job_allocation_msg_t **)&msg->data, buffer, msg->protocol_version); break; + case REQUEST_COMPLETE_BATCH_JOB: case REQUEST_COMPLETE_BATCH_SCRIPT: rc = _unpack_complete_batch_script_msg( (complete_batch_script_msg_t **)&msg->data, buffer, diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 137caefd4b..620c1e1f70 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -231,6 +231,7 @@ void slurmctld_req (slurm_msg_t * msg) _slurm_rpc_complete_job_allocation(msg); slurm_free_complete_job_allocation_msg(msg->data); break; + case REQUEST_COMPLETE_BATCH_JOB: case REQUEST_COMPLETE_BATCH_SCRIPT: _slurm_rpc_complete_batch_script(msg); slurm_free_complete_batch_script_msg(msg->data); @@ -1596,6 +1597,8 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) } /* Mark job allocation complete */ + if (msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) + job_epilog_complete(comp_msg->job_id, comp_msg->node_name, 0); i = job_complete(comp_msg->job_id, uid, job_requeue, false, comp_msg->job_rc); error_code = MAX(error_code, i); diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 04bb60ef33..89d67b929a 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3426,7 +3426,6 @@ _rpc_terminate_batch_job(uint32_t job_id) slurm_cred_begin_expiration(conf->vctx, job_id); save_cred_state(conf->vctx); _waiter_complete(job_id); - _epilog_complete(job_id, rc); return; } #endif @@ -3478,7 +3477,6 @@ _rpc_terminate_batch_job(uint32_t job_id) done: _wait_state_completed(job_id, 5); _waiter_complete(job_id); - _epilog_complete(job_id, rc); } /* This complete batch RPC came from slurmstepd because we have select/serial @@ -3501,12 +3499,11 @@ _rpc_complete_batch(slurm_msg_t *msg) } slurm_send_rc_msg(msg, SLURM_SUCCESS); -/* FIXME: Add UID to RPC and pass as argument here for _run_epilog() */ +/* FIXME: Add UID to RPC and pass as argument here for _run_epilog() */ _rpc_terminate_batch_job(req->job_id); slurm_msg_t_init(&req_msg); -/* FIXME: Change to new enum */ - req_msg.msg_type= REQUEST_COMPLETE_BATCH_SCRIPT; + req_msg.msg_type= REQUEST_COMPLETE_BATCH_JOB; req_msg.data = msg->data; for (i = 0; i <= MAX_RETRY; i++) { msg_rc = slurm_send_recv_controller_rc_msg(&req_msg, &rc); @@ -3517,7 +3514,7 @@ _rpc_complete_batch(slurm_msg_t *msg) } if (i > MAX_RETRY) error("Unable to send job complete message: %m"); -/* FIXME: Get response and optionally launch batch job */ +/* FIXME: Get response and optionally launch batch job */ } static void -- GitLab From 9df475b2418204ae3224ff0e7ed9a08ab449e988 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 4 May 2012 17:02:16 -0700 Subject: [PATCH 140/614] Add call to scheduler won batch job completion --- src/slurmctld/proc_req.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 620c1e1f70..7065dcf4ee 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1631,6 +1631,9 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) slurmctld_diag_stats.jobs_completed++; dump_job = true; } + + if (msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) + (void) schedule(0); if (dump_job) (void) schedule_job_save(); /* Has own locking */ if (dump_node) -- GitLab From 35be1b1355b788ce3e1d71e01aa44c8b60203ba9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 10:23:46 -0700 Subject: [PATCH 141/614] Add user_id to batch complete RPC --- src/common/slurm_protocol_defs.h | 1 + src/common/slurm_protocol_pack.c | 21 +++++++++++++++++++-- src/slurmd/slurmd/req.c | 9 ++++----- src/slurmd/slurmstepd/mgr.c | 3 ++- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 9bd1c76dce..a2b1395f39 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -540,6 +540,7 @@ typedef struct complete_batch_script { uint32_t job_rc; uint32_t slurm_rc; char *node_name; + uint32_t user_id; /* user the job runs as */ } complete_batch_script_msg_t; typedef struct step_complete_msg { diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index be3cf82027..e535fe19d4 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -8471,7 +8471,14 @@ _pack_complete_batch_script_msg( complete_batch_script_msg_t * msg, Buf buffer, uint16_t protocol_version) { - if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); + pack32(msg->job_id, buffer); + pack32(msg->job_rc, buffer); + pack32(msg->slurm_rc, buffer); + pack32(msg->user_id, buffer); + packstr(msg->node_name, buffer); + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); pack32((uint32_t)msg->job_id, buffer); pack32((uint32_t)msg->job_rc, buffer); @@ -8496,7 +8503,17 @@ _unpack_complete_batch_script_msg( msg = xmalloc(sizeof(complete_batch_script_msg_t)); *msg_ptr = msg; - if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + if (jobacct_gather_g_unpack(&msg->jobacct, + protocol_version, buffer) + != SLURM_SUCCESS) + goto unpack_error; + safe_unpack32(&msg->job_id, buffer); + safe_unpack32(&msg->job_rc, buffer); + safe_unpack32(&msg->slurm_rc, buffer); + safe_unpack32(&msg->user_id, buffer); + safe_unpackstr_xmalloc(&msg->node_name, &uint32_tmp, buffer); + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { if (jobacct_gather_g_unpack(&msg->jobacct, protocol_version, buffer) != SLURM_SUCCESS) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 89d67b929a..c8675013aa 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3382,7 +3382,7 @@ _rpc_abort_job(slurm_msg_t *msg) /* This is a variant of _rpc_terminate_job for use with select/serial */ static void -_rpc_terminate_batch_job(uint32_t job_id) +_rpc_terminate_batch_job(uint32_t job_id, uint32_t user_id) { int rc = SLURM_SUCCESS; int nsteps = 0; @@ -3457,8 +3457,8 @@ _rpc_terminate_batch_job(uint32_t job_id) save_cred_state(conf->vctx); - /* NOTE: We lack the job's UID and SPANK environment variables */ - rc = _run_epilog(job_id, 0, NULL, NULL, 0); + /* NOTE: We lack the job's SPANK environment variables */ + rc = _run_epilog(job_id, (uid_t) user_id, NULL, NULL, 0); if (rc) { int term_sig, exit_status; if (WIFSIGNALED(rc)) { @@ -3499,8 +3499,7 @@ _rpc_complete_batch(slurm_msg_t *msg) } slurm_send_rc_msg(msg, SLURM_SUCCESS); -/* FIXME: Add UID to RPC and pass as argument here for _run_epilog() */ - _rpc_terminate_batch_job(req->job_id); + _rpc_terminate_batch_job(req->job_id, req->user_id); slurm_msg_t_init(&req_msg); req_msg.msg_type= REQUEST_COMPLETE_BATCH_JOB; diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 03dc850f79..c7fb316f64 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1974,9 +1974,10 @@ _send_complete_batch_script_msg(slurmd_job_t *job, int err, int status) req.job_id = job->jobid; req.job_rc = status; - req.slurm_rc = err; req.jobacct = job->jobacct; req.node_name = job->node_name; + req.slurm_rc = err; + req.user_id = (uint32_t) job->uid; slurm_msg_t_init(&req_msg); req_msg.msg_type= REQUEST_COMPLETE_BATCH_SCRIPT; req_msg.data = &req; -- GitLab From 933116f593023e322b366a84ce150262c19cf101 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 10:40:36 -0700 Subject: [PATCH 142/614] Add select/serial documentation --- doc/html/high_throughput.shtml | 14 +++++++++++++- doc/man/man5/slurm.conf.5 | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/doc/html/high_throughput.shtml b/doc/html/high_throughput.shtml index 8f2d89d01a..2e9708551f 100644 --- a/doc/html/high_throughput.shtml +++ b/doc/html/high_throughput.shtml @@ -91,6 +91,18 @@ jobs or less) and interval to 30 seconds or more will limit the overhead of backfill scheduling (NOTE: the default values are fine for both of these parameters). +
  • SelectType: +If only serial jobs (single CPU jobs) are to be executed, use of the +select/serial plugin is recommended. This plugin eliminates much of +the logic found in other select plugins to optimize job allocations with +respect to network topology. It also reduces communications required to +executed batch jobs by 75 percent through the use of a "pull" model, where +the completeion of each job by the slurmd daemon initiates a single +message to the slurmctld daemon upon completion of the job's epilog +script. The response to this message can be information required to initiate +another job utilizing the resources just released by the previous job. +NOTE: The use of select/serial prevents the job's Epilog +program from being initiated with any SPANK environment variables.
  • SlurmctldPort: It is desirable to configure the slurmctld daemon to accept incoming messages on more than one port in order to avoid having incoming messages @@ -101,6 +113,6 @@ numbers of simultaneous requests are to be supported.
  • appropriate for your environment. -

    Last modified 30 August 2010

    +

    Last modified 7 March 2012

    diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index c32549e3bb..1a420855eb 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1541,6 +1541,8 @@ See the partition \fBShared\fR parameter for more information. \fBselect/serial\fR for allocating resources to single CPU jobs only. Highly optimized for maximum throughput. +NOTE: SPANK environment variables are NOT propagated to the job's \fBEpilog\fR +program. .TP \fBselect/bluegene\fR for a three\-dimensional BlueGene system. -- GitLab From d9885e36104486aa59bb6098b21811090b4feef2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 13:50:38 -0700 Subject: [PATCH 143/614] Modify slurmd to get batch launch response from batch complete RPC --- src/slurmd/slurmd/req.c | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index c8675013aa..ed9005d543 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3486,12 +3486,12 @@ static void _rpc_complete_batch(slurm_msg_t *msg) { int i, rc, msg_rc; - slurm_msg_t req_msg; + slurm_msg_t req_msg, resp_msg; uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); complete_batch_script_msg_t *req = msg->data; if (!_slurm_authorized_user(uid)) { - error("Security violation: kill_job(%u) from uid %d", + error("Security violation: complete_batch(%u) from uid %d", req->job_id, uid); if (msg->conn_fd >= 0) slurm_send_rc_msg(msg, ESLURM_USER_ID_MISSING); @@ -3505,15 +3505,39 @@ _rpc_complete_batch(slurm_msg_t *msg) req_msg.msg_type= REQUEST_COMPLETE_BATCH_JOB; req_msg.data = msg->data; for (i = 0; i <= MAX_RETRY; i++) { - msg_rc = slurm_send_recv_controller_rc_msg(&req_msg, &rc); + msg_rc = slurm_send_recv_controller_msg(&req_msg, &resp_msg); if (msg_rc == SLURM_SUCCESS) break; info("Retrying job complete RPC for job %u", req->job_id); sleep(RETRY_DELAY); } - if (i > MAX_RETRY) + if (i > MAX_RETRY) { error("Unable to send job complete message: %m"); -/* FIXME: Get response and optionally launch batch job */ + return; + } + + if (resp_msg.msg_type == RESPONSE_SLURM_RC) { + last_slurmctld_msg = time(NULL); + rc = ((return_code_msg_t *) resp_msg.data)->return_code; + slurm_free_return_code_msg(resp_msg.data); + if (rc) { + error("complete_batch for job %u: %s", req->job_id, + slurm_strerror(rc)); + } + return; + } + + if (resp_msg.msg_type != REQUEST_BATCH_JOB_LAUNCH) { + error("Invalid response msg_type (%u) to complete_batch RPC " + "for job %u", resp_msg.msg_type, req->job_id); + return; + } + + /* (resp_msg.msg_type == REQUEST_BATCH_JOB_LAUNCH) */ + debug2("Processing RPC: REQUEST_BATCH_JOB_LAUNCH"); + last_slurmctld_msg = time(NULL); + _rpc_batch_job(&resp_msg); + slurm_free_job_launch_msg(resp_msg.data); } static void -- GitLab From 80761a3995ebf598d975f8e512b77e127c82038c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 15:25:37 -0700 Subject: [PATCH 144/614] Split building job launch msg into two parts Build the batch_job_launch_msg_t in one function so it can be used to launch a new job via agent.c and another for use as a select/serial batch job completion response --- src/slurmctld/job_scheduler.c | 29 +++++++++++++++++++++-------- src/slurmctld/job_scheduler.h | 3 +++ 2 files changed, 24 insertions(+), 8 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 61629ddc1c..d336d05e22 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -766,14 +766,10 @@ extern int sort_job_queue2(void *x, void *y) return 0; } -/* - * launch_job - send an RPC to a slurmd to initiate a batch job - * IN job_ptr - pointer to job that will be initiated - */ -extern void launch_job(struct job_record *job_ptr) +/* Given a scheduled job, return a pointer to it batch_job_launch_msg_t data */ +extern batch_job_launch_msg_t *build_launch_job_msg(struct job_record *job_ptr) { batch_job_launch_msg_t *launch_msg_ptr; - agent_arg_t *agent_arg_ptr; /* Initialization of data structures */ launch_msg_ptr = (batch_job_launch_msg_t *) @@ -799,9 +795,10 @@ extern void launch_job(struct job_record *job_ptr) * too deep into the job launch to gracefully clean up. */ job_ptr->end_time = time(NULL); job_ptr->time_limit = 0; + xfree(launch_msg_ptr->alias_list); xfree(launch_msg_ptr->nodes); xfree(launch_msg_ptr); - return; + return NULL; } launch_msg_ptr->std_err = xstrdup(job_ptr->details->std_err); @@ -833,7 +830,23 @@ extern void launch_job(struct job_record *job_ptr) (sizeof(uint32_t) * job_ptr->job_resrcs->cpu_array_cnt)); launch_msg_ptr->select_jobinfo = select_g_select_jobinfo_copy( - job_ptr->select_jobinfo); + job_ptr->select_jobinfo); + + return launch_msg_ptr; +} + +/* + * launch_job - send an RPC to a slurmd to initiate a batch job + * IN job_ptr - pointer to job that will be initiated + */ +extern void launch_job(struct job_record *job_ptr) +{ + batch_job_launch_msg_t *launch_msg_ptr; + agent_arg_t *agent_arg_ptr; + + launch_msg_ptr = build_launch_job_msg(job_ptr); + if (launch_msg_ptr == NULL) + return; agent_arg_ptr = (agent_arg_t *) xmalloc(sizeof(agent_arg_t)); agent_arg_ptr->node_count = 1; diff --git a/src/slurmctld/job_scheduler.h b/src/slurmctld/job_scheduler.h index 0ddd1f7d0b..d08e4f8d86 100644 --- a/src/slurmctld/job_scheduler.h +++ b/src/slurmctld/job_scheduler.h @@ -65,6 +65,9 @@ extern int build_feature_list(struct job_record *job_ptr); */ extern List build_job_queue(bool clear_start); +/* Given a scheduled job, return a pointer to it batch_job_launch_msg_t data */ +extern batch_job_launch_msg_t *build_launch_job_msg( + struct job_record *job_ptr); /* * epilog_slurmctld - execute the prolog_slurmctld for a job that has just * terminated. -- GitLab From e7042248f343535dd94c70a05c77ae6b3000098f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 16:21:17 -0700 Subject: [PATCH 145/614] Early batch launch response to batch complete RPC --- src/common/job_resources.h | 9 ++++++ src/slurmctld/job_scheduler.c | 57 +++++++++++++++++++++++++++++++++++ src/slurmctld/proc_req.c | 5 ++- src/slurmd/slurmd/req.c | 26 ++++++++-------- 4 files changed, 82 insertions(+), 15 deletions(-) diff --git a/src/common/job_resources.h b/src/common/job_resources.h index 83a4a991bb..d1d5691e69 100644 --- a/src/common/job_resources.h +++ b/src/common/job_resources.h @@ -154,6 +154,15 @@ extern int build_job_resources_cpu_array(job_resources_t *job_resrcs_ptr); * Return total CPU count or -1 on error */ extern int build_job_resources_cpus_array(job_resources_t *job_resrcs_ptr); +/* + * Given that one batch job just completed, attempt to launch a suitable + * replacement batch job in a response messge as a REQUEST_BATCH_JOB_LAUNCH + * message type, alternately send a return code fo SLURM_SUCCESS + * msg IN - The original message from slurmd + * fini_job_ptr IN - Pointer to job that just completed and needs replacement + */ +extern void replace_batch_job(slurm_msg_t * msg, void *fini_job_ptr); + /* Validate a job_resources data structure originally built using * build_job_resources() is still valid based upon slurmctld state. * NOTE: Reset the node_bitmap field before calling this function. diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index d336d05e22..cc57458412 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -344,6 +344,63 @@ static void do_diag_stats(struct timeval tv1, struct timeval tv2) } +/* + * Given that one batch job just completed, attempt to launch a suitable + * replacement batch job in a response messge as a REQUEST_BATCH_JOB_LAUNCH + * message type, alternately send a return code fo SLURM_SUCCESS + * msg IN - The original message from slurmd + * fini_job_ptr IN - Pointer to job that just completed and needs replacement + */ +extern void replace_batch_job(slurm_msg_t * msg, void *fini_job) +{ + /* Locks: Read config, write job, write node, read partition */ + slurmctld_lock_t job_write_lock = + { READ_LOCK, WRITE_LOCK, WRITE_LOCK, READ_LOCK }; + struct job_record *job_ptr; + struct job_record *fini_job_ptr = (struct job_record *) fini_job; + ListIterator job_iterator; + batch_job_launch_msg_t *launch_msg = NULL; + int error_code; + + lock_slurmctld(job_write_lock); + if (!avail_front_end()) + goto no_test; + job_iterator = list_iterator_create(job_list); + if (job_iterator == NULL) + fatal("list_iterator_create memory allocation failure"); + while ((job_ptr = (struct job_record *) list_next(job_iterator))) { + if (!IS_JOB_PENDING(job_ptr) || (job_ptr->priority == 0)) + continue; +/* FIXME: LOTS OF JOB VALIDATION, PROLOG, ETC. NEEDS TO HAPPEN HERE */ +/* FIXME: select_nodes() can be vastly streamlined to only use the resources + * just released by fini_job */ + if (!job_ptr->batch_flag) + continue; + error_code = select_nodes(job_ptr, false, NULL); + if (error_code == SLURM_SUCCESS) { + last_job_update = now; + info("sched: Allocate JobId=%u NodeList=%s #CPUs=%u", + job_ptr->job_id, job_ptr->nodes, + job_ptr->total_cpus); + launch_msg = build_launch_job_msg(job_ptr); + } + break; + } +no_test: unlock_slurmctld(job_write_lock); + + if (launch_msg) { + slurm_msg_t response_msg; + slurm_msg_t_init(&response_msg); + response_msg.flags = msg->flags; + response_msg.protocol_version = msg->protocol_version; + response_msg.address = msg->address; + response_msg.msg_type = REQUEST_BATCH_JOB_LAUNCH; + response_msg.data = launch_msg; + slurm_send_node_msg(msg->conn_fd, &response_msg); + } else + slurm_send_rc_msg(msg, SLURM_SUCCESS); +} + /* * schedule - attempt to schedule all pending jobs * pending jobs for each partition will be scheduled in priority diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 7065dcf4ee..444742407a 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1627,13 +1627,12 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) } else { debug2("_slurm_rpc_complete_batch_script JobId=%u %s", comp_msg->job_id, TIME_STR); - slurm_send_rc_msg(msg, SLURM_SUCCESS); slurmctld_diag_stats.jobs_completed++; dump_job = true; + if (msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) + replace_batch_job(msg, job_ptr); } - if (msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) - (void) schedule(0); if (dump_job) (void) schedule_job_save(); /* Has own locking */ if (dump_node) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index ed9005d543..829556961e 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -140,7 +140,7 @@ static int _step_limits_match(void *x, void *key); static int _terminate_all_steps(uint32_t jobid, bool batch); static void _rpc_launch_tasks(slurm_msg_t *); static void _rpc_abort_job(slurm_msg_t *); -static void _rpc_batch_job(slurm_msg_t *); +static void _rpc_batch_job(slurm_msg_t *msg, bool new_msg); static void _rpc_job_notify(slurm_msg_t *); static void _rpc_signal_tasks(slurm_msg_t *); static void _rpc_checkpoint_tasks(slurm_msg_t *); @@ -245,7 +245,7 @@ slurmd_req(slurm_msg_t *msg) /* Mutex locking moved into _rpc_batch_job() due to * very slow prolog on Blue Gene system. Only batch * jobs are supported on Blue Gene (no job steps). */ - _rpc_batch_job(msg); + _rpc_batch_job(msg, true); last_slurmctld_msg = time(NULL); slurm_free_job_launch_msg(msg->data); break; @@ -1255,21 +1255,23 @@ _set_batch_job_limits(slurm_msg_t *msg) } static void -_rpc_batch_job(slurm_msg_t *msg) +_rpc_batch_job(slurm_msg_t *msg, bool new_msg) { batch_job_launch_msg_t *req = (batch_job_launch_msg_t *)msg->data; bool first_job_run = true; int rc = SLURM_SUCCESS; - uid_t req_uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); char *resv_id = NULL; bool replied = false; slurm_addr_t *cli = &msg->orig_addr; - if (!_slurm_authorized_user(req_uid)) { - error("Security violation, batch launch RPC from uid %d", - req_uid); - rc = ESLURM_USER_ID_MISSING; /* or bad in this case */ - goto done; + if (new_msg) { + uid_t req_uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); + if (!_slurm_authorized_user(req_uid)) { + error("Security violation, batch launch RPC from uid %d", + req_uid); + rc = ESLURM_USER_ID_MISSING; /* or bad in this case */ + goto done; + } } slurm_cred_handle_reissue(conf->vctx, req->cred); if (slurm_cred_revoked(conf->vctx, req->cred)) { @@ -1295,7 +1297,7 @@ _rpc_batch_job(slurm_msg_t *msg) * Just reply now and send a separate kill job request if the * prolog or launch fail. */ replied = true; - if (slurm_send_rc_msg(msg, rc) < 1) { + if (new_msg && (slurm_send_rc_msg(msg, rc) < 1)) { /* The slurmctld is no longer waiting for a reply. * This typically indicates that the slurmd was * blocked from memory and/or CPUs and the slurmctld @@ -1381,7 +1383,7 @@ _rpc_batch_job(slurm_msg_t *msg) done: if (!replied) { - if (slurm_send_rc_msg(msg, rc) < 1) { + if (new_msg && (slurm_send_rc_msg(msg, rc) < 1)) { /* The slurmctld is no longer waiting for a reply. * This typically indicates that the slurmd was * blocked from memory and/or CPUs and the slurmctld @@ -3536,7 +3538,7 @@ _rpc_complete_batch(slurm_msg_t *msg) /* (resp_msg.msg_type == REQUEST_BATCH_JOB_LAUNCH) */ debug2("Processing RPC: REQUEST_BATCH_JOB_LAUNCH"); last_slurmctld_msg = time(NULL); - _rpc_batch_job(&resp_msg); + _rpc_batch_job(&resp_msg, false); slurm_free_job_launch_msg(resp_msg.data); } -- GitLab From b1d903f905242c142ddc866fc8aea74bf39cbe3d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 7 May 2012 16:35:41 -0700 Subject: [PATCH 146/614] Fix missing variable --- src/slurmctld/job_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index cc57458412..044a316faa 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -378,7 +378,7 @@ extern void replace_batch_job(slurm_msg_t * msg, void *fini_job) continue; error_code = select_nodes(job_ptr, false, NULL); if (error_code == SLURM_SUCCESS) { - last_job_update = now; + last_job_update = time(NULL); info("sched: Allocate JobId=%u NodeList=%s #CPUs=%u", job_ptr->job_id, job_ptr->nodes, job_ptr->total_cpus); -- GitLab From feb506fbf89cd3125ed9f8a9fea14df314aaeee4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 08:19:08 -0700 Subject: [PATCH 147/614] Adds very primative pull on job completion --- src/common/job_resources.h | 9 --------- src/slurmctld/job_scheduler.c | 17 ++++++++++------- src/slurmctld/job_scheduler.h | 10 ++++++++++ src/slurmctld/proc_req.c | 9 ++++++--- 4 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/common/job_resources.h b/src/common/job_resources.h index d1d5691e69..83a4a991bb 100644 --- a/src/common/job_resources.h +++ b/src/common/job_resources.h @@ -154,15 +154,6 @@ extern int build_job_resources_cpu_array(job_resources_t *job_resrcs_ptr); * Return total CPU count or -1 on error */ extern int build_job_resources_cpus_array(job_resources_t *job_resrcs_ptr); -/* - * Given that one batch job just completed, attempt to launch a suitable - * replacement batch job in a response messge as a REQUEST_BATCH_JOB_LAUNCH - * message type, alternately send a return code fo SLURM_SUCCESS - * msg IN - The original message from slurmd - * fini_job_ptr IN - Pointer to job that just completed and needs replacement - */ -extern void replace_batch_job(slurm_msg_t * msg, void *fini_job_ptr); - /* Validate a job_resources data structure originally built using * build_job_resources() is still valid based upon slurmctld state. * NOTE: Reset the node_bitmap field before calling this function. diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 044a316faa..55b0a46ea2 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -350,8 +350,9 @@ static void do_diag_stats(struct timeval tv1, struct timeval tv2) * message type, alternately send a return code fo SLURM_SUCCESS * msg IN - The original message from slurmd * fini_job_ptr IN - Pointer to job that just completed and needs replacement + * RET true if job has been scheduled */ -extern void replace_batch_job(slurm_msg_t * msg, void *fini_job) +extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) { /* Locks: Read config, write job, write node, read partition */ slurmctld_lock_t job_write_lock = @@ -371,11 +372,11 @@ extern void replace_batch_job(slurm_msg_t * msg, void *fini_job) while ((job_ptr = (struct job_record *) list_next(job_iterator))) { if (!IS_JOB_PENDING(job_ptr) || (job_ptr->priority == 0)) continue; -/* FIXME: LOTS OF JOB VALIDATION, PROLOG, ETC. NEEDS TO HAPPEN HERE */ +/* FIXME: LOTS OF JOB VALIDATION, PROLOG, ETC. NEEDS TO HAPPEN HERE */ /* FIXME: select_nodes() can be vastly streamlined to only use the resources - * just released by fini_job */ - if (!job_ptr->batch_flag) - continue; + * just released by fini_job */ + if (!job_ptr->batch_flag) /* Can't pull interactive jobs */ + break; error_code = select_nodes(job_ptr, false, NULL); if (error_code == SLURM_SUCCESS) { last_job_update = time(NULL); @@ -397,8 +398,10 @@ no_test: unlock_slurmctld(job_write_lock); response_msg.msg_type = REQUEST_BATCH_JOB_LAUNCH; response_msg.data = launch_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); - } else - slurm_send_rc_msg(msg, SLURM_SUCCESS); + return true; + } + slurm_send_rc_msg(msg, SLURM_SUCCESS); + return false; } /* diff --git a/src/slurmctld/job_scheduler.h b/src/slurmctld/job_scheduler.h index d08e4f8d86..244013fa5d 100644 --- a/src/slurmctld/job_scheduler.h +++ b/src/slurmctld/job_scheduler.h @@ -123,6 +123,16 @@ extern int prolog_slurmctld(struct job_record *job_ptr); * actually used is first in the string. Needed for job state save/restore */ extern void rebuild_job_part_list(struct job_record *job_ptr); +/* + * Given that one batch job just completed, attempt to launch a suitable + * replacement batch job in a response messge as a REQUEST_BATCH_JOB_LAUNCH + * message type, alternately send a return code fo SLURM_SUCCESS + * msg IN - The original message from slurmd + * fini_job_ptr IN - Pointer to job that just completed and needs replacement + * RET true if job has been scheduled + */ +extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job); + /* * schedule - attempt to schedule all pending jobs * pending jobs for each partition will be scheduled in priority diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 444742407a..0ca14fc970 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1464,7 +1464,7 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) }; uid_t uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); bool job_requeue = false; - bool dump_job = false, dump_node = false; + bool dump_job = false, dump_node = false, run_sched = false; struct job_record *job_ptr = NULL; char *msg_title = "node(s)"; char *nodes = comp_msg->node_name; @@ -1629,10 +1629,13 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) comp_msg->job_id, TIME_STR); slurmctld_diag_stats.jobs_completed++; dump_job = true; - if (msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) - replace_batch_job(msg, job_ptr); + if ((msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) && + !replace_batch_job(msg, job_ptr)) + run_sched = true; } + if (run_sched) + (void) schedule(0); if (dump_job) (void) schedule_job_save(); /* Has own locking */ if (dump_node) -- GitLab From 0d23154660b3244f0e2d1b4233115f60a4641ef8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 09:28:41 -0700 Subject: [PATCH 148/614] validate license, qos & association for select/serial pull job --- src/slurmctld/job_scheduler.c | 126 ++++++++++++++++++++++++++++++++-- 1 file changed, 121 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 55b0a46ea2..33d92f7c71 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -354,6 +354,7 @@ static void do_diag_stats(struct timeval tv1, struct timeval tv2) */ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) { + static int select_serial = -1; /* Locks: Read config, write job, write node, read partition */ slurmctld_lock_t job_write_lock = { READ_LOCK, WRITE_LOCK, WRITE_LOCK, READ_LOCK }; @@ -361,9 +362,23 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) struct job_record *fini_job_ptr = (struct job_record *) fini_job; ListIterator job_iterator; batch_job_launch_msg_t *launch_msg = NULL; + bitstr_t *orig_req_bitmap = NULL; + bool have_node_bitmaps; + time_t now = time(NULL); int error_code; + if (select_serial == -1) { + if (strcmp(slurmctld_conf.select_type, "select/serial")) + select_serial = 0; + else + select_serial = 1; + } + if (select_serial != 1) + return false; + lock_slurmctld(job_write_lock); + xassert(fini_job_ptr->job_resrcs); + xassert(fini_job_ptr->job_resrcs->node_bitmap); if (!avail_front_end()) goto no_test; job_iterator = list_iterator_create(job_list); @@ -372,18 +387,119 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) while ((job_ptr = (struct job_record *) list_next(job_iterator))) { if (!IS_JOB_PENDING(job_ptr) || (job_ptr->priority == 0)) continue; -/* FIXME: LOTS OF JOB VALIDATION, PROLOG, ETC. NEEDS TO HAPPEN HERE */ -/* FIXME: select_nodes() can be vastly streamlined to only use the resources - * just released by fini_job */ + + /* Tests dependencies, begin time and reservations */ + if (!job_independent(job_ptr, 0)) + continue; + + /* Test for valid account, QOS and required nodes on each pass */ + if (job_ptr->state_reason == FAIL_ACCOUNT) { + slurmdb_association_rec_t assoc_rec; + memset(&assoc_rec, 0, sizeof(slurmdb_association_rec_t)); + assoc_rec.acct = job_ptr->account; + if (job_ptr->part_ptr) + assoc_rec.partition = job_ptr->part_ptr->name; + assoc_rec.uid = job_ptr->user_id; + + if (!assoc_mgr_fill_in_assoc(acct_db_conn, &assoc_rec, + accounting_enforce, + (slurmdb_association_rec_t **) + &job_ptr->assoc_ptr)) { + job_ptr->state_reason = WAIT_NO_REASON; + job_ptr->assoc_id = assoc_rec.id; + } else { + continue; + } + } + if (job_ptr->qos_id) { + slurmdb_association_rec_t *assoc_ptr; + assoc_ptr = (slurmdb_association_rec_t *)job_ptr->assoc_ptr; + if (assoc_ptr && + !bit_test(assoc_ptr->usage->valid_qos, + job_ptr->qos_id)) { + info("sched: JobId=%u has invalid QOS", + job_ptr->job_id); + xfree(job_ptr->state_desc); + job_ptr->state_reason = FAIL_QOS; + continue; + } else if (job_ptr->state_reason == FAIL_QOS) { + xfree(job_ptr->state_desc); + job_ptr->state_reason = WAIT_NO_REASON; + } + } + + if ((job_ptr->state_reason == WAIT_QOS_JOB_LIMIT) || + (job_ptr->state_reason == WAIT_QOS_RESOURCE_LIMIT) || + (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) { + job_ptr->state_reason = WAIT_NO_REASON; + acct_policy_job_runnable(job_ptr); + } + + if ((job_ptr->state_reason == WAIT_NODE_NOT_AVAIL) && + job_ptr->details && job_ptr->details->req_node_bitmap && + !bit_super_set(job_ptr->details->req_node_bitmap, + avail_node_bitmap)) { + continue; + } + + if (bit_overlap(avail_node_bitmap, + job_ptr->part_ptr->node_bitmap) == 0) { + /* All nodes DRAIN, DOWN, or + * reserved for jobs in higher priority partition */ + job_ptr->state_reason = WAIT_RESOURCES; + continue; + } + if (license_job_test(job_ptr, now) != SLURM_SUCCESS) { + job_ptr->state_reason = WAIT_LICENSES; + xfree(job_ptr->state_desc); + continue; + } + + if (assoc_mgr_validate_assoc_id(acct_db_conn, + job_ptr->assoc_id, + accounting_enforce)) { + /* NOTE: This only happens if a user's account is + * disabled between when the job was submitted and + * the time we consider running it. It should be + * very rare. */ + info("sched: JobId=%u has invalid account", + job_ptr->job_id); + last_job_update = now); + job_ptr->state_reason = FAIL_ACCOUNT; + xfree(job_ptr->state_desc); + continue; + } + + if (job_ptr->details && job_ptr->details->req_node_bitmap) + have_node_bitmaps = true; + else + have_node_bitmaps = false; + if (have_node_bitmaps && + (bit_overlap(job_ptr->details->req_node_bitmap, + fini_job_ptr->job_resrcs->node_bitmap) == 0)) + break; + if (!job_ptr->batch_flag) /* Can't pull interactive jobs */ break; + + if (have_node_bitmaps) + orig_req_bitmap = job_ptr->details->req_node_bitmap; + else + orig_req_bitmap = NULL; + job_ptr->details->req_node_bitmap = + bit_copy(fini_job_ptr->job_resrcs->node_bitmap); +/* FIXME: select_nodes() can be vastly streamlined to only use the resources + * just released by fini_job */ error_code = select_nodes(job_ptr, false, NULL); + bit_free(job_ptr->details->req_node_bitmap); + job_ptr->details->req_node_bitmap = orig_req_bitmap; if (error_code == SLURM_SUCCESS) { - last_job_update = time(NULL); + last_job_update = now; info("sched: Allocate JobId=%u NodeList=%s #CPUs=%u", job_ptr->job_id, job_ptr->nodes, job_ptr->total_cpus); - launch_msg = build_launch_job_msg(job_ptr); + if (job_ptr->details->prolog_running == 0) + launch_msg = build_launch_job_msg(job_ptr); } break; } -- GitLab From 09c2312378426058c7f740bb9bc6489654fafed9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 09:45:57 -0700 Subject: [PATCH 149/614] Modify pull model resource selection to use exc_node_bitmap filtering --- src/slurmctld/job_scheduler.c | 25 ++++++++++++------------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 33d92f7c71..b312ee0bf6 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -362,7 +362,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) struct job_record *fini_job_ptr = (struct job_record *) fini_job; ListIterator job_iterator; batch_job_launch_msg_t *launch_msg = NULL; - bitstr_t *orig_req_bitmap = NULL; + bitstr_t *orig_exc_bitmap = NULL; bool have_node_bitmaps; time_t now = time(NULL); int error_code; @@ -373,7 +373,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) else select_serial = 1; } - if (select_serial != 1) + if ((select_serial != 1) || (fini_job_ptr == NULL)) return false; lock_slurmctld(job_write_lock); @@ -464,35 +464,34 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) * very rare. */ info("sched: JobId=%u has invalid account", job_ptr->job_id); - last_job_update = now); + last_job_update = now; job_ptr->state_reason = FAIL_ACCOUNT; xfree(job_ptr->state_desc); continue; } - if (job_ptr->details && job_ptr->details->req_node_bitmap) + if (job_ptr->details && job_ptr->details->exc_node_bitmap) have_node_bitmaps = true; else have_node_bitmaps = false; if (have_node_bitmaps && - (bit_overlap(job_ptr->details->req_node_bitmap, - fini_job_ptr->job_resrcs->node_bitmap) == 0)) + (bit_overlap(job_ptr->details->exc_node_bitmap, + fini_job_ptr->job_resrcs->node_bitmap) != 0)) break; if (!job_ptr->batch_flag) /* Can't pull interactive jobs */ break; if (have_node_bitmaps) - orig_req_bitmap = job_ptr->details->req_node_bitmap; + orig_exc_bitmap = job_ptr->details->exc_node_bitmap; else - orig_req_bitmap = NULL; - job_ptr->details->req_node_bitmap = + orig_exc_bitmap = NULL; + job_ptr->details->exc_node_bitmap = bit_copy(fini_job_ptr->job_resrcs->node_bitmap); -/* FIXME: select_nodes() can be vastly streamlined to only use the resources - * just released by fini_job */ + bit_not(job_ptr->details->exc_node_bitmap); error_code = select_nodes(job_ptr, false, NULL); - bit_free(job_ptr->details->req_node_bitmap); - job_ptr->details->req_node_bitmap = orig_req_bitmap; + bit_free(job_ptr->details->exc_node_bitmap); + job_ptr->details->exc_node_bitmap = orig_exc_bitmap; if (error_code == SLURM_SUCCESS) { last_job_update = now; info("sched: Allocate JobId=%u NodeList=%s #CPUs=%u", -- GitLab From 999775d4729fc43336bae1d311dae441ac4cbd0b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 09:59:13 -0700 Subject: [PATCH 150/614] slurmctld cold-start issue for select/serial --- src/slurmctld/job_scheduler.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index b312ee0bf6..c8c4950bc4 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -374,13 +374,15 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) select_serial = 1; } if ((select_serial != 1) || (fini_job_ptr == NULL)) - return false; + goto send_reply; lock_slurmctld(job_write_lock); xassert(fini_job_ptr->job_resrcs); xassert(fini_job_ptr->job_resrcs->node_bitmap); - if (!avail_front_end()) - goto no_test; + if (!avail_front_end()) { + unlock_slurmctld(job_write_lock); + goto send_reply; + } job_iterator = list_iterator_create(job_list); if (job_iterator == NULL) fatal("list_iterator_create memory allocation failure"); @@ -502,8 +504,9 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) } break; } -no_test: unlock_slurmctld(job_write_lock); + unlock_slurmctld(job_write_lock); +send_reply: if (launch_msg) { slurm_msg_t response_msg; slurm_msg_t_init(&response_msg); -- GitLab From 2eb9519fd0d75225e15d61fa7f8ab57aab850f44 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 11:25:11 -0700 Subject: [PATCH 151/614] Restructure throughput test for more parallelism --- testsuite/expect/Makefile.am | 1 + testsuite/expect/Makefile.in | 1 + testsuite/expect/test9.9 | 34 +++++++++---------------------- testsuite/expect/test9.9.bash | 38 +++++++++++++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 24 deletions(-) create mode 100755 testsuite/expect/test9.9.bash diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am index 5f452d9299..2eb8a42797 100644 --- a/testsuite/expect/Makefile.am +++ b/testsuite/expect/Makefile.am @@ -228,6 +228,7 @@ EXTRA_DIST = \ test9.7.bash \ test9.8 \ test9.9 \ + test9.9.bash \ test10.1 \ test10.2 \ test10.3 \ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index e14fc6e9f0..513bb16407 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -513,6 +513,7 @@ EXTRA_DIST = \ test9.7.bash \ test9.8 \ test9.9 \ + test9.9.bash \ test10.1 \ test10.2 \ test10.3 \ diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index 0d92145c47..276dd25fe2 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -31,37 +31,23 @@ source ./globals set test_id "9.9" set exit_code 0 -set job_cnt 2000 +set job_cnt 2000 +set test_script "./test$test_id.bash" print_header $test_id -# if {[test_front_end] != 0 || $enable_memory_leak_debug != 0} { -# set job_cnt 2 -# } +if {[test_front_end] != 0 || $enable_memory_leak_debug != 0} { + set job_cnt 2 +} proc _submit_jobs { job_name test_file } { - global exit_code job_cnt sbatch srun number + global exit_code job_cnt sbatch test_script log_user 0 - for {set inx 0} {$inx < $job_cnt} {incr inx} { - spawn -nottyinit -nottycopy $sbatch -J $job_name -o $test_file --wrap $job_name - #spawn $srun -J $job_name -o $test_file $job_name - expect { -# -re "Submitted batch job ($number)" { -# exp_continue -# } -# -re "Unable to contact" { -# send_user "\nFAILURE: slurm appears to be down\n" -# exp_continue -# } -# timeout { -# send_user "\nFAILURE: sbatch not responding\n" -# slow_kill $sbatch_pid -# set exit_code 1 -# } - eof { - wait - } + spawn -nottyinit -nottycopy $test_script $sbatch "/bin/hostname" $job_name $job_cnt + expect { + eof { + wait } } log_user 1 diff --git a/testsuite/expect/test9.9.bash b/testsuite/expect/test9.9.bash new file mode 100755 index 0000000000..b27742e699 --- /dev/null +++ b/testsuite/expect/test9.9.bash @@ -0,0 +1,38 @@ +#!/bin/bash + +if [ $# != 4 ] +then + echo "Usage: test9.9.bash " + exit 1 +fi + +sbatch=$1 +prog=$2 +job_name=$3 +job_cnt=$4 +inx=0 +iterations=$[job_cnt/10] +while [ $inx -lt $iterations ] +do + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog & + $sbatch -J $job_name -o /dev/null --wrap $prog + inx=$((inx+1)) +done + +inx=0 +iterations=$[job_cnt%10] +while [ $inx -lt $iterations ] +do + $sbatch -J $job_name -o /dev/null --wrap $prog + inx=$((inx+1)) +done +exit 0 -- GitLab From 3afd96beaf5b3c65adb60a5a39b875533334a04c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 14:04:48 -0700 Subject: [PATCH 152/614] Refactor batch job complete reply logic --- src/slurmctld/job_scheduler.c | 31 ++++++++++++++++++++++++------- src/slurmctld/job_scheduler.h | 2 +- src/slurmctld/proc_req.c | 8 +++----- 3 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index c8c4950bc4..c0abefbabd 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -350,7 +350,7 @@ static void do_diag_stats(struct timeval tv1, struct timeval tv2) * message type, alternately send a return code fo SLURM_SUCCESS * msg IN - The original message from slurmd * fini_job_ptr IN - Pointer to job that just completed and needs replacement - * RET true if job has been scheduled + * RET true if there are pending jobs that might use the resources */ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) { @@ -363,7 +363,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) ListIterator job_iterator; batch_job_launch_msg_t *launch_msg = NULL; bitstr_t *orig_exc_bitmap = NULL; - bool have_node_bitmaps; + bool have_node_bitmaps, pending_jobs = false; time_t now = time(NULL); int error_code; @@ -451,6 +451,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) job_ptr->state_reason = WAIT_RESOURCES; continue; } + if (license_job_test(job_ptr, now) != SLURM_SUCCESS) { job_ptr->state_reason = WAIT_LICENSES; xfree(job_ptr->state_desc); @@ -479,10 +480,12 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) if (have_node_bitmaps && (bit_overlap(job_ptr->details->exc_node_bitmap, fini_job_ptr->job_resrcs->node_bitmap) != 0)) - break; + continue; - if (!job_ptr->batch_flag) /* Can't pull interactive jobs */ + if (!job_ptr->batch_flag) { /* Can't pull interactive jobs */ + pending_jobs = true; break; + } if (have_node_bitmaps) orig_exc_bitmap = job_ptr->details->exc_node_bitmap; @@ -516,10 +519,10 @@ send_reply: response_msg.msg_type = REQUEST_BATCH_JOB_LAUNCH; response_msg.data = launch_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); - return true; + return false; } slurm_send_rc_msg(msg, SLURM_SUCCESS); - return false; + return pending_jobs; } /* @@ -554,6 +557,7 @@ extern int schedule(uint32_t job_limit) #endif static time_t sched_update = 0; static bool wiki_sched = false; + static bool fifo_sched = false; static int sched_timeout = 0; static int def_job_limit = 100; time_t now = time(NULL), sched_start; @@ -570,6 +574,8 @@ extern int schedule(uint32_t job_limit) if (strcmp(sched_type, "sched/backfill") == 0) backfill_sched = true; #endif + if (strcmp(sched_type, "sched/builtin") == 0) + fifo_sched = true; /* Disable avoiding of fragmentation with sched/wiki */ if ((strcmp(sched_type, "sched/wiki") == 0) || (strcmp(sched_type, "sched/wiki2") == 0)) @@ -645,9 +651,20 @@ extern int schedule(uint32_t job_limit) save_avail_node_bitmap = bit_copy(avail_node_bitmap); debug("sched: Running job scheduler"); + /* NOTE: If a job is submitted to multiple partitions then + * build_job_queue will return a separate record for each + * job:partition pair */ job_queue = build_job_queue(false); slurmctld_diag_stats.schedule_queue_len = list_count(job_queue); - while ((job_queue_rec = list_pop_bottom(job_queue, sort_job_queue2))) { + while (1) { + if (fifo_sched) { + job_queue_rec = list_pop(job_queue); + } else { + job_queue_rec = list_pop_bottom(job_queue, + sort_job_queue2); + } + if (!job_queue_rec) + break; job_ptr = job_queue_rec->job_ptr; part_ptr = job_queue_rec->part_ptr; /* Cycle through partitions usable for this job */ diff --git a/src/slurmctld/job_scheduler.h b/src/slurmctld/job_scheduler.h index 244013fa5d..6d2396a8bd 100644 --- a/src/slurmctld/job_scheduler.h +++ b/src/slurmctld/job_scheduler.h @@ -129,7 +129,7 @@ extern void rebuild_job_part_list(struct job_record *job_ptr); * message type, alternately send a return code fo SLURM_SUCCESS * msg IN - The original message from slurmd * fini_job_ptr IN - Pointer to job that just completed and needs replacement - * RET true if job has been scheduled + * RET true if there are pending jobs that might use the resources */ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 0ca14fc970..6bd399b0c8 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1488,10 +1488,10 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) lock_slurmctld(job_write_lock); + job_ptr = find_job_record(comp_msg->job_id); /* Send batch step info to accounting */ - if (association_based_accounting && - (job_ptr = find_job_record(comp_msg->job_id))) { + if (association_based_accounting && job_ptr) { struct step_record batch_step; memset(&batch_step, 0, sizeof(struct step_record)); batch_step.job_ptr = job_ptr; @@ -1515,8 +1515,6 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) } #ifdef HAVE_FRONT_END - if (!job_ptr) - job_ptr = find_job_record(comp_msg->job_id); if (job_ptr && job_ptr->front_end_ptr) nodes = job_ptr->front_end_ptr->name; msg_title = "front_end"; @@ -1630,7 +1628,7 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) slurmctld_diag_stats.jobs_completed++; dump_job = true; if ((msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) && - !replace_batch_job(msg, job_ptr)) + replace_batch_job(msg, job_ptr)) run_sched = true; } -- GitLab From 956aee33f9452ceb0569786e597c279395032ce7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 15:56:53 -0700 Subject: [PATCH 153/614] Add "wait" to a test --- testsuite/expect/test9.9.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/test9.9.bash b/testsuite/expect/test9.9.bash index b27742e699..f0420f0216 100755 --- a/testsuite/expect/test9.9.bash +++ b/testsuite/expect/test9.9.bash @@ -24,7 +24,8 @@ do $sbatch -J $job_name -o /dev/null --wrap $prog & $sbatch -J $job_name -o /dev/null --wrap $prog & $sbatch -J $job_name -o /dev/null --wrap $prog & - $sbatch -J $job_name -o /dev/null --wrap $prog + $sbatch -J $job_name -o /dev/null --wrap $prog & + wait inx=$((inx+1)) done -- GitLab From a3881faf91556032eae4a99114ed5f309115bf77 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 8 May 2012 16:58:41 -0700 Subject: [PATCH 154/614] Reduce credential lifetime with select/serial --- src/common/slurm_cred.c | 14 ++++++++++---- src/slurmd/slurmd/slurmd.c | 9 ++++++++- src/slurmd/slurmd/slurmd.h | 1 + 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index a4d9749a4d..0b278915b4 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -78,6 +78,7 @@ typedef struct sbcast_cred sbcast_cred_t; /* opaque data type */ */ #define DEFAULT_EXPIRATION_WINDOW 1200 +#define EXTREME_DEBUG 0 #define MAX_TIME 0x7fffffff #define SBCAST_CACHE_SIZE 64 @@ -409,6 +410,9 @@ static int _slurm_crypto_init(void) char *crypto_type = NULL; int retval = SLURM_SUCCESS; + if ( g_crypto_context ) /* mostly avoid locks for better speed */ + return SLURM_SUCCESS; + slurm_mutex_lock( &g_crypto_context_lock ); if ( g_crypto_context ) goto done; @@ -1635,7 +1639,7 @@ _slurm_cred_alloc(void) } -#ifdef EXTREME_DEBUG +#if EXTREME_DEBUG static void _print_data(char *data, int datalen) { @@ -1913,14 +1917,16 @@ _job_state_destroy(job_state_t *j) static void _clear_expired_job_states(slurm_cred_ctx_t ctx) { - char t1[64], t2[64], t3[64]; time_t now = time(NULL); ListIterator i = NULL; job_state_t *j = NULL; i = list_iterator_create(ctx->job_list); - + if (!i) + fatal("list_iterator_create: malloc failure"); while ((j = list_next(i))) { +#if EXTREME_DEBUG + char t1[64], t2[64], t3[64]; if (j->revoked) { strcpy(t2, " revoked:"); timestr(&j->revoked, (t2+9), (64-9)); @@ -1935,7 +1941,7 @@ _clear_expired_job_states(slurm_cred_ctx_t ctx) } debug3("state for jobid %u: ctime:%s%s%s", j->jobid, timestr(&j->ctime, t1, 64), t2, t3); - +#endif if (j->revoked && (now > j->expiration)) { list_delete_item(i); } diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index d7e42b367a..f4a4deaefa 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -986,6 +986,7 @@ _read_config(void) _massage_pathname(&conf->spooldir); _free_and_set(&conf->pidfile, xstrdup(cf->slurmd_pidfile)); _massage_pathname(&conf->pidfile); + _free_and_set(&conf->select_type, xstrdup(cf->select_type)); _free_and_set(&conf->task_prolog, xstrdup(cf->task_prolog)); _free_and_set(&conf->task_epilog, xstrdup(cf->task_epilog)); _free_and_set(&conf->pubkey, path_pubkey); @@ -1190,7 +1191,7 @@ _init_conf(void) static void _destroy_conf(void) { - if(conf) { + if (conf) { xfree(conf->block_map); xfree(conf->block_map_inv); xfree(conf->conffile); @@ -1205,6 +1206,7 @@ _destroy_conf(void) xfree(conf->pidfile); xfree(conf->prolog); xfree(conf->pubkey); + xfree(conf->select_type); xfree(conf->spooldir); xfree(conf->stepd_loc); xfree(conf->task_prolog); @@ -1450,6 +1452,11 @@ _slurmd_init(void) */ if (!(conf->vctx = slurm_cred_verifier_ctx_create(conf->pubkey))) return SLURM_FAILURE; + if (!strcmp(conf->select_type, "select/serial")) { + /* Only cache credential for 5 seconds with select/serial + * for shorter cache searches and higher throughput */ + slurm_cred_ctx_set(conf->vctx, SLURM_CRED_OPT_EXPIRY_WINDOW, 2); + } /* * Create slurmd spool directory if necessary. diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h index d5eb54186e..b255430060 100644 --- a/src/slurmd/slurmd/slurmd.h +++ b/src/slurmd/slurmd/slurmd.h @@ -111,6 +111,7 @@ typedef struct slurmd_config { char *pubkey; /* location of job cred public key */ char *epilog; /* Path to Epilog script */ char *prolog; /* Path to prolog script */ + char *select_type; /* SelectType */ char *stepd_loc; /* slurmstepd path */ char *task_prolog; /* per-task prolog script */ char *task_epilog; /* per-task epilog script */ -- GitLab From 8e56bfd7b6e3fd6883dda387b4220ed9496bbaa9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 08:23:57 -0700 Subject: [PATCH 155/614] Generate more accurate throughput timing info --- testsuite/expect/test9.9 | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index 276dd25fe2..87ccbc40e1 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -31,7 +31,7 @@ source ./globals set test_id "9.9" set exit_code 0 -set job_cnt 2000 +set job_cnt 5000 set test_script "./test$test_id.bash" print_header $test_id @@ -59,9 +59,8 @@ proc _submit_jobs { job_name test_file } { } set time_took [string trim [time {_submit_jobs "hostname" "/dev/null"}] " per iteration microseconds"] -set time_took_sec [expr $time_took / 1000000] -set time_per_job [expr $job_cnt / $time_took_sec] -send_user "test 1 took $time_took microseconds == $time_took_sec seconds, $time_per_job jobs a sec\n" +set jobs_per_sec [expr $job_cnt * 1000000 / $time_took] +send_user "Ran $job_cnt jobs in $time_took microseconds or $jobs_per_sec jobs per second\n" if { $exit_code != 0 } { exit $exit_code -- GitLab From bf9f245215f9437eec1f61e2721f5621be928706 Mon Sep 17 00:00:00 2001 From: Don Lipari Date: Wed, 9 May 2012 08:55:57 -0700 Subject: [PATCH 156/614] Reset priority of system held jobs when dependency is satisfied The symptom is that SLURM schedules lower priority jobs to run when higher priority, dependent jobs have their dependencies satisfied. This happens because dependent jobs still have a priority of 1 when the job queue is sorted in the schedule() function. The proposed fix forces jobs to have their priority updated when their dependencies are satisfied. --- NEWS | 2 ++ src/slurmctld/job_mgr.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/NEWS b/NEWS index 83ecd50dbd..81690c2256 100644 --- a/NEWS +++ b/NEWS @@ -41,6 +41,8 @@ documents those changes that are of interest to users and admins. batch jobs. -- Fix possible illegal memory reference in slurmctld for job step with relative option. Work by Matthieu Hautreux (CEA). + -- Reset priority of system held jobs when dependency is satisfied. Work by + Don Lipari, LLNL. * Changes in SLURM 2.3.4 ======================== diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index f2cdc0eacc..3337b8349f 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8796,6 +8796,7 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) struct job_details *detail_ptr = job_ptr->details; time_t now = time(NULL); int depend_rc; + bool independent = false; /* Test dependencies first so we can cancel jobs before dependent * job records get purged (e.g. afterok, afternotok) */ @@ -8836,11 +8837,14 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) /* Job is eligible to start now */ if (job_ptr->state_reason == WAIT_DEPENDENCY) { job_ptr->state_reason = WAIT_NO_REASON; + independent = true; xfree(job_ptr->state_desc); } if ((detail_ptr && (detail_ptr->begin_time == 0) && (job_ptr->priority != 0))) { detail_ptr->begin_time = now; + if (independent) + _set_job_prio(job_ptr); } else if (job_ptr->state_reason == WAIT_TIME) { job_ptr->state_reason = WAIT_NO_REASON; xfree(job_ptr->state_desc); -- GitLab From 0ffeac6b8830be587e57c89897eaaabbc0aafbb9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 09:14:51 -0700 Subject: [PATCH 157/614] Clarify job step default gres allocation --- doc/html/gres.shtml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/doc/html/gres.shtml b/doc/html/gres.shtml index 40555e4327..b3c5535f92 100644 --- a/doc/html/gres.shtml +++ b/doc/html/gres.shtml @@ -100,8 +100,9 @@ for use by other jobs.

    Job steps can be allocated generic resources from those allocated to the job using the --gres option with the srun command as described -above. By default, a job step will be allocated none of the generic resources -allocated to the job, but must explicitly request desired generic resources. +above. By default, a job step will be allocated all of the generic resources +allocated to the job. If desired, the job step may explicitly specify a +different generic resource count than the job. This design choice was based upon a scenario where each job executes many job steps. If job steps were granted access to all generic resources by default, some job steps would need to explicitly specify zero generic resource @@ -149,6 +150,6 @@ JobStep=1234.2 CUDA_VISIBLE_DEVICES=3 file and insure they are in the increasing numeric order.

    -

    Last modified 1 August 2011

    +

    Last modified 8 May 2012

    -- GitLab From 579e120713a58f3579d8fbeec9c2c4de633b56d6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 24 Apr 2012 11:59:02 -0700 Subject: [PATCH 158/614] shell checkin for future "launch" plugin --- configure | 5 +- configure.ac | 3 + src/plugins/Makefile.am | 1 + src/plugins/Makefile.in | 1 + src/plugins/launch/Makefile.am | 3 + src/plugins/launch/Makefile.in | 676 ++++++++++++++++++++++++ src/plugins/launch/poe/Makefile.am | 13 + src/plugins/launch/poe/Makefile.in | 644 ++++++++++++++++++++++ src/plugins/launch/poe/launch_poe.c | 0 src/plugins/launch/slurm/Makefile.am | 13 + src/plugins/launch/slurm/Makefile.in | 644 ++++++++++++++++++++++ src/plugins/launch/slurm/launch_slurm.c | 0 src/srun/Makefile.am | 1 + src/srun/Makefile.in | 15 +- src/srun/launch.c | 0 src/srun/launch.h | 0 16 files changed, 2012 insertions(+), 7 deletions(-) create mode 100644 src/plugins/launch/Makefile.am create mode 100644 src/plugins/launch/Makefile.in create mode 100644 src/plugins/launch/poe/Makefile.am create mode 100644 src/plugins/launch/poe/Makefile.in create mode 100644 src/plugins/launch/poe/launch_poe.c create mode 100644 src/plugins/launch/slurm/Makefile.am create mode 100644 src/plugins/launch/slurm/Makefile.in create mode 100644 src/plugins/launch/slurm/launch_slurm.c create mode 100644 src/srun/launch.c create mode 100644 src/srun/launch.h diff --git a/configure b/configure index a909b5716b..fb55b8595c 100755 --- a/configure +++ b/configure @@ -21981,7 +21981,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -23344,6 +23344,9 @@ do "src/plugins/job_submit/logging/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/job_submit/logging/Makefile" ;; "src/plugins/job_submit/lua/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/job_submit/lua/Makefile" ;; "src/plugins/job_submit/partition/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/job_submit/partition/Makefile" ;; + "src/plugins/launch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/Makefile" ;; + "src/plugins/launch/poe/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/poe/Makefile" ;; + "src/plugins/launch/slurm/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/slurm/Makefile" ;; "src/plugins/preempt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/preempt/Makefile" ;; "src/plugins/preempt/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/preempt/none/Makefile" ;; "src/plugins/preempt/partition_prio/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/preempt/partition_prio/Makefile" ;; diff --git a/configure.ac b/configure.ac index a787fb331a..8d4879cf6e 100644 --- a/configure.ac +++ b/configure.ac @@ -472,6 +472,9 @@ AC_CONFIG_FILES([Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile + src/plugins/launch/Makefile + src/plugins/launch/poe/Makefile + src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile diff --git a/src/plugins/Makefile.am b/src/plugins/Makefile.am index c17ce38181..c985e3474f 100644 --- a/src/plugins/Makefile.am +++ b/src/plugins/Makefile.am @@ -7,6 +7,7 @@ SUBDIRS = \ jobacct_gather \ jobcomp \ job_submit \ + launch \ mpi \ preempt \ priority \ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index e31a702b65..f266eec99c 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -330,6 +330,7 @@ SUBDIRS = \ jobacct_gather \ jobcomp \ job_submit \ + launch \ mpi \ preempt \ priority \ diff --git a/src/plugins/launch/Makefile.am b/src/plugins/launch/Makefile.am new file mode 100644 index 0000000000..837699a30a --- /dev/null +++ b/src/plugins/launch/Makefile.am @@ -0,0 +1,3 @@ +# Makefile for launch plugins + +SUBDIRS = poe slurm diff --git a/src/plugins/launch/Makefile.in b/src/plugins/launch/Makefile.in new file mode 100644 index 0000000000..9f00a96719 --- /dev/null +++ b/src/plugins/launch/Makefile.in @@ -0,0 +1,676 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for launch plugins +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/launch +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = poe slurm +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/plugins/launch/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --gnu src/plugins/launch/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-generic clean-libtool \ + ctags ctags-recursive distclean distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/launch/poe/Makefile.am b/src/plugins/launch/poe/Makefile.am new file mode 100644 index 0000000000..af07975882 --- /dev/null +++ b/src/plugins/launch/poe/Makefile.am @@ -0,0 +1,13 @@ +# Makefile for launch/poe plugin + +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +pkglib_LTLIBRARIES = launch_poe.la + +launch_poe_la_SOURCES = launch_poe.c + +launch_poe_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/launch/poe/Makefile.in b/src/plugins/launch/poe/Makefile.in new file mode 100644 index 0000000000..4b2a9f5da3 --- /dev/null +++ b/src/plugins/launch/poe/Makefile.in @@ -0,0 +1,644 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for launch/poe plugin + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/launch/poe +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +launch_poe_la_LIBADD = +am_launch_poe_la_OBJECTS = launch_poe.lo +launch_poe_la_OBJECTS = $(am_launch_poe_la_OBJECTS) +launch_poe_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(launch_poe_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(launch_poe_la_SOURCES) +DIST_SOURCES = $(launch_poe_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +pkglib_LTLIBRARIES = launch_poe.la +launch_poe_la_SOURCES = launch_poe.c +launch_poe_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/launch/poe/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/launch/poe/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +launch_poe.la: $(launch_poe_la_OBJECTS) $(launch_poe_la_DEPENDENCIES) + $(launch_poe_la_LINK) -rpath $(pkglibdir) $(launch_poe_la_OBJECTS) $(launch_poe_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch_poe.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/plugins/launch/slurm/Makefile.am b/src/plugins/launch/slurm/Makefile.am new file mode 100644 index 0000000000..919fa617b1 --- /dev/null +++ b/src/plugins/launch/slurm/Makefile.am @@ -0,0 +1,13 @@ +# Makefile for launch/slurm plugin + +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +pkglib_LTLIBRARIES = launch_slurm.la + +launch_slurm_la_SOURCES = launch_slurm.c + +launch_slurm_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/launch/slurm/Makefile.in b/src/plugins/launch/slurm/Makefile.in new file mode 100644 index 0000000000..2050ffb6f6 --- /dev/null +++ b/src/plugins/launch/slurm/Makefile.in @@ -0,0 +1,644 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for launch/slurm plugin + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/launch/slurm +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +launch_slurm_la_LIBADD = +am_launch_slurm_la_OBJECTS = launch_slurm.lo +launch_slurm_la_OBJECTS = $(am_launch_slurm_la_OBJECTS) +launch_slurm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(launch_slurm_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(launch_slurm_la_SOURCES) +DIST_SOURCES = $(launch_slurm_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +pkglib_LTLIBRARIES = launch_slurm.la +launch_slurm_la_SOURCES = launch_slurm.c +launch_slurm_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/launch/slurm/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/launch/slurm/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +launch_slurm.la: $(launch_slurm_la_OBJECTS) $(launch_slurm_la_DEPENDENCIES) + $(launch_slurm_la_LINK) -rpath $(pkglibdir) $(launch_slurm_la_OBJECTS) $(launch_slurm_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch_slurm.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 2db21435a4..5546f72000 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -18,6 +18,7 @@ srun_SOURCES = \ fname.h \ allocate.c \ allocate.h \ + launch.c launch.h \ multi_prog.c multi_prog.h \ task_state.c task_state.h \ srun.wrapper.c diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 93e5f8068c..195b12e047 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -89,13 +89,14 @@ am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__srun_SOURCES_DIST = srun.c srun.h opt.c opt.h srun_job.c \ srun_job.h srun_pty.c srun_pty.h debugger.h debugger.c fname.c \ - fname.h allocate.c allocate.h multi_prog.c multi_prog.h \ - task_state.c task_state.h srun.wrapper.c runjob_interface.cc + fname.h allocate.c allocate.h launch.c launch.h multi_prog.c \ + multi_prog.h task_state.c task_state.h srun.wrapper.c \ + runjob_interface.cc @BGQ_LOADED_TRUE@am__objects_1 = runjob_interface.$(OBJEXT) am_srun_OBJECTS = srun.$(OBJEXT) opt.$(OBJEXT) srun_job.$(OBJEXT) \ srun_pty.$(OBJEXT) debugger.$(OBJEXT) fname.$(OBJEXT) \ - allocate.$(OBJEXT) multi_prog.$(OBJEXT) task_state.$(OBJEXT) \ - srun.wrapper.$(OBJEXT) $(am__objects_1) + allocate.$(OBJEXT) launch.$(OBJEXT) multi_prog.$(OBJEXT) \ + task_state.$(OBJEXT) srun.wrapper.$(OBJEXT) $(am__objects_1) srun_OBJECTS = $(am_srun_OBJECTS) am__DEPENDENCIES_1 = $(top_builddir)/src/api/libslurm.o srun_DEPENDENCIES = $(am__DEPENDENCIES_1) @@ -333,8 +334,9 @@ CLEANFILES = core.* INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) srun_SOURCES = srun.c srun.h opt.c opt.h srun_job.c srun_job.h \ srun_pty.c srun_pty.h debugger.h debugger.c fname.c fname.h \ - allocate.c allocate.h multi_prog.c multi_prog.h task_state.c \ - task_state.h srun.wrapper.c $(am__append_1) + allocate.c allocate.h launch.c launch.h multi_prog.c \ + multi_prog.h task_state.c task_state.h srun.wrapper.c \ + $(am__append_1) # pthread is needed for compiling with g++ (which is used for linking # no matter if on a BGQ or not because of mentioning a .cc file @@ -435,6 +437,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runjob_interface.Po@am__quote@ diff --git a/src/srun/launch.c b/src/srun/launch.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/srun/launch.h b/src/srun/launch.h new file mode 100644 index 0000000000..e69de29bb2 -- GitLab From 225813627fdd7963de7ba2af13a5d4930db338c5 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 24 Apr 2012 16:10:53 -0700 Subject: [PATCH 159/614] Add runjob launch plugin --- configure | 3 +- configure.ac | 1 + src/plugins/launch/Makefile.am | 2 +- src/plugins/launch/Makefile.in | 2 +- src/plugins/launch/runjob/Makefile.am | 13 + src/plugins/launch/runjob/Makefile.in | 644 ++++++++++++++++++++++++++ 6 files changed, 662 insertions(+), 3 deletions(-) create mode 100644 src/plugins/launch/runjob/Makefile.am create mode 100644 src/plugins/launch/runjob/Makefile.in diff --git a/configure b/configure index fb55b8595c..d5367dafc1 100755 --- a/configure +++ b/configure @@ -21981,7 +21981,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile src/plugins/launch/runjob/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -23346,6 +23346,7 @@ do "src/plugins/job_submit/partition/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/job_submit/partition/Makefile" ;; "src/plugins/launch/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/Makefile" ;; "src/plugins/launch/poe/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/poe/Makefile" ;; + "src/plugins/launch/runjob/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/runjob/Makefile" ;; "src/plugins/launch/slurm/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/launch/slurm/Makefile" ;; "src/plugins/preempt/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/preempt/Makefile" ;; "src/plugins/preempt/none/Makefile") CONFIG_FILES="$CONFIG_FILES src/plugins/preempt/none/Makefile" ;; diff --git a/configure.ac b/configure.ac index 8d4879cf6e..c66859cc1e 100644 --- a/configure.ac +++ b/configure.ac @@ -474,6 +474,7 @@ AC_CONFIG_FILES([Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile + src/plugins/launch/runjob/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile diff --git a/src/plugins/launch/Makefile.am b/src/plugins/launch/Makefile.am index 837699a30a..e694aefbe5 100644 --- a/src/plugins/launch/Makefile.am +++ b/src/plugins/launch/Makefile.am @@ -1,3 +1,3 @@ # Makefile for launch plugins -SUBDIRS = poe slurm +SUBDIRS = poe runjob slurm diff --git a/src/plugins/launch/Makefile.in b/src/plugins/launch/Makefile.in index 9f00a96719..85db6d4efd 100644 --- a/src/plugins/launch/Makefile.in +++ b/src/plugins/launch/Makefile.in @@ -323,7 +323,7 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = poe slurm +SUBDIRS = poe runjob slurm all: all-recursive .SUFFIXES: diff --git a/src/plugins/launch/runjob/Makefile.am b/src/plugins/launch/runjob/Makefile.am new file mode 100644 index 0000000000..097ab4c524 --- /dev/null +++ b/src/plugins/launch/runjob/Makefile.am @@ -0,0 +1,13 @@ +# Makefile for launch/runjob plugin + +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +pkglib_LTLIBRARIES = launch_runjob.la + +launch_runjob_la_SOURCES = launch_runjob.c + +launch_runjob_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/launch/runjob/Makefile.in b/src/plugins/launch/runjob/Makefile.in new file mode 100644 index 0000000000..9316e38fad --- /dev/null +++ b/src/plugins/launch/runjob/Makefile.in @@ -0,0 +1,644 @@ +# Makefile.in generated by automake 1.11.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, +# Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# Makefile for launch/runjob plugin + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/plugins/launch/runjob +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__installdirs = "$(DESTDIR)$(pkglibdir)" +LTLIBRARIES = $(pkglib_LTLIBRARIES) +launch_runjob_la_LIBADD = +am_launch_runjob_la_OBJECTS = launch_runjob.lo +launch_runjob_la_OBJECTS = $(am_launch_runjob_la_OBJECTS) +launch_runjob_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(launch_runjob_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(launch_runjob_la_SOURCES) +DIST_SOURCES = $(launch_runjob_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +PLUGIN_FLAGS = -module -avoid-version --export-dynamic +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +pkglib_LTLIBRARIES = launch_runjob.la +launch_runjob_la_SOURCES = launch_runjob.c +launch_runjob_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/plugins/launch/runjob/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/plugins/launch/runjob/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-pkglibLTLIBRARIES: $(pkglib_LTLIBRARIES) + @$(NORMAL_INSTALL) + test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + list2=; for p in $$list; do \ + if test -f $$p; then \ + list2="$$list2 $$p"; \ + else :; fi; \ + done; \ + test -z "$$list2" || { \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibdir)'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibdir)"; \ + } + +uninstall-pkglibLTLIBRARIES: + @$(NORMAL_UNINSTALL) + @list='$(pkglib_LTLIBRARIES)'; test -n "$(pkglibdir)" || list=; \ + for p in $$list; do \ + $(am__strip_dir) \ + echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibdir)/$$f'"; \ + $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibdir)/$$f"; \ + done + +clean-pkglibLTLIBRARIES: + -test -z "$(pkglib_LTLIBRARIES)" || rm -f $(pkglib_LTLIBRARIES) + @list='$(pkglib_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +launch_runjob.la: $(launch_runjob_la_OBJECTS) $(launch_runjob_la_DEPENDENCIES) + $(launch_runjob_la_LINK) -rpath $(pkglibdir) $(launch_runjob_la_OBJECTS) $(launch_runjob_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch_runjob.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: + for dir in "$(DESTDIR)$(pkglibdir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-pkglibLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-pkglibLTLIBRARIES + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-pkglibLTLIBRARIES + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-pkglibLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-pkglibLTLIBRARIES \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags uninstall uninstall-am uninstall-pkglibLTLIBRARIES + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: -- GitLab From 2d06875242363ee6df2afad0c19997a87a7ad777 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 24 Apr 2012 16:11:59 -0700 Subject: [PATCH 160/614] made shell for launch plugin and moved create_job_step to a common function --- src/srun/allocate.c | 189 +------------------ src/srun/launch.c | 435 ++++++++++++++++++++++++++++++++++++++++++++ src/srun/launch.h | 60 ++++++ 3 files changed, 499 insertions(+), 185 deletions(-) diff --git a/src/srun/allocate.c b/src/srun/allocate.c index e2a6452278..973dbefa55 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -60,7 +60,7 @@ #include "src/srun/allocate.h" #include "src/srun/opt.h" -#include "src/srun/debugger.h" +#include "src/srun/launch.h" #ifdef HAVE_BG #include "src/common/node_select.h" @@ -747,190 +747,9 @@ job_desc_msg_destroy(job_desc_msg_t *j) extern int create_job_step(srun_job_t *job, bool use_all_cpus) { - int i, rc; - unsigned long my_sleep = 0; - time_t begin_time; - - slurm_step_ctx_params_t_init(&job->ctx_params); - job->ctx_params.job_id = job->jobid; - job->ctx_params.uid = opt.uid; - -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - /* On a Q and onward this we don't add this. */ -#else - /* set the jobid for totalview */ - totalview_jobid = NULL; - xstrfmtcat(totalview_jobid, "%u", job->ctx_params.job_id); -#endif - /* Validate minimum and maximum node counts */ - if (opt.min_nodes && opt.max_nodes && - (opt.min_nodes > opt.max_nodes)) { - error ("Minimum node count > maximum node count (%d > %d)", - opt.min_nodes, opt.max_nodes); - return -1; - } -#if !defined HAVE_FRONT_END || (defined HAVE_BGQ) -//#if !defined HAVE_FRONT_END || (defined HAVE_BGQ && defined HAVE_BG_FILES) - if (opt.min_nodes && (opt.min_nodes > job->nhosts)) { - error ("Minimum node count > allocated node count (%d > %d)", - opt.min_nodes, job->nhosts); - return -1; - } -#endif - job->ctx_params.min_nodes = job->nhosts; - if (opt.min_nodes && (opt.min_nodes < job->ctx_params.min_nodes)) - job->ctx_params.min_nodes = opt.min_nodes; - job->ctx_params.max_nodes = job->nhosts; - if (opt.max_nodes && (opt.max_nodes < job->ctx_params.max_nodes)) - job->ctx_params.max_nodes = opt.max_nodes; - - if (!opt.ntasks_set && (opt.ntasks_per_node != NO_VAL)) - job->ntasks = opt.ntasks = job->nhosts * opt.ntasks_per_node; - job->ctx_params.task_count = opt.ntasks; - - if (opt.mem_per_cpu != NO_VAL) - job->ctx_params.mem_per_cpu = opt.mem_per_cpu; - if (opt.gres) - job->ctx_params.gres = opt.gres; - else - job->ctx_params.gres = getenv("SLURM_STEP_GRES"); - - if (use_all_cpus) - job->ctx_params.cpu_count = job->cpu_count; - else if (opt.overcommit) - job->ctx_params.cpu_count = job->ctx_params.min_nodes; - else if (opt.cpus_set) - job->ctx_params.cpu_count = opt.ntasks * opt.cpus_per_task; - else - job->ctx_params.cpu_count = opt.ntasks; - - job->ctx_params.relative = (uint16_t)opt.relative; - job->ctx_params.ckpt_interval = (uint16_t)opt.ckpt_interval; - job->ctx_params.ckpt_dir = opt.ckpt_dir; - job->ctx_params.exclusive = (uint16_t)opt.exclusive; - if (opt.immediate == 1) - job->ctx_params.immediate = (uint16_t)opt.immediate; - if (opt.time_limit != NO_VAL) - job->ctx_params.time_limit = (uint32_t)opt.time_limit; - job->ctx_params.verbose_level = (uint16_t)_verbose; - if (opt.resv_port_cnt != NO_VAL) - job->ctx_params.resv_port_cnt = (uint16_t) opt.resv_port_cnt; - - switch (opt.distribution) { - case SLURM_DIST_BLOCK: - case SLURM_DIST_ARBITRARY: - case SLURM_DIST_CYCLIC: - case SLURM_DIST_CYCLIC_CYCLIC: - case SLURM_DIST_CYCLIC_BLOCK: - case SLURM_DIST_BLOCK_CYCLIC: - case SLURM_DIST_BLOCK_BLOCK: - job->ctx_params.task_dist = opt.distribution; - break; - case SLURM_DIST_PLANE: - job->ctx_params.task_dist = SLURM_DIST_PLANE; - job->ctx_params.plane_size = opt.plane_size; - break; - default: - job->ctx_params.task_dist = (job->ctx_params.task_count <= - job->ctx_params.min_nodes) - ? SLURM_DIST_CYCLIC : SLURM_DIST_BLOCK; - opt.distribution = job->ctx_params.task_dist; - break; - - } - job->ctx_params.overcommit = opt.overcommit ? 1 : 0; - - job->ctx_params.node_list = opt.nodelist; - - job->ctx_params.network = opt.network; - job->ctx_params.no_kill = opt.no_kill; - if (opt.job_name_set_cmd && opt.job_name) - job->ctx_params.name = opt.job_name; - else - job->ctx_params.name = opt.cmd_name; - job->ctx_params.features = opt.constraints; - - debug("requesting job %u, user %u, nodes %u including (%s)", - job->ctx_params.job_id, job->ctx_params.uid, - job->ctx_params.min_nodes, job->ctx_params.node_list); - debug("cpus %u, tasks %u, name %s, relative %u", - job->ctx_params.cpu_count, job->ctx_params.task_count, - job->ctx_params.name, job->ctx_params.relative); - begin_time = time(NULL); - - for (i=0; (!destroy_job); i++) { - if (opt.no_alloc) { - job->step_ctx = slurm_step_ctx_create_no_alloc( - &job->ctx_params, job->stepid); - } else - job->step_ctx = slurm_step_ctx_create( - &job->ctx_params); - if (job->step_ctx != NULL) { - if (i > 0) - info("Job step created"); - - break; - } - rc = slurm_get_errno(); - - if (((opt.immediate != 0) && - ((opt.immediate == 1) || - (difftime(time(NULL), begin_time) > opt.immediate))) || - ((rc != ESLURM_NODES_BUSY) && (rc != ESLURM_PORTS_BUSY) && - (rc != ESLURM_PROLOG_RUNNING) && - (rc != SLURM_PROTOCOL_SOCKET_IMPL_TIMEOUT) && - (rc != ESLURM_DISABLED))) { - error ("Unable to create job step: %m"); - return -1; - } - - if (i == 0) { - if (rc == ESLURM_PROLOG_RUNNING) { - verbose("Resources allocated for job %u and " - "being configured, please wait", - job->ctx_params.job_id); - } else { - info("Job step creation temporarily disabled, " - "retrying"); - } - xsignal_unblock(sig_array); - for (i = 0; sig_array[i]; i++) - xsignal(sig_array[i], _signal_while_allocating); - - my_sleep = (getpid() % 1000) * 100 + 100000; - } else { - verbose("Job step creation still disabled, retrying"); - my_sleep = MIN((my_sleep * 2), 29000000); - } - /* sleep 0.1 to 29 secs with exponential back-off */ - usleep(my_sleep); - if (destroy_job) { - /* cancelled by signal */ - break; - } - } - if (i > 0) { - xsignal_block(sig_array); - if (destroy_job) { - info("Cancelled pending job step"); - return -1; - } - } - - slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_STEPID, &job->stepid); - /* Number of hosts in job may not have been initialized yet if - * --jobid was used or only SLURM_JOB_ID was set in user env. - * Reset the value here just in case. - */ - slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_NUM_HOSTS, - &job->nhosts); - - /* - * Recreate filenames which may depend upon step id - */ - job_update_io_fnames(job); - - return 0; + return launch_common_create_job_step(job, use_all_cpus, + _signal_while_allocating, + &destroy_job); } diff --git a/src/srun/launch.c b/src/srun/launch.c index e69de29bb2..496ad5cf96 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -0,0 +1,435 @@ + /* launch.c - Define job launch plugin functions. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC + * Written by Danny Auble + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#include + +#include "launch.h" +#include "src/srun/debugger.h" + +#include "src/common/env.h" +#include "src/common/xstring.h" +#include "src/common/plugin.h" +#include "src/common/plugrack.h" + +static int sig_array[] = { + SIGHUP, SIGINT, SIGQUIT, SIGPIPE, + SIGTERM, SIGUSR1, SIGUSR2, 0 }; + +typedef struct { + int (*create_job_step) (srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job); + int (*step_launch) (srun_job_t *job); +} plugin_ops_t; + +typedef struct { + char *type; + plugrack_t plugin_list; + plugin_handle_t cur_plugin; + int plugin_errno; + plugin_ops_t ops; +} plugin_context_t; + +static plugin_context_t *plugin_context = NULL; +static pthread_mutex_t plugin_context_lock = + PTHREAD_MUTEX_INITIALIZER; + +/* + * Locate and load the appropriate plugin + */ +static plugin_ops_t * _get_ops(plugin_context_t *c) +{ + /* + * Must be synchronized with slurm_acct_storage_ops_t above. + */ + static const char *syms[] = { + "launch_p_create_job_step", + "launch_p_step_launch" + }; + int n_syms = sizeof(syms) / sizeof(char *); + + /* Find the correct plugin. */ + c->cur_plugin = plugin_load_and_link(c->type, n_syms, syms, + (void **) &c->ops); + if (c->cur_plugin != PLUGIN_INVALID_HANDLE) + return &c->ops; + + if (errno != EPLUGIN_NOTFOUND) { + error("Couldn't load specified plugin name for %s: %s", + c->type, plugin_strerror(errno)); + return NULL; + } + + error("Couldn't find the specified plugin name for %s " + "looking at all files", + c->type); + + /* Get plugin list. */ + if (!c->plugin_list) { + char *plugin_dir; + c->plugin_list = plugrack_create(); + if (!c->plugin_list) { + error("cannot create plugin manager"); + return NULL; + } + plugrack_set_major_type(c->plugin_list, "launch"); + plugrack_set_paranoia(c->plugin_list, + PLUGRACK_PARANOIA_NONE, + 0); + plugin_dir = slurm_get_plugin_dir(); + plugrack_read_dir(c->plugin_list, plugin_dir); + xfree(plugin_dir); + } + + c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->type); + if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { + error("cannot find accounting_storage plugin for %s", c->type); + return NULL; + } + + /* Dereference the API. */ + if (plugin_get_syms(c->cur_plugin, n_syms, syms, + (void **) &c->ops) < n_syms ) { + error("incomplete acct_storage plugin detected"); + return NULL; + } + + return &c->ops; +} + +/* + * Create a context + */ +static plugin_context_t *_context_create(const char *type) +{ + plugin_context_t *c; + + if (!type) { + debug3("_context_create: no uler type"); + return NULL; + } + + c = xmalloc(sizeof(plugin_context_t)); + c->type = xstrdup(type); + c->plugin_list = NULL; + c->cur_plugin = PLUGIN_INVALID_HANDLE; + c->plugin_errno = SLURM_SUCCESS; + + return c; +} + +/* + * Destroy a context + */ +static int _context_destroy(plugin_context_t *c) +{ + int rc = SLURM_SUCCESS; + /* + * Must check return code here because plugins might still + * be loaded and active. + */ + if (c->plugin_list) { + if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) + rc = SLURM_ERROR; + } else + plugin_unload(c->cur_plugin); + + xfree(c->type); + xfree(c); + + return rc; +} + +/* + * Initialize context for acct_storage plugin + */ +extern int launch_init(void) +{ + int retval = SLURM_SUCCESS; + char *type = NULL; + + slurm_mutex_lock(&plugin_context_lock); + + if (plugin_context) + goto done; + type = slurm_get_accounting_storage_type(); + + if (!(plugin_context = _context_create(type))) { + error("cannot create acct_storage context for %s", type); + retval = SLURM_ERROR; + goto done; + } + + if (!_get_ops(plugin_context)) { + error("cannot resolve location plugin operations"); + _context_destroy(plugin_context); + plugin_context = NULL; + retval = SLURM_ERROR; + } + +done: + slurm_mutex_unlock(&plugin_context_lock); + xfree(type); + + return retval; +} + +extern int location_fini(void) +{ + int rc; + + if (!plugin_context) + return SLURM_SUCCESS; + + rc = _context_destroy(plugin_context); + plugin_context = NULL; + + return rc; +} + +extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job) +{ + int i, rc; + unsigned long my_sleep = 0; + time_t begin_time; + + if (!job) { + error("launch_common_create_job_step: no job given"); + return SLURM_ERROR; + } + + slurm_step_ctx_params_t_init(&job->ctx_params); + job->ctx_params.job_id = job->jobid; + job->ctx_params.uid = opt.uid; + +#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P + /* On a Q and onward this we don't add this. */ +#else + /* set the jobid for totalview */ + totalview_jobid = NULL; + xstrfmtcat(totalview_jobid, "%u", job->ctx_params.job_id); +#endif + /* Validate minimum and maximum node counts */ + if (opt.min_nodes && opt.max_nodes && + (opt.min_nodes > opt.max_nodes)) { + error ("Minimum node count > maximum node count (%d > %d)", + opt.min_nodes, opt.max_nodes); + return SLURM_ERROR; + } +#if !defined HAVE_FRONT_END || (defined HAVE_BGQ) +//#if !defined HAVE_FRONT_END || (defined HAVE_BGQ && defined HAVE_BG_FILES) + if (opt.min_nodes && (opt.min_nodes > job->nhosts)) { + error ("Minimum node count > allocated node count (%d > %d)", + opt.min_nodes, job->nhosts); + return SLURM_ERROR; + } +#endif + job->ctx_params.min_nodes = job->nhosts; + if (opt.min_nodes && (opt.min_nodes < job->ctx_params.min_nodes)) + job->ctx_params.min_nodes = opt.min_nodes; + job->ctx_params.max_nodes = job->nhosts; + if (opt.max_nodes && (opt.max_nodes < job->ctx_params.max_nodes)) + job->ctx_params.max_nodes = opt.max_nodes; + + if (!opt.ntasks_set && (opt.ntasks_per_node != NO_VAL)) + job->ntasks = opt.ntasks = job->nhosts * opt.ntasks_per_node; + job->ctx_params.task_count = opt.ntasks; + + if (opt.mem_per_cpu != NO_VAL) + job->ctx_params.mem_per_cpu = opt.mem_per_cpu; + if (opt.gres) + job->ctx_params.gres = opt.gres; + else + job->ctx_params.gres = getenv("SLURM_STEP_GRES"); + + if (use_all_cpus) + job->ctx_params.cpu_count = job->cpu_count; + else if (opt.overcommit) + job->ctx_params.cpu_count = job->ctx_params.min_nodes; + else if (opt.cpus_set) + job->ctx_params.cpu_count = opt.ntasks * opt.cpus_per_task; + else + job->ctx_params.cpu_count = opt.ntasks; + + job->ctx_params.relative = (uint16_t)opt.relative; + job->ctx_params.ckpt_interval = (uint16_t)opt.ckpt_interval; + job->ctx_params.ckpt_dir = opt.ckpt_dir; + job->ctx_params.exclusive = (uint16_t)opt.exclusive; + if (opt.immediate == 1) + job->ctx_params.immediate = (uint16_t)opt.immediate; + if (opt.time_limit != NO_VAL) + job->ctx_params.time_limit = (uint32_t)opt.time_limit; + job->ctx_params.verbose_level = (uint16_t)_verbose; + if (opt.resv_port_cnt != NO_VAL) + job->ctx_params.resv_port_cnt = (uint16_t) opt.resv_port_cnt; + + switch (opt.distribution) { + case SLURM_DIST_BLOCK: + case SLURM_DIST_ARBITRARY: + case SLURM_DIST_CYCLIC: + case SLURM_DIST_CYCLIC_CYCLIC: + case SLURM_DIST_CYCLIC_BLOCK: + case SLURM_DIST_BLOCK_CYCLIC: + case SLURM_DIST_BLOCK_BLOCK: + job->ctx_params.task_dist = opt.distribution; + break; + case SLURM_DIST_PLANE: + job->ctx_params.task_dist = SLURM_DIST_PLANE; + job->ctx_params.plane_size = opt.plane_size; + break; + default: + job->ctx_params.task_dist = (job->ctx_params.task_count <= + job->ctx_params.min_nodes) + ? SLURM_DIST_CYCLIC : SLURM_DIST_BLOCK; + opt.distribution = job->ctx_params.task_dist; + break; + + } + job->ctx_params.overcommit = opt.overcommit ? 1 : 0; + + job->ctx_params.node_list = opt.nodelist; + + job->ctx_params.network = opt.network; + job->ctx_params.no_kill = opt.no_kill; + if (opt.job_name_set_cmd && opt.job_name) + job->ctx_params.name = opt.job_name; + else + job->ctx_params.name = opt.cmd_name; + job->ctx_params.features = opt.constraints; + + debug("requesting job %u, user %u, nodes %u including (%s)", + job->ctx_params.job_id, job->ctx_params.uid, + job->ctx_params.min_nodes, job->ctx_params.node_list); + debug("cpus %u, tasks %u, name %s, relative %u", + job->ctx_params.cpu_count, job->ctx_params.task_count, + job->ctx_params.name, job->ctx_params.relative); + begin_time = time(NULL); + + for (i=0; (!(*destroy_job)); i++) { + if (opt.no_alloc) { + job->step_ctx = slurm_step_ctx_create_no_alloc( + &job->ctx_params, job->stepid); + } else + job->step_ctx = slurm_step_ctx_create( + &job->ctx_params); + if (job->step_ctx != NULL) { + if (i > 0) + info("Job step created"); + + break; + } + rc = slurm_get_errno(); + + if (((opt.immediate != 0) && + ((opt.immediate == 1) || + (difftime(time(NULL), begin_time) > opt.immediate))) || + ((rc != ESLURM_NODES_BUSY) && (rc != ESLURM_PORTS_BUSY) && + (rc != ESLURM_PROLOG_RUNNING) && + (rc != SLURM_PROTOCOL_SOCKET_IMPL_TIMEOUT) && + (rc != ESLURM_DISABLED))) { + error ("Unable to create job step: %m"); + return SLURM_ERROR; + } + + if (i == 0) { + if (rc == ESLURM_PROLOG_RUNNING) { + verbose("Resources allocated for job %u and " + "being configured, please wait", + job->ctx_params.job_id); + } else { + info("Job step creation temporarily disabled, " + "retrying"); + } + xsignal_unblock(sig_array); + for (i = 0; sig_array[i]; i++) + xsignal(sig_array[i], signal_function); + + my_sleep = (getpid() % 1000) * 100 + 100000; + } else { + verbose("Job step creation still disabled, retrying"); + my_sleep = MIN((my_sleep * 2), 29000000); + } + /* sleep 0.1 to 29 secs with exponential back-off */ + usleep(my_sleep); + if (*destroy_job) { + /* cancelled by signal */ + break; + } + } + if (i > 0) { + xsignal_block(sig_array); + if (*destroy_job) { + info("Cancelled pending job step"); + return SLURM_ERROR; + } + } + + slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_STEPID, &job->stepid); + /* Number of hosts in job may not have been initialized yet if + * --jobid was used or only SLURM_JOB_ID was set in user env. + * Reset the value here just in case. + */ + slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_NUM_HOSTS, + &job->nhosts); + + /* + * Recreate filenames which may depend upon step id + */ + job_update_io_fnames(job); + + return SLURM_SUCCESS; +} + +extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job) +{ + if (launch_init() < 0) + return SLURM_ERROR; + + return (*(plugin_context->ops.create_job_step))(job, use_all_cpus, + signal_function, + destroy_job); +} + +extern int launch_g_step_launch(srun_job_t *job) +{ + if (launch_init() < 0) + return SLURM_ERROR; + + return (*(plugin_context->ops.step_launch))(job); +} diff --git a/src/srun/launch.h b/src/srun/launch.h index e69de29bb2..fa4fc5b921 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -0,0 +1,60 @@ +/*****************************************************************************\ + * launch.h - Define job launch plugin functions. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC + * Written by Danny Auble + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _LAUNCH_H +#define _LAUNCH_H + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif /* HAVE_CONFIG_H */ + +#include "slurm/slurm.h" +#include "slurm/slurm_errno.h" +#include "src/srun/srun_job.h" +#include "src/srun/opt.h" + +extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job); + +extern int launch_init(void); +extern int launch_fini(void); +extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job); +extern int launch_g_step_launch(srun_job_t *job); + +#endif /* _LAUNCH_H */ -- GitLab From 5b55f834d617dc0dd9d5289d1c578cf02ebf94eb Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 24 Apr 2012 16:52:22 -0700 Subject: [PATCH 161/614] Move sig_array to be global (it does add SIGALRM and SIGCONT to the sleep we have waiting for a step allocation.) --- src/srun/allocate.c | 4 ---- src/srun/launch.c | 4 ---- src/srun/opt.h | 1 + src/srun/srun.c | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/srun/allocate.c b/src/srun/allocate.c index 973dbefa55..cb7d8eb3f9 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -82,10 +82,6 @@ extern char **environ; static uint32_t pending_job_id = 0; -static int sig_array[] = { - SIGHUP, SIGINT, SIGQUIT, SIGPIPE, - SIGTERM, SIGUSR1, SIGUSR2, 0 }; - /* * Static Prototypes */ diff --git a/src/srun/launch.c b/src/srun/launch.c index 496ad5cf96..5a087d1e5c 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -43,10 +43,6 @@ #include "src/common/plugin.h" #include "src/common/plugrack.h" -static int sig_array[] = { - SIGHUP, SIGINT, SIGQUIT, SIGPIPE, - SIGTERM, SIGUSR1, SIGUSR2, 0 }; - typedef struct { int (*create_job_step) (srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), diff --git a/src/srun/opt.h b/src/srun/opt.h index 7080f70d6a..bd40c84681 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -232,6 +232,7 @@ extern opt_t opt; extern int error_exit; /* exit code for slurm errors */ extern int immediate_exit; /* exit code for --imediate option & busy */ +extern int sig_array[]; /* return whether any constraints were specified by the user * (if new constraints are added above, might want to add them to this diff --git a/src/srun/srun.c b/src/srun/srun.c index 254d87c4a5..20e735d51b 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -137,7 +137,7 @@ int retry_step_cnt = 0; bool srun_max_timer = false; bool srun_shutdown = false; -static int sig_array[] = { +int sig_array[] = { SIGINT, SIGQUIT, SIGCONT, SIGTERM, SIGHUP, SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 }; -- GitLab From ed53a7ee3aff45eec5ecd423c3798aeea328c318 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 24 Apr 2012 16:52:52 -0700 Subject: [PATCH 162/614] send task_state to launch plugin --- src/srun/launch.c | 8 ++++---- src/srun/launch.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/srun/launch.c b/src/srun/launch.c index 5a087d1e5c..0c222580fc 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -35,7 +35,7 @@ #include -#include "launch.h" +#include "src/srun/launch.h" #include "src/srun/debugger.h" #include "src/common/env.h" @@ -47,7 +47,7 @@ typedef struct { int (*create_job_step) (srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); - int (*step_launch) (srun_job_t *job); + int (*step_launch) (srun_job_t *job, task_state_t *task_state); } plugin_ops_t; typedef struct { @@ -422,10 +422,10 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, destroy_job); } -extern int launch_g_step_launch(srun_job_t *job) +extern int launch_g_step_launch(srun_job_t *job, task_state_t *task_state) { if (launch_init() < 0) return SLURM_ERROR; - return (*(plugin_context->ops.step_launch))(job); + return (*(plugin_context->ops.step_launch))(job, task_state); } diff --git a/src/srun/launch.h b/src/srun/launch.h index fa4fc5b921..43613ad542 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -45,6 +45,7 @@ #include "slurm/slurm_errno.h" #include "src/srun/srun_job.h" #include "src/srun/opt.h" +#include "src/srun/task_state.h" extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), @@ -55,6 +56,6 @@ extern int launch_fini(void); extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); -extern int launch_g_step_launch(srun_job_t *job); +extern int launch_g_step_launch(srun_job_t *job, task_state_t *task_state); #endif /* _LAUNCH_H */ -- GitLab From ba15df395ffc08e51d545609ccfd67df04cde484 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:16:04 -0700 Subject: [PATCH 163/614] move runjob interface to the launch plugin --- src/{srun => plugins/launch/runjob}/runjob_interface.cc | 0 src/{srun => plugins/launch/runjob}/runjob_interface.h | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename src/{srun => plugins/launch/runjob}/runjob_interface.cc (100%) rename src/{srun => plugins/launch/runjob}/runjob_interface.h (100%) diff --git a/src/srun/runjob_interface.cc b/src/plugins/launch/runjob/runjob_interface.cc similarity index 100% rename from src/srun/runjob_interface.cc rename to src/plugins/launch/runjob/runjob_interface.cc diff --git a/src/srun/runjob_interface.h b/src/plugins/launch/runjob/runjob_interface.h similarity index 100% rename from src/srun/runjob_interface.h rename to src/plugins/launch/runjob/runjob_interface.h -- GitLab From 51235a8f26d5963648e0f514cb6a453874074b5f Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:20:02 -0700 Subject: [PATCH 164/614] Added REAL_BGQ_LOADED --- Makefile.in | 1 + auxdir/Makefile.in | 1 + configure | 18 ++++++++++++++++++ configure.ac | 6 ++++++ contribs/Makefile.in | 1 + contribs/arrayrun/Makefile.in | 1 + contribs/cray/Makefile.in | 1 + contribs/lua/Makefile.in | 1 + contribs/pam/Makefile.in | 1 + contribs/perlapi/Makefile.in | 1 + contribs/perlapi/libslurm/Makefile.in | 1 + contribs/perlapi/libslurmdb/Makefile.in | 1 + contribs/phpext/Makefile.in | 1 + contribs/sjobexit/Makefile.in | 1 + contribs/slurmdb-direct/Makefile.in | 1 + contribs/torque/Makefile.in | 1 + doc/Makefile.in | 1 + doc/html/Makefile.in | 1 + doc/man/Makefile.in | 1 + doc/man/man1/Makefile.in | 1 + doc/man/man3/Makefile.in | 1 + doc/man/man5/Makefile.in | 1 + doc/man/man8/Makefile.in | 1 + src/Makefile.in | 1 + src/api/Makefile.in | 1 + src/common/Makefile.in | 1 + src/database/Makefile.in | 1 + src/db_api/Makefile.in | 1 + src/plugins/Makefile.in | 1 + src/plugins/accounting_storage/Makefile.in | 1 + .../accounting_storage/common/Makefile.in | 1 + .../accounting_storage/filetxt/Makefile.in | 1 + .../accounting_storage/mysql/Makefile.in | 1 + .../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/crypto/Makefile.in | 1 + src/plugins/crypto/munge/Makefile.in | 1 + src/plugins/crypto/openssl/Makefile.in | 1 + src/plugins/gres/Makefile.in | 1 + src/plugins/gres/gpu/Makefile.in | 1 + src/plugins/gres/nic/Makefile.in | 1 + src/plugins/job_submit/Makefile.in | 1 + src/plugins/job_submit/cnode/Makefile.in | 1 + src/plugins/job_submit/defaults/Makefile.in | 1 + src/plugins/job_submit/logging/Makefile.in | 1 + src/plugins/job_submit/lua/Makefile.in | 1 + src/plugins/job_submit/partition/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/launch/poe/Makefile.in | 1 + src/plugins/launch/runjob/Makefile.in | 1 + src/plugins/launch/slurm/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 + src/plugins/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/cgroup/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/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/wiki2/Makefile.in | 1 + src/plugins/select/Makefile.in | 1 + src/plugins/select/bluegene/Makefile.in | 1 + src/plugins/select/bluegene/ba/Makefile.in | 1 + src/plugins/select/bluegene/ba_bgq/Makefile.in | 1 + src/plugins/select/bluegene/bl/Makefile.in | 1 + src/plugins/select/bluegene/bl_bgq/Makefile.in | 1 + src/plugins/select/bluegene/sfree/Makefile.in | 1 + src/plugins/select/cons_res/Makefile.in | 1 + src/plugins/select/cray/Makefile.in | 1 + src/plugins/select/cray/libalps/Makefile.in | 1 + src/plugins/select/cray/libemulate/Makefile.in | 1 + src/plugins/select/linear/Makefile.in | 1 + src/plugins/switch/Makefile.in | 1 + src/plugins/switch/none/Makefile.in | 1 + src/plugins/switch/nrt/Makefile.in | 1 + src/plugins/switch/nrt/libpermapi/Makefile.in | 1 + src/plugins/task/Makefile.in | 1 + src/plugins/task/affinity/Makefile.in | 1 + src/plugins/task/cgroup/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/node_rank/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/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/slurmctld/Makefile.in | 1 + src/slurmd/Makefile.in | 1 + src/slurmd/common/Makefile.in | 1 + src/slurmd/slurmd/Makefile.in | 1 + src/slurmd/slurmstepd/Makefile.in | 1 + src/slurmdbd/Makefile.in | 1 + src/smap/Makefile.in | 1 + src/sprio/Makefile.in | 1 + src/squeue/Makefile.in | 1 + src/sreport/Makefile.in | 1 + 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/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 + 154 files changed, 176 insertions(+) diff --git a/Makefile.in b/Makefile.in index c7707f8382..553087ba18 100644 --- a/Makefile.in +++ b/Makefile.in @@ -278,6 +278,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 5356d78dcc..916bb130f2 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -192,6 +192,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/configure b/configure index d5367dafc1..fcc95dc9ef 100755 --- a/configure +++ b/configure @@ -755,6 +755,9 @@ CMD_LDFLAGS BLUEGENE_LOADED BLUEGENE_LOADED_FALSE BLUEGENE_LOADED_TRUE +REAL_BGQ_LOADED +REAL_BGQ_LOADED_FALSE +REAL_BGQ_LOADED_TRUE BGQ_LOADED BGQ_LOADED_FALSE BGQ_LOADED_TRUE @@ -5330,6 +5333,17 @@ fi + if test "x$ac_real_bluegene_loaded" = "xyes"; then + REAL_BGQ_LOADED_TRUE= + REAL_BGQ_LOADED_FALSE='#' +else + REAL_BGQ_LOADED_TRUE='#' + REAL_BGQ_LOADED_FALSE= +fi + + + + if test "x$ac_bluegene_loaded" = "xyes"; then BLUEGENE_LOADED_TRUE= BLUEGENE_LOADED_FALSE='#' @@ -22133,6 +22147,10 @@ if test -z "${BGQ_LOADED_TRUE}" && test -z "${BGQ_LOADED_FALSE}"; then as_fn_error $? "conditional \"BGQ_LOADED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${REAL_BGQ_LOADED_TRUE}" && test -z "${REAL_BGQ_LOADED_FALSE}"; then + as_fn_error $? "conditional \"REAL_BGQ_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 c66859cc1e..ed9b62b00a 100644 --- a/configure.ac +++ b/configure.ac @@ -51,6 +51,12 @@ dnl We need to know if this is a Q system AM_CONDITIONAL(BGQ_LOADED, test "x$ac_bgq_loaded" = "xyes") AC_SUBST(BGQ_LOADED) +dnl ok now check if We are on a real L or P system, (test if to build srun +dnl or not. If we are emulating things we should build it. +AM_CONDITIONAL(REAL_BGQ_LOADED, test "x$ac_real_bluegene_loaded" = "xyes") +AC_SUBST(REAL_BGQ_LOADED) + + dnl ok now check if any bluegene was loaded. 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 87c903494f..886c2d116a 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 0eaf45d0e9..86829cb37e 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index 1956d6238a..6357901f91 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -219,6 +219,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index a8feb06c6e..b18f036ac2 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 385784037e..b506e975cd 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -245,6 +245,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index 6ee27d50dc..e1995c72c1 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index 18878c3d2f..7135dc7edc 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index 2c9d622b64..4a746a4222 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index eabfbc185a..0edcd3564e 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index b4f5de24dd..0110df6633 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -218,6 +218,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index 5a7f9457f5..e6ecaff28f 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -218,6 +218,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index 2c0cef4cdf..18e8d07108 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -218,6 +218,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/Makefile.in b/doc/Makefile.in index 539dd3ef03..c94f98ed9d 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 3bf9fcaf69..c069269067 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -216,6 +216,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index 6d188094c9..5ee04d2f67 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index a94ec5fbcd..5d70023611 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -219,6 +219,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index 8ce629878c..28eb7629bc 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -216,6 +216,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index e484deab85..4593161ccd 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -219,6 +219,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index 6875a7edb2..d0d807e24c 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -219,6 +219,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/Makefile.in b/src/Makefile.in index eca6190150..9c7b02be53 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -236,6 +236,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 207f94523e..42876adfae 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -268,6 +268,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 50ad32a7ef..a5ac9468fc 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -313,6 +313,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/database/Makefile.in b/src/database/Makefile.in index 5a7b8c6c1c..fa39b37bb1 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -243,6 +243,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index 0d20a7ab98..60ac0035f6 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -253,6 +253,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index f266eec99c..d7c08626e0 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index b80cf1d679..74d1dc9a5f 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index f203cea7f6..759a582a1e 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -214,6 +214,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index ad3e1b97b6..57d5e90213 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -241,6 +241,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index 8159f3b018..cf2573c013 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -291,6 +291,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index 852d50fc2a..28fc4dbf24 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -240,6 +240,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 6cb9dd6c8f..88d7bd146d 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -286,6 +286,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index 3e95916d41..fce5965616 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -241,6 +241,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 4858c0cf91..e1fbe82429 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index 34fa1ed67d..897fe5e84f 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index 516b70defc..5296468fe0 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -240,6 +240,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index d7a7385c0b..a51c0dd857 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index 76951b4124..97d0d4a0e8 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index da459bbc38..eab99de62b 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -243,6 +243,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 0ccd076763..4950c64cbe 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -249,6 +249,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index 8992394b68..1da3be33fa 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index f915d9f102..d1b3960bfb 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index 483ccab883..70fb857080 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index c5e4942757..affe587273 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -240,6 +240,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index a8fcb1164c..6747b326ee 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -245,6 +245,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index 645dac0da1..a879f16651 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index 3bef6c68cb..91ed646c46 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index c8666446e4..b0847f61d7 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index a0f4e1028d..6f0965cdfa 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index cdaf4da783..4a16d01c8e 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index 274e85c931..bcda3b4573 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index 330343c378..1b53b0c2d2 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index e1594dbc82..d57f4c3578 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -243,6 +243,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 85071cc127..3a509bb26a 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index bff74cf1c0..86190fcebe 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index bdd6757a34..816dde3b23 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 7ffbd0920f..3cb7f2e179 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index 1fc8386a32..6fdc1d4e51 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index 3d3bd74355..337680c27f 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index b5e34e05ff..9f9564b61b 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index 577cc6d18f..3b9c1e4d3b 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -247,6 +247,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 677c3937ae..f7dfb60b58 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index acf9f1a409..9522ff5e3a 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -247,6 +247,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index 797ce531d6..c312f8c5ee 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/launch/poe/Makefile.in b/src/plugins/launch/poe/Makefile.in index 4b2a9f5da3..0c37dd8cd2 100644 --- a/src/plugins/launch/poe/Makefile.in +++ b/src/plugins/launch/poe/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/launch/runjob/Makefile.in b/src/plugins/launch/runjob/Makefile.in index 9316e38fad..7ebe9bf05d 100644 --- a/src/plugins/launch/runjob/Makefile.in +++ b/src/plugins/launch/runjob/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/launch/slurm/Makefile.in b/src/plugins/launch/slurm/Makefile.in index 2050ffb6f6..eb67ad09b4 100644 --- a/src/plugins/launch/slurm/Makefile.in +++ b/src/plugins/launch/slurm/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 9d105d0166..3d229d47bd 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index 2893fd96de..fc41f53c15 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 2502a9e42f..72045e95d5 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index 48092fdac7..fb6a82aef5 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index 6d32862cc2..17bebd7da4 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index d53825c530..bb37608437 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index 84679fb578..0599b41fac 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index 1bededfb48..2186321e32 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index 8a349c8460..ad67648e48 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index b5da19a9a7..3a61450e98 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index 8916c7a250..6ff0240425 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index d771dbf2f5..54337057c2 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -240,6 +240,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index f36e4dfa96..c79b3df05d 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index adc8185fb6..e4ff4ae177 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index 92773ce97e..7cd6062689 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index eafb839765..4db9bce791 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index ec48168a10..7d2c3dd62d 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 243e13aa02..868b297016 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index 71abfc691e..aeede7f88d 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 815bdcf054..e913b0fad5 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index 5c9286a7dc..9ae7cf9207 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index 914a94466c..1686b125c2 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index 1eb6efb289..d08a07a121 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index 1627fcba05..f63ddb279b 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index c12dfb9724..adce70b92d 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index 1ab9d45dd7..dfd44b4768 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index 1d12a690ac..62c1ef3151 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index 43bbaee9aa..ecba6fb051 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -240,6 +240,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index 32fc041f23..66b05fcf60 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -243,6 +243,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index 37ecffea2d..ed0755299b 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index d3a1230d8e..b00e5b55f0 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -400,6 +400,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index aad67e8ffd..21f550c953 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -226,6 +226,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index e55c6f277b..514bd6d431 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -236,6 +236,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index baa33c2812..3e1438eae7 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -217,6 +217,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index b95a076f0e..61f1b66463 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -226,6 +226,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index d79cd3a52f..8f40239e4d 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -218,6 +218,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index 31489182b3..61d95a4e45 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index 17a01701a4..f6eb8f190a 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -285,6 +285,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index 11697b6367..11899e730c 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -224,6 +224,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index c77b744468..e0a34d98ac 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -218,6 +218,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index 8e6d484ec9..17b135ba26 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index b5e8650612..bbbc54edb3 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index b6f92a5070..5c8316ecf1 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/switch/nrt/Makefile.in b/src/plugins/switch/nrt/Makefile.in index cfd5c35afa..928b38b4e3 100644 --- a/src/plugins/switch/nrt/Makefile.in +++ b/src/plugins/switch/nrt/Makefile.in @@ -283,6 +283,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index 0b0f1f6db3..26e8ecec72 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index edf1f5d3d8..de78159349 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index d11026f7f9..67cd8c4ba0 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -250,6 +250,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index b2389999c7..b26cc23e64 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -241,6 +241,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index 88a263e851..dc7d6f2d49 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index b79eef8e71..666066953a 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -239,6 +239,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index 4e5552082d..a7f9814357 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -233,6 +233,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index b084e1b2e3..79fb16e149 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 220dc6d847..73bda79005 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index c25deccdeb..2c09edae95 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index ab7f00941e..720d7cba0b 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index b2d3898667..eb5652da59 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -227,6 +227,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 4f3dcae54d..3b9169b82a 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -221,6 +221,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 3bb80faf12..8732a3e0af 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -220,6 +220,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 30f3180a7c..9c883fe3d2 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -220,6 +220,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 63ceadfb89..df792c0756 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 85279176e5..750060c799 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -221,6 +221,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 337eed40b5..691c576889 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -236,6 +236,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index e4e37071a6..a6e06b3d51 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -223,6 +223,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index b436f92927..26bd3958c2 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -230,6 +230,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index a3a0b905a6..ac8c3fd2d6 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index f82c2956e0..09125fe41f 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -214,6 +214,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index 6545ba0cc0..6026c1f933 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -223,6 +223,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index ce23559052..0aca6b8724 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -226,6 +226,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index e8fe2784e1..e3e8c1106a 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 3f81323901..742293b626 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -242,6 +242,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index 231adb3e1e..fa984abe2e 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index d0f822a6e8..03c578f42c 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -223,6 +223,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 738b0f3923..eef01f872e 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index 7f31d1b3f2..2c24e73126 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -220,6 +220,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index ce8ca828c6..b568c0021f 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -220,6 +220,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 64037ce34c..2360600fd3 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -219,6 +219,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 381afe0ba9..8dcd384082 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -222,6 +222,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index ee5ad0cca1..c80e74cb15 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -246,6 +246,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 2b5414abf7..774d737741 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -238,6 +238,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 158722611c..bf1d7821b5 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -191,6 +191,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index 8305cb6998..bdb9aeac5e 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -231,6 +231,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index 55bc8acb8c..6beb7db812 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -254,6 +254,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 5debc8ce1c..4e3a8d1da9 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -246,6 +246,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index b3f045692d..91e51c13ba 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -224,6 +224,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ -- GitLab From 3c11117eff6af8f9b67c9caee4f1c414190f06d0 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:20:39 -0700 Subject: [PATCH 165/614] mv task_state.* from srun to the launch/slurm plugin --- src/{srun => plugins/launch/slurm}/task_state.c | 2 +- src/{srun => plugins/launch/slurm}/task_state.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename src/{srun => plugins/launch/slurm}/task_state.c (99%) rename src/{srun => plugins/launch/slurm}/task_state.h (100%) diff --git a/src/srun/task_state.c b/src/plugins/launch/slurm/task_state.c similarity index 99% rename from src/srun/task_state.c rename to src/plugins/launch/slurm/task_state.c index e3f7fca0ee..5748427fda 100644 --- a/src/srun/task_state.c +++ b/src/plugins/launch/slurm/task_state.c @@ -47,7 +47,7 @@ #include "src/common/bitstring.h" #include "src/common/xassert.h" -#include "src/srun/task_state.h" +#include "src/plugins/launch/slurm/task_state.h" struct task_state_struct { int n_tasks; diff --git a/src/srun/task_state.h b/src/plugins/launch/slurm/task_state.h similarity index 100% rename from src/srun/task_state.h rename to src/plugins/launch/slurm/task_state.h -- GitLab From 79a4306beacc2e9aa2fccab4d9aeae3b98b9ce71 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:22:04 -0700 Subject: [PATCH 166/614] remove task_state from the mix of plugins that don't need it any more --- src/plugins/switch/nrt/libpermapi/Makefile.am | 3 +- src/plugins/switch/nrt/libpermapi/Makefile.in | 13 +-- src/srun/Makefile.am | 6 +- src/srun/Makefile.in | 81 +++++++------------ 4 files changed, 34 insertions(+), 69 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am index f313f46b39..c38fcd0a83 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.am +++ b/src/plugins/switch/nrt/libpermapi/Makefile.am @@ -25,8 +25,7 @@ libpermapi_la_SOURCES = shr_64.c \ $(srun_dir)/debugger.c \ $(srun_dir)/fname.c \ $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c \ - $(srun_dir)/task_state.c + $(srun_dir)/multi_prog.c libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ $(convenience_libs) diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index 26e8ecec72..f521590344 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -107,7 +107,7 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) libpermapi_la_LIBADD = am_libpermapi_la_OBJECTS = shr_64.lo opt.lo srun_job.lo srun_pty.lo \ - debugger.lo fname.lo allocate.lo multi_prog.lo task_state.lo + debugger.lo fname.lo allocate.lo multi_prog.lo libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -348,8 +348,7 @@ libpermapi_la_SOURCES = shr_64.c \ $(srun_dir)/debugger.c \ $(srun_dir)/fname.c \ $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c \ - $(srun_dir)/task_state.c + $(srun_dir)/multi_prog.c libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ $(convenience_libs) @@ -436,7 +435,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_pty.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task_state.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -508,13 +506,6 @@ multi_prog.lo: $(srun_dir)/multi_prog.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c -task_state.lo: $(srun_dir)/task_state.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT task_state.lo -MD -MP -MF $(DEPDIR)/task_state.Tpo -c -o task_state.lo `test -f '$(srun_dir)/task_state.c' || echo '$(srcdir)/'`$(srun_dir)/task_state.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/task_state.Tpo $(DEPDIR)/task_state.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/task_state.c' object='task_state.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o task_state.lo `test -f '$(srun_dir)/task_state.c' || echo '$(srcdir)/'`$(srun_dir)/task_state.c - mostlyclean-libtool: -rm -f *.lo diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 5546f72000..afad426c28 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* -INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) +INCLUDES = -I$(top_srcdir) bin_PROGRAMS = srun @@ -20,7 +20,6 @@ srun_SOURCES = \ allocate.h \ launch.c launch.h \ multi_prog.c multi_prog.h \ - task_state.c task_state.h \ srun.wrapper.c @@ -35,7 +34,8 @@ srun_LDADD = \ srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) if BGQ_LOADED -srun_SOURCES += runjob_interface.cc +# because totalview needs the libraries on load we link in srun +# and not in the launch plugin. srun_LDFLAGS += $(RUNJOB_LDFLAGS) endif diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 195b12e047..6f8e21a4df 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -38,8 +38,10 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = srun$(EXEEXT) -@BGQ_LOADED_TRUE@am__append_1 = runjob_interface.cc -@BGQ_LOADED_TRUE@am__append_2 = $(RUNJOB_LDFLAGS) + +# because totalview needs the libraries on load we link in srun +# and not in the launch plugin. +@BGQ_LOADED_TRUE@am__append_1 = $(RUNJOB_LDFLAGS) subdir = src/srun DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -87,22 +89,16 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__srun_SOURCES_DIST = srun.c srun.h opt.c opt.h srun_job.c \ - srun_job.h srun_pty.c srun_pty.h debugger.h debugger.c fname.c \ - fname.h allocate.c allocate.h launch.c launch.h multi_prog.c \ - multi_prog.h task_state.c task_state.h srun.wrapper.c \ - runjob_interface.cc -@BGQ_LOADED_TRUE@am__objects_1 = runjob_interface.$(OBJEXT) am_srun_OBJECTS = srun.$(OBJEXT) opt.$(OBJEXT) srun_job.$(OBJEXT) \ srun_pty.$(OBJEXT) debugger.$(OBJEXT) fname.$(OBJEXT) \ allocate.$(OBJEXT) launch.$(OBJEXT) multi_prog.$(OBJEXT) \ - task_state.$(OBJEXT) srun.wrapper.$(OBJEXT) $(am__objects_1) + srun.wrapper.$(OBJEXT) srun_OBJECTS = $(am_srun_OBJECTS) am__DEPENDENCIES_1 = $(top_builddir)/src/api/libslurm.o srun_DEPENDENCIES = $(am__DEPENDENCIES_1) -srun_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \ - $(srun_LDFLAGS) $(LDFLAGS) -o $@ +srun_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(srun_LDFLAGS) \ + $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp am__depfiles_maybe = depfiles @@ -116,17 +112,8 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ SOURCES = $(srun_SOURCES) -DIST_SOURCES = $(am__srun_SOURCES_DIST) +DIST_SOURCES = $(srun_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -239,6 +226,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ @@ -331,12 +319,22 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* -INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) -srun_SOURCES = srun.c srun.h opt.c opt.h srun_job.c srun_job.h \ - srun_pty.c srun_pty.h debugger.h debugger.c fname.c fname.h \ - allocate.c allocate.h launch.c launch.h multi_prog.c \ - multi_prog.h task_state.c task_state.h srun.wrapper.c \ - $(am__append_1) +INCLUDES = -I$(top_srcdir) +srun_SOURCES = \ + srun.c srun.h \ + opt.c opt.h \ + srun_job.c srun_job.h \ + srun_pty.c srun_pty.h \ + debugger.h \ + debugger.c \ + fname.c \ + fname.h \ + allocate.c \ + allocate.h \ + launch.c launch.h \ + multi_prog.c multi_prog.h \ + srun.wrapper.c + # pthread is needed for compiling with g++ (which is used for linking # no matter if on a BGQ or not because of mentioning a .cc file @@ -346,11 +344,11 @@ convenience_libs = \ srun_LDADD = \ $(convenience_libs) -srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(am__append_2) +srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(am__append_1) all: all-am .SUFFIXES: -.SUFFIXES: .c .cc .lo .o .obj +.SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -440,12 +438,10 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runjob_interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun.wrapper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_pty.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task_state.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -468,27 +464,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -.cc.o: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cc.obj: -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cc.lo: -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - mostlyclean-libtool: -rm -f *.lo -- GitLab From dbc73008b0f375814f6734f88fbb8694114b1135 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:27:13 -0700 Subject: [PATCH 167/614] Add launch_type to slurm_ctl_conf_t. FIXME: This has not been pack/unpacked and needed to be done when committed to the trunk. --- slurm/slurm.h.in | 1 + src/common/read_config.c | 4 ++++ src/common/read_config.h | 7 +++++++ src/common/slurm_protocol_api.c | 19 +++++++++++++++++++ src/common/slurm_protocol_api.h | 6 ++++++ 5 files changed, 37 insertions(+) diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 5cc47a0cc9..aa1602c3f2 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1851,6 +1851,7 @@ typedef struct slurm_ctl_conf { * the processes is aborted or crashed */ uint16_t kill_wait; /* seconds between SIGXCPU to SIGKILL * on job termination */ + char *launch_type; /* type of step launcher to use */ char *licenses; /* licenses available on this cluster */ char *mail_prog; /* pathname of mail program */ uint32_t max_job_cnt; /* maximum number of active jobs */ diff --git a/src/common/read_config.c b/src/common/read_config.c index 49e1ae791d..dd6b999591 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -204,6 +204,7 @@ s_p_options_t slurm_conf_options[] = { {"JobSubmitPlugins", S_P_STRING}, {"KillOnBadExit", S_P_UINT16}, {"KillWait", S_P_UINT16}, + {"LaunchType", S_P_STRING}, {"Licenses", S_P_STRING}, {"MailProg", S_P_STRING}, {"MaxJobCount", S_P_UINT32}, @@ -2564,6 +2565,9 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_uint16(&conf->kill_wait, "KillWait", hashtbl)) conf->kill_wait = DEFAULT_KILL_WAIT; + if (!s_p_get_string(&conf->select_type, "LaunchType", hashtbl)) + conf->launch_type = xstrdup(DEFAULT_LAUNCH_TYPE); + s_p_get_string(&conf->licenses, "Licenses", hashtbl); if (!s_p_get_string(&conf->mail_prog, "MailProg", hashtbl)) diff --git a/src/common/read_config.h b/src/common/read_config.h index 1ff1994123..722ad3547b 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -85,6 +85,13 @@ extern char *default_plugstack; #define DEFAULT_KILL_ON_BAD_EXIT 0 #define DEFAULT_KILL_TREE 0 #define DEFAULT_KILL_WAIT 30 + +#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P +# define DEFAULT_LAUNCH_TYPE "launch/runjob" +#else +# define DEFAULT_LAUNCH_TYPE "launch/slurm" +#endif + #define DEFAULT_MAIL_PROG "/bin/mail" #define DEFAULT_MAX_JOB_COUNT 10000 #define DEFAULT_MAX_JOB_ID 0xffff0000 diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index d7c679d8cf..74724585fd 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -1504,6 +1504,25 @@ int slurm_set_jobcomp_port(uint32_t port) return 0; } +/* slurm_get_launch_type + * get launch_type from slurmctld_conf object + * RET char * - launch_type, MUST be xfreed by caller + */ +char *slurm_get_launch_type(void) +{ + char *launch_type = NULL; + slurm_ctl_conf_t *conf; + + if (slurmdbd_conf) { + } else { + conf = slurm_conf_lock(); + launch_type = xstrdup(conf->launch_type); + slurm_conf_unlock(); + } + return launch_type; +} + + /* slurm_get_preempt_type * get PreemptType from slurmctld_conf object * RET char * - preempt type, MUST be xfreed by caller diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h index 55d9b96130..9068c09bdd 100644 --- a/src/common/slurm_protocol_api.h +++ b/src/common/slurm_protocol_api.h @@ -443,6 +443,12 @@ uint32_t slurm_get_accounting_storage_port(void); */ int slurm_set_accounting_storage_port(uint32_t storage_port); +/* slurm_get_launch_type + * get launch_type from slurmctld_conf object + * RET char * - launch_type, MUST be xfreed by caller + */ +char *slurm_get_launch_type(void); + /* slurm_get_preempt_mode * returns the PreemptMode value from slurmctld_conf object * RET uint16_t - PreemptMode value (See PREEMPT_MODE_* in slurm.h) -- GitLab From 8451b550b2c12707796bafe1ab395b326a6bcef6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:29:16 -0700 Subject: [PATCH 168/614] Fill out launch plugins. Really just moving code from out of srun to the plugin. Tested on BGQ and regular slurm clusters. --- src/plugins/launch/Makefile.am | 9 +- src/plugins/launch/Makefile.in | 7 +- src/plugins/launch/runjob/Makefile.am | 8 +- src/plugins/launch/runjob/Makefile.in | 53 ++- src/plugins/launch/slurm/Makefile.am | 2 +- src/plugins/launch/slurm/Makefile.in | 5 +- src/plugins/launch/slurm/launch_slurm.c | 519 ++++++++++++++++++++ src/srun/launch.c | 92 +++- src/srun/launch.h | 20 +- src/srun/opt.c | 138 +----- src/srun/srun.c | 602 +----------------------- 11 files changed, 708 insertions(+), 747 deletions(-) diff --git a/src/plugins/launch/Makefile.am b/src/plugins/launch/Makefile.am index e694aefbe5..ed0713adee 100644 --- a/src/plugins/launch/Makefile.am +++ b/src/plugins/launch/Makefile.am @@ -1,3 +1,10 @@ # Makefile for launch plugins -SUBDIRS = poe runjob slurm +if REAL_BGQ_LOADED +SUBDIRS = runjob +else +SUBDIRS = slurm +if HAVE_NRT +SUBDIRS += poe +endif +endif diff --git a/src/plugins/launch/Makefile.in b/src/plugins/launch/Makefile.in index 85db6d4efd..02b5b3b13c 100644 --- a/src/plugins/launch/Makefile.in +++ b/src/plugins/launch/Makefile.in @@ -36,6 +36,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@HAVE_NRT_TRUE@@REAL_BGQ_LOADED_FALSE@am__append_1 = poe subdir = src/plugins/launch DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -97,7 +98,7 @@ AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ distdir ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = slurm poe runjob DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -233,6 +234,7 @@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ RELEASE = @RELEASE@ RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ @@ -323,7 +325,8 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = poe runjob slurm +@REAL_BGQ_LOADED_FALSE@SUBDIRS = slurm $(am__append_1) +@REAL_BGQ_LOADED_TRUE@SUBDIRS = runjob $(am__append_1) all: all-recursive .SUFFIXES: diff --git a/src/plugins/launch/runjob/Makefile.am b/src/plugins/launch/runjob/Makefile.am index 097ab4c524..43edff4664 100644 --- a/src/plugins/launch/runjob/Makefile.am +++ b/src/plugins/launch/runjob/Makefile.am @@ -4,10 +4,16 @@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) pkglib_LTLIBRARIES = launch_runjob.la launch_runjob_la_SOURCES = launch_runjob.c +if BGQ_LOADED +launch_runjob_la_SOURCES += runjob_interface.cc +# because totalview needs the libraries on load we link in srun and not here. +#launch_runjob_la_LDFLAGS += $(RUNJOB_LDFLAGS) +endif + launch_runjob_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/launch/runjob/Makefile.in b/src/plugins/launch/runjob/Makefile.in index 7ebe9bf05d..6f994160f5 100644 --- a/src/plugins/launch/runjob/Makefile.in +++ b/src/plugins/launch/runjob/Makefile.in @@ -37,6 +37,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ +@BGQ_LOADED_TRUE@am__append_1 = runjob_interface.cc subdir = src/plugins/launch/runjob DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -106,11 +107,14 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) launch_runjob_la_LIBADD = -am_launch_runjob_la_OBJECTS = launch_runjob.lo +am__launch_runjob_la_SOURCES_DIST = launch_runjob.c \ + runjob_interface.cc +@BGQ_LOADED_TRUE@am__objects_1 = runjob_interface.lo +am_launch_runjob_la_OBJECTS = launch_runjob.lo $(am__objects_1) launch_runjob_la_OBJECTS = $(am_launch_runjob_la_OBJECTS) -launch_runjob_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(launch_runjob_la_LDFLAGS) $(LDFLAGS) -o $@ +launch_runjob_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ + $(CXXFLAGS) $(launch_runjob_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp am__depfiles_maybe = depfiles @@ -124,8 +128,17 @@ CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ +CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) +CXXLD = $(CXX) +CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ SOURCES = $(launch_runjob_la_SOURCES) -DIST_SOURCES = $(launch_runjob_la_SOURCES) +DIST_SOURCES = $(am__launch_runjob_la_SOURCES_DIST) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -331,14 +344,16 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) pkglib_LTLIBRARIES = launch_runjob.la -launch_runjob_la_SOURCES = launch_runjob.c +launch_runjob_la_SOURCES = launch_runjob.c $(am__append_1) +# because totalview needs the libraries on load we link in srun and not here. +#launch_runjob_la_LDFLAGS += $(RUNJOB_LDFLAGS) launch_runjob_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -410,6 +425,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch_runjob.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runjob_interface.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -432,6 +448,27 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +.cc.o: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< + +.cc.obj: +@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +.cc.lo: +@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< + mostlyclean-libtool: -rm -f *.lo diff --git a/src/plugins/launch/slurm/Makefile.am b/src/plugins/launch/slurm/Makefile.am index 919fa617b1..80b3e9b715 100644 --- a/src/plugins/launch/slurm/Makefile.am +++ b/src/plugins/launch/slurm/Makefile.am @@ -8,6 +8,6 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common pkglib_LTLIBRARIES = launch_slurm.la -launch_slurm_la_SOURCES = launch_slurm.c +launch_slurm_la_SOURCES = launch_slurm.c task_state.c launch_slurm_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) diff --git a/src/plugins/launch/slurm/Makefile.in b/src/plugins/launch/slurm/Makefile.in index eb67ad09b4..e8c767ed34 100644 --- a/src/plugins/launch/slurm/Makefile.in +++ b/src/plugins/launch/slurm/Makefile.in @@ -106,7 +106,7 @@ am__base_list = \ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) launch_slurm_la_LIBADD = -am_launch_slurm_la_OBJECTS = launch_slurm.lo +am_launch_slurm_la_OBJECTS = launch_slurm.lo task_state.lo launch_slurm_la_OBJECTS = $(am_launch_slurm_la_OBJECTS) launch_slurm_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -333,7 +333,7 @@ AUTOMAKE_OPTIONS = foreign PLUGIN_FLAGS = -module -avoid-version --export-dynamic INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common pkglib_LTLIBRARIES = launch_slurm.la -launch_slurm_la_SOURCES = launch_slurm.c +launch_slurm_la_SOURCES = launch_slurm.c task_state.c launch_slurm_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) all: all-am @@ -410,6 +410,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch_slurm.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/task_state.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index e69de29bb2..9e65fc2025 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -0,0 +1,519 @@ +/*****************************************************************************\ + * launch_slurm.c - Define job launch using slurm. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC + * Written by Danny Auble + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#define _GNU_SOURCE + +#include +#include + +#include "src/srun/launch.h" + +#include "src/plugins/launch/slurm/task_state.h" + +#ifndef OPEN_MPI_PORT_ERROR +/* This exit code indicates the launched Open MPI tasks could + * not open the reserved port. It was already open by some + * other process. */ +#define OPEN_MPI_PORT_ERROR 108 +#endif + +#define MAX_STEP_RETRIES 4 + +/* + * These variables are required by the generic plugin interface. If they + * are not found in the plugin, the plugin loader will ignore it. + * + * plugin_name - a string giving a human-readable description of the + * plugin. There is no maximum length, but the symbol must refer to + * a valid string. + * + * plugin_type - a string suggesting the type of the plugin or its + * applicability to a particular form of data or method of data handling. + * If the low-level plugin API is used, the contents of this string are + * unimportant and may be anything. SLURM uses the higher-level plugin + * interface which requires this string to be of the form + * + * / + * + * where is a description of the intended application of + * the plugin (e.g., "task" for task control) and is a description + * of how this plugin satisfies that application. SLURM will only load + * a task plugin if the plugin_type string has a prefix of "task/". + * + * plugin_version - an unsigned 32-bit integer giving the version number + * of the plugin. If major and minor revisions are desired, the major + * version number may be multiplied by a suitable magnitude constant such + * as 100 or 1000. Various SLURM versions will likely require a certain + * minimum version for their plugins as this API matures. + */ +const char plugin_name[] = "launch SLURM plugin"; +const char plugin_type[] = "launch/slurm"; +const uint32_t plugin_version = 101; + +static srun_job_t *local_srun_job = NULL; +static uint32_t *local_global_rc = NULL; + +static task_state_t task_state; +static bool srun_max_timer = false; +static time_t launch_start_time; +static bool retry_step_begin = false; +static int retry_step_cnt = 0; + +extern int launch_p_step_terminate(); + +static char *_hostset_to_string(hostset_t hs) +{ + size_t n = 1024; + size_t maxsize = 1024*64; + char *str = NULL; + + do { + str = xrealloc(str, n); + } while (hostset_ranged_string(hs, n*=2, str) < 0 && (n < maxsize)); + + /* + * If string was truncated, indicate this with a '+' suffix. + */ + if (n >= maxsize) + strcpy(str + (maxsize - 2), "+"); + + return str; +} + +/* Convert an array of task IDs into a list of host names + * RET: the string, caller must xfree() this value */ +static char *_task_ids_to_host_list(int ntasks, uint32_t taskids[]) +{ + int i; + hostset_t hs; + char *hosts; + slurm_step_layout_t *sl; + + if ((sl = launch_common_get_slurm_step_layout(local_srun_job)) == NULL) + return (xstrdup("Unknown")); + + hs = hostset_create(NULL); + for (i = 0; i < ntasks; i++) { + char *host = slurm_step_layout_host_name(sl, taskids[i]); + if (host) { + hostset_insert(hs, host); + free(host); + } else { + error("Could not identify host name for task %u", + taskids[i]); + } + } + + hosts = _hostset_to_string(hs); + hostset_destroy(hs); + + return (hosts); +} + +/* Convert an array of task IDs into a string. + * RET: the string, caller must xfree() this value + * NOTE: the taskids array is not necessarily in numeric order, + * so we use existing bitmap functions to format */ +static char *_task_array_to_string(int ntasks, uint32_t taskids[]) +{ + bitstr_t *tasks_bitmap = NULL; + char *str; + int i; + + tasks_bitmap = bit_alloc(local_srun_job->ntasks); + if (!tasks_bitmap) { + error("bit_alloc: memory allocation failure"); + exit(error_exit); + } + for (i=0; i slurm_get_msg_timeout()) + return 0; + return 1; +} + +static void +_handle_openmpi_port_error(const char *tasks, const char *hosts, + slurm_step_ctx_t *step_ctx) +{ + uint32_t job_id, step_id; + char *msg = "retrying"; + + if (!retry_step_begin) { + retry_step_begin = true; + retry_step_cnt++; + } + + if (retry_step_cnt >= MAX_STEP_RETRIES) + msg = "aborting"; + error("%s: tasks %s unable to claim reserved port, %s.", + hosts, tasks, msg); + + slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_JOBID, &job_id); + slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_STEPID, &step_id); + info("Terminating job step %u.%u", job_id, step_id); + slurm_kill_job_step(job_id, step_id, SIGKILL); +} + +static void _task_start(launch_tasks_response_msg_t *msg) +{ + MPIR_PROCDESC *table; + int taskid; + int i; + + if (msg->count_of_pids) + verbose("Node %s, %d tasks started", + msg->node_name, msg->count_of_pids); + else + /* This message should be displayed through the api, + hense it is a debug2 instead of an error. + */ + debug2("No tasks started on node %s: %s", + msg->node_name, slurm_strerror(msg->return_code)); + + + for (i = 0; i < msg->count_of_pids; i++) { + taskid = msg->task_ids[i]; + table = &MPIR_proctable[taskid]; + table->host_name = xstrdup(msg->node_name); + /* table->executable_name is set elsewhere */ + table->pid = msg->local_pids[i]; + + if (msg->return_code == 0) { + task_state_update(task_state, + taskid, TS_START_SUCCESS); + } else { + task_state_update(task_state, + taskid, TS_START_FAILURE); + } + } + +} + +static void _task_finish(task_exit_msg_t *msg) +{ + char *tasks; + char *hosts; + uint32_t rc = 0; + int normal_exit = 0; + + const char *task_str = _taskstr(msg->num_tasks); + + verbose("Received task exit notification for %d %s (status=0x%04x).", + msg->num_tasks, task_str, msg->return_code); + + tasks = _task_array_to_string(msg->num_tasks, msg->task_id_list); + hosts = _task_ids_to_host_list(msg->num_tasks, msg->task_id_list); + + if (WIFEXITED(msg->return_code)) { + if ((rc = WEXITSTATUS(msg->return_code)) == 0) { + verbose("%s: %s %s: Completed", hosts, task_str, tasks); + normal_exit = 1; + } + else if (_is_openmpi_port_error(rc)) { + _handle_openmpi_port_error(tasks, hosts, + local_srun_job->step_ctx); + } else { + error("%s: %s %s: Exited with exit code %d", + hosts, task_str, tasks, rc); + } + if (!WIFEXITED(*local_global_rc) + || (rc > WEXITSTATUS(*local_global_rc))) + *local_global_rc = msg->return_code; + } + else if (WIFSIGNALED(msg->return_code)) { + const char *signal_str = strsignal(TERMSIG(msg->return_code)); + char * core_str = ""; +#ifdef WCOREDUMP + if (WCOREDUMP(msg->return_code)) + core_str = " (core dumped)"; +#endif + if (local_srun_job->state >= SRUN_JOB_CANCELLED) { + verbose("%s: %s %s: %s%s", + hosts, task_str, tasks, signal_str, core_str); + } else { + rc = msg->return_code; + error("%s: %s %s: %s%s", + hosts, task_str, tasks, signal_str, core_str); + } + if (*local_global_rc == 0) + *local_global_rc = msg->return_code; + } + + xfree(tasks); + xfree(hosts); + + _update_task_exit_state(msg->num_tasks, msg->task_id_list, + !normal_exit); + + if (task_state_first_abnormal_exit(task_state) + && _kill_on_bad_exit()) + launch_p_step_terminate(); + + if (task_state_first_exit(task_state) && (opt.max_wait > 0)) + _setup_max_wait_timer(); +} + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init(void) +{ + verbose("%s loaded", plugin_name); + return SLURM_SUCCESS; +} + +/* + * fini() is called when the plugin is removed. Clear any allocated + * storage here. + */ +extern int fini(void) +{ + task_state_destroy(task_state); + + return SLURM_SUCCESS; +} + +extern int launch_p_setup_srun_opt(char **rest) +{ + if (opt.debugger_test && opt.parallel_debug) + MPIR_being_debugged = 1; + + opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); +} + +extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job) +{ + /* set the jobid for totalview */ + totalview_jobid = NULL; + xstrfmtcat(totalview_jobid, "%u", job->ctx_params.job_id); + + return launch_common_create_job_step(job, use_all_cpus, + signal_function, + destroy_job); +} + +extern int launch_p_step_launch( + srun_job_t *job, slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) +{ + slurm_step_launch_params_t launch_params; + slurm_step_launch_callbacks_t callbacks; + int rc = 0; + + local_srun_job = job; + local_global_rc = global_rc; + memcpy(&launch_params.local_fds, cio_fds, sizeof(slurm_step_io_fds_t)); + + task_state = task_state_create(opt.ntasks); + + slurm_step_launch_params_t_init(&launch_params); + launch_params.gid = opt.gid; + launch_params.alias_list = job->alias_list; + launch_params.argc = opt.argc; + launch_params.argv = opt.argv; + launch_params.multi_prog = opt.multi_prog ? true : false; + launch_params.cwd = opt.cwd; + launch_params.slurmd_debug = opt.slurmd_debug; + launch_params.buffered_stdio = !opt.unbuffered; + launch_params.labelio = opt.labelio ? true : false; + launch_params.remote_output_filename =fname_remote_string(job->ofname); + launch_params.remote_input_filename = fname_remote_string(job->ifname); + launch_params.remote_error_filename = fname_remote_string(job->efname); + launch_params.task_prolog = opt.task_prolog; + launch_params.task_epilog = opt.task_epilog; + launch_params.cpu_bind = opt.cpu_bind; + launch_params.cpu_bind_type = opt.cpu_bind_type; + launch_params.mem_bind = opt.mem_bind; + launch_params.mem_bind_type = opt.mem_bind_type; + launch_params.open_mode = opt.open_mode; + if (opt.acctg_freq >= 0) + launch_params.acctg_freq = opt.acctg_freq; + launch_params.pty = opt.pty; + if (opt.cpus_set) + launch_params.cpus_per_task = opt.cpus_per_task; + else + launch_params.cpus_per_task = 1; + launch_params.task_dist = opt.distribution; + launch_params.ckpt_dir = opt.ckpt_dir; + launch_params.restart_dir = opt.restart_dir; + launch_params.preserve_env = opt.preserve_env; + launch_params.spank_job_env = opt.spank_job_env; + launch_params.spank_job_env_size = opt.spank_job_env_size; + + if (MPIR_being_debugged) { + launch_params.parallel_debug = true; + pmi_server_max_threads(1); + } else { + launch_params.parallel_debug = false; + } + callbacks.task_start = _task_start; + callbacks.task_finish = _task_finish; + + mpir_init(job->ctx_params.task_count); + + update_job_state(job, SRUN_JOB_LAUNCHING); + launch_start_time = time(NULL); + if (slurm_step_launch(job->step_ctx, &launch_params, &callbacks) != + SLURM_SUCCESS) { + error("Application launch failed: %m"); + *local_global_rc = 1; + slurm_step_launch_wait_finish(job->step_ctx); + goto cleanup; + } + + update_job_state(job, SRUN_JOB_STARTING); + if (slurm_step_launch_wait_start(job->step_ctx) == SLURM_SUCCESS) { + update_job_state(job, SRUN_JOB_RUNNING); + /* Only set up MPIR structures if the step launched + * correctly. */ + if (opt.multi_prog) + mpir_set_multi_name(job->ctx_params.task_count, + launch_params.argv[0]); + else + mpir_set_executable_names(launch_params.argv[0]); + MPIR_debug_state = MPIR_DEBUG_SPAWNED; + if (opt.debugger_test) + mpir_dump_proctable(); + else + MPIR_Breakpoint(job); + } else { + info("Job step %u.%u aborted before step completely launched.", + job->jobid, job->stepid); + } + + slurm_step_launch_wait_finish(job->step_ctx); + if ((MPIR_being_debugged == 0) && retry_step_begin && + (retry_step_cnt < MAX_STEP_RETRIES)) { + retry_step_begin = false; + slurm_step_ctx_destroy(job->step_ctx); + if (got_alloc) { + if (create_job_step(job, true) < 0) + exit(error_exit); + } else { + if (create_job_step(job, false) < 0) + exit(error_exit); + } + task_state_destroy(task_state); + rc = -1; + } +cleanup: + + return rc; +} + +extern int launch_p_step_terminate(void) +{ + info("Terminating job step %u.%u", + local_srun_job->jobid, local_srun_job->stepid); + return slurm_kill_job_step(local_srun_job->jobid, + local_srun_job->stepid, SIGKILL); +} + + +extern void launch_p_print_status(void) +{ + task_state_print(task_state, (log_f)info); +} + +extern void launch_p_fwd_signal(int signal) +{ + switch (signal) { + case SIGKILL: + slurm_step_launch_abort(local_srun_job->step_ctx); + break; + default: + slurm_step_launch_fwd_signal(local_srun_job->step_ctx, signal); + break; + } +} diff --git a/src/srun/launch.c b/src/srun/launch.c index 0c222580fc..de047de6df 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -34,20 +34,28 @@ \*****************************************************************************/ #include +#include #include "src/srun/launch.h" -#include "src/srun/debugger.h" #include "src/common/env.h" #include "src/common/xstring.h" #include "src/common/plugin.h" #include "src/common/plugrack.h" +#include "src/common/xsignal.h" typedef struct { + int (*setup_srun_opt) (char **rest); int (*create_job_step) (srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); - int (*step_launch) (srun_job_t *job, task_state_t *task_state); + int (*step_launch) (srun_job_t *job, + slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, + bool *srun_shutdown); + int (*step_terminate) (void); + void (*print_status) (void); + void (*fwd_signal) (int signal); } plugin_ops_t; typedef struct { @@ -68,13 +76,18 @@ static pthread_mutex_t plugin_context_lock = static plugin_ops_t * _get_ops(plugin_context_t *c) { /* - * Must be synchronized with slurm_acct_storage_ops_t above. + * Must be synchronized with plugin_ops_t above. */ static const char *syms[] = { + "launch_p_setup_srun_opt", "launch_p_create_job_step", - "launch_p_step_launch" + "launch_p_step_launch", + "launch_p_step_terminate", + "launch_p_print_status", + "launch_p_fwd_signal" }; int n_syms = sizeof(syms) / sizeof(char *); + char *plugin_type = "launch"; /* Find the correct plugin. */ c->cur_plugin = plugin_load_and_link(c->type, n_syms, syms, @@ -100,7 +113,7 @@ static plugin_ops_t * _get_ops(plugin_context_t *c) error("cannot create plugin manager"); return NULL; } - plugrack_set_major_type(c->plugin_list, "launch"); + plugrack_set_major_type(c->plugin_list, plugin_type); plugrack_set_paranoia(c->plugin_list, PLUGRACK_PARANOIA_NONE, 0); @@ -111,14 +124,14 @@ static plugin_ops_t * _get_ops(plugin_context_t *c) c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->type); if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { - error("cannot find accounting_storage plugin for %s", c->type); + error("cannot find %s plugin for %s", plugin_type, c->type); return NULL; } /* Dereference the API. */ if (plugin_get_syms(c->cur_plugin, n_syms, syms, (void **) &c->ops) < n_syms ) { - error("incomplete acct_storage plugin detected"); + error("incomplete %s plugin detected", plugin_type); return NULL; } @@ -169,7 +182,7 @@ static int _context_destroy(plugin_context_t *c) } /* - * Initialize context for acct_storage plugin + * Initialize context for plugin */ extern int launch_init(void) { @@ -180,10 +193,10 @@ extern int launch_init(void) if (plugin_context) goto done; - type = slurm_get_accounting_storage_type(); + type = slurm_get_launch_type(); if (!(plugin_context = _context_create(type))) { - error("cannot create acct_storage context for %s", type); + error("cannot create launch context for %s", type); retval = SLURM_ERROR; goto done; } @@ -215,6 +228,19 @@ extern int location_fini(void) return rc; } +extern slurm_step_layout_t *launch_common_get_slurm_step_layout(srun_job_t *job) +{ + job_step_create_response_msg_t *resp; + + if (!job || !job->step_ctx) + return (NULL); + + slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); + if (!resp) + return (NULL); + return (resp->step_layout); +} + extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job) @@ -232,13 +258,6 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, job->ctx_params.job_id = job->jobid; job->ctx_params.uid = opt.uid; -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - /* On a Q and onward this we don't add this. */ -#else - /* set the jobid for totalview */ - totalview_jobid = NULL; - xstrfmtcat(totalview_jobid, "%u", job->ctx_params.job_id); -#endif /* Validate minimum and maximum node counts */ if (opt.min_nodes && opt.max_nodes && (opt.min_nodes > opt.max_nodes)) { @@ -410,6 +429,14 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, return SLURM_SUCCESS; } +extern int launch_g_setup_srun_opt(char **rest) +{ + if (launch_init() < 0) + return SLURM_ERROR; + + return (*(plugin_context->ops.setup_srun_opt))(rest); +} + extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job) @@ -422,10 +449,37 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, destroy_job); } -extern int launch_g_step_launch(srun_job_t *job, task_state_t *task_state) +extern int launch_g_step_launch( + srun_job_t *job, slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) +{ + if (launch_init() < 0) + return SLURM_ERROR; + + return (*(plugin_context->ops.step_launch))(job, cio_fds, global_rc, + got_alloc, srun_shutdown); +} + +extern int launch_g_step_terminate(void) { if (launch_init() < 0) return SLURM_ERROR; - return (*(plugin_context->ops.step_launch))(job, task_state); + return (*(plugin_context->ops.step_terminate))(); +} + +extern void launch_g_print_status(void) +{ + if (launch_init() < 0) + return; + + (*(plugin_context->ops.print_status))(); +} + +extern void launch_g_fwd_signal(int signal) +{ + if (launch_init() < 0) + return; + + (*(plugin_context->ops.fwd_signal))(signal); } diff --git a/src/srun/launch.h b/src/srun/launch.h index 43613ad542..45a2af0a00 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -43,9 +43,15 @@ #include "slurm/slurm.h" #include "slurm/slurm_errno.h" + +#include "src/common/xstring.h" + #include "src/srun/srun_job.h" #include "src/srun/opt.h" -#include "src/srun/task_state.h" +#include "src/srun/debugger.h" + +extern slurm_step_layout_t *launch_common_get_slurm_step_layout( + srun_job_t *job); extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), @@ -53,9 +59,19 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_init(void); extern int launch_fini(void); +extern int launch_p_setup_srun_opt(char **rest); + extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); -extern int launch_g_step_launch(srun_job_t *job, task_state_t *task_state); +extern int launch_g_step_launch( + srun_job_t *job, slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, bool *srun_shutdown); + +extern int launch_g_step_terminate(void); + +extern void launch_g_print_status(void); + +extern void launch_g_fwd_signal(int signal); #endif /* _LAUNCH_H */ diff --git a/src/srun/opt.c b/src/srun/opt.c index e2567004be..fefb0f7038 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1221,13 +1221,6 @@ static void set_options(const int argc, char **argv) /* make other parameters look like debugger * is really attached */ opt.parallel_debug = true; -#if defined HAVE_BG_FILES && !defined HAVE_BGL && !defined HAVE_BGP - /* Use symbols from the runjob.so library provided by - * IBM. Do NOT use debugger symbols local to the srun - * command */ -#else - MPIR_being_debugged = 1; -#endif opt.max_launch_time = 120; opt.max_threads = 1; pmi_server_max_threads(opt.max_threads); @@ -1391,13 +1384,6 @@ static void set_options(const int argc, char **argv) opt.ramdiskimage = xstrdup(optarg); break; case LONG_OPT_REBOOT: -#if defined HAVE_BG && !defined HAVE_BG_L_P - info("WARNING: If your job is smaller than the block " - "it is going to run on and other jobs are " - "running on it the --reboot option will not be " - "honored. If this is the case, contact your " - "admin to reboot the block for you."); -#endif opt.reboot = true; break; case LONG_OPT_GET_USER_ENV: @@ -1631,10 +1617,10 @@ static void _opt_args(int argc, char **argv) opt.argc++; } + /* Since this is needed on an emulated system don't put this code in + * the launch plugin. + */ #if defined HAVE_BG && !defined HAVE_BG_L_P - /* A bit of setup for IBM's runjob. runjob only has so many - options, so it isn't that bad. - */ int32_t node_cnt; if (opt.max_nodes) node_cnt = opt.max_nodes; @@ -1679,122 +1665,14 @@ static void _opt_args(int argc, char **argv) opt.ntasks_per_node = ntpn; } -#if defined HAVE_BG_FILES - if (!opt.test_only) { - /* Since we need the opt.argc to allocate the opt.argv array - * we need to do this before actually messing with - * things. All the extra options added to argv will be - * handled after the allocation. */ - - /* Default location of the actual command to be ran. We always - * have to add 3 options (calling prog, '--env-all' and ':') no - * matter what. */ - command_pos = 3; - - if (opt.ntasks_per_node != NO_VAL) - command_pos += 2; - if (opt.ntasks_set) - command_pos += 2; - if (opt.cwd_set) - command_pos += 2; - if (opt.labelio) - command_pos += 2; - if (_verbose) - command_pos += 2; - if (opt.runjob_opts) { - char *save_ptr = NULL, *tok; - char *tmp = xstrdup(opt.runjob_opts); - tok = strtok_r(tmp, " ", &save_ptr); - while (tok) { - command_pos++; - tok = strtok_r(NULL, " ", &save_ptr); - } - xfree(tmp); - } - - opt.argc += command_pos; - } -#endif - #endif - opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + launch_g_setup_srun_opt(rest); + /* Since this is needed on an emulated system don't put this code in + * the launch plugin. + */ #if defined HAVE_BG && !defined HAVE_BG_L_P -#if defined HAVE_BG_FILES - if (!opt.test_only) { - i = 0; - /* First arg has to be something when sending it to the - runjob api. This can be anything, srun seemed most - logical, but it doesn't matter. - */ - opt.argv[i++] = xstrdup("srun"); - /* srun launches tasks using runjob API. Slurmd is not used */ - if (opt.ntasks_per_node != NO_VAL) { - opt.argv[i++] = xstrdup("-p"); - opt.argv[i++] = xstrdup_printf("%d", - opt.ntasks_per_node); - } - - if (opt.ntasks_set) { - opt.argv[i++] = xstrdup("--np"); - opt.argv[i++] = xstrdup_printf("%d", opt.ntasks); - } - - if (opt.cwd_set) { - opt.argv[i++] = xstrdup("--cwd"); - opt.argv[i++] = xstrdup(opt.cwd); - } - - if (opt.labelio) { - opt.argv[i++] = xstrdup("--label"); - opt.argv[i++] = xstrdup("short"); - /* Since we are getting labels from runjob. and we - * don't want 2 sets (slurm's will always be 000) - * remove it case. */ - opt.labelio = 0; - } - - if (_verbose) { - opt.argv[i++] = xstrdup("--verbose"); - opt.argv[i++] = xstrdup_printf("%d", _verbose); - } - - if (opt.runjob_opts) { - char *save_ptr = NULL, *tok; - char *tmp = xstrdup(opt.runjob_opts); - tok = strtok_r(tmp, " ", &save_ptr); - while (tok) { - opt.argv[i++] = xstrdup(tok); - tok = strtok_r(NULL, " ", &save_ptr); - } - xfree(tmp); - } - - /* Export all the environment so the runjob_mux will get the - * correct info about the job, namely the block. */ - opt.argv[i++] = xstrdup("--env-all"); - - /* With runjob anything after a ':' is treated as the actual - * job, which in this case is exactly what it is. So, very - * sweet. */ - opt.argv[i++] = xstrdup(":"); - - /* Sanity check to make sure we set it up correctly. */ - if (i != command_pos) { - fatal ("command_pos is set to %d but we are going to " - "put it at %d, please update src/srun/opt.c", - command_pos, i); - } - - /* Set default job name to the executable name rather than - * "runjob" */ - if (!opt.job_name_set_cmd && (command_pos < opt.argc)) { - opt.job_name_set_cmd = true; - opt.job_name = xstrdup(rest[0]); - } - } -#endif if (opt.test_only && !opt.jobid_set && (opt.jobid != NO_VAL)) { /* Do not perform allocate test, only disable use of "runjob" */ opt.test_only = false; @@ -2488,7 +2366,7 @@ static void _opt_list(void) /* Determine if srun is under the control of a parallel debugger or not */ static bool _under_parallel_debugger (void) { -#if defined HAVE_BG_FILES && !defined HAVE_BGL && !defined HAVE_BGP +#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P /* Use symbols from the runjob.so library provided by IBM. * Do NOT use debugger symbols local to the srun command */ return false; diff --git a/src/srun/srun.c b/src/srun/srun.c index 20e735d51b..9377898200 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -88,6 +88,7 @@ #include "src/common/xsignal.h" #include "src/common/xstring.h" +#include "src/srun/launch.h" #include "src/srun/allocate.h" #include "src/srun/srun_job.h" #include "src/srun/opt.h" @@ -95,15 +96,10 @@ #include "src/srun/srun.h" #include "src/srun/srun_pty.h" #include "src/srun/multi_prog.h" -#include "src/srun/task_state.h" #include "src/api/pmi_server.h" #include "src/api/step_ctx.h" #include "src/api/step_launch.h" -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P -#include "src/srun/runjob_interface.h" -#endif - #if defined (HAVE_DECL_STRSIGNAL) && !HAVE_DECL_STRSIGNAL # ifndef strsignal extern char *strsignal(int); @@ -128,7 +124,6 @@ mpi_plugin_client_info_t mpi_job_info[1]; static struct termios termdefaults; uint32_t global_rc = 0; srun_job_t *job = NULL; -task_state_t task_state; #define MAX_STEP_RETRIES 4 time_t launch_start_time; @@ -170,13 +165,6 @@ static int _slurm_debug_env_val (void); static void *_srun_signal_mgr(void *no_data); static char *_uint16_array_to_str(int count, const uint16_t *array); static int _validate_relative(resource_allocation_response_msg_t *resp); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P -static void _send_step_complete_rpc(int step_rc); -static pthread_t _spawn_msg_handler(void); -#else -static void _task_start(launch_tasks_response_msg_t *msg); -static void _task_finish(task_exit_msg_t *msg); -#endif /* * from libvirt-0.6.2 GPL2 @@ -208,13 +196,7 @@ int srun(int ac, char **av) pthread_t signal_thread = (pthread_t) 0; bool got_alloc = false; int shepard_fd = -1; -#if !defined HAVE_BG_FILES || defined HAVE_BG_L_P - slurm_step_launch_params_t launch_params; - slurm_step_launch_callbacks_t callbacks; -#else slurm_step_io_fds_t cio_fds; - pthread_t msg_thread = (pthread_t) 0; -#endif env->stepid = -1; env->procid = -1; @@ -481,7 +463,8 @@ int srun(int ac, char **av) slurm_attr_destroy(&thread_attr); } -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P + /* re_launch: */ +relaunch: _run_srun_prolog(job); if (_call_spank_local_user (job) < 0) { error("Failure in local plugin stack"); @@ -489,122 +472,10 @@ int srun(int ac, char **av) } memset(&cio_fds, 0, sizeof(slurm_step_io_fds_t)); _set_stdio_fds(job, &cio_fds); - msg_thread = _spawn_msg_handler(); - global_rc = runjob_launch(opt.argc, opt.argv, - cio_fds.in.fd, - cio_fds.out.fd, - cio_fds.err.fd); - _send_step_complete_rpc(global_rc); - if (msg_thread) { - srun_shutdown = true; - pthread_cancel(msg_thread); - pthread_join(msg_thread, NULL); - } -#else - re_launch: - task_state = task_state_create(opt.ntasks); - slurm_step_launch_params_t_init(&launch_params); - launch_params.gid = opt.gid; - launch_params.alias_list = job->alias_list; - launch_params.argc = opt.argc; - launch_params.argv = opt.argv; - launch_params.multi_prog = opt.multi_prog ? true : false; - launch_params.cwd = opt.cwd; - launch_params.slurmd_debug = opt.slurmd_debug; - launch_params.buffered_stdio = !opt.unbuffered; - launch_params.labelio = opt.labelio ? true : false; - launch_params.remote_output_filename =fname_remote_string(job->ofname); - launch_params.remote_input_filename = fname_remote_string(job->ifname); - launch_params.remote_error_filename = fname_remote_string(job->efname); - launch_params.task_prolog = opt.task_prolog; - launch_params.task_epilog = opt.task_epilog; - launch_params.cpu_bind = opt.cpu_bind; - launch_params.cpu_bind_type = opt.cpu_bind_type; - launch_params.mem_bind = opt.mem_bind; - launch_params.mem_bind_type = opt.mem_bind_type; - launch_params.open_mode = opt.open_mode; - if (opt.acctg_freq >= 0) - launch_params.acctg_freq = opt.acctg_freq; - launch_params.pty = opt.pty; - if (opt.cpus_set) - launch_params.cpus_per_task = opt.cpus_per_task; - else - launch_params.cpus_per_task = 1; - launch_params.task_dist = opt.distribution; - launch_params.ckpt_dir = opt.ckpt_dir; - launch_params.restart_dir = opt.restart_dir; - launch_params.preserve_env = opt.preserve_env; - launch_params.spank_job_env = opt.spank_job_env; - launch_params.spank_job_env_size = opt.spank_job_env_size; - - _set_stdio_fds(job, &launch_params.local_fds); - - if (MPIR_being_debugged) { - launch_params.parallel_debug = true; - pmi_server_max_threads(1); - } else { - launch_params.parallel_debug = false; - } - callbacks.task_start = _task_start; - callbacks.task_finish = _task_finish; - - _run_srun_prolog(job); - - mpir_init(job->ctx_params.task_count); - if (_call_spank_local_user (job) < 0) { - error("Failure in local plugin stack"); - slurm_step_launch_abort(job->step_ctx); - exit(error_exit); - } - - update_job_state(job, SRUN_JOB_LAUNCHING); - launch_start_time = time(NULL); - if (slurm_step_launch(job->step_ctx, &launch_params, &callbacks) != - SLURM_SUCCESS) { - error("Application launch failed: %m"); - global_rc = 1; - slurm_step_launch_wait_finish(job->step_ctx); - goto cleanup; - } - - update_job_state(job, SRUN_JOB_STARTING); - if (slurm_step_launch_wait_start(job->step_ctx) == SLURM_SUCCESS) { - update_job_state(job, SRUN_JOB_RUNNING); - /* Only set up MPIR structures if the step launched - * correctly. */ - if (opt.multi_prog) - mpir_set_multi_name(job->ctx_params.task_count, - launch_params.argv[0]); - else - mpir_set_executable_names(launch_params.argv[0]); - MPIR_debug_state = MPIR_DEBUG_SPAWNED; - if (opt.debugger_test) - mpir_dump_proctable(); - else - MPIR_Breakpoint(job); - } else { - info("Job step %u.%u aborted before step completely launched.", - job->jobid, job->stepid); - } - - slurm_step_launch_wait_finish(job->step_ctx); - if ((MPIR_being_debugged == 0) && retry_step_begin && - (retry_step_cnt < MAX_STEP_RETRIES)) { - retry_step_begin = false; - slurm_step_ctx_destroy(job->step_ctx); - if (got_alloc) { - if (create_job_step(job, true) < 0) - exit(error_exit); - } else { - if (create_job_step(job, false) < 0) - exit(error_exit); - } - task_state_destroy(task_state); - goto re_launch; - } -cleanup: -#endif + if (launch_g_step_launch(job, &cio_fds, &global_rc, + got_alloc, &srun_shutdown) == -1) + goto relaunch; if (got_alloc) { cleanup_allocation(); @@ -625,7 +496,6 @@ cleanup: _run_srun_epilog(job); slurm_step_ctx_destroy(job->step_ctx); mpir_cleanup(); - task_state_destroy(task_state); log_fini(); if (WIFEXITED(global_rc)) @@ -633,20 +503,6 @@ cleanup: return (int)global_rc; } -static slurm_step_layout_t * -_get_slurm_step_layout(srun_job_t *job) -{ - job_step_create_response_msg_t *resp; - - if (!job || !job->step_ctx) - return (NULL); - - slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); - if (!resp) - return (NULL); - return (resp->step_layout); -} - static int _call_spank_local_user (srun_job_t *job) { struct spank_launcher_job_info info[1]; @@ -655,7 +511,7 @@ static int _call_spank_local_user (srun_job_t *job) info->gid = opt.gid; info->jobid = job->jobid; info->stepid = job->stepid; - info->step_layout = _get_slurm_step_layout(job); + info->step_layout = launch_common_get_slurm_step_layout(job); info->argc = opt.argc; info->argv = opt.argv; @@ -1053,131 +909,6 @@ static int _run_srun_script (srun_job_t *job, char *script) /* NOTREACHED */ } -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P -static void -_send_step_complete_rpc(int step_rc) -{ - slurm_msg_t req; - step_complete_msg_t msg; - int rc; - - memset(&msg, 0, sizeof(step_complete_msg_t)); - msg.job_id = job->jobid; - msg.job_step_id = job->stepid; - msg.range_first = 0; - msg.range_last = 0; - msg.step_rc = step_rc; - msg.jobacct = jobacct_gather_g_create(NULL); - - slurm_msg_t_init(&req); - req.msg_type = REQUEST_STEP_COMPLETE; - req.data = &msg; -/* req.address = step_complete.parent_addr; */ - - debug3("Sending step complete RPC to slurmctld"); - if (slurm_send_recv_controller_rc_msg(&req, &rc) < 0) - error("Error sending step complete RPC to slurmctld"); - jobacct_gather_g_destroy(msg.jobacct); -} - -static void -_handle_msg(slurm_msg_t *msg) -{ - static uint32_t slurm_uid = NO_VAL; - uid_t req_uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); - uid_t uid = getuid(); - job_step_kill_msg_t *ss; - srun_user_msg_t *um; - - if (slurm_uid == NO_VAL) - slurm_uid = slurm_get_slurm_user_id(); - if ((req_uid != slurm_uid) && (req_uid != 0) && (req_uid != uid)) { - error ("Security violation, slurm message from uid %u", - (unsigned int) req_uid); - return; - } - - switch (msg->msg_type) { - case SRUN_PING: - debug3("slurmctld ping received"); - slurm_send_rc_msg(msg, SLURM_SUCCESS); - slurm_free_srun_ping_msg(msg->data); - break; - case SRUN_JOB_COMPLETE: - debug("received job step complete message"); - slurm_free_srun_job_complete_msg(msg->data); - break; - case SRUN_USER_MSG: - um = msg->data; - info("%s", um->msg); - slurm_free_srun_user_msg(msg->data); - break; - case SRUN_STEP_SIGNAL: - ss = msg->data; - debug("received step signal %u RPC", ss->signal); - runjob_signal(ss->signal); - slurm_free_job_step_kill_msg(msg->data); - break; - default: - debug("received spurious message type: %u", - msg->msg_type); - break; - } - return; -} - -static void *_msg_thr_internal(void *arg) -{ - slurm_addr_t cli_addr; - slurm_fd_t newsockfd; - slurm_msg_t *msg; - int *slurmctld_fd_ptr = (int *)arg; - - (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); - (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - - while (!srun_shutdown) { - newsockfd = slurm_accept_msg_conn(*slurmctld_fd_ptr, &cli_addr); - if (newsockfd == SLURM_SOCKET_ERROR) { - if (errno != EINTR) - error("slurm_accept_msg_conn: %m"); - continue; - } - msg = xmalloc(sizeof(slurm_msg_t)); - if (slurm_receive_msg(newsockfd, msg, 0) != 0) { - error("slurm_receive_msg: %m"); - /* close the new socket */ - slurm_close_accepted_conn(newsockfd); - continue; - } - _handle_msg(msg); - slurm_free_msg(msg); - slurm_close_accepted_conn(newsockfd); - } - return NULL; -} - -static pthread_t -_spawn_msg_handler(void) -{ - pthread_attr_t attr; - pthread_t msg_thread; - static int slurmctld_fd; - - slurmctld_fd = job->step_ctx->launch_state->slurmctld_socket_fd; - if (slurmctld_fd < 0) - return (pthread_t) 0; - job->step_ctx->launch_state->slurmctld_socket_fd = -1; - - slurm_attr_init(&attr); - if (pthread_create(&msg_thread, &attr, _msg_thr_internal, - (void *) &slurmctld_fd)) - error("pthread_create of message thread: %m"); - slurm_attr_destroy(&attr); - return msg_thread; -} -#endif - static int _is_local_file (fname_t *fname) { @@ -1227,7 +958,7 @@ _set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) if (job->ifname->type == IO_ONE) { cio_fds->in.taskid = job->ifname->taskid; cio_fds->in.nodeid = slurm_step_layout_host_id( - _get_slurm_step_layout(job), + launch_common_get_slurm_step_layout(job), job->ifname->taskid); } } @@ -1312,268 +1043,6 @@ static void _step_opt_exclusive(void) } } -static void -_terminate_job_step(slurm_step_ctx_t *step_ctx) -{ - uint32_t job_id, step_id; - - slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_JOBID, &job_id); - slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_STEPID, &step_id); - info("Terminating job step %u.%u", job_id, step_id); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_kill_job_step(job_id, step_id, SIGKILL); -#endif -} - -#if !defined HAVE_BG_FILES || defined HAVE_BG_L_P -static void -_task_start(launch_tasks_response_msg_t *msg) -{ - MPIR_PROCDESC *table; - int taskid; - int i; - - if (msg->count_of_pids) - verbose("Node %s, %d tasks started", - msg->node_name, msg->count_of_pids); - else - /* This message should be displayed through the api, - hense it is a debug2 instead of an error. - */ - debug2("No tasks started on node %s: %s", - msg->node_name, slurm_strerror(msg->return_code)); - - - for (i = 0; i < msg->count_of_pids; i++) { - taskid = msg->task_ids[i]; - table = &MPIR_proctable[taskid]; - table->host_name = xstrdup(msg->node_name); - /* table->executable_name is set elsewhere */ - table->pid = msg->local_pids[i]; - - if (msg->return_code == 0) { - task_state_update(task_state, taskid, TS_START_SUCCESS); - } else { - task_state_update(task_state, taskid, TS_START_FAILURE); - } - } - -} - -static char * -_hostset_to_string(hostset_t hs) -{ - size_t n = 1024; - size_t maxsize = 1024*64; - char *str = NULL; - - do { - str = xrealloc(str, n); - } while (hostset_ranged_string(hs, n*=2, str) < 0 && (n < maxsize)); - - /* - * If string was truncated, indicate this with a '+' suffix. - */ - if (n >= maxsize) - strcpy(str + (maxsize - 2), "+"); - - return str; -} - -/* Convert an array of task IDs into a list of host names - * RET: the string, caller must xfree() this value */ -static char * -_task_ids_to_host_list(int ntasks, uint32_t taskids[]) -{ - int i; - hostset_t hs; - char *hosts; - slurm_step_layout_t *sl; - - if ((sl = _get_slurm_step_layout(job)) == NULL) - return (xstrdup("Unknown")); - - hs = hostset_create(NULL); - for (i = 0; i < ntasks; i++) { - char *host = slurm_step_layout_host_name(sl, taskids[i]); - if (host) { - hostset_insert(hs, host); - free(host); - } else { - error("Could not identify host name for task %u", - taskids[i]); - } - } - - hosts = _hostset_to_string(hs); - hostset_destroy(hs); - - return (hosts); -} - -/* Convert an array of task IDs into a string. - * RET: the string, caller must xfree() this value - * NOTE: the taskids array is not necessarily in numeric order, - * so we use existing bitmap functions to format */ -static char * -_task_array_to_string(int ntasks, uint32_t taskids[]) -{ - bitstr_t *tasks_bitmap = NULL; - char *str; - int i; - - tasks_bitmap = bit_alloc(job->ntasks); - if (!tasks_bitmap) { - error("bit_alloc: memory allocation failure"); - exit(error_exit); - } - for (i=0; i slurm_get_msg_timeout()) - return 0; - return 1; -} - -static void -_handle_openmpi_port_error(const char *tasks, const char *hosts, - slurm_step_ctx_t *step_ctx) -{ - uint32_t job_id, step_id; - char *msg = "retrying"; - - if (!retry_step_begin) { - retry_step_begin = true; - retry_step_cnt++; - } - - if (retry_step_cnt >= MAX_STEP_RETRIES) - msg = "aborting"; - error("%s: tasks %s unable to claim reserved port, %s.", - hosts, tasks, msg); - - slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_JOBID, &job_id); - slurm_step_ctx_get(step_ctx, SLURM_STEP_CTX_STEPID, &step_id); - info("Terminating job step %u.%u", job_id, step_id); - slurm_kill_job_step(job_id, step_id, SIGKILL); -} - -static void -_task_finish(task_exit_msg_t *msg) -{ - char *tasks; - char *hosts; - uint32_t rc = 0; - int normal_exit = 0; - - const char *task_str = _taskstr(msg->num_tasks); - - verbose("Received task exit notification for %d %s (status=0x%04x).", - msg->num_tasks, task_str, msg->return_code); - - tasks = _task_array_to_string(msg->num_tasks, msg->task_id_list); - hosts = _task_ids_to_host_list(msg->num_tasks, msg->task_id_list); - - if (WIFEXITED(msg->return_code)) { - if ((rc = WEXITSTATUS(msg->return_code)) == 0) { - verbose("%s: %s %s: Completed", hosts, task_str, tasks); - normal_exit = 1; - } - else if (_is_openmpi_port_error(rc)) { - _handle_openmpi_port_error(tasks, hosts, - job->step_ctx); - } else { - error("%s: %s %s: Exited with exit code %d", - hosts, task_str, tasks, rc); - } - if (!WIFEXITED(global_rc) || (rc > WEXITSTATUS(global_rc))) - global_rc = msg->return_code; - } - else if (WIFSIGNALED(msg->return_code)) { - const char *signal_str = strsignal(WTERMSIG(msg->return_code)); - char * core_str = ""; -#ifdef WCOREDUMP - if (WCOREDUMP(msg->return_code)) - core_str = " (core dumped)"; -#endif - if (job->state >= SRUN_JOB_CANCELLED) { - verbose("%s: %s %s: %s%s", - hosts, task_str, tasks, signal_str, core_str); - } else { - rc = msg->return_code; - error("%s: %s %s: %s%s", - hosts, task_str, tasks, signal_str, core_str); - } - if (global_rc == 0) - global_rc = msg->return_code; - } - - xfree(tasks); - xfree(hosts); - - _update_task_exit_state(msg->num_tasks, msg->task_id_list, - !normal_exit); - - if (task_state_first_abnormal_exit(task_state) && _kill_on_bad_exit()) - _terminate_job_step(job->step_ctx); - - if (task_state_first_exit(task_state) && (opt.max_wait > 0)) - _setup_max_wait_timer(); -} -#endif - /* Return the number of microseconds between tv1 and tv2 with a maximum * a maximum value of 10,000,000 to prevent overflows */ static long _diff_tv_str(struct timeval *tv1,struct timeval *tv2) @@ -1597,17 +1066,13 @@ static void _handle_intr(void) if (opt.disable_status) { info("sending Ctrl-C to job %u.%u", job->jobid, job->stepid); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGINT); -#else - slurm_step_launch_fwd_signal(job->step_ctx, SIGINT); -#endif + launch_g_fwd_signal(SIGINT); } else if (job->state < SRUN_JOB_FORCETERM) { info("interrupt (one more within 1 sec to abort)"); - task_state_print(task_state, (log_f) info); + launch_g_print_status(); } else { info("interrupt (abort already in progress)"); - task_state_print(task_state, (log_f) info); + launch_g_print_status(); } last_intr = now; } else { /* second Ctrl-C in half as many seconds */ @@ -1616,31 +1081,18 @@ static void _handle_intr(void) if (job->state < SRUN_JOB_FORCETERM) { if (_diff_tv_str(&last_intr_sent, &now) < 1000000) { job_force_termination(job); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_step_launch_abort(job->step_ctx); -#endif + launch_g_fwd_signal(SIGKILL); return; } info("sending Ctrl-C to job %u.%u", job->jobid, job->stepid); last_intr_sent = now; -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_step_launch_fwd_signal(job->step_ctx, SIGINT); - slurm_step_launch_abort(job->step_ctx); -#endif - } else { + launch_g_fwd_signal(SIGINT); + } else job_force_termination(job); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_step_launch_abort(job->step_ctx); -#endif - } + + launch_g_fwd_signal(SIGKILL); } } static void _default_sigaction(int sig) @@ -1665,11 +1117,7 @@ static void _handle_pipe(void) if (ending) return; ending = 1; -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_step_launch_abort(job->step_ctx); -#endif + launch_g_fwd_signal(SIGKILL); } /* _srun_signal_mgr - Process daemon-wide signals */ @@ -1701,11 +1149,7 @@ static void *_srun_signal_mgr(void *no_data) * are ending the job now and we don't need to update * the state. */ info("forcing job termination"); -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(SIGKILL); -#else - slurm_step_launch_abort(job->step_ctx); -#endif + launch_g_fwd_signal(SIGKILL); break; case SIGCONT: info("got SIGCONT"); @@ -1716,16 +1160,12 @@ static void *_srun_signal_mgr(void *no_data) case SIGALRM: if (srun_max_timer) { info("First task exited %ds ago", opt.max_wait); - task_state_print(task_state, (log_f) info); - _terminate_job_step(job->step_ctx); + launch_g_print_status(); + launch_g_step_terminate(); } break; default: -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P - runjob_signal(sig); -#else - slurm_step_launch_fwd_signal(job->step_ctx, sig); -#endif + launch_g_fwd_signal(sig); break; } } -- GitLab From b9c7774329961f9844bd56a8be6f0b1de30adcc1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:34:14 -0700 Subject: [PATCH 169/614] fixed missing return --- src/plugins/launch/slurm/launch_slurm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 9e65fc2025..3721960067 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -368,6 +368,8 @@ extern int launch_p_setup_srun_opt(char **rest) MPIR_being_debugged = 1; opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + + return SLURM_SUCCESS; } extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, -- GitLab From 5290d8260204c8e0eb4431cf53261e3185f8b0b6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:34:35 -0700 Subject: [PATCH 170/614] Added launch_runjob.c --- src/plugins/launch/runjob/launch_runjob.c | 403 ++++++++++++++++++++++ 1 file changed, 403 insertions(+) create mode 100644 src/plugins/launch/runjob/launch_runjob.c diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c new file mode 100644 index 0000000000..0b37aa7bed --- /dev/null +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -0,0 +1,403 @@ +/*****************************************************************************\ + * launch_runjob.c - Define job launch using IBM's runjob. Typically + * for use with a BGQ machine. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC + * Written by Danny Auble + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "src/common/slurm_jobacct_gather.h" +#include "src/common/slurm_auth.h" + +#include "src/api/step_ctx.h" +#include "src/api/step_launch.h" + +#include "src/srun/launch.h" + +#include "src/plugins/launch/runjob/runjob_interface.h" + +/* + * These variables are required by the generic plugin interface. If they + * are not found in the plugin, the plugin loader will ignore it. + * + * plugin_name - a string giving a human-readable description of the + * plugin. There is no maximum length, but the symbol must refer to + * a valid string. + * + * plugin_type - a string suggesting the type of the plugin or its + * applicability to a particular form of data or method of data handling. + * If the low-level plugin API is used, the contents of this string are + * unimportant and may be anything. SLURM uses the higher-level plugin + * interface which requires this string to be of the form + * + * / + * + * where is a description of the intended application of + * the plugin (e.g., "task" for task control) and is a description + * of how this plugin satisfies that application. SLURM will only load + * a task plugin if the plugin_type string has a prefix of "task/". + * + * plugin_version - an unsigned 32-bit integer giving the version number + * of the plugin. If major and minor revisions are desired, the major + * version number may be multiplied by a suitable magnitude constant such + * as 100 or 1000. Various SLURM versions will likely require a certain + * minimum version for their plugins as this API matures. + */ +const char plugin_name[] = "launch runjob plugin"; +const char plugin_type[] = "launch/runjob"; +const uint32_t plugin_version = 101; + +static srun_job_t *local_srun_job = NULL; +static bool *local_srun_shutdown = NULL; + +static void _send_step_complete_rpc(int step_rc) +{ + slurm_msg_t req; + step_complete_msg_t msg; + int rc; + + memset(&msg, 0, sizeof(step_complete_msg_t)); + msg.job_id = local_srun_job->jobid; + msg.job_step_id = local_srun_job->stepid; + msg.range_first = 0; + msg.range_last = 0; + msg.step_rc = step_rc; + msg.jobacct = jobacct_gather_g_create(NULL); + + slurm_msg_t_init(&req); + req.msg_type = REQUEST_STEP_COMPLETE; + req.data = &msg; +/* req.address = step_complete.parent_addr; */ + + debug3("Sending step complete RPC to slurmctld"); + if (slurm_send_recv_controller_rc_msg(&req, &rc) < 0) + error("Error sending step complete RPC to slurmctld"); + jobacct_gather_g_destroy(msg.jobacct); +} + +static void +_handle_msg(slurm_msg_t *msg) +{ + static uint32_t slurm_uid = NO_VAL; + uid_t req_uid = g_slurm_auth_get_uid(msg->auth_cred, NULL); + uid_t uid = getuid(); + job_step_kill_msg_t *ss; + srun_user_msg_t *um; + + if (slurm_uid == NO_VAL) + slurm_uid = slurm_get_slurm_user_id(); + if ((req_uid != slurm_uid) && (req_uid != 0) && (req_uid != uid)) { + error ("Security violation, slurm message from uid %u", + (unsigned int) req_uid); + return; + } + + switch (msg->msg_type) { + case SRUN_PING: + debug3("slurmctld ping received"); + slurm_send_rc_msg(msg, SLURM_SUCCESS); + slurm_free_srun_ping_msg(msg->data); + break; + case SRUN_JOB_COMPLETE: + debug("received job step complete message"); + slurm_free_srun_job_complete_msg(msg->data); + break; + case SRUN_USER_MSG: + um = msg->data; + info("%s", um->msg); + slurm_free_srun_user_msg(msg->data); + break; + case SRUN_STEP_SIGNAL: + ss = msg->data; + debug("received step signal %u RPC", ss->signal); + runjob_signal(ss->signal); + slurm_free_job_step_kill_msg(msg->data); + break; + default: + debug("received spurious message type: %u", + msg->msg_type); + break; + } + return; +} + +static void *_msg_thr_internal(void *arg) +{ + slurm_addr_t cli_addr; + slurm_fd_t newsockfd; + slurm_msg_t *msg; + int *slurmctld_fd_ptr = (int *)arg; + + (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); + (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); + + while (!*local_srun_shutdown) { + newsockfd = slurm_accept_msg_conn(*slurmctld_fd_ptr, &cli_addr); + if (newsockfd == SLURM_SOCKET_ERROR) { + if (errno != EINTR) + error("slurm_accept_msg_conn: %m"); + continue; + } + msg = xmalloc(sizeof(slurm_msg_t)); + if (slurm_receive_msg(newsockfd, msg, 0) != 0) { + error("slurm_receive_msg: %m"); + /* close the new socket */ + slurm_close_accepted_conn(newsockfd); + continue; + } + _handle_msg(msg); + slurm_free_msg(msg); + slurm_close_accepted_conn(newsockfd); + } + return NULL; +} + +static pthread_t +_spawn_msg_handler(void) +{ + pthread_attr_t attr; + pthread_t msg_thread; + static int slurmctld_fd; + + slurmctld_fd = + local_srun_job->step_ctx->launch_state->slurmctld_socket_fd; + if (slurmctld_fd < 0) + return (pthread_t) 0; + local_srun_job->step_ctx->launch_state->slurmctld_socket_fd = -1; + + slurm_attr_init(&attr); + if (pthread_create(&msg_thread, &attr, _msg_thr_internal, + (void *) &slurmctld_fd)) + error("pthread_create of message thread: %m"); + slurm_attr_destroy(&attr); + return msg_thread; +} + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init(void) +{ + verbose("%s loaded", plugin_name); + return SLURM_SUCCESS; +} + +/* + * fini() is called when the plugin is removed. Clear any allocated + * storage here. + */ +extern int fini(void) +{ + return SLURM_SUCCESS; +} + +extern int launch_p_setup_srun_opt(char **rest) +{ + if (opt.reboot) { + info("WARNING: If your job is smaller than the block " + "it is going to run on and other jobs are " + "running on it the --reboot option will not be " + "honored. If this is the case, contact your " + "admin to reboot the block for you."); + } + + /* A bit of setup for IBM's runjob. runjob only has so many + options, so it isn't that bad. + */ + if (!opt.test_only) { + /* Since we need the opt.argc to allocate the opt.argv array + * we need to do this before actually messing with + * things. All the extra options added to argv will be + * handled after the allocation. */ + + /* Default location of the actual command to be ran. We always + * have to add 3 options (calling prog, '--env-all' and ':') no + * matter what. */ + command_pos = 3; + + if (opt.ntasks_per_node != NO_VAL) + command_pos += 2; + if (opt.ntasks_set) + command_pos += 2; + if (opt.cwd_set) + command_pos += 2; + if (opt.labelio) + command_pos += 2; + if (_verbose) + command_pos += 2; + if (opt.runjob_opts) { + char *save_ptr = NULL, *tok; + char *tmp = xstrdup(opt.runjob_opts); + tok = strtok_r(tmp, " ", &save_ptr); + while (tok) { + command_pos++; + tok = strtok_r(NULL, " ", &save_ptr); + } + xfree(tmp); + } + + opt.argc += command_pos; + } + + opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + + if (!opt.test_only) { + i = 0; + /* First arg has to be something when sending it to the + runjob api. This can be anything, srun seemed most + logical, but it doesn't matter. + */ + opt.argv[i++] = xstrdup("srun"); + /* srun launches tasks using runjob API. Slurmd is not used */ + if (opt.ntasks_per_node != NO_VAL) { + opt.argv[i++] = xstrdup("-p"); + opt.argv[i++] = xstrdup_printf("%d", + opt.ntasks_per_node); + } + + if (opt.ntasks_set) { + opt.argv[i++] = xstrdup("--np"); + opt.argv[i++] = xstrdup_printf("%d", opt.ntasks); + } + + if (opt.cwd_set) { + opt.argv[i++] = xstrdup("--cwd"); + opt.argv[i++] = xstrdup(opt.cwd); + } + + if (opt.labelio) { + opt.argv[i++] = xstrdup("--label"); + opt.argv[i++] = xstrdup("short"); + /* Since we are getting labels from runjob. and we + * don't want 2 sets (slurm's will always be 000) + * remove it case. */ + opt.labelio = 0; + } + + if (_verbose) { + opt.argv[i++] = xstrdup("--verbose"); + opt.argv[i++] = xstrdup_printf("%d", _verbose); + } + + if (opt.runjob_opts) { + char *save_ptr = NULL, *tok; + char *tmp = xstrdup(opt.runjob_opts); + tok = strtok_r(tmp, " ", &save_ptr); + while (tok) { + opt.argv[i++] = xstrdup(tok); + tok = strtok_r(NULL, " ", &save_ptr); + } + xfree(tmp); + } + + /* Export all the environment so the runjob_mux will get the + * correct info about the job, namely the block. */ + opt.argv[i++] = xstrdup("--env-all"); + + /* With runjob anything after a ':' is treated as the actual + * job, which in this case is exactly what it is. So, very + * sweet. */ + opt.argv[i++] = xstrdup(":"); + + /* Sanity check to make sure we set it up correctly. */ + if (i != command_pos) { + fatal ("command_pos is set to %d but we are going to " + "put it at %d, please update src/srun/opt.c", + command_pos, i); + } + + /* Set default job name to the executable name rather than + * "runjob" */ + if (!opt.job_name_set_cmd && (command_pos < opt.argc)) { + opt.job_name_set_cmd = true; + opt.job_name = xstrdup(rest[0]); + } + } +} + +extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job) +{ + return launch_common_create_job_step(job, use_all_cpus, + signal_function, + destroy_job); +} + +extern int launch_p_step_launch( + srun_job_t *job, slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) +{ + pthread_t msg_thread; + + local_srun_job = job; + local_srun_shutdown = srun_shutdown; + + msg_thread = _spawn_msg_handler(); + + *global_rc = runjob_launch(opt.argc, opt.argv, + cio_fds->in.fd, + cio_fds->out.fd, + cio_fds->err.fd); + _send_step_complete_rpc(*global_rc); + if (msg_thread) { + *local_srun_shutdown = true; + pthread_cancel(msg_thread); + pthread_join(msg_thread, NULL); + } + + return 0; +} + +extern int launch_p_step_terminate(void) +{ + info("Terminating job step %u.%u", + local_srun_job->jobid, local_srun_job->stepid); + runjob_signal(SIGKILL); + return SLURM_SUCCESS; +} + + +extern void launch_p_print_status(void) +{ + +} + +extern void launch_p_fwd_signal(int signal) +{ + runjob_signal(signal); +} -- GitLab From ed218c8b7114feb6d01381c7942c222fbb58f1da Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 12:38:55 -0700 Subject: [PATCH 171/614] shell added for launch_poe.c --- src/plugins/launch/poe/launch_poe.c | 128 ++++++++++++++++++++++++++++ 1 file changed, 128 insertions(+) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index e69de29bb2..bee4967946 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -0,0 +1,128 @@ +/*****************************************************************************\ + * launch_poe.c - Define job launch using IBM's poe. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC + * Written by Danny Auble + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include "src/srun/launch.h" + +/* + * These variables are required by the generic plugin interface. If they + * are not found in the plugin, the plugin loader will ignore it. + * + * plugin_name - a string giving a human-readable description of the + * plugin. There is no maximum length, but the symbol must refer to + * a valid string. + * + * plugin_type - a string suggesting the type of the plugin or its + * applicability to a particular form of data or method of data handling. + * If the low-level plugin API is used, the contents of this string are + * unimportant and may be anything. SLURM uses the higher-level plugin + * interface which requires this string to be of the form + * + * / + * + * where is a description of the intended application of + * the plugin (e.g., "task" for task control) and is a description + * of how this plugin satisfies that application. SLURM will only load + * a task plugin if the plugin_type string has a prefix of "task/". + * + * plugin_version - an unsigned 32-bit integer giving the version number + * of the plugin. If major and minor revisions are desired, the major + * version number may be multiplied by a suitable magnitude constant such + * as 100 or 1000. Various SLURM versions will likely require a certain + * minimum version for their plugins as this API matures. + */ +const char plugin_name[] = "launch poe plugin"; +const char plugin_type[] = "launch/poe"; +const uint32_t plugin_version = 101; + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init(void) +{ + verbose("%s loaded", plugin_name); + return SLURM_SUCCESS; +} + +/* + * fini() is called when the plugin is removed. Clear any allocated + * storage here. + */ +extern int fini(void) +{ + return SLURM_SUCCESS; +} + +extern int launch_p_setup_srun_opt(char **rest) +{ + return SLURM_SUCCESS; +} + +extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, + void (*signal_function)(int), + sig_atomic_t *destroy_job) +{ + return SLURM_SUCCESS; +} + +extern int launch_p_step_launch( + srun_job_t *job, slurm_step_io_fds_t *cio_fds, + uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) +{ + int rc = 0; + + return rc; +} + +extern int launch_p_step_terminate(void) +{ + return SLURM_SUCCESS; +} + + +extern void launch_p_print_status(void) +{ + +} + +extern void launch_p_fwd_signal(int signal) +{ + +} -- GitLab From 863c7b37d68ea98413436989aadf12777f528e23 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:50:04 -0700 Subject: [PATCH 172/614] fix compile issue --- src/plugins/switch/nrt/libpermapi/Makefile.am | 3 ++- src/plugins/switch/nrt/libpermapi/Makefile.in | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am index c38fcd0a83..9b48191ae0 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.am +++ b/src/plugins/switch/nrt/libpermapi/Makefile.am @@ -25,7 +25,8 @@ libpermapi_la_SOURCES = shr_64.c \ $(srun_dir)/debugger.c \ $(srun_dir)/fname.c \ $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c + $(srun_dir)/multi_prog.c \ + $(srun_dir)/launch.c libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ $(convenience_libs) diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index f521590344..1f3ebe9968 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -107,7 +107,7 @@ am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) libpermapi_la_LIBADD = am_libpermapi_la_OBJECTS = shr_64.lo opt.lo srun_job.lo srun_pty.lo \ - debugger.lo fname.lo allocate.lo multi_prog.lo + debugger.lo fname.lo allocate.lo multi_prog.lo launch.lo libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -348,7 +348,8 @@ libpermapi_la_SOURCES = shr_64.c \ $(srun_dir)/debugger.c \ $(srun_dir)/fname.c \ $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c + $(srun_dir)/multi_prog.c \ + $(srun_dir)/launch.c libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ $(convenience_libs) @@ -430,6 +431,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ @@ -506,6 +508,13 @@ multi_prog.lo: $(srun_dir)/multi_prog.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c +launch.lo: $(srun_dir)/launch.c +@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT launch.lo -MD -MP -MF $(DEPDIR)/launch.Tpo -c -o launch.lo `test -f '$(srun_dir)/launch.c' || echo '$(srcdir)/'`$(srun_dir)/launch.c +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/launch.Tpo $(DEPDIR)/launch.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/launch.c' object='launch.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o launch.lo `test -f '$(srun_dir)/launch.c' || echo '$(srcdir)/'`$(srun_dir)/launch.c + mostlyclean-libtool: -rm -f *.lo -- GitLab From 8651e553e56c8b4c268d3f57e27575278ea12d4c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:50:26 -0700 Subject: [PATCH 173/614] fix return values --- src/plugins/launch/runjob/launch_runjob.c | 3 +++ src/plugins/launch/slurm/launch_slurm.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c index 0b37aa7bed..508fc364e3 100644 --- a/src/plugins/launch/runjob/launch_runjob.c +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -227,6 +227,8 @@ extern int fini(void) extern int launch_p_setup_srun_opt(char **rest) { + int command_pos = 0; + if (opt.reboot) { info("WARNING: If your job is smaller than the block " "it is going to run on and other jobs are " @@ -347,6 +349,7 @@ extern int launch_p_setup_srun_opt(char **rest) opt.job_name = xstrdup(rest[0]); } } + return command_pos; } extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 3721960067..119ed16728 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -369,7 +369,7 @@ extern int launch_p_setup_srun_opt(char **rest) opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); - return SLURM_SUCCESS; + return 0; } extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, -- GitLab From a5104c5d7f6ab93d2d96c47d3626a393335e38aa Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:50:47 -0700 Subject: [PATCH 174/614] flush a bit more of the launch/poe plugin --- src/plugins/launch/poe/launch_poe.c | 646 +++++++++++++++++++++++++++- 1 file changed, 643 insertions(+), 3 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index bee4967946..ac8def85a4 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -38,8 +38,11 @@ # include "config.h" #endif -#include "src/srun/launch.h" +#include +#include +#include "src/srun/launch.h" +#include "src/common/env.h" /* * These variables are required by the generic plugin interface. If they * are not found in the plugin, the plugin loader will ignore it. @@ -71,6 +74,584 @@ const char plugin_name[] = "launch poe plugin"; const char plugin_type[] = "launch/poe"; const uint32_t plugin_version = 101; +static char *cmd_fname = NULL; +static char *stepid_fname = NULL; +static char *poe_cmd_line = NULL; + +/* Return the next available step ID */ +static int _get_next_stepid(uint32_t job_id, char *dname, int dname_size) +{ + int fd, i, rc, step_id; + char *work_dir; + ssize_t io_size = 0; + char buf[16]; + + /* NOTE: Directory must be shared between nodes for cmd_file to work */ + if (!(work_dir = getenv("HOME"))) { + work_dir = xmalloc(512); + if (!getcwd(work_dir, 512)) + fatal("getcwd(): %m"); + snprintf(dname, dname_size, "%s/.slurm_loadl", work_dir); + xfree(work_dir); + } else { + snprintf(dname, dname_size, "%s/.slurm_loadl", work_dir); + } + mkdir(dname, 0700); + + /* Create or open our stepid file */ + if (!stepid_fname) + stepid_fname = xstrdup_printf("%s/slurm_stepid_%u", + dname, job_id); + while (((fd = open(stepid_fname, O_CREAT|O_EXCL|O_RDWR, 0600)) < 0) && + (errno == EINTR)) + ; + if ((fd < 0) && (errno == EEXIST)) + fd = open(stepid_fname, O_RDWR); + if (fd < 0) + fatal("open(%s): %m", stepid_fname); + + /* Set exclusive lock on the file */ + for (i = 0; ; i++) { + rc = flock(fd, LOCK_EX | LOCK_NB); + if (rc == 0) + break; + if (i > 10) + fatal("flock(%s): %m", stepid_fname); + usleep(100); + } + + /* Read latest step ID from the file */ + for (i = 0; ; i++) { + io_size = read(fd, buf, sizeof(buf)); + if (io_size >= 0) + break; + if (i > 10) { + flock(fd, LOCK_UN); + fatal("read(%s): %m", stepid_fname); + } + } + if (io_size > 0) + step_id = atoi(buf) + 1; + else + step_id = 1; + + /* Write new step ID value */ + snprintf(buf, sizeof(buf), "%d", step_id); + for (i = 0; ; i++) { + lseek(fd, 0, SEEK_SET); + io_size = write(fd, buf, sizeof(buf)); + if (io_size == sizeof(buf)) + break; + if (i > 10) { + flock(fd, LOCK_UN); + fatal("write(%s): %m", stepid_fname); + } + } + + /* Unlock the file */ + for (i = 0; ; i++) { + rc = flock(fd, LOCK_UN); + if (rc == 0) + break; + if (i > 10) + fatal("flock(%s): %m", stepid_fname); + } + + return step_id; +} + +/* Given a program name, return its communication protocol */ +static char *_get_cmd_protocol(char *cmd) +{ + int stdout_pipe[2] = {-1, -1}, stderr_pipe[2] = {-1, -1}; + int read_size, buf_rem = 16 * 1024, offset = 0, status; + pid_t pid; + char *buf, *protocol = "mpi"; + + if ((pipe(stdout_pipe) == -1) || (pipe(stderr_pipe) == -1)) { + error("pipe: %m"); + return "mpi"; + } + + pid = fork(); + if (pid < 0) { + error("fork: %m"); + return "mpi"; + } else if (pid == 0) { + if ((dup2(stdout_pipe[1], 1) == -1) || + (dup2(stderr_pipe[1], 2) == -1)) { + error("dup2: %m"); + return NULL; + } + (void) close(0); /* stdin */ + (void) close(stdout_pipe[0]); + (void) close(stdout_pipe[1]); + (void) close(stderr_pipe[0]); + (void) close(stderr_pipe[1]); + + execlp("/usr/bin/ldd", "ldd", cmd, NULL); + error("execv(ldd) error: %m"); + return NULL; + } + + (void) close(stdout_pipe[1]); + (void) close(stderr_pipe[1]); + buf = xmalloc(buf_rem); + while ((read_size = read(stdout_pipe[0], &buf[offset], buf_rem))) { + if (read_size > 0) { + buf_rem -= read_size; + offset += read_size; + if (buf_rem == 0) + break; + } else if ((errno != EAGAIN) || (errno != EINTR)) { + error("read(pipe): %m"); + break; + } + } + if (strstr(buf, "libmpi.so")) + protocol = "mpi"; + else if (strstr(buf, "libshmem.so")) + protocol = "shmem"; + else if (strstr(buf, "libxlpgas.so")) + protocol = "pgas"; + else if (strstr(buf, "libpami.so")) + protocol = "pami"; + else if (strstr(buf, "liblapi.so")) + protocol = "lapi"; + xfree(buf); + while ((waitpid(pid, &status, 0) == -1) && (errno == EINTR)) + ; + (void) close(stdout_pipe[0]); + (void) close(stderr_pipe[0]); + + return protocol; +} + +/* + * Parse a multi-prog input file line + * line IN - line to parse + * num_task OUT - number of tasks to be started + * cmd OUT - command to execute, caller must xfree this + * args OUT - arguments to the command, caller must xfree this + */ +static void _parse_prog_line(char *in_line, int *num_tasks, char **cmd, + char **args) +{ + int i; + int first_arg_inx = 0, last_arg_inx = 0; + int first_cmd_inx, last_cmd_inx; + int first_task_inx, last_task_inx; + hostset_t hs; + + /* Get the task ID string */ + for (i = 0; in_line[i]; i++) { + if (!isspace(in_line[i])) + break; + } + if (in_line[i] == '#') + goto fini; + if (!isdigit(in_line[i])) + goto bad_line; + first_task_inx = i; + for (i++; in_line[i]; i++) { + if (isspace(in_line[i])) + break; + } + if (!isspace(in_line[i])) + goto bad_line; + last_task_inx = i; + + /* Get the command */ + for (i++; in_line[i]; i++) { + if (!isspace(in_line[i])) + break; + } + if (in_line[i] == '\0') + goto bad_line; + first_cmd_inx = i; + for (i++; in_line[i]; i++) { + if (isspace(in_line[i])) + break; + } + if (!isspace(in_line[i])) + goto bad_line; + last_cmd_inx = i; + + /* Get the command's arguments */ + for (i++; in_line[i]; i++) { + if (!isspace(in_line[i])) + break; + } + if (in_line[i]) + first_arg_inx = i; + for ( ; in_line[i]; i++) { + if (in_line[i] == '\n') { + last_arg_inx = i; + break; + } + } + + /* Now transfer data to the function arguments */ + in_line[last_task_inx] = '\0'; + hs = hostset_create(in_line + first_task_inx); + in_line[last_task_inx] = ' '; + if (!hs) + goto bad_line; + *num_tasks = hostset_count(hs); + hostset_destroy(hs); + + in_line[last_cmd_inx] = '\0'; + *cmd = xstrdup(in_line + first_cmd_inx); + in_line[last_cmd_inx] = ' '; + + if (last_arg_inx) + in_line[last_arg_inx] = '\0'; + if (first_arg_inx) + *args = xstrdup(in_line + first_arg_inx); + else + *args = NULL; + if (last_arg_inx) + in_line[last_arg_inx] = '\n'; + return; + +bad_line: + error("invalid input line: %s", in_line); +fini: *num_tasks = -1; + return; +} + +/* + * Either get or set a POE command line, + * line IN/OUT - line to set or get + * length IN - size of line in bytes + * step_id IN - -1 if input line, otherwise the step ID to output + * RET true if more lines to get + */ +static bool _multi_prog_parse(char *line, int length, int step_id) +{ + static int cmd_count = 0, inx = 0, total_tasks = 0; + static char **args = NULL, **cmd = NULL; + static int *num_tasks = NULL; + int i; + + if (step_id < 0) { + char *tmp_args = NULL, *tmp_cmd = NULL; + int tmp_tasks = -1; + _parse_prog_line(line, &tmp_tasks, &tmp_cmd, &tmp_args); + + if (tmp_tasks < 0) { + if (line[0] != '#') + error("bad line %s", line); + return true; + } + + xrealloc(args, (sizeof(char *) * (cmd_count + 1))); + xrealloc(cmd, (sizeof(char *) * (cmd_count + 1))); + xrealloc(num_tasks, (sizeof(int) * (cmd_count + 1))); + args[cmd_count] = tmp_args; + cmd[cmd_count] = tmp_cmd; + num_tasks[cmd_count] = tmp_tasks; + total_tasks += tmp_tasks; + cmd_count++; + return true; + } else if (inx >= cmd_count) { + for (i = 0; i < cmd_count; i++) { + xfree(args[i]); + xfree(cmd[i]); + } + xfree(args); + xfree(cmd); + xfree(num_tasks); + cmd_count = 0; + inx = 0; + total_tasks = 0; + return false; + } else if (args[inx]) { + /* @%%: */ + snprintf(line, length, "%s@%d%c%d%c%s:%d %s", + cmd[inx], step_id, '%', total_tasks, '%', + _get_cmd_protocol(cmd[inx]), num_tasks[inx], + args[inx]); + inx++; + return true; + } else { + /* @%%: */ + snprintf(line, length, "%s@%d%c%d%c%s:%d", + cmd[inx], step_id, '%', total_tasks, '%', + _get_cmd_protocol(cmd[inx]), num_tasks[inx]); + inx++; + return true; + } +} + +/* Build a POE command line based upon srun options (using global variables) */ +static char *_build_poe_command(uint32_t job_id) +{ + int i, step_id; + char *cmd_line = NULL, *tmp_str; + char dname[512], value[32]; + bool need_cmdfile = false; + char *protocol = "mpi"; + + /* + * In order to support MPMD or job steps smaller than the job + * allocation size, specify a command file using the poe option + * -cmdfile or MP_CMDFILE env var. See page 43 here: + * http://publib.boulder.ibm.com/epubs/pdf/c2367811.pdf + * The command file should contain one more more lines of the following + * form: + * @%%: + * IBM is working to eliminate the need to specify protocol, but until + * then it might be determined as follows: + * + * We are currently looking at 'ldd ' and checking the name of + * the MPI and PAMI libraries and on x86, also checking to see if Intel + * MPI library is used. + * This is done at runtime in PMD and depending on '-mpilib' option and + * '-config' option used, change the LD_LIBRARY_PATH to properly + * support the different PE Runtime levels the customer have installed + * on their cluster. + * + * There is precedence order that would be important if multiple + * libraries are listed in the 'ldd output' as long as you know it is + * not a mixed protocol (i.e. Openshmem + MPI, UPC + MPI, etc) + * application. + * 1) If MPI library is found (libmpi.so) -> use 'mpi' + * 2) if Openshmem library is found (libshmem.so) -> use 'shmem' + * 3) if UPC runtime library is found (libxlpgas.so) -> use 'pgas' + * 4) if only PAMI library is found (libpami.so) -> use 'pami' + * 5) if only LAPI library is found (liblapi.so) -> use 'lapi' + */ + if (opt.multi_prog) + need_cmdfile = true; + if (opt.ntasks_set && !need_cmdfile) { + tmp_str = getenv("SLURM_NPROCS"); + if (!tmp_str) + tmp_str = getenv("SLURM_NNODES"); + if (tmp_str && (opt.ntasks != atoi(tmp_str))) + need_cmdfile = true; + } + + if (opt.multi_prog) { + protocol = "multi"; + } else { + protocol = _get_cmd_protocol(opt.argv[0]); + } + debug("cmd:%s protcol:%s", opt.argv[0], protocol); + + step_id = _get_next_stepid(job_id, dname, sizeof(dname)); + + if (need_cmdfile) { + char *buf; + int fd, i, j, k; + + /* NOTE: The command file needs to be in a directory that can + * be read from the compute node(s), so /tmp does not work. + * We use the user's home directory (based upon "HOME" + * environment variable) otherwise use current working + * directory. The file name contains the job ID and step ID. */ + xstrfmtcat(cmd_fname, + "%s/slurm_cmdfile_%u.%d", dname, job_id, step_id); + while ((fd = creat(cmd_fname, 0600)) < 0) { + if (errno == EINTR) + continue; + fatal("creat(%s): %m", cmd_fname); + } + + i = strlen(opt.argv[0]) + 128; + buf = xmalloc(i); + if (opt.multi_prog) { + char in_line[512]; + FILE *fp = fopen(opt.argv[0], "r"); + if (!fp) + fatal("fopen(%s): %m", opt.argv[0]); + /* Read and parse SLURM MPMD format file here */ + while (fgets(in_line, sizeof(in_line), fp)) + _multi_prog_parse(in_line, 512, -1); + fclose(fp); + /* Write LoadLeveler MPMD format file here */ + while (_multi_prog_parse(in_line, 512, step_id)) + j = xstrfmtcat(buf, "%s\n", in_line); + } else { + /* @%%: */ + xstrfmtcat(buf, "%s@%d%c%d%c%s:%d", + opt.argv[0], step_id, '%', + opt.ntasks, '%', protocol, opt.ntasks); + for (i = 1; i < opt.argc; i++) /* start at argv[1] */ + xstrfmtcat(buf, " %s", opt.argv[i]); + xstrfmtcat(buf, "\n"); + } + i = 0; + j = strlen(buf); + while ((k = write(fd, &buf[i], j))) { + if (k > 0) { + i += k; + j -= k; + } else if ((errno != EAGAIN) && (errno != EINTR)) { + error("write(cmdfile): %m"); + break; + } + } + (void) close(fd); + setenv("MP_NEWJOB", "parallel", 1); + setenv("MP_CMDFILE", cmd_fname, 1); + } else { + xstrfmtcat(cmd_line, " %s", opt.argv[0]); + /* Each token gets double quotes around it in case any + * arguments contain spaces */ + for (i = 1; i < opt.argc; i++) { + xstrfmtcat(cmd_line, " \"%s\"", opt.argv[i]); + } + } + + if (opt.network) { + if (strstr(opt.network, "dedicated")) + setenv("MP_ADAPTER_USE", "dedicated", 1); + else if (strstr(opt.network, "shared")) + setenv("MP_ADAPTER_USE", "shared", 1); + } + if (opt.cpu_bind_type) { + if ((opt.cpu_bind_type & CPU_BIND_TO_THREADS) || + (opt.cpu_bind_type & CPU_BIND_TO_CORES)) { + setenv("MP_BINDPROC", "yes", 1); + } + } + if (opt.shared != (uint16_t) NO_VAL) { + if (opt.shared) + setenv("MP_CPU_USE", "unique", 1); + else + setenv("MP_CPU_USE", "multiple", 1); + } + if (opt.network) { + if (strstr(opt.network, "hfi")) + setenv("MP_DEVTYPE", "hfi", 1); + else if (strstr(opt.network, "ib")) + setenv("MP_DEVTYPE", "ib", 1); + } + if (opt.network) { + if (strstr(opt.network, "sn_all")) + setenv("MP_EUIDEVICE", "sn_all", 1); + else if (strstr(opt.network, "sn_single")) + setenv("MP_EUIDEVICE", "sn_single", 1); + else if ((tmp_str = strstr(opt.network, "eth"))) { + char buf[5]; + strncpy(buf, tmp_str, 5); + buf[4] = '\0'; + setenv("MP_EUIDEVICE", buf, 1); + } + } + if (opt.network) { + if (strstr(opt.network, "ip") || strstr(opt.network, "ip")) + setenv("MP_EUILIB", "IP", 1); + else if (strstr(opt.network, "us") || + strstr(opt.network, "US")) + setenv("MP_EUILIB", "US", 1); + } + if (opt.nodelist) { + char *fname = NULL, *host_name, *host_line; + pid_t pid = getpid(); + hostlist_t hl; + int fd, len, offset, wrote; + hl = hostlist_create(opt.nodelist); + if (!hl) + fatal("Invalid nodelist: %s", opt.nodelist); + xstrfmtcat(fname, "slurm_hostlist.%u", (uint32_t) pid); + if ((fd = creat(fname, 0600)) < 0) + fatal("creat(%s): %m", fname); + while ((host_name = hostlist_shift(hl))) { + host_line = NULL; + xstrfmtcat(host_line, "%s\n", host_name); + free(host_name); + len = strlen(host_line) + 1; + offset = 0; + while (len > offset) { + wrote = write(fd, host_line + offset, + len - offset); + if (wrote < 0) { + if ((errno == EAGAIN) || + (errno == EINTR)) + continue; + fatal("write(%s): %m", fname); + } + offset += wrote; + } + xfree(host_line); + } + hostlist_destroy(hl); + info("wrote hostlist file at %s", fname); + xfree(fname); + close(fd); + } + if (opt.msg_timeout) { + snprintf(value, sizeof(value), "%d", opt.msg_timeout); + setenv("MP_TIMEOUT", value, 1); + } + if (opt.immediate) + setenv("MP_RETRY", "0", 1); + if (_verbose) { + int info_level = MIN((_verbose + 1), 6); + snprintf(value, sizeof(value), "%d", info_level); + setenv("MP_INFOLEVEL", value, 1); + } + if (opt.labelio) + setenv("MP_LABELIO", "yes", 0); + if (!strcmp(protocol, "multi")) + setenv("MP_MSG_API", "mpi", 0); + else if (!strcmp(protocol, "mpi")) + setenv("MP_MSG_API", "mpi", 0); + else if (!strcmp(protocol, "lapi")) + setenv("MP_MSG_API", "lapi", 0); + else if (!strcmp(protocol, "pami")) + setenv("MP_MSG_API", "pami", 0); + else if (!strcmp(protocol, "upc")) + setenv("MP_MSG_API", "upc", 0); + else if (!strcmp(protocol, "shmem")) { + setenv("MP_MSG_API", "shmem,xmi", 0); + setenv("MP_USE_BULK_XFER", "no", 0); + } + if (opt.min_nodes != NO_VAL) { + snprintf(value, sizeof(value), "%u", opt.min_nodes); + setenv("MP_NODES", value, 1); + } + if (opt.ntasks) { + snprintf(value, sizeof(value), "%u", opt.ntasks); + setenv("MP_PROCS", value, 1); + } + if (opt.cpu_bind_type) { + if (opt.cpu_bind_type & CPU_BIND_TO_THREADS) + setenv("MP_TASK_AFFINITY", "cpu", 1); + else if (opt.cpu_bind_type & CPU_BIND_TO_CORES) + setenv("MP_TASK_AFFINITY", "core", 1); + else if (opt.cpus_per_task) { + snprintf(value, sizeof(value), "cpu:%d", + opt.cpus_per_task); + setenv("MP_TASK_AFFINITY", value, 1); + } + } + if (opt.ntasks_per_node != NO_VAL) { + snprintf(value, sizeof(value), "%u", opt.ntasks_per_node); + setenv("MP_TASKS_PER_NODE", value, 1); + } + if (opt.unbuffered) { + setenv("MP_STDERRMODE", "unordered", 1); + setenv("MP_STDOUTMODE", "unordered", 1); + } + + /* Since poe doesn't need to know about the partition and it + really needs to have RMPOOL set just set it to something. + */ + setenv("MP_RMPOOL", "SLURM", 1); + //disable_status = opt.disable_status; + //quit_on_intr = opt.quit_on_intr; + //srun_jobid = xstrdup(opt.jobid); + +#if _DEBUG_SRUN + info("cmd_line:%s", cmd_line); +#endif + xfree(cmd_line); + return NULL; +} + /* * init() is called when the plugin is loaded, before any other functions * are called. Put global initialization here. @@ -92,14 +673,27 @@ extern int fini(void) extern int launch_p_setup_srun_opt(char **rest) { - return SLURM_SUCCESS; + if (opt.test_only) { + error("--test-only not supported with poe"); + exit (1); + } else if (opt.no_alloc) { + error("--no-allocate not supported with LoadLeveler"); + exit (1); + } + + opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + + return 0; } extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job) { - return SLURM_SUCCESS; + info("partition = %s", opt.partition); + poe_cmd_line = _build_poe_command(job->jobid); + info("command built"); + return SLURM_SUCCESS; } extern int launch_p_step_launch( @@ -107,12 +701,58 @@ extern int launch_p_step_launch( uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) { int rc = 0; + pid_t pid; + int stderr_pipe[2] = {-1, -1}; + int stdin_pipe[2] = {-1, -1}, stdout_pipe[2] = {-1, -1}; + + if ((pipe(stdin_pipe) == -1) + || (pipe(stdout_pipe) == -1) + || (pipe(stderr_pipe) == -1)) { + error("pipe: %m"); + return 1; + } + pid = fork(); + if (pid < 0) { + error("fork: %m"); + return 1; + } else if (pid == 0) { + /* if ((dup2(stdin_pipe[0], 0) == -1) || */ + /* (dup2(stdout_pipe[1], 1) == -1) || */ + /* (dup2(stderr_pipe[1], 2) == -1)) { */ + /* error("dup2: %m"); */ + /* return 1; */ + /* } */ + + /* (void) close(stderr_pipe[0]); */ + /* (void) close(stderr_pipe[1]); */ + /* (void) close(stdin_pipe[0]); */ + /* (void) close(stdin_pipe[1]); */ + /* (void) close(stdout_pipe[0]); */ + /* (void) close(stdout_pipe[1]); */ + + execvp("poe", opt.argv); + error("execv(poe) error: %m"); + return 1; + } + + (void) close(stdin_pipe[0]); + (void) close(stdout_pipe[1]); + (void) close(stderr_pipe[1]); + info("partition = %s", opt.partition); + /* NOTE: dummy_pipe is only used to wake the select() function in the + * loop below when the spawned process terminates */ + info("done with exec"); return rc; } extern int launch_p_step_terminate(void) { + if (cmd_fname) + (void) unlink(cmd_fname); + if (stepid_fname) + (void) unlink(stepid_fname); + info("finishing"); return SLURM_SUCCESS; } -- GitLab From 56fdefb82fa40c4200e330166f0da9f7310e2f9e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:51:06 -0700 Subject: [PATCH 175/614] fix issue with read --- src/common/read_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/read_config.c b/src/common/read_config.c index dd6b999591..c846f92c9b 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -2565,7 +2565,7 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_uint16(&conf->kill_wait, "KillWait", hashtbl)) conf->kill_wait = DEFAULT_KILL_WAIT; - if (!s_p_get_string(&conf->select_type, "LaunchType", hashtbl)) + if (!s_p_get_string(&conf->launch_type, "LaunchType", hashtbl)) conf->launch_type = xstrdup(DEFAULT_LAUNCH_TYPE); s_p_get_string(&conf->licenses, "Licenses", hashtbl); -- GitLab From 0a94c3773da8abe7ba571af3f9a0dfab984441f9 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:51:25 -0700 Subject: [PATCH 176/614] set correct command pos --- src/srun/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index fefb0f7038..5b06030757 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1667,7 +1667,7 @@ static void _opt_args(int argc, char **argv) #endif - launch_g_setup_srun_opt(rest); + command_pos = launch_g_setup_srun_opt(rest); /* Since this is needed on an emulated system don't put this code in * the launch plugin. -- GitLab From 17c023bc2b15fe93a8a022fe2908cf5e6e9a7783 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:51:38 -0700 Subject: [PATCH 177/614] add whitespace --- src/srun/launch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/srun/launch.c b/src/srun/launch.c index de047de6df..8de15f4d75 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -193,8 +193,8 @@ extern int launch_init(void) if (plugin_context) goto done; - type = slurm_get_launch_type(); + type = slurm_get_launch_type(); if (!(plugin_context = _context_create(type))) { error("cannot create launch context for %s", type); retval = SLURM_ERROR; -- GitLab From 7753814069016f38d77a1c77b567f9c140032d8e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:51:53 -0700 Subject: [PATCH 178/614] actually call the plugin --- src/srun/allocate.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/srun/allocate.c b/src/srun/allocate.c index cb7d8eb3f9..facf9e54ad 100644 --- a/src/srun/allocate.c +++ b/src/srun/allocate.c @@ -743,9 +743,9 @@ job_desc_msg_destroy(job_desc_msg_t *j) extern int create_job_step(srun_job_t *job, bool use_all_cpus) { - return launch_common_create_job_step(job, use_all_cpus, - _signal_while_allocating, - &destroy_job); + return launch_g_create_job_step(job, use_all_cpus, + _signal_while_allocating, + &destroy_job); } -- GitLab From 98b57d0af6f868c4fbb7415e9ae425b769853d60 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 16:52:47 -0700 Subject: [PATCH 179/614] moving code around, doesn't appear to work right now though. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 168 ++++++++------------- 1 file changed, 61 insertions(+), 107 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 5773d14eeb..fc38fd0cc8 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -53,11 +53,9 @@ #include "src/srun/srun_job.h" #include "src/srun/opt.h" #include "src/srun/allocate.h" -#include "src/srun/task_state.h" void *my_handle = NULL; srun_job_t *job = NULL; -task_state_t task_state; extern char **environ; @@ -208,7 +206,6 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, info("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); - task_state = task_state_create(1); slurm_step_launch_params_t_init(&launch_params); launch_params.gid = opt.gid; launch_params.alias_list = job->alias_list; @@ -584,6 +581,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, resource_allocation_response_msg_t *resp; job_request_t *pe_job_req = NULL; job_info_t *pe_job_info = NULL; + char *myargv[2] = { "poe", NULL }; info("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { @@ -595,87 +593,43 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, pe_job_req = (job_request_t *)job_cmd.job_command; info("job_type\t= %d", pe_job_req->job_type); + info("num_nodes\t= %d", pe_job_req->num_nodes); + if (pe_job_req->num_nodes != -1) + opt.max_nodes = opt.min_nodes = pe_job_req->num_nodes; + info("tasks_per_node\t= %d", pe_job_req->tasks_per_node); + if (pe_job_req->tasks_per_node != -1) + opt.ntasks_per_node = pe_job_req->tasks_per_node; + info("total_tasks\t= %d", pe_job_req->total_tasks); + if (pe_job_req->total_tasks != -1) { + opt.ntasks_set = true; + opt.ntasks = pe_job_req->total_tasks; + } + info("usage_mode\t= %d", pe_job_req->node_usage); + //info("netowrk_usage\t= %d", pe_job_req->network_usage); + info("check_pointable\t= %d", pe_job_req->check_pointable); + info("check_dir\t= %s", pe_job_req->check_dir); + info("task_affinity\t= %s", pe_job_req->task_affinity); + info("pthreads\t= %d", pe_job_req->parallel_threads); - info("pool\t= %s", pe_job_req->pool); - info("save_job\t= %s", pe_job_req->save_job_file); - info("require\t= %s", pe_job_req->requirements); - info("node_topology\t= %s", pe_job_req->node_topology); - int i; - char *saved_argv = getenv("MP_I_SAVED_ARGV"), - *tmp_char = NULL, *walking_char = NULL; - int my_argc = 1; - char **my_argv; - tmp_char = saved_argv; - i = 0; - while (tmp_char[i]) { - if (tmp_char[i] != ' ') { - i++; - continue; - } - i++; - while (tmp_char[i] && tmp_char[i] == ' ') { - i++; - } - my_argc++; - } - my_argv = (char **) xmalloc((my_argc + 1) * sizeof(char *)); - tmp_char = xstrdup(saved_argv); - walking_char = tmp_char; - my_argc = 0; - i = 0; - while (tmp_char[i]) { - if (tmp_char[i] != ' ') { - i++; - continue; - } - tmp_char[i] = '\0'; - i++; - my_argv[my_argc] = xstrdup(walking_char); - my_argc++; - - while (tmp_char[i] && tmp_char[i] == ' ') - i++; - walking_char = tmp_char + i; - } - if (walking_char) { - my_argv[my_argc] = xstrdup(walking_char); - my_argc++; - } - xfree(tmp_char); + /* info("pool\t= %s", pe_job_req->pool); */ + /* opt.partition = xstrdup(pe_job_req->pool); */ - /* if (environ == NULL) { */ - /* error("no environ"); */ - /* return 1; */ - /* } */ - /* for (i=0; environ[i]; i++) { */ - /* info("%s", environ[i]); */ - /* } */ + info("save_job\t= %s", pe_job_req->save_job_file); - initialize_and_process_args(my_argc, my_argv); - i = 0; - while(my_argv[i]) { - //info("freeing %s", my_argv[i]); - xfree(my_argv[i]); - i++; - } - xfree(my_argv); + info("require\t= %s", pe_job_req->requirements); + + info("node_topology\t= %s", pe_job_req->node_topology); + initialize_and_process_args(1, myargv); - /* opt.min_nodes = pe_job_req->num_nodes; */ - /* if (pe_job_req->tasks_per_node != -1) */ - /* opt.ntasks_per_node = pe_job_req->tasks_per_node; */ - /* opt.ntasks = pe_job_req->total_tasks; */ - info("got part of %s", opt.partition); - if (!opt.partition) - opt.partition = xstrdup(pe_job_req->pool); /* /\* now global "opt" should be filled in and available, */ /* * create a job from opt */ /* *\/ */ @@ -693,42 +647,42 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, /* if (create_job_step(job, false) < 0) { */ /* exit(error_exit); */ /* } */ -/* } else if ((resp = existing_allocation())) { */ -/* select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, */ -/* &resp->node_cnt); */ -/* if (opt.nodes_set_env && !opt.nodes_set_opt && */ -/* (opt.min_nodes > resp->node_cnt)) { */ -/* /\* This signifies the job used the --no-kill option */ -/* * and a node went DOWN or it used a node count range */ -/* * specification, was checkpointed from one size and */ -/* * restarted at a different size *\/ */ -/* error("SLURM_NNODES environment varariable " */ -/* "conflicts with allocated node count (%u!=%u).", */ -/* opt.min_nodes, resp->node_cnt); */ -/* /\* Modify options to match resource allocation. */ -/* * NOTE: Some options are not supported *\/ */ -/* opt.min_nodes = resp->node_cnt; */ -/* xfree(opt.alloc_nodelist); */ -/* if (!opt.ntasks_set) */ -/* opt.ntasks = opt.min_nodes; */ -/* } */ -/* if (opt.alloc_nodelist == NULL) */ -/* opt.alloc_nodelist = xstrdup(resp->node_list); */ -/* if (opt.exclusive) */ -/* _step_opt_exclusive(); */ -/* _set_env_vars(resp); */ -/* if (_validate_relative(resp)) */ -/* exit(error_exit); */ -/* job = job_step_create_allocation(resp); */ -/* slurm_free_resource_allocation_response_msg(resp); */ - -/* if (opt.begin != 0) { */ -/* error("--begin is ignored because nodes" */ -/* " are already allocated."); */ -/* } */ -/* if (!job || create_job_step(job, false) < 0) */ -/* exit(error_exit); */ -/* } else { */ + /* if ((resp = existing_allocation())) { */ + /* select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, */ + /* &resp->node_cnt); */ + /* if (opt.nodes_set_env && !opt.nodes_set_opt && */ + /* (opt.min_nodes > resp->node_cnt)) { */ + /* /\* This signifies the job used the --no-kill option */ + /* * and a node went DOWN or it used a node count range */ + /* * specification, was checkpointed from one size and */ + /* * restarted at a different size *\/ */ + /* error("SLURM_NNODES environment varariable " */ + /* "conflicts with allocated node count (%u!=%u).", */ + /* opt.min_nodes, resp->node_cnt); */ + /* /\* Modify options to match resource allocation. */ + /* * NOTE: Some options are not supported *\/ */ + /* opt.min_nodes = resp->node_cnt; */ + /* xfree(opt.alloc_nodelist); */ + /* if (!opt.ntasks_set) */ + /* opt.ntasks = opt.min_nodes; */ + /* } */ + /* if (opt.alloc_nodelist == NULL) */ + /* opt.alloc_nodelist = xstrdup(resp->node_list); */ + /* if (opt.exclusive) */ + /* _step_opt_exclusive(); */ + /* _set_env_vars(resp); */ + /* if (_validate_relative(resp)) */ + /* exit(error_exit); */ + /* job = job_step_create_allocation(resp); */ + /* slurm_free_resource_allocation_response_msg(resp); */ + + /* if (opt.begin != 0) { */ + /* error("--begin is ignored because nodes" */ + /* " are already allocated."); */ + /* } */ + /* if (!job || create_job_step(job, false) < 0) */ + /* exit(error_exit); */ + /* } else { */ /* /\* Combined job allocation and job step launch *\/ */ /* #if defined HAVE_FRONT_END && (!defined HAVE_BG || defined HAVE_BG_L_P || !defined HAVE_BG_FILES) */ /* uid_t my_uid = getuid(); */ -- GitLab From f316d6e252b1c6cc73a65b3aa29ad516e5685584 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 8 May 2012 17:20:27 -0700 Subject: [PATCH 180/614] define unknown variable when linking --- src/plugins/switch/nrt/libpermapi/shr_64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index fc38fd0cc8..8b9f6d48af 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -57,6 +57,10 @@ void *my_handle = NULL; srun_job_t *job = NULL; +int sig_array[] = { + SIGINT, SIGQUIT, SIGCONT, SIGTERM, SIGHUP, + SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 }; + extern char **environ; static int -- GitLab From d36067d631bd19711fe27fd4ef55a720c3fd0aa2 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 10:25:04 -0700 Subject: [PATCH 181/614] add slurm_set_launch_type --- src/common/slurm_protocol_api.c | 18 ++++++++++++++++++ src/common/slurm_protocol_api.h | 6 ++++++ 2 files changed, 24 insertions(+) diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index 74724585fd..c4be192771 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -1522,6 +1522,24 @@ char *slurm_get_launch_type(void) return launch_type; } +/* slurm_set_launch_type + * set launch_type in slurmctld_conf object + * RET 0 or error code + */ +int slurm_set_launch_type(char *launch_type) +{ + slurm_ctl_conf_t *conf; + + if (slurmdbd_conf) { + } else { + conf = slurm_conf_lock(); + xfree(conf->launch_type); + conf->launch_type = xstrdup(launch_type); + slurm_conf_unlock(); + } + return 0; +} + /* slurm_get_preempt_type * get PreemptType from slurmctld_conf object diff --git a/src/common/slurm_protocol_api.h b/src/common/slurm_protocol_api.h index 9068c09bdd..9ef693184d 100644 --- a/src/common/slurm_protocol_api.h +++ b/src/common/slurm_protocol_api.h @@ -449,6 +449,12 @@ int slurm_set_accounting_storage_port(uint32_t storage_port); */ char *slurm_get_launch_type(void); +/* slurm_set_launch_type + * set launch_type in slurmctld_conf object + * RET 0 or error code + */ +int slurm_set_launch_type(char *launch_type); + /* slurm_get_preempt_mode * returns the PreemptMode value from slurmctld_conf object * RET uint16_t - PreemptMode value (See PREEMPT_MODE_* in slurm.h) -- GitLab From 44d27f83bc5c622acc36ee64fd65002a8fc363e7 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 10:25:31 -0700 Subject: [PATCH 182/614] mods to call poe correctly --- src/plugins/launch/poe/launch_poe.c | 38 ++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index ac8def85a4..89868c71d4 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -435,9 +435,9 @@ static char *_build_poe_command(uint32_t job_id) if (opt.multi_prog) { protocol = "multi"; } else { - protocol = _get_cmd_protocol(opt.argv[0]); + protocol = _get_cmd_protocol(opt.argv[1]); } - debug("cmd:%s protcol:%s", opt.argv[0], protocol); + debug("cmd:%s protcol:%s", opt.argv[1], protocol); step_id = _get_next_stepid(job_id, dname, sizeof(dname)); @@ -458,13 +458,13 @@ static char *_build_poe_command(uint32_t job_id) fatal("creat(%s): %m", cmd_fname); } - i = strlen(opt.argv[0]) + 128; + i = strlen(opt.argv[1]) + 128; buf = xmalloc(i); if (opt.multi_prog) { char in_line[512]; - FILE *fp = fopen(opt.argv[0], "r"); + FILE *fp = fopen(opt.argv[1], "r"); if (!fp) - fatal("fopen(%s): %m", opt.argv[0]); + fatal("fopen(%s): %m", opt.argv[1]); /* Read and parse SLURM MPMD format file here */ while (fgets(in_line, sizeof(in_line), fp)) _multi_prog_parse(in_line, 512, -1); @@ -475,9 +475,9 @@ static char *_build_poe_command(uint32_t job_id) } else { /* @%%: */ xstrfmtcat(buf, "%s@%d%c%d%c%s:%d", - opt.argv[0], step_id, '%', + opt.argv[1], step_id, '%', opt.ntasks, '%', protocol, opt.ntasks); - for (i = 1; i < opt.argc; i++) /* start at argv[1] */ + for (i = 2; i < opt.argc; i++) /* start at argv[2] */ xstrfmtcat(buf, " %s", opt.argv[i]); xstrfmtcat(buf, "\n"); } @@ -496,10 +496,10 @@ static char *_build_poe_command(uint32_t job_id) setenv("MP_NEWJOB", "parallel", 1); setenv("MP_CMDFILE", cmd_fname, 1); } else { - xstrfmtcat(cmd_line, " %s", opt.argv[0]); + xstrfmtcat(cmd_line, " %s", opt.argv[1]); /* Each token gets double quotes around it in case any * arguments contain spaces */ - for (i = 1; i < opt.argc; i++) { + for (i = 2; i < opt.argc; i++) { xstrfmtcat(cmd_line, " \"%s\"", opt.argv[i]); } } @@ -681,9 +681,13 @@ extern int launch_p_setup_srun_opt(char **rest) exit (1); } + opt.argc++; + opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); - return 0; + opt.argv[0] = xstrdup("poe"); + + return 1; } extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, @@ -711,11 +715,21 @@ extern int launch_p_step_launch( error("pipe: %m"); return 1; } + info("calling %s", opt.argv[0]); pid = fork(); if (pid < 0) { + /* (void) close(stdin_pipe[0]); */ + /* (void) close(stdin_pipe[1]); */ + /* (void) close(stdout_pipe[0]); */ + /* (void) close(stdout_pipe[1]); */ + /* (void) close(stderr_pipe[0]); */ + /* (void) close(stderr_pipe[1]); */ error("fork: %m"); return 1; - } else if (pid == 0) { + } else if (pid > 0) { + if (waitpid(pid, NULL, 0) < 0) + error("Unable to reap slurmd child process"); + } else { /* if ((dup2(stdin_pipe[0], 0) == -1) || */ /* (dup2(stdout_pipe[1], 1) == -1) || */ /* (dup2(stderr_pipe[1], 2) == -1)) { */ @@ -730,7 +744,7 @@ extern int launch_p_step_launch( /* (void) close(stdout_pipe[0]); */ /* (void) close(stdout_pipe[1]); */ - execvp("poe", opt.argv); + execvp(opt.argv[0], opt.argv); error("execv(poe) error: %m"); return 1; } -- GitLab From 18b667d75dfcf983a4feec37d26dcf6ade0a9274 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 10:26:26 -0700 Subject: [PATCH 183/614] Added ability to only get a job step if needed. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 94 +++++++++++----------- 1 file changed, 45 insertions(+), 49 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 8b9f6d48af..a034e440b3 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -41,6 +41,7 @@ #include #include +#include "src/common/slurm_xlator.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -538,7 +539,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, /* Set up slurmctld message handler */ slurmctld_msg_init(); - + slurm_set_launch_type("launch/slurm"); return 0; } @@ -585,7 +586,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, resource_allocation_response_msg_t *resp; job_request_t *pe_job_req = NULL; job_info_t *pe_job_info = NULL; - char *myargv[2] = { "poe", NULL }; + char *myargv[3] = { "poe", "poe", NULL }; info("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { @@ -632,7 +633,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, info("require\t= %s", pe_job_req->requirements); info("node_topology\t= %s", pe_job_req->node_topology); - initialize_and_process_args(1, myargv); + initialize_and_process_args(2, myargv); /* /\* now global "opt" should be filled in and available, */ /* * create a job from opt */ @@ -651,51 +652,46 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, /* if (create_job_step(job, false) < 0) { */ /* exit(error_exit); */ /* } */ - /* if ((resp = existing_allocation())) { */ - /* select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, */ - /* &resp->node_cnt); */ - /* if (opt.nodes_set_env && !opt.nodes_set_opt && */ - /* (opt.min_nodes > resp->node_cnt)) { */ - /* /\* This signifies the job used the --no-kill option */ - /* * and a node went DOWN or it used a node count range */ - /* * specification, was checkpointed from one size and */ - /* * restarted at a different size *\/ */ - /* error("SLURM_NNODES environment varariable " */ - /* "conflicts with allocated node count (%u!=%u).", */ - /* opt.min_nodes, resp->node_cnt); */ - /* /\* Modify options to match resource allocation. */ - /* * NOTE: Some options are not supported *\/ */ - /* opt.min_nodes = resp->node_cnt; */ - /* xfree(opt.alloc_nodelist); */ - /* if (!opt.ntasks_set) */ - /* opt.ntasks = opt.min_nodes; */ - /* } */ - /* if (opt.alloc_nodelist == NULL) */ - /* opt.alloc_nodelist = xstrdup(resp->node_list); */ - /* if (opt.exclusive) */ - /* _step_opt_exclusive(); */ - /* _set_env_vars(resp); */ - /* if (_validate_relative(resp)) */ - /* exit(error_exit); */ - /* job = job_step_create_allocation(resp); */ - /* slurm_free_resource_allocation_response_msg(resp); */ - - /* if (opt.begin != 0) { */ - /* error("--begin is ignored because nodes" */ - /* " are already allocated."); */ - /* } */ - /* if (!job || create_job_step(job, false) < 0) */ - /* exit(error_exit); */ - /* } else { */ -/* /\* Combined job allocation and job step launch *\/ */ -/* #if defined HAVE_FRONT_END && (!defined HAVE_BG || defined HAVE_BG_L_P || !defined HAVE_BG_FILES) */ -/* uid_t my_uid = getuid(); */ -/* if ((my_uid != 0) && */ -/* (my_uid != slurm_get_slurm_user_id())) { */ -/* error("srun task launch not supported on this system"); */ -/* exit(error_exit); */ -/* } */ -/* #endif */ + info("looking for existing alloc"); + if ((resp = existing_allocation())) { + info("got an allocation"); + if (opt.nodes_set_env && !opt.nodes_set_opt && + (opt.min_nodes > resp->node_cnt)) { + /* This signifies the job used the --no-kill option + * and a node went DOWN or it used a node count range + * specification, was checkpointed from one size and + * restarted at a different size */ + error("SLURM_NNODES environment varariable " + "conflicts with allocated node count (%u!=%u).", + opt.min_nodes, resp->node_cnt); + /* Modify options to match resource allocation. + * NOTE: Some options are not supported */ + opt.min_nodes = resp->node_cnt; + xfree(opt.alloc_nodelist); + if (!opt.ntasks_set) + opt.ntasks = opt.min_nodes; + } + if (opt.alloc_nodelist == NULL) + opt.alloc_nodelist = xstrdup(resp->node_list); + /* if (opt.exclusive) */ + /* _step_opt_exclusive(); */ + //_set_env_vars(resp); + //if (_validate_relative(resp)) + // exit(error_exit); + info("here before create"); + job = job_step_create_allocation(resp); + slurm_free_resource_allocation_response_msg(resp); + + if (opt.begin != 0) { + error("--begin is ignored because nodes" + " are already allocated."); + } + info("here before step create"); + if (!job || create_job_step(job, false) < 0) + exit(error_exit); + } else { + info("new alloc needed"); + /* Combined job allocation and job step launch */ if (opt.relative_set && opt.relative) { fatal("--relative option invalid for job allocation " "request"); @@ -738,7 +734,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, } slurm_free_resource_allocation_response_msg(resp); - /* } */ + } //*resource_mgr = (void *)job; return 0; } -- GitLab From cbccf0851561e2dcd5e3d72e58a00a2c5dc7fdea Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 11:20:47 -0700 Subject: [PATCH 184/614] setup job name correctly --- src/plugins/launch/poe/launch_poe.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index 89868c71d4..a6fd96e510 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -686,6 +686,12 @@ extern int launch_p_setup_srun_opt(char **rest) opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); opt.argv[0] = xstrdup("poe"); + /* Set default job name to the executable name rather than + * "runjob" */ + if (!opt.job_name_set_cmd && (1 < opt.argc)) { + opt.job_name_set_cmd = true; + opt.job_name = xstrdup(rest[0]); + } return 1; } -- GitLab From d061b8c607cf4f0daf9e54624b998e642a646f0c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 11:21:17 -0700 Subject: [PATCH 185/614] flush a bit more functions out. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 66 +++++++++++++--------- 1 file changed, 38 insertions(+), 28 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index a034e440b3..ca62256f9c 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -45,15 +45,19 @@ #ifdef HAVE_CONFIG_H # include "config.h" #endif + +#include "slurm/slurm.h" +#include "slurm/slurm_errno.h" + #include "src/common/xmalloc.h" #include "src/common/xstring.h" #include "src/common/list.h" #include "src/common/hostlist.h" -#include #include "src/srun/srun_job.h" #include "src/srun/opt.h" #include "src/srun/allocate.h" +#include "src/srun/launch.h" void *my_handle = NULL; srun_job_t *job = NULL; @@ -416,16 +420,20 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char ** error_msg) { job_info_t *ret_info = xmalloc(sizeof(job_info_t)); + int i, j, task_id = 0; + slurm_step_layout_t *step_layout; + hostlist_t hl; + char *host; info("got pe_rm_get_job_info called %p %p", job_info, *job_info); *job_info = ret_info; - ret_info->job_name = xstrdup("hostname"); + ret_info->job_name = xstrdup(opt.job_name); ret_info->rm_id = NULL; - ret_info->procs = 1; + ret_info->procs = job->ntasks; ret_info->max_instances = 1; - ret_info->job_key = 1; + ret_info->job_key = job->stepid; ret_info->check_pointable = 0; ret_info->protocol = xmalloc(sizeof(char *)*2); ret_info->protocol[0] = xstrdup("mpi"); @@ -436,22 +444,30 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, ret_info->devicename = xmalloc(sizeof(char *)*2); ret_info->devicename[0] = xstrdup("sn_all"); ret_info->num_network = 1; - ret_info->host_count = 1; - - ret_info->hosts = xmalloc(sizeof(host_usage_t)); - ret_info->hosts->task_count = 1; - ret_info->hosts->task_ids = xmalloc(sizeof(int)); - *ret_info->hosts->task_ids = 0; - ret_info->hosts->host_name = xstrdup("localhost"); - ret_info->hosts->virtual_ip = xstrdup("127.0.0.1"); - ret_info->hosts->host_address = xstrdup("127.0.0.1"); - - ret_info->rset_name = NULL; - ret_info->master_virtual_ip = xstrdup("127.0.0.1"); - ret_info->mdcr_jobid = 1; - ret_info->mdcr_netmask = NULL; - ret_info->ckptdir = NULL; - info("sending %d and %s", ret_info->instance[0], ret_info->devicename[0]); + ret_info->host_count = job->nhosts; + + step_layout = launch_common_get_slurm_step_layout(job); + + ret_info->hosts = xmalloc(sizeof(host_usage_t) * ret_info->host_count); + i=0; + hl = hostlist_create(step_layout->node_list); + while ((host = hostlist_shift(hl))) { + ret_info->hosts->host_name = host; + ret_info->hosts->host_address = + xstrdup_printf("192.168.1.5%d", i+1); + ret_info->hosts->task_count = step_layout->tasks[i]; + ret_info->hosts->task_ids = + xmalloc(sizeof(int) * ret_info->hosts->task_count); + for (j=0; jhosts->task_count; j++) + ret_info->hosts->task_ids[j] = task_id++; + i++; + if (i > ret_info->host_count) { + error("we have more nodes that we bargined for."); + break; + } + } + hostlist_destroy(hl); + return 0; } @@ -597,6 +613,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, pe_job_req = (job_request_t *)job_cmd.job_command; + initialize_and_process_args(2, myargv); info("job_type\t= %d", pe_job_req->job_type); info("num_nodes\t= %d", pe_job_req->num_nodes); @@ -615,7 +632,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, info("usage_mode\t= %d", pe_job_req->node_usage); - //info("netowrk_usage\t= %d", pe_job_req->network_usage); + info("netowrk_usage\t= %d", pe_job_req->network_usage); info("check_pointable\t= %d", pe_job_req->check_pointable); @@ -633,8 +650,6 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, info("require\t= %s", pe_job_req->requirements); info("node_topology\t= %s", pe_job_req->node_topology); - initialize_and_process_args(2, myargv); - /* /\* now global "opt" should be filled in and available, */ /* * create a job from opt */ /* *\/ */ @@ -652,9 +667,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, /* if (create_job_step(job, false) < 0) { */ /* exit(error_exit); */ /* } */ - info("looking for existing alloc"); if ((resp = existing_allocation())) { - info("got an allocation"); if (opt.nodes_set_env && !opt.nodes_set_opt && (opt.min_nodes > resp->node_cnt)) { /* This signifies the job used the --no-kill option @@ -678,7 +691,6 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, //_set_env_vars(resp); //if (_validate_relative(resp)) // exit(error_exit); - info("here before create"); job = job_step_create_allocation(resp); slurm_free_resource_allocation_response_msg(resp); @@ -686,11 +698,9 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, error("--begin is ignored because nodes" " are already allocated."); } - info("here before step create"); if (!job || create_job_step(job, false) < 0) exit(error_exit); } else { - info("new alloc needed"); /* Combined job allocation and job step launch */ if (opt.relative_set && opt.relative) { fatal("--relative option invalid for job allocation " -- GitLab From 2a128aa76058734ab4eb58819ad67244c7ea5bc0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 12:42:33 -0700 Subject: [PATCH 186/614] Set minimum MinJobAge to 5 --- doc/man/man5/slurm.conf.5 | 4 +++- src/common/read_config.c | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 1a420855eb..260e68c994 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -809,9 +809,11 @@ necessitate higher values. \fBMinJobAge\fR The minimum age of a completed job before its record is purged from SLURM's active database. Set the values of \fBMaxJobCount\fR and -\fBMinJobAge\fR to insure the slurmctld daemon does not exhaust + to insure the slurmctld daemon does not exhaust its memory or other resources. The default value is 300 seconds. A value of zero prevents any job record purging. +In order to eliminate some possible race conditions, the minimum non\-zero +value for \fBMinJobAge\fR recommended is 5. May not exceed 65533. .TP diff --git a/src/common/read_config.c b/src/common/read_config.c index 1c3dca435a..8b31b5f971 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -2601,6 +2601,10 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_uint16(&conf->min_job_age, "MinJobAge", hashtbl)) conf->min_job_age = DEFAULT_MIN_JOB_AGE; + else if (conf->min_job_age < 5) { + info("WARNING: MinJobAge must be at least 5"); + conf->min_job_age = 5; + } if (!s_p_get_string(&conf->mpi_default, "MpiDefault", hashtbl)) conf->mpi_default = xstrdup(DEFAULT_MPI_DEFAULT); -- GitLab From 90513c15582564313a4614aaf94e645c8f6af20c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 12:58:57 -0700 Subject: [PATCH 187/614] getting closer --- src/plugins/switch/nrt/libpermapi/shr_64.c | 43 +++++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index ca62256f9c..717724aea7 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -40,6 +40,7 @@ #include #include #include +#include #include "src/common/slurm_xlator.h" #ifdef HAVE_CONFIG_H @@ -58,6 +59,7 @@ #include "src/srun/opt.h" #include "src/srun/allocate.h" #include "src/srun/launch.h" +#include "src/plugins/switch/nrt/nrt_keys.h" void *my_handle = NULL; srun_job_t *job = NULL; @@ -181,6 +183,21 @@ _set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) } } +static nrt_job_key_t _get_nrt_job_key(srun_job_t *job) +{ + job_step_create_response_msg_t *resp; + nrt_job_key_t job_key; + + if (!job || !job->step_ctx) + return NO_VAL; + + slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); + if (!resp) + return NO_VAL; + slurm_jobinfo_ctx_get(resp->switch_job, NRT_JOBINFO_KEY, &job_key); + return job_key; +} + /* The connection communicates information to and from the resource * manager, so that the resource manager can start the parallel task * manager, and is available for the caller to communicate directly @@ -433,14 +450,15 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, ret_info->rm_id = NULL; ret_info->procs = job->ntasks; ret_info->max_instances = 1; - ret_info->job_key = job->stepid; + ret_info->job_key = _get_nrt_job_key(job); ret_info->check_pointable = 0; ret_info->protocol = xmalloc(sizeof(char *)*2); - ret_info->protocol[0] = xstrdup("mpi"); + ret_info->protocol[0] = xstrdup(opt.mpi_type); ret_info->mode = xmalloc(sizeof(char *)*2); - ret_info->mode[0] = xstrdup("IP/US"); + ret_info->mode[0] = xstrdup(opt.network); ret_info->instance = xmalloc(sizeof(int)); *ret_info->instance = 1; +/* FIXME: not sure how to handle devicename yet */ ret_info->devicename = xmalloc(sizeof(char *)*2); ret_info->devicename[0] = xstrdup("sn_all"); ret_info->num_network = 1; @@ -452,9 +470,15 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, i=0; hl = hostlist_create(step_layout->node_list); while ((host = hostlist_shift(hl))) { + slurm_addr_t addr; ret_info->hosts->host_name = host; - ret_info->hosts->host_address = - xstrdup_printf("192.168.1.5%d", i+1); +/* FIXME: not sure how to handle host_address yet we are guessing the + * below will do what we need. */ + /* ret_info->hosts->host_address = */ + /* xstrdup_printf("10.0.0.5%d", i+1); */ + slurm_conf_get_addr(host, &addr); + ret_info->hosts->host_address = inet_ntoa(addr.sin_addr); + info("%s = %s", ret_info->hosts->host_name, ret_info->hosts->host_address); ret_info->hosts->task_count = step_layout->tasks[i]; ret_info->hosts->task_ids = xmalloc(sizeof(int) * ret_info->hosts->task_count); @@ -632,7 +656,14 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, info("usage_mode\t= %d", pe_job_req->node_usage); - info("netowrk_usage\t= %d", pe_job_req->network_usage); + info("network_usage protocols\t= %s", pe_job_req->network_usage.protocols); + opt.mpi_type = xstrdup(pe_job_req->network_usage.protocols); + info("network_usage adapter_usage\t= %s", pe_job_req->network_usage.adapter_usage); + info("network_usage adapter_type\t= %s", pe_job_req->network_usage.adapter_type); + info("network_usage mode\t= %s", pe_job_req->network_usage.mode); + opt.network = xstrdup(pe_job_req->network_usage.mode); + info("network_usage instance\t= %s", pe_job_req->network_usage.instances); + info("network_usage dev_type\t= %s", pe_job_req->network_usage.dev_type); info("check_pointable\t= %d", pe_job_req->check_pointable); -- GitLab From 3219250a6964baeadfeb35ba85d3a6b8432821ee Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 9 May 2012 12:59:07 -0700 Subject: [PATCH 188/614] remove comments --- src/plugins/launch/poe/launch_poe.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index a6fd96e510..adc6c0435d 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -700,9 +700,8 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job) { - info("partition = %s", opt.partition); poe_cmd_line = _build_poe_command(job->jobid); - info("command built"); + return SLURM_SUCCESS; } -- GitLab From 9a0b104e05866adcc1dc2ff468274671209c301d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 13:14:20 -0700 Subject: [PATCH 189/614] Improve comments --- src/slurmd/slurmd/req.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 829556961e..b0e8dd37ad 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -1370,7 +1370,10 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg) /* On a busy system, slurmstepd may take a while to respond, * if the job was cancelled in the interim, run through the - * abort logic below */ + * abort logic below. + * + * Alternately the job could have ended almost immediately and with + * select/serial sent a REQUEST_COMPLETE_BATCH_SCRIPT RPC already */ if (slurm_cred_revoked(conf->vctx, req->cred)) { info("Job %u killed while launch was in progress", req->job_id); @@ -3305,7 +3308,7 @@ _rpc_suspend_job(slurm_msg_t *msg) } } -/* Job shouldn't even be runnin here, abort it immediately */ +/* Job shouldn't even be running here, abort it immediately */ static void _rpc_abort_job(slurm_msg_t *msg) { -- GitLab From b919d0b37595705ec9a3a1e23a2b76bd26730998 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 13:15:25 -0700 Subject: [PATCH 190/614] Make cred cache lifetime 5 secs --- src/slurmd/slurmd/slurmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index f4a4deaefa..a3840649af 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1455,7 +1455,7 @@ _slurmd_init(void) if (!strcmp(conf->select_type, "select/serial")) { /* Only cache credential for 5 seconds with select/serial * for shorter cache searches and higher throughput */ - slurm_cred_ctx_set(conf->vctx, SLURM_CRED_OPT_EXPIRY_WINDOW, 2); + slurm_cred_ctx_set(conf->vctx, SLURM_CRED_OPT_EXPIRY_WINDOW, 5); } /* -- GitLab From 05ed5a2f0da12b4caab116e2fcd1e1aad55af600 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 15:35:47 -0700 Subject: [PATCH 191/614] Better address slurmd/stepd race condition If the slurmstepd message to slurmd notifying it of batch job completion occurs before the slurmd processes it's launch response, then the slurmd would revoke the job credential, resulting in the launch response generating a second message to slurmctld. This patch eliminates that second message for select/serial. --- src/slurmd/slurmd/req.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index b0e8dd37ad..b1d991cc67 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -1261,7 +1261,7 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg) bool first_job_run = true; int rc = SLURM_SUCCESS; char *resv_id = NULL; - bool replied = false; + bool replied = false, revoked; slurm_addr_t *cli = &msg->orig_addr; if (new_msg) { @@ -1370,11 +1370,15 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg) /* On a busy system, slurmstepd may take a while to respond, * if the job was cancelled in the interim, run through the - * abort logic below. - * - * Alternately the job could have ended almost immediately and with - * select/serial sent a REQUEST_COMPLETE_BATCH_SCRIPT RPC already */ - if (slurm_cred_revoked(conf->vctx, req->cred)) { + * abort logic below. */ + revoked = slurm_cred_revoked(conf->vctx, req->cred); + if (revoked && !strcmp(conf->select_type, "select/serial")) { + /* Assume REQUEST_COMPLETE_BATCH_SCRIPT already processed + * and we do not need to repeat the termination logic and + * send another response RPC */ + revoked = false; + } + if (revoked) { info("Job %u killed while launch was in progress", req->job_id); sleep(1); /* give slurmstepd time to create -- GitLab From 1a0611359f13f5cf36f005f7689e4300c1aefec6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 16:12:11 -0700 Subject: [PATCH 192/614] Add old job purge to pull model while scanning job list This eliminates jobs as soon as possible from the queue. Also a bad job state reason in the new logic is fixed. --- src/slurmctld/job_scheduler.c | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index c0abefbabd..9a1ea3ae17 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -364,7 +364,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) batch_job_launch_msg_t *launch_msg = NULL; bitstr_t *orig_exc_bitmap = NULL; bool have_node_bitmaps, pending_jobs = false; - time_t now = time(NULL); + time_t now, min_age; int error_code; if (select_serial == -1) { @@ -376,6 +376,8 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) if ((select_serial != 1) || (fini_job_ptr == NULL)) goto send_reply; + now = time(NULL); + min_age = now - slurmctld_conf.min_job_age; lock_slurmctld(job_write_lock); xassert(fini_job_ptr->job_resrcs); xassert(fini_job_ptr->job_resrcs->node_bitmap); @@ -387,7 +389,27 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) if (job_iterator == NULL) fatal("list_iterator_create memory allocation failure"); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { - if (!IS_JOB_PENDING(job_ptr) || (job_ptr->priority == 0)) + if (job_ptr == fini_job_ptr) + continue; + + if (!IS_JOB_PENDING(job_ptr)) { + if (IS_JOB_FINISHED(job_ptr) && + (job_ptr == fini_job_ptr) && + (job_ptr->end_time <= min_age)) { + /* If we don't have a db_index by now and we + * are running with the slurmdbd lets put it on + * the list to be handled later when it comes + * back up since we won't get another chance */ + if (with_slurmdbd && !job_ptr->db_index) { + jobacct_storage_g_job_start(acct_db_conn, + job_ptr); + } + list_delete_item(job_iterator); + } + continue; + } + + if (job_ptr->priority == 0) continue; /* Tests dependencies, begin time and reservations */ @@ -446,9 +468,7 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) if (bit_overlap(avail_node_bitmap, job_ptr->part_ptr->node_bitmap) == 0) { - /* All nodes DRAIN, DOWN, or - * reserved for jobs in higher priority partition */ - job_ptr->state_reason = WAIT_RESOURCES; + /* This node DRAIN or DOWN */ continue; } -- GitLab From f94a3794b367b29647f17a66445c87487f418da4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 16:38:09 -0700 Subject: [PATCH 193/614] Move select plugin iniitialization check outside of locks --- src/common/node_select.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/common/node_select.c b/src/common/node_select.c index 10c6c8d293..d2bbd0c982 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -281,6 +281,9 @@ extern int slurm_select_init(bool only_default) struct dirent *e; char *dir_array = NULL, *head = NULL; + if ( select_context ) + return retval; + slurm_mutex_lock( &select_context_lock ); if ( select_context ) -- GitLab From be7c89efe33d404aca52c511c27357f15754d96d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 10 May 2012 08:35:29 -0700 Subject: [PATCH 194/614] Correction to job termination logic --- src/slurmctld/job_scheduler.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 9a1ea3ae17..78dc32aa0e 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -389,12 +389,9 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) if (job_iterator == NULL) fatal("list_iterator_create memory allocation failure"); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { - if (job_ptr == fini_job_ptr) - continue; - if (!IS_JOB_PENDING(job_ptr)) { if (IS_JOB_FINISHED(job_ptr) && - (job_ptr == fini_job_ptr) && + (job_ptr != fini_job_ptr) && (job_ptr->end_time <= min_age)) { /* If we don't have a db_index by now and we * are running with the slurmdbd lets put it on @@ -409,6 +406,9 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) continue; } + if (job_ptr == fini_job_ptr) + continue; + if (job_ptr->priority == 0) continue; @@ -883,7 +883,7 @@ extern int schedule(uint32_t job_limit) select_g_select_jobinfo_get(job_ptr->select_jobinfo, SELECT_JOBDATA_IONODES, &ionodes); - if(ionodes) { + if (ionodes) { sprintf(tmp_char,"%s[%s]", job_ptr->nodes, ionodes); } else { -- GitLab From 16f41b2bf95322b43151beedb46d4ac212092efa Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 10 May 2012 11:36:01 -0700 Subject: [PATCH 195/614] Fix for complete job RPC return code logic --- src/slurmctld/job_scheduler.c | 3 ++- src/slurmctld/proc_req.c | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 78dc32aa0e..c261747512 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -373,7 +373,8 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) else select_serial = 1; } - if ((select_serial != 1) || (fini_job_ptr == NULL)) + if ((select_serial != 1) || (fini_job_ptr == NULL) || + (msg->msg_type != REQUEST_COMPLETE_BATCH_JOB)) goto send_reply; now = time(NULL); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 6bd399b0c8..e5e6c6ea23 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1627,8 +1627,7 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) comp_msg->job_id, TIME_STR); slurmctld_diag_stats.jobs_completed++; dump_job = true; - if ((msg->msg_type == REQUEST_COMPLETE_BATCH_JOB) && - replace_batch_job(msg, job_ptr)) + if (replace_batch_job(msg, job_ptr)) run_sched = true; } -- GitLab From 1e5ec73702575aa106e7bf0e8a9aaa42dcdb0312 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 08:32:37 -0700 Subject: [PATCH 196/614] Correct agent data structure purge for recent RPC, already in v2.4 master --- src/slurmctld/agent.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index 3d556090a2..b0c8bce090 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -1381,8 +1381,9 @@ static void _purge_agent_args(agent_arg_t *agent_arg_ptr) RESPONSE_RESOURCE_ALLOCATION) slurm_free_resource_allocation_response_msg( agent_arg_ptr->msg_args); - else if ((agent_arg_ptr->msg_type == REQUEST_ABORT_JOB) || - (agent_arg_ptr->msg_type == REQUEST_TERMINATE_JOB) || + else if ((agent_arg_ptr->msg_type == REQUEST_ABORT_JOB) || + (agent_arg_ptr->msg_type == REQUEST_TERMINATE_JOB) || + (agent_arg_ptr->msg_type == REQUEST_KILL_PREEMPTED) || (agent_arg_ptr->msg_type == REQUEST_KILL_TIMELIMIT)) slurm_free_kill_job_msg(agent_arg_ptr->msg_args); else if (agent_arg_ptr->msg_type == SRUN_USER_MSG) -- GitLab From 84fed84e0863cdf4315b2e93062c6cea36672d1e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 08:33:19 -0700 Subject: [PATCH 197/614] Remove redundant xstrdup that results in memory leak --- src/slurmctld/proc_req.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index e5e6c6ea23..428ad4a437 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -3656,7 +3656,6 @@ int _launch_batch_step(job_desc_msg_t *job_desc_msg, uid_t uid, launch_msg_ptr->step_id = step_rec->step_id; launch_msg_ptr->gid = job_ptr->group_id; launch_msg_ptr->uid = uid; - launch_msg_ptr->nodes = xstrdup(job_ptr->nodes); launch_msg_ptr->nodes = xstrdup(job_ptr->alias_list); launch_msg_ptr->restart_cnt = job_ptr->restart_cnt; if (job_ptr->details) { -- GitLab From a60e4fc624b7221aa36dc2bcd29b90f1db66126e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 08:34:11 -0700 Subject: [PATCH 198/614] Add logic to free an RPC data structure --- src/slurmctld/job_scheduler.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index c261747512..b5e38848c8 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -540,6 +540,7 @@ send_reply: response_msg.msg_type = REQUEST_BATCH_JOB_LAUNCH; response_msg.data = launch_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); + slurm_free_job_launch_msg(launch_msg); return false; } slurm_send_rc_msg(msg, SLURM_SUCCESS); -- GitLab From bb5acf819eaed7e8a3442644e7762f8c859f2dde Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 09:48:18 -0700 Subject: [PATCH 199/614] Correct logic for RPC data free --- src/slurmctld/agent.c | 9 ++++----- src/slurmctld/agent.h | 7 +++++++ src/slurmctld/job_scheduler.c | 2 +- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/agent.c b/src/slurmctld/agent.c index b0c8bce090..86cb3c1a3c 100644 --- a/src/slurmctld/agent.c +++ b/src/slurmctld/agent.c @@ -178,7 +178,6 @@ static void _purge_agent_args(agent_arg_t *agent_arg_ptr); static void _queue_agent_retry(agent_info_t * agent_info_ptr, int count); static int _setup_requeue(agent_arg_t *agent_arg_ptr, thd_t *thread_ptr, int count, int *spot); -static void _slurmctld_free_batch_job_launch_msg(batch_job_launch_msg_t * msg); static void _spawn_retry_agent(agent_arg_t * agent_arg_ptr); static void *_thread_per_group_rpc(void *args); static int _valid_agent_arg(agent_arg_t *agent_arg_ptr); @@ -1329,12 +1328,12 @@ static void _spawn_retry_agent(agent_arg_t * agent_arg_ptr) slurm_attr_destroy(&attr_agent); } -/* _slurmctld_free_batch_job_launch_msg is a variant of +/* slurmctld_free_batch_job_launch_msg is a variant of * slurm_free_job_launch_msg because all environment variables currently * loaded in one xmalloc buffer (see get_job_env()), which is different * from how slurmd assembles the data from a message */ -static void _slurmctld_free_batch_job_launch_msg(batch_job_launch_msg_t * msg) +extern void slurmctld_free_batch_job_launch_msg(batch_job_launch_msg_t * msg) { if (msg) { if (msg->environment) { @@ -1375,8 +1374,8 @@ static void _purge_agent_args(agent_arg_t *agent_arg_ptr) xfree(agent_arg_ptr->addr); if (agent_arg_ptr->msg_args) { if (agent_arg_ptr->msg_type == REQUEST_BATCH_JOB_LAUNCH) - _slurmctld_free_batch_job_launch_msg( - agent_arg_ptr->msg_args); + slurmctld_free_batch_job_launch_msg(agent_arg_ptr-> + msg_args); else if (agent_arg_ptr->msg_type == RESPONSE_RESOURCE_ALLOCATION) slurm_free_resource_allocation_response_msg( diff --git a/src/slurmctld/agent.h b/src/slurmctld/agent.h index 5547732f7d..d41aba744f 100644 --- a/src/slurmctld/agent.h +++ b/src/slurmctld/agent.h @@ -108,4 +108,11 @@ extern void mail_job_info (struct job_record *job_ptr, uint16_t mail_type); /* Return length of agent's retry_list */ extern int retry_list_size(void); +/* slurmctld_free_batch_job_launch_msg is a variant of + * slurm_free_job_launch_msg because all environment variables currently + * loaded in one xmalloc buffer (see get_job_env()), which is different + * from how slurmd assembles the data from a message + */ +extern void slurmctld_free_batch_job_launch_msg(batch_job_launch_msg_t * msg); + #endif /* !_AGENT_H */ diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index b5e38848c8..00cc9eef35 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -540,7 +540,7 @@ send_reply: response_msg.msg_type = REQUEST_BATCH_JOB_LAUNCH; response_msg.data = launch_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); - slurm_free_job_launch_msg(launch_msg); + slurmctld_free_batch_job_launch_msg(launch_msg); return false; } slurm_send_rc_msg(msg, SLURM_SUCCESS); -- GitLab From 0f3a6f97e698f0972b55cead7a697e9c6c2164d8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 10 May 2012 16:23:39 -0700 Subject: [PATCH 200/614] Fix for race between slurmstepd startup and completion RPC --- src/slurmd/slurmd/req.c | 45 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index b1d991cc67..1f69607771 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -132,10 +132,12 @@ static void _delay_rpc(int host_inx, int host_cnt, int usec_per_rpc); static void _destroy_env(char **env); static int _get_grouplist(uid_t my_uid, gid_t my_gid, int *ngroups, gid_t **groups); +static bool _is_batch_job_finished(uint32_t job_id); static void _job_limits_free(void *x); static int _job_limits_match(void *x, void *key); static bool _job_still_running(uint32_t job_id); static int _kill_all_active_steps(uint32_t jobid, int sig, bool batch); +static void _note_batch_job_finished(uint32_t job_id); static int _step_limits_match(void *x, void *key); static int _terminate_all_steps(uint32_t jobid, bool batch); static void _rpc_launch_tasks(slurm_msg_t *); @@ -209,6 +211,11 @@ static pthread_mutex_t job_limits_mutex = PTHREAD_MUTEX_INITIALIZER; static List job_limits_list = NULL; static bool job_limits_loaded = false; +#define FINI_JOB_CNT 32 +static pthread_mutex_t fini_mutex = PTHREAD_MUTEX_INITIALIZER; +static uint32_t fini_job_id[FINI_JOB_CNT]; +static int next_fini_job_inx = 0; + /* NUM_PARALLEL_SUSPEND controls the number of jobs suspended/resumed * at one time as well as the number of jobsteps per job that can be * suspended at one time */ @@ -1254,6 +1261,34 @@ _set_batch_job_limits(slurm_msg_t *msg) slurm_cred_free_args(&arg); } +/* These functions prevent a possible race condition if the batch script's + * complete RPC is processed before it's launch_successful response. This + * */ +static bool _is_batch_job_finished(uint32_t job_id) +{ + bool found_job = false; + int i; + + slurm_mutex_lock(&fini_mutex); + for (i = 0; i < FINI_JOB_CNT; i++) { + if (fini_job_id[i] == job_id) { + found_job = true; + break; + } + } + slurm_mutex_unlock(&fini_mutex); + + return found_job; +} +static void _note_batch_job_finished(uint32_t job_id) +{ + slurm_mutex_lock(&fini_mutex); + fini_job_id[next_fini_job_inx] = job_id; + if (++next_fini_job_inx >= FINI_JOB_CNT) + next_fini_job_inx = 0; + slurm_mutex_unlock(&fini_mutex); +} + static void _rpc_batch_job(slurm_msg_t *msg, bool new_msg) { @@ -1372,10 +1407,11 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg) * if the job was cancelled in the interim, run through the * abort logic below. */ revoked = slurm_cred_revoked(conf->vctx, req->cred); - if (revoked && !strcmp(conf->select_type, "select/serial")) { - /* Assume REQUEST_COMPLETE_BATCH_SCRIPT already processed - * and we do not need to repeat the termination logic and - * send another response RPC */ + if (revoked && _is_batch_job_finished(req->job_id)) { + /* If configured with select/serial and the batch job already + * completed, consider the job sucessfully launched and do + * not repeat termination logic below, which in the worst case + * just slows things down with another message. */ revoked = false; } if (revoked) { @@ -3407,6 +3443,7 @@ _rpc_terminate_batch_job(uint32_t job_id, uint32_t user_id) /* * "revoke" all future credentials for this jobid */ + _note_batch_job_finished(job_id); if (slurm_cred_revoke(conf->vctx, job_id, now, now) < 0) { debug("revoking cred for job %u: %m", job_id); } else { -- GitLab From 8fa517a240d4968e62afdb4628dec091c2593f88 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 09:11:06 -0700 Subject: [PATCH 201/614] Disable SelectTypeParameter of CR_Socket with select/serial --- src/plugins/select/serial/select_serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 5b05df4033..1185898fa3 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -1486,7 +1486,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) int i, tot_core; info("cons_res: select_p_node_init"); - if ((cr_type & (CR_CPU | CR_SOCKET | CR_CORE)) == 0) { + if ((cr_type & (CR_CPU | CR_CORE)) == 0) { fatal("Invalid SelectTypeParameter: %s", sched_param_type_string(cr_type)); } -- GitLab From cd82aacbcbc01bea582a8ce5c7eee8c6bcd0c4cb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 11:36:21 -0700 Subject: [PATCH 202/614] Update web links from llnl to schedmd --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index eedb043ff2..8a07ce8d92 100644 --- a/README.rst +++ b/README.rst @@ -66,12 +66,12 @@ COMPILING AND INSTALLING THE DISTRIBUTION ----------------------------------------- Please see the instructions at - http://www.llnl.gov/linux/slurm/quickstart_admin.html + http://www.schedmd.com/slurmdocs/quickstart_admin.html Extensive documentation is available from our home page at - http://www.llnl.gov/linux/slurm + http://www.schedmd.com/slurmdocs/slurm.html PROBLEMS -------- -If you experience problems compiling, installing, or running SLURM -please send e-mail to either slurm-dev@lists.llnl.gov. +If you experience problems compiling, installing, or running SLURM, see + http://www.schedmd.com/slurmdocs/help.html -- GitLab From d3e1dd63919cae55382ddeda2e16e213aa68e4c5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 12:13:16 -0700 Subject: [PATCH 203/614] Remove unused argument to select_p_select_nodeinfo_set_all --- doc/html/selectplugins.shtml | 8 ++------ src/common/node_select.c | 4 ++-- src/common/node_select.h | 7 +++---- src/plugins/select/bluegene/bg_node_info.c | 2 +- src/plugins/select/bluegene/bg_node_info.h | 2 +- src/plugins/select/bluegene/select_bluegene.c | 4 ++-- src/plugins/select/cons_res/select_cons_res.c | 4 ++-- src/plugins/select/cray/other_select.c | 4 ++-- src/plugins/select/cray/other_select.h | 2 +- src/plugins/select/cray/select_cray.c | 4 ++-- src/plugins/select/linear/select_linear.c | 4 ++-- src/slurmctld/backup.c | 2 +- src/slurmctld/controller.c | 2 +- src/slurmctld/proc_req.c | 2 +- 14 files changed, 23 insertions(+), 28 deletions(-) diff --git a/doc/html/selectplugins.shtml b/doc/html/selectplugins.shtml index aec9d76a59..446a0b9628 100644 --- a/doc/html/selectplugins.shtml +++ b/doc/html/selectplugins.shtml @@ -226,13 +226,9 @@ to the updated job.

    Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.

    -

    int select_p_select_nodeinfo_set_all(time_t last_query_time);

    +

    int select_p_select_nodeinfo_set_all(void);

    Description: Update select plugin specific information about every node as needed.

    -

    Argument: - last_query_time    (input) Time -of previous node state query. Only update the information if data has changed -since this time.

    Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.

    @@ -742,6 +738,6 @@ to maintain data format compatibility across different versions of the plugin.top

    -

    Last modified 3 August 2011

    +

    Last modified 11 May 2012

    diff --git a/src/common/node_select.c b/src/common/node_select.c index d2bbd0c982..7e7e79da9b 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -905,13 +905,13 @@ extern int select_g_select_nodeinfo_free(dynamic_plugin_data_t *nodeinfo) return rc; } -extern int select_g_select_nodeinfo_set_all(time_t last_query_time) +extern int select_g_select_nodeinfo_set_all(void) { if (slurm_select_init(0) < 0) return SLURM_ERROR; return (*(select_context[select_context_default].ops.nodeinfo_set_all)) - (last_query_time); + (); } extern int select_g_select_nodeinfo_set(struct job_record *job_ptr) diff --git a/src/common/node_select.h b/src/common/node_select.h index e55b58b275..fe4d7e5a73 100644 --- a/src/common/node_select.h +++ b/src/common/node_select.h @@ -170,7 +170,7 @@ typedef struct slurm_select_ops { uint16_t protocol_version); select_nodeinfo_t *(*nodeinfo_alloc) (void); int (*nodeinfo_free) (select_nodeinfo_t *nodeinfo); - int (*nodeinfo_set_all) (time_t last_query_time); + int (*nodeinfo_set_all) (void); int (*nodeinfo_set) (struct job_record *job_ptr); int (*nodeinfo_get) (select_nodeinfo_t *nodeinfo, enum @@ -336,9 +336,8 @@ extern int select_g_select_nodeinfo_free(dynamic_plugin_data_t *nodeinfo); extern int select_g_select_nodeinfo_set(struct job_record *job_ptr); /* Update slect plugin information about every node as needed (if changed since - * previous query) - * IN query_time - Time of previous update */ -extern int select_g_select_nodeinfo_set_all(time_t last_query_time); + * previous query) */ +extern int select_g_select_nodeinfo_set_all(void); /* * Get information from a slect plugin node record diff --git a/src/plugins/select/bluegene/bg_node_info.c b/src/plugins/select/bluegene/bg_node_info.c index 0e0fe86d4f..ab3062634b 100644 --- a/src/plugins/select/bluegene/bg_node_info.c +++ b/src/plugins/select/bluegene/bg_node_info.c @@ -289,7 +289,7 @@ extern int select_nodeinfo_free(select_nodeinfo_t *nodeinfo) return SLURM_SUCCESS; } -extern int select_nodeinfo_set_all(time_t last_query_time) +extern int select_nodeinfo_set_all(void) { ListIterator itr = NULL; struct node_record *node_ptr = NULL; diff --git a/src/plugins/select/bluegene/bg_node_info.h b/src/plugins/select/bluegene/bg_node_info.h index 8fdcd440a0..7bc89d8223 100644 --- a/src/plugins/select/bluegene/bg_node_info.h +++ b/src/plugins/select/bluegene/bg_node_info.h @@ -77,7 +77,7 @@ extern select_nodeinfo_t *select_nodeinfo_alloc(uint32_t size); extern int select_nodeinfo_free(select_nodeinfo_t *nodeinfo); -extern int select_nodeinfo_set_all(time_t last_query_time); +extern int select_nodeinfo_set_all(void); extern int select_nodeinfo_get(select_nodeinfo_t *nodeinfo, enum select_nodedata_type dinfo, diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 6da8373442..8f04180ef9 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -2195,12 +2195,12 @@ extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) return select_nodeinfo_free(nodeinfo); } -extern int select_p_select_nodeinfo_set_all(time_t last_query_time) +extern int select_p_select_nodeinfo_set_all(void) { if (bg_recover != NOT_FROM_CONTROLLER) bridge_status_init(); - return select_nodeinfo_set_all(last_query_time); + return select_nodeinfo_set_all(); } extern int select_p_select_nodeinfo_set(struct job_record *job_ptr) diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 081cdb96a4..14409d3065 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -2236,8 +2236,8 @@ extern int select_p_select_nodeinfo_set_all(void) select_nodeinfo_t *nodeinfo = NULL; /* only set this once when the last_node_update is newer than - the last time we set things up. */ - if(last_set_all && (last_node_update < last_set_all)) { + * the last time we set things up. */ + if (last_set_all && (last_node_update < last_set_all)) { debug2("Node select info for set all hasn't " "changed since %ld", (long)last_set_all); diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index 18ddd3a219..8151b7b9bf 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -573,12 +573,12 @@ extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) return (*(other_select_context->ops.nodeinfo_free))(nodeinfo); } -extern int other_select_nodeinfo_set_all(time_t last_query_time) +extern int other_select_nodeinfo_set_all(void) { if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_set_all))(last_query_time); + return (*(other_select_context->ops.nodeinfo_set_all))(); } extern int other_select_nodeinfo_set(struct job_record *job_ptr) diff --git a/src/plugins/select/cray/other_select.h b/src/plugins/select/cray/other_select.h index ba2f746ceb..0778ddc1a2 100644 --- a/src/plugins/select/cray/other_select.h +++ b/src/plugins/select/cray/other_select.h @@ -343,7 +343,7 @@ extern select_nodeinfo_t *other_select_nodeinfo_alloc(void); extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo); -extern int other_select_nodeinfo_set_all(time_t last_query_time); +extern int other_select_nodeinfo_set_all(void); extern int other_select_nodeinfo_set(struct job_record *job_ptr); diff --git a/src/plugins/select/cray/select_cray.c b/src/plugins/select/cray/select_cray.c index 12db493c94..ee3c94086c 100644 --- a/src/plugins/select/cray/select_cray.c +++ b/src/plugins/select/cray/select_cray.c @@ -472,9 +472,9 @@ unpack_error: return SLURM_ERROR; } -extern int select_p_select_nodeinfo_set_all(time_t last_query_time) +extern int select_p_select_nodeinfo_set_all(void) { - return other_select_nodeinfo_set_all(last_query_time); + return other_select_nodeinfo_set_all(); } extern int select_p_select_nodeinfo_set(struct job_record *job_ptr) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 2bb3568e25..c8b9e026ca 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -3078,7 +3078,7 @@ extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) return SLURM_SUCCESS; } -extern int select_p_select_nodeinfo_set_all(time_t last_query_time) +extern int select_p_select_nodeinfo_set_all(void) { struct node_record *node_ptr = NULL; int i=0; @@ -3086,7 +3086,7 @@ extern int select_p_select_nodeinfo_set_all(time_t last_query_time) /* only set this once when the last_node_update is newer than * the last time we set things up. */ - if(last_set_all && (last_node_update < last_set_all)) { + if (last_set_all && (last_node_update < last_set_all)) { debug2("Node select info for set all hasn't " "changed since %ld", (long)last_set_all); diff --git a/src/slurmctld/backup.c b/src/slurmctld/backup.c index 2456e764f5..ab6ebbc2ba 100644 --- a/src/slurmctld/backup.c +++ b/src/slurmctld/backup.c @@ -225,7 +225,7 @@ void run_backup(void) } slurmctld_config.shutdown_time = (time_t) 0; unlock_slurmctld(config_write_lock); - select_g_select_nodeinfo_set_all(time(NULL)); + select_g_select_nodeinfo_set_all(); return; } diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index f35e3aa3f8..b9a8721c23 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -468,7 +468,7 @@ int main(int argc, char *argv[]) slurm_strerror(error_code)); } unlock_slurmctld(config_write_lock); - select_g_select_nodeinfo_set_all(time(NULL)); + select_g_select_nodeinfo_set_all(); if (recover == 0) _accounting_mark_all_nodes_down("cold-start"); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 428ad4a437..ed1aafb9fb 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1188,7 +1188,7 @@ static void _slurm_rpc_dump_nodes(slurm_msg_t * msg) return; } - select_g_select_nodeinfo_set_all(node_req_msg->last_update - 1); + select_g_select_nodeinfo_set_all(); if ((node_req_msg->last_update - 1) >= last_node_update) { unlock_slurmctld(node_write_lock); -- GitLab From 3e91662deb048214f2f68bb34e17ebb3899500f7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 11 May 2012 12:27:26 -0700 Subject: [PATCH 204/614] Fix memory leak in select/serial --- src/slurmctld/node_scheduler.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 4f380a2aae..0d9edd4976 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -350,9 +350,7 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, error("Job %u allocated no nodes to be killed on", job_ptr->job_id); } - xfree(kill_job->nodes); - select_g_select_jobinfo_free(kill_job->select_jobinfo); - xfree(kill_job); + slurm_free_kill_job_msg(kill_job); hostlist_destroy(agent_args->hostlist); xfree(agent_args); return; -- GitLab From c333f309040f4c3689c88d753d9636552451234f Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Fri, 11 May 2012 13:44:12 -0700 Subject: [PATCH 205/614] Some tests updated for use with select/serial plugin --- testsuite/expect/test1.21 | 15 +++++++++------ testsuite/expect/test1.22 | 19 +++++++++---------- testsuite/expect/test1.31 | 21 ++++++++++----------- testsuite/expect/test1.36 | 26 +++++++++++++------------- testsuite/expect/test1.37 | 11 ++++++++--- 5 files changed, 49 insertions(+), 43 deletions(-) diff --git a/testsuite/expect/test1.21 b/testsuite/expect/test1.21 index 631aad8bf3..11ff005a71 100755 --- a/testsuite/expect/test1.21 +++ b/testsuite/expect/test1.21 @@ -38,23 +38,26 @@ set exit_code 0 set job_id 0 set matches 0 set task_id 3 +set task_num 10 print_header $test_id -if {[test_cray]} { - send_user "\nWARNING: This test is incompatible with Cray systems\n" - exit $exit_code -} if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code +} elseif {[test_cray]} { + send_user "\nWARNING: This test is incompatible with Cray systems\n" + exit $exit_code +} elseif {[test_serial]} { + set task_id 0 + set task_num 1 } # # Spawn a shell via srun with stdout forwarding disabled # set timeout $max_job_delay -set srun_pid [spawn $srun --input=$task_id -N1 -n10 -O -v --wait=2 -t1 $bin_bash] +set srun_pid [spawn $srun --input=$task_id -N1 -n$task_num -O -v --wait=2 -t1 $bin_bash] expect { -re "launching ($number).0 on host" { set job_id $expect_out(1,string) @@ -107,7 +110,7 @@ if {$exit_code == 0} { # set job_id 0 set matches 0 -set srun_pid [spawn $srun --output=$task_id -N1 -n10 -O -v env] +set srun_pid [spawn $srun --output=$task_id -N1 -n$task_num -O -v env] expect { -re "launching ($number).0 on host" { set job_id $expect_out(1,string) diff --git a/testsuite/expect/test1.22 b/testsuite/expect/test1.22 index 10203bfeae..46ae48d8e0 100755 --- a/testsuite/expect/test1.22 +++ b/testsuite/expect/test1.22 @@ -36,14 +36,14 @@ source ./globals set test_id "1.22" set exit_code 0 +set task_num 32 print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code } @@ -53,14 +53,13 @@ if {[test_cray]} { # set host_0 "" set timeout $max_job_delay -if { [test_bluegene] } { - set node_cnt 32-32k +if { [test_xcpu] } { + set node_cnt 1-1 +} elseif {[test_serial]} { + set node_cnt 1 + set task_num 1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-64 - } + set node_cnt 1-64 } set srun_pid [spawn $srun -N$node_cnt -l --threads=1 -t1 $bin_printenv SLURMD_NODENAME] @@ -92,7 +91,7 @@ if {[string compare $host_0 ""] == 0} { # set host_0 "" set timeout $max_job_delay -set srun_pid [spawn $srun -N$node_cnt -n32 -O -l --threads=32 -t1 $bin_printenv SLURMD_NODENAME] +set srun_pid [spawn $srun -N$node_cnt -n$task_num -l --threads=32 -t1 $bin_printenv SLURMD_NODENAME] expect { -re "Memory required by task is not available" { send_user "\nWARNING: DefMemPerTask is configured too high for this test\n" diff --git a/testsuite/expect/test1.31 b/testsuite/expect/test1.31 index 68f229007e..e23cde2690 100755 --- a/testsuite/expect/test1.31 +++ b/testsuite/expect/test1.31 @@ -40,6 +40,8 @@ set env_name_debug "SLURM_DEBUG" set env_valu_debug 1 set env_name_nnodes "SLURM_NNODES" +print_header $test_id + if { [test_bluegene] } { set min_nodes 1 set max_nodes 1024 @@ -48,6 +50,13 @@ if { [test_bluegene] } { } else { set env_valu_nprocs 32 } +} elseif {[test_cray]} { + send_user "\nWARNING: This test is incompatible with Cray systems\n" + exit $exit_code +} elseif {[test_serial]} { + set min_nodes 1 + set max_nodes 1 + set env_valu_nprocs 1 } else { set min_nodes 1 set max_nodes 2 @@ -63,20 +72,10 @@ set exit_code 0 set job_id 0 set timeout $max_job_delay -global env -set env($env_name_debug) $env_valu_debug - -print_header $test_id - -# if the srun -o option worked this test would work. -if {[test_cray]} { - send_user "\nWARNING: This test is incompatible with Cray systems\n" - exit $exit_code -} - # # Set target environment variables # +global env set env($env_name_debug) $env_valu_debug set env($env_name_nnodes) $env_valu_nnodes send_user "$env_valu_nnodes $env_valu_nprocs\n"; diff --git a/testsuite/expect/test1.36 b/testsuite/expect/test1.36 index 216a65e4b2..4555d72f83 100755 --- a/testsuite/expect/test1.36 +++ b/testsuite/expect/test1.36 @@ -33,23 +33,14 @@ source ./globals set test_id "1.36" - set exit_code 0 -set mult 4 -set task_output 0 -if {[test_aix]} { - set task_cnt 3 -} else { - set task_cnt 4 -} print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code } @@ -57,14 +48,23 @@ if {[test_cray]} { # # Spawn srun with $task_cnt tasks each of which runs a $mult way /bin/id # -set timeout $max_job_delay - -if { [test_xcpu] } { +set mult 4 +set task_output 0 +if {[test_aix]} { + set task_cnt 3 + set node_cnt 1-4 +} elseif {[test_serial]} { + set task_cnt 1 + set node_cnt 1-1 +} elseif { [test_xcpu] } { + set task_cnt 4 set node_cnt 1-1 } else { + set task_cnt 4 set node_cnt 1-4 } +set timeout $max_job_delay set srun_pid [spawn $srun -N$node_cnt -n$task_cnt -O -t1 $srun -l -n$mult -O $bin_id] expect { -re "($number): uid=" { diff --git a/testsuite/expect/test1.37 b/testsuite/expect/test1.37 index 2d7c004d7b..54f1115cef 100755 --- a/testsuite/expect/test1.37 +++ b/testsuite/expect/test1.37 @@ -33,13 +33,18 @@ source ./globals set test_id "1.37" -set exit_code 0 +set exit_code 0 +set task_num 0 print_header $test_id if {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit $exit_code +} elseif {[test_serial]} { + set task_num 1 +} else { + set task_num 2 } # @@ -47,7 +52,7 @@ if {[test_front_end]} { # set task_output 0 set timeout $max_job_delay -set srun_pid [spawn $srun -N1 --tasks-per-node=2 -O -l $bin_id] +set srun_pid [spawn $srun -N1 --tasks-per-node=$task_num -O -l $bin_id] expect { -re "($number): uid=" { incr task_output @@ -63,7 +68,7 @@ expect { } } -if {$task_output != 2} { +if {$task_output != $task_num} { send_user "\nFAILURE: failed to get output from all tasks\n" set exit_code 1 } -- GitLab From 02ec880cb9e38065eeb3936ffecd93047ffb30d4 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Fri, 11 May 2012 14:02:05 -0700 Subject: [PATCH 206/614] Update of test1.19 for select/serial --- testsuite/expect/test1.19 | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/testsuite/expect/test1.19 b/testsuite/expect/test1.19 index a78410d1b5..933317e917 100755 --- a/testsuite/expect/test1.19 +++ b/testsuite/expect/test1.19 @@ -45,13 +45,15 @@ set job_id 0 print_header $test_id -if {[test_cray]} { - send_user "\nWARNING: This test is incompatible with Cray systems\n" - exit $exit_code -} + if {[test_bluegene]} { # We never launch more than one task on emulated Bluegene set task_cnt 1 +} elseif {[test_cray]} { + send_user "\nWARNING: This test is incompatible with Cray systems\n" + exit $exit_code +} elseif {[test_serial]} { + set task_cnt 1 } else { set task_cnt 5 } @@ -184,7 +186,7 @@ set file_out_n_glob "test$test_id.n.$node_id.output" exec $bin_rm -f $file_out_n_glob set job_id 0 -set srun_pid [spawn $srun --output=$file_out_n -N1 -n2 -O -v -t1 $bin_printenv SLURMD_NODENAME] +set srun_pid [spawn $srun --output=$file_out_n -N1 -n$task_cnt -O -v -t1 $bin_printenv SLURMD_NODENAME] expect { -re "jobid ($number).*" { set job_id $expect_out(1,string) @@ -242,12 +244,14 @@ for {set step_id 0} {$step_id < 4} {incr step_id} { if { [test_bluegene] } { set node_cnt 32-2048 set task_cnt 32 +} elseif { [test_serial] } { + set node_cnt 1-1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 + set task_cnt 4 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 set task_cnt 4 } -- GitLab From 9d0586a11a42d6bb63c393faf064a136aaf8c3ab Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 10:14:42 -0700 Subject: [PATCH 207/614] Do not have compute expected start times for select/serial --- src/plugins/sched/builtin/builtin.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/plugins/sched/builtin/builtin.c b/src/plugins/sched/builtin/builtin.c index 9ea5aa302a..4d4b379994 100644 --- a/src/plugins/sched/builtin/builtin.c +++ b/src/plugins/sched/builtin/builtin.c @@ -105,7 +105,7 @@ static void _my_sleep(int secs) static void _load_config(void) { - char *sched_params, *tmp_ptr; + char *sched_params, *select_type, *tmp_ptr; sched_timeout = slurm_get_msg_timeout() / 2; sched_timeout = MAX(sched_timeout, 1); @@ -127,6 +127,15 @@ static void _load_config(void) max_backfill_job_cnt); } xfree(sched_params); + + select_type = slurm_get_select_type(); + if (!strcmp(select_type, "select/serial")) { + /* Do not spend time computing expected start time for + * pending jobs */ + max_backfill_job_cnt = 0; + stop_builtin_agent(); + } + xfree(select_type); } static void _compute_start_times(void) -- GitLab From e0f77852c02b99cd80f859f6f8428b9b2dba4e01 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 10:50:39 -0700 Subject: [PATCH 208/614] Corrections to select/serial, support job --hostlist --- src/plugins/select/serial/job_test.c | 57 ++++++++++------------------ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 2ba6886bc4..0a47388930 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -355,8 +355,9 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map) * IN: cr_type - resource type * OUT: cpu_cnt - number of cpus that can be used by this job * IN: test_only - ignore allocated memory check + * RET SLURM_SUCCESS if resource found for job */ -static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, +static int _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, bitstr_t *core_map, uint32_t cr_node_cnt, struct node_use_record *node_usage, uint16_t cr_type, uint16_t **cpu_cnt_ptr, @@ -365,7 +366,14 @@ static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, uint16_t *cpu_cnt; uint32_t n; int i_first, i_last; + int rc = SLURM_ERROR; + if (cr_node_cnt != node_record_count) { + error("select/serial: node count inconsistent with slurmctld"); + return SLURM_ERROR; + } + if (job_ptr->details && job_ptr->details->req_node_bitmap) + bit_and(node_map, job_ptr->details->req_node_bitmap); cpu_cnt = xmalloc(cr_node_cnt * sizeof(uint16_t)); i_first = bit_ffs(node_map); if (i_first >= 0) @@ -378,39 +386,15 @@ static void _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, cpu_cnt[n] = _can_job_run_on_node(job_ptr, core_map, n, node_usage, cr_type, test_only); - if (cpu_cnt[n]) + if (cpu_cnt[n]) { + bit_nclear(node_map, 0, (node_record_count - 1)); + bit_set(node_map, n); + rc = SLURM_SUCCESS; break; /* select/serial: only need one node */ + } } *cpu_cnt_ptr = cpu_cnt; -} - -/* this is the heart of the selection process */ -static int _choose_nodes(struct job_record *job_ptr, bitstr_t *node_map, - uint32_t cr_node_cnt, uint16_t *cpu_cnt) -{ - int i; - struct job_details *details_ptr = job_ptr->details; - - xassert(cpu_cnt); - xassert(node_map); - if (cr_node_cnt != node_record_count) { - error("select/serial: node count inconsistent with slurmctld"); - return SLURM_ERROR; - } - if (details_ptr->req_node_bitmap) - bit_or(node_map, details_ptr->req_node_bitmap); - i = bit_ffs(node_map); - if (i < 0) - return SLURM_ERROR; - for ( ; i < node_record_count; i++) { - if (cpu_cnt[i]) - break; /* select/serial: only need one node */ - } - if (i >= node_record_count) - return SLURM_ERROR; - bit_nclear(node_map, 0, (node_record_count - 1)); - bit_set(node_map, i); - return SLURM_SUCCESS; + return rc; } @@ -436,17 +420,14 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, if (bit_set_count(node_map) == 0) return NULL; - /* get resource usage for this job from each available node */ - _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, - node_usage, cr_type, &cpu_cnt, test_only); - - /* choose first node for the job */ - rc = _choose_nodes(job_ptr, node_map, cr_node_cnt, cpu_cnt); + /* get resource usage for this job from first available node */ + rc = _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, + node_usage, cr_type, &cpu_cnt, test_only); /* if successful, sync up the core_map with the node_map, and * create a cpus array */ if (rc == SLURM_SUCCESS) { - cpus = xmalloc(bit_set_count(node_map) * sizeof(uint16_t)); + cpus = xmalloc(sizeof(uint16_t)); start = 0; a = 0; for (n = 0; n < cr_node_cnt; n++) { -- GitLab From 30147f22975fd9fa511932e01ebad32c9cd5f347 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 11:30:21 -0700 Subject: [PATCH 209/614] Improve some select/serial logic --- src/plugins/select/serial/job_test.c | 38 ++++++++++++---------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/plugins/select/serial/job_test.c b/src/plugins/select/serial/job_test.c index 0a47388930..eb9a9f75f6 100644 --- a/src/plugins/select/serial/job_test.c +++ b/src/plugins/select/serial/job_test.c @@ -355,7 +355,7 @@ bitstr_t *_make_core_bitmap(bitstr_t *node_map) * IN: cr_type - resource type * OUT: cpu_cnt - number of cpus that can be used by this job * IN: test_only - ignore allocated memory check - * RET SLURM_SUCCESS if resource found for job + * RET SLURM_SUCCESS index of selected node or -1 if none */ static int _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, bitstr_t *core_map, uint32_t cr_node_cnt, @@ -366,7 +366,7 @@ static int _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, uint16_t *cpu_cnt; uint32_t n; int i_first, i_last; - int rc = SLURM_ERROR; + int node_inx = -1; if (cr_node_cnt != node_record_count) { error("select/serial: node count inconsistent with slurmctld"); @@ -389,12 +389,12 @@ static int _get_res_usage(struct job_record *job_ptr, bitstr_t *node_map, if (cpu_cnt[n]) { bit_nclear(node_map, 0, (node_record_count - 1)); bit_set(node_map, n); - rc = SLURM_SUCCESS; + node_inx = n; break; /* select/serial: only need one node */ } } *cpu_cnt_ptr = cpu_cnt; - return rc; + return node_inx; } @@ -413,35 +413,29 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, struct node_use_record *node_usage, uint16_t cr_type, bool test_only) { - int rc; + int node_inx; uint16_t *cpu_cnt, *cpus = NULL; - uint32_t start, n, a; if (bit_set_count(node_map) == 0) return NULL; /* get resource usage for this job from first available node */ - rc = _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, - node_usage, cr_type, &cpu_cnt, test_only); + node_inx = _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, + node_usage, cr_type, &cpu_cnt, test_only); /* if successful, sync up the core_map with the node_map, and * create a cpus array */ - if (rc == SLURM_SUCCESS) { + if (node_inx >= 0) { cpus = xmalloc(sizeof(uint16_t)); - start = 0; - a = 0; - for (n = 0; n < cr_node_cnt; n++) { - if (bit_test(node_map, n)) { - cpus[a++] = cpu_cnt[n]; - if (cr_get_coremap_offset(n) != start) { - bit_nclear(core_map, start, - (cr_get_coremap_offset(n))-1); - } - start = cr_get_coremap_offset(n + 1); - } + cpus[0] = cpu_cnt[node_inx]; + if (node_inx != 0) { + bit_nclear(core_map, 0, + (cr_get_coremap_offset(node_inx))-1); } - if (cr_get_coremap_offset(n) != start) { - bit_nclear(core_map, start, cr_get_coremap_offset(n)-1); + if (node_inx < (cr_node_cnt - 1)) { + bit_nclear(core_map, + (cr_get_coremap_offset(node_inx + 1)), + (cr_get_coremap_offset(cr_node_cnt) - 1)); } } -- GitLab From f3bc807bf2ac6f8d4f71c8babc338e2b5fad34f4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 12:34:33 -0700 Subject: [PATCH 210/614] credential performance improvements Disable some logging by default Purge expired credentials based upon timer rather than possibly hundreds of times per second --- src/common/slurm_cred.c | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index 0b278915b4..d5d4743e92 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -1108,7 +1108,6 @@ error: int slurm_cred_begin_expiration(slurm_cred_ctx_t ctx, uint32_t jobid) { - char buf[64]; job_state_t *j = NULL; xassert(ctx != NULL); @@ -1131,10 +1130,13 @@ slurm_cred_begin_expiration(slurm_cred_ctx_t ctx, uint32_t jobid) } j->expiration = time(NULL) + ctx->expiry_window; - - debug2 ("set revoke expiration for jobid %u to %s", +#if EXTREME_DEBUG +{ + char buf[64]; + debug2("set revoke expiration for jobid %u to %s", j->jobid, timestr (&j->expiration, buf, 64) ); - +} +#endif slurm_mutex_unlock(&ctx->mutex); return SLURM_SUCCESS; @@ -1852,9 +1854,11 @@ _credential_revoked(slurm_cred_ctx_t ctx, slurm_cred_t *cred) } if (cred->ctime <= j->revoked) { +#if EXTREME_DEBUG char buf[64]; - debug ("cred for %u revoked. expires at %s", - j->jobid, timestr (&j->expiration, buf, 64)); + debug3("cred for %u revoked. expires at %s", + j->jobid, timestr(&j->expiration, buf, 64)); +#endif return true; } @@ -1917,10 +1921,15 @@ _job_state_destroy(job_state_t *j) static void _clear_expired_job_states(slurm_cred_ctx_t ctx) { + static time_t last_scan = 0; time_t now = time(NULL); ListIterator i = NULL; job_state_t *j = NULL; + if ((now - last_scan) < 2) /* Reduces slurmd overhead */ + return; + last_scan = now; + i = list_iterator_create(ctx->job_list); if (!i) fatal("list_iterator_create: malloc failure"); @@ -1954,17 +1963,20 @@ _clear_expired_job_states(slurm_cred_ctx_t ctx) static void _clear_expired_credential_states(slurm_cred_ctx_t ctx) { + static time_t last_scan = 0; time_t now = time(NULL); ListIterator i = NULL; cred_state_t *s = NULL; - i = list_iterator_create(ctx->state_list); + if ((now - last_scan) < 2) /* Reduces slurmd overhead */ + return; + last_scan = now; + i = list_iterator_create(ctx->state_list); while ((s = list_next(i))) { if (now > s->expiration) list_delete_item(i); } - list_iterator_destroy(i); } -- GitLab From 87d609e85690e992132e0453ae91ae5e234342be Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 15:07:52 -0700 Subject: [PATCH 211/614] Remove sleep from performance test --- testsuite/expect/test9.9 | 1 - 1 file changed, 1 deletion(-) diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index 87ccbc40e1..d24bbb9f75 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -51,7 +51,6 @@ proc _submit_jobs { job_name test_file } { } } log_user 1 - sleep 1 if {[wait_for_all_jobs $job_name 0] != 0} { send_user "\nFAILURE: some submitted jobs failed to terminate\n" set exit_code 1 -- GitLab From e9598f8ce714d217295b771976ad3f2b29d33e35 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 14 May 2012 16:28:53 -0700 Subject: [PATCH 212/614] Cosmetic mods Remove some redundant code Add comment Fix code allignment --- src/slurmctld/job_scheduler.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 00cc9eef35..993be7f3db 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -613,7 +613,7 @@ extern int schedule(uint32_t job_limit) error("ignoring SchedulerParameters: " "default_queue_depth value of %d", i); } else { - def_job_limit = i; + def_job_limit = i; } } xfree(sched_params); @@ -680,6 +680,7 @@ extern int schedule(uint32_t job_limit) slurmctld_diag_stats.schedule_queue_len = list_count(job_queue); while (1) { if (fifo_sched) { + /* Eliminates sort for FIFO */ job_queue_rec = list_pop(job_queue); } else { job_queue_rec = list_pop_bottom(job_queue, @@ -706,15 +707,6 @@ extern int schedule(uint32_t job_limit) if (!IS_JOB_PENDING(job_ptr)) continue; /* started in other partition */ - if (job_ptr->priority == 0) { /* held */ - debug3("sched: JobId=%u. State=%s. Reason=%s. " - "Priority=%u.", - job_ptr->job_id, - job_state_string(job_ptr->job_state), - job_reason_string(job_ptr->state_reason), - job_ptr->priority); - continue; - } /* Test for valid account, QOS and required nodes on each pass */ if (job_ptr->state_reason == FAIL_ACCOUNT) { -- GitLab From 19991a33a6e6ba1c3493294daed9d086e3c06c11 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 15 May 2012 08:14:39 -0700 Subject: [PATCH 213/614] Add some links to StarCluster cloud computing toolkit --- doc/html/documentation.shtml | 4 ++-- doc/html/download.shtml | 5 ++++- doc/html/elastic_computing.shtml | 12 +++++++++++- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml index 494072beb7..b42463c32d 100644 --- a/doc/html/documentation.shtml +++ b/doc/html/documentation.shtml @@ -29,13 +29,13 @@ Also see Publications and Presentations.
  • Configuration Tool (Full version)
  • Configuration Tool (Simplified version)
  • CPU Management User and Administrator Guide
  • -
  • Elastic Computing
  • Large Cluster Administration Guide
  • Power Saving Guide
  • Troubleshooting Guide
  • SLURM Scheduling
  • -

    Last modified 2 April 2012

    +

    Last modified 15 May 2012

    diff --git a/doc/html/download.shtml b/doc/html/download.shtml index 3b6732dbca..fbc60d61c4 100644 --- a/doc/html/download.shtml +++ b/doc/html/download.shtml @@ -154,6 +154,9 @@ SLURM's PAM module has also been packaged for -

    Last modified 6 March 2012

    +

    Last modified 15 May 2012

    diff --git a/doc/html/elastic_computing.shtml b/doc/html/elastic_computing.shtml index 1cc8bf71c2..9c3a692a6f 100644 --- a/doc/html/elastic_computing.shtml +++ b/doc/html/elastic_computing.shtml @@ -14,6 +14,16 @@ cluster. Good responsiveness and throughput can be achieved while you only pay for the resources needed.

    +

    The +StarCluster +cloud computing toolkit has a +SLURM port available. + +Instructions for the SLURM port of StartCLuster are available online.

    + +

    The rest of this document describes details about SLURM's infrastructure that +can be used to support Elastic Computing.

    +

    SLURM's Elastic Computing logic relies heavily upon the existing power save logic. Review of SLURM's Power Saving Guide is strongly @@ -162,6 +172,6 @@ expands (adds resources).

    -

    Last modified 14 October 2011

    +

    Last modified 15 May 2012

    -- GitLab From 6a75d9e08398e2fc2f21405770d58347ce423c92 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 15 May 2012 08:26:06 -0700 Subject: [PATCH 214/614] Remove out of date sinfo documentation --- doc/man/man1/sinfo.1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/man/man1/sinfo.1 b/doc/man/man1/sinfo.1 index 39a405a3d7..bd5cae9b84 100644 --- a/doc/man/man1/sinfo.1 +++ b/doc/man/man1/sinfo.1 @@ -193,10 +193,6 @@ Only user root may initiate jobs, "yes" or "no" \fB%R\fR Partition name, also see \fB%P\fR .TP -\fB%R\fR -The reason a node is unavailable (down, drained, draining, -fail or failing states) -.TP \fB%s\fR Maximum job size in nodes .TP -- GitLab From bbeccd3834f689ecf6e8c3f04a95621e157d8e8d Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 15 May 2012 11:04:59 -0700 Subject: [PATCH 215/614] Fix test for select/serial --- testsuite/expect/test1.41 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testsuite/expect/test1.41 b/testsuite/expect/test1.41 index e8d6862ee4..255b6b4f2e 100755 --- a/testsuite/expect/test1.41 +++ b/testsuite/expect/test1.41 @@ -57,12 +57,13 @@ set timeout [expr $max_job_delay + 60 + 60 + 120] if { [test_bluegene] } { set node_cnt 1-1024 +} elseif {[test_serial]} { + set node_cnt 1-1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-2 - } + set node_cnt 1-2 } set srun_pid [spawn $srun -N$node_cnt -n$task_cnt --overcommit --debugger-test -t1 $bin_id] -- GitLab From 018f136d6f931001822c442149b145f37744534e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 15 May 2012 14:43:20 -0700 Subject: [PATCH 216/614] Modify test17.32 for select/serial --- testsuite/expect/test17.32 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/testsuite/expect/test17.32 b/testsuite/expect/test17.32 index 6762483fbc..38567d3df5 100755 --- a/testsuite/expect/test17.32 +++ b/testsuite/expect/test17.32 @@ -62,6 +62,8 @@ if { [test_bluegene] } { } else { set task_cnt 10 } +} elseif { [test_serial] } { + set task_cnt 1 } else { set task_cnt 10 } @@ -93,6 +95,7 @@ if {[wait_for_job $job_id "DONE"] != 0} { cancel_job $job_id set exit_code 1 } + set matches 0 set tasks 0 if {[wait_for_file $file_out] == 0} { @@ -116,12 +119,13 @@ if {[wait_for_file $file_out] == 0} { } } if {$matches != 2} { - send_user "\nFAILURE: Did not set desired allocation env vars\n" + send_user "\nFAILURE: Did not set desired allocation env vars: " + send_user "($matches != 2)\n" set exit_code 1 } -if {$task_cnt != $tasks} { +if {$tasks != $task_cnt} { send_user "\nFAILURE: Did not get proper number of tasks: " - send_user "($task_cnt != $tasks)\n" + send_user "($task != $task_cnt)\n" set exit_code 1 } -- GitLab From 6afadde38128e44dff309071d72a61d46856533c Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 15 May 2012 16:04:30 -0700 Subject: [PATCH 217/614] Test updates for select/serial --- testsuite/expect/test1.54 | 5 ++++- testsuite/expect/test1.59 | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/test1.54 b/testsuite/expect/test1.54 index b8b73a4e95..3ed332dae9 100755 --- a/testsuite/expect/test1.54 +++ b/testsuite/expect/test1.54 @@ -40,7 +40,10 @@ set exit_code 0 print_header $test_id if {[test_front_end] != 0} { - send_user "\nWARNING: This test is incompatible with front-end systems\n" + send_user "\nWARNING: This test is incompatible with front-end systems\n" + exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with a serial system\n" exit 0 } diff --git a/testsuite/expect/test1.59 b/testsuite/expect/test1.59 index e3c0d44095..c087450d52 100755 --- a/testsuite/expect/test1.59 +++ b/testsuite/expect/test1.59 @@ -49,7 +49,11 @@ exec $bin_rm -f $hostfile if { [test_front_end] } { send_user "\nWARNING: This test incompatible with front-end systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with a serial system\n" + exit 0 } + if {[string compare [switch_type] "elan"] == 0} { send_user "\nWARNING: This test incompatible with Elan switch\n" exit $exit_code -- GitLab From fd352f072dd01a882b676bc42453007ee498c447 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 15 May 2012 17:17:42 -0700 Subject: [PATCH 218/614] Fixed issues with updating QOS by an admin and restarting the slurmctld. --- src/slurmctld/job_mgr.c | 52 +++++++++++++++++++++++++++-------------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 6250652990..5338e4edae 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -1684,7 +1684,8 @@ static int _load_job_state(Buf buffer, uint16_t protocol_version) memset(&qos_rec, 0, sizeof(slurmdb_qos_rec_t)); qos_rec.id = job_ptr->qos_id; job_ptr->qos_ptr = _determine_and_validate_qos( - job_ptr->resv_name, job_ptr->assoc_ptr, false, &qos_rec, + job_ptr->resv_name, job_ptr->assoc_ptr, + job_ptr->limit_set_qos, &qos_rec, &qos_error); if ((qos_error != SLURM_SUCCESS) && !job_ptr->limit_set_qos) { info("Holding job %u with invalid qos", job_id); @@ -6982,10 +6983,11 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) job_ptr->comment, job_specs->job_id); if (wiki_sched && strstr(job_ptr->comment, "QOS:")) { - slurmdb_qos_rec_t qos_rec; if (!IS_JOB_PENDING(job_ptr)) error_code = ESLURM_DISABLED; else { + slurmdb_qos_rec_t qos_rec; + slurmdb_qos_rec_t *new_qos_ptr; char *resv_name; if (job_specs->reservation && job_specs->reservation[0] != '\0') @@ -7001,12 +7003,24 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) "FLAGS:PREEMPTEE")) qos_rec.name = "standby"; - job_ptr->qos_ptr = _determine_and_validate_qos( + new_qos_ptr = _determine_and_validate_qos( resv_name, job_ptr->assoc_ptr, - admin, &qos_rec, &error_code); + authorized, &qos_rec, &error_code); if (error_code == SLURM_SUCCESS) { - job_ptr->qos_id = qos_rec.id; - update_accounting = true; + info("update_job: setting qos to %s " + "for job_id %u", + job_specs->qos, job_specs->job_id); + if (job_ptr->qos_id != qos_rec.id) { + job_ptr->qos_id = qos_rec.id; + job_ptr->qos_ptr = new_qos_ptr; + if (authorized) + job_ptr->limit_set_qos = + ADMIN_SET_LIMIT; + else + job_ptr->limit_set_qos + = 0; + update_accounting = true; + } } } } @@ -7015,12 +7029,13 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) goto fini; if (job_specs->qos) { - slurmdb_qos_rec_t qos_rec; - uint16_t save_qos_id; if (!IS_JOB_PENDING(job_ptr)) error_code = ESLURM_DISABLED; else { + slurmdb_qos_rec_t qos_rec; + slurmdb_qos_rec_t *new_qos_ptr; char *resv_name; + if (job_specs->reservation && job_specs->reservation[0] != '\0') resv_name = job_specs->reservation; @@ -7030,22 +7045,23 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) memset(&qos_rec, 0, sizeof(slurmdb_qos_rec_t)); qos_rec.name = job_specs->qos; - save_qos_id = job_ptr->qos_id; - job_ptr->qos_ptr = _determine_and_validate_qos( + new_qos_ptr = _determine_and_validate_qos( resv_name, job_ptr->assoc_ptr, - admin, &qos_rec, &error_code); + authorized, &qos_rec, &error_code); if (error_code == SLURM_SUCCESS) { info("update_job: setting qos to %s " "for job_id %u", job_specs->qos, job_specs->job_id); - job_ptr->qos_id = qos_rec.id; - if ((save_qos_id != job_ptr->qos_id) && admin){ - job_ptr->limit_set_qos = - ADMIN_SET_LIMIT; - } else { - job_ptr->limit_set_qos = 0; + if (job_ptr->qos_id != qos_rec.id) { + job_ptr->qos_id = qos_rec.id; + job_ptr->qos_ptr = new_qos_ptr; + if (authorized) + job_ptr->limit_set_qos = + ADMIN_SET_LIMIT; + else + job_ptr->limit_set_qos = 0; + update_accounting = true; } - update_accounting = true; } } } -- GitLab From e7c8fe544f760863ecd6b7d27f938af29c798874 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 09:04:25 -0700 Subject: [PATCH 219/614] BGQ - make sure we calculate the ntasks per node correctly given a node and task count that isn't an even cut. --- src/srun/opt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index 11d3693b9a..ca2093b3bc 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -42,6 +42,7 @@ #endif #include /* strcpy, strncasecmp */ +#include #ifdef HAVE_STRINGS_H # include @@ -1670,7 +1671,12 @@ static void _opt_args(int argc, char **argv) opt.max_nodes = opt.min_nodes = node_cnt = opt.ntasks; if (!opt.ntasks_per_node || (opt.ntasks_per_node == NO_VAL)) { - opt.ntasks_per_node = opt.ntasks / node_cnt; + /* We always want the next larger number if + there is a fraction so we try to stay in + the allocation requested. + */ + opt.ntasks_per_node = ceil((double)opt.ntasks + / (double)node_cnt); figured = true; } -- GitLab From aa1bb6e8fc3db55e5c16ab17845d7fdc568c9cb7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 09:11:41 -0700 Subject: [PATCH 220/614] Remove LoadLeveler related code --- src/api/job_info.c | 5 ----- src/api/job_step_info.c | 9 --------- src/api/signal.c | 12 ------------ src/common/slurm_protocol_pack.c | 12 ------------ src/scancel/scancel.c | 22 ---------------------- src/squeue/print.c | 17 ----------------- 6 files changed, 77 deletions(-) diff --git a/src/api/job_info.c b/src/api/job_info.c index aaf247cf2b..6bf5761ecc 100644 --- a/src/api/job_info.c +++ b/src/api/job_info.c @@ -168,13 +168,8 @@ slurm_sprint_job_info ( job_info_t * job_ptr, int one_liner ) } /****** Line 1 ******/ -#ifdef USE_LOADLEVELER - snprintf(tmp_line, sizeof(tmp_line), - "JobId=%s Name=%s", job_ptr->job_id, job_ptr->name); -#else snprintf(tmp_line, sizeof(tmp_line), "JobId=%u Name=%s", job_ptr->job_id, job_ptr->name); -#endif out = xstrdup(tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/api/job_step_info.c b/src/api/job_step_info.c index 3d46a5ca61..b7483a67cb 100644 --- a/src/api/job_step_info.c +++ b/src/api/job_step_info.c @@ -148,17 +148,10 @@ slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr, else secs2time_str ((time_t)job_step_ptr->time_limit * 60, limit_str, sizeof(limit_str)); -#ifdef USE_LOADLEVELER - snprintf(tmp_line, sizeof(tmp_line), - "StepId=%s.%u UserId=%u StartTime=%s TimeLimit=%s", - job_step_ptr->job_id, job_step_ptr->step_id, - job_step_ptr->user_id, time_str, limit_str); -#else snprintf(tmp_line, sizeof(tmp_line), "StepId=%u.%u UserId=%u StartTime=%s TimeLimit=%s", job_step_ptr->job_id, job_step_ptr->step_id, job_step_ptr->user_id, time_str, limit_str); -#endif out = xstrdup(tmp_line); if (one_liner) xstrcat(out, " "); @@ -349,9 +342,7 @@ extern int slurm_job_step_stat(uint32_t job_id, uint32_t step_id, slurm_msg_t_init(&req_msg); memset(&req, 0, sizeof(job_step_id_msg_t)); -#ifndef USE_LOADLEVELER resp_out->job_id = req.job_id = job_id; -#endif resp_out->step_id = req.step_id = step_id; req_msg.msg_type = REQUEST_JOB_STEP_STAT; diff --git a/src/api/signal.c b/src/api/signal.c index 2605c0cf4c..4d214fef88 100644 --- a/src/api/signal.c +++ b/src/api/signal.c @@ -126,9 +126,7 @@ static int _signal_job_step(const job_step_info_t *step, int rc = SLURM_SUCCESS; /* same remote procedure call for each node */ -#ifndef USE_LOADLEVELER rpc.job_id = step->job_id; -#endif rpc.job_step_id = step->step_id; rpc.signal = (uint32_t)signal; rc = _local_send_recv_rc_msgs(allocation->node_list, @@ -190,9 +188,7 @@ static int _terminate_job_step(const job_step_info_t *step, /* * Send REQUEST_TERMINATE_TASKS to all nodes of the step */ -#ifndef USE_LOADLEVELER rpc.job_id = step->job_id; -#endif rpc.job_step_id = step->step_id; rpc.signal = (uint32_t)-1; /* not used by slurmd */ rc = _local_send_recv_rc_msgs(allocation->node_list, @@ -281,11 +277,7 @@ slurm_signal_job_step (uint32_t job_id, uint32_t step_id, uint16_t signal) goto fail; } for (i = 0; i < step_info->job_step_count; i++) { -#ifdef USE_LOADLEVELER - if (0 && -#else if ((step_info->job_steps[i].job_id == job_id) && -#endif (step_info->job_steps[i].step_id == step_id)) { rc = _signal_job_step(&step_info->job_steps[i], alloc_info, signal); @@ -381,11 +373,7 @@ slurm_terminate_job_step (uint32_t job_id, uint32_t step_id) goto fail; } for (i = 0; i < step_info->job_step_count; i++) { -#ifdef USE_LOADLEVELER - if (0 && -#else if ((step_info->job_steps[i].job_id == job_id) && -#endif (step_info->job_steps[i].step_id == step_id)) { rc = _terminate_job_step(&step_info->job_steps[i], alloc_info); diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index fe7a586912..296d265f70 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -3900,9 +3900,7 @@ _unpack_job_step_info_members(job_step_info_t * step, Buf buffer, char *node_inx_str; if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { -#ifndef USE_LOADLEVELER safe_unpack32(&step->job_id, buffer); -#endif safe_unpack32(&step->step_id, buffer); safe_unpack16(&step->ckpt_interval, buffer); safe_unpack32(&step->user_id, buffer); @@ -3931,9 +3929,7 @@ _unpack_job_step_info_members(job_step_info_t * step, Buf buffer, buffer, protocol_version)) goto unpack_error; } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { -#ifndef USE_LOADLEVELER safe_unpack32(&step->job_id, buffer); -#endif safe_unpack32(&step->step_id, buffer); safe_unpack16(&step->ckpt_interval, buffer); safe_unpack32(&step->user_id, buffer); @@ -3959,9 +3955,7 @@ _unpack_job_step_info_members(job_step_info_t * step, Buf buffer, xfree(node_inx_str); } } else { -#ifndef USE_LOADLEVELER safe_unpack32(&step->job_id, buffer); -#endif safe_unpack32(&step->step_id, buffer); safe_unpack16(&step->ckpt_interval, buffer); safe_unpack32(&step->user_id, buffer); @@ -4083,9 +4077,7 @@ _unpack_job_info_members(job_info_t * job, Buf buffer, if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpack32(&job->assoc_id, buffer); -#ifndef USE_LOADLEVELER safe_unpack32(&job->job_id, buffer); -#endif safe_unpack32(&job->user_id, buffer); safe_unpack32(&job->group_id, buffer); @@ -4197,9 +4189,7 @@ _unpack_job_info_members(job_info_t * job, Buf buffer, } } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { safe_unpack32(&job->assoc_id, buffer); -#ifndef USE_LOADLEVELER safe_unpack32(&job->job_id, buffer); -#endif safe_unpack32(&job->user_id, buffer); safe_unpack32(&job->group_id, buffer); @@ -4307,9 +4297,7 @@ _unpack_job_info_members(job_info_t * job, Buf buffer, } } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { safe_unpack32(&job->assoc_id, buffer); -#ifndef USE_LOADLEVELER safe_unpack32(&job->job_id, buffer); -#endif safe_unpack32(&job->user_id, buffer); safe_unpack32(&job->group_id, buffer); diff --git a/src/scancel/scancel.c b/src/scancel/scancel.c index f7a2fd195d..00f58d9ccb 100644 --- a/src/scancel/scancel.c +++ b/src/scancel/scancel.c @@ -189,10 +189,8 @@ _verify_job_ids (void) for (j = 0; j < opt.job_cnt; j++ ) { for (i = 0; i < job_buffer_ptr->record_count; i++) { -#ifndef USE_LOADLEVELER if (job_ptr[i].job_id == opt.job_id[j]) break; -#endif } if (((job_ptr[i].job_state >= JOB_COMPLETE) || (i >= job_buffer_ptr->record_count)) && @@ -330,10 +328,8 @@ _filter_job_records (void) if (opt.job_cnt == 0) continue; for (j = 0; j < opt.job_cnt; j++) { -#ifndef USE_LOADLEVELER if (job_ptr[i].job_id == opt.job_id[j]) break; -#endif } if (j >= opt.job_cnt) { /* not found */ job_ptr[i].job_id = 0; @@ -364,10 +360,8 @@ _cancel_jobs_by_state(uint16_t job_state) * included a step id */ if (opt.job_cnt) { for (j = 0; j < opt.job_cnt; j++ ) { -#ifndef USE_LOADLEVELER if (job_ptr[i].job_id != opt.job_id[j]) continue; -#endif if (opt.interactive && (_confirmation(i, opt.step_id[j]) == 0)) continue; @@ -375,9 +369,7 @@ _cancel_jobs_by_state(uint16_t job_state) cancel_info = (job_cancel_info_t *) xmalloc(sizeof(job_cancel_info_t)); -#ifndef USE_LOADLEVELER cancel_info->job_id = job_ptr[i].job_id; -#endif cancel_info->sig = opt.signal; cancel_info->num_active_threads = &num_active_threads; @@ -421,9 +413,7 @@ _cancel_jobs_by_state(uint16_t job_state) cancel_info = (job_cancel_info_t *) xmalloc(sizeof(job_cancel_info_t)); -#ifndef USE_LOADLEVELER cancel_info->job_id = job_ptr[i].job_id; -#endif cancel_info->sig = opt.signal; cancel_info->num_active_threads = &num_active_threads; cancel_info->num_active_threads_lock = @@ -611,17 +601,6 @@ _confirmation (int i, uint32_t step_id) job_ptr = job_buffer_ptr->job_array ; while (1) { -#ifdef USE_LOADLEVELER - if (step_id == SLURM_BATCH_SCRIPT) { - printf ("Cancel job_id=%s name=%s partition=%s [y/n]? ", - job_ptr[i].job_id, job_ptr[i].name, - job_ptr[i].partition); - } else { - printf ("Cancel step_id=%s.%u name=%s partition=%s [y/n]? ", - job_ptr[i].job_id, step_id, job_ptr[i].name, - job_ptr[i].partition); - } -#else if (step_id == SLURM_BATCH_SCRIPT) { printf ("Cancel job_id=%u name=%s partition=%s [y/n]? ", job_ptr[i].job_id, job_ptr[i].name, @@ -631,7 +610,6 @@ _confirmation (int i, uint32_t step_id) job_ptr[i].job_id, step_id, job_ptr[i].name, job_ptr[i].partition); } -#endif if (fgets(in_line, sizeof(in_line), stdin) == NULL) continue; if ((in_line[0] == 'y') || (in_line[0] == 'Y')) diff --git a/src/squeue/print.c b/src/squeue/print.c index 475c797632..e020fbcbd2 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -313,11 +313,7 @@ int _print_job_job_id(job_info_t * job, int width, bool right, char* suffix) _print_str("JOBID", width, right, true); else { char id[FORMAT_STRING_SIZE]; -#ifdef USE_LOADLEVELER - snprintf(id, FORMAT_STRING_SIZE, "%s", job->job_id); -#else snprintf(id, FORMAT_STRING_SIZE, "%u", job->job_id); -#endif _print_str(id, width, right, true); } if (suffix) @@ -1195,13 +1191,8 @@ int _print_step_id(job_step_info_t * step, int width, bool right, char* suffix) if (step == NULL) /* Print the Header instead */ _print_str("STEPID", width, right, true); else { -#ifdef USE_LOADLEVELER - snprintf(id, FORMAT_STRING_SIZE, "%s.%u", step->job_id, - step->step_id); -#else snprintf(id, FORMAT_STRING_SIZE, "%u.%u", step->job_id, step->step_id); -#endif _print_str(id, width, right, true); } if (suffix) @@ -1382,12 +1373,10 @@ static int _filter_job(job_info_t * job) filter = 1; iterator = list_iterator_create(params.job_list); while ((job_id = list_next(iterator))) { -#ifndef USE_LOADLEVELER if (*job_id == job->job_id) { filter = 0; break; } -#endif } list_iterator_destroy(iterator); if (filter == 1) @@ -1530,12 +1519,10 @@ static int _filter_step(job_step_info_t * step) filter = 1; iterator = list_iterator_create(params.job_list); while ((job_id = list_next(iterator))) { -#ifndef USE_LOADLEVELER if (*job_id == step->job_id) { filter = 0; break; } -#endif } list_iterator_destroy(iterator); if (filter == 1) @@ -1560,11 +1547,7 @@ static int _filter_step(job_step_info_t * step) filter = 1; iterator = list_iterator_create(params.step_list); while ((job_step_id = list_next(iterator))) { -#ifdef USE_LOADLEVELER - if (0 && -#else if ((job_step_id->job_id == step->job_id) && -#endif (job_step_id->step_id == step->step_id)) { filter = 0; break; -- GitLab From 9c2f259debadd1305f9aa8e41464a9e8054b5e9d Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 09:20:04 -0700 Subject: [PATCH 221/614] BGQ - better math for ntasks_per_node --- src/srun/opt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index ca2093b3bc..b387115efb 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -42,7 +42,6 @@ #endif #include /* strcpy, strncasecmp */ -#include #ifdef HAVE_STRINGS_H # include @@ -1675,8 +1674,8 @@ static void _opt_args(int argc, char **argv) there is a fraction so we try to stay in the allocation requested. */ - opt.ntasks_per_node = ceil((double)opt.ntasks - / (double)node_cnt); + opt.ntasks_per_node = + (opt.ntasks + node_cnt - 1) / node_cnt; figured = true; } -- GitLab From 594eb20713bb984173525c985c255994a0eb2a5a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 10:04:42 -0700 Subject: [PATCH 222/614] Fix build warnings in new launch plugin --- src/api/pmi_server.h | 1 + src/common/xcgroup_read_config.c | 4 ++++ src/plugins/launch/poe/launch_poe.c | 5 ++++- src/plugins/launch/slurm/launch_slurm.c | 5 ++++- src/plugins/switch/nrt/libpermapi/shr_64.c | 1 - src/srun/launch.h | 2 +- src/srun/opt.c | 3 ++- 7 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/api/pmi_server.h b/src/api/pmi_server.h index 2ab7fabf45..ce4cca0645 100644 --- a/src/api/pmi_server.h +++ b/src/api/pmi_server.h @@ -30,6 +30,7 @@ #define _PMI_SERVER_H #include "src/api/slurm_pmi.h" +#include "src/common/slurm_protocol_defs.h" /* Put the supplied kvs values into the common store */ extern int pmi_kvs_put(struct kvs_comm_set *kvs_set_ptr); diff --git a/src/common/xcgroup_read_config.c b/src/common/xcgroup_read_config.c index 48fdf7bbbf..51368c7ae2 100644 --- a/src/common/xcgroup_read_config.c +++ b/src/common/xcgroup_read_config.c @@ -34,6 +34,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#ifndef _ISOC99_SOURCE +# define _ISOC99_SOURCE /* strtof() */ +#endif + #include #include #include diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index adc6c0435d..2da3fb75c7 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -38,8 +38,11 @@ # include "config.h" #endif -#include +#include #include +#include +#include +#include #include "src/srun/launch.h" #include "src/common/env.h" diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 119ed16728..fe0aa130db 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -43,7 +43,10 @@ #include #include +#include "src/api/pmi_server.h" +#include "src/srun/allocate.h" #include "src/srun/launch.h" +#include "src/srun/multi_prog.h" #include "src/plugins/launch/slurm/task_state.h" @@ -309,7 +312,7 @@ static void _task_finish(task_exit_msg_t *msg) *local_global_rc = msg->return_code; } else if (WIFSIGNALED(msg->return_code)) { - const char *signal_str = strsignal(TERMSIG(msg->return_code)); + const char *signal_str = strsignal(WTERMSIG(msg->return_code)); char * core_str = ""; #ifdef WCOREDUMP if (WCOREDUMP(msg->return_code)) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 717724aea7..532720e76c 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -625,7 +625,6 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, { resource_allocation_response_msg_t *resp; job_request_t *pe_job_req = NULL; - job_info_t *pe_job_info = NULL; char *myargv[3] = { "poe", "poe", NULL }; info("got pe_rm_submit_job called %d", job_cmd.job_format); diff --git a/src/srun/launch.h b/src/srun/launch.h index 45a2af0a00..f909bed983 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -59,7 +59,7 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_init(void); extern int launch_fini(void); -extern int launch_p_setup_srun_opt(char **rest); +extern int launch_g_setup_srun_opt(char **rest); extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), diff --git a/src/srun/opt.c b/src/srun/opt.c index 5b06030757..849abafb7d 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -89,9 +89,10 @@ #include "src/api/pmi_server.h" +#include "src/srun/debugger.h" +#include "src/srun/launch.h" #include "src/srun/multi_prog.h" #include "src/srun/opt.h" -#include "src/srun/debugger.h" /* generic OPT_ definitions -- mainly for use with env vars */ #define OPT_NONE 0x00 -- GitLab From 6c86b22157a1c77b1dabb26453631ab1d3815bf3 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 10:19:53 -0700 Subject: [PATCH 223/614] META and NEWS changed for new 2.5 code --- META | 8 ++++---- NEWS | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/META b/META index 44b842aa6e..e379040674 100644 --- a/META +++ b/META @@ -8,10 +8,10 @@ Meta: 1 Name: slurm Major: 2 - Minor: 4 + Minor: 5 Micro: 0 - Version: 2.4.0 - Release: 0.pre4 + Version: 2.5.0 + Release: 0.pre1 ## # When changing API_CURRENT update src/common/slurm_protocol_common.h # with a new SLURM_PROTOCOL_VERSION signifing the old one and the version @@ -20,6 +20,6 @@ # and _get_slurm_version() # need to be updated also when changes are added also. ## - API_CURRENT: 24 + API_CURRENT: 25 API_AGE: 0 API_REVISION: 0 diff --git a/NEWS b/NEWS index 50d42342d4..56d5445672 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ 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.5.0.pre1 +============================= + * Changes in SLURM 2.4.0.pre5 ============================= -- Improve task binding logic by making fuller use of HWLOC library, -- GitLab From 93353c948d4ae02f296740e612a2e4b3fac8fc7c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 10:25:31 -0700 Subject: [PATCH 224/614] META and NEWS updated for 2.4.0-rc1 --- META | 2 +- NEWS | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/META b/META index 44b842aa6e..63e8b6e028 100644 --- a/META +++ b/META @@ -11,7 +11,7 @@ Minor: 4 Micro: 0 Version: 2.4.0 - Release: 0.pre4 + Release: 0.rc1 ## # When changing API_CURRENT update src/common/slurm_protocol_common.h # with a new SLURM_PROTOCOL_VERSION signifing the old one and the version diff --git a/NEWS b/NEWS index 50d42342d4..ff97b91dd4 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,7 @@ 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.4.0.pre5 +* Changes in SLURM 2.4.0.rc1 ============================= -- Improve task binding logic by making fuller use of HWLOC library, especially with respect to Opteron 6000 series processors. Work contributed -- GitLab From 616bd4307105c81bcf2275a25bc7cacfb15303bc Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 10:38:45 -0700 Subject: [PATCH 225/614] update META for new 2.3.5 tag --- META | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/META b/META index 1feac4afa4..10c7300d85 100644 --- a/META +++ b/META @@ -9,8 +9,8 @@ Name: slurm Major: 2 Minor: 3 - Micro: 4 - Version: 2.3.4 + Micro: 5 + Version: 2.3.5 Release: 1 ## # When changing API_CURRENT update src/common/slurm_protocol_common.h -- GitLab From f9d5f45275259fe59c5f06d770f33d531bcf76c0 Mon Sep 17 00:00:00 2001 From: Don Lipari Date: Wed, 9 May 2012 08:55:57 -0700 Subject: [PATCH 226/614] Reset priority of system held jobs when dependency is satisfied The symptom is that SLURM schedules lower priority jobs to run when higher priority, dependent jobs have their dependencies satisfied. This happens because dependent jobs still have a priority of 1 when the job queue is sorted in the schedule() function. The proposed fix forces jobs to have their priority updated when their dependencies are satisfied. --- src/slurmctld/job_mgr.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 5338e4edae..2c58a077f6 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -9088,6 +9088,7 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) struct job_details *detail_ptr = job_ptr->details; time_t now = time(NULL); int depend_rc; + bool independent = false; /* Test dependencies first so we can cancel jobs before dependent * job records get purged (e.g. afterok, afternotok) */ @@ -9128,11 +9129,14 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) /* Job is eligible to start now */ if (job_ptr->state_reason == WAIT_DEPENDENCY) { job_ptr->state_reason = WAIT_NO_REASON; + independent = true; xfree(job_ptr->state_desc); } if ((detail_ptr && (detail_ptr->begin_time == 0) && (job_ptr->priority != 0))) { detail_ptr->begin_time = now; + if (independent) + _set_job_prio(job_ptr); } else if (job_ptr->state_reason == WAIT_TIME) { job_ptr->state_reason = WAIT_NO_REASON; xfree(job_ptr->state_desc); -- GitLab From 9e7cf612648d010bb14b59166bf893cbe904daf6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 9 May 2012 09:17:18 -0700 Subject: [PATCH 227/614] Revert some v2.3 mods not applicable to v2.4 --- src/slurmctld/job_mgr.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 2c58a077f6..5338e4edae 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -9088,7 +9088,6 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) struct job_details *detail_ptr = job_ptr->details; time_t now = time(NULL); int depend_rc; - bool independent = false; /* Test dependencies first so we can cancel jobs before dependent * job records get purged (e.g. afterok, afternotok) */ @@ -9129,14 +9128,11 @@ extern bool job_independent(struct job_record *job_ptr, int will_run) /* Job is eligible to start now */ if (job_ptr->state_reason == WAIT_DEPENDENCY) { job_ptr->state_reason = WAIT_NO_REASON; - independent = true; xfree(job_ptr->state_desc); } if ((detail_ptr && (detail_ptr->begin_time == 0) && (job_ptr->priority != 0))) { detail_ptr->begin_time = now; - if (independent) - _set_job_prio(job_ptr); } else if (job_ptr->state_reason == WAIT_TIME) { job_ptr->state_reason = WAIT_NO_REASON; xfree(job_ptr->state_desc); -- GitLab From 7ca495609577e4b402283ae3faf91ad33fcd69a1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 10:56:26 -0700 Subject: [PATCH 228/614] updated for 2.3.6 (if it ever happens) --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index 81690c2256..ebfbd12763 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ 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.3.6 +======================== + * Changes in SLURM 2.3.5 ======================== -- Improve support for overlapping advanced reservations. Patch from -- GitLab From 4ccd5fe1452dc10afb2a70541bef2e22ea8313f8 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 10:58:35 -0700 Subject: [PATCH 229/614] update news for rc2 --- NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/NEWS b/NEWS index c15f8f0d6c..828273259e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,9 @@ 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.4.0.rc2 +============================= + * Changes in SLURM 2.4.0.rc1 ============================= -- Improve task binding logic by making fuller use of HWLOC library, -- GitLab From 8349a132173b926fd40c2827c5fc6c441b612d4d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 12:37:34 -0700 Subject: [PATCH 230/614] Cosmetic mods --- src/sbatch/sbatch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index 97e311fdaa..0af471c393 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -262,7 +262,7 @@ static int _check_cluster_specific_settings(job_desc_msg_t *req) /* Returns 0 on success, -1 on failure */ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) { - int i; + int i; extern char **environ; if (opt.jobid_set) @@ -416,7 +416,7 @@ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) "SLURM_GET_USER_ENV", "1"); } - if(opt.distribution == SLURM_DIST_ARBITRARY) { + if (opt.distribution == SLURM_DIST_ARBITRARY) { env_array_overwrite_fmt(&desc->environment, "SLURM_ARBITRARY_NODELIST", "%s", desc->req_nodes); -- GitLab From cf564e1216f51db4a5690b4a9c9f094b7a43ef3e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 13:17:49 -0700 Subject: [PATCH 231/614] Zero node jobs can use partition with no nodes. Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. --- NEWS | 2 ++ src/sbatch/sbatch.c | 2 ++ src/slurmctld/job_scheduler.c | 8 +++++--- src/slurmctld/node_scheduler.c | 26 +++++++++++++++++++++++++- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 828273259e..0c2cc45df9 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.4.0.rc2 ============================= + -- Cray - Improve support for zero compute note resource allocations. + Partition used can now be configured with no nodes nodes. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index 0af471c393..939b9472eb 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -360,6 +360,8 @@ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) desc->overcommit = opt.overcommit; } else if (opt.cpus_set) desc->min_cpus = opt.ntasks * opt.cpus_per_task; + else if (opt.nodes_set && (opt.min_nodes == 0)) + desc->min_cpus = 0; else desc->min_cpus = opt.ntasks; diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 2c5619013e..8057053622 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -584,9 +584,11 @@ extern int schedule(uint32_t job_limit) job_ptr->partition); continue; } - if (bit_overlap(avail_node_bitmap, - job_ptr->part_ptr->node_bitmap) == 0) { - /* All nodes DRAIN, DOWN, or + i = bit_overlap(avail_node_bitmap, + job_ptr->part_ptr->node_bitmap); + if (( job_ptr->details && (i < job_ptr->details->max_nodes)) || + (!job_ptr->details && (i == 0))) { + /* Too many nodes DRAIN, DOWN, or * reserved for jobs in higher priority partition */ job_ptr->state_reason = WAIT_RESOURCES; debug3("sched: JobId=%u. State=%s. Reason=%s. " diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index d9e32f1762..433cf2382c 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -761,7 +761,25 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, else select_mode = SELECT_MODE_RUN_NOW; - if (node_set_size == 0) { + if (job_ptr->details->max_nodes == 0) { + avail_bitmap = bit_alloc(node_record_count); + if (!avail_bitmap) + fatal("bit_alloc: malloc failure"); + pick_code = select_g_job_test(job_ptr, + avail_bitmap, + 0, 0, 0, + select_mode, + preemptee_candidates, + preemptee_job_list); + + if (pick_code == SLURM_SUCCESS) { + *select_bitmap = avail_bitmap; + return SLURM_SUCCESS; + } else { + bit_free(avail_bitmap); + return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE; + } + } else if (node_set_size == 0) { info("_pick_best_nodes: empty node set for selection"); return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE; } @@ -1770,6 +1788,12 @@ static int _build_node_list(struct job_record *job_ptr, } } + if (job_ptr->details->max_nodes == 0) { + *node_set_pptr = NULL; + *node_set_size = 0; + return SLURM_SUCCESS; + } + node_set_inx = 0; node_set_ptr = (struct node_set *) xmalloc(sizeof(struct node_set) * 2); -- GitLab From 08b5678380abee81a57f6b4e5ee6e83ec7861c39 Mon Sep 17 00:00:00 2001 From: alejluther Date: Tue, 15 May 2012 16:20:39 +0300 Subject: [PATCH 232/614] Avoiding a slurmctld crash when scheduling problems due to resources. Setting an ADMIN hold instead. --- src/plugins/select/cons_res/dist_tasks.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index f8b23adc2c..d56af783f0 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -499,7 +499,11 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, } if (prev_cpus == cpus) { /* we're stuck! */ - fatal("cons_res: sync loop not progressing"); + job_ptr->priority = 0; + job_ptr->state_reason = WAIT_HELD; + error("cons_res: sync loop not progressing, " + "job %u", job_ptr->job_id); + return -1; } } /* clear the rest of the cores in each socket -- GitLab From 9d9893a95f1316c420abca18d3e03a1cfd0d8471 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 14:10:22 -0700 Subject: [PATCH 233/614] Eliminate memory leak on error condition in select/cons_res --- src/plugins/select/cons_res/dist_tasks.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index d56af783f0..3feafe8501 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -402,7 +402,7 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, * The CPU array contains the distribution of CPUs, which can include * virtual CPUs (hyperthreads) */ -static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, +static int _cyclic_sync_core_bitmap(struct job_record *job_ptr, const uint16_t cr_type) { uint32_t c, i, j, s, n, *sock_start, *sock_end, size, csize, core_cnt; @@ -411,9 +411,10 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, bitstr_t *core_map; bool *sock_used, alloc_cores = false, alloc_sockets = false; uint16_t ntasks_per_core = 0xffff; + int error_code = SLURM_SUCCESS; if ((job_res == NULL) || (job_res->core_bitmap == NULL)) - return; + return error_code; if (cr_type & CR_CORE) alloc_cores = true; @@ -502,8 +503,9 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, job_ptr->priority = 0; job_ptr->state_reason = WAIT_HELD; error("cons_res: sync loop not progressing, " - "job %u", job_ptr->job_id); - return -1; + "holding job %u", job_ptr->job_id); + error_code = SLURM_ERROR; + goto fini; } } /* clear the rest of the cores in each socket @@ -532,9 +534,10 @@ static void _cyclic_sync_core_bitmap(struct job_record *job_ptr, /* advance 'c' to the beginning of the next node */ c += sockets * cps; } - xfree(sock_start); +fini: xfree(sock_start); xfree(sock_end); xfree(sock_used); + return error_code; } @@ -640,11 +643,11 @@ extern int cr_dist(struct job_record *job_ptr, const uint16_t cr_type) case SLURM_DIST_BLOCK_CYCLIC: case SLURM_DIST_CYCLIC_CYCLIC: case SLURM_DIST_UNKNOWN: - _cyclic_sync_core_bitmap(job_ptr, cr_type); + error_code = _cyclic_sync_core_bitmap(job_ptr, cr_type); break; default: error("select/cons_res: invalid task_dist entry"); return SLURM_ERROR; } - return SLURM_SUCCESS; + return error_code; } -- GitLab From 01d4551901718f91fa0e848b3cd0cdcbbfaa062c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 16 May 2012 14:51:14 -0700 Subject: [PATCH 234/614] Correction to commit cf564e1216f51db4a5690b4a9c9f094b7a43ef3 --- src/slurmctld/node_scheduler.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 433cf2382c..3fb3fe14de 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -761,7 +761,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, else select_mode = SELECT_MODE_RUN_NOW; - if (job_ptr->details->max_nodes == 0) { + if ((job_ptr->details->min_nodes == 0) && + (job_ptr->details->max_nodes == 0)) { avail_bitmap = bit_alloc(node_record_count); if (!avail_bitmap) fatal("bit_alloc: malloc failure"); @@ -1787,8 +1788,8 @@ static int _build_node_list(struct job_record *job_ptr, return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE; } } - - if (job_ptr->details->max_nodes == 0) { + if ((job_ptr->details->min_nodes == 0) && + (job_ptr->details->max_nodes == 0)) { *node_set_pptr = NULL; *node_set_size = 0; return SLURM_SUCCESS; -- GitLab From 102bca54967a36145004832135d9723e0b2144e6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 16:11:57 -0700 Subject: [PATCH 235/614] correctly set up io for launch/slurm --- src/plugins/launch/slurm/launch_slurm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index fe0aa130db..a6d063e2f0 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -398,7 +398,6 @@ extern int launch_p_step_launch( local_srun_job = job; local_global_rc = global_rc; - memcpy(&launch_params.local_fds, cio_fds, sizeof(slurm_step_io_fds_t)); task_state = task_state_create(opt.ntasks); @@ -436,6 +435,8 @@ extern int launch_p_step_launch( launch_params.spank_job_env = opt.spank_job_env; launch_params.spank_job_env_size = opt.spank_job_env_size; + memcpy(&launch_params.local_fds, cio_fds, sizeof(slurm_step_io_fds_t)); + if (MPIR_being_debugged) { launch_params.parallel_debug = true; pmi_server_max_threads(1); -- GitLab From a915b725b4ea493d768329f2e2e2223b6bd02aae Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 16 May 2012 16:36:50 -0700 Subject: [PATCH 236/614] correct initialization. --- src/srun/srun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/srun/srun.c b/src/srun/srun.c index 9377898200..71e93326c7 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -196,7 +196,7 @@ int srun(int ac, char **av) pthread_t signal_thread = (pthread_t) 0; bool got_alloc = false; int shepard_fd = -1; - slurm_step_io_fds_t cio_fds; + slurm_step_io_fds_t cio_fds = SLURM_STEP_IO_FDS_INITIALIZER; env->stepid = -1; env->procid = -1; @@ -470,7 +470,7 @@ relaunch: error("Failure in local plugin stack"); exit(error_exit); } - memset(&cio_fds, 0, sizeof(slurm_step_io_fds_t)); + _set_stdio_fds(job, &cio_fds); if (launch_g_step_launch(job, &cio_fds, &global_rc, -- GitLab From b9df5a19dca25f52fd10f6b0a99598ded1955ad0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 17 May 2012 08:18:15 -0700 Subject: [PATCH 237/614] Modified test to work with select/serial --- testsuite/expect/test1.60 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/test1.60 b/testsuite/expect/test1.60 index 46af3e4617..1bdf1441cf 100755 --- a/testsuite/expect/test1.60 +++ b/testsuite/expect/test1.60 @@ -147,7 +147,11 @@ if {[test_front_end] != 0} { # Spawn a program that generates "node_id" (%n) in stdout file names # and confirm they are created # -set task_count [expr $node_count * 2] +if {[test_serial]} { + set task_count $node_count +} else { + set task_count [expr $node_count * 2] +} set timeout $max_job_delay set srun_pid [spawn $srun -l --output=$file_out_n -N $node_count -n $task_count -O -v -t1 $bin_echo hello] expect { -- GitLab From cb1d625804664019553f918d490af0ea416b9189 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 17 May 2012 08:25:09 -0700 Subject: [PATCH 238/614] Modify test for select/serial --- testsuite/expect/test1.45 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/testsuite/expect/test1.45 b/testsuite/expect/test1.45 index 208355e79b..6f5796dfda 100755 --- a/testsuite/expect/test1.45 +++ b/testsuite/expect/test1.45 @@ -38,9 +38,6 @@ set exit_code 0 set file_in "test$test_id.input" set file_out "test$test_id.output" set job_id 0 -set min_nodes 1 -set max_nodes 3 -set num_procs 6 set num_nodes_test1 "" set num_nodes_test2 "" set num_nodes_test3 "" @@ -54,11 +51,17 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code -} - -if { [test_xcpu] } { +} elseif { [test_xcpu] } { send_user "\nWARNING: This test is incompatible with XCPU systems\n" - exit 0 + exit $exit_code +} elseif {[test_serial]} { + set min_nodes 1 + set max_nodes 1 + set num_procs 1 +} else { + set min_nodes 1 + set max_nodes 3 + set num_procs 6 } # -- GitLab From b77ebb3e620d32c3cec16f9ba8a4b8326b9026e5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 17 May 2012 09:24:29 -0700 Subject: [PATCH 239/614] Various web page updates --- doc/html/download.shtml | 3 +- doc/html/news.shtml | 77 +++++++++++++---------------------------- doc/html/slurm.shtml | 14 ++++---- 3 files changed, 33 insertions(+), 61 deletions(-) diff --git a/doc/html/download.shtml b/doc/html/download.shtml index fbc60d61c4..1eaea1b65c 100644 --- a/doc/html/download.shtml +++ b/doc/html/download.shtml @@ -125,6 +125,7 @@ http://io-watchdog.googlecode.com/files/io-watchdog-0.6.tar.bz2
    -

    Last modified 15 May 2012

    +

    Last modified 17 May 2012

    diff --git a/doc/html/news.shtml b/doc/html/news.shtml index f757d9e956..350b31c116 100644 --- a/doc/html/news.shtml +++ b/doc/html/news.shtml @@ -4,59 +4,16 @@

    Index

    -

    Major Updates in SLURM Version 2.1

    -

    SLURM Version 2.1 was released in January 2010. -Major enhancements include: -

      -
    • Optimized resource allocation based upon network topology (e.g. -hierarchical switches).
    • -
    • Support for job preemption based upon job Quality of Service (QOS) in -addition to queue priority.
    • -
    • Support for time limits on individual job steps (in addition to the -job time limit).
    • -
    • Improve fault-tolerance in recognizing compute node reboots.
    • -
    • Add sinfo and squeue information about specific cores allocated.
    • -
    • Support for Solaris (OpenSolaris build 119).
    • -
    - -

    Major Updates in SLURM Version 2.2

    -

    SLURM Version 2.2 was released in December 2010. -Major enhancements include: -

      -
    • Permit resource allocations (jobs) to shrink in size.
    • -
    • Add support for job time limit range. The job's time limit will get it's -maximum time limit unless reducing it to a lower value within the range will -permit it to start earlier via backfill scheduling.
    • -
    • Add support for allocation of generic resources (e.g. GPUs).
    • -
    • Add a job submission plugin that can be use to set site-specific default -job parameters including default partition (based upon job size, etc.).
    • -
    • Add support for TotalView partitial attach (debugger attach to selected -tasks only).
    • -
    • Add support for draining partitions (job queues) with alternate partition -specification available.
    • -
    • The MySQL database has been restructured for a 50-75% performance -improvement.
    • -
    • RPCs have been modified to prevent job loss on SLURM upgrades and permit -different versions of the commands and deamons to interoperate.
    • -
    • Major enhancements made to PostGreSQL database plugin (still beta).
    • -
    • Permit SLURM commands to operate between clusters (e.g. status jobs on a -different cluster or submit a job on one cluster to run on another).
    • -
    • Major enhancements for high-throughput computing. Job throughput -rates now exceed 120,000 jobs per hour with bursts of job submissions at -several times that rate.
    • -
    -

    Major Updates in SLURM Version 2.3

    SLURM Version 2.2 was released in September 2011. -Major enhancements currently planned include: +Major enhancements include:

    • Support for Cray XT and XE computers (integration with ALPS/BASIL).
    • Support for BlueGene/Q computers (partially implemented).
    • @@ -69,22 +26,37 @@ in version 2.2).

    Major Updates in SLURM Version 2.4

    -

    SLURM Version 2.4 release is planned for June 2012. -Major enhancements currently planned include: +

    SLURM Version 2.4 was release in June 2012. +Major enhancements include:

    • Major improvement in job throuhgput: Up to 500 jobs per second (actual throughput depends upon configuration, hardware, etc.).
    • Support for BlueGene/Q computers (fully implemented).
    • Resource reservations with a node count specification will select those nodes optimized for the system topology.
    • -
    • Support for SLURM commands operating over a LoadLeveler resource manager.
    • Support for job and step constraints with resource counts (e.g. a job request for two nodes with a feature of "Intel" plus four nodes with a feature of "AMD").
    • New tool sdiag reports scheduling statistics.
    • +
    • Support for SLURM commands operating over a LoadLeveler resource manager +(in branch of SLURM code, not in main release).
    -

    Major Updates in SLURM Version 2.5 and beyond

    +

    Major Updates in SLURM Version 2.5

    +

    SLURM Version 2.5 is scheduled for release in November 2012. +Major enhancements planned include: +

      +
    • Recording power usage information for each job.
    • +
    • Job specification of desired CPU frequency, which will effect it's +power usage and possibly its execution cost.
    • +
    • Integration with FlexLM license management.
    • +
    • Integration with IBM's Parallel Environment including POE (Parallel +Operating Environment) and NRT (Network Resource Table) API.
    • +
    • Highly optimized thoughput for serial jobs in a new "select/serial" +plugin.
    • +
    + +

    Major Updates in SLURM Version 2.6 and beyond

    Detailed plans for release dates and contents of additional SLURM releases have not been finalized. Anyone desiring to perform SLURM development should notify slurm-dev@schedmd.com @@ -93,7 +65,6 @@ to coordinate activities. Future development plans includes:

  • Faster and more powerful job step management support (e.g. step dependencies).
  • Improved user support for fault-tolerance (e.g. "hot spare" resources).
  • -
  • Integration with FlexLM license management.
  • Numerous enhancements to advanced resource reservations (e.g. start or end the reservation early depending upon the workload).
  • Add Kerberos credential support including credential forwarding @@ -126,6 +97,6 @@ trojan library, then that library will be used by the SLURM daemon with unpredictable results. This was fixed in SLURM version 2.1.14.
  • -

    Last modified 10 May 2012

    +

    Last modified 17 May 2012

    diff --git a/doc/html/slurm.shtml b/doc/html/slurm.shtml index 559432ee5e..1b1afed814 100644 --- a/doc/html/slurm.shtml +++ b/doc/html/slurm.shtml @@ -32,9 +32,8 @@ or supporting sophisticated respects:
    • It is designed to operate in a heterogeneous cluster with up to millions of -processors (2.1 million sockets scheduled on an emulated IBM BlueGene/Q system).
    • -
    • It can sustain a throughput rate of over 120,000 jobs per hour with -bursts of job submissions at several times that rate.
    • +processors. +
    • It can accept 1,000 job submissions per second and fully execute 500 simple jobs per second (the rate is dependent upon hardware and system configuration).
    • Its source code is freely available under the GNU General Public License.
    • It is portable; written in C with a GNU autoconf configuration engine. @@ -50,6 +49,10 @@ for the motivated end user to understand the source and add functionality.
    • SLURM provides resource management on many of the most powerful computers in the world including:

        +
      • Sequoia +at Lawrence Livermore National Laboratory. +A 20-petaflop IBM BlueGene/Q system with 98,304 compute nodes and 1.6 million +cores.
      • Tianhe-1A designed by The National University of Defence Technology (NUDT) @@ -81,9 +84,6 @@ named after Monte Rosa in the Swiss-Italian Alps, elevation 4,634m. 3,688 AMD hexa-core Opteron @ 2.4 GHz, 28.8 TB DDR2 RAM, 290 TB Disk, 9.6 GB/s interconnect bandwidth (Seastar).
      • -
      • EKA at Computational Research Laboratories, -India with 14,240 Xeon processors and Infiniband interconnect
      • -
      • MareNostrum a Linux cluster at the Barcelona Supercomputer Center with 10,240 PowerPC processors and a Myrinet switch
      • @@ -95,6 +95,6 @@ for molecular dynamics simulation using 512 custom-designed ASICs and a three-dimensional torus interconnect.
      -

      Last modified 26 November 2011

      +

      Last modified 17 May 2012

      -- GitLab From 5d27f77ee804869713cf0a6a22e7dbe098fe6f13 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 09:58:01 -0700 Subject: [PATCH 240/614] remove unneeded srun.h --- src/srun/Makefile.am | 2 +- src/srun/Makefile.in | 2 +- src/srun/srun.c | 1 - src/srun/srun.h | 43 ------------------------------------------- 4 files changed, 2 insertions(+), 46 deletions(-) delete mode 100644 src/srun/srun.h diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index afad426c28..bded4d2934 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -8,7 +8,7 @@ INCLUDES = -I$(top_srcdir) bin_PROGRAMS = srun srun_SOURCES = \ - srun.c srun.h \ + srun.c \ opt.c opt.h \ srun_job.c srun_job.h \ srun_pty.c srun_pty.h \ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 6f8e21a4df..97fad1188d 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -321,7 +321,7 @@ AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* INCLUDES = -I$(top_srcdir) srun_SOURCES = \ - srun.c srun.h \ + srun.c \ opt.c opt.h \ srun_job.c srun_job.h \ srun_pty.c srun_pty.h \ diff --git a/src/srun/srun.c b/src/srun/srun.c index 71e93326c7..7651279e17 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -93,7 +93,6 @@ #include "src/srun/srun_job.h" #include "src/srun/opt.h" #include "src/srun/debugger.h" -#include "src/srun/srun.h" #include "src/srun/srun_pty.h" #include "src/srun/multi_prog.h" #include "src/api/pmi_server.h" diff --git a/src/srun/srun.h b/src/srun/srun.h deleted file mode 100644 index 135b631b68..0000000000 --- a/src/srun/srun.h +++ /dev/null @@ -1,43 +0,0 @@ -/*****************************************************************************\ - * src/srun/srun.h - header for external functions in srun.c - ***************************************************************************** - * Copyright (C) 2006 The Regents of the University of California. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Mark Grondona . - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. -\*****************************************************************************/ - -#ifndef _HAVE_SRUN_H -#define _HAVE_SRUN_H - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include - -#include "src/api/step_io.h" -#include "src/srun/srun_job.h" - -void srun_set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds); - -#endif /* !_HAVE_SRUN_H */ -- GitLab From b4ede32b24c5e04171521673b6a11dad1ddf0f79 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 09:58:37 -0700 Subject: [PATCH 241/614] fix static and extern var definitions. --- src/plugins/launch/slurm/launch_slurm.c | 1 - src/srun/opt.h | 2 ++ src/srun/srun.c | 10 ++-------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index a6d063e2f0..0d124b9a70 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -94,7 +94,6 @@ static srun_job_t *local_srun_job = NULL; static uint32_t *local_global_rc = NULL; static task_state_t task_state; -static bool srun_max_timer = false; static time_t launch_start_time; static bool retry_step_begin = false; static int retry_step_cnt = 0; diff --git a/src/srun/opt.h b/src/srun/opt.h index bd40c84681..a9e4e2ff90 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -232,6 +232,8 @@ extern opt_t opt; extern int error_exit; /* exit code for slurm errors */ extern int immediate_exit; /* exit code for --imediate option & busy */ +extern bool srun_max_timer; +extern bool srun_shutdown; extern int sig_array[]; /* return whether any constraints were specified by the user diff --git a/src/srun/srun.c b/src/srun/srun.c index 7651279e17..dea9c95700 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -119,15 +119,9 @@ #define TYPE_TEXT 1 #define TYPE_SCRIPT 2 -mpi_plugin_client_info_t mpi_job_info[1]; static struct termios termdefaults; -uint32_t global_rc = 0; -srun_job_t *job = NULL; - -#define MAX_STEP_RETRIES 4 -time_t launch_start_time; -bool retry_step_begin = false; -int retry_step_cnt = 0; +static uint32_t global_rc = 0; +static srun_job_t *job = NULL; bool srun_max_timer = false; bool srun_shutdown = false; -- GitLab From d24a4778ecda92d175f54503103be44810b22813 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 17 May 2012 10:50:42 -0700 Subject: [PATCH 242/614] Test mods to support select/serial --- testsuite/expect/test9.1 | 11 ++++++----- testsuite/expect/test9.2 | 11 ++++++----- testsuite/expect/test9.3 | 11 ++++++----- testsuite/expect/test9.4 | 11 ++++++----- testsuite/expect/test9.5 | 11 ++++++----- testsuite/expect/test9.6 | 11 ++++++----- 6 files changed, 36 insertions(+), 30 deletions(-) diff --git a/testsuite/expect/test9.1 b/testsuite/expect/test9.1 index e3bf2689ec..aaa56576b6 100755 --- a/testsuite/expect/test9.1 +++ b/testsuite/expect/test9.1 @@ -50,12 +50,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-6 - } + set node_cnt 1-6 } set other_opts "-O" diff --git a/testsuite/expect/test9.2 b/testsuite/expect/test9.2 index c7b9535d6e..7df6c0b0ed 100755 --- a/testsuite/expect/test9.2 +++ b/testsuite/expect/test9.2 @@ -49,12 +49,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 } set other_opts "-O" diff --git a/testsuite/expect/test9.3 b/testsuite/expect/test9.3 index 7e41c4db73..81a5e9a4d6 100755 --- a/testsuite/expect/test9.3 +++ b/testsuite/expect/test9.3 @@ -50,12 +50,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 } set other_opts "-O" diff --git a/testsuite/expect/test9.4 b/testsuite/expect/test9.4 index 6f6f4635c5..fe16076cb1 100755 --- a/testsuite/expect/test9.4 +++ b/testsuite/expect/test9.4 @@ -56,12 +56,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 } set other_opts "-O" diff --git a/testsuite/expect/test9.5 b/testsuite/expect/test9.5 index b8f2936c2b..8608cc1e81 100755 --- a/testsuite/expect/test9.5 +++ b/testsuite/expect/test9.5 @@ -48,12 +48,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 } set other_opts "-O" diff --git a/testsuite/expect/test9.6 b/testsuite/expect/test9.6 index 9c50cbc9ad..83c22d31bf 100755 --- a/testsuite/expect/test9.6 +++ b/testsuite/expect/test9.6 @@ -50,12 +50,13 @@ if { [test_bluegene] } { } else { set node_cnt 1-2048 } +} elseif { [test_serial] } { + set node_cnt 1 + set task_cnt 1 +} elseif { [test_xcpu] } { + set node_cnt 1-1 } else { - if { [test_xcpu] } { - set node_cnt 1-1 - } else { - set node_cnt 1-4 - } + set node_cnt 1-4 } set other_opts "-O" -- GitLab From ae5afb937fe7220878da8253c99033fe8270003b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 17 May 2012 11:52:32 -0700 Subject: [PATCH 243/614] Correction in logic for mulit-prog argument parsing Previous code could result in invalid memory reference. --- src/srun/opt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index b387115efb..59352aa536 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1549,7 +1549,6 @@ static void _load_multi(int *argc, char **argv) } close(config_fd); - argv[*argc+1] = (char *) xmalloc(sizeof(char *)); for (i = *argc+1; i > 1; i--) argv[i] = argv[i-1]; argv[1] = data_buf; @@ -1761,7 +1760,9 @@ static void _opt_args(int argc, char **argv) #endif - opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + /* One extra pointer is for a trailing NULL and a + * second extra pointer is for arguments from the multi-prog file */ + opt.argv = (char **) xmalloc((opt.argc + 2) * sizeof(char *)); #if defined HAVE_BG && !defined HAVE_BG_L_P #if defined HAVE_BG_FILES -- GitLab From 294cde45e1b9cc574c6b415baa4774a080815ef6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 12:11:36 -0700 Subject: [PATCH 244/614] get rid of extra, unneeded, parameter --- src/plugins/launch/poe/launch_poe.c | 2 +- src/plugins/launch/runjob/launch_runjob.c | 8 +++----- src/plugins/launch/slurm/launch_slurm.c | 2 +- src/srun/launch.c | 7 +++---- src/srun/launch.h | 2 +- src/srun/srun.c | 3 +-- 6 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index 2da3fb75c7..c0e699f8e0 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -710,7 +710,7 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_p_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) + uint32_t *global_rc, bool got_alloc) { int rc = 0; pid_t pid; diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c index 508fc364e3..dd93607056 100644 --- a/src/plugins/launch/runjob/launch_runjob.c +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -81,7 +81,6 @@ const char plugin_type[] = "launch/runjob"; const uint32_t plugin_version = 101; static srun_job_t *local_srun_job = NULL; -static bool *local_srun_shutdown = NULL; static void _send_step_complete_rpc(int step_rc) { @@ -164,7 +163,7 @@ static void *_msg_thr_internal(void *arg) (void) pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL); (void) pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL); - while (!*local_srun_shutdown) { + while (!srun_shutdown) { newsockfd = slurm_accept_msg_conn(*slurmctld_fd_ptr, &cli_addr); if (newsockfd == SLURM_SOCKET_ERROR) { if (errno != EINTR) @@ -363,12 +362,11 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_p_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) + uint32_t *global_rc, bool got_alloc) { pthread_t msg_thread; local_srun_job = job; - local_srun_shutdown = srun_shutdown; msg_thread = _spawn_msg_handler(); @@ -378,7 +376,7 @@ extern int launch_p_step_launch( cio_fds->err.fd); _send_step_complete_rpc(*global_rc); if (msg_thread) { - *local_srun_shutdown = true; + srun_shutdown = true; pthread_cancel(msg_thread); pthread_join(msg_thread, NULL); } diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 0d124b9a70..97efc7453e 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -389,7 +389,7 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_p_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) + uint32_t *global_rc, bool got_alloc) { slurm_step_launch_params_t launch_params; slurm_step_launch_callbacks_t callbacks; diff --git a/src/srun/launch.c b/src/srun/launch.c index 8de15f4d75..ab525cbe70 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -51,8 +51,7 @@ typedef struct { sig_atomic_t *destroy_job); int (*step_launch) (srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, - bool *srun_shutdown); + uint32_t *global_rc, bool got_alloc); int (*step_terminate) (void); void (*print_status) (void); void (*fwd_signal) (int signal); @@ -451,13 +450,13 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, extern int launch_g_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, bool *srun_shutdown) + uint32_t *global_rc, bool got_alloc) { if (launch_init() < 0) return SLURM_ERROR; return (*(plugin_context->ops.step_launch))(job, cio_fds, global_rc, - got_alloc, srun_shutdown); + got_alloc); } extern int launch_g_step_terminate(void) diff --git a/src/srun/launch.h b/src/srun/launch.h index f909bed983..5340f6a628 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -66,7 +66,7 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, sig_atomic_t *destroy_job); extern int launch_g_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc, bool *srun_shutdown); + uint32_t *global_rc, bool got_alloc); extern int launch_g_step_terminate(void); diff --git a/src/srun/srun.c b/src/srun/srun.c index dea9c95700..9da520a5ca 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -466,8 +466,7 @@ relaunch: _set_stdio_fds(job, &cio_fds); - if (launch_g_step_launch(job, &cio_fds, &global_rc, - got_alloc, &srun_shutdown) == -1) + if (launch_g_step_launch(job, &cio_fds, &global_rc, got_alloc) == -1) goto relaunch; if (got_alloc) { -- GitLab From 3e09abd059bb8c699606aa262c737770fa69476b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 12:12:24 -0700 Subject: [PATCH 245/614] increment allocation size by 1 for multi-prog programs so we don't go over the allocated space. --- src/plugins/launch/poe/launch_poe.c | 5 ++++- src/plugins/launch/runjob/launch_runjob.c | 5 ++++- src/plugins/launch/slurm/launch_slurm.c | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index c0e699f8e0..689940b68f 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -686,7 +686,10 @@ extern int launch_p_setup_srun_opt(char **rest) opt.argc++; - opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + /* We need to do +2 here just incase multi-prog is needed (we + add an extra argv on so just make space for it). + */ + opt.argv = (char **) xmalloc((opt.argc + 2) * sizeof(char *)); opt.argv[0] = xstrdup("poe"); /* Set default job name to the executable name rather than diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c index dd93607056..7b707a8a9b 100644 --- a/src/plugins/launch/runjob/launch_runjob.c +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -274,7 +274,10 @@ extern int launch_p_setup_srun_opt(char **rest) opt.argc += command_pos; } - opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + /* We need to do +2 here just incase multi-prog is needed (we + add an extra argv on so just make space for it). + */ + opt.argv = (char **) xmalloc((opt.argc + 2) * sizeof(char *)); if (!opt.test_only) { i = 0; diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 97efc7453e..3debc85ca5 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -369,7 +369,10 @@ extern int launch_p_setup_srun_opt(char **rest) if (opt.debugger_test && opt.parallel_debug) MPIR_being_debugged = 1; - opt.argv = (char **) xmalloc((opt.argc + 1) * sizeof(char *)); + /* We need to do +2 here just incase multi-prog is needed (we + add an extra argv on so just make space for it). + */ + opt.argv = (char **) xmalloc((opt.argc + 2) * sizeof(char *)); return 0; } -- GitLab From af0bb8ff8978c0347c282a32c427dffd5c9be1e4 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 17 May 2012 16:33:24 -0700 Subject: [PATCH 246/614] Test updates for use with select/serial --- testsuite/expect/test1.80 | 3 +++ testsuite/expect/test1.81 | 3 +++ testsuite/expect/test1.82 | 11 ++++++----- testsuite/expect/test1.83 | 9 +++++---- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/testsuite/expect/test1.80 b/testsuite/expect/test1.80 index 1233faacc3..604382ae46 100755 --- a/testsuite/expect/test1.80 +++ b/testsuite/expect/test1.80 @@ -43,6 +43,9 @@ print_header $test_id if { [test_front_end] } { send_user "\nWARNING: This test is incompatible with front end systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial system\n" + exit 0 } # diff --git a/testsuite/expect/test1.81 b/testsuite/expect/test1.81 index 8c4efa7845..deed6256ac 100755 --- a/testsuite/expect/test1.81 +++ b/testsuite/expect/test1.81 @@ -43,6 +43,9 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial system\n" + exit $exit_code } # diff --git a/testsuite/expect/test1.82 b/testsuite/expect/test1.82 index 94e3610ad5..d00b53d44f 100755 --- a/testsuite/expect/test1.82 +++ b/testsuite/expect/test1.82 @@ -40,14 +40,15 @@ set exit_code 0 print_header $test_id -if { [test_xcpu] } { - send_user "\nWARNING: This test is incompatible with XCPU systems\n" - exit 0 -} - if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial system\n" + exit 0 +} elseif { [test_xcpu] } { + send_user "\nWARNING: This test is incompatible with XCPU systems\n" + exit 0 } # diff --git a/testsuite/expect/test1.83 b/testsuite/expect/test1.83 index c46e62cfd2..96cf91c8e5 100755 --- a/testsuite/expect/test1.83 +++ b/testsuite/expect/test1.83 @@ -48,14 +48,15 @@ if {[test_wiki_sched] == 1} { send_user "\nWARNING: not compatable with sched/wiki (Maui)\n" send_user " or sched/wiki2 (Moab) schedulers\n" exit $exit_code -} -if {[test_front_end] != 0} { +} elseif {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 -} -if {[test_topology] != 0} { +} elseif {[test_topology]} { send_user "\nWARNING: This test is incompatible topology configured systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with a serial system\n" + exit 0 } set available [available_nodes [default_partition]] -- GitLab From 64749cb3d5918333ee0335610670de6c0b78e340 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 17 May 2012 17:15:42 -0700 Subject: [PATCH 247/614] Changes to test for select/serial support --- testsuite/expect/test1.33 | 21 ++++++++++++++------- testsuite/expect/test1.46 | 6 ++++-- testsuite/expect/test1.49 | 3 +++ testsuite/expect/test1.86 | 10 ++++++---- testsuite/expect/test1.87 | 3 +++ testsuite/expect/test1.93 | 3 +++ 6 files changed, 33 insertions(+), 13 deletions(-) diff --git a/testsuite/expect/test1.33 b/testsuite/expect/test1.33 index 4d238044a2..492c4e141f 100755 --- a/testsuite/expect/test1.33 +++ b/testsuite/expect/test1.33 @@ -42,10 +42,17 @@ print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + set task_cnt 1 + set sum1 10 + set key2 "srun_exit_code_10" +} else { + set task_cnt 2 + set sum1 21 + set key2 "srun_exit_code_11" } # @@ -57,7 +64,7 @@ make_bash_script $exit_script " " make_bash_script $test_script " - $srun -N1 -n2 -O $exit_script + $srun -N1 -n $task_cnt -O $exit_script echo srun_exit_code_\$? " @@ -66,7 +73,7 @@ make_bash_script $test_script " # set sum 0 set timeout $max_job_delay -set srun_pid [spawn $srun -N1 -n2 -O $exit_script] +set srun_pid [spawn $srun -N1 -n $task_cnt -O $exit_script] expect { -re "exit code ($number)" { send_user "This error is expected, no worries\n" @@ -82,8 +89,8 @@ expect { wait } } -if {$sum != 21} { - send_user "\nFAILURE: srun failed to report exit code\n" +if {$sum != $sum1} { + send_user "\nFAILURE: srun failed to report exit code ($sum != $sum1)\n" set exit_code 1 } @@ -93,7 +100,7 @@ if {$sum != 21} { set matches 0 spawn $test_script expect { - -re "srun_exit_code_11" { + -re "$key2" { send_user "Above error are expected, no worries\n" incr matches exp_continue diff --git a/testsuite/expect/test1.46 b/testsuite/expect/test1.46 index 53e775ab00..b5864e9d92 100755 --- a/testsuite/expect/test1.46 +++ b/testsuite/expect/test1.46 @@ -42,10 +42,12 @@ print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test is incompatible with Bluegene systems\n" exit $exit_code -} -if {[test_cray]} { +} elseif {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with a serial system\n" + exit 0 } # diff --git a/testsuite/expect/test1.49 b/testsuite/expect/test1.49 index 95f1b8bfd3..7c3540fc88 100755 --- a/testsuite/expect/test1.49 +++ b/testsuite/expect/test1.49 @@ -91,6 +91,9 @@ if { [test_bluegene] } { } else { set node_cnt 1-1024 } +} elseif { [test_serial] } { + set node_cnt 1 + set tasks 1 } else { set node_cnt 1-1 } diff --git a/testsuite/expect/test1.86 b/testsuite/expect/test1.86 index 984fd031b9..d86c96be74 100755 --- a/testsuite/expect/test1.86 +++ b/testsuite/expect/test1.86 @@ -42,16 +42,18 @@ set prompt "PROMPT: " print_header $test_id -if {[test_front_end] != 0} { +if {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 -} - -if {[test_multiple_slurmd] != 0} { +} elseif {[test_multiple_slurmd] != 0} { send_user "\nWARNING: This test is incompatible with multiple slurmd systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with a serial system\n" + exit 0 } + # # Build input script file # diff --git a/testsuite/expect/test1.87 b/testsuite/expect/test1.87 index 457ff29be0..42acdb31f1 100755 --- a/testsuite/expect/test1.87 +++ b/testsuite/expect/test1.87 @@ -45,6 +45,9 @@ print_header $test_id if {[test_front_end] != 0} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incomatible with front-end systems\n" + exit 0 } # diff --git a/testsuite/expect/test1.93 b/testsuite/expect/test1.93 index 15bfde412a..c5bf81f3ee 100755 --- a/testsuite/expect/test1.93 +++ b/testsuite/expect/test1.93 @@ -43,6 +43,9 @@ print_header $test_id if {[test_front_end] != 0} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial system\n" + exit 0 } # -- GitLab From 2d979e6411dae0c7c6b862762579ff9b5bdd984d Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 17:20:37 -0700 Subject: [PATCH 248/614] Added generic functions to create and destroy plugin contexts --- src/common/plugin.c | 103 +++++++++++++++++++++++++++++++++++++++++++- src/common/plugin.h | 32 ++++++++++++++ 2 files changed, 134 insertions(+), 1 deletion(-) diff --git a/src/common/plugin.c b/src/common/plugin.c index bb88fa6dc0..29124742e3 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -6,6 +6,8 @@ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Jay Windley . * CODE-OCEC-09-009. All rights reserved. + * Portions Copyright (C) 2012 SchedMD LLC. + * Written by Danny Auble * * This file is part of SLURM, a resource management program. * For details, see . @@ -49,7 +51,7 @@ #include "src/common/xmalloc.h" #include "src/common/log.h" -#include "src/common/plugin.h" +#include "src/common/plugrack.h" #include "src/common/xstring.h" #include "src/common/slurm_protocol_api.h" #include "slurm/slurm_errno.h" @@ -356,3 +358,102 @@ plugin_get_syms( plugin_handle_t plug, return count; } +/* + * Create a priority context + */ +extern plugin_context_t *plugin_context_create( + const char *plugin_type, const char *uler_type, + void *ptrs[], const char *names[], size_t names_size) +{ + plugin_context_t *c; + int n_names; + + if (!uler_type) { + debug3("plugin_context_create: no uler type"); + return NULL; + } else if (!plugin_type) { + debug3("plugin_context_create: no plugin type"); + return NULL; + } else if (!names) { + error("plugin_context_create: no symbols given for plugin %s", + plugin_type); + return NULL; + } else if (!ptrs) { + error("plugin_context_create: no ptrs given for plugin %s", + plugin_type); + return NULL; + } + + c = xmalloc(sizeof(plugin_context_t)); + c->type = xstrdup(uler_type); + c->cur_plugin = PLUGIN_INVALID_HANDLE; + + n_names = names_size / sizeof(char *); + + /* Find the correct plugin. */ + c->cur_plugin = plugin_load_and_link(c->type, n_names, names, ptrs); + if (c->cur_plugin != PLUGIN_INVALID_HANDLE) + return c; + + if (errno != EPLUGIN_NOTFOUND) { + error("Couldn't load specified plugin name for %s: %s", + c->type, plugin_strerror(errno)); + return NULL; + } + + error("Couldn't find the specified plugin name for %s " + "looking at all files", + c->type); + + /* Get plugin list. */ + if (!c->plugin_list) { + char *plugin_dir; + c->plugin_list = plugrack_create(); + if (!c->plugin_list) { + error("cannot create plugin manager"); + return NULL; + } + plugrack_set_major_type(c->plugin_list, plugin_type); + plugrack_set_paranoia( + c->plugin_list, PLUGRACK_PARANOIA_NONE, 0); + plugin_dir = slurm_get_plugin_dir(); + plugrack_read_dir(c->plugin_list, plugin_dir); + xfree(plugin_dir); + } + + c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->type); + if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { + error("cannot find %s plugin for %s", plugin_type, c->type); + return NULL; + } + + /* Dereference the API. */ + if (plugin_get_syms(c->cur_plugin, n_names, names, ptrs) < n_names) { + error("incomplete %s plugin detected", plugin_type); + return NULL; + } + + return c; +} + +/* + * Destroy a context + */ +extern int plugin_context_destroy(plugin_context_t *c) +{ + int rc = SLURM_SUCCESS; + /* + * Must check return code here because plugins might still + * be loaded and active. + */ + if (c->plugin_list) { + if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) + rc = SLURM_ERROR; + } else + plugin_unload(c->cur_plugin); + + xfree(c->type); + xfree(c); + + return rc; +} diff --git a/src/common/plugin.h b/src/common/plugin.h index 85c1615487..d310252efd 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -79,6 +79,13 @@ */ typedef void *plugin_handle_t; +typedef struct { + plugin_handle_t cur_plugin; + void *plugin_list; + char *type; +} plugin_context_t; + + #define PLUGIN_INVALID_HANDLE ((void*)0) typedef enum { @@ -187,4 +194,29 @@ int plugin_get_syms( plugin_handle_t plug, const char *names[], void *ptrs[] ); + +/* + * Create a priority context + * plugin_type - IN - name of plugin major type (select) + * uler_type - IN - name of plugin minor type (linear) + * ptrs[] - IN/OUT - an array of pointers into which the addresses of the + * respective symbols should be placed. ptrs[i] will receive + * the address of names[i]. + * names[] - IN - an argv-like array of symbol names to resolve. + * names_size - IN - size of names[] (sizeof(names)) + * + * Returns plugin_context_t on success of NULL if failed. On success + * ptrs[] is filled in with the symbols from names[]. + * + * Free memory with plugin_context_destroy + */ +extern plugin_context_t *plugin_context_create( + const char *plugin_type, const char *uler_type, + void *ptrs[], const char *names[], size_t names_size); + +/* + * Destroy a context created from plugin_context_create. + */ +extern int plugin_context_destroy(plugin_context_t *c); + #endif /*__GENERIC_PLUGIN_H__*/ -- GitLab From 2a6aabad00ea09cec2d36859f3a91e9fbba8c4ba Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 17:25:16 -0700 Subject: [PATCH 249/614] Use generic plugin context on accounting_storage --- src/common/slurm_accounting_storage.c | 348 +++++++------------------- 1 file changed, 88 insertions(+), 260 deletions(-) diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index eff7577f78..901e497375 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -190,34 +190,18 @@ typedef struct slurm_acct_storage_ops { time_t event_time); } slurm_acct_storage_ops_t; -typedef struct slurm_acct_storage_context { - char *acct_storage_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int acct_storage_errno; - slurm_acct_storage_ops_t ops; -} slurm_acct_storage_context_t; - -static slurm_acct_storage_context_t * g_acct_storage_context = NULL; -static pthread_mutex_t g_acct_storage_context_lock = - PTHREAD_MUTEX_INITIALIZER; +static slurm_acct_storage_ops_t ops; +static plugin_context_t *plugin_context = NULL; +static pthread_mutex_t plugin_context_lock = PTHREAD_MUTEX_INITIALIZER; /* - * Local functions - */ -static slurm_acct_storage_ops_t *_acct_storage_get_ops( - slurm_acct_storage_context_t *c); -static slurm_acct_storage_context_t *_acct_storage_context_create( - const char *acct_storage_type); -static int _acct_storage_context_destroy( - slurm_acct_storage_context_t *c); - -/* - * Locate and load the appropriate plugin + * Initialize context for acct_storage plugin */ -static slurm_acct_storage_ops_t * _acct_storage_get_ops( - slurm_acct_storage_context_t *c) +extern int slurm_acct_storage_init(char *loc) { + int retval = SLURM_SUCCESS; + char *plugin_type = "accounting_storage"; + char *type = NULL; /* * Must be synchronized with slurm_acct_storage_ops_t above. */ @@ -279,143 +263,32 @@ static slurm_acct_storage_ops_t * _acct_storage_get_ops( "acct_storage_p_update_shares_used", "acct_storage_p_flush_jobs_on_cluster" }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->acct_storage_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->acct_storage_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->acct_storage_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type( c->plugin_list, "accounting_storage" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, - c->acct_storage_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find accounting_storage plugin for %s", - c->acct_storage_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete acct_storage plugin detected" ); - return NULL; - } - - return &c->ops; -} -/* - * Create a acct_storage context - */ -static slurm_acct_storage_context_t *_acct_storage_context_create( - const char *acct_storage_type) -{ - slurm_acct_storage_context_t *c; + if (plugin_context) + return retval; - if ( acct_storage_type == NULL ) { - debug3( "_acct_storage_context_create: no uler type" ); - return NULL; - } - - c = xmalloc( sizeof( slurm_acct_storage_context_t ) ); - c->acct_storage_type = xstrdup( acct_storage_type ); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->acct_storage_errno = SLURM_SUCCESS; + slurm_mutex_lock(&plugin_context_lock); - return c; -} - -/* - * Destroy a acct_storage context - */ -static int _acct_storage_context_destroy(slurm_acct_storage_context_t *c) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->acct_storage_type ); - xfree( c ); - - return rc; -} - -/* - * Initialize context for acct_storage plugin - */ -extern int slurm_acct_storage_init(char *loc) -{ - int retval = SLURM_SUCCESS; - char *acct_storage_type = NULL; - - slurm_mutex_lock( &g_acct_storage_context_lock ); - - if ( g_acct_storage_context ) + if (plugin_context) goto done; + if (loc) slurm_set_accounting_storage_loc(loc); - acct_storage_type = slurm_get_accounting_storage_type(); + type = slurm_get_accounting_storage_type(); - g_acct_storage_context = _acct_storage_context_create( - acct_storage_type); - if ( g_acct_storage_context == NULL ) { - error( "cannot create acct_storage context for %s", - acct_storage_type ); - retval = SLURM_ERROR; - goto done; - } + plugin_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _acct_storage_get_ops( g_acct_storage_context ) == NULL ) { - error( "cannot resolve acct_storage plugin operations" ); - _acct_storage_context_destroy( g_acct_storage_context ); - g_acct_storage_context = NULL; + if (!plugin_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock( &g_acct_storage_context_lock ); - xfree(acct_storage_type); + slurm_mutex_unlock(&plugin_context_lock); + xfree(type); return retval; } @@ -423,31 +296,29 @@ extern int slurm_acct_storage_fini(void) { int rc; - if (!g_acct_storage_context) + if (!plugin_context) return SLURM_SUCCESS; -// (*(g_acct_storage_context->ops.acct_storage_fini))(); - rc = _acct_storage_context_destroy( g_acct_storage_context ); - g_acct_storage_context = NULL; +// (*(ops.acct_storage_fini))(); + rc = plugin_context_destroy(plugin_context); + plugin_context = NULL; return rc; } extern void *acct_storage_g_get_connection( - const slurm_trigger_callbacks_t *callbacks, - int conn_num, bool rollback,char *cluster_name) + const slurm_trigger_callbacks_t *callbacks, + int conn_num, bool rollback,char *cluster_name) { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_conn))(callbacks, conn_num, - rollback, - cluster_name); + return (*(ops.get_conn))(callbacks, conn_num, rollback, cluster_name); } extern int acct_storage_g_close_connection(void **db_conn) { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.close_conn))(db_conn); + return (*(ops.close_conn))(db_conn); } @@ -455,7 +326,7 @@ extern int acct_storage_g_commit(void *db_conn, bool commit) { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.commit))(db_conn, commit); + return (*(ops.commit))(db_conn, commit); } @@ -464,8 +335,7 @@ extern int acct_storage_g_add_users(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_users)) - (db_conn, uid, user_list); + return (*(ops.add_users))(db_conn, uid, user_list); } extern int acct_storage_g_add_coord(void *db_conn, uint32_t uid, @@ -474,8 +344,7 @@ extern int acct_storage_g_add_coord(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_coord)) - (db_conn, uid, acct_list, user_cond); + return (*(ops.add_coord))(db_conn, uid, acct_list, user_cond); } extern int acct_storage_g_add_accounts(void *db_conn, uint32_t uid, @@ -483,8 +352,7 @@ extern int acct_storage_g_add_accounts(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_accts)) - (db_conn, uid, acct_list); + return (*(ops.add_accts))(db_conn, uid, acct_list); } extern int acct_storage_g_add_clusters(void *db_conn, uint32_t uid, @@ -492,8 +360,7 @@ extern int acct_storage_g_add_clusters(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_clusters)) - (db_conn, uid, cluster_list); + return (*(ops.add_clusters))(db_conn, uid, cluster_list); } extern int acct_storage_g_add_associations(void *db_conn, uint32_t uid, @@ -501,8 +368,7 @@ extern int acct_storage_g_add_associations(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_associations)) - (db_conn, uid, association_list); + return (*(ops.add_associations))(db_conn, uid, association_list); } extern int acct_storage_g_add_qos(void *db_conn, uint32_t uid, @@ -510,8 +376,7 @@ extern int acct_storage_g_add_qos(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_qos)) - (db_conn, uid, qos_list); + return (*(ops.add_qos))(db_conn, uid, qos_list); } extern int acct_storage_g_add_wckeys(void *db_conn, uint32_t uid, @@ -519,8 +384,7 @@ extern int acct_storage_g_add_wckeys(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.add_wckeys)) - (db_conn, uid, wckey_list); + return (*(ops.add_wckeys))(db_conn, uid, wckey_list); } extern int acct_storage_g_add_reservation(void *db_conn, @@ -528,8 +392,7 @@ extern int acct_storage_g_add_reservation(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return NO_VAL; - return (*(g_acct_storage_context->ops.add_reservation)) - (db_conn, resv); + return (*(ops.add_reservation))(db_conn, resv); } extern List acct_storage_g_modify_users(void *db_conn, uint32_t uid, @@ -538,8 +401,7 @@ extern List acct_storage_g_modify_users(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_users)) - (db_conn, uid, user_cond, user); + return (*(ops.modify_users))(db_conn, uid, user_cond, user); } extern List acct_storage_g_modify_accounts(void *db_conn, uint32_t uid, @@ -548,8 +410,7 @@ extern List acct_storage_g_modify_accounts(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_accts)) - (db_conn, uid, acct_cond, acct); + return (*(ops.modify_accts))(db_conn, uid, acct_cond, acct); } extern List acct_storage_g_modify_clusters(void *db_conn, uint32_t uid, @@ -558,8 +419,7 @@ extern List acct_storage_g_modify_clusters(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_clusters)) - (db_conn, uid, cluster_cond, cluster); + return (*(ops.modify_clusters))(db_conn, uid, cluster_cond, cluster); } extern List acct_storage_g_modify_associations( @@ -569,8 +429,7 @@ extern List acct_storage_g_modify_associations( { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_associations)) - (db_conn, uid, assoc_cond, assoc); + return (*(ops.modify_associations))(db_conn, uid, assoc_cond, assoc); } extern List acct_storage_g_modify_job(void *db_conn, uint32_t uid, @@ -579,8 +438,7 @@ extern List acct_storage_g_modify_job(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_job)) - (db_conn, uid, job_cond, job); + return (*(ops.modify_job))(db_conn, uid, job_cond, job); } extern List acct_storage_g_modify_qos(void *db_conn, uint32_t uid, @@ -589,8 +447,7 @@ extern List acct_storage_g_modify_qos(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_qos)) - (db_conn, uid, qos_cond, qos); + return (*(ops.modify_qos))(db_conn, uid, qos_cond, qos); } extern List acct_storage_g_modify_wckeys(void *db_conn, uint32_t uid, @@ -599,8 +456,7 @@ extern List acct_storage_g_modify_wckeys(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.modify_wckeys)) - (db_conn, uid, wckey_cond, wckey); + return (*(ops.modify_wckeys))(db_conn, uid, wckey_cond, wckey); } extern int acct_storage_g_modify_reservation(void *db_conn, @@ -608,8 +464,7 @@ extern int acct_storage_g_modify_reservation(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return NO_VAL; - return (*(g_acct_storage_context->ops.modify_reservation)) - (db_conn, resv); + return (*(ops.modify_reservation))(db_conn, resv); } extern List acct_storage_g_remove_users(void *db_conn, uint32_t uid, @@ -617,8 +472,7 @@ extern List acct_storage_g_remove_users(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_users)) - (db_conn, uid, user_cond); + return (*(ops.remove_users))(db_conn, uid, user_cond); } extern List acct_storage_g_remove_coord(void *db_conn, uint32_t uid, @@ -627,8 +481,7 @@ extern List acct_storage_g_remove_coord(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_coord)) - (db_conn, uid, acct_list, user_cond); + return (*(ops.remove_coord))(db_conn, uid, acct_list, user_cond); } extern List acct_storage_g_remove_accounts(void *db_conn, uint32_t uid, @@ -636,8 +489,7 @@ extern List acct_storage_g_remove_accounts(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_accts)) - (db_conn, uid, acct_cond); + return (*(ops.remove_accts))(db_conn, uid, acct_cond); } extern List acct_storage_g_remove_clusters(void *db_conn, uint32_t uid, @@ -645,8 +497,7 @@ extern List acct_storage_g_remove_clusters(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_clusters)) - (db_conn, uid, cluster_cond); + return (*(ops.remove_clusters))(db_conn, uid, cluster_cond); } extern List acct_storage_g_remove_associations( @@ -655,8 +506,7 @@ extern List acct_storage_g_remove_associations( { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_associations)) - (db_conn, uid, assoc_cond); + return (*(ops.remove_associations))(db_conn, uid, assoc_cond); } extern List acct_storage_g_remove_qos(void *db_conn, uint32_t uid, @@ -664,8 +514,7 @@ extern List acct_storage_g_remove_qos(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_qos)) - (db_conn, uid, qos_cond); + return (*(ops.remove_qos))(db_conn, uid, qos_cond); } extern List acct_storage_g_remove_wckeys(void *db_conn, uint32_t uid, @@ -673,8 +522,7 @@ extern List acct_storage_g_remove_wckeys(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.remove_wckeys)) - (db_conn, uid, wckey_cond); + return (*(ops.remove_wckeys))(db_conn, uid, wckey_cond); } extern int acct_storage_g_remove_reservation(void *db_conn, @@ -682,8 +530,7 @@ extern int acct_storage_g_remove_reservation(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return NO_VAL; - return (*(g_acct_storage_context->ops.remove_reservation)) - (db_conn, resv); + return (*(ops.remove_reservation))(db_conn, resv); } extern List acct_storage_g_get_users(void *db_conn, uint32_t uid, @@ -691,8 +538,7 @@ extern List acct_storage_g_get_users(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_users)) - (db_conn, uid, user_cond); + return (*(ops.get_users))(db_conn, uid, user_cond); } extern List acct_storage_g_get_accounts(void *db_conn, uint32_t uid, @@ -700,8 +546,7 @@ extern List acct_storage_g_get_accounts(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_accts)) - (db_conn, uid, acct_cond); + return (*(ops.get_accts))(db_conn, uid, acct_cond); } extern List acct_storage_g_get_clusters(void *db_conn, uint32_t uid, @@ -709,15 +554,14 @@ extern List acct_storage_g_get_clusters(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_clusters)) - (db_conn, uid, cluster_cond); + return (*(ops.get_clusters))(db_conn, uid, cluster_cond); } extern List acct_storage_g_get_config(void *db_conn, char *config_name) { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_config))(db_conn, config_name); + return (*(ops.get_config))(db_conn, config_name); } extern List acct_storage_g_get_associations( @@ -726,8 +570,7 @@ extern List acct_storage_g_get_associations( { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_associations)) - (db_conn, uid, assoc_cond); + return (*(ops.get_associations))(db_conn, uid, assoc_cond); } extern List acct_storage_g_get_events(void *db_conn, uint32_t uid, @@ -735,8 +578,7 @@ extern List acct_storage_g_get_events(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_events)) - (db_conn, uid, event_cond); + return (*(ops.get_events))(db_conn, uid, event_cond); } extern List acct_storage_g_get_problems(void *db_conn, uint32_t uid, @@ -744,8 +586,7 @@ extern List acct_storage_g_get_problems(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_problems)) - (db_conn, uid, assoc_cond); + return (*(ops.get_problems))(db_conn, uid, assoc_cond); } extern List acct_storage_g_get_qos(void *db_conn, uint32_t uid, @@ -753,7 +594,7 @@ extern List acct_storage_g_get_qos(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_qos))(db_conn, uid, qos_cond); + return (*(ops.get_qos))(db_conn, uid, qos_cond); } extern List acct_storage_g_get_wckeys(void *db_conn, uint32_t uid, @@ -761,17 +602,15 @@ extern List acct_storage_g_get_wckeys(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_wckeys))(db_conn, uid, - wckey_cond); + return (*(ops.get_wckeys))(db_conn, uid, wckey_cond); } -extern List acct_storage_g_get_reservations(void *db_conn, uint32_t uid, - slurmdb_reservation_cond_t *resv_cond) +extern List acct_storage_g_get_reservations( + void *db_conn, uint32_t uid, slurmdb_reservation_cond_t *resv_cond) { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_resvs))(db_conn, uid, - resv_cond); + return (*(ops.get_resvs))(db_conn, uid, resv_cond); } extern List acct_storage_g_get_txn(void *db_conn, uint32_t uid, @@ -779,7 +618,7 @@ extern List acct_storage_g_get_txn(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_txn))(db_conn, uid, txn_cond); + return (*(ops.get_txn))(db_conn, uid, txn_cond); } extern int acct_storage_g_get_usage(void *db_conn, uint32_t uid, @@ -788,8 +627,7 @@ extern int acct_storage_g_get_usage(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.get_usage)) - (db_conn, uid, in, type, start, end); + return (*(ops.get_usage))(db_conn, uid, in, type, start, end); } extern int acct_storage_g_roll_usage(void *db_conn, @@ -798,8 +636,7 @@ extern int acct_storage_g_roll_usage(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.roll_usage)) - (db_conn, sent_start, sent_end, archive_data); + return (*(ops.roll_usage))(db_conn, sent_start, sent_end, archive_data); } extern int clusteracct_storage_g_node_down(void *db_conn, @@ -809,8 +646,8 @@ extern int clusteracct_storage_g_node_down(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.node_down)) - (db_conn, node_ptr, event_time, reason, reason_uid); + return (*(ops.node_down))(db_conn, node_ptr, event_time, + reason, reason_uid); } extern int clusteracct_storage_g_node_up(void *db_conn, @@ -865,7 +702,7 @@ extern int clusteracct_storage_g_node_up(void *db_conn, send_node.node_state = NODE_STATE_ERROR; - return (*(g_acct_storage_context->ops.node_down)) + return (*(ops.node_down)) (db_conn, &send_node, event_time, reason, slurm_get_slurm_user_id()); } else { @@ -879,8 +716,7 @@ extern int clusteracct_storage_g_node_up(void *db_conn, node_ptr->reason_uid = NO_VAL; } - return (*(g_acct_storage_context->ops.node_up)) - (db_conn, node_ptr, event_time); + return (*(ops.node_up))(db_conn, node_ptr, event_time); } @@ -891,8 +727,7 @@ extern int clusteracct_storage_g_cluster_cpus(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.cluster_cpus)) - (db_conn, cluster_nodes, cpus, event_time); + return (*(ops.cluster_cpus))(db_conn, cluster_nodes, cpus, event_time); } @@ -900,7 +735,7 @@ extern int clusteracct_storage_g_register_ctld(void *db_conn, uint16_t port) { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.register_ctld))(db_conn, port); + return (*(ops.register_ctld))(db_conn, port); } extern int clusteracct_storage_g_register_disconn_ctld( @@ -908,8 +743,7 @@ extern int clusteracct_storage_g_register_disconn_ctld( { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.register_disconn_ctld)) - (db_conn, control_host); + return (*(ops.register_disconn_ctld))(db_conn, control_host); } extern int clusteracct_storage_g_fini_ctld(void *db_conn, @@ -917,7 +751,7 @@ extern int clusteracct_storage_g_fini_ctld(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.fini_ctld))(db_conn, cluster_rec); + return (*(ops.fini_ctld))(db_conn, cluster_rec); } /* @@ -938,13 +772,12 @@ extern int jobacct_storage_g_job_start(void *db_conn, int rc; time_t orig_start_time = job_ptr->start_time; job_ptr->start_time = (time_t) 0; - rc = (*(g_acct_storage_context->ops.job_start))( - db_conn, job_ptr); + rc = (*(ops.job_start))(db_conn, job_ptr); job_ptr->start_time = orig_start_time; return rc; } - return (*(g_acct_storage_context->ops.job_start))(db_conn, job_ptr); + return (*(ops.job_start))(db_conn, job_ptr); } /* @@ -955,7 +788,7 @@ extern int jobacct_storage_g_job_complete(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.job_complete))(db_conn, job_ptr); + return (*(ops.job_complete))(db_conn, job_ptr); } /* @@ -966,7 +799,7 @@ extern int jobacct_storage_g_step_start(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.step_start))(db_conn, step_ptr); + return (*(ops.step_start))(db_conn, step_ptr); } /* @@ -977,8 +810,7 @@ extern int jobacct_storage_g_step_complete(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.step_complete))(db_conn, - step_ptr); + return (*(ops.step_complete))(db_conn, step_ptr); } /* @@ -989,7 +821,7 @@ extern int jobacct_storage_g_job_suspend(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.job_suspend))(db_conn, job_ptr); + return (*(ops.job_suspend))(db_conn, job_ptr); } /* @@ -1002,8 +834,7 @@ extern List jobacct_storage_g_get_jobs_cond(void *db_conn, uint32_t uid, { if (slurm_acct_storage_init(NULL) < 0) return NULL; - return (*(g_acct_storage_context->ops.get_jobs_cond)) - (db_conn, uid, job_cond); + return (*(ops.get_jobs_cond))(db_conn, uid, job_cond); } /* @@ -1014,8 +845,7 @@ extern int jobacct_storage_g_archive(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.archive_dump)) - (db_conn, arch_cond); + return (*(ops.archive_dump))(db_conn, arch_cond); } /* @@ -1026,7 +856,7 @@ extern int jobacct_storage_g_archive_load(void *db_conn, { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.archive_load))(db_conn, arch_rec); + return (*(ops.archive_load))(db_conn, arch_rec); } @@ -1039,8 +869,7 @@ extern int acct_storage_g_update_shares_used(void *db_conn, List acct_list) { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.update_shares_used))(db_conn, - acct_list); + return (*(ops.update_shares_used))(db_conn, acct_list); } /* @@ -1056,7 +885,6 @@ extern int acct_storage_g_flush_jobs_on_cluster( { if (slurm_acct_storage_init(NULL) < 0) return SLURM_ERROR; - return (*(g_acct_storage_context->ops.flush_jobs)) - (db_conn, event_time); + return (*(ops.flush_jobs))(db_conn, event_time); } -- GitLab From 380dce394d966ecd5befcc098d35a785522c3787 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 17 May 2012 17:25:30 -0700 Subject: [PATCH 250/614] better cleanup on failures. --- src/common/plugin.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/common/plugin.c b/src/common/plugin.c index 29124742e3..522ef8144f 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -398,7 +398,7 @@ extern plugin_context_t *plugin_context_create( if (errno != EPLUGIN_NOTFOUND) { error("Couldn't load specified plugin name for %s: %s", c->type, plugin_strerror(errno)); - return NULL; + goto fail; } error("Couldn't find the specified plugin name for %s " @@ -411,7 +411,7 @@ extern plugin_context_t *plugin_context_create( c->plugin_list = plugrack_create(); if (!c->plugin_list) { error("cannot create plugin manager"); - return NULL; + goto fail; } plugrack_set_major_type(c->plugin_list, plugin_type); plugrack_set_paranoia( @@ -424,16 +424,19 @@ extern plugin_context_t *plugin_context_create( c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->type); if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { error("cannot find %s plugin for %s", plugin_type, c->type); - return NULL; + goto fail; } /* Dereference the API. */ if (plugin_get_syms(c->cur_plugin, n_names, names, ptrs) < n_names) { error("incomplete %s plugin detected", plugin_type); - return NULL; + goto fail; } return c; +fail: + plugin_context_destroy(c); + return NULL; } /* -- GitLab From 3e26b7cbcb155febd43dfa8fa3e44355604fe142 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 21 May 2012 09:57:41 -0700 Subject: [PATCH 251/614] Enforce part MinNodes when job MaxNodes==0 --- src/slurmctld/job_mgr.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 5338e4edae..ef25f1c9d9 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3672,7 +3672,6 @@ static int _valid_job_part(job_desc_msg_t * job_desc, if ((job_desc->max_nodes != NO_VAL) && slurmctld_conf.enforce_part_limits && - job_desc->max_nodes && (job_desc->max_nodes < min_nodes_orig)) { info("_valid_job_part: job's max nodes less than partition's " "min nodes (%u < %u)", -- GitLab From 6e67c7501feefc6171275119b33709412c8135b1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:21:06 -0700 Subject: [PATCH 252/614] Handle old versions of rpc's for 2.4 --- src/common/slurm_protocol_util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c index ee6b9d94e5..2d87e5af2a 100644 --- a/src/common/slurm_protocol_util.c +++ b/src/common/slurm_protocol_util.c @@ -150,7 +150,8 @@ int check_header_version(header_t * header) case REQUEST_UPDATE_NODE: case REQUEST_UPDATE_PARTITION: case REQUEST_UPDATE_RESERVATION: - if ((header->version == SLURM_2_3_PROTOCOL_VERSION) || + if ((header->version == SLURM_2_4_PROTOCOL_VERSION) || + (header->version == SLURM_2_3_PROTOCOL_VERSION) || (header->version == SLURM_2_2_PROTOCOL_VERSION) || (header->version == SLURM_2_1_PROTOCOL_VERSION)) break; -- GitLab From 25276767c378802264192ac4f0c0ca0ba923eeb8 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:23:48 -0700 Subject: [PATCH 253/614] increment for 2.5 DBD version --- src/common/slurmdbd_defs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/slurmdbd_defs.h b/src/common/slurmdbd_defs.h index 7f983253a4..c5bae14df5 100644 --- a/src/common/slurmdbd_defs.h +++ b/src/common/slurmdbd_defs.h @@ -76,7 +76,7 @@ * communicating with it (e.g. it will not accept messages with a * version higher than SLURMDBD_VERSION). */ -#define SLURMDBD_VERSION 10 /* already changed for 2.4 */ +#define SLURMDBD_VERSION 11 /* already changed for 2.5 */ #define SLURMDBD_VERSION_MIN 7 /* SLURM DBD message types */ -- GitLab From 9e73869d30bb0c37e2493e8e9618835a7f674a6e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:24:45 -0700 Subject: [PATCH 254/614] convert to generic context for switch plugins --- src/common/switch.c | 379 +++++++++++++++----------------------------- 1 file changed, 129 insertions(+), 250 deletions(-) diff --git a/src/common/switch.c b/src/common/switch.c index bbfc9c9ae4..52e4df1507 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -62,255 +62,134 @@ typedef struct slurm_switch_ops { int (*alloc_jobinfo) ( switch_jobinfo_t **jobinfo ); int (*build_jobinfo) ( switch_jobinfo_t *jobinfo, - char *nodelist, - uint16_t *tasks_per_node, - int cyclic_alloc, - char *network); + char *nodelist, + uint16_t *tasks_per_node, + int cyclic_alloc, + char *network); switch_jobinfo_t *(*copy_jobinfo) ( switch_jobinfo_t *jobinfo ); void (*free_jobinfo) ( switch_jobinfo_t *jobinfo ); int (*pack_jobinfo) ( switch_jobinfo_t *jobinfo, - Buf buffer ); + Buf buffer ); int (*unpack_jobinfo) ( switch_jobinfo_t *jobinfo, - Buf buffer ); + Buf buffer ); int (*get_jobinfo) ( switch_jobinfo_t *switch_job, - int key, void *data); + int key, void *data); void (*print_jobinfo) ( FILE *fp, - switch_jobinfo_t *jobinfo ); + switch_jobinfo_t *jobinfo ); char * (*string_jobinfo) ( switch_jobinfo_t *jobinfo, - char *buf, size_t size); + char *buf, size_t size); int (*node_init) ( void ); int (*node_fini) ( void ); int (*job_preinit) ( switch_jobinfo_t *jobinfo ); int (*job_init) ( switch_jobinfo_t *jobinfo, - uid_t uid ); + uid_t uid ); int (*job_fini) ( switch_jobinfo_t *jobinfo ); int (*job_postfini) ( switch_jobinfo_t *jobinfo, - uid_t pgid, - uint32_t job_id, - uint32_t step_id ); + uid_t pgid, + uint32_t job_id, + uint32_t step_id ); int (*job_attach) ( switch_jobinfo_t *jobinfo, - char ***env, uint32_t nodeid, - uint32_t procid, uint32_t nnodes, - uint32_t nprocs, uint32_t rank); + char ***env, uint32_t nodeid, + uint32_t procid, uint32_t nnodes, + uint32_t nprocs, uint32_t rank); char * (*switch_strerror) ( int errnum ); int (*switch_errno) ( void ); int (*clear_node) ( void ); int (*alloc_nodeinfo) ( switch_node_info_t **nodeinfo ); int (*build_nodeinfo) ( switch_node_info_t *nodeinfo ); int (*pack_nodeinfo) ( switch_node_info_t *nodeinfo, - Buf buffer ); + Buf buffer ); int (*unpack_nodeinfo) ( switch_node_info_t *nodeinfo, - Buf buffer ); + Buf buffer ); int (*free_nodeinfo) ( switch_node_info_t **nodeinfo ); char * (*sprintf_nodeinfo) ( switch_node_info_t *nodeinfo, - char *buf, size_t size ); + char *buf, size_t size ); int (*step_complete) ( switch_jobinfo_t *jobinfo, - char *nodelist ); + char *nodelist ); int (*step_part_comp) ( switch_jobinfo_t *jobinfo, - char *nodelist ); + char *nodelist ); bool (*part_comp) ( void ); int (*step_allocated) ( switch_jobinfo_t *jobinfo, - char *nodelist ); + char *nodelist ); int (*state_clear) ( void ); int (*slurmctld_init) ( void ); int (*slurmd_init) ( void ); int (*slurmd_step_init) ( void ); } slurm_switch_ops_t; -struct slurm_switch_context { - char * switch_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int switch_errno; - slurm_switch_ops_t ops; -}; - -static slurm_switch_context_t *g_context = NULL; -static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - - -static slurm_switch_context_t * -_slurm_switch_context_create(const char *switch_type) -{ - slurm_switch_context_t *c; - - if ( switch_type == NULL ) { - debug3( "_slurm_switch_context_create: no switch type" ); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_switch_context ) ); - - c->switch_errno = SLURM_SUCCESS; - - /* Copy the job completion authentication type. */ - c->switch_type = xstrdup( switch_type ); - if (c->switch_type == NULL ) { - debug3( "can't make local copy of switch type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - -static int -_slurm_switch_context_destroy( slurm_switch_context_t *c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->switch_type ); - xfree( c ); - - return rc; -} - /* - * Resolve the operations from the plugin. + * These strings must be kept in the same order as the fields + * declared for slurm_switch_ops_t. */ -static slurm_switch_ops_t * -_slurm_switch_get_ops( slurm_switch_context_t *c ) -{ - /* - * These strings must be kept in the same order as the fields - * declared for slurm_switch_ops_t. - */ - static const char *syms[] = { - "switch_p_libstate_save", - "switch_p_libstate_restore", - "switch_p_alloc_jobinfo", - "switch_p_build_jobinfo", - "switch_p_copy_jobinfo", - "switch_p_free_jobinfo", - "switch_p_pack_jobinfo", - "switch_p_unpack_jobinfo", - "switch_p_get_jobinfo", - "switch_p_print_jobinfo", - "switch_p_sprint_jobinfo", - "switch_p_node_init", - "switch_p_node_fini", - "switch_p_job_preinit", - "switch_p_job_init", - "switch_p_job_fini", - "switch_p_job_postfini", - "switch_p_job_attach", - "switch_p_strerror", - "switch_p_get_errno", - "switch_p_clear_node_state", - "switch_p_alloc_node_info", - "switch_p_build_node_info", - "switch_p_pack_node_info", - "switch_p_unpack_node_info", - "switch_p_free_node_info", - "switch_p_sprintf_node_info", - "switch_p_job_step_complete", - "switch_p_job_step_part_comp", - "switch_p_part_comp", - "switch_p_job_step_allocated", - "switch_p_libstate_clear", - "switch_p_slurmctld_init", - "switch_p_slurmd_init", - "switch_p_slurmd_step_init" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->switch_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->switch_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->switch_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - verbose( "Unable to create a plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "switch" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = - plugrack_use_by_type( c->plugin_list, c->switch_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - verbose( "can't find a plugin for type %s", c->switch_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - verbose( "incomplete switch plugin detected" ); - return NULL; - } +static const char *syms[] = { + "switch_p_libstate_save", + "switch_p_libstate_restore", + "switch_p_alloc_jobinfo", + "switch_p_build_jobinfo", + "switch_p_copy_jobinfo", + "switch_p_free_jobinfo", + "switch_p_pack_jobinfo", + "switch_p_unpack_jobinfo", + "switch_p_get_jobinfo", + "switch_p_print_jobinfo", + "switch_p_sprint_jobinfo", + "switch_p_node_init", + "switch_p_node_fini", + "switch_p_job_preinit", + "switch_p_job_init", + "switch_p_job_fini", + "switch_p_job_postfini", + "switch_p_job_attach", + "switch_p_strerror", + "switch_p_get_errno", + "switch_p_clear_node_state", + "switch_p_alloc_node_info", + "switch_p_build_node_info", + "switch_p_pack_node_info", + "switch_p_unpack_node_info", + "switch_p_free_node_info", + "switch_p_sprintf_node_info", + "switch_p_job_step_complete", + "switch_p_job_step_part_comp", + "switch_p_part_comp", + "switch_p_job_step_allocated", + "switch_p_libstate_clear", + "switch_p_slurmctld_init", + "switch_p_slurmd_init", + "switch_p_slurmd_step_init" +}; - return &c->ops; -} +static slurm_switch_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; extern int switch_init( void ) { int retval = SLURM_SUCCESS; - char *switch_type = NULL; + char *plugin_type = "switch"; + char *type = NULL; + + if ( g_context ) + return retval; slurm_mutex_lock( &context_lock ); if ( g_context ) goto done; - switch_type = slurm_get_switch_type(); - g_context = _slurm_switch_context_create( switch_type ); - if ( g_context == NULL ) { - error( "cannot create a context for %s", switch_type ); - retval = SLURM_ERROR; - goto done; - } + type = slurm_get_switch_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _slurm_switch_get_ops( g_context ) == NULL ) { - error( "cannot resolve plugin operations for %s", switch_type ); - _slurm_switch_context_destroy( g_context ); - g_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } - done: +done: slurm_mutex_unlock( &context_lock ); - xfree(switch_type); + xfree(type); return retval; } @@ -321,7 +200,7 @@ extern int switch_fini(void) if (!g_context) return SLURM_SUCCESS; - rc = _slurm_switch_context_destroy(g_context); + rc = plugin_context_destroy(g_context); return rc; } @@ -330,7 +209,7 @@ extern int switch_save(char *dir_name) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.state_save))( dir_name ); + return (*(ops.state_save))( dir_name ); } extern int switch_restore(char *dir_name, bool recover) @@ -338,7 +217,7 @@ extern int switch_restore(char *dir_name, bool recover) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.state_restore))( dir_name, recover ); + return (*(ops.state_restore))( dir_name, recover ); } extern int switch_clear(void) @@ -346,7 +225,7 @@ extern int switch_clear(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.state_clear))( ); + return (*(ops.state_clear))( ); } extern int switch_alloc_jobinfo(switch_jobinfo_t **jobinfo) @@ -354,18 +233,18 @@ extern int switch_alloc_jobinfo(switch_jobinfo_t **jobinfo) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.alloc_jobinfo))( jobinfo ); + return (*(ops.alloc_jobinfo))( jobinfo ); } extern int switch_build_jobinfo(switch_jobinfo_t *jobinfo, - char *nodelist, uint16_t *tasks_per_node, - int cyclic_alloc, char *network) + char *nodelist, uint16_t *tasks_per_node, + int cyclic_alloc, char *network) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.build_jobinfo))( jobinfo, nodelist, - tasks_per_node, cyclic_alloc, network ); + return (*(ops.build_jobinfo))( jobinfo, nodelist, + tasks_per_node, cyclic_alloc, network ); } extern switch_jobinfo_t *switch_copy_jobinfo(switch_jobinfo_t *jobinfo) @@ -373,7 +252,7 @@ extern switch_jobinfo_t *switch_copy_jobinfo(switch_jobinfo_t *jobinfo) if ( switch_init() < 0 ) return NULL; - return (*(g_context->ops.copy_jobinfo))( jobinfo ); + return (*(ops.copy_jobinfo))( jobinfo ); } extern void switch_free_jobinfo(switch_jobinfo_t *jobinfo) @@ -381,7 +260,7 @@ extern void switch_free_jobinfo(switch_jobinfo_t *jobinfo) if ( switch_init() < 0 ) return; - (*(g_context->ops.free_jobinfo))( jobinfo ); + (*(ops.free_jobinfo))( jobinfo ); } extern int switch_pack_jobinfo(switch_jobinfo_t *jobinfo, Buf buffer) @@ -389,7 +268,7 @@ extern int switch_pack_jobinfo(switch_jobinfo_t *jobinfo, Buf buffer) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.pack_jobinfo))( jobinfo, buffer ); + return (*(ops.pack_jobinfo))( jobinfo, buffer ); } extern int switch_unpack_jobinfo(switch_jobinfo_t *jobinfo, Buf buffer) @@ -397,16 +276,16 @@ extern int switch_unpack_jobinfo(switch_jobinfo_t *jobinfo, Buf buffer) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.unpack_jobinfo))( jobinfo, buffer ); + return (*(ops.unpack_jobinfo))( jobinfo, buffer ); } extern int switch_g_get_jobinfo(switch_jobinfo_t *jobinfo, - int data_type, void *data) + int data_type, void *data) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.get_jobinfo))( jobinfo, data_type, data); + return (*(ops.get_jobinfo))( jobinfo, data_type, data); } extern void switch_print_jobinfo(FILE *fp, switch_jobinfo_t *jobinfo) @@ -414,16 +293,16 @@ extern void switch_print_jobinfo(FILE *fp, switch_jobinfo_t *jobinfo) if ( switch_init() < 0 ) return; - (*(g_context->ops.print_jobinfo)) (fp, jobinfo); + (*(ops.print_jobinfo)) (fp, jobinfo); } extern char *switch_sprint_jobinfo( switch_jobinfo_t *jobinfo, - char *buf, size_t size) + char *buf, size_t size) { if ( switch_init() < 0 ) return NULL; - return (*(g_context->ops.string_jobinfo)) (jobinfo, buf, size); + return (*(ops.string_jobinfo)) (jobinfo, buf, size); } extern int interconnect_node_init(void) @@ -431,7 +310,7 @@ extern int interconnect_node_init(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.node_init)) (); + return (*(ops.node_init)) (); } extern int interconnect_node_fini(void) @@ -439,7 +318,7 @@ extern int interconnect_node_fini(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.node_fini)) (); + return (*(ops.node_fini)) (); } extern int interconnect_preinit(switch_jobinfo_t *jobinfo) @@ -447,7 +326,7 @@ extern int interconnect_preinit(switch_jobinfo_t *jobinfo) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_preinit)) (jobinfo); + return (*(ops.job_preinit)) (jobinfo); } extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid) @@ -455,7 +334,7 @@ extern int interconnect_init(switch_jobinfo_t *jobinfo, uid_t uid) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_init)) (jobinfo, uid); + return (*(ops.job_init)) (jobinfo, uid); } extern int interconnect_fini(switch_jobinfo_t *jobinfo) @@ -463,28 +342,28 @@ extern int interconnect_fini(switch_jobinfo_t *jobinfo) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_fini)) (jobinfo); + return (*(ops.job_fini)) (jobinfo); } extern int interconnect_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, - uint32_t job_id, uint32_t step_id ) + uint32_t job_id, uint32_t step_id ) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_postfini)) (jobinfo, pgid, - job_id, step_id); + return (*(ops.job_postfini)) (jobinfo, pgid, + job_id, step_id); } extern int interconnect_attach(switch_jobinfo_t *jobinfo, char ***env, - uint32_t nodeid, uint32_t procid, uint32_t nnodes, - uint32_t nprocs, uint32_t gid) + uint32_t nodeid, uint32_t procid, uint32_t nnodes, + uint32_t nprocs, uint32_t gid) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.job_attach)) (jobinfo, env, - nodeid, procid, nnodes, nprocs, gid); + return (*(ops.job_attach)) (jobinfo, env, + nodeid, procid, nnodes, nprocs, gid); } extern int switch_get_errno(void) @@ -492,7 +371,7 @@ extern int switch_get_errno(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.switch_errno))( ); + return (*(ops.switch_errno))( ); } extern char *switch_strerror(int errnum) @@ -500,7 +379,7 @@ extern char *switch_strerror(int errnum) if ( switch_init() < 0 ) return NULL; - return (*(g_context->ops.switch_strerror))( errnum ); + return (*(ops.switch_strerror))( errnum ); } @@ -513,7 +392,7 @@ extern int switch_g_clear_node_state(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.clear_node))(); + return (*(ops.clear_node))(); } extern int switch_g_alloc_node_info(switch_node_info_t **switch_node) @@ -521,7 +400,7 @@ extern int switch_g_alloc_node_info(switch_node_info_t **switch_node) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.alloc_nodeinfo))( switch_node ); + return (*(ops.alloc_nodeinfo))( switch_node ); } extern int switch_g_build_node_info(switch_node_info_t *switch_node) @@ -529,25 +408,25 @@ extern int switch_g_build_node_info(switch_node_info_t *switch_node) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.build_nodeinfo))( switch_node ); + return (*(ops.build_nodeinfo))( switch_node ); } extern int switch_g_pack_node_info(switch_node_info_t *switch_node, - Buf buffer) + Buf buffer) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.pack_nodeinfo))( switch_node, buffer ); + return (*(ops.pack_nodeinfo))( switch_node, buffer ); } extern int switch_g_unpack_node_info(switch_node_info_t *switch_node, - Buf buffer) + Buf buffer) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.unpack_nodeinfo))( switch_node, buffer ); + return (*(ops.unpack_nodeinfo))( switch_node, buffer ); } extern int switch_g_free_node_info(switch_node_info_t **switch_node) @@ -555,34 +434,34 @@ extern int switch_g_free_node_info(switch_node_info_t **switch_node) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.free_nodeinfo))( switch_node ); + return (*(ops.free_nodeinfo))( switch_node ); } extern char*switch_g_sprintf_node_info(switch_node_info_t *switch_node, - char *buf, size_t size) + char *buf, size_t size) { if ( switch_init() < 0 ) return NULL; - return (*(g_context->ops.sprintf_nodeinfo))( switch_node, buf, size ); + return (*(ops.sprintf_nodeinfo))( switch_node, buf, size ); } extern int switch_g_job_step_complete(switch_jobinfo_t *jobinfo, - char *nodelist) + char *nodelist) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.step_complete))( jobinfo, nodelist ); + return (*(ops.step_complete))( jobinfo, nodelist ); } extern int switch_g_job_step_part_comp(switch_jobinfo_t *jobinfo, - char *nodelist) + char *nodelist) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.step_part_comp))( jobinfo, nodelist ); + return (*(ops.step_part_comp))( jobinfo, nodelist ); } extern bool switch_g_part_comp(void) @@ -590,17 +469,17 @@ extern bool switch_g_part_comp(void) if ( switch_init() < 0 ) return false; - return (*(g_context->ops.part_comp))( ); + return (*(ops.part_comp))( ); } extern int switch_g_job_step_allocated(switch_jobinfo_t *jobinfo, - char *nodelist) + char *nodelist) { if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.step_allocated))( jobinfo, nodelist ); + return (*(ops.step_allocated))( jobinfo, nodelist ); } extern int switch_g_slurmctld_init(void) @@ -608,7 +487,7 @@ extern int switch_g_slurmctld_init(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.slurmctld_init)) (); + return (*(ops.slurmctld_init)) (); } extern int switch_g_slurmd_init(void) @@ -616,7 +495,7 @@ extern int switch_g_slurmd_init(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.slurmd_init)) (); + return (*(ops.slurmd_init)) (); } extern int switch_g_slurmd_step_init(void) @@ -624,5 +503,5 @@ extern int switch_g_slurmd_step_init(void) if ( switch_init() < 0 ) return SLURM_ERROR; - return (*(g_context->ops.slurmd_step_init)) (); + return (*(ops.slurmd_step_init)) (); } -- GitLab From 622406f3a9d6d8b0b080a18744eca4ac70767e14 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:26:18 -0700 Subject: [PATCH 255/614] convert to generic context for select plugins --- src/common/node_select.c | 399 ++++++++++--------------- src/common/node_select.h | 13 +- src/plugins/select/cray/other_select.c | 348 ++++++++------------- 3 files changed, 286 insertions(+), 474 deletions(-) diff --git a/src/common/node_select.c b/src/common/node_select.c index 7e7e79da9b..4bdf7ffde6 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -58,157 +58,70 @@ #include "src/slurmctld/slurmctld.h" #include "src/common/node_select.h" -strong_alias(destroy_select_ba_request, slurm_destroy_select_ba_request); - -static int select_context_cnt = -1; -static int select_context_default = -1; -/* If there is a new select plugin, list it here */ -static slurm_select_context_t * select_context = NULL; -static pthread_mutex_t select_context_lock = - PTHREAD_MUTEX_INITIALIZER; - /* - * Locate and load the appropriate plugin + * Must be synchronized with slurm_select_ops_t in node_select.h. + * Also must be synchronized with the other_plugin.c in + * the select/cray plugin. (We tried to make it so we only had to + * define it once, but it didn't seem to work.) */ -static int _select_get_ops(char *select_type, - slurm_select_context_t *c) -{ - /* - * Must be synchronized with slurm_select_ops_t in node_select.h. - * Also must be synchronized with the other_plugin.[c|h] in - * the select/cray plugin. - */ - static const char *syms[] = { - "plugin_id", - "select_p_state_save", - "select_p_state_restore", - "select_p_job_init", - "select_p_node_ranking", - "select_p_node_init", - "select_p_block_init", - "select_p_job_test", - "select_p_job_begin", - "select_p_job_ready", - "select_p_job_expand_allow", - "select_p_job_expand", - "select_p_job_resized", - "select_p_job_signal", - "select_p_job_fini", - "select_p_job_suspend", - "select_p_job_resume", - "select_p_step_pick_nodes", - "select_p_step_finish", - "select_p_pack_select_info", - "select_p_select_nodeinfo_pack", - "select_p_select_nodeinfo_unpack", - "select_p_select_nodeinfo_alloc", - "select_p_select_nodeinfo_free", - "select_p_select_nodeinfo_set_all", - "select_p_select_nodeinfo_set", - "select_p_select_nodeinfo_get", - "select_p_select_jobinfo_alloc", - "select_p_select_jobinfo_free", - "select_p_select_jobinfo_set", - "select_p_select_jobinfo_get", - "select_p_select_jobinfo_copy", - "select_p_select_jobinfo_pack", - "select_p_select_jobinfo_unpack", - "select_p_select_jobinfo_sprint", - "select_p_select_jobinfo_xstrdup", - "select_p_update_block", - "select_p_update_sub_node", - "select_p_get_info_from_plugin", - "select_p_update_node_config", - "select_p_update_node_state", - "select_p_alter_node_cnt", - "select_p_reconfigure", - "select_p_resv_test", - "select_p_ba_init", - "select_p_ba_fini", - "select_p_ba_get_dims", - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - c->select_type = xstrdup(select_type); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->select_errno = SLURM_SUCCESS; - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->select_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return SLURM_SUCCESS; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->select_type, plugin_strerror(errno)); - return SLURM_ERROR; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->select_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return SLURM_ERROR; - } - plugrack_set_major_type( c->plugin_list, "select" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, c->select_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find node selection plugin for %s", - c->select_type ); - - return SLURM_ERROR; - } +const char *node_select_syms[] = { + "plugin_id", + "select_p_state_save", + "select_p_state_restore", + "select_p_job_init", + "select_p_node_ranking", + "select_p_node_init", + "select_p_block_init", + "select_p_job_test", + "select_p_job_begin", + "select_p_job_ready", + "select_p_job_expand_allow", + "select_p_job_expand", + "select_p_job_resized", + "select_p_job_signal", + "select_p_job_fini", + "select_p_job_suspend", + "select_p_job_resume", + "select_p_step_pick_nodes", + "select_p_step_finish", + "select_p_pack_select_info", + "select_p_select_nodeinfo_pack", + "select_p_select_nodeinfo_unpack", + "select_p_select_nodeinfo_alloc", + "select_p_select_nodeinfo_free", + "select_p_select_nodeinfo_set_all", + "select_p_select_nodeinfo_set", + "select_p_select_nodeinfo_get", + "select_p_select_jobinfo_alloc", + "select_p_select_jobinfo_free", + "select_p_select_jobinfo_set", + "select_p_select_jobinfo_get", + "select_p_select_jobinfo_copy", + "select_p_select_jobinfo_pack", + "select_p_select_jobinfo_unpack", + "select_p_select_jobinfo_sprint", + "select_p_select_jobinfo_xstrdup", + "select_p_update_block", + "select_p_update_sub_node", + "select_p_get_info_from_plugin", + "select_p_update_node_config", + "select_p_update_node_state", + "select_p_alter_node_cnt", + "select_p_reconfigure", + "select_p_resv_test", + "select_p_ba_init", + "select_p_ba_fini", + "select_p_ba_get_dims", +}; - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete node selection plugin detected" ); - return SLURM_ERROR; - } - - return SLURM_SUCCESS; -} - -/* - * Destroy a node selection context - */ -static int _select_context_destroy( slurm_select_context_t *c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } +strong_alias(destroy_select_ba_request, slurm_destroy_select_ba_request); - xfree(c->select_type); +static int select_context_cnt = -1; +static int select_context_default = -1; - return rc; -} +static slurm_select_ops_t *ops = NULL; +static plugin_context_t **select_context = NULL; +static pthread_mutex_t select_context_lock = PTHREAD_MUTEX_INITIALIZER; /** * delete a block request @@ -275,11 +188,12 @@ extern int select_char2coord(char coord) extern int slurm_select_init(bool only_default) { int retval = SLURM_SUCCESS; - char *select_type = NULL; - int i, j, rc, len; + char *type = NULL; + int i, j, len; DIR *dirp; struct dirent *e; char *dir_array = NULL, *head = NULL; + char *plugin_type = "select"; if ( select_context ) return retval; @@ -289,17 +203,17 @@ extern int slurm_select_init(bool only_default) if ( select_context ) goto done; - select_type = slurm_get_select_type(); + type = slurm_get_select_type(); if (working_cluster_rec) { /* just ignore warnings here */ } else { #ifdef HAVE_XCPU - if (strcasecmp(select_type, "select/linear")) { - error("%s is incompatible with XCPU use", select_type); + if (strcasecmp(type, "select/linear")) { + error("%s is incompatible with XCPU use", type); fatal("Use SelectType=select/linear"); } #endif - if (!strcasecmp(select_type, "select/linear")) { + if (!strcasecmp(type, "select/linear")) { uint16_t cr_type = slurm_get_select_type_param(); if ((cr_type & CR_SOCKET) || (cr_type & CR_CORE) || (cr_type & CR_CPU)) @@ -308,12 +222,12 @@ extern int slurm_select_init(bool only_default) } #ifdef HAVE_BG - if (strcasecmp(select_type, "select/bluegene")) { - error("%s is incompatible with BlueGene", select_type); + if (strcasecmp(type, "select/bluegene")) { + error("%s is incompatible with BlueGene", type); fatal("Use SelectType=select/bluegene"); } #else - if (!strcasecmp(select_type, "select/bluegene")) { + if (!strcasecmp(type, "select/bluegene")) { fatal("Requested SelectType=select/bluegene " "in slurm.conf, but not running on a BG[L|P|Q] " "system. If looking to emulate a BG[L|P|Q] " @@ -323,12 +237,12 @@ extern int slurm_select_init(bool only_default) #endif #ifdef HAVE_CRAY - if (strcasecmp(select_type, "select/cray")) { - error("%s is incompatible with Cray", select_type); + if (strcasecmp(type, "select/cray")) { + error("%s is incompatible with Cray", type); fatal("Use SelectType=select/cray"); } #else - if (!strcasecmp(select_type, "select/cray")) { + if (!strcasecmp(type, "select/cray")) { fatal("Requested SelectType=select/cray " "in slurm.conf, but not running on a Cray " "system. If looking to emulate a Cray " @@ -338,17 +252,19 @@ extern int slurm_select_init(bool only_default) } select_context_cnt = 0; - if(only_default) { - select_context = xmalloc(sizeof(slurm_select_context_t)); - rc = _select_get_ops(select_type, select_context); - if (rc == SLURM_SUCCESS) { + if (only_default) { + ops = xmalloc(sizeof(slurm_select_ops_t)); + select_context = xmalloc(sizeof(plugin_context_t)); + if ((select_context[0] = plugin_context_create( + plugin_type, type, (void **)&ops[0], + node_select_syms, sizeof(node_select_syms)))) { select_context_default = 0; select_context_cnt++; } goto skip_load_all; } - if(!(dir_array = slurm_get_plugin_dir())) { + if (!(dir_array = slurm_get_plugin_dir())) { error("plugin_load_and_link: No plugin dir given"); goto done; } @@ -398,22 +314,27 @@ extern int slurm_select_init(bool only_default) snprintf(full_name, len, "select/%s", e->d_name+7); for (j=0; jtype)) break; } if (j >= select_context_cnt) { + xrealloc(ops, + (sizeof(slurm_select_ops_t) * + (select_context_cnt + 1))); xrealloc(select_context, - (sizeof(slurm_select_context_t) * + (sizeof(plugin_context_t) * (select_context_cnt + 1))); - rc = _select_get_ops( - full_name, - select_context + select_context_cnt); - - /* only add the ones this system has */ - if (rc == SLURM_SUCCESS) { + select_context[select_context_cnt] = + plugin_context_create( + plugin_type, full_name, + (void **)&ops[ + select_context_cnt], + node_select_syms, + sizeof(node_select_syms)); + if (select_context[select_context_cnt]) { /* set the default */ - if (!strcmp(full_name, select_type)) + if (!strcmp(full_name, type)) select_context_default = select_context_cnt; select_context_cnt++; @@ -431,31 +352,31 @@ extern int slurm_select_init(bool only_default) skip_load_all: if(select_context_default == -1) - fatal("Can't find plugin for %s", select_type); + fatal("Can't find plugin for %s", type); /* Insure that plugin_id is valid and unique */ for (i=0; itype, + select_context[j]->type); } - if (*(select_context[i].ops.plugin_id) < 100) { + if (*(ops[i].plugin_id) < 100) { fatal("SelectPlugins: Invalid plugin_id %u (<100) %s", - *(select_context[i].ops.plugin_id), - select_context[i].select_type); + *(ops[i].plugin_id), + select_context[i]->type); } } done: slurm_mutex_unlock( &select_context_lock ); - xfree(select_type); + xfree(type); xfree(dir_array); return retval; } @@ -469,10 +390,11 @@ extern int slurm_select_fini(void) goto fini; for (i=0; i= select_context_cnt) @@ -503,7 +425,7 @@ extern int select_get_plugin_id(void) if (slurm_select_init(0) < 0) return 0; - return *(select_context[select_context_default].ops.plugin_id); + return *(ops[select_context_default].plugin_id); } /* @@ -515,7 +437,7 @@ extern int select_g_state_save(char *dir_name) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.state_save)) + return (*(ops[select_context_default].state_save)) (dir_name); } @@ -529,7 +451,7 @@ extern int select_g_state_restore(char *dir_name) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.state_restore)) + return (*(ops[select_context_default].state_restore)) (dir_name); } @@ -542,7 +464,7 @@ extern int select_g_job_init(List job_list) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_init)) + return (*(ops[select_context_default].job_init)) (job_list); } @@ -557,7 +479,7 @@ extern bool select_g_node_ranking(struct node_record *node_ptr, int node_cnt) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.node_ranking)) + return (*(ops[select_context_default].node_ranking)) (node_ptr, node_cnt); } @@ -571,7 +493,7 @@ extern int select_g_node_init(struct node_record *node_ptr, int node_cnt) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.node_init)) + return (*(ops[select_context_default].node_init)) (node_ptr, node_cnt); } @@ -585,7 +507,7 @@ extern int select_g_block_init(List block_list) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.block_init)) + return (*(ops[select_context_default].block_init)) (block_list); } @@ -617,7 +539,7 @@ extern int select_g_job_test(struct job_record *job_ptr, bitstr_t *bitmap, if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_test)) + return (*(ops[select_context_default].job_test)) (job_ptr, bitmap, min_nodes, max_nodes, req_nodes, mode, @@ -635,7 +557,7 @@ extern int select_g_job_begin(struct job_record *job_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_begin)) + return (*(ops[select_context_default].job_begin)) (job_ptr); } @@ -650,7 +572,7 @@ extern int select_g_job_ready(struct job_record *job_ptr) if (slurm_select_init(0) < 0) return -1; - return (*(select_context[select_context_default].ops.job_ready)) + return (*(ops[select_context_default].job_ready)) (job_ptr); } @@ -662,7 +584,7 @@ extern bool select_g_job_expand_allow(void) if (slurm_select_init(0) < 0) return false; - return (*(select_context[select_context_default].ops.job_expand_allow)) + return (*(ops[select_context_default].job_expand_allow)) (); } @@ -678,7 +600,7 @@ extern int select_g_job_expand(struct job_record *from_job_ptr, if (slurm_select_init(0) < 0) return -1; - return (*(select_context[select_context_default].ops.job_expand)) + return (*(ops[select_context_default].job_expand)) (from_job_ptr, to_job_ptr); } @@ -693,7 +615,7 @@ extern int select_g_job_resized(struct job_record *job_ptr, if (slurm_select_init(0) < 0) return -1; - return (*(select_context[select_context_default].ops.job_resized)) + return (*(ops[select_context_default].job_resized)) (job_ptr, node_ptr); } @@ -708,7 +630,7 @@ extern int select_g_job_signal(struct job_record *job_ptr, int signal) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_signal)) + return (*(ops[select_context_default].job_signal)) (job_ptr, signal); } @@ -721,7 +643,7 @@ extern int select_g_job_fini(struct job_record *job_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_fini)) + return (*(ops[select_context_default].job_fini)) (job_ptr); } @@ -737,7 +659,7 @@ extern int select_g_job_suspend(struct job_record *job_ptr, bool indf_susp) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_suspend)) + return (*(ops[select_context_default].job_suspend)) (job_ptr, indf_susp); } @@ -753,7 +675,7 @@ extern int select_g_job_resume(struct job_record *job_ptr, bool indf_susp) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.job_resume)) + return (*(ops[select_context_default].job_resume)) (job_ptr, indf_susp); } @@ -778,7 +700,7 @@ extern bitstr_t *select_g_step_pick_nodes(struct job_record *job_ptr, xassert(step_jobinfo); - return (*(select_context[select_context_default].ops.step_pick_nodes)) + return (*(ops[select_context_default].step_pick_nodes)) (job_ptr, step_jobinfo->data, node_count); } @@ -791,7 +713,7 @@ extern int select_g_step_finish(struct step_record *step_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.step_finish)) + return (*(ops[select_context_default].step_finish)) (step_ptr); } @@ -802,7 +724,7 @@ extern int select_g_pack_select_info(time_t last_query_time, if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.pack_select_info)) + return (*(ops[select_context_default].pack_select_info)) (last_query_time, show_flags, buffer, protocol_version); } @@ -823,10 +745,10 @@ extern int select_g_select_nodeinfo_pack(dynamic_plugin_data_t *nodeinfo, plugin_id = select_context_default; if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) - pack32(*(select_context[plugin_id].ops.plugin_id), + pack32(*(ops[plugin_id].plugin_id), buffer); - return (*(select_context[plugin_id].ops. + return (*(ops[plugin_id]. nodeinfo_pack))(data, buffer, protocol_version); } @@ -847,7 +769,7 @@ extern int select_g_select_nodeinfo_unpack(dynamic_plugin_data_t **nodeinfo, uint32_t plugin_id; safe_unpack32(&plugin_id, buffer); for (i=0; iplugin_id = i; break; } @@ -857,7 +779,7 @@ extern int select_g_select_nodeinfo_unpack(dynamic_plugin_data_t **nodeinfo, } } else nodeinfo_ptr->plugin_id = select_context_default; - if ((*(select_context[nodeinfo_ptr->plugin_id].ops.nodeinfo_unpack)) + if ((*(ops[nodeinfo_ptr->plugin_id].nodeinfo_unpack)) ((select_nodeinfo_t **)&nodeinfo_ptr->data, buffer, protocol_version) != SLURM_SUCCESS) goto unpack_error; @@ -884,7 +806,7 @@ extern dynamic_plugin_data_t *select_g_select_nodeinfo_alloc(void) nodeinfo_ptr = xmalloc(sizeof(dynamic_plugin_data_t)); nodeinfo_ptr->plugin_id = plugin_id; - nodeinfo_ptr->data = (*(select_context[plugin_id].ops. + nodeinfo_ptr->data = (*(ops[plugin_id]. nodeinfo_alloc))(); return nodeinfo_ptr; } @@ -898,7 +820,7 @@ extern int select_g_select_nodeinfo_free(dynamic_plugin_data_t *nodeinfo) if(nodeinfo) { if(nodeinfo->data) - rc = (*(select_context[nodeinfo->plugin_id].ops. + rc = (*(ops[nodeinfo->plugin_id]. nodeinfo_free))(nodeinfo->data); xfree(nodeinfo); } @@ -910,7 +832,7 @@ extern int select_g_select_nodeinfo_set_all(void) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.nodeinfo_set_all)) + return (*(ops[select_context_default].nodeinfo_set_all)) (); } @@ -919,7 +841,7 @@ extern int select_g_select_nodeinfo_set(struct job_record *job_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.nodeinfo_set)) + return (*(ops[select_context_default].nodeinfo_set)) (job_ptr); } @@ -940,7 +862,7 @@ extern int select_g_select_nodeinfo_get(dynamic_plugin_data_t *nodeinfo, } else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops.nodeinfo_get)) + return (*(ops[plugin_id].nodeinfo_get)) (nodedata, dinfo, state, data); } @@ -957,7 +879,7 @@ extern dynamic_plugin_data_t *select_g_select_jobinfo_alloc(void) jobinfo_ptr = xmalloc(sizeof(dynamic_plugin_data_t)); jobinfo_ptr->plugin_id = plugin_id; - jobinfo_ptr->data = (*(select_context[plugin_id].ops. + jobinfo_ptr->data = (*(ops[plugin_id]. jobinfo_alloc))(); return jobinfo_ptr; } @@ -973,7 +895,7 @@ extern int select_g_select_jobinfo_free(dynamic_plugin_data_t *jobinfo) return SLURM_ERROR; if (jobinfo) { if (jobinfo->data) { - rc = (*(select_context[jobinfo->plugin_id].ops. + rc = (*(ops[jobinfo->plugin_id]. jobinfo_free))(jobinfo->data); } xfree(jobinfo); @@ -997,7 +919,7 @@ extern int select_g_select_jobinfo_set(dynamic_plugin_data_t *jobinfo, } else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops.jobinfo_set)) + return (*(ops[plugin_id].jobinfo_set)) (jobdata, data_type, data); } @@ -1022,7 +944,7 @@ extern int select_g_select_jobinfo_get(dynamic_plugin_data_t *jobinfo, } else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops.jobinfo_get)) + return (*(ops[plugin_id].jobinfo_get)) (jobdata, data_type, data); } @@ -1041,7 +963,7 @@ extern dynamic_plugin_data_t *select_g_select_jobinfo_copy( jobinfo_ptr = xmalloc(sizeof(dynamic_plugin_data_t)); if(jobinfo) { jobinfo_ptr->plugin_id = jobinfo->plugin_id; - jobinfo_ptr->data = (*(select_context[jobinfo->plugin_id].ops. + jobinfo_ptr->data = (*(ops[jobinfo->plugin_id]. jobinfo_copy))(jobinfo->data); } else jobinfo_ptr->plugin_id = select_context_default; @@ -1064,17 +986,15 @@ extern int select_g_select_jobinfo_pack(dynamic_plugin_data_t *jobinfo, if (slurm_select_init(0) < 0) return SLURM_ERROR; - if(jobinfo) { + if (jobinfo) { data = jobinfo->data; plugin_id = jobinfo->plugin_id; } else plugin_id = select_context_default; - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) - pack32(*(select_context[plugin_id].ops.plugin_id), - buffer); - return (*(select_context[plugin_id].ops. - jobinfo_pack))(data, buffer, protocol_version); + if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) + pack32(*(ops[plugin_id].plugin_id), buffer); + return (*(ops[plugin_id].jobinfo_pack))(data, buffer, protocol_version); } /* unpack a select job credential from a buffer @@ -1100,7 +1020,7 @@ extern int select_g_select_jobinfo_unpack(dynamic_plugin_data_t **jobinfo, uint32_t plugin_id; safe_unpack32(&plugin_id, buffer); for (i=0; iplugin_id = i; break; } @@ -1111,7 +1031,7 @@ extern int select_g_select_jobinfo_unpack(dynamic_plugin_data_t **jobinfo, } else jobinfo_ptr->plugin_id = select_context_default; - if ((*(select_context[jobinfo_ptr->plugin_id].ops.jobinfo_unpack)) + if ((*(ops[jobinfo_ptr->plugin_id].jobinfo_unpack)) ((select_jobinfo_t **)&jobinfo_ptr->data, buffer, protocol_version) != SLURM_SUCCESS) goto unpack_error; @@ -1146,7 +1066,7 @@ extern char *select_g_select_jobinfo_sprint(dynamic_plugin_data_t *jobinfo, } else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops. + return (*(ops[plugin_id]. jobinfo_sprint)) (data, buf, size, mode); } @@ -1170,7 +1090,7 @@ extern char *select_g_select_jobinfo_xstrdup( } else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops. + return (*(ops[plugin_id]. jobinfo_xstrdup))(data, mode); } @@ -1183,7 +1103,7 @@ extern int select_g_update_block (update_block_msg_t *block_desc_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops. + return (*(ops[select_context_default]. update_block))(block_desc_ptr); } @@ -1196,7 +1116,7 @@ extern int select_g_update_sub_node (update_block_msg_t *block_desc_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops. + return (*(ops[select_context_default]. update_sub_node))(block_desc_ptr); } @@ -1213,7 +1133,7 @@ extern int select_g_get_info_from_plugin (enum select_plugindata_info dinfo, if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops. + return (*(ops[select_context_default]. get_info_from_plugin))(dinfo, job_ptr, data); } @@ -1228,7 +1148,7 @@ extern int select_g_update_node_config (int index) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops. + return (*(ops[select_context_default]. update_node_config))(index); } @@ -1244,7 +1164,7 @@ extern int select_g_update_node_state (struct node_record *node_ptr) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.update_node_state)) + return (*(ops[select_context_default].update_node_state)) (node_ptr); } @@ -1262,8 +1182,7 @@ extern int select_g_alter_node_cnt (enum select_node_cnt type, void *data) uint32_t *nodes = (uint32_t *)data; *nodes = 1; } - return (*(select_context[select_context_default].ops.alter_node_cnt)) - (type, data); + return (*(ops[select_context_default].alter_node_cnt))(type, data); } /* @@ -1274,7 +1193,7 @@ extern int select_g_reconfigure (void) if (slurm_select_init(0) < 0) return SLURM_ERROR; - return (*(select_context[select_context_default].ops.reconfigure))(); + return (*(ops[select_context_default].reconfigure))(); } /* @@ -1291,7 +1210,7 @@ extern bitstr_t * select_g_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) if (slurm_select_init(0) < 0) return NULL; - return (*(select_context[select_context_default].ops.resv_test)) + return (*(ops[select_context_default].resv_test)) (avail_bitmap, node_cnt); } @@ -1307,7 +1226,7 @@ extern void select_g_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) else plugin_id = select_context_default; - (*(select_context[plugin_id].ops.ba_init))(node_info_ptr, sanity_check); + (*(ops[plugin_id].ba_init))(node_info_ptr, sanity_check); } extern void select_g_ba_fini(void) @@ -1322,7 +1241,7 @@ extern void select_g_ba_fini(void) else plugin_id = select_context_default; - (*(select_context[plugin_id].ops.ba_fini))(); + (*(ops[plugin_id].ba_fini))(); } extern int *select_g_ba_get_dims(void) @@ -1337,5 +1256,5 @@ extern int *select_g_ba_get_dims(void) else plugin_id = select_context_default; - return (*(select_context[plugin_id].ops.ba_get_dims))(); + return (*(ops[plugin_id].ba_get_dims))(); } diff --git a/src/common/node_select.h b/src/common/node_select.h index fe4d7e5a73..c174938d49 100644 --- a/src/common/node_select.h +++ b/src/common/node_select.h @@ -221,13 +221,12 @@ typedef struct slurm_select_ops { } slurm_select_ops_t; -typedef struct slurm_select_context { - char *select_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int select_errno; - slurm_select_ops_t ops; -} slurm_select_context_t; +/* + * Defined in node_select.c Must be synchronized with slurm_select_ops_t above. + * Also must be synchronized with the other_plugin.c in + * the select/cray plugin. + */ +extern const char *node_select_syms[]; /* Convert a node coordinate character into its equivalent number: * '0' = 0; '9' = 9; 'A' = 10; etc. */ diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index 8151b7b9bf..6a9d323ced 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -59,145 +59,62 @@ #include "src/common/xstring.h" #include "src/common/node_select.h" -/* If there is a new select plugin, list it here */ -static slurm_select_context_t *other_select_context = NULL; -static pthread_mutex_t other_select_context_lock = - PTHREAD_MUTEX_INITIALIZER; - -/* - * Locate and load the appropriate plugin - */ -static slurm_select_ops_t *_other_select_get_ops(slurm_select_context_t *c) -{ - /* - * Must be synchronized with slurm_select_ops_t in node_select.h and - * the list in node_select.c:_select_get_ops(). - */ - static const char *syms[] = { - "plugin_id", - "select_p_state_save", - "select_p_state_restore", - "select_p_job_init", - "select_p_node_ranking", - "select_p_node_init", - "select_p_block_init", - "select_p_job_test", - "select_p_job_begin", - "select_p_job_ready", - "select_p_job_expand_allow", - "select_p_job_expand", - "select_p_job_resized", - "select_p_job_signal", - "select_p_job_fini", - "select_p_job_suspend", - "select_p_job_resume", - "select_p_step_pick_nodes", - "select_p_step_finish", - "select_p_pack_select_info", - "select_p_select_nodeinfo_pack", - "select_p_select_nodeinfo_unpack", - "select_p_select_nodeinfo_alloc", - "select_p_select_nodeinfo_free", - "select_p_select_nodeinfo_set_all", - "select_p_select_nodeinfo_set", - "select_p_select_nodeinfo_get", - "select_p_select_jobinfo_alloc", - "select_p_select_jobinfo_free", - "select_p_select_jobinfo_set", - "select_p_select_jobinfo_get", - "select_p_select_jobinfo_copy", - "select_p_select_jobinfo_pack", - "select_p_select_jobinfo_unpack", - "select_p_select_jobinfo_sprint", - "select_p_select_jobinfo_xstrdup", - "select_p_update_block", - "select_p_update_sub_node", - "select_p_get_info_from_plugin", - "select_p_update_node_config", - "select_p_update_node_state", - "select_p_alter_node_cnt", - "select_p_reconfigure", - "select_p_resv_test", - "select_p_ba_init", - "select_p_ba_fini", - "select_p_ba_get_dims", - }; - int n_syms = sizeof(syms) / sizeof(char *); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->select_type, n_syms, syms, - (void **) &c->ops); - if (c->cur_plugin != PLUGIN_INVALID_HANDLE) - return &c->ops; - - if (errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->select_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->select_type); - - /* Get plugin list. */ - if (!c->plugin_list) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if (!c->plugin_list) { - error("cannot create plugin manager"); - return NULL; - } - plugrack_set_major_type(c->plugin_list, "select"); - plugrack_set_paranoia(c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(c->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->select_type); - if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { - error("cannot find node selection plugin for %s", - c->select_type); - - return NULL; - } - - /* Dereference the API. */ - if (plugin_get_syms(c->cur_plugin, - n_syms, - syms, - (void **) &c->ops) < n_syms) { - error("incomplete node selection plugin detected"); - return NULL; - } - - return &c->ops; -} - /* - * Destroy a node selection context - */ -static int _other_select_context_destroy(slurm_select_context_t *c) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if (c->plugin_list) { - if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) - rc = SLURM_ERROR; - } else { - plugin_unload(c->cur_plugin); - } - - xfree(c->select_type); - - return rc; -} + * Must be synchronized with slurm_select_ops_t in node_select.h. + */ +const char *node_select_syms[] = { + "plugin_id", + "select_p_state_save", + "select_p_state_restore", + "select_p_job_init", + "select_p_node_ranking", + "select_p_node_init", + "select_p_block_init", + "select_p_job_test", + "select_p_job_begin", + "select_p_job_ready", + "select_p_job_expand_allow", + "select_p_job_expand", + "select_p_job_resized", + "select_p_job_signal", + "select_p_job_fini", + "select_p_job_suspend", + "select_p_job_resume", + "select_p_step_pick_nodes", + "select_p_step_finish", + "select_p_pack_select_info", + "select_p_select_nodeinfo_pack", + "select_p_select_nodeinfo_unpack", + "select_p_select_nodeinfo_alloc", + "select_p_select_nodeinfo_free", + "select_p_select_nodeinfo_set_all", + "select_p_select_nodeinfo_set", + "select_p_select_nodeinfo_get", + "select_p_select_jobinfo_alloc", + "select_p_select_jobinfo_free", + "select_p_select_jobinfo_set", + "select_p_select_jobinfo_get", + "select_p_select_jobinfo_copy", + "select_p_select_jobinfo_pack", + "select_p_select_jobinfo_unpack", + "select_p_select_jobinfo_sprint", + "select_p_select_jobinfo_xstrdup", + "select_p_update_block", + "select_p_update_sub_node", + "select_p_get_info_from_plugin", + "select_p_update_node_config", + "select_p_update_node_state", + "select_p_alter_node_cnt", + "select_p_reconfigure", + "select_p_resv_test", + "select_p_ba_init", + "select_p_ba_fini", + "select_p_ba_get_dims", +}; + +static slurm_select_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* * Initialize context for node selection plugin @@ -205,11 +122,15 @@ static int _other_select_context_destroy(slurm_select_context_t *c) extern int other_select_init(void) { int retval = SLURM_SUCCESS; - char *select_type = NULL; + char *plugin_type = "select"; + char *type = NULL; - slurm_mutex_lock(&other_select_context_lock); + if (g_context) + return retval; - if (other_select_context) + slurm_mutex_lock(&g_context_lock); + + if (g_context) goto done; /* @@ -222,26 +143,21 @@ extern int other_select_init(void) * time in the future this is allowable use code such as this * to make things switch to the cons_res plugin. * if (slurmctld_conf.select_type_param & CR_CONS_RES) - * select_type = "select/cons_res"; + * type = "select/cons_res"; * else - * select_type = "select/linear"; + * type = "select/linear"; */ - select_type = "select/linear"; - - other_select_context = xmalloc(sizeof(slurm_select_context_t)); - other_select_context->select_type = xstrdup(select_type); - other_select_context->cur_plugin = PLUGIN_INVALID_HANDLE; - other_select_context->select_errno = SLURM_SUCCESS; - - if (!_other_select_get_ops(other_select_context)) { - error("cannot resolve acct_storage plugin operations"); - _other_select_context_destroy(other_select_context); - other_select_context = NULL; + type = "select/linear"; + if (!(g_context = plugin_context_create( + plugin_type, type, (void **)&ops, + node_select_syms, sizeof(node_select_syms)))) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock(&other_select_context_lock); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -249,14 +165,14 @@ extern int other_select_fini(void) { int rc = SLURM_SUCCESS; - slurm_mutex_lock(&other_select_context_lock); - if (!other_select_context) + slurm_mutex_lock(&g_context_lock); + if (!g_context) goto fini; - rc = _other_select_context_destroy(other_select_context); - other_select_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; fini: - slurm_mutex_unlock(&other_select_context_lock); + slurm_mutex_unlock(&g_context_lock); return rc; } @@ -269,7 +185,7 @@ extern int other_state_save(char *dir_name) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.state_save))(dir_name); + return (*(ops.state_save))(dir_name); } /* @@ -282,7 +198,7 @@ extern int other_state_restore(char *dir_name) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.state_restore))(dir_name); + return (*(ops.state_restore))(dir_name); } /* @@ -294,7 +210,7 @@ extern int other_job_init(List job_list) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_init))(job_list); + return (*(ops.job_init))(job_list); } /* @@ -307,7 +223,7 @@ extern int other_node_init(struct node_record *node_ptr, int node_cnt) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.node_init))(node_ptr, node_cnt); + return (*(ops.node_init))(node_ptr, node_cnt); } @@ -320,7 +236,7 @@ extern int other_block_init(List block_list) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.block_init))(block_list); + return (*(ops.block_init))(block_list); } /* @@ -351,7 +267,7 @@ extern int other_job_test(struct job_record *job_ptr, bitstr_t *bitmap, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_test)) + return (*(ops.job_test)) (job_ptr, bitmap, min_nodes, max_nodes, req_nodes, mode, @@ -369,8 +285,7 @@ extern int other_job_begin(struct job_record *job_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_begin)) - (job_ptr); + return (*(ops.job_begin))(job_ptr); } /* @@ -384,8 +299,7 @@ extern int other_job_ready(struct job_record *job_ptr) if (other_select_init() < 0) return -1; - return (*(other_select_context->ops.job_ready)) - (job_ptr); + return (*(ops.job_ready))(job_ptr); } /* @@ -396,7 +310,7 @@ extern bool other_job_expand_allow(void) if (other_select_init() < 0) return false; - return (*(other_select_context->ops.job_expand_allow))(); + return (*(ops.job_expand_allow))(); } /* @@ -411,8 +325,7 @@ extern int other_job_expand(struct job_record *from_job_ptr, if (other_select_init() < 0) return -1; - return (*(other_select_context->ops.job_expand)) - (from_job_ptr, to_job_ptr); + return (*(ops.job_expand))(from_job_ptr, to_job_ptr); } /* @@ -426,8 +339,7 @@ extern int other_job_resized(struct job_record *job_ptr, if (other_select_init() < 0) return -1; - return (*(other_select_context->ops.job_resized)) - (job_ptr, node_ptr); + return (*(ops.job_resized))(job_ptr, node_ptr); } /* @@ -440,8 +352,7 @@ extern int other_job_signal(struct job_record *job_ptr, int signal) if (other_select_init() < 0) return -1; - return (*(other_select_context->ops.job_signal)) - (job_ptr, signal); + return (*(ops.job_signal))(job_ptr, signal); } /* @@ -453,8 +364,7 @@ extern int other_job_fini(struct job_record *job_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_fini)) - (job_ptr); + return (*(ops.job_fini))(job_ptr); } /* @@ -469,8 +379,7 @@ extern int other_job_suspend(struct job_record *job_ptr, bool indf_susp) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_suspend)) - (job_ptr, indf_susp); + return (*(ops.job_suspend))(job_ptr, indf_susp); } /* @@ -485,8 +394,7 @@ extern int other_job_resume(struct job_record *job_ptr, bool indf_susp) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.job_resume)) - (job_ptr, indf_susp); + return (*(ops.job_resume))(job_ptr, indf_susp); } /* @@ -508,8 +416,7 @@ extern bitstr_t *other_step_pick_nodes(struct job_record *job_ptr, if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.step_pick_nodes)) - (job_ptr, jobinfo, node_count); + return (*(ops.step_pick_nodes))(job_ptr, jobinfo, node_count); } /* @@ -521,7 +428,7 @@ extern int other_step_finish(struct step_record *step_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.step_finish)) + return (*(ops.step_finish)) (step_ptr); } @@ -531,7 +438,7 @@ extern int other_pack_select_info(time_t last_query_time, uint16_t show_flags, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.pack_select_info)) + return (*(ops.pack_select_info)) (last_query_time, show_flags, buffer, protocol_version); } @@ -542,8 +449,7 @@ extern int other_select_nodeinfo_pack(select_nodeinfo_t *nodeinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_pack)) - (nodeinfo, buffer, protocol_version); + return (*(ops.nodeinfo_pack))(nodeinfo, buffer, protocol_version); } extern int other_select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, @@ -553,8 +459,7 @@ extern int other_select_nodeinfo_unpack(select_nodeinfo_t **nodeinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_unpack)) - (nodeinfo, buffer, protocol_version); + return (*(ops.nodeinfo_unpack))(nodeinfo, buffer, protocol_version); } extern select_nodeinfo_t *other_select_nodeinfo_alloc(void) @@ -562,7 +467,7 @@ extern select_nodeinfo_t *other_select_nodeinfo_alloc(void) if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.nodeinfo_alloc))(); + return (*(ops.nodeinfo_alloc))(); } extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) @@ -570,7 +475,7 @@ extern int other_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_free))(nodeinfo); + return (*(ops.nodeinfo_free))(nodeinfo); } extern int other_select_nodeinfo_set_all(void) @@ -578,7 +483,7 @@ extern int other_select_nodeinfo_set_all(void) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_set_all))(); + return (*(ops.nodeinfo_set_all))(); } extern int other_select_nodeinfo_set(struct job_record *job_ptr) @@ -586,7 +491,7 @@ extern int other_select_nodeinfo_set(struct job_record *job_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_set))(job_ptr); + return (*(ops.nodeinfo_set))(job_ptr); } extern int other_select_nodeinfo_get(select_nodeinfo_t *nodeinfo, @@ -597,8 +502,7 @@ extern int other_select_nodeinfo_get(select_nodeinfo_t *nodeinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.nodeinfo_get)) - (nodeinfo, dinfo, state, data); + return (*(ops.nodeinfo_get))(nodeinfo, dinfo, state, data); } extern select_jobinfo_t *other_select_jobinfo_alloc(void) @@ -606,7 +510,7 @@ extern select_jobinfo_t *other_select_jobinfo_alloc(void) if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.jobinfo_alloc))();; + return (*(ops.jobinfo_alloc))();; } /* free storage previously allocated for a select job credential @@ -616,7 +520,7 @@ extern int other_select_jobinfo_free(select_jobinfo_t *jobinfo) { if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.jobinfo_free))(jobinfo); + return (*(ops.jobinfo_free))(jobinfo); } extern int other_select_jobinfo_set(select_jobinfo_t *jobinfo, @@ -626,8 +530,7 @@ extern int other_select_jobinfo_set(select_jobinfo_t *jobinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.jobinfo_set)) - (jobinfo, data_type, data); + return (*(ops.jobinfo_set))(jobinfo, data_type, data); } /* get data from a select job credential @@ -642,8 +545,7 @@ extern int other_select_jobinfo_get(select_jobinfo_t *jobinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.jobinfo_get)) - (jobinfo, data_type, data); + return (*(ops.jobinfo_get))(jobinfo, data_type, data); } /* copy a select job credential @@ -657,7 +559,7 @@ extern select_jobinfo_t *other_select_jobinfo_copy( if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.jobinfo_copy))(jobinfo); + return (*(ops.jobinfo_copy))(jobinfo); } /* pack a select job credential into a buffer in machine independent form @@ -672,8 +574,7 @@ extern int other_select_jobinfo_pack(select_jobinfo_t *jobinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.jobinfo_pack)) - (jobinfo, buffer, protocol_version); + return (*(ops.jobinfo_pack))(jobinfo, buffer, protocol_version); } /* unpack a select job credential from a buffer @@ -689,8 +590,7 @@ extern int other_select_jobinfo_unpack(select_jobinfo_t **jobinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.jobinfo_unpack)) - (jobinfo, buffer, protocol_version); + return (*(ops.jobinfo_unpack))(jobinfo, buffer, protocol_version); } /* write select job credential to a string @@ -706,8 +606,7 @@ extern char *other_select_jobinfo_sprint(select_jobinfo_t *jobinfo, if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.jobinfo_sprint)) - (jobinfo, buf, size, mode); + return (*(ops.jobinfo_sprint))(jobinfo, buf, size, mode); } /* write select job info to a string * IN jobinfo - a select job credential @@ -720,8 +619,7 @@ extern char *other_select_jobinfo_xstrdup( if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops. - jobinfo_xstrdup))(jobinfo, mode); + return (*(ops.jobinfo_xstrdup))(jobinfo, mode); } /* @@ -733,8 +631,7 @@ extern int other_update_block (update_block_msg_t *block_desc_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops. - update_block))(block_desc_ptr); + return (*(ops.update_block))(block_desc_ptr); } /* @@ -746,8 +643,7 @@ extern int other_update_sub_node (update_block_msg_t *block_desc_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops. - update_sub_node))(block_desc_ptr); + return (*(ops.update_sub_node))(block_desc_ptr); } /* @@ -763,8 +659,7 @@ extern int other_get_info_from_plugin (enum select_plugindata_info dinfo, if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops. - get_info_from_plugin))(dinfo, job_ptr, data); + return (*(ops.get_info_from_plugin))(dinfo, job_ptr, data); } /* @@ -778,7 +673,7 @@ extern int other_update_node_config (int index) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops. + return (*(ops. update_node_config))(index); } @@ -794,7 +689,7 @@ extern int other_update_node_state (struct node_record *node_ptr) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.update_node_state))(node_ptr); + return (*(ops.update_node_state))(node_ptr); } /* @@ -806,7 +701,7 @@ extern int other_alter_node_cnt (enum select_node_cnt type, void *data) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.alter_node_cnt))(type, data); + return (*(ops.alter_node_cnt))(type, data); } /* @@ -817,7 +712,7 @@ extern int other_reconfigure (void) if (other_select_init() < 0) return SLURM_ERROR; - return (*(other_select_context->ops.reconfigure))(); + return (*(ops.reconfigure))(); } /* @@ -834,8 +729,7 @@ extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.resv_test)) - (avail_bitmap, node_cnt); + return (*(ops.resv_test))(avail_bitmap, node_cnt); } extern void other_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) @@ -843,7 +737,7 @@ extern void other_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) if (other_select_init() < 0) return; - (*(other_select_context->ops.ba_init))(node_info_ptr, sanity_check); + (*(ops.ba_init))(node_info_ptr, sanity_check); } extern void other_ba_fini(void) @@ -851,7 +745,7 @@ extern void other_ba_fini(void) if (other_select_init() < 0) return; - (*(other_select_context->ops.ba_fini))(); + (*(ops.ba_fini))(); } extern int *other_ba_get_dims(void) @@ -859,5 +753,5 @@ extern int *other_ba_get_dims(void) if (other_select_init() < 0) return NULL; - return (*(other_select_context->ops.ba_get_dims))(); + return (*(ops.ba_get_dims))(); } -- GitLab From 92b7870d45a8efbf3134cf1bef3263c9be40acff Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:26:53 -0700 Subject: [PATCH 256/614] move syms definition --- src/common/slurm_accounting_storage.c | 122 +++++++++++++------------- 1 file changed, 61 insertions(+), 61 deletions(-) diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index 901e497375..0d074fe983 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -189,6 +189,67 @@ typedef struct slurm_acct_storage_ops { int (*flush_jobs) (void *db_conn, time_t event_time); } slurm_acct_storage_ops_t; +/* + * Must be synchronized with slurm_acct_storage_ops_t above. + */ +static const char *syms[] = { + "acct_storage_p_get_connection", + "acct_storage_p_close_connection", + "acct_storage_p_commit", + "acct_storage_p_add_users", + "acct_storage_p_add_coord", + "acct_storage_p_add_accts", + "acct_storage_p_add_clusters", + "acct_storage_p_add_associations", + "acct_storage_p_add_qos", + "acct_storage_p_add_wckeys", + "acct_storage_p_add_reservation", + "acct_storage_p_modify_users", + "acct_storage_p_modify_accts", + "acct_storage_p_modify_clusters", + "acct_storage_p_modify_associations", + "acct_storage_p_modify_job", + "acct_storage_p_modify_qos", + "acct_storage_p_modify_wckeys", + "acct_storage_p_modify_reservation", + "acct_storage_p_remove_users", + "acct_storage_p_remove_coord", + "acct_storage_p_remove_accts", + "acct_storage_p_remove_clusters", + "acct_storage_p_remove_associations", + "acct_storage_p_remove_qos", + "acct_storage_p_remove_wckeys", + "acct_storage_p_remove_reservation", + "acct_storage_p_get_users", + "acct_storage_p_get_accts", + "acct_storage_p_get_clusters", + "acct_storage_p_get_config", + "acct_storage_p_get_associations", + "acct_storage_p_get_events", + "acct_storage_p_get_problems", + "acct_storage_p_get_qos", + "acct_storage_p_get_wckeys", + "acct_storage_p_get_reservations", + "acct_storage_p_get_txn", + "acct_storage_p_get_usage", + "acct_storage_p_roll_usage", + "clusteracct_storage_p_node_down", + "clusteracct_storage_p_node_up", + "clusteracct_storage_p_cluster_cpus", + "clusteracct_storage_p_register_ctld", + "clusteracct_storage_p_register_disconn_ctld", + "clusteracct_storage_p_fini_ctld", + "jobacct_storage_p_job_start", + "jobacct_storage_p_job_complete", + "jobacct_storage_p_step_start", + "jobacct_storage_p_step_complete", + "jobacct_storage_p_suspend", + "jobacct_storage_p_get_jobs_cond", + "jobacct_storage_p_archive", + "jobacct_storage_p_archive_load", + "acct_storage_p_update_shares_used", + "acct_storage_p_flush_jobs_on_cluster" +}; static slurm_acct_storage_ops_t ops; static plugin_context_t *plugin_context = NULL; @@ -202,67 +263,6 @@ extern int slurm_acct_storage_init(char *loc) int retval = SLURM_SUCCESS; char *plugin_type = "accounting_storage"; char *type = NULL; - /* - * Must be synchronized with slurm_acct_storage_ops_t above. - */ - static const char *syms[] = { - "acct_storage_p_get_connection", - "acct_storage_p_close_connection", - "acct_storage_p_commit", - "acct_storage_p_add_users", - "acct_storage_p_add_coord", - "acct_storage_p_add_accts", - "acct_storage_p_add_clusters", - "acct_storage_p_add_associations", - "acct_storage_p_add_qos", - "acct_storage_p_add_wckeys", - "acct_storage_p_add_reservation", - "acct_storage_p_modify_users", - "acct_storage_p_modify_accts", - "acct_storage_p_modify_clusters", - "acct_storage_p_modify_associations", - "acct_storage_p_modify_job", - "acct_storage_p_modify_qos", - "acct_storage_p_modify_wckeys", - "acct_storage_p_modify_reservation", - "acct_storage_p_remove_users", - "acct_storage_p_remove_coord", - "acct_storage_p_remove_accts", - "acct_storage_p_remove_clusters", - "acct_storage_p_remove_associations", - "acct_storage_p_remove_qos", - "acct_storage_p_remove_wckeys", - "acct_storage_p_remove_reservation", - "acct_storage_p_get_users", - "acct_storage_p_get_accts", - "acct_storage_p_get_clusters", - "acct_storage_p_get_config", - "acct_storage_p_get_associations", - "acct_storage_p_get_events", - "acct_storage_p_get_problems", - "acct_storage_p_get_qos", - "acct_storage_p_get_wckeys", - "acct_storage_p_get_reservations", - "acct_storage_p_get_txn", - "acct_storage_p_get_usage", - "acct_storage_p_roll_usage", - "clusteracct_storage_p_node_down", - "clusteracct_storage_p_node_up", - "clusteracct_storage_p_cluster_cpus", - "clusteracct_storage_p_register_ctld", - "clusteracct_storage_p_register_disconn_ctld", - "clusteracct_storage_p_fini_ctld", - "jobacct_storage_p_job_start", - "jobacct_storage_p_job_complete", - "jobacct_storage_p_step_start", - "jobacct_storage_p_step_complete", - "jobacct_storage_p_suspend", - "jobacct_storage_p_get_jobs_cond", - "jobacct_storage_p_archive", - "jobacct_storage_p_archive_load", - "acct_storage_p_update_shares_used", - "acct_storage_p_flush_jobs_on_cluster" - }; if (plugin_context) return retval; -- GitLab From 57a665ab543b9633e599c81a6fbc040d516100f3 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:27:41 -0700 Subject: [PATCH 257/614] convert to generic context for auth plugins --- src/common/slurm_auth.c | 242 +++++++++------------------------------- 1 file changed, 50 insertions(+), 192 deletions(-) diff --git a/src/common/slurm_auth.c b/src/common/slurm_auth.c index 264c605a71..72dbcacc04 100644 --- a/src/common/slurm_auth.c +++ b/src/common/slurm_auth.c @@ -72,39 +72,29 @@ typedef struct slurm_auth_ops { int (*sa_errno) ( void *cred ); const char * (*sa_errstr) ( int slurm_errno ); } slurm_auth_ops_t; - /* - * Implementation of the authentication context. Hopefully everything - * having to do with plugins will be abstracted under here so that the - * callers can just deal with creating a context and asking for the - * operations implemented pertinent to that context. - * - * auth_type - the string (presumably from configuration files) - * describing the desired form of authentication, such as "auth/munge" - * or "auth/kerberos" or "auth/none". - * - * plugin_list - the plugin rack managing the loading and unloading of - * plugins for authencation. - * - * cur_plugin - the plugin currently supplying operations to the caller. - * - * ops - a table of pointers to functions in the plugin which correspond - * to the standardized plugin API. We create this table by text references - * into the plugin's symbol table. + * These strings must be kept in the same order as the fields + * declared for slurm_auth_ops_t. */ -struct slurm_auth_context { - char * auth_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int auth_errno; - slurm_auth_ops_t ops; +static const char *syms[] = { + "slurm_auth_create", + "slurm_auth_destroy", + "slurm_auth_verify", + "slurm_auth_get_uid", + "slurm_auth_get_gid", + "slurm_auth_pack", + "slurm_auth_unpack", + "slurm_auth_print", + "slurm_auth_errno", + "slurm_auth_errstr" }; /* * A global authentication context. "Global" in the sense that there's * only one, with static bindings. We don't export it. */ -static slurm_auth_context_t g_context = NULL; +static slurm_auth_ops_t ops; +static plugin_context_t *g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; /* @@ -116,82 +106,6 @@ static arg_desc_t auth_args[] = { { NULL } }; -/* - * Resolve the operations from the plugin. - */ -static slurm_auth_ops_t * -slurm_auth_get_ops( slurm_auth_context_t c ) -{ - /* - * These strings must be kept in the same order as the fields - * declared for slurm_auth_ops_t. - */ - static const char *syms[] = { - "slurm_auth_create", - "slurm_auth_destroy", - "slurm_auth_verify", - "slurm_auth_get_uid", - "slurm_auth_get_gid", - "slurm_auth_pack", - "slurm_auth_unpack", - "slurm_auth_print", - "slurm_auth_errno", - "slurm_auth_errstr" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->auth_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->auth_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->auth_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "Unable to create auth plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "auth" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = plugrack_use_by_type( c->plugin_list, c->auth_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "can't find a plugin for type %s", c->auth_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete auth plugin detected" ); - return NULL; - } - - return &c->ops; -} const arg_desc_t * slurm_auth_get_arg_desc( void ) @@ -226,37 +140,6 @@ slurm_auth_marshal_args( void *hosts, int timeout ) return argv; } - -slurm_auth_context_t -slurm_auth_context_create( const char *auth_type ) -{ - slurm_auth_context_t c; - - if ( auth_type == NULL ) { - debug3( "slurm_auth_context_create: no authentication type" ); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_auth_context ) ); - - c->auth_errno = SLURM_SUCCESS; - - /* Copy the authentication type. */ - c->auth_type = xstrdup( auth_type ); - if ( c->auth_type == NULL ) { - debug3( "can't make local copy of authentication type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - - static const char * slurm_auth_generic_errstr( int slurm_errno ) { @@ -286,68 +169,43 @@ slurm_auth_generic_errstr( int slurm_errno ) } } - -static int -_slurm_auth_context_destroy( slurm_auth_context_t c ) -{ - int rc = SLURM_SUCCESS; - - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->auth_type ); - xfree( c ); - - return rc; -} - extern int slurm_auth_init( char *auth_type ) { int retval = SLURM_SUCCESS; - char *auth_type_local = NULL; + char *type = NULL; + char *plugin_type = "auth"; - slurm_mutex_lock( &context_lock ); + if (g_context) + return retval; - if ( g_context ) + slurm_mutex_lock(&context_lock); + + if (g_context) goto done; - if (auth_type == NULL) { - auth_type_local = slurm_get_auth_type(); - auth_type = auth_type_local; - } - if (strcmp(auth_type, "auth/dummy") == 0) { - info( "warning: %s plugin selected", auth_type); + if (auth_type) + slurm_set_auth_type(auth_type); + + type = slurm_get_auth_type(); + + if (strcmp(type, "auth/dummy") == 0) { + info( "warning: %s plugin selected", type); auth_dummy = true; goto done; } - g_context = slurm_auth_context_create( auth_type ); - if ( g_context == NULL ) { - error( "cannot create a context for %s", auth_type ); - retval = SLURM_ERROR; - goto done; - } + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( slurm_auth_get_ops( g_context ) == NULL ) { - error( "cannot resolve %s plugin operations", - auth_type ); - _slurm_auth_context_destroy( g_context ); - g_context = NULL; - retval = SLURM_ERROR; - } + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); + retval = SLURM_ERROR; + goto done; + } done: - xfree(auth_type_local); - slurm_mutex_unlock( &context_lock ); + xfree(type); + slurm_mutex_unlock(&context_lock); return retval; } @@ -357,10 +215,10 @@ slurm_auth_fini( void ) { int rc; - if ( !g_context ) + if (!g_context) return SLURM_SUCCESS; - rc = _slurm_auth_context_destroy( g_context ); + rc = plugin_context_destroy(g_context); g_context = NULL; return rc; } @@ -388,7 +246,7 @@ g_slurm_auth_create( void *hosts, int timeout, char *auth_info ) return NULL; } - ret = (*(g_context->ops.create))( argv, auth_info ); + ret = (*(ops.create))( argv, auth_info ); xfree( argv ); return ret; } @@ -402,7 +260,7 @@ g_slurm_auth_destroy( void *cred ) if ( auth_dummy ) /* don't worry about leak in testing */ return SLURM_SUCCESS; - return (*(g_context->ops.destroy))( cred ); + return (*(ops.destroy))( cred ); } int @@ -421,7 +279,7 @@ g_slurm_auth_verify( void *cred, void *hosts, int timeout, char *auth_info ) return SLURM_ERROR; } - ret = (*(g_context->ops.verify))( cred, auth_info ); + ret = (*(ops.verify))( cred, auth_info ); xfree( argv ); return ret; } @@ -432,7 +290,7 @@ g_slurm_auth_get_uid( void *cred, char *auth_info ) if (( slurm_auth_init(NULL) < 0 ) || auth_dummy ) return SLURM_AUTH_NOBODY; - return (*(g_context->ops.get_uid))( cred, auth_info ); + return (*(ops.get_uid))( cred, auth_info ); } gid_t @@ -441,7 +299,7 @@ g_slurm_auth_get_gid( void *cred, char *auth_info ) if (( slurm_auth_init(NULL) < 0 ) || auth_dummy ) return SLURM_AUTH_NOBODY; - return (*(g_context->ops.get_gid))( cred, auth_info ); + return (*(ops.get_gid))( cred, auth_info ); } int @@ -453,7 +311,7 @@ g_slurm_auth_pack( void *cred, Buf buf ) if ( auth_dummy ) return SLURM_SUCCESS; - return (*(g_context->ops.pack))( cred, buf ); + return (*(ops.pack))( cred, buf ); } void * @@ -462,7 +320,7 @@ g_slurm_auth_unpack( Buf buf ) if (( slurm_auth_init(NULL) < 0 ) || auth_dummy ) return NULL; - return (*(g_context->ops.unpack))( buf ); + return (*(ops.unpack))( buf ); } int @@ -474,7 +332,7 @@ g_slurm_auth_print( void *cred, FILE *fp ) if ( auth_dummy ) return SLURM_SUCCESS; - return (*(g_context->ops.print))( cred, fp ); + return (*(ops.print))( cred, fp ); } int @@ -483,7 +341,7 @@ g_slurm_auth_errno( void *cred ) if (( slurm_auth_init(NULL) < 0 ) || auth_dummy ) return SLURM_ERROR; - return (*(g_context->ops.sa_errno))( cred ); + return (*(ops.sa_errno))( cred ); } const char * @@ -498,5 +356,5 @@ g_slurm_auth_errstr( int slurm_errno ) if (( generic = (char *) slurm_auth_generic_errstr( slurm_errno ) )) return generic; - return (*(g_context->ops.sa_errstr))( slurm_errno ); + return (*(ops.sa_errstr))( slurm_errno ); } -- GitLab From 88428f473f7f77a223fa585e5968604726e53672 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:28:30 -0700 Subject: [PATCH 258/614] convert to generic context for cred plugins --- src/common/slurm_cred.c | 279 +++++++++++----------------------------- 1 file changed, 73 insertions(+), 206 deletions(-) diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index d5d4743e92..2ac825c31c 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -210,20 +210,21 @@ typedef struct slurm_crypto_ops { } slurm_crypto_ops_t; /* - * A global cryptographic context. "Global" in the sense that there's - * only one, with static bindings. We don't export it. + * These strings must be in the same order as the fields declared + * for slurm_crypto_ops_t. */ +static const char *syms[] = { + "crypto_read_private_key", + "crypto_read_public_key", + "crypto_destroy_key", + "crypto_sign", + "crypto_verify_sign", + "crypto_str_error" +}; -typedef struct slurm_crypto_context { - char *crypto_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int crypto_errno; - slurm_crypto_ops_t ops; -} slurm_crypto_context_t; - -static slurm_crypto_context_t *g_crypto_context = NULL; -static pthread_mutex_t g_crypto_context_lock = PTHREAD_MUTEX_INITIALIZER; +static slurm_crypto_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* @@ -275,166 +276,32 @@ static void _cred_state_pack_one(cred_state_t *s, Buf buffer); static char * timestr (const time_t *tp, char *buf, size_t n); #endif - -static slurm_crypto_context_t * -_slurm_crypto_context_create( const char *crypto_type) -{ - slurm_crypto_context_t *c; - - if ( crypto_type == NULL ) { - error( "_slurm_crypto_context_create: no crypto type" ); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_crypto_context ) ); - - c->crypto_errno = SLURM_SUCCESS; - - /* Copy the job completion job completion type. */ - c->crypto_type = xstrdup( crypto_type ); - if ( c->crypto_type == NULL ) { - error( "can't make local copy of crypto type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->crypto_errno = SLURM_SUCCESS; - - return c; -} - -static int -_slurm_crypto_context_destroy( slurm_crypto_context_t *c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->crypto_type ); - xfree( c ); - - return rc; -} - -/* - * Resolve the operations from the plugin. - */ -static slurm_crypto_ops_t * -_slurm_crypto_get_ops( slurm_crypto_context_t *c ) -{ - /* - * These strings must be in the same order as the fields declared - * for slurm_crypto_ops_t. - */ - static const char *syms[] = { - "crypto_read_private_key", - "crypto_read_public_key", - "crypto_destroy_key", - "crypto_sign", - "crypto_verify_sign", - "crypto_str_error" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - int rc = 0; - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->crypto_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->crypto_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->crypto_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "Unable to create a plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "crypto" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = - plugrack_use_by_type( c->plugin_list, c->crypto_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "can't find a plugin for type %s", c->crypto_type ); - return NULL; - } - - /* Dereference the API. */ - if ( (rc = plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops )) < n_syms ) { - error( "incomplete crypto plugin detected only " - "got %d out of %d", - rc, n_syms); - return NULL; - } - - return &c->ops; -} - static int _slurm_crypto_init(void) { - char *crypto_type = NULL; + char *plugin_type = "crypto"; + char *type = NULL; int retval = SLURM_SUCCESS; - if ( g_crypto_context ) /* mostly avoid locks for better speed */ - return SLURM_SUCCESS; + if ( g_context ) /* mostly avoid locks for better speed */ + return retval; - slurm_mutex_lock( &g_crypto_context_lock ); - if ( g_crypto_context ) + slurm_mutex_lock( &g_context_lock ); + if ( g_context ) goto done; - crypto_type = slurm_get_crypto_type(); - g_crypto_context = _slurm_crypto_context_create( crypto_type ); - if ( g_crypto_context == NULL ) { - error( "cannot create a context for %s", crypto_type ); - retval = SLURM_ERROR; - goto done; - } + type = slurm_get_crypto_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _slurm_crypto_get_ops( g_crypto_context ) == NULL ) { - error( "cannot resolve crypto plugin operations" ); - _slurm_crypto_context_destroy( g_crypto_context ); - g_crypto_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock( &g_crypto_context_lock ); - xfree(crypto_type); + slurm_mutex_unlock( &g_context_lock ); + xfree(type); return(retval); } @@ -443,11 +310,11 @@ static int _slurm_crypto_fini(void) { int rc; - if (!g_crypto_context) + if (!g_context) return SLURM_SUCCESS; - rc = _slurm_crypto_context_destroy(g_crypto_context); - g_crypto_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; return rc; } @@ -473,7 +340,7 @@ slurm_cred_creator_ctx_create(const char *path) ctx->type = SLURM_CRED_CREATOR; - ctx->key = (*(g_crypto_context->ops.crypto_read_private_key))(path); + ctx->key = (*(ops.crypto_read_private_key))(path); if (!ctx->key) goto fail; @@ -501,7 +368,7 @@ slurm_cred_verifier_ctx_create(const char *path) ctx->type = SLURM_CRED_VERIFIER; - ctx->key = (*(g_crypto_context->ops.crypto_read_public_key))(path); + ctx->key = (*(ops.crypto_read_public_key))(path); if (!ctx->key) goto fail; @@ -530,9 +397,9 @@ slurm_cred_ctx_destroy(slurm_cred_ctx_t ctx) xassert(ctx->magic == CRED_CTX_MAGIC); if (ctx->exkey) - (*(g_crypto_context->ops.crypto_destroy_key))(ctx->exkey); + (*(ops.crypto_destroy_key))(ctx->exkey); if (ctx->key) - (*(g_crypto_context->ops.crypto_destroy_key))(ctx->key); + (*(ops.crypto_destroy_key))(ctx->key); if (ctx->job_list) list_destroy(ctx->job_list); if (ctx->state_list) @@ -1131,11 +998,11 @@ slurm_cred_begin_expiration(slurm_cred_ctx_t ctx, uint32_t jobid) j->expiration = time(NULL) + ctx->expiry_window; #if EXTREME_DEBUG -{ - char buf[64]; - debug2("set revoke expiration for jobid %u to %s", - j->jobid, timestr (&j->expiration, buf, 64) ); -} + { + char buf[64]; + debug2("set revoke expiration for jobid %u to %s", + j->jobid, timestr (&j->expiration, buf, 64) ); + } #endif slurm_mutex_unlock(&ctx->mutex); return SLURM_SUCCESS; @@ -1188,8 +1055,8 @@ static char *_core_format(bitstr_t *core_bitmap) * NOTE: caller must xfree the returned strings. */ void format_core_allocs(slurm_cred_t *cred, char *node_name, - char **job_alloc_cores, char **step_alloc_cores, - uint32_t *job_mem_limit, uint32_t *step_mem_limit) + char **job_alloc_cores, char **step_alloc_cores, + uint32_t *job_mem_limit, uint32_t *step_mem_limit) { #ifdef HAVE_BG xassert(cred); @@ -1274,12 +1141,12 @@ void format_core_allocs(slurm_cred_t *cred, char *node_name, if (cred->job_mem_limit & MEM_PER_CPU) { *job_mem_limit = (cred->job_mem_limit & (~MEM_PER_CPU)) * - job_core_cnt; + job_core_cnt; } else *job_mem_limit = cred->job_mem_limit; if (cred->step_mem_limit & MEM_PER_CPU) { *step_mem_limit = (cred->step_mem_limit & (~MEM_PER_CPU)) * - step_core_cnt; + step_core_cnt; } else if (cred->step_mem_limit) *step_mem_limit = cred->step_mem_limit; else @@ -1539,7 +1406,7 @@ _ctx_update_private_key(slurm_cred_ctx_t ctx, const char *path) xassert(ctx != NULL); - pk = (*(g_crypto_context->ops.crypto_read_private_key))(path); + pk = (*(ops.crypto_read_private_key))(path); if (!pk) return SLURM_ERROR; @@ -1553,7 +1420,7 @@ _ctx_update_private_key(slurm_cred_ctx_t ctx, const char *path) slurm_mutex_unlock(&ctx->mutex); - (*(g_crypto_context->ops.crypto_destroy_key))(tmpk); + (*(ops.crypto_destroy_key))(tmpk); return SLURM_SUCCESS; } @@ -1565,7 +1432,7 @@ _ctx_update_public_key(slurm_cred_ctx_t ctx, const char *path) void *pk = NULL; xassert(ctx != NULL); - pk = (*(g_crypto_context->ops.crypto_read_public_key))(path); + pk = (*(ops.crypto_read_public_key))(path); if (!pk) return SLURM_ERROR; @@ -1575,7 +1442,7 @@ _ctx_update_public_key(slurm_cred_ctx_t ctx, const char *path) xassert(ctx->type == SLURM_CRED_VERIFIER); if (ctx->exkey) - (*(g_crypto_context->ops.crypto_destroy_key))(ctx->exkey); + (*(ops.crypto_destroy_key))(ctx->exkey); ctx->exkey = ctx->key; ctx->key = pk; @@ -1599,7 +1466,7 @@ _exkey_is_valid(slurm_cred_ctx_t ctx) if (time(NULL) > ctx->exkey_exp) { debug2("old job credential key slurmd expired"); - (*(g_crypto_context->ops.crypto_destroy_key))(ctx->exkey); + (*(ops.crypto_destroy_key))(ctx->exkey); ctx->exkey = NULL; return false; } @@ -1662,16 +1529,16 @@ _slurm_cred_sign(slurm_cred_ctx_t ctx, slurm_cred_t *cred) buffer = init_buf(4096); _pack_cred(cred, buffer); - rc = (*(g_crypto_context->ops.crypto_sign))(ctx->key, - get_buf_data(buffer), - get_buf_offset(buffer), - &cred->signature, - &cred->siglen); + rc = (*(ops.crypto_sign))(ctx->key, + get_buf_data(buffer), + get_buf_offset(buffer), + &cred->signature, + &cred->siglen); free_buf(buffer); if (rc) { error("Credential sign: %s", - (*(g_crypto_context->ops.crypto_str_error))(rc)); + (*(ops.crypto_str_error))(rc)); return SLURM_ERROR; } return SLURM_SUCCESS; @@ -1687,23 +1554,23 @@ _slurm_cred_verify_signature(slurm_cred_ctx_t ctx, slurm_cred_t *cred) buffer = init_buf(4096); _pack_cred(cred, buffer); - rc = (*(g_crypto_context->ops.crypto_verify_sign))(ctx->key, - get_buf_data(buffer), - get_buf_offset(buffer), - cred->signature, - cred->siglen); + rc = (*(ops.crypto_verify_sign))(ctx->key, + get_buf_data(buffer), + get_buf_offset(buffer), + cred->signature, + cred->siglen); if (rc && _exkey_is_valid(ctx)) { - rc = (*(g_crypto_context->ops.crypto_verify_sign))(ctx->exkey, - get_buf_data(buffer), - get_buf_offset(buffer), - cred->signature, - cred->siglen); + rc = (*(ops.crypto_verify_sign))(ctx->exkey, + get_buf_data(buffer), + get_buf_offset(buffer), + cred->signature, + cred->siglen); } free_buf(buffer); if (rc) { error("Credential signature check: %s", - (*(g_crypto_context->ops.crypto_str_error))(rc)); + (*(ops.crypto_str_error))(rc)); return SLURM_ERROR; } return SLURM_SUCCESS; @@ -2208,14 +2075,14 @@ sbcast_cred_t *create_sbcast_cred(slurm_cred_ctx_t ctx, buffer = init_buf(4096); _pack_sbcast_cred(sbcast_cred, buffer); - rc = (*(g_crypto_context->ops.crypto_sign))(ctx->key, - get_buf_data(buffer), get_buf_offset(buffer), - &sbcast_cred->signature, &sbcast_cred->siglen); + rc = (*(ops.crypto_sign))( + ctx->key, get_buf_data(buffer), get_buf_offset(buffer), + &sbcast_cred->signature, &sbcast_cred->siglen); free_buf(buffer); if (rc) { error("sbcast_cred sign: %s", - (*(g_crypto_context->ops.crypto_str_error))(rc)); + (*(ops.crypto_str_error))(rc)); delete_sbcast_cred(sbcast_cred); return NULL; } @@ -2283,14 +2150,14 @@ int extract_sbcast_cred(slurm_cred_ctx_t ctx, _pack_sbcast_cred(sbcast_cred, buffer); /* NOTE: the verification checks that the credential was * created by SlurmUser or root */ - rc = (*(g_crypto_context->ops.crypto_verify_sign))(ctx->key, - get_buf_data(buffer), get_buf_offset(buffer), - sbcast_cred->signature, sbcast_cred->siglen); + rc = (*(ops.crypto_verify_sign))( + ctx->key, get_buf_data(buffer), get_buf_offset(buffer), + sbcast_cred->signature, sbcast_cred->siglen); free_buf(buffer); if (rc) { error("sbcast_cred verify: %s", - (*(g_crypto_context->ops.crypto_str_error))(rc)); + (*(ops.crypto_str_error))(rc)); return -1; } -- GitLab From 87217b1489164f6098c125a0dcde3d71bdab6040 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:29:12 -0700 Subject: [PATCH 259/614] convert to generic context for jobacct_gather plugins --- src/common/slurm_jobacct_gather.c | 365 ++++++++---------------------- 1 file changed, 97 insertions(+), 268 deletions(-) diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 66a1cef9ac..294eae6b9f 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -93,196 +93,60 @@ typedef struct slurm_jobacct_gather_ops { } slurm_jobacct_gather_ops_t; /* - * A global job accounting context. "Global" in the sense that there's - * only one, with static bindings. We don't export it. + * These strings must be in the same order as the fields declared + * for slurm_jobacct_gather_ops_t. */ - -typedef struct slurm_jobacct_gather_context { - char *jobacct_gather_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int jobacct_gather_errno; - slurm_jobacct_gather_ops_t ops; -} slurm_jobacct_gather_context_t; - -static slurm_jobacct_gather_context_t *g_jobacct_gather_context = NULL; -static pthread_mutex_t g_jobacct_gather_context_lock = PTHREAD_MUTEX_INITIALIZER; - -static int _slurm_jobacct_gather_init(void); - -static slurm_jobacct_gather_context_t * -_slurm_jobacct_gather_context_create( const char *jobacct_gather_type) -{ - slurm_jobacct_gather_context_t *c; - - if ( jobacct_gather_type == NULL ) { - error("_slurm_jobacct_gather_context_create: no jobacct type"); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_jobacct_gather_context ) ); - - c->jobacct_gather_errno = SLURM_SUCCESS; - - /* Copy the job completion job completion type. */ - c->jobacct_gather_type = xstrdup( jobacct_gather_type ); - if ( c->jobacct_gather_type == NULL ) { - error( "can't make local copy of jobacct type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->jobacct_gather_errno = SLURM_SUCCESS; - - return c; -} - -static int -_slurm_jobacct_gather_context_destroy( slurm_jobacct_gather_context_t *c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->jobacct_gather_type ); - xfree( c ); - - return rc; -} - -/* - * Resolve the operations from the plugin. - */ -static slurm_jobacct_gather_ops_t * -_slurm_jobacct_gather_get_ops( slurm_jobacct_gather_context_t *c ) -{ - /* - * These strings must be in the same order as the fields declared - * for slurm_jobacct_gather_ops_t. - */ - static const char *syms[] = { - "jobacct_gather_p_create", - "jobacct_gather_p_destroy", - "jobacct_gather_p_setinfo", - "jobacct_gather_p_getinfo", - "jobacct_gather_p_pack", - "jobacct_gather_p_unpack", - "jobacct_gather_p_aggregate", - "jobacct_gather_p_startpoll", - "jobacct_gather_p_endpoll", - "jobacct_gather_p_change_poll", - "jobacct_gather_p_suspend_poll", - "jobacct_gather_p_resume_poll", - "jobacct_gather_p_set_proctrack_container_id", - "jobacct_gather_p_add_task", - "jobacct_gather_p_stat_task", - "jobacct_gather_p_remove_task", - "jobacct_gather_p_2_stats" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - int rc = 0; - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->jobacct_gather_type, - n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->jobacct_gather_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->jobacct_gather_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "Unable to create a plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "jobacct_gather" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = - plugrack_use_by_type( c->plugin_list, c->jobacct_gather_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "can't find a plugin for type %s", - c->jobacct_gather_type ); - return NULL; - } - - /* Dereference the API. */ - if ( (rc = plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops )) < n_syms ) { - error( "incomplete jobacct_gather plugin detected only " - "got %d out of %d", - rc, n_syms); - return NULL; - } - - return &c->ops; - -} +static const char *syms[] = { + "jobacct_gather_p_create", + "jobacct_gather_p_destroy", + "jobacct_gather_p_setinfo", + "jobacct_gather_p_getinfo", + "jobacct_gather_p_pack", + "jobacct_gather_p_unpack", + "jobacct_gather_p_aggregate", + "jobacct_gather_p_startpoll", + "jobacct_gather_p_endpoll", + "jobacct_gather_p_change_poll", + "jobacct_gather_p_suspend_poll", + "jobacct_gather_p_resume_poll", + "jobacct_gather_p_set_proctrack_container_id", + "jobacct_gather_p_add_task", + "jobacct_gather_p_stat_task", + "jobacct_gather_p_remove_task", + "jobacct_gather_p_2_stats" +}; + +static slurm_jobacct_gather_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; static int _slurm_jobacct_gather_init(void) { - char *jobacct_gather_type = NULL; + char *plugin_type = "jobacct_gather"; + char *type = NULL; int retval=SLURM_SUCCESS; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - goto done; + if (g_context) + return retval; - jobacct_gather_type = slurm_get_jobacct_gather_type(); - g_jobacct_gather_context = _slurm_jobacct_gather_context_create( - jobacct_gather_type); - if ( g_jobacct_gather_context == NULL ) { - error( "cannot create a context for %s", jobacct_gather_type ); - retval = SLURM_ERROR; + slurm_mutex_lock(&g_context_lock); + if (g_context) goto done; - } - if ( _slurm_jobacct_gather_get_ops( g_jobacct_gather_context ) - == NULL ) { - error( "cannot resolve job accounting plugin operations" ); - _slurm_jobacct_gather_context_destroy( - g_jobacct_gather_context); - g_jobacct_gather_context = NULL; + type = slurm_get_jobacct_gather_type(); + + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); + + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); - xfree(jobacct_gather_type); + slurm_mutex_unlock( &g_context_lock ); + xfree(type); return(retval); } @@ -299,13 +163,12 @@ extern int slurm_jobacct_gather_fini(void) { int rc = SLURM_SUCCESS; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if (g_jobacct_gather_context) { - rc = _slurm_jobacct_gather_context_destroy( - g_jobacct_gather_context); - g_jobacct_gather_context = NULL; + slurm_mutex_lock(&g_context_lock); + if (g_context) { + rc = plugin_context_destroy(g_context); + g_context = NULL; } - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_unlock(&g_context_lock); return rc; } @@ -316,12 +179,9 @@ extern jobacctinfo_t *jobacct_gather_g_create(jobacct_id_t *jobacct_id) if (_slurm_jobacct_gather_init() < 0) return jobacct; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - jobacct = (*(g_jobacct_gather_context-> - ops.jobacct_gather_create))(jobacct_id); - - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + jobacct = (*(ops.jobacct_gather_create))(jobacct_id); + slurm_mutex_unlock(&g_context_lock); return jobacct; } @@ -330,11 +190,9 @@ extern void jobacct_gather_g_destroy(jobacctinfo_t *jobacct) if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_destroy)) - (jobacct); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_destroy))(jobacct); + slurm_mutex_unlock(&g_context_lock); return; } @@ -346,11 +204,9 @@ extern int jobacct_gather_g_setinfo(jobacctinfo_t *jobacct, if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context-> - ops.jobacct_gather_setinfo))(jobacct, type, data); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_setinfo))(jobacct, type, data); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -362,11 +218,9 @@ extern int jobacct_gather_g_getinfo(jobacctinfo_t *jobacct, if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context-> - ops.jobacct_gather_getinfo))(jobacct, type, data); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_getinfo))(jobacct, type, data); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -376,11 +230,9 @@ extern void jobacct_gather_g_pack(jobacctinfo_t *jobacct, if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_pack)) - (jobacct, rpc_version, buffer); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_pack))(jobacct, rpc_version, buffer); + slurm_mutex_unlock(&g_context_lock); return; } @@ -392,12 +244,9 @@ extern int jobacct_gather_g_unpack(jobacctinfo_t **jobacct, if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context-> - ops.jobacct_gather_unpack)) - (jobacct, rpc_version, buffer); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_unpack))(jobacct, rpc_version, buffer); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -407,11 +256,9 @@ extern void jobacct_gather_g_aggregate(jobacctinfo_t *dest, if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_aggregate)) - (dest, from); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_aggregate))(dest, from); + slurm_mutex_unlock(&g_context_lock); return; } @@ -421,12 +268,9 @@ extern int jobacct_gather_g_startpoll(uint16_t frequency) if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context->ops.jobacct_gather_startpoll)) - (frequency); - - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_startpoll))(frequency); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -436,10 +280,9 @@ extern int jobacct_gather_g_endpoll() if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context->ops.jobacct_gather_endpoll))(); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_endpoll))(); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -448,12 +291,10 @@ extern void jobacct_gather_g_change_poll(uint16_t frequency) if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_change_poll)) - (frequency); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_change_poll))(frequency); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_unlock(&g_context_lock); } extern void jobacct_gather_g_suspend_poll() @@ -461,10 +302,9 @@ extern void jobacct_gather_g_suspend_poll() if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_suspend_poll))(); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_suspend_poll))(); + slurm_mutex_unlock(&g_context_lock); return; } @@ -473,10 +313,9 @@ extern void jobacct_gather_g_resume_poll() if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_resume_poll))(); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_resume_poll))(); + slurm_mutex_unlock(&g_context_lock); return; } @@ -486,11 +325,9 @@ extern int jobacct_gather_g_set_proctrack_container_id(uint64_t id) if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context->ops. - jobacct_gather_set_proctrack_container_id))(id); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_set_proctrack_container_id))(id); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -501,11 +338,9 @@ extern int jobacct_gather_g_add_task(pid_t pid, jobacct_id_t *jobacct_id) if (_slurm_jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - retval = (*(g_jobacct_gather_context-> - ops.jobacct_gather_add_task))(pid, jobacct_id); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + retval = (*(ops.jobacct_gather_add_task))(pid, jobacct_id); + slurm_mutex_unlock(&g_context_lock); return retval; } @@ -515,11 +350,9 @@ extern jobacctinfo_t *jobacct_gather_g_stat_task(pid_t pid) if (_slurm_jobacct_gather_init() < 0) return jobacct; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - jobacct = (*(g_jobacct_gather_context-> - ops.jobacct_gather_stat_task))(pid); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + jobacct = (*(ops.jobacct_gather_stat_task))(pid); + slurm_mutex_unlock(&g_context_lock); return jobacct; } @@ -529,11 +362,9 @@ extern jobacctinfo_t *jobacct_gather_g_remove_task(pid_t pid) if (_slurm_jobacct_gather_init() < 0) return jobacct; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - jobacct = (*(g_jobacct_gather_context-> - ops.jobacct_gather_remove_task))(pid); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + jobacct = (*(ops.jobacct_gather_remove_task))(pid); + slurm_mutex_unlock(&g_context_lock); return jobacct; } @@ -543,10 +374,8 @@ extern void jobacct_gather_g_2_stats(slurmdb_stats_t *stats, if (_slurm_jobacct_gather_init() < 0) return; - slurm_mutex_lock( &g_jobacct_gather_context_lock ); - if ( g_jobacct_gather_context ) - (*(g_jobacct_gather_context->ops.jobacct_gather_2_stats)) - (stats, jobacct); - slurm_mutex_unlock( &g_jobacct_gather_context_lock ); + slurm_mutex_lock(&g_context_lock); + (*(ops.jobacct_gather_2_stats))(stats, jobacct); + slurm_mutex_unlock(&g_context_lock); return; } -- GitLab From 6bc271dcb621c2aa1776356e95d1d79f09d9f6fb Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:30:39 -0700 Subject: [PATCH 260/614] convert to generic context for priority plugins --- src/common/slurm_priority.c | 191 +++++++----------------------------- 1 file changed, 33 insertions(+), 158 deletions(-) diff --git a/src/common/slurm_priority.c b/src/common/slurm_priority.c index ecb56b3b1a..312c237698 100644 --- a/src/common/slurm_priority.c +++ b/src/common/slurm_priority.c @@ -52,143 +52,20 @@ typedef struct slurm_priority_ops { (priority_factors_request_msg_t *req_msg, uid_t uid); } slurm_priority_ops_t; -typedef struct slurm_priority_context { - char *priority_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int priority_errno; - slurm_priority_ops_t ops; -} slurm_priority_context_t; - -static slurm_priority_context_t * g_priority_context = NULL; -static pthread_mutex_t g_priority_context_lock = - PTHREAD_MUTEX_INITIALIZER; - -/* - * Local functions - */ -static slurm_priority_ops_t *_priority_get_ops( - slurm_priority_context_t *c); -static slurm_priority_context_t *_priority_context_create( - const char *priority_type); -static int _priority_context_destroy( - slurm_priority_context_t *c); - -/* - * Locate and load the appropriate plugin - */ -static slurm_priority_ops_t * _priority_get_ops( - slurm_priority_context_t *c) -{ - /* - * Must be synchronized with slurm_priority_ops_t above. - */ - static const char *syms[] = { - "priority_p_set", - "priority_p_reconfig", - "priority_p_set_assoc_usage", - "priority_p_calc_fs_factor", - "priority_p_get_priority_factors_list", - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->priority_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->priority_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->priority_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type( c->plugin_list, "priority" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, - c->priority_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find accounting_storage plugin for %s", - c->priority_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete priority plugin detected" ); - return NULL; - } - - return &c->ops; -} - -/* - * Create a priority context - */ -static slurm_priority_context_t *_priority_context_create( - const char *priority_type) -{ - slurm_priority_context_t *c; - - if ( priority_type == NULL ) { - debug3( "_priority_context_create: no uler type" ); - return NULL; - } - - c = xmalloc( sizeof( slurm_priority_context_t ) ); - c->priority_type = xstrdup( priority_type ); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->priority_errno = SLURM_SUCCESS; - - return c; -} - /* - * Destroy a priority context + * Must be synchronized with slurm_priority_ops_t above. */ -static int _priority_context_destroy(slurm_priority_context_t *c) -{ - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - return SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->priority_type ); - xfree( c ); - - return SLURM_SUCCESS; -} +static const char *syms[] = { + "priority_p_set", + "priority_p_reconfig", + "priority_p_set_assoc_usage", + "priority_p_calc_fs_factor", + "priority_p_get_priority_factors_list", +}; + +static slurm_priority_ops_t ops; +static plugin_context_t *g_priority_context = NULL; +static pthread_mutex_t g_priority_context_lock = PTHREAD_MUTEX_INITIALIZER; /* * Initialize context for priority plugin @@ -196,33 +73,31 @@ static int _priority_context_destroy(slurm_priority_context_t *c) extern int slurm_priority_init(void) { int retval = SLURM_SUCCESS; - char *priority_type = NULL; + char *plugin_type = "priority"; + char *type = NULL; - slurm_mutex_lock( &g_priority_context_lock ); + if (g_priority_context) + return retval; - if ( g_priority_context ) + slurm_mutex_lock(&g_priority_context_lock); + + if (g_priority_context) goto done; - priority_type = slurm_get_priority_type(); + type = slurm_get_priority_type(); - g_priority_context = _priority_context_create(priority_type); - if ( g_priority_context == NULL ) { - error( "cannot create priority context for %s", - priority_type ); - retval = SLURM_ERROR; - goto done; - } + g_priority_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _priority_get_ops( g_priority_context ) == NULL ) { - error( "cannot resolve priority plugin operations" ); - _priority_context_destroy( g_priority_context ); - g_priority_context = NULL; + if (!g_priority_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock( &g_priority_context_lock ); - xfree(priority_type); + slurm_mutex_unlock(&g_priority_context_lock); + xfree(type); return retval; } @@ -233,7 +108,7 @@ extern int slurm_priority_fini(void) if (!g_priority_context) return SLURM_SUCCESS; - rc = _priority_context_destroy( g_priority_context ); + rc = plugin_context_destroy(g_priority_context); g_priority_context = NULL; return rc; } @@ -243,7 +118,7 @@ extern uint32_t priority_g_set(uint32_t last_prio, struct job_record *job_ptr) if (slurm_priority_init() < 0) return 0; - return (*(g_priority_context->ops.set))(last_prio, job_ptr); + return (*(ops.set))(last_prio, job_ptr); } extern void priority_g_reconfig(void) @@ -251,7 +126,7 @@ extern void priority_g_reconfig(void) if (slurm_priority_init() < 0) return; - (*(g_priority_context->ops.reconfig))(); + (*(ops.reconfig))(); return; } @@ -261,7 +136,7 @@ extern void priority_g_set_assoc_usage(slurmdb_association_rec_t *assoc) if (slurm_priority_init() < 0) return; - (*(g_priority_context->ops.set_assoc_usage))(assoc); + (*(ops.set_assoc_usage))(assoc); return; } @@ -271,7 +146,7 @@ extern double priority_g_calc_fs_factor(long double usage_efctv, if (slurm_priority_init() < 0) return 0.0; - return (*(g_priority_context->ops.calc_fs_factor)) + return (*(ops.calc_fs_factor)) (usage_efctv, shares_norm); } @@ -281,5 +156,5 @@ extern List priority_g_get_priority_factors_list( if (slurm_priority_init() < 0) return NULL; - return (*(g_priority_context->ops.get_priority_factors))(req_msg, uid); + return (*(ops.get_priority_factors))(req_msg, uid); } -- GitLab From 8f5824aa69c5244951247472d0e1c4956d479237 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:31:30 -0700 Subject: [PATCH 261/614] convert to generic context for jobcomp plugins --- src/common/slurm_jobcomp.c | 195 +++++++------------------------------ 1 file changed, 34 insertions(+), 161 deletions(-) diff --git a/src/common/slurm_jobcomp.c b/src/common/slurm_jobcomp.c index 4abd0a4470..d8c13326ef 100644 --- a/src/common/slurm_jobcomp.c +++ b/src/common/slurm_jobcomp.c @@ -70,147 +70,22 @@ typedef struct slurm_jobcomp_ops { int (*archive) ( slurmdb_archive_cond_t *params ); } slurm_jobcomp_ops_t; - /* - * A global job completion context. "Global" in the sense that there's - * only one, with static bindings. We don't export it. + * These strings must be kept in the same order as the fields + * declared for slurm_jobcomp_ops_t. */ - -struct slurm_jobcomp_context { - char * jobcomp_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int jobcomp_errno; - slurm_jobcomp_ops_t ops; +static const char *syms[] = { + "slurm_jobcomp_set_location", + "slurm_jobcomp_log_record", + "slurm_jobcomp_get_errno", + "slurm_jobcomp_strerror", + "slurm_jobcomp_get_jobs", + "slurm_jobcomp_archive" }; -static slurm_jobcomp_context_t g_context = NULL; -static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - -static slurm_jobcomp_context_t -_slurm_jobcomp_context_create( const char *jobcomp_type) -{ - slurm_jobcomp_context_t c; - - if ( jobcomp_type == NULL ) { - debug3( "_slurm_jobcomp_context_create: no jobcomp type" ); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_jobcomp_context ) ); - - c->jobcomp_errno = SLURM_SUCCESS; - - /* Copy the job completion job completion type. */ - c->jobcomp_type = xstrdup( jobcomp_type ); - if ( c->jobcomp_type == NULL ) { - debug3( "can't make local copy of jobcomp type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - -static int -_slurm_jobcomp_context_destroy( slurm_jobcomp_context_t c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->jobcomp_type ); - xfree( c ); - - return rc; -} - -/* - * Resolve the operations from the plugin. - */ -static slurm_jobcomp_ops_t * -_slurm_jobcomp_get_ops( slurm_jobcomp_context_t c ) -{ - /* - * These strings must be kept in the same order as the fields - * declared for slurm_jobcomp_ops_t. - */ - static const char *syms[] = { - "slurm_jobcomp_set_location", - "slurm_jobcomp_log_record", - "slurm_jobcomp_get_errno", - "slurm_jobcomp_strerror", - "slurm_jobcomp_get_jobs", - "slurm_jobcomp_archive" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->jobcomp_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->jobcomp_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->jobcomp_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "Unable to create a plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "jobcomp" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = - plugrack_use_by_type( c->plugin_list, c->jobcomp_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "can't find a plugin for type %s", c->jobcomp_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete jobcomp plugin detected" ); - return NULL; - } - - return &c->ops; -} +static slurm_jobcomp_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; extern void jobcomp_destroy_job(void *object) @@ -241,33 +116,31 @@ extern int g_slurm_jobcomp_init( char *jobcomp_loc ) { int retval = SLURM_SUCCESS; - char *jobcomp_type; + char *plugin_type = "jobcomp"; + char *type; + + if (g_context) + return retval; slurm_mutex_lock( &context_lock ); - if ( g_context ) - _slurm_jobcomp_context_destroy(g_context); + if (g_context) + plugin_context_destroy(g_context); - jobcomp_type = slurm_get_jobcomp_type(); - g_context = _slurm_jobcomp_context_create( jobcomp_type ); - if ( g_context == NULL ) { - error( "cannot create a context for %s", jobcomp_type ); - xfree(jobcomp_type); - retval = SLURM_ERROR; - goto done; - } - xfree(jobcomp_type); + type = slurm_get_jobcomp_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _slurm_jobcomp_get_ops( g_context ) == NULL ) { - error( "cannot resolve job completion plugin operations" ); - _slurm_jobcomp_context_destroy( g_context ); - g_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - if ( g_context ) - retval = (*(g_context->ops.set_loc))(jobcomp_loc); + xfree(type); + if (g_context) + retval = (*(ops.set_loc))(jobcomp_loc); slurm_mutex_unlock( &context_lock ); return retval; } @@ -280,7 +153,7 @@ g_slurm_jobcomp_fini(void) if ( !g_context) goto done; - _slurm_jobcomp_context_destroy ( g_context ); + plugin_context_destroy ( g_context ); g_context = NULL; done: @@ -295,7 +168,7 @@ g_slurm_jobcomp_write(struct job_record *job_ptr) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.job_write))(job_ptr); + retval = (*(ops.job_write))(job_ptr); else { error ("slurm_jobcomp plugin context not initialized"); retval = ENOENT; @@ -311,7 +184,7 @@ g_slurm_jobcomp_errno(void) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.sa_errno))(); + retval = (*(ops.sa_errno))(); else { error ("slurm_jobcomp plugin context not initialized"); retval = ENOENT; @@ -327,7 +200,7 @@ g_slurm_jobcomp_strerror(int errnum) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.job_strerror))(errnum); + retval = (*(ops.job_strerror))(errnum); else error ("slurm_jobcomp plugin context not initialized"); slurm_mutex_unlock( &context_lock ); @@ -341,7 +214,7 @@ g_slurm_jobcomp_get_jobs(slurmdb_job_cond_t *job_cond) slurm_mutex_lock( &context_lock ); if ( g_context ) - job_list = (*(g_context->ops.get_jobs))(job_cond); + job_list = (*(ops.get_jobs))(job_cond); else error ("slurm_jobcomp plugin context not initialized"); slurm_mutex_unlock( &context_lock ); @@ -355,7 +228,7 @@ g_slurm_jobcomp_archive(slurmdb_archive_cond_t *arch_cond) slurm_mutex_lock( &context_lock ); if ( g_context ) - rc = (*(g_context->ops.archive))(arch_cond); + rc = (*(ops.archive))(arch_cond); else error ("slurm_jobcomp plugin context not initialized"); slurm_mutex_unlock( &context_lock ); -- GitLab From 015cf0ba5dc5663848ceb2e9b5724dd72016799c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:32:40 -0700 Subject: [PATCH 262/614] convert to generic context for topology plugins --- src/common/slurm_topology.c | 188 +++++++----------------------------- 1 file changed, 34 insertions(+), 154 deletions(-) diff --git a/src/common/slurm_topology.c b/src/common/slurm_topology.c index a6ea794f6e..e3090580b0 100644 --- a/src/common/slurm_topology.c +++ b/src/common/slurm_topology.c @@ -61,137 +61,18 @@ typedef struct slurm_topo_ops { char** pattern ); } slurm_topo_ops_t; - -/* ************************************************************************ */ -/* TAG( slurm_topo_contex_t ) */ -/* ************************************************************************ */ -typedef struct slurm_topo_context { - char *topo_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int topo_errno; - slurm_topo_ops_t ops; -} slurm_topo_context_t; - -static slurm_topo_context_t *g_topo_context = NULL; -static pthread_mutex_t g_topo_context_lock = PTHREAD_MUTEX_INITIALIZER; - - -/* ************************************************************************ */ -/* TAG( slurm_topo_get_ops ) */ -/* ************************************************************************ */ -static slurm_topo_ops_t * -slurm_topo_get_ops( slurm_topo_context_t *c ) -{ - /* - * Must be synchronized with slurm_topo_ops_t above. - */ - static const char *syms[] = { - "topo_build_config", - "topo_generate_node_ranking", - "topo_get_node_addr", - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->topo_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->topo_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->topo_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type( c->plugin_list, "topo" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, c->topo_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find topology plugin for %s", c->topo_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete topology plugin detected" ); - return NULL; - } - - return &c->ops; -} - - -/* ************************************************************************ */ -/* TAG( slurm_topo_context_create ) */ -/* ************************************************************************ */ -static slurm_topo_context_t * -slurm_topo_context_create( const char *topo_type ) -{ - slurm_topo_context_t *c; - - if ( topo_type == NULL ) { - debug3( "slurm_topo_context: no topology type" ); - return NULL; - } - - c = xmalloc( sizeof( slurm_topo_context_t ) ); - c->topo_type = xstrdup( topo_type ); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->topo_errno = SLURM_SUCCESS; - - return c; -} - - -/* ************************************************************************ */ -/* TAG( slurm_topo_context_destroy ) */ -/* ************************************************************************ */ -static int -slurm_topo_context_destroy( slurm_topo_context_t *c ) -{ - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - return SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->topo_type ); - xfree( c ); - - return SLURM_SUCCESS; -} - +/* + * Must be synchronized with slurm_topo_ops_t above. + */ +static const char *syms[] = { + "topo_build_config", + "topo_generate_node_ranking", + "topo_get_node_addr", +}; + +static slurm_topo_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* *********************************************************************** */ /* TAG( slurm_topo_init ) */ @@ -205,32 +86,31 @@ extern int slurm_topo_init( void ) { int retval = SLURM_SUCCESS; - char *topo_type = NULL; + char *plugin_type = "topo"; + char *type = NULL; - slurm_mutex_lock( &g_topo_context_lock ); + if (g_context) + return retval; - if ( g_topo_context ) - goto done; + slurm_mutex_lock(&g_context_lock); - topo_type = slurm_get_topology_plugin(); - g_topo_context = slurm_topo_context_create( topo_type ); - if ( g_topo_context == NULL ) { - error( "cannot create topology context for %s", - topo_type ); - retval = SLURM_ERROR; + if (g_context) goto done; - } - if ( slurm_topo_get_ops( g_topo_context ) == NULL ) { - error( "cannot resolve topology plugin operations" ); - slurm_topo_context_destroy( g_topo_context ); - g_topo_context = NULL; + type = slurm_get_topology_plugin(); + + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); + + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock( &g_topo_context_lock ); - xfree(topo_type); + slurm_mutex_unlock(&g_context_lock); + xfree(type); return retval; } @@ -242,11 +122,11 @@ slurm_topo_fini( void ) { int rc; - if (!g_topo_context) + if (!g_context) return SLURM_SUCCESS; - rc = slurm_topo_context_destroy(g_topo_context); - g_topo_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; return rc; } @@ -264,7 +144,7 @@ slurm_topo_build_config( void ) return SLURM_ERROR; START_TIMER; - rc = (*(g_topo_context->ops.build_config))(); + rc = (*(ops.build_config))(); END_TIMER3("slurm_topo_build_config", 20000); return rc; @@ -281,7 +161,7 @@ slurm_topo_generate_node_ranking( void ) if ( slurm_topo_init() < 0 ) return SLURM_ERROR; - return (*(g_topo_context->ops.node_ranking))(); + return (*(ops.node_ranking))(); } /* *********************************************************************** */ @@ -293,6 +173,6 @@ slurm_topo_get_node_addr( char* node_name, char ** addr, char** pattern ) if ( slurm_topo_init() < 0 ) return SLURM_ERROR; - return (*(g_topo_context->ops.get_node_addr))(node_name,addr,pattern); + return (*(ops.get_node_addr))(node_name,addr,pattern); } -- GitLab From 14d70feacdea7374da4dd1d42d6580957e227426 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:34:18 -0700 Subject: [PATCH 263/614] convert to generic context for checkpoint plugins --- src/common/checkpoint.c | 221 +++++++++------------------------------- 1 file changed, 47 insertions(+), 174 deletions(-) diff --git a/src/common/checkpoint.c b/src/common/checkpoint.c index ac7b3e2048..11ae26a6d8 100644 --- a/src/common/checkpoint.c +++ b/src/common/checkpoint.c @@ -78,182 +78,58 @@ typedef struct slurm_checkpoint_ops { uint16_t protocol_version); int (*ckpt_stepd_prefork) (void *slurmd_job); int (*ckpt_signal_tasks) (void *slurmd_job, char *image_dir); - int (*ckpt_restart_task) (void *slurmd_job, char *image_dir, int gtid); + int (*ckpt_restart_task) (void *slurmd_job, char *image_dir, + int gtid); } slurm_checkpoint_ops_t; /* - * A global job completion context. "Global" in the sense that there's - * only one, with static bindings. We don't export it. + * These strings must be kept in the same order as the fields + * declared for slurm_checkpoint_ops_t. */ - -struct slurm_checkpoint_context { - char * checkpoint_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int checkpoint_errno; - slurm_checkpoint_ops_t ops; +static const char *syms[] = { + "slurm_ckpt_op", + "slurm_ckpt_comp", + "slurm_ckpt_task_comp", + "slurm_ckpt_alloc_job", + "slurm_ckpt_free_job", + "slurm_ckpt_pack_job", + "slurm_ckpt_unpack_job", + "slurm_ckpt_stepd_prefork", + "slurm_ckpt_signal_tasks", + "slurm_ckpt_restart_task" }; -static slurm_checkpoint_context_t g_context = NULL; +static slurm_checkpoint_ops_t ops; +static plugin_context_t *g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; -static slurm_checkpoint_context_t -_slurm_checkpoint_context_create( const char *checkpoint_type ) -{ - slurm_checkpoint_context_t c; - - if ( checkpoint_type == NULL ) { - debug3( "_slurm_checkpoint_context_create: no checkpoint type"); - return NULL; - } - - c = xmalloc( sizeof( struct slurm_checkpoint_context ) ); - - c->checkpoint_errno = SLURM_SUCCESS; - - /* Copy the job completion job completion type. */ - c->checkpoint_type = xstrdup( checkpoint_type ); - if ( c->checkpoint_type == NULL ) { - debug3( "can't make local copy of checkpoint type" ); - xfree( c ); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - -static int -_slurm_checkpoint_context_destroy( slurm_checkpoint_context_t c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->checkpoint_type ); - xfree( c ); - - return rc; -} - -/* - * Resolve the operations from the plugin. - */ -static slurm_checkpoint_ops_t * -_slurm_checkpoint_get_ops( slurm_checkpoint_context_t c ) -{ - /* - * These strings must be kept in the same order as the fields - * declared for slurm_checkpoint_ops_t. - */ - static const char *syms[] = { - "slurm_ckpt_op", - "slurm_ckpt_comp", - "slurm_ckpt_task_comp", - "slurm_ckpt_alloc_job", - "slurm_ckpt_free_job", - "slurm_ckpt_pack_job", - "slurm_ckpt_unpack_job", - "slurm_ckpt_stepd_prefork", - "slurm_ckpt_signal_tasks", - "slurm_ckpt_restart_task" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->checkpoint_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->checkpoint_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->checkpoint_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "Unable to create a plugin manager" ); - return NULL; - } - - plugrack_set_major_type( c->plugin_list, "checkpoint" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - /* Find the correct plugin. */ - c->cur_plugin = - plugrack_use_by_type( c->plugin_list, c->checkpoint_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "can't find a plugin for type %s", c->checkpoint_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete checkpoint plugin detected" ); - return NULL; - } - - return &c->ops; -} - /* initialize checkpoint plugin */ extern int -checkpoint_init(char *checkpoint_type) +checkpoint_init(char *type) { int retval = SLURM_SUCCESS; + char *plugin_type = "checkpoint"; - slurm_mutex_lock( &context_lock ); + if (g_context) + return retval; - if ( g_context ) - _slurm_checkpoint_context_destroy(g_context); - g_context = _slurm_checkpoint_context_create( checkpoint_type ); - if ( g_context == NULL ) { - error( "cannot create a context for %s", checkpoint_type ); - xfree(checkpoint_type); - retval = SLURM_ERROR; - goto done; - } + slurm_mutex_lock(&context_lock); + + if (g_context) + plugin_context_destroy(g_context); - if ( _slurm_checkpoint_get_ops( g_context ) == NULL ) { - error( "cannot resolve checkpoint plugin operations" ); - _slurm_checkpoint_context_destroy( g_context ); - g_context = NULL; + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); + + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } - verbose("Checkpoint plugin loaded: %s", checkpoint_type); + verbose("Checkpoint plugin loaded: %s", type); done: - slurm_mutex_unlock( &context_lock ); + slurm_mutex_unlock(&context_lock); return retval; } @@ -263,12 +139,12 @@ checkpoint_fini(void) { int rc; - if ( !g_context ) + if (!g_context) return SLURM_SUCCESS; - slurm_mutex_lock( &context_lock ); - rc =_slurm_checkpoint_context_destroy(g_context); - slurm_mutex_unlock( &context_lock ); + slurm_mutex_lock(&context_lock); + rc = plugin_context_destroy(g_context); + slurm_mutex_unlock(&context_lock); return rc; } @@ -284,7 +160,7 @@ checkpoint_op(uint32_t job_id, uint32_t step_id, slurm_mutex_lock( &context_lock ); if ( g_context ) { - retval = (*(g_context->ops.ckpt_op))( + retval = (*(ops.ckpt_op))( job_id, step_id, (struct step_record *) step_ptr, op, data, image_dir, @@ -305,7 +181,7 @@ checkpoint_comp(void * step_ptr, time_t event_time, uint32_t error_code, slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_comp))( + retval = (*(ops.ckpt_comp))( (struct step_record *) step_ptr, event_time, error_code, error_msg); else { @@ -324,7 +200,7 @@ checkpoint_task_comp(void * step_ptr, uint32_t task_id, time_t event_time, slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_task_comp))( + retval = (*(ops.ckpt_task_comp))( (struct step_record *) step_ptr, task_id, event_time, error_code, error_msg); else { @@ -342,8 +218,7 @@ extern int checkpoint_alloc_jobinfo(check_jobinfo_t *jobinfo) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_alloc_jobinfo))( - jobinfo); + retval = (*(ops.ckpt_alloc_jobinfo))(jobinfo); else { error ("slurm_checkpoint plugin context not initialized"); retval = ENOENT; @@ -359,8 +234,7 @@ extern int checkpoint_free_jobinfo(check_jobinfo_t jobinfo) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_free_jobinfo))( - jobinfo); + retval = (*(ops.ckpt_free_jobinfo))(jobinfo); else { error ("slurm_checkpoint plugin context not initialized"); retval = ENOENT; @@ -377,7 +251,7 @@ extern int checkpoint_pack_jobinfo (check_jobinfo_t jobinfo, Buf buffer, slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_pack_jobinfo))( + retval = (*(ops.ckpt_pack_jobinfo))( jobinfo, buffer, protocol_version); else { error ("slurm_checkpoint plugin context not initialized"); @@ -394,7 +268,7 @@ extern int checkpoint_unpack_jobinfo (check_jobinfo_t jobinfo, Buf buffer, slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_unpack_jobinfo))( + retval = (*(ops.ckpt_unpack_jobinfo))( jobinfo, buffer, protocol_version); else { error ("slurm_checkpoint plugin context not initialized"); @@ -410,7 +284,7 @@ extern int checkpoint_stepd_prefork (void *job) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_stepd_prefork))(job); + retval = (*(ops.ckpt_stepd_prefork))(job); else { error ("slurm_checkpoint plugin context not initialized"); retval = ENOENT; @@ -425,7 +299,7 @@ extern int checkpoint_signal_tasks (void *job, char *image_dir) slurm_mutex_lock( &context_lock ); if ( g_context ) - retval = (*(g_context->ops.ckpt_signal_tasks))(job, image_dir); + retval = (*(ops.ckpt_signal_tasks))(job, image_dir); else { error ("slurm_checkpoint plugin context not initialized"); retval = ENOENT; @@ -441,8 +315,7 @@ extern int checkpoint_restart_task (void *job, char *image_dir, int gtid) slurm_mutex_lock( &context_lock ); if ( g_context ) { - retval = (*(g_context->ops.ckpt_restart_task))(job, image_dir, - gtid); + retval = (*(ops.ckpt_restart_task))(job, image_dir, gtid); } else { error ("slurm_checkpoint plugin context not initialized"); retval = ENOENT; -- GitLab From f4e5da77a437da86581642f0011d90240f7400b2 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:34:51 -0700 Subject: [PATCH 264/614] convert to generic context for mpi plugins --- src/common/mpi.c | 184 ++++++++--------------------------------------- 1 file changed, 31 insertions(+), 153 deletions(-) diff --git a/src/common/mpi.c b/src/common/mpi.c index 9ecdf1da83..076c7fd4a3 100644 --- a/src/common/mpi.c +++ b/src/common/mpi.c @@ -69,148 +69,33 @@ typedef struct slurm_mpi_ops { int (*client_fini) (mpi_plugin_client_state_t *); } slurm_mpi_ops_t; -struct slurm_mpi_context { - char * mpi_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int mpi_errno; - slurm_mpi_ops_t ops; -}; - -static slurm_mpi_context_t g_context = NULL; -static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - -static slurm_mpi_context_t -_slurm_mpi_context_create(const char *mpi_type) -{ - slurm_mpi_context_t c; - - if ( mpi_type == NULL ) { - debug3( "_slurm_mpi_context_create: no mpi type" ); - return NULL; - } - - c = xmalloc(sizeof(struct slurm_mpi_context)); - - c->mpi_errno = SLURM_SUCCESS; - - /* Copy the job completion authentication type. */ - c->mpi_type = xstrdup(mpi_type); - if (c->mpi_type == NULL ) { - debug3( "can't make local copy of mpi type" ); - xfree(c); - return NULL; - } - - /* Plugin rack is demand-loaded on first reference. */ - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - -static int -_slurm_mpi_context_destroy( slurm_mpi_context_t c ) -{ - int rc = SLURM_SUCCESS; - - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree(c->mpi_type); - xfree(c); - - return rc; -} - /* - * Resolve the operations from the plugin. + * These strings must be kept in the same order as the fields + * declared for slurm_mpi_ops_t. */ -static slurm_mpi_ops_t * -_slurm_mpi_get_ops( slurm_mpi_context_t c ) -{ - /* - * These strings must be kept in the same order as the fields - * declared for slurm_mpi_ops_t. - */ - static const char *syms[] = { - "p_mpi_hook_slurmstepd_prefork", - "p_mpi_hook_slurmstepd_task", - "p_mpi_hook_client_prelaunch", - "p_mpi_hook_client_single_task_per_node", - "p_mpi_hook_client_fini" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - char *plugin_dir = NULL; - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->mpi_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->mpi_type); - - /* Get the plugin list, if needed. */ - if ( c->plugin_list == NULL ) { - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error("Unable to create a plugin manager"); - return NULL; - } - - plugrack_set_major_type(c->plugin_list, "mpi"); - plugrack_set_paranoia(c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(c->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - if (strcasecmp (c->mpi_type, "mpi/list") == 0) { - plugrack_print_all_plugin(c->plugin_list); - exit(0); - } else { - /* Find the correct plugin. */ - c->cur_plugin = plugrack_use_by_type(c->plugin_list, - c->mpi_type); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error("can't find a valid plugin for type %s", - c->mpi_type); - return NULL; - } - } +static const char *syms[] = { + "p_mpi_hook_slurmstepd_prefork", + "p_mpi_hook_slurmstepd_task", + "p_mpi_hook_client_prelaunch", + "p_mpi_hook_client_single_task_per_node", + "p_mpi_hook_client_fini" +}; - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete mpi plugin detected" ); - return NULL; - } +static slurm_mpi_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - return &c->ops; -} int _mpi_init (char *mpi_type) { int retval = SLURM_SUCCESS; - char *full_type = NULL; + char *plugin_type = "mpi"; + char *type = NULL; int got_default = 0; + if ( g_context ) + return retval; + slurm_mutex_lock( &context_lock ); if ( g_context ) @@ -225,28 +110,21 @@ int _mpi_init (char *mpi_type) retval = SLURM_ERROR; goto done; } - setenvf (NULL, "SLURM_MPI_TYPE", "%s", mpi_type); + setenvf(NULL, "SLURM_MPI_TYPE", "%s", mpi_type); - full_type = xmalloc(sizeof(char) * (strlen(mpi_type)+5)); - sprintf(full_type,"mpi/%s",mpi_type); + type = xstrdup_printf("mpi/%s", mpi_type); - g_context = _slurm_mpi_context_create(full_type); - xfree(full_type); - if ( g_context == NULL ) { - error( "cannot create a context for %s", mpi_type); - retval = SLURM_ERROR; - goto done; - } + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if ( _slurm_mpi_get_ops( g_context ) == NULL ) { - error( "cannot resolve plugin operations for %s", mpi_type); - _slurm_mpi_context_destroy( g_context ); - g_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } - done: + xfree(type); if(got_default) xfree(mpi_type); slurm_mutex_unlock( &context_lock ); @@ -272,7 +150,7 @@ int mpi_hook_slurmstepd_prefork (const slurmd_job_t *job, char ***env) if (mpi_hook_slurmstepd_init(env) == SLURM_ERROR) return SLURM_ERROR; - return (*(g_context->ops.slurmstepd_prefork))(job, env); + return (*(ops.slurmstepd_prefork))(job, env); } int mpi_hook_slurmstepd_task (const mpi_plugin_task_info_t *job, char ***env) @@ -280,7 +158,7 @@ int mpi_hook_slurmstepd_task (const mpi_plugin_task_info_t *job, char ***env) if (mpi_hook_slurmstepd_init(env) == SLURM_ERROR) return SLURM_ERROR; - return (*(g_context->ops.slurmstepd_init))(job, env); + return (*(ops.slurmstepd_init))(job, env); } int mpi_hook_client_init (char *mpi_type) @@ -299,7 +177,7 @@ mpi_hook_client_prelaunch(const mpi_plugin_client_info_t *job, char ***env) if (_mpi_init(NULL) < 0) return NULL; - return (*(g_context->ops.client_prelaunch))(job, env); + return (*(ops.client_prelaunch))(job, env); } bool mpi_hook_client_single_task_per_node (void) @@ -313,7 +191,7 @@ bool mpi_hook_client_single_task_per_node (void) */ return true; #else - return (*(g_context->ops.client_single_task))(); + return (*(ops.client_single_task))(); #endif } @@ -322,7 +200,7 @@ int mpi_hook_client_fini (mpi_plugin_client_state_t *state) if (_mpi_init(NULL) < 0) return SLURM_ERROR; - return (*(g_context->ops.client_fini))(state); + return (*(ops.client_fini))(state); } int mpi_fini (void) @@ -332,7 +210,7 @@ int mpi_fini (void) if (!g_context) return SLURM_SUCCESS; - rc = _slurm_mpi_context_destroy(g_context); + rc = plugin_context_destroy(g_context); return rc; } -- GitLab From 16007ed114fd76c90d6be090b994f7e941ee1475 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:35:08 -0700 Subject: [PATCH 265/614] convert to generic context for preempt plugins --- src/slurmctld/preempt.c | 185 +++++++--------------------------------- 1 file changed, 32 insertions(+), 153 deletions(-) diff --git a/src/slurmctld/preempt.c b/src/slurmctld/preempt.c index 59cc11a051..b93009647a 100644 --- a/src/slurmctld/preempt.c +++ b/src/slurmctld/preempt.c @@ -59,135 +59,19 @@ typedef struct slurm_preempt_ops { job_queue_rec_t *preemptee); } slurm_preempt_ops_t; +/* + * Must be synchronized with slurm_preempt_ops_t above. + */ +static const char *syms[] = { + "find_preemptable_jobs", + "job_preempt_mode", + "preemption_enabled", + "job_preempt_check", +}; -/* ************************************************************************ */ -/* TAG( slurm_preempt_contex_t ) */ -/* ************************************************************************ */ -typedef struct slurm_preempt_context { - char *preempt_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int preempt_errno; - slurm_preempt_ops_t ops; -} slurm_preempt_context_t; - -static slurm_preempt_context_t *g_preempt_context = NULL; -static pthread_mutex_t g_preempt_context_lock = PTHREAD_MUTEX_INITIALIZER; - - -/* ************************************************************************ */ -/* TAG( _slurm_preempt_get_ops ) */ -/* ************************************************************************ */ -static slurm_preempt_ops_t * -_slurm_preempt_get_ops(slurm_preempt_context_t *c) -{ - /* - * Must be synchronized with slurm_preempt_ops_t above. - */ - static const char *syms[] = { - "find_preemptable_jobs", - "job_preempt_mode", - "preemption_enabled", - "job_preempt_check", - }; - int n_syms = sizeof(syms) / sizeof(char *); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->preempt_type, n_syms, syms, - (void **) &c->ops); - if (c->cur_plugin != PLUGIN_INVALID_HANDLE) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->preempt_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->preempt_type); - - /* Get plugin list. */ - if (c->plugin_list == NULL) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if (c->plugin_list == NULL) { - error("cannot create plugin manager"); - return NULL; - } - plugrack_set_major_type(c->plugin_list, "preempt"); - plugrack_set_paranoia(c->plugin_list, - PLUGRACK_PARANOIA_NONE, 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(c->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->preempt_type); - if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { - error("cannot find preempt plugin for %s", c->preempt_type); - return NULL; - } - - /* Dereference the API. */ - if (plugin_get_syms(c->cur_plugin, - n_syms, - syms, - (void **) &c->ops) < n_syms) { - error("incomplete preempt plugin detected"); - return NULL; - } - - return &c->ops; -} - - -/* ************************************************************************ */ -/* TAG( _slurm_preempt_context_create ) */ -/* ************************************************************************ */ -static slurm_preempt_context_t * -_slurm_preempt_context_create(const char *preempt_type) -{ - slurm_preempt_context_t *c; - - if (preempt_type == NULL) { - debug3("slurm_preempt_context: no preempt type"); - return NULL; - } - - c = xmalloc(sizeof(slurm_preempt_context_t)); - c->preempt_type = xstrdup(preempt_type); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->preempt_errno = SLURM_SUCCESS; - - return c; -} - - -/* ************************************************************************ */ -/* TAG( _slurm_preempt_context_destroy ) */ -/* ************************************************************************ */ -static int _slurm_preempt_context_destroy(slurm_preempt_context_t *c) -{ - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if (c->plugin_list) { - if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) { - return SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree(c->preempt_type); - xfree(c); - - return SLURM_SUCCESS; -} +static slurm_preempt_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* *********************************************************************** */ /* TAG( _preempt_signal ) */ @@ -252,38 +136,33 @@ extern int slurm_job_check_grace(struct job_record *job_ptr) extern int slurm_preempt_init(void) { int retval = SLURM_SUCCESS; - char *preempt_type = NULL; + char *plugin_type = "preempt"; + char *type = NULL; /* This function is called frequently, so it should be as fast as * possible. The test below will be TRUE almost all of the time and * is as fast as possible. */ - if (g_preempt_context) + if (g_context) return retval; - slurm_mutex_lock(&g_preempt_context_lock); + slurm_mutex_lock(&g_context_lock); - if (g_preempt_context) + if (g_context) goto done; - preempt_type = slurm_get_preempt_type(); - g_preempt_context = _slurm_preempt_context_create(preempt_type); - if (g_preempt_context == NULL) { - error("cannot create preempt context for %s", - preempt_type); - retval = SLURM_ERROR; - goto done; - } + type = slurm_get_preempt_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if (_slurm_preempt_get_ops(g_preempt_context) == NULL) { - error("cannot resolve preempt plugin operations"); - _slurm_preempt_context_destroy(g_preempt_context); - g_preempt_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock(&g_preempt_context_lock); - xfree(preempt_type); + slurm_mutex_unlock(&g_context_lock); + xfree(type); return retval; } @@ -294,11 +173,11 @@ extern int slurm_preempt_fini(void) { int rc; - if (!g_preempt_context) + if (!g_context) return SLURM_SUCCESS; - rc = _slurm_preempt_context_destroy(g_preempt_context); - g_preempt_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; return rc; } @@ -311,7 +190,7 @@ extern List slurm_find_preemptable_jobs(struct job_record *job_ptr) if (slurm_preempt_init() < 0) return NULL; - return (*(g_preempt_context->ops.find_jobs))(job_ptr); + return (*(ops.find_jobs))(job_ptr); } /* @@ -322,7 +201,7 @@ extern uint16_t slurm_job_preempt_mode(struct job_record *job_ptr) if (slurm_preempt_init() < 0) return (uint16_t) PREEMPT_MODE_OFF; - return (*(g_preempt_context->ops.job_preempt_mode))(job_ptr); + return (*(ops.job_preempt_mode))(job_ptr); } /* @@ -333,7 +212,7 @@ extern bool slurm_preemption_enabled(void) if (slurm_preempt_init() < 0) return false; - return (*(g_preempt_context->ops.preemption_enabled))(); + return (*(ops.preemption_enabled))(); } /* @@ -345,6 +224,6 @@ extern bool slurm_job_preempt_check(job_queue_rec_t *preemptor, if (slurm_preempt_init() < 0) return false; - return (*(g_preempt_context->ops.job_preempt_check)) + return (*(ops.job_preempt_check)) (preemptor, preemptee); } -- GitLab From c39fac488e5552a0ee430c97645d653b5c3fcbe8 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:35:37 -0700 Subject: [PATCH 266/614] convert to generic context for sched plugins --- src/slurmctld/sched_plugin.c | 227 ++++++++--------------------------- 1 file changed, 49 insertions(+), 178 deletions(-) diff --git a/src/slurmctld/sched_plugin.c b/src/slurmctld/sched_plugin.c index 55d8908a97..d4a970ef0a 100644 --- a/src/slurmctld/sched_plugin.c +++ b/src/slurmctld/sched_plugin.c @@ -69,147 +69,26 @@ typedef struct slurm_sched_ops { char * (*get_conf) ( void ); } slurm_sched_ops_t; - -/* ************************************************************************ */ -/* TAG( slurm_sched_contex_t ) */ -/* ************************************************************************ */ -typedef struct slurm_sched_context { - char *sched_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int sched_errno; - slurm_sched_ops_t ops; -} slurm_sched_context_t; - -static slurm_sched_context_t *g_sched_context = NULL; -static pthread_mutex_t g_sched_context_lock = PTHREAD_MUTEX_INITIALIZER; - - -/* ************************************************************************ */ -/* TAG( slurm_sched_get_ops ) */ -/* ************************************************************************ */ -static slurm_sched_ops_t * -slurm_sched_get_ops( slurm_sched_context_t *c ) -{ - /* - * Must be synchronized with slurm_sched_ops_t above. - */ - static const char *syms[] = { - "slurm_sched_plugin_schedule", - "slurm_sched_plugin_newalloc", - "slurm_sched_plugin_freealloc", - "slurm_sched_plugin_initial_priority", - "slurm_sched_plugin_job_is_pending", - "slurm_sched_plugin_reconfig", - "slurm_sched_plugin_partition_change", - "slurm_sched_get_errno", - "slurm_sched_strerror", - "slurm_sched_plugin_requeue", - "slurm_sched_get_conf" - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->sched_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->sched_type, plugin_strerror(errno)); - return NULL; - } - - error("sched: Couldn't find the specified plugin name for %s " - "looking at all files", - c->sched_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "sched: cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type( c->plugin_list, "sched" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, c->sched_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "sched: cannot find scheduler plugin for %s", - c->sched_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms ) { - error( "sched: incomplete scheduling plugin detected" ); - return NULL; - } - - return &c->ops; -} - - -/* ************************************************************************ */ -/* TAG( slurm_sched_context_create ) */ -/* ************************************************************************ */ -static slurm_sched_context_t * -slurm_sched_context_create( const char *sched_type ) -{ - slurm_sched_context_t *c; - - if ( sched_type == NULL ) { - debug3( "slurm_sched_context: no scheduler type" ); - return NULL; - } - - c = xmalloc( sizeof( slurm_sched_context_t ) ); - c->sched_type = xstrdup( sched_type ); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->sched_errno = SLURM_SUCCESS; - - return c; -} - - -/* ************************************************************************ */ -/* TAG( slurm_sched_context_destroy ) */ -/* ************************************************************************ */ -static int -slurm_sched_context_destroy( slurm_sched_context_t *c ) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->sched_type ); - xfree( c ); - - return rc; -} - +/* + * Must be synchronized with slurm_sched_ops_t above. + */ +static const char *syms[] = { + "slurm_sched_plugin_schedule", + "slurm_sched_plugin_newalloc", + "slurm_sched_plugin_freealloc", + "slurm_sched_plugin_initial_priority", + "slurm_sched_plugin_job_is_pending", + "slurm_sched_plugin_reconfig", + "slurm_sched_plugin_partition_change", + "slurm_sched_get_errno", + "slurm_sched_strerror", + "slurm_sched_plugin_requeue", + "slurm_sched_get_conf" +}; + +static slurm_sched_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* *********************************************************************** */ /* TAG( slurm_sched_init ) */ @@ -223,37 +102,30 @@ extern int slurm_sched_init( void ) { int retval = SLURM_SUCCESS; - char *sched_type = NULL; + char *plugin_type = "sched"; + char *type = NULL; - slurm_mutex_lock( &g_sched_context_lock ); + if ( g_context ) + return retval; - if ( g_sched_context ) - goto done; + slurm_mutex_lock( &g_context_lock ); - sched_type = slurm_get_sched_type(); - g_sched_context = slurm_sched_context_create( sched_type ); - if ( g_sched_context == NULL ) { - error( "cannot create scheduler context for %s", - sched_type ); - retval = SLURM_ERROR; + if ( g_context ) goto done; - } - if ( slurm_sched_get_ops( g_sched_context ) == NULL ) { - error( "cannot resolve scheduler plugin operations" ); - slurm_sched_context_destroy( g_sched_context ); - g_sched_context = NULL; + type = slurm_get_sched_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); + + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; goto done; } - if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) && - (gs_init() != SLURM_SUCCESS)) - error( "cannot start gang scheduler "); - - done: - slurm_mutex_unlock( &g_sched_context_lock ); - xfree(sched_type); +done: + slurm_mutex_unlock( &g_context_lock ); + xfree(type); return retval; } @@ -265,11 +137,11 @@ slurm_sched_fini( void ) { int rc; - if (!g_sched_context) + if (!g_context) return SLURM_SUCCESS; - rc = slurm_sched_context_destroy(g_sched_context); - g_sched_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; if ( (slurm_get_preempt_mode() & PREEMPT_MODE_GANG) && (gs_fini() != SLURM_SUCCESS)) @@ -292,7 +164,7 @@ slurm_sched_reconfig( void ) (gs_reconfig() != SLURM_SUCCESS)) error( "cannot reconfigure gang scheduler" ); - return (*(g_sched_context->ops.reconfig))(); + return (*(ops.reconfig))(); } /* *********************************************************************** */ @@ -311,7 +183,7 @@ slurm_sched_schedule( void ) error( "gang scheduler could not rescan jobs" ); #endif - return (*(g_sched_context->ops.schedule))(); + return (*(ops.schedule))(); } /* *********************************************************************** */ @@ -329,7 +201,7 @@ slurm_sched_newalloc( struct job_record *job_ptr ) job_ptr->job_id); } - return (*(g_sched_context->ops.newalloc))( job_ptr ); + return (*(ops.newalloc))( job_ptr ); } /* *********************************************************************** */ @@ -347,7 +219,7 @@ slurm_sched_freealloc( struct job_record *job_ptr ) job_ptr->job_id); } - return (*(g_sched_context->ops.freealloc))( job_ptr ); + return (*(ops.freealloc))( job_ptr ); } @@ -361,8 +233,7 @@ slurm_sched_initial_priority( uint32_t last_prio, if ( slurm_sched_init() < 0 ) return SLURM_ERROR; - return (*(g_sched_context->ops.initial_priority))( last_prio, - job_ptr ); + return (*(ops.initial_priority))( last_prio, job_ptr ); } /* *********************************************************************** */ @@ -374,7 +245,7 @@ slurm_sched_job_is_pending( void ) if ( slurm_sched_init() < 0 ) return; - (*(g_sched_context->ops.job_is_pending))(); + (*(ops.job_is_pending))(); } /* *********************************************************************** */ @@ -390,7 +261,7 @@ slurm_sched_partition_change( void ) (gs_reconfig() != SLURM_SUCCESS)) error( "cannot reconfigure gang scheduler" ); - (*(g_sched_context->ops.partition_change))(); + (*(ops.partition_change))(); } /* *********************************************************************** */ @@ -402,7 +273,7 @@ slurm_sched_p_get_errno( void ) if ( slurm_sched_init() < 0 ) return SLURM_ERROR; - return (*(g_sched_context->ops.get_errno))( ); + return (*(ops.get_errno))( ); } /* *********************************************************************** */ @@ -414,7 +285,7 @@ slurm_sched_p_strerror( int errnum ) if ( slurm_sched_init() < 0 ) return NULL; - return (*(g_sched_context->ops.strerror))( errnum ); + return (*(ops.strerror))( errnum ); } /* *********************************************************************** */ @@ -426,7 +297,7 @@ slurm_sched_requeue( struct job_record *job_ptr, char *reason ) if ( slurm_sched_init() < 0 ) return; - (*(g_sched_context->ops.job_requeue))( job_ptr, reason ); + (*(ops.job_requeue))( job_ptr, reason ); } /* *********************************************************************** */ @@ -438,7 +309,7 @@ slurm_sched_p_get_conf( void ) if ( slurm_sched_init() < 0 ) return NULL; - return (*(g_sched_context->ops.get_conf))( ); + return (*(ops.get_conf))( ); } -- GitLab From 4af1b5a262f985df86892753c9b41d5ab3e8e3fe Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:36:19 -0700 Subject: [PATCH 267/614] convert to generic context for proctrack plugins --- src/slurmd/common/proctrack.c | 209 +++++++--------------------------- 1 file changed, 44 insertions(+), 165 deletions(-) diff --git a/src/slurmd/common/proctrack.c b/src/slurmd/common/proctrack.c index 5e007f32d9..6c46cd91d4 100644 --- a/src/slurmd/common/proctrack.c +++ b/src/slurmd/common/proctrack.c @@ -59,141 +59,23 @@ typedef struct slurm_proctrack_ops { int (*get_pids) (uint64_t id, pid_t ** pids, int *npids); } slurm_proctrack_ops_t; - -/* ************************************************************************ */ -/* TAG( slurm_proctrack_contex_t ) */ -/* ************************************************************************ */ -typedef struct slurm_proctrack_context { - char * proctrack_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int op_errno; - slurm_proctrack_ops_t ops; -} slurm_proctrack_context_t; - -static slurm_proctrack_context_t *g_proctrack_context = NULL; -static pthread_mutex_t g_proctrack_context_lock = PTHREAD_MUTEX_INITIALIZER; - - -/* ************************************************************************ */ -/* TAG( _proctrack_get_ops ) */ -/* ************************************************************************ */ -static slurm_proctrack_ops_t * -_proctrack_get_ops(slurm_proctrack_context_t * c) -{ - /* - * Must be synchronized with slurm_proctrack_ops_t above. - */ - static const char *syms[] = { - "slurm_container_plugin_create", - "slurm_container_plugin_add", - "slurm_container_plugin_signal", - "slurm_container_plugin_destroy", - "slurm_container_plugin_find", - "slurm_container_plugin_has_pid", - "slurm_container_plugin_wait", - "slurm_container_plugin_get_pids" - }; - int n_syms = sizeof(syms) / sizeof(char *); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->proctrack_type, n_syms, syms, - (void **) &c->ops); - if (c->cur_plugin != PLUGIN_INVALID_HANDLE) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->proctrack_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", c->proctrack_type); - - /* Get plugin list. */ - if (c->plugin_list == NULL) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if (c->plugin_list == NULL) { - error("cannot create plugin manager"); - return NULL; - } - plugrack_set_major_type(c->plugin_list, "proctrack"); - plugrack_set_paranoia(c->plugin_list, - PLUGRACK_PARANOIA_NONE, 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(c->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type(c->plugin_list, - c->proctrack_type); - if (c->cur_plugin == PLUGIN_INVALID_HANDLE) { - error("cannot find proctrack plugin for %s", - c->proctrack_type); - return NULL; - } - - /* Dereference the API. */ - if (plugin_get_syms(c->cur_plugin, - n_syms, syms, (void **) &c->ops) < n_syms) { - error("incomplete proctrack plugin detected"); - return NULL; - } - - return &c->ops; -} - - -/* ************************************************************************ */ -/* TAG( _proctrack_context_create ) */ -/* ************************************************************************ */ -static slurm_proctrack_context_t * -_proctrack_context_create(const char *proctrack_type) -{ - slurm_proctrack_context_t *c; - - if (proctrack_type == NULL) { - debug3("_proctrack_context_create: no proctrack type"); - return NULL; - } - - c = xmalloc(sizeof(slurm_proctrack_context_t)); - c->proctrack_type = xstrdup(proctrack_type); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - c->op_errno = SLURM_SUCCESS; - - return c; -} - - -/* ************************************************************************ */ -/* TAG( _proctrack_context_destroy ) */ -/* ************************************************************************ */ -static int _proctrack_context_destroy(slurm_proctrack_context_t * c) -{ - int rc = SLURM_SUCCESS; - - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if (c->plugin_list) { - if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree(c->proctrack_type); - xfree(c); - - return rc; -} - +/* + * Must be synchronized with slurm_proctrack_ops_t above. + */ +static const char *syms[] = { + "slurm_container_plugin_create", + "slurm_container_plugin_add", + "slurm_container_plugin_signal", + "slurm_container_plugin_destroy", + "slurm_container_plugin_find", + "slurm_container_plugin_has_pid", + "slurm_container_plugin_wait", + "slurm_container_plugin_get_pids" +}; + +static slurm_proctrack_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* *********************************************************************** */ /* TAG( slurm_proctrack_init ) */ @@ -204,33 +86,30 @@ static int _proctrack_context_destroy(slurm_proctrack_context_t * c) extern int slurm_proctrack_init(void) { int retval = SLURM_SUCCESS; - char *proctrack_type = NULL; + char *plugin_type = "proctrack"; + char *type = NULL; - slurm_mutex_lock(&g_proctrack_context_lock); + if (g_context) + return retval; - if (g_proctrack_context) - goto done; + slurm_mutex_lock(&g_context_lock); - proctrack_type = slurm_get_proctrack_type(); - g_proctrack_context = _proctrack_context_create(proctrack_type); - if (g_proctrack_context == NULL) { - error("cannot create proctrack context for %s", - proctrack_type); - retval = SLURM_ERROR; + if (g_context) goto done; - } - if (_proctrack_get_ops(g_proctrack_context) == NULL) { - error("cannot resolve proctrack plugin operations for %s", - proctrack_type); - _proctrack_context_destroy(g_proctrack_context); - g_proctrack_context = NULL; + type = slurm_get_proctrack_type(); + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); + + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); retval = SLURM_ERROR; + goto done; } - done: - slurm_mutex_unlock(&g_proctrack_context_lock); - xfree(proctrack_type); +done: + slurm_mutex_unlock(&g_context_lock); + xfree(type); return retval; } @@ -241,11 +120,11 @@ extern int slurm_proctrack_fini(void) { int rc; - if (!g_proctrack_context) + if (!g_context) return SLURM_SUCCESS; - rc = _proctrack_context_destroy(g_proctrack_context); - g_proctrack_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; return rc; } @@ -262,7 +141,7 @@ extern int slurm_container_create(slurmd_job_t * job) if (slurm_proctrack_init() < 0) return 0; - return (*(g_proctrack_context->ops.create)) (job); + return (*(ops.create)) (job); } /* @@ -279,7 +158,7 @@ extern int slurm_container_add(slurmd_job_t * job, pid_t pid) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.add)) (job, pid); + return (*(ops.add)) (job, pid); } /* @@ -295,7 +174,7 @@ extern int slurm_container_signal(uint64_t cont_id, int signal) if (slurm_proctrack_init() < 0) { return SLURM_ERROR; } - return (*(g_proctrack_context->ops.signal)) (cont_id, signal); + return (*(ops.signal)) (cont_id, signal); } /* @@ -309,7 +188,7 @@ extern int slurm_container_destroy(uint64_t cont_id) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.destroy)) (cont_id); + return (*(ops.destroy)) (cont_id); } /* @@ -322,7 +201,7 @@ extern uint64_t slurm_container_find(pid_t pid) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.find_cont)) (pid); + return (*(ops.find_cont)) (pid); } /* @@ -334,7 +213,7 @@ extern bool slurm_container_has_pid(uint64_t cont_id, pid_t pid) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.has_pid)) (cont_id, pid); + return (*(ops.has_pid)) (cont_id, pid); } /* @@ -352,7 +231,7 @@ extern int slurm_container_wait(uint64_t cont_id) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.wait)) (cont_id); + return (*(ops.wait)) (cont_id); } /* @@ -373,5 +252,5 @@ slurm_container_get_pids(uint64_t cont_id, pid_t ** pids, int *npids) if (slurm_proctrack_init() < 0) return SLURM_ERROR; - return (*(g_proctrack_context->ops.get_pids)) (cont_id, pids, npids); + return (*(ops.get_pids)) (cont_id, pids, npids); } -- GitLab From 829021a4d086435e78c2cf7128b59e654e968284 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 10:37:05 -0700 Subject: [PATCH 268/614] convert to generic context for task plugins --- src/slurmd/common/task_plugin.c | 203 ++++++++------------------------ 1 file changed, 52 insertions(+), 151 deletions(-) diff --git a/src/slurmd/common/task_plugin.c b/src/slurmd/common/task_plugin.c index 7e44b63dc8..cdf3c2ac74 100644 --- a/src/slurmd/common/task_plugin.c +++ b/src/slurmd/common/task_plugin.c @@ -66,131 +66,27 @@ typedef struct slurmd_task_ops { int (*post_step) (slurmd_job_t *job); } slurmd_task_ops_t; - -typedef struct slurmd_task_context { - char *task_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - slurmd_task_ops_t ops; -} slurmd_task_context_t; - -static slurmd_task_context_t **g_task_context = NULL; +/* + * Must be synchronized with slurmd_task_ops_t above. + */ +static const char *syms[] = { + "task_slurmd_batch_request", + "task_slurmd_launch_request", + "task_slurmd_reserve_resources", + "task_slurmd_suspend_job", + "task_slurmd_resume_job", + "task_slurmd_release_resources", + "task_pre_setuid", + "task_pre_launch", + "task_post_term", + "task_post_step", +}; + +static slurmd_task_ops_t *ops; +static plugin_context_t **g_task_context = NULL; static int g_task_context_num = -1; static pthread_mutex_t g_task_context_lock = PTHREAD_MUTEX_INITIALIZER; - -static slurmd_task_ops_t * -_slurmd_task_get_ops(slurmd_task_context_t *c) -{ - /* - * Must be synchronized with slurmd_task_ops_t above. - */ - static const char *syms[] = { - "task_slurmd_batch_request", - "task_slurmd_launch_request", - "task_slurmd_reserve_resources", - "task_slurmd_suspend_job", - "task_slurmd_resume_job", - "task_slurmd_release_resources", - "task_pre_setuid", - "task_pre_launch", - "task_post_term", - "task_post_step", - }; - int n_syms = sizeof( syms ) / sizeof( char * ); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->task_type, n_syms, syms, - (void **) &c->ops); - if ( c->cur_plugin != PLUGIN_INVALID_HANDLE ) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->task_type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->task_type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type( c->plugin_list, "task" ); - plugrack_set_paranoia( c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0 ); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir( c->plugin_list, plugin_dir ); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type( c->plugin_list, c->task_type ); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find task plugin for %s", c->task_type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms( c->cur_plugin, n_syms, syms, - (void **) &c->ops ) < n_syms ) { - error( "incomplete task plugin detected" ); - return NULL; - } - - return &c->ops; -} - - -static slurmd_task_context_t * -_slurmd_task_context_create(const char *task_plugin_type) -{ - slurmd_task_context_t *c; - - if ( task_plugin_type == NULL ) { - debug3( "task_plugin_type is NULL" ); - return NULL; - } - - c = xmalloc( sizeof( slurmd_task_context_t ) ); - c->task_type = xstrdup( task_plugin_type ); - c->plugin_list = NULL; - c->cur_plugin = PLUGIN_INVALID_HANDLE; - - return c; -} - - -static int -_slurmd_task_context_destroy(slurmd_task_context_t *c) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if ( c->plugin_list ) { - if ( plugrack_destroy( c->plugin_list ) != SLURM_SUCCESS ) { - rc = SLURM_ERROR; - } - } else { - plugin_unload(c->cur_plugin); - } - - xfree( c->task_type ); - xfree( c ); - - return rc; -} - - /* * Initialize the task plugin. * @@ -199,8 +95,12 @@ _slurmd_task_context_destroy(slurmd_task_context_t *c) extern int slurmd_task_init(void) { int retval = SLURM_SUCCESS, i; + char *plugin_type = "task"; char *task_plugin_type = NULL; - char *last = NULL, *task_plugin_list, *task_plugin = NULL; + char *last = NULL, *task_plugin_list, *type = NULL; + + if ( g_task_context_num >= 0 ) + return retval; slurm_mutex_lock( &g_task_context_lock ); @@ -213,26 +113,25 @@ extern int slurmd_task_init(void) goto done; task_plugin_list = task_plugin_type; - while ((task_plugin = strtok_r(task_plugin_list, ",", &last))) { + while ((type = strtok_r(task_plugin_list, ",", &last))) { i = g_task_context_num++; + xrealloc(ops, sizeof(slurmd_task_ops_t) * g_task_context_num); xrealloc(g_task_context, - (sizeof(slurmd_task_context_t *) * g_task_context_num)); - if (strncmp(task_plugin, "task/", 5) == 0) - task_plugin += 5; /* backward compatibility */ - task_plugin = xstrdup_printf("task/%s", task_plugin); - g_task_context[i] = _slurmd_task_context_create( task_plugin ); - if ( g_task_context[i] == NULL ) { - error( "cannot create task context for %s", - task_plugin ); + (sizeof(plugin_context_t *) * g_task_context_num)); + if (strncmp(type, "task/", 5) == 0) + type += 5; /* backward compatibility */ + type = xstrdup_printf("task/%s", type); + g_task_context[i] = plugin_context_create( + plugin_type, type, (void **)&ops[i], + syms, sizeof(syms)); + if (!g_task_context[i]) { + error("cannot create %s context for %s", + plugin_type, type); + retval = SLURM_ERROR; goto error; } - if ( _slurmd_task_get_ops( g_task_context[i] ) == NULL ) { - error( "cannot resolve task plugin operations for %s", - task_plugin ); - goto error; - } - xfree(task_plugin); + xfree(type); task_plugin_list = NULL; /* for next iteration */ } @@ -242,11 +141,12 @@ extern int slurmd_task_init(void) return retval; error: - xfree(task_plugin); + xfree(type); retval = SLURM_ERROR; for (i = 0; i < g_task_context_num; i++) if (g_task_context[i]) - _slurmd_task_context_destroy(g_task_context[i]); + plugin_context_destroy(g_task_context[i]); + xfree(ops); xfree(g_task_context); g_task_context_num = -1; goto done; @@ -266,12 +166,13 @@ extern int slurmd_task_fini(void) goto done; for (i = 0; i < g_task_context_num; i++) { - if (_slurmd_task_context_destroy(g_task_context[i]) != + if (plugin_context_destroy(g_task_context[i]) != SLURM_SUCCESS) { rc = SLURM_ERROR; } } + xfree(ops); xfree(g_task_context); g_task_context_num = -1; @@ -294,7 +195,7 @@ extern int slurmd_batch_request(uint32_t job_id, batch_job_launch_msg_t *req) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) { - rc = (*(g_task_context[i]->ops.slurmd_batch_request))(job_id, + rc = (*(ops[i].slurmd_batch_request))(job_id, req); } slurm_mutex_unlock( &g_task_context_lock ); @@ -318,7 +219,7 @@ extern int slurmd_launch_request(uint32_t job_id, slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) { - rc = (*(g_task_context[i]->ops.slurmd_launch_request)) + rc = (*(ops[i].slurmd_launch_request)) (job_id, req, node_id); } slurm_mutex_unlock( &g_task_context_lock ); @@ -342,7 +243,7 @@ extern int slurmd_reserve_resources(uint32_t job_id, slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) { - rc = (*(g_task_context[i]->ops.slurmd_reserve_resources)) + rc = (*(ops[i].slurmd_reserve_resources)) (job_id, req, node_id); } slurm_mutex_unlock( &g_task_context_lock ); @@ -364,7 +265,7 @@ extern int slurmd_suspend_job(uint32_t job_id) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.slurmd_suspend_job))(job_id); + rc = (*(ops[i].slurmd_suspend_job))(job_id); slurm_mutex_unlock( &g_task_context_lock ); return (rc); @@ -384,7 +285,7 @@ extern int slurmd_resume_job(uint32_t job_id) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.slurmd_resume_job))(job_id); + rc = (*(ops[i].slurmd_resume_job))(job_id); slurm_mutex_unlock( &g_task_context_lock ); return (rc); @@ -404,7 +305,7 @@ extern int slurmd_release_resources(uint32_t job_id) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) { - rc = (*(g_task_context[i]->ops.slurmd_release_resources)) + rc = (*(ops[i].slurmd_release_resources)) (job_id); } slurm_mutex_unlock( &g_task_context_lock ); @@ -427,7 +328,7 @@ extern int pre_setuid(slurmd_job_t *job) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.pre_setuid))(job); + rc = (*(ops[i].pre_setuid))(job); slurm_mutex_unlock( &g_task_context_lock ); return (rc); @@ -447,7 +348,7 @@ extern int pre_launch(slurmd_job_t *job) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.pre_launch))(job); + rc = (*(ops[i].pre_launch))(job); slurm_mutex_unlock( &g_task_context_lock ); return (rc); @@ -467,7 +368,7 @@ extern int post_term(slurmd_job_t *job) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.post_term))(job); + rc = (*(ops[i].post_term))(job); slurm_mutex_unlock( &g_task_context_lock ); return (rc); @@ -487,7 +388,7 @@ extern int post_step(slurmd_job_t *job) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) - rc = (*(g_task_context[i]->ops.post_step))(job); + rc = (*(ops[i].post_step))(job); slurm_mutex_unlock( &g_task_context_lock ); return (rc); -- GitLab From e7c17c70a899fb98c9054272ee078f67b2f7e4fc Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 21 May 2012 13:29:43 -0700 Subject: [PATCH 269/614] Backport some performance enhancement work from serial branch This is a backport of plugin initialization logic made in the select/serial branch that we want to have in SLURM v2.4 and not only in v2.5. Note the plugin logic in v2.5 is different and this changes to not apply --- src/common/gres.c | 3 +++ src/common/mpi.c | 3 +++ src/common/node_select.c | 3 +++ src/common/slurm_accounting_storage.c | 3 +++ src/common/slurm_auth.c | 3 +++ src/common/slurm_jobacct_gather.c | 3 +++ src/common/slurm_priority.c | 3 +++ src/common/slurm_topology.c | 3 +++ src/common/switch.c | 3 +++ src/slurmctld/job_submit.c | 3 +++ src/slurmctld/sched_plugin.c | 3 +++ 11 files changed, 33 insertions(+) diff --git a/src/common/gres.c b/src/common/gres.c index 798ef8c91c..b47a3bc67a 100644 --- a/src/common/gres.c +++ b/src/common/gres.c @@ -338,6 +338,9 @@ extern int gres_plugin_init(void) int i, j, rc = SLURM_SUCCESS; char *last = NULL, *names, *one_name, *full_name; + if (gres_context_cnt >= 0) + return rc; + slurm_mutex_lock(&gres_context_lock); if (slurm_get_debug_flags() & DEBUG_FLAG_GRES) gres_debug = true; diff --git a/src/common/mpi.c b/src/common/mpi.c index 9ecdf1da83..d5c2d6054e 100644 --- a/src/common/mpi.c +++ b/src/common/mpi.c @@ -211,6 +211,9 @@ int _mpi_init (char *mpi_type) char *full_type = NULL; int got_default = 0; + if ( g_context ) + return retval; + slurm_mutex_lock( &context_lock ); if ( g_context ) diff --git a/src/common/node_select.c b/src/common/node_select.c index 10c6c8d293..d2bbd0c982 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -281,6 +281,9 @@ extern int slurm_select_init(bool only_default) struct dirent *e; char *dir_array = NULL, *head = NULL; + if ( select_context ) + return retval; + slurm_mutex_lock( &select_context_lock ); if ( select_context ) diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index eff7577f78..056c185a47 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -388,6 +388,9 @@ extern int slurm_acct_storage_init(char *loc) int retval = SLURM_SUCCESS; char *acct_storage_type = NULL; + if ( g_acct_storage_context ) + return retval; + slurm_mutex_lock( &g_acct_storage_context_lock ); if ( g_acct_storage_context ) diff --git a/src/common/slurm_auth.c b/src/common/slurm_auth.c index 264c605a71..652127f443 100644 --- a/src/common/slurm_auth.c +++ b/src/common/slurm_auth.c @@ -315,6 +315,9 @@ extern int slurm_auth_init( char *auth_type ) int retval = SLURM_SUCCESS; char *auth_type_local = NULL; + if ( g_context ) + return retval; + slurm_mutex_lock( &context_lock ); if ( g_context ) diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 66a1cef9ac..3c07c15405 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -258,6 +258,9 @@ static int _slurm_jobacct_gather_init(void) char *jobacct_gather_type = NULL; int retval=SLURM_SUCCESS; + if ( g_jobacct_gather_context ) + return(retval); + slurm_mutex_lock( &g_jobacct_gather_context_lock ); if ( g_jobacct_gather_context ) goto done; diff --git a/src/common/slurm_priority.c b/src/common/slurm_priority.c index ecb56b3b1a..a86432541f 100644 --- a/src/common/slurm_priority.c +++ b/src/common/slurm_priority.c @@ -198,6 +198,9 @@ extern int slurm_priority_init(void) int retval = SLURM_SUCCESS; char *priority_type = NULL; + if ( g_priority_context ) + return retval; + slurm_mutex_lock( &g_priority_context_lock ); if ( g_priority_context ) diff --git a/src/common/slurm_topology.c b/src/common/slurm_topology.c index a6ea794f6e..8d4a265159 100644 --- a/src/common/slurm_topology.c +++ b/src/common/slurm_topology.c @@ -207,6 +207,9 @@ slurm_topo_init( void ) int retval = SLURM_SUCCESS; char *topo_type = NULL; + if ( g_topo_context ) + return retval; + slurm_mutex_lock( &g_topo_context_lock ); if ( g_topo_context ) diff --git a/src/common/switch.c b/src/common/switch.c index bbfc9c9ae4..5a8ac8b16e 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -288,6 +288,9 @@ extern int switch_init( void ) int retval = SLURM_SUCCESS; char *switch_type = NULL; + if ( g_context ) + return retval; + slurm_mutex_lock( &context_lock ); if ( g_context ) diff --git a/src/slurmctld/job_submit.c b/src/slurmctld/job_submit.c index 7ded617042..56c3e3b146 100644 --- a/src/slurmctld/job_submit.c +++ b/src/slurmctld/job_submit.c @@ -196,6 +196,9 @@ extern int job_submit_plugin_init(void) int rc = SLURM_SUCCESS; char *last = NULL, *names, *one_name; + if (submit_context_cnt >= 0) + return rc; + slurm_mutex_lock(&submit_context_lock); if (submit_context_cnt >= 0) goto fini; diff --git a/src/slurmctld/sched_plugin.c b/src/slurmctld/sched_plugin.c index 55d8908a97..5b1229109b 100644 --- a/src/slurmctld/sched_plugin.c +++ b/src/slurmctld/sched_plugin.c @@ -225,6 +225,9 @@ slurm_sched_init( void ) int retval = SLURM_SUCCESS; char *sched_type = NULL; + if ( g_sched_context ) + return retval; + slurm_mutex_lock( &g_sched_context_lock ); if ( g_sched_context ) -- GitLab From dbd7be9889e8862c42847a9d43fd8586a565e4c4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 14:37:57 -0700 Subject: [PATCH 270/614] move code to use generic plugin context stuff for job_submit plugin --- src/slurmctld/job_submit.c | 211 +++++++++++++------------------------ 1 file changed, 72 insertions(+), 139 deletions(-) diff --git a/src/slurmctld/job_submit.c b/src/slurmctld/job_submit.c index 7ded617042..957fcc02fa 100644 --- a/src/slurmctld/job_submit.c +++ b/src/slurmctld/job_submit.c @@ -72,6 +72,7 @@ #include "src/common/xmalloc.h" #include "src/common/xstring.h" #include "src/slurmctld/slurmctld.h" +#include "src/slurmctld/job_submit.h" typedef struct slurm_submit_ops { int (*submit) ( struct job_descriptor *job_desc, @@ -81,110 +82,19 @@ typedef struct slurm_submit_ops { uint32_t submit_uid ); } slurm_submit_ops_t; -typedef struct slurm_submit_context { - char *sched_type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int sched_errno; - slurm_submit_ops_t ops; -} slurm_submit_context_t; - -static int submit_context_cnt = -1; -static slurm_submit_context_t *submit_context = NULL; +/* + * Must be synchronized with slurm_submit_ops_t above. + */ +static const char *syms[] = { + "job_submit", + "job_modify" +}; + +static int g_context_cnt = -1; +static slurm_submit_ops_t *ops = NULL; +static plugin_context_t **g_context = NULL; static char *submit_plugin_list = NULL; -static pthread_mutex_t submit_context_lock = PTHREAD_MUTEX_INITIALIZER; - -static int _load_submit_plugin(char *plugin_name, - slurm_submit_context_t *plugin_context) -{ - /* - * Must be synchronized with slurm_submit_ops_t above. - */ - static const char *syms[] = { - "job_submit", - "job_modify" - }; - int n_syms = sizeof(syms) / sizeof(char *); - - /* Find the correct plugin */ - plugin_context->sched_type = xstrdup("job_submit/"); - xstrcat(plugin_context->sched_type, plugin_name); - plugin_context->plugin_list = NULL; - plugin_context->cur_plugin = PLUGIN_INVALID_HANDLE; - plugin_context->sched_errno = SLURM_SUCCESS; - - plugin_context->cur_plugin = plugin_load_and_link( - plugin_context->sched_type, - n_syms, syms, - (void **) &plugin_context->ops); - if (plugin_context->cur_plugin != PLUGIN_INVALID_HANDLE) - return SLURM_SUCCESS; - - if(errno != EPLUGIN_NOTFOUND) { - error("job_submit: Couldn't load specified plugin name " - "for %s: %s", - plugin_context->sched_type, plugin_strerror(errno)); - return SLURM_ERROR; - } - - error("job_submit: Couldn't find the specified plugin name for %s " - "looking at all files", - plugin_context->sched_type); - - /* Get plugin list */ - if (plugin_context->plugin_list == NULL) { - char *plugin_dir; - plugin_context->plugin_list = plugrack_create(); - if (plugin_context->plugin_list == NULL) { - error("job_submit: cannot create plugin manager"); - return SLURM_ERROR; - } - plugrack_set_major_type(plugin_context->plugin_list, - "job_submit"); - plugrack_set_paranoia(plugin_context->plugin_list, - PLUGRACK_PARANOIA_NONE, 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(plugin_context->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - plugin_context->cur_plugin = plugrack_use_by_type( - plugin_context->plugin_list, - plugin_context->sched_type ); - if (plugin_context->cur_plugin == PLUGIN_INVALID_HANDLE) { - error("job_submit: cannot find scheduler plugin for %s", - plugin_context->sched_type); - return SLURM_ERROR; - } - - /* Dereference the API. */ - if (plugin_get_syms(plugin_context->cur_plugin, - n_syms, syms, - (void **) &plugin_context->ops ) < n_syms ) { - error("job_submit: incomplete plugin detected"); - return SLURM_ERROR; - } - return SLURM_SUCCESS; -} - -static int _unload_submit_plugin(slurm_submit_context_t *plugin_context) -{ - int rc; - - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if (plugin_context->plugin_list) - rc = plugrack_destroy(plugin_context->plugin_list); - else { - rc = SLURM_SUCCESS; - plugin_unload(plugin_context->cur_plugin); - } - xfree(plugin_context->sched_type); - - return rc; -} +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; /* * Initialize the job submit plugin. @@ -194,33 +104,53 @@ static int _unload_submit_plugin(slurm_submit_context_t *plugin_context) extern int job_submit_plugin_init(void) { int rc = SLURM_SUCCESS; - char *last = NULL, *names, *one_name; + char *last = NULL, *names; + char *plugin_type = "job_submit"; + char *type; + + if (g_context_cnt >= 0) + return rc; - slurm_mutex_lock(&submit_context_lock); - if (submit_context_cnt >= 0) + slurm_mutex_lock(&g_context_lock); + if (g_context_cnt >= 0) goto fini; submit_plugin_list = slurm_get_job_submit_plugins(); - submit_context_cnt = 0; + g_context_cnt = 0; if ((submit_plugin_list == NULL) || (submit_plugin_list[0] == '\0')) goto fini; - submit_context_cnt = 0; - names = xstrdup(submit_plugin_list); - one_name = strtok_r(names, ",", &last); - while (one_name) { - xrealloc(submit_context, (sizeof(slurm_submit_context_t) * - (submit_context_cnt + 1))); - rc = _load_submit_plugin(one_name, - submit_context + submit_context_cnt); - if (rc != SLURM_SUCCESS) + names = submit_plugin_list; + while ((type = strtok_r(names, ",", &last))) { + xrealloc(ops, + (sizeof(slurm_submit_ops_t) * (g_context_cnt + 1))); + xrealloc(g_context, + (sizeof(plugin_context_t *) * (g_context_cnt + 1))); + if (strncmp(type, "job_submit/", 11) == 0) + type += 11; /* backward compatibility */ + type = xstrdup_printf("job_submit/%s", type); + g_context[g_context_cnt] = plugin_context_create( + plugin_type, type, (void **)&ops[g_context_cnt], + syms, sizeof(syms)); + if (!g_context[g_context_cnt]) { + error("cannot create %s context for %s", + plugin_type, type); + rc = SLURM_ERROR; + xfree(type); break; - submit_context_cnt++; - one_name = strtok_r(NULL, ",", &last); + } + + xfree(type); + g_context_cnt++; + names = NULL; /* for next iteration */ } - xfree(names); -fini: slurm_mutex_unlock(&submit_context_lock); +fini: + slurm_mutex_unlock(&g_context_lock); + + if (rc != SLURM_SUCCESS) + job_submit_plugin_fini(); + return rc; } @@ -233,20 +163,23 @@ extern int job_submit_plugin_fini(void) { int i, j, rc = SLURM_SUCCESS; - slurm_mutex_lock(&submit_context_lock); - if (submit_context_cnt < 0) + slurm_mutex_lock(&g_context_lock); + if (g_context_cnt < 0) goto fini; - for (i=0; i Date: Mon, 21 May 2012 14:56:15 -0700 Subject: [PATCH 271/614] Chnage NRT job_key from 16 to 32-bits --- src/plugins/switch/nrt/nrt.c | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e3bcb50f4a..d4598aa334 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -125,7 +125,7 @@ struct slurm_nrt_libstate { slurm_nrt_nodeinfo_t *node_list; uint32_t hash_max; slurm_nrt_nodeinfo_t **hash_table; - uint16_t key_index; + nrt_job_key_t key_index; }; struct slurm_nrt_jobinfo { @@ -215,7 +215,7 @@ static int _wait_for_window_unloaded(char *adapter_name, static char * _win_state_str(win_state_t state); static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, - win_state_t state, uint16_t job_key); + win_state_t state, nrt_job_key_t job_key); /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library @@ -446,7 +446,7 @@ _free_windows_by_job_key(uint16_t job_key, char *node_name) slurm_nrt_window_t *window; int i, j; - /* debug3("_free_windows_by_job_key(%hu, %s)", job_key, node_name); */ + /* debug3("_free_windows_by_job_key(%u, %s)", job_key, node_name); */ if ((node = _find_node(nrt_state, node_name)) == NULL) return; @@ -563,7 +563,7 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, int task_id, win_state_t state, - uint16_t job_key) + nrt_job_key_t job_key) { slurm_nrt_nodeinfo_t *node = NULL; slurm_nrt_adapter_t *adapter = NULL; @@ -1057,7 +1057,7 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) #endif info(" window %hu: %s", w[j].window_id, _win_state_str(w->state)); - info(" job_key %hu", w[j].job_key); + info(" job_key %u", w[j].job_key); } } info("--End Node Info--"); @@ -1076,7 +1076,7 @@ _print_libstate(const slurm_nrt_libstate_t *l) info(" node_count = %u", l->node_count); info(" node_max = %u", l->node_max); info(" hash_max = %u", l->hash_max); - info(" key_index = %hu", l->key_index); + info(" key_index = %u", l->key_index); for (i = 0; i < l->node_count; i++) { _print_nodeinfo(&l->node_list[i]); } @@ -1226,7 +1226,7 @@ _alloc_libstate(void) tmp->hash_table = NULL; /* Start key from random point, old key values are cached, * which seems to prevent re-use for a while */ - tmp->key_index = (uint16_t) time(NULL); + tmp->key_index = (nrt_job_key_t) time(NULL); return tmp; } @@ -1292,7 +1292,7 @@ nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **j) assert(j != NULL); new = (slurm_nrt_jobinfo_t *) xmalloc(sizeof(slurm_nrt_jobinfo_t)); new->magic = NRT_JOBINFO_MAGIC; - new->job_key = -1; + new->job_key = (nrt_job_key_t) -1; new->tables_per_task = 0; new->tableinfo = NULL; *j = new; @@ -1449,6 +1449,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) window_ptr->window_id = (*status_array)[k]. window_id; window_ptr->state = (*status_array)[k].state; +/* FIXME: This appears to be bad */ window_ptr->job_key = (*status_array)[k]. client_pid; } @@ -1938,7 +1939,7 @@ nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) static nrt_job_key_t _next_key(void) { - uint16_t key; + nrt_job_key_t key; assert(nrt_state); @@ -1946,7 +1947,7 @@ _next_key(void) key = nrt_state->key_index; if (key == 0) key++; - nrt_state->key_index = key + 1; + nrt_state->key_index = (nrt_job_key_t) (key + 1); _unlock(); return key; @@ -2599,7 +2600,7 @@ static int _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) { uint16_t job_count = 0; - uint16_t *job_keys = NULL; + nrt_job_key_t *job_keys = NULL; int err, i; #if 1 @@ -2618,7 +2619,7 @@ _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) info("adapter_name:%s adapter_type:%s", adapter_name, _adapter_type_str(adapter_type)); for (i = 0; i < job_count; i++) - info(" job_keys[%d]:%hu", i, job_keys[i]); + info(" job_keys[%d]:%u", i, job_keys[i]); #endif if (job_keys) free(job_keys); @@ -2772,7 +2773,7 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, &unload_window); if (err == NRT_SUCCESS) return SLURM_SUCCESS; - debug("Unable to unload window for job_key %hu, " + debug("Unable to unload window for job_key %u, " "nrt_unload_window(%s, %u): %s", job_key, adapter_name, adapter_type, nrt_err_str(err)); @@ -2786,7 +2787,7 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, &clean_window); if (err == NRT_SUCCESS) return SLURM_SUCCESS; - error("Unable to clean window for job_key %hu, " + error("Unable to clean window for job_key %u, " "nrt_clean_window(%s, %u): %s", job_key, adapter_name, adapter_type, nrt_err_str(err)); if (err != NRT_EAGAIN) @@ -2890,7 +2891,7 @@ _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) for (i = 0; i < lp->node_count; i++) (void)nrt_pack_nodeinfo(&lp->node_list[i], buffer); /* don't pack hash_table, we'll just rebuild on restore */ - pack16(lp->key_index, buffer); + pack32(lp->key_index, buffer); return(get_buf_offset(buffer) - offset); } @@ -2933,7 +2934,7 @@ _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) lp->node_count, node_count); return SLURM_ERROR; } - safe_unpack16(&lp->key_index, buffer); + safe_unpack32(&lp->key_index, buffer); #if NRT_DEBUG info("_unpack_libstate"); _print_libstate(lp); -- GitLab From dec8ac1d7add0e9f9ace92cd6a2413bb3752981d Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 16:23:38 -0700 Subject: [PATCH 272/614] Code to match job_submit plugin for similar code. --- src/slurmd/common/task_plugin.c | 50 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 26 deletions(-) diff --git a/src/slurmd/common/task_plugin.c b/src/slurmd/common/task_plugin.c index cdf3c2ac74..7d211a48b9 100644 --- a/src/slurmd/common/task_plugin.c +++ b/src/slurmd/common/task_plugin.c @@ -45,6 +45,8 @@ #include "src/common/xmalloc.h" #include "src/common/xstring.h" +#include "src/slurmd/common/task_plugin.h" + #include "src/slurmd/slurmstepd/slurmstepd_job.h" typedef struct slurmd_task_ops { @@ -82,7 +84,7 @@ static const char *syms[] = { "task_post_step", }; -static slurmd_task_ops_t *ops; +static slurmd_task_ops_t *ops = NULL; static plugin_context_t **g_task_context = NULL; static int g_task_context_num = -1; static pthread_mutex_t g_task_context_lock = PTHREAD_MUTEX_INITIALIZER; @@ -94,7 +96,7 @@ static pthread_mutex_t g_task_context_lock = PTHREAD_MUTEX_INITIALIZER; */ extern int slurmd_task_init(void) { - int retval = SLURM_SUCCESS, i; + int retval = SLURM_SUCCESS; char *plugin_type = "task"; char *task_plugin_type = NULL; char *last = NULL, *task_plugin_list, *type = NULL; @@ -114,42 +116,37 @@ extern int slurmd_task_init(void) task_plugin_list = task_plugin_type; while ((type = strtok_r(task_plugin_list, ",", &last))) { - i = g_task_context_num++; - xrealloc(ops, sizeof(slurmd_task_ops_t) * g_task_context_num); - xrealloc(g_task_context, - (sizeof(plugin_context_t *) * g_task_context_num)); + xrealloc(ops, + sizeof(slurmd_task_ops_t) * (g_task_context_num + 1)); + xrealloc(g_task_context, (sizeof(plugin_context_t *) + * (g_task_context_num + 1))); if (strncmp(type, "task/", 5) == 0) type += 5; /* backward compatibility */ type = xstrdup_printf("task/%s", type); - g_task_context[i] = plugin_context_create( - plugin_type, type, (void **)&ops[i], + g_task_context[g_task_context_num] = plugin_context_create( + plugin_type, type, (void **)&ops[g_task_context_num], syms, sizeof(syms)); - if (!g_task_context[i]) { + if (!g_task_context[g_task_context_num]) { error("cannot create %s context for %s", plugin_type, type); + xfree(type); retval = SLURM_ERROR; - goto error; + break; } xfree(type); + g_task_context_num++; task_plugin_list = NULL; /* for next iteration */ } done: slurm_mutex_unlock( &g_task_context_lock ); xfree(task_plugin_type); - return retval; -error: - xfree(type); - retval = SLURM_ERROR; - for (i = 0; i < g_task_context_num; i++) - if (g_task_context[i]) - plugin_context_destroy(g_task_context[i]); - xfree(ops); - xfree(g_task_context); - g_task_context_num = -1; - goto done; + if (retval != SLURM_SUCCESS) + slurmd_task_fini(); + + return retval; } /* @@ -166,9 +163,11 @@ extern int slurmd_task_fini(void) goto done; for (i = 0; i < g_task_context_num; i++) { - if (plugin_context_destroy(g_task_context[i]) != - SLURM_SUCCESS) { - rc = SLURM_ERROR; + if (g_task_context[i]) { + if (plugin_context_destroy(g_task_context[i]) != + SLURM_SUCCESS) { + rc = SLURM_ERROR; + } } } @@ -195,8 +194,7 @@ extern int slurmd_batch_request(uint32_t job_id, batch_job_launch_msg_t *req) slurm_mutex_lock( &g_task_context_lock ); for (i = 0; ((i < g_task_context_num) && (rc == SLURM_SUCCESS)); i++) { - rc = (*(ops[i].slurmd_batch_request))(job_id, - req); + rc = (*(ops[i].slurmd_batch_request))(job_id, req); } slurm_mutex_unlock( &g_task_context_lock ); -- GitLab From 162bb362c8d54ff8646248ceb6a33033b205f7bc Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 21 May 2012 16:43:29 -0700 Subject: [PATCH 273/614] convert configure api for bluegene plugin to use generic code instead of plugin specific --- src/plugins/select/bluegene/configure_api.c | 205 ++++++-------------- 1 file changed, 60 insertions(+), 145 deletions(-) diff --git a/src/plugins/select/bluegene/configure_api.c b/src/plugins/select/bluegene/configure_api.c index 83e3590e36..e9aebad3ba 100644 --- a/src/plugins/select/bluegene/configure_api.c +++ b/src/plugins/select/bluegene/configure_api.c @@ -65,142 +65,57 @@ typedef struct { void (*set_ba_debug_flags) (uint32_t debug_flags); } bg_configure_api_ops_t; -typedef struct bg_configure_context { - char *type; - plugrack_t plugin_list; - plugin_handle_t cur_plugin; - int bg_configure_errno; - bg_configure_api_ops_t ops; -} bg_configure_context_t; - -static bg_configure_context_t *bg_configure_context = NULL; -static pthread_mutex_t bg_configure_context_lock = - PTHREAD_MUTEX_INITIALIZER; - -static bg_configure_api_ops_t *_get_ops(bg_configure_context_t *c) -{ - /* - * Must be synchronized with bg_configure_api_ops_t above. - */ - static const char *syms[] = { - "ba_init", - "ba_fini", - "ba_setup_wires", - "reset_ba_system", - "destroy_ba_mp", - "ba_passthroughs_string", - "ba_update_mp_state", - "ba_set_removable_mps", - "ba_reset_all_removed_mps", - "new_ba_request", - "allocate_block", - "remove_block", - "str2ba_mp", - "loc2ba_mp", - "coord2ba_mp", - "give_geo", - "config_make_tbl", - "set_ba_debug_flags", - }; - int n_syms = sizeof(syms) / sizeof(char *); - - /* Find the correct plugin. */ - c->cur_plugin = plugin_load_and_link(c->type, n_syms, syms, - (void **) &c->ops); - if (c->cur_plugin != PLUGIN_INVALID_HANDLE) - return &c->ops; - - if(errno != EPLUGIN_NOTFOUND) { - error("Couldn't load specified plugin name for %s: %s", - c->type, plugin_strerror(errno)); - return NULL; - } - - error("Couldn't find the specified plugin name for %s " - "looking at all files", - c->type); - - /* Get plugin list. */ - if ( c->plugin_list == NULL ) { - char *plugin_dir; - c->plugin_list = plugrack_create(); - if ( c->plugin_list == NULL ) { - error( "cannot create plugin manager" ); - return NULL; - } - plugrack_set_major_type(c->plugin_list, "select"); - plugrack_set_paranoia(c->plugin_list, - PLUGRACK_PARANOIA_NONE, - 0); - plugin_dir = slurm_get_plugin_dir(); - plugrack_read_dir(c->plugin_list, plugin_dir); - xfree(plugin_dir); - } - - c->cur_plugin = plugrack_use_by_type(c->plugin_list, c->type); - if ( c->cur_plugin == PLUGIN_INVALID_HANDLE ) { - error( "cannot find accounting_storage plugin for %s", - c->type ); - return NULL; - } - - /* Dereference the API. */ - if ( plugin_get_syms(c->cur_plugin, - n_syms, - syms, - (void **) &c->ops ) < n_syms) { - error("incomplete select plugin detected"); - return NULL; - } - - return &c->ops; -} - /* - * Destroy a node selection context + * Must be synchronized with bg_configure_api_ops_t above. */ -static int _context_destroy(bg_configure_context_t *c) -{ - int rc = SLURM_SUCCESS; - /* - * Must check return code here because plugins might still - * be loaded and active. - */ - if (c->plugin_list) { - if (plugrack_destroy(c->plugin_list) != SLURM_SUCCESS) - rc = SLURM_ERROR; - } else { - plugin_unload(c->cur_plugin); - } - - xfree(c->type); - - return rc; -} - +static const char *syms[] = { + "ba_init", + "ba_fini", + "ba_setup_wires", + "reset_ba_system", + "destroy_ba_mp", + "ba_passthroughs_string", + "ba_update_mp_state", + "ba_set_removable_mps", + "ba_reset_all_removed_mps", + "new_ba_request", + "allocate_block", + "remove_block", + "str2ba_mp", + "loc2ba_mp", + "coord2ba_mp", + "give_geo", + "config_make_tbl", + "set_ba_debug_flags", +}; + +static bg_configure_api_ops_t ops; +static plugin_context_t *g_context = NULL; +static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; extern int bg_configure_init(void) { int rc = SLURM_SUCCESS; - slurm_mutex_lock(&bg_configure_context_lock); + char *plugin_type = "select", *type="select/bluegene"; + if (g_context) + return rc; + + slurm_mutex_lock(&g_context_lock); - if (bg_configure_context) + if (g_context) goto done; - bg_configure_context = xmalloc(sizeof(bg_configure_context_t)); - bg_configure_context->type = xstrdup("select/bluegene"); - bg_configure_context->cur_plugin = PLUGIN_INVALID_HANDLE; - bg_configure_context->bg_configure_errno = SLURM_SUCCESS; + g_context = plugin_context_create( + plugin_type, type, (void **)&ops, syms, sizeof(syms)); - if (!_get_ops(bg_configure_context)) { - error("cannot resolve select plugin operations for configure"); - _context_destroy(bg_configure_context); - bg_configure_context = NULL; + if (!g_context) { + error("cannot create %s context for %s", plugin_type, type); rc = SLURM_ERROR; + goto done; } done: - slurm_mutex_unlock(&bg_configure_context_lock); + slurm_mutex_unlock(&g_context_lock); return rc; } @@ -209,14 +124,14 @@ extern int bg_configure_fini(void) { int rc = SLURM_SUCCESS; - slurm_mutex_lock(&bg_configure_context_lock); - if (!bg_configure_context) + slurm_mutex_lock(&g_context_lock); + if (!g_context) goto fini; - rc = _context_destroy(bg_configure_context); - bg_configure_context = NULL; + rc = plugin_context_destroy(g_context); + g_context = NULL; fini: - slurm_mutex_unlock(&bg_configure_context_lock); + slurm_mutex_unlock(&g_context_lock); return rc; } @@ -226,7 +141,7 @@ extern void bg_configure_ba_init( if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.ba_init))(node_info_ptr, load_bridge); + (*(ops.ba_init))(node_info_ptr, load_bridge); } extern void bg_configure_ba_fini(void) @@ -234,7 +149,7 @@ extern void bg_configure_ba_fini(void) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.ba_fini))(); + (*(ops.ba_fini))(); } extern void bg_configure_ba_setup_wires(void) @@ -242,7 +157,7 @@ extern void bg_configure_ba_setup_wires(void) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.ba_setup_wires))(); + (*(ops.ba_setup_wires))(); } extern void bg_configure_reset_ba_system(bool track_down_mps) @@ -250,7 +165,7 @@ extern void bg_configure_reset_ba_system(bool track_down_mps) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.reset_ba_system))(track_down_mps); + (*(ops.reset_ba_system))(track_down_mps); } extern void bg_configure_destroy_ba_mp(void *ptr) @@ -258,7 +173,7 @@ extern void bg_configure_destroy_ba_mp(void *ptr) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.destroy_ba_mp))(ptr); + (*(ops.destroy_ba_mp))(ptr); } extern char *bg_configure_ba_passthroughs_string(uint16_t passthrough) @@ -266,7 +181,7 @@ extern char *bg_configure_ba_passthroughs_string(uint16_t passthrough) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.ba_passthroughs_string)) + return (*(ops.ba_passthroughs_string)) (passthrough); } @@ -275,7 +190,7 @@ extern void bg_configure_ba_update_mp_state(ba_mp_t *ba_mp, uint16_t state) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.ba_update_mp_state))(ba_mp, state); + (*(ops.ba_update_mp_state))(ba_mp, state); } extern int bg_configure_ba_set_removable_mps(bitstr_t *bitmap, bool except) @@ -283,7 +198,7 @@ extern int bg_configure_ba_set_removable_mps(bitstr_t *bitmap, bool except) if (bg_configure_init() < 0) return SLURM_ERROR; - return (*(bg_configure_context->ops.ba_set_removable_mps)) + return (*(ops.ba_set_removable_mps)) (bitmap, except); } @@ -292,7 +207,7 @@ extern int bg_configure_ba_reset_all_removed_mps(void) if (bg_configure_init() < 0) return SLURM_ERROR; - return (*(bg_configure_context->ops.ba_reset_all_removed_mps))(); + return (*(ops.ba_reset_all_removed_mps))(); } @@ -301,7 +216,7 @@ extern int bg_configure_new_ba_request(select_ba_request_t* ba_request) if (bg_configure_init() < 0) return SLURM_ERROR; - return (*(bg_configure_context->ops.new_ba_request))(ba_request); + return (*(ops.new_ba_request))(ba_request); } extern int bg_configure_allocate_block( @@ -310,7 +225,7 @@ extern int bg_configure_allocate_block( if (bg_configure_init() < 0) return SLURM_ERROR; - return (*(bg_configure_context->ops.allocate_block)) + return (*(ops.allocate_block)) (ba_request, results); } @@ -319,7 +234,7 @@ extern int bg_configure_remove_block(List mps, bool is_small) if (bg_configure_init() < 0) return SLURM_ERROR; - return (*(bg_configure_context->ops.remove_block))(mps, is_small); + return (*(ops.remove_block))(mps, is_small); } extern ba_mp_t *bg_configure_str2ba_mp(const char *coords) @@ -327,7 +242,7 @@ extern ba_mp_t *bg_configure_str2ba_mp(const char *coords) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.str2ba_mp))(coords); + return (*(ops.str2ba_mp))(coords); } extern ba_mp_t *bg_configure_loc2ba_mp(const char *mp_id) @@ -335,7 +250,7 @@ extern ba_mp_t *bg_configure_loc2ba_mp(const char *mp_id) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.loc2ba_mp))(mp_id); + return (*(ops.loc2ba_mp))(mp_id); } extern ba_mp_t *bg_configure_coord2ba_mp(const uint16_t *coord) @@ -343,7 +258,7 @@ extern ba_mp_t *bg_configure_coord2ba_mp(const uint16_t *coord) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.coord2ba_mp))(coord); + return (*(ops.coord2ba_mp))(coord); } extern char *bg_configure_give_geo(uint16_t *int_geo, int dims, bool with_sep) @@ -351,7 +266,7 @@ extern char *bg_configure_give_geo(uint16_t *int_geo, int dims, bool with_sep) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.give_geo))(int_geo, dims, with_sep); + return (*(ops.give_geo))(int_geo, dims, with_sep); } extern s_p_hashtbl_t *bg_configure_config_make_tbl(char *filename) @@ -359,7 +274,7 @@ extern s_p_hashtbl_t *bg_configure_config_make_tbl(char *filename) if (bg_configure_init() < 0) return NULL; - return (*(bg_configure_context->ops.config_make_tbl))(filename); + return (*(ops.config_make_tbl))(filename); } extern void ba_configure_set_ba_debug_flags(uint32_t debug_flags) @@ -367,5 +282,5 @@ extern void ba_configure_set_ba_debug_flags(uint32_t debug_flags) if (bg_configure_init() < 0) return; - (*(bg_configure_context->ops.set_ba_debug_flags))(debug_flags); + (*(ops.set_ba_debug_flags))(debug_flags); } -- GitLab From 63861cc38f57486498d355ce9fa5889d42dfa546 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Mon, 21 May 2012 17:14:30 -0700 Subject: [PATCH 274/614] Split test21.21 into multiple tests --- testsuite/expect/inc21.21.1 | 59 ++++++++++++++++++++ testsuite/expect/inc21.21.2 | 61 +++++++++++++++++++++ testsuite/expect/inc21.21.3 | 60 +++++++++++++++++++++ testsuite/expect/inc21.21.4 | 70 ++++++++++++++++++++++++ testsuite/expect/test21.21 | 104 +++++------------------------------- 5 files changed, 264 insertions(+), 90 deletions(-) create mode 100644 testsuite/expect/inc21.21.1 create mode 100644 testsuite/expect/inc21.21.2 create mode 100644 testsuite/expect/inc21.21.3 create mode 100644 testsuite/expect/inc21.21.4 diff --git a/testsuite/expect/inc21.21.1 b/testsuite/expect/inc21.21.1 new file mode 100644 index 0000000000..84d81b2c7e --- /dev/null +++ b/testsuite/expect/inc21.21.1 @@ -0,0 +1,59 @@ +############################################################################ +# Purpose: Test for accounting records of specific job names with their ID +############################################################################ +# Copyright (C) 2012 SchedMD LLC. +# Written by Nathan Yee +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ + +# +# Test maxnode +# +proc inc21_21_1 { maxnode } { + + global number bin_id ta srun exit_code + +# +# Spawn a job testing maxnode +# + set matches 0 + spawn $srun -v -N$maxnode --account=$ta $bin_id + expect { + -re "launching ($number)" { + incr matches + exp_continue + } + timeout { + send_user "\nFAILURE: srun not responding\n" + set exit_code 1 + } + eof { + wait + } + } + + if { $matches != 1 } { + send_user "\nFAILURE: job dion't launch with correct limit\n" + set exit_code 1 + return $exit_code + } + + +} diff --git a/testsuite/expect/inc21.21.2 b/testsuite/expect/inc21.21.2 new file mode 100644 index 0000000000..aa0733b1a1 --- /dev/null +++ b/testsuite/expect/inc21.21.2 @@ -0,0 +1,61 @@ +############################################################################ +# Purpose: Test for accounting records of specific job names with their ID +############################################################################ +# Copyright (C) 2012 SchedMD LLC. +# Written by Nathan Yee +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ + +# +# Test for maxnode+1 +# +proc inc21_21_2 {maxnode} { + + global number bin_id ta srun exit_code + +# +# Spawn a job testing maxnode+1 +# + spawn $srun -N[expr $maxnode + 1] --account=$ta $bin_id + expect { + -re "Job violates accounting policy" { + send_user "\nThis error is expected, not a problem\n" + exp_continue + } + -re "launching ($number)" { + send_user "\nFAILURE: job should not have run.\n" + set exit_code 1 + exp_continue + } + timeout { + send_user "\nFAILURE: srun not responding\n" + set exit_code 1 + } + eof { + wait + } + } + + if { $exit_code } { + return $exit_code + } + + +} diff --git a/testsuite/expect/inc21.21.3 b/testsuite/expect/inc21.21.3 new file mode 100644 index 0000000000..a43d64d2ce --- /dev/null +++ b/testsuite/expect/inc21.21.3 @@ -0,0 +1,60 @@ +############################################################################ +# Purpose: Test for accounting records of specific job names with their ID +############################################################################ +# Copyright (C) 2012 SchedMD LLC. +# Written by Nathan Yee +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ + +# +# Test for maxwall +# + +proc inc21_21_3 {maxwall } { + + global number bin_id ta srun exit_code + + # + # Spawn a job testing maxwall + # + set matches 0 + spawn $srun -v -t$maxwall --account=$ta $bin_id + expect { + -re "launching ($number)" { + incr matches + exp_continue + } + timeout { + send_user "\nFAILURE: srun not responding\n" + set exit_code 1 + } + eof { + wait + } + } + + if { $matches != 1 } { + send_user "\nFAILURE: job dion't launch with correct limit\n" + set exit_code 1 + return $exit_code + } + + +} diff --git a/testsuite/expect/inc21.21.4 b/testsuite/expect/inc21.21.4 new file mode 100644 index 0000000000..e74b6b72d4 --- /dev/null +++ b/testsuite/expect/inc21.21.4 @@ -0,0 +1,70 @@ +############################################################################ +# Purpose: Test for accounting records of specific job names with their ID +############################################################################ +# Copyright (C) 2012 SchedMD LLC. +# Written by Nathan Yee +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ + +# +# Tesing maxwall+1 +# + +proc inc21_21_4 {maxwall } { + + global number bin_id ta srun exit_code + + # + # Spawn a job testing maxwall+1 + # + spawn $srun -t[expr $maxwall + 1] --account=$ta $bin_id + expect { + -re "Job violates accounting policy" { + send_user "\nThis error is expected, not a problem\n" + exp_continue + } + -re "launching ($number)" { + send_user "\nFAILURE: job should not have run.\n" + set exit_code 1 + exp_continue + } + timeout { + send_user "\nFAILURE: srun not responding\n" + set exit_code 1 + } + eof { + wait + } + } + + if { $exit_code } { + return $exit_code + } + + + + +} + + + + + + diff --git a/testsuite/expect/test21.21 b/testsuite/expect/test21.21 index 6679631613..f4828228e2 100755 --- a/testsuite/expect/test21.21 +++ b/testsuite/expect/test21.21 @@ -33,6 +33,10 @@ ############################################################################ source ./globals source ./globals_accounting +source ./inc21.21.1 +source ./inc21.21.2 +source ./inc21.21.3 +source ./inc21.21.4 set test_id "21.21" set exit_code 0 @@ -56,113 +60,33 @@ proc _test_limits { } { if { $exit_code } { return $exit_code } + # - # Spawn a job testing maxnode + # Start sub-test: test for maxnode # - set matches 0 - spawn $srun -v -N$maxnode --account=$ta $bin_id - expect { - -re "launching ($number)" { - incr matches - exp_continue - } - timeout { - send_user "\nFAILURE: srun not responding\n" - set exit_code 1 - } - eof { - wait - } - } + inc21_21_1 $maxnode - if { $matches != 1 } { - send_user "\nFAILURE: job dion't launch with correct limit\n" - set exit_code 1 - return $exit_code - } # - # Spawn a job testing maxnode+1 + # Start sub-test: test for maxnode+1 # - spawn $srun -N[expr $maxnode + 1] --account=$ta $bin_id - expect { - -re "Job violates accounting policy" { - send_user "\nThis error is expected, not a problem\n" - exp_continue - } - -re "launching ($number)" { - send_user "\nFAILURE: job should not have run.\n" - set exit_code 1 - exp_continue - } - timeout { - send_user "\nFAILURE: srun not responding\n" - set exit_code 1 - } - eof { - wait - } - } - - if { $exit_code } { - return $exit_code - } + inc21_21_2 $maxnode # - # Spawn a job testing maxwall + # Start sub-test: testing maxwall # - set matches 0 - spawn $srun -v -t$maxwall --account=$ta $bin_id - expect { - -re "launching ($number)" { - incr matches - exp_continue - } - timeout { - send_user "\nFAILURE: srun not responding\n" - set exit_code 1 - } - eof { - wait - } - } + inc21_21_3 $maxwall - if { $matches != 1 } { - send_user "\nFAILURE: job dion't launch with correct limit\n" - set exit_code 1 - return $exit_code - } # - # Spawn a job testing maxwall+1 + # Start sub-test: testing maxwall+1 # - spawn $srun -t[expr $maxwall + 1] --account=$ta $bin_id - expect { - -re "Job violates accounting policy" { - send_user "\nThis error is expected, not a problem\n" - exp_continue - } - -re "launching ($number)" { - send_user "\nFAILURE: job should not have run.\n" - set exit_code 1 - exp_continue - } - timeout { - send_user "\nFAILURE: srun not responding\n" - set exit_code 1 - } - eof { - wait - } - } + inc21_21_4 $maxwall - if { $exit_code } { - return $exit_code - } # This should overwrite the old file_in which has already been used, # so no big deal. make_bash_script $file_in " $bin_sleep 5 - " + " # test job max cnt and submit for {set inx 0} {$inx < $maxsubmit} {incr inx} { -- GitLab From 636f612aa811fb97e98c101ce045c9d3bd0f505e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 21 May 2012 15:47:34 -0700 Subject: [PATCH 275/614] correct comment in test --- testsuite/expect/test9.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index d24bbb9f75..2b40b4f859 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -1,6 +1,6 @@ #!/usr/bin/expect ############################################################################ -# Purpose: Timing test for 2000 jobs. +# Purpose: Timing test for 5000 jobs. # # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR -- GitLab From d47f565198384b45de337ab8b4f5d9b6798e505b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 08:47:06 -0700 Subject: [PATCH 276/614] Optimize schedule() for sched/builtin If using the sched/builtin plugin for FIFO scheduling, then do not create an intermediate job queue to be sorted, but iterate directly over the job list. --- src/slurmctld/job_scheduler.c | 177 +++++++++++++++++++++++----------- 1 file changed, 121 insertions(+), 56 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 92f465f66b..d08f3948c6 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -86,6 +86,9 @@ static void _feature_list_delete(void *x); static void _job_queue_append(List job_queue, struct job_record *job_ptr, struct part_record *part_ptr); static void _job_queue_rec_del(void *x); +static bool _job_runnable_test1(struct job_record *job_ptr, + bool clear_start); +static bool _job_runnable_test2(struct job_record *job_ptr); static void * _run_epilog(void *arg); static void * _run_prolog(void *arg); static bool _scan_depend(List dependency_list, uint32_t job_id); @@ -146,6 +149,59 @@ static void _job_queue_rec_del(void *x) xfree(x); } +/* Job test for ability to run now, excludes partition specific tests */ +static bool _job_runnable_test1(struct job_record *job_ptr, bool clear_start) +{ + bool job_indepen = false; + + xassert(job_ptr->magic == JOB_MAGIC); + if (!IS_JOB_PENDING(job_ptr) || IS_JOB_COMPLETING(job_ptr)) + return false; + + job_indepen = job_independent(job_ptr, 0); + if (clear_start) + job_ptr->start_time = (time_t) 0; + if (job_ptr->priority == 0) { /* held */ + if ((job_ptr->state_reason != WAIT_HELD) && + (job_ptr->state_reason != WAIT_HELD_USER)) { + job_ptr->state_reason = WAIT_HELD; + xfree(job_ptr->state_desc); + } + debug3("sched: JobId=%u. State=%s. Reason=%s. Priority=%u.", + job_ptr->job_id, + job_state_string(job_ptr->job_state), + job_reason_string(job_ptr->state_reason), + job_ptr->priority); + return false; + } + + if (!job_indepen && + ((job_ptr->state_reason == WAIT_HELD) || + (job_ptr->state_reason == WAIT_HELD_USER))) { + /* released behind active dependency? */ + job_ptr->state_reason = WAIT_DEPENDENCY; + xfree(job_ptr->state_desc); + } + + if (!job_indepen) /* can not run now */ + return false; + return true; +} + +/* Job and partition tests for ability to run now */ +static bool _job_runnable_test2(struct job_record *job_ptr) +{ + if (!part_policy_job_runnable_state(job_ptr)) { + if (job_limits_check(&job_ptr) == WAIT_NO_REASON) { + job_ptr->state_reason = WAIT_NO_REASON; + xfree(job_ptr->state_desc); + } else { + return false; + } + } + return true; +} + /* * build_job_queue - build (non-priority ordered) list of pending jobs * IN clear_start - if set then clear the start_time for pending jobs @@ -158,8 +214,6 @@ extern List build_job_queue(bool clear_start) ListIterator job_iterator, part_iterator; struct job_record *job_ptr = NULL; struct part_record *part_ptr; - bool job_is_pending; - bool job_indepen = false; job_queue = list_create(_job_queue_rec_del); if (job_queue == NULL) @@ -168,37 +222,9 @@ extern List build_job_queue(bool clear_start) if (job_iterator == NULL) fatal("list_iterator_create memory allocation failure"); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { - xassert (job_ptr->magic == JOB_MAGIC); - job_is_pending = IS_JOB_PENDING(job_ptr); - if (!job_is_pending || IS_JOB_COMPLETING(job_ptr)) - continue; - /* ensure dependency shows current values behind a hold */ - job_indepen = job_independent(job_ptr, 0); - if (job_is_pending && clear_start) - job_ptr->start_time = (time_t) 0; - if (job_ptr->priority == 0) { /* held */ - if ((job_ptr->state_reason != WAIT_HELD) && - (job_ptr->state_reason != WAIT_HELD_USER)) { - job_ptr->state_reason = WAIT_HELD; - xfree(job_ptr->state_desc); - } - debug3("sched: JobId=%u. State=%s. Reason=%s. " - "Priority=%u.", - job_ptr->job_id, - job_state_string(job_ptr->job_state), - job_reason_string(job_ptr->state_reason), - job_ptr->priority); + if (!_job_runnable_test1(job_ptr, clear_start)) continue; - } else if (!job_indepen && - ((job_ptr->state_reason == WAIT_HELD) || - (job_ptr->state_reason == WAIT_HELD_USER))) { - /* released behind active dependency? */ - job_ptr->state_reason = WAIT_DEPENDENCY; - xfree(job_ptr->state_desc); - } - if (!job_indepen) /* can not run now */ - continue; if (job_ptr->part_ptr_list) { part_iterator = list_iterator_create(job_ptr-> part_ptr_list); @@ -227,15 +253,8 @@ extern List build_job_queue(bool clear_start) "part %s", job_ptr->job_id, job_ptr->partition); } - if (!part_policy_job_runnable_state(job_ptr)) { - if (job_limits_check(&job_ptr) == - WAIT_NO_REASON) { - job_ptr->state_reason = WAIT_NO_REASON; - xfree(job_ptr->state_desc); - } else { - continue; - } - } + if (!_job_runnable_test2(job_ptr)) + continue; _job_queue_append(job_queue, job_ptr, job_ptr->part_ptr); } @@ -581,11 +600,12 @@ send_reply: */ extern int schedule(uint32_t job_limit) { + ListIterator job_iterator = NULL, part_iterator = NULL; List job_queue = NULL; int error_code, failed_part_cnt = 0, job_cnt = 0, i; uint32_t job_depth = 0; job_queue_rec_t *job_queue_rec; - struct job_record *job_ptr; + struct job_record *job_ptr = NULL; struct part_record *part_ptr, **failed_parts = NULL; bitstr_t *save_avail_node_bitmap; /* Locks: Read config, write job, write node, read partition */ @@ -692,26 +712,64 @@ extern int schedule(uint32_t job_limit) save_avail_node_bitmap = bit_copy(avail_node_bitmap); debug("sched: Running job scheduler"); - /* NOTE: If a job is submitted to multiple partitions then - * build_job_queue will return a separate record for each - * job:partition pair */ - job_queue = build_job_queue(false); - slurmctld_diag_stats.schedule_queue_len = list_count(job_queue); + /* + * If we are doing FIFO scheduling, use the job records right off the + * job list. + * + * If a job is submitted to multiple partitions then build_job_queue() + * will return a separate record for each job:partition pair. + * + * In both cases, we test each partition associated with the job. + */ + if (fifo_sched) { + slurmctld_diag_stats.schedule_queue_len = list_count(job_list); + job_iterator = list_iterator_create(job_list); + if (job_iterator == NULL) + fatal("list_iterator_create memory allocation failure"); + } else { + job_queue = build_job_queue(false); + slurmctld_diag_stats.schedule_queue_len = list_count(job_queue); + } while (1) { if (fifo_sched) { - /* Eliminates sort for FIFO */ - job_queue_rec = list_pop(job_queue); + if (job_ptr && part_iterator) + goto next_part; + job_ptr = (struct job_record *) list_next(job_iterator); + if (!job_ptr) + break; + if (!_job_runnable_test1(job_ptr, false)) + continue; + if (job_ptr->part_ptr_list) { + part_iterator = list_iterator_create( + job_ptr->part_ptr_list); + if (!part_iterator) + fatal("list_iterator_create: malloc failure"); +next_part: part_ptr = (struct part_record *) + list_next(part_iterator); + if (part_ptr) { + job_ptr->part_ptr = part_ptr; + if (job_limits_check(&job_ptr) != + WAIT_NO_REASON) + continue; + } else { + list_iterator_destroy(part_iterator); + part_iterator = NULL; + continue; + } + } else { + if (!_job_runnable_test2(job_ptr)) + continue; + } } else { job_queue_rec = list_pop_bottom(job_queue, sort_job_queue2); + if (!job_queue_rec) + break; + job_ptr = job_queue_rec->job_ptr; + part_ptr = job_queue_rec->part_ptr; + job_ptr->part_ptr = part_ptr; + xfree(job_queue_rec); } - if (!job_queue_rec) - break; - job_ptr = job_queue_rec->job_ptr; - part_ptr = job_queue_rec->part_ptr; - /* Cycle through partitions usable for this job */ - job_ptr->part_ptr = part_ptr; - xfree(job_queue_rec); if ((time(NULL) - sched_start) >= sched_timeout) { debug("sched: loop taking too long, breaking out"); break; @@ -941,7 +999,14 @@ extern int schedule(uint32_t job_limit) FREE_NULL_BITMAP(avail_node_bitmap); avail_node_bitmap = save_avail_node_bitmap; xfree(failed_parts); - list_destroy(job_queue); + if (fifo_sched) { + if (job_iterator) + list_iterator_destroy(job_iterator); + if (part_iterator) + list_iterator_destroy(part_iterator); + } else { + FREE_NULL_LIST(job_queue); + } unlock_slurmctld(job_write_lock); END_TIMER2("schedule"); -- GitLab From b2ddc92c84ce21b60d9bccb7f7044b7dadae8af6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 09:07:01 -0700 Subject: [PATCH 277/614] Fix bug in new schedule() logic for jobs having >1 partition --- src/slurmctld/job_scheduler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index d08f3948c6..cfeaeb0cd5 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -732,7 +732,8 @@ extern int schedule(uint32_t job_limit) } while (1) { if (fifo_sched) { - if (job_ptr && part_iterator) + if (job_ptr && part_iterator && + IS_JOB_PENDING(job_ptr))/* started in other part */ goto next_part; job_ptr = (struct job_record *) list_next(job_iterator); if (!job_ptr) @@ -769,6 +770,8 @@ next_part: part_ptr = (struct part_record *) part_ptr = job_queue_rec->part_ptr; job_ptr->part_ptr = part_ptr; xfree(job_queue_rec); + if (!IS_JOB_PENDING(job_ptr)) + continue; /* started in other partition */ } if ((time(NULL) - sched_start) >= sched_timeout) { debug("sched: loop taking too long, breaking out"); @@ -782,9 +785,6 @@ next_part: part_ptr = (struct part_record *) slurmctld_diag_stats.schedule_cycle_depth++; - if (!IS_JOB_PENDING(job_ptr)) - continue; /* started in other partition */ - /* Test for valid account, QOS and required nodes on each pass */ if (job_ptr->state_reason == FAIL_ACCOUNT) { slurmdb_association_rec_t assoc_rec; -- GitLab From 5fe8c10f55982cd72806d678b5af403599193817 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 22 May 2012 10:07:51 -0700 Subject: [PATCH 278/614] Fix DefMemPerCPU for partition definitions --- NEWS | 1 + src/common/read_config.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index ebfbd12763..4f7b318709 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.3.6 ======================== + -- Fix DefMemPerCPU for partition definitions. * Changes in SLURM 2.3.5 ======================== diff --git a/src/common/read_config.c b/src/common/read_config.c index 67742952c7..aacd6ffa06 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -865,7 +865,7 @@ static int _parse_partitionname(void **dest, slurm_parser_enum_t type, s_p_get_uint32(&p->def_mem_per_cpu, "DefMemPerCPU", dflt)) { p->def_mem_per_cpu |= MEM_PER_CPU; - } { + } else { p->def_mem_per_cpu = 0; } } -- GitLab From e735c74fcbd20daf5c5c8d5a8a86daeed6959d48 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 10:15:34 -0700 Subject: [PATCH 279/614] Add support for jobs in >1 partition to replace_batch_job() --- src/slurmctld/job_scheduler.c | 46 ++++++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 9 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index cfeaeb0cd5..dbc95eb325 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -396,9 +396,10 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) /* Locks: Read config, write job, write node, read partition */ slurmctld_lock_t job_write_lock = { READ_LOCK, WRITE_LOCK, WRITE_LOCK, READ_LOCK }; - struct job_record *job_ptr; + struct job_record *job_ptr = NULL; struct job_record *fini_job_ptr = (struct job_record *) fini_job; - ListIterator job_iterator; + struct part_record *part_ptr; + ListIterator job_iterator = NULL, part_iterator = NULL; batch_job_launch_msg_t *launch_msg = NULL; bitstr_t *orig_exc_bitmap = NULL; bool have_node_bitmaps, pending_jobs = false; @@ -427,7 +428,20 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) job_iterator = list_iterator_create(job_list); if (job_iterator == NULL) fatal("list_iterator_create memory allocation failure"); - while ((job_ptr = (struct job_record *) list_next(job_iterator))) { + while (1) { + if (job_ptr && part_iterator) + goto next_part; + + job_ptr = (struct job_record *) list_next(job_iterator); + if (!job_ptr) + break; + + if (job_ptr == fini_job_ptr) + continue; + + if (job_ptr->priority == 0) + continue; + if (!IS_JOB_PENDING(job_ptr)) { if (IS_JOB_FINISHED(job_ptr) && (job_ptr != fini_job_ptr) && @@ -445,16 +459,26 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) continue; } - if (job_ptr == fini_job_ptr) - continue; - - if (job_ptr->priority == 0) - continue; - /* Tests dependencies, begin time and reservations */ if (!job_independent(job_ptr, 0)) continue; + if (job_ptr->part_ptr_list) { + part_iterator = list_iterator_create(job_ptr-> + part_ptr_list); + if (!part_iterator) + fatal("list_iterator_create: malloc failure"); +next_part: part_ptr = (struct part_record *) + list_next(part_iterator); + if (part_ptr) { + job_ptr->part_ptr = part_ptr; + } else { + list_iterator_destroy(part_iterator); + part_iterator = NULL; + continue; + } + } + /* Test for valid account, QOS and required nodes on each pass */ if (job_ptr->state_reason == FAIL_ACCOUNT) { slurmdb_association_rec_t assoc_rec; @@ -567,6 +591,10 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) break; } unlock_slurmctld(job_write_lock); + if (job_iterator) + list_iterator_destroy(job_iterator); + if (part_iterator) + list_iterator_destroy(part_iterator); send_reply: if (launch_msg) { -- GitLab From 246e22f0421e8555b2ec9c35cdc3afc120d46ce7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 10:43:24 -0700 Subject: [PATCH 280/614] Move job request validation outside of locks for better parallelism --- src/slurmctld/job_mgr.c | 7 +------ src/slurmctld/proc_req.c | 6 ++++++ src/slurmctld/slurmctld.h | 5 +++++ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index a35b3c4d61..ebdec3b7ac 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -186,7 +186,6 @@ static void _signal_job(struct job_record *job_ptr, int signal); static void _suspend_job(struct job_record *job_ptr, uint16_t op); static int _suspend_job_nodes(struct job_record *job_ptr, bool indf_susp); static bool _top_priority(struct job_record *job_ptr); -static int _validate_job_create_req(job_desc_msg_t * job_desc); static int _validate_job_desc(job_desc_msg_t * job_desc_msg, int allocate, uid_t submit_uid, struct part_record *part_ptr); static void _validate_job_files(List batch_dirs); @@ -4134,9 +4133,6 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, goto cleanup_fail; } - if ((error_code =_validate_job_create_req(job_desc))) - goto cleanup; - if ((error_code = _copy_job_desc_to_job_record(job_desc, job_pptr, &req_bitmap, @@ -4242,7 +4238,6 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, xfree(job_ptr->state_desc); } -cleanup: FREE_NULL_LIST(license_list); FREE_NULL_BITMAP(req_bitmap); FREE_NULL_BITMAP(exc_bitmap); @@ -4281,7 +4276,7 @@ static int _test_strlen(char *test_str, char *str_name, int max_str_len) /* Perform some size checks on strings we store to prevent * malicious user filling slurmctld's memory * RET 0 or error code */ -static int _validate_job_create_req(job_desc_msg_t * job_desc) +extern int validate_job_create_req(job_desc_msg_t * job_desc) { if (_test_strlen(job_desc->account, "account", 1024) || _test_strlen(job_desc->alloc_node, "alloc_node", 1024) || diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index ed1aafb9fb..15beb857f1 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -793,6 +793,8 @@ static void _slurm_rpc_allocate_resources(slurm_msg_t * msg) error("REQUEST_RESOURCE_ALLOCATE lacks alloc_node from uid=%d", uid); } + if (error_code == SLURM_SUCCESS) + error_code = validate_job_create_req(job_desc_msg); #if HAVE_CRAY /* * Catch attempts to nest salloc sessions. It is not possible to use an @@ -1826,6 +1828,8 @@ static void _slurm_rpc_job_will_run(slurm_msg_t * msg) error_code = ESLURM_INVALID_NODE_NAME; error("REQUEST_JOB_WILL_RUN lacks alloc_node from uid=%d", uid); } + if (error_code == SLURM_SUCCESS) + error_code = validate_job_create_req(job_desc_msg); slurm_get_peer_addr(msg->conn_fd, &resp_addr); job_desc_msg->resp_host = xmalloc(16); slurm_get_ip_str(&resp_addr, &port, job_desc_msg->resp_host, 16); @@ -2559,6 +2563,8 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) error_code = ESLURM_INVALID_NODE_NAME; error("REQUEST_SUBMIT_BATCH_JOB lacks alloc_node from uid=%d", uid); } + if (error_code == SLURM_SUCCESS) + error_code = validate_job_create_req(job_desc_msg); dump_job_desc(job_desc_msg); if (error_code == SLURM_SUCCESS) { lock_slurmctld(job_write_lock); diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 1a263403d7..3917a59ccf 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -1820,6 +1820,11 @@ extern int validate_alloc_node(struct part_record *part_ptr, char* alloc_node); */ extern int validate_group (struct part_record *part_ptr, uid_t run_uid); +/* Perform some size checks on strings we store to prevent + * malicious user filling slurmctld's memory + * RET 0 or error code */ +extern int validate_job_create_req(job_desc_msg_t * job_desc); + /* * validate_jobs_on_node - validate that any jobs that should be on the node * are actually running, if not clean up the job records and/or node -- GitLab From a96ea2d89fc6155ababfafb8d82cba760f310349 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 22 May 2012 13:06:42 -0700 Subject: [PATCH 281/614] make test executable --- testsuite/expect/test1.95 | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 testsuite/expect/test1.95 diff --git a/testsuite/expect/test1.95 b/testsuite/expect/test1.95 old mode 100644 new mode 100755 -- GitLab From e6a0ed5cac30a55a4499ab38adf64ee8870a07f4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 22 May 2012 13:48:54 -0700 Subject: [PATCH 282/614] Fix to test1.22 to work again --- testsuite/expect/test1.22 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/expect/test1.22 b/testsuite/expect/test1.22 index 46ae48d8e0..1e0ba57526 100755 --- a/testsuite/expect/test1.22 +++ b/testsuite/expect/test1.22 @@ -91,7 +91,7 @@ if {[string compare $host_0 ""] == 0} { # set host_0 "" set timeout $max_job_delay -set srun_pid [spawn $srun -N$node_cnt -n$task_num -l --threads=32 -t1 $bin_printenv SLURMD_NODENAME] +set srun_pid [spawn $srun -N$node_cnt -n$task_num -O -l --threads=$task_num -t1 $bin_printenv SLURMD_NODENAME] expect { -re "Memory required by task is not available" { send_user "\nWARNING: DefMemPerTask is configured too high for this test\n" -- GitLab From d997ad8fa2b1d46738cbee1c0beb56ff2b6164ce Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 14:03:48 -0700 Subject: [PATCH 283/614] Change MinJobAge min value from 5 to 2 --- doc/man/man5/slurm.conf.5 | 2 +- src/common/read_config.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 103cf3b5c5..ea4660989c 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -820,7 +820,7 @@ SLURM's active database. Set the values of \fBMaxJobCount\fR and its memory or other resources. The default value is 300 seconds. A value of zero prevents any job record purging. In order to eliminate some possible race conditions, the minimum non\-zero -value for \fBMinJobAge\fR recommended is 5. +value for \fBMinJobAge\fR recommended is 2. May not exceed 65533. .TP diff --git a/src/common/read_config.c b/src/common/read_config.c index b6899f278b..6197ce7037 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -2610,9 +2610,9 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) if (!s_p_get_uint16(&conf->min_job_age, "MinJobAge", hashtbl)) conf->min_job_age = DEFAULT_MIN_JOB_AGE; - else if (conf->min_job_age < 5) { - info("WARNING: MinJobAge must be at least 5"); - conf->min_job_age = 5; + else if (conf->min_job_age < 2) { + info("WARNING: MinJobAge must be at least 2"); + conf->min_job_age = 2; } if (!s_p_get_string(&conf->mpi_default, "MpiDefault", hashtbl)) -- GitLab From 4dea9129d7f8a073900ac71a7ce749f40494d860 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 22 May 2012 14:11:51 -0700 Subject: [PATCH 284/614] handle various issues not previously covered with new launch type plugin --- src/api/config_info.c | 5 + src/common/read_config.c | 2 + src/common/slurm_protocol_pack.c | 482 ++++++++++++++++++++++++++++++- src/slurmctld/proc_req.c | 1 + 4 files changed, 488 insertions(+), 2 deletions(-) diff --git a/src/api/config_info.c b/src/api/config_info.c index 6ab4bc8f48..db389bf447 100644 --- a/src/api/config_info.c +++ b/src/api/config_info.c @@ -489,6 +489,11 @@ extern void *slurm_ctl_conf_2_key_pairs (slurm_ctl_conf_t* slurm_ctl_conf_ptr) key_pair->value = xstrdup(tmp_str); list_append(ret_list, key_pair); + key_pair = xmalloc(sizeof(config_key_pair_t)); + key_pair->name = xstrdup("LaunchType"); + key_pair->value = xstrdup(slurm_ctl_conf_ptr->launch_type); + list_append(ret_list, key_pair); + key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("Licenses"); key_pair->value = xstrdup(slurm_ctl_conf_ptr->licenses); diff --git a/src/common/read_config.c b/src/common/read_config.c index b6899f278b..afa68698b6 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1837,6 +1837,7 @@ free_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr, bool purge_node_hash) xfree (ctl_conf_ptr->job_credential_private_key); xfree (ctl_conf_ptr->job_credential_public_certificate); xfree (ctl_conf_ptr->job_submit_plugins); + xfree (ctl_conf_ptr->launch_type); xfree (ctl_conf_ptr->licenses); xfree (ctl_conf_ptr->mail_prog); xfree (ctl_conf_ptr->mpi_default); @@ -1945,6 +1946,7 @@ init_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr) ctl_conf_ptr->job_requeue = (uint16_t) NO_VAL; xfree(ctl_conf_ptr->job_submit_plugins); ctl_conf_ptr->kill_wait = (uint16_t) NO_VAL; + xfree (ctl_conf_ptr->launch_type); xfree (ctl_conf_ptr->licenses); xfree (ctl_conf_ptr->mail_prog); ctl_conf_ptr->max_job_cnt = (uint32_t) NO_VAL; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index e535fe19d4..2e24866023 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -4530,7 +4530,208 @@ _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer, uint16_t uint16_tmp; uint32_t cluster_flags = slurmdb_setup_cluster_flags(); - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack_time(build_ptr->last_update, buffer); + + pack16(build_ptr->accounting_storage_enforce, buffer); + packstr(build_ptr->accounting_storage_backup_host, buffer); + packstr(build_ptr->accounting_storage_host, buffer); + packstr(build_ptr->accounting_storage_loc, buffer); + pack32(build_ptr->accounting_storage_port, buffer); + packstr(build_ptr->accounting_storage_type, buffer); + packstr(build_ptr->accounting_storage_user, buffer); + pack16(build_ptr->acctng_store_job_comment, buffer); + + packstr(build_ptr->authtype, buffer); + + packstr(build_ptr->backup_addr, buffer); + packstr(build_ptr->backup_controller, buffer); + pack16(build_ptr->batch_start_timeout, buffer); + pack_time(build_ptr->boot_time, buffer); + + packstr(build_ptr->checkpoint_type, buffer); + packstr(build_ptr->cluster_name, buffer); + pack16(build_ptr->complete_wait, buffer); + packstr(build_ptr->control_addr, buffer); + packstr(build_ptr->control_machine, buffer); + packstr(build_ptr->crypto_type, buffer); + + pack32(build_ptr->def_mem_per_cpu, buffer); + pack32(build_ptr->debug_flags, buffer); + pack16(build_ptr->disable_root_jobs, buffer); + + pack16(build_ptr->enforce_part_limits, buffer); + packstr(build_ptr->epilog, buffer); + pack32(build_ptr->epilog_msg_time, buffer); + packstr(build_ptr->epilog_slurmctld, buffer); + + pack16(build_ptr->fast_schedule, buffer); + pack32(build_ptr->first_job_id, buffer); + + pack16(build_ptr->get_env_timeout, buffer); + packstr(build_ptr->gres_plugins, buffer); + pack16(build_ptr->group_info, buffer); + + pack32(build_ptr->hash_val, buffer); + + pack16(build_ptr->health_check_interval, buffer); + packstr(build_ptr->health_check_program, buffer); + + pack16(build_ptr->inactive_limit, buffer); + + pack16(build_ptr->job_acct_gather_freq, buffer); + packstr(build_ptr->job_acct_gather_type, buffer); + + packstr(build_ptr->job_ckpt_dir, buffer); + + packstr(build_ptr->job_comp_host, buffer); + packstr(build_ptr->job_comp_loc, buffer); + pack32((uint32_t)build_ptr->job_comp_port, buffer); + packstr(build_ptr->job_comp_type, buffer); + packstr(build_ptr->job_comp_user, buffer); + + packstr(build_ptr->job_credential_private_key, buffer); + packstr(build_ptr->job_credential_public_certificate, buffer); + pack16(build_ptr->job_file_append, buffer); + pack16(build_ptr->job_requeue, buffer); + packstr(build_ptr->job_submit_plugins, buffer); + + pack16(build_ptr->kill_on_bad_exit, buffer); + pack16(build_ptr->kill_wait, buffer); + + packstr(build_ptr->launch_type, buffer); + packstr(build_ptr->licenses, buffer); + + packstr(build_ptr->mail_prog, buffer); + pack32(build_ptr->max_job_cnt, buffer); + pack32(build_ptr->max_job_id, buffer); + pack32(build_ptr->max_mem_per_cpu, buffer); + pack32(build_ptr->max_step_cnt, buffer); + pack16(build_ptr->max_tasks_per_node, buffer); + pack16(build_ptr->min_job_age, buffer); + packstr(build_ptr->mpi_default, buffer); + packstr(build_ptr->mpi_params, buffer); + pack16(build_ptr->msg_timeout, buffer); + + pack32(build_ptr->next_job_id, buffer); + packstr(build_ptr->node_prefix, buffer); + + pack16(build_ptr->over_time_limit, buffer); + + packstr(build_ptr->plugindir, buffer); + packstr(build_ptr->plugstack, buffer); + pack16(build_ptr->preempt_mode, buffer); + packstr(build_ptr->preempt_type, buffer); + + pack32(build_ptr->priority_decay_hl, buffer); + pack32(build_ptr->priority_calc_period, buffer); + pack16(build_ptr->priority_favor_small, buffer); + pack16(build_ptr->priority_flags, buffer); + pack32(build_ptr->priority_max_age, buffer); + pack16(build_ptr->priority_reset_period, buffer); + packstr(build_ptr->priority_type, buffer); + pack32(build_ptr->priority_weight_age, buffer); + pack32(build_ptr->priority_weight_fs, buffer); + pack32(build_ptr->priority_weight_js, buffer); + pack32(build_ptr->priority_weight_part, buffer); + pack32(build_ptr->priority_weight_qos, buffer); + + pack16(build_ptr->private_data, buffer); + packstr(build_ptr->proctrack_type, buffer); + packstr(build_ptr->prolog, buffer); + packstr(build_ptr->prolog_slurmctld, buffer); + pack16(build_ptr->propagate_prio_process, buffer); + packstr(build_ptr->propagate_rlimits, buffer); + packstr(build_ptr->propagate_rlimits_except, buffer); + + packstr(build_ptr->reboot_program, buffer); + pack16(build_ptr->reconfig_flags, buffer); + packstr(build_ptr->resume_program, buffer); + pack16(build_ptr->resume_rate, buffer); + pack16(build_ptr->resume_timeout, buffer); + pack16(build_ptr->resv_over_run, buffer); + pack16(build_ptr->ret2service, buffer); + + packstr(build_ptr->salloc_default_command, buffer); + packstr(build_ptr->sched_params, buffer); + pack16(build_ptr->schedport, buffer); + pack16(build_ptr->schedrootfltr, buffer); + packstr(build_ptr->sched_logfile, buffer); + pack16(build_ptr->sched_log_level, buffer); + pack16(build_ptr->sched_time_slice, buffer); + packstr(build_ptr->schedtype, buffer); + packstr(build_ptr->select_type, buffer); + if(build_ptr->select_conf_key_pairs) + count = list_count(build_ptr->select_conf_key_pairs); + + pack32(count, buffer); + if (count && count != NO_VAL) { + ListIterator itr = list_iterator_create( + (List)build_ptr->select_conf_key_pairs); + config_key_pair_t *key_pair = NULL; + while ((key_pair = list_next(itr))) { + pack_config_key_pair(key_pair, + protocol_version, buffer); + } + list_iterator_destroy(itr); + } + count = NO_VAL; + + pack16(build_ptr->select_type_param, buffer); + + packstr(build_ptr->slurm_conf, buffer); + pack32(build_ptr->slurm_user_id, buffer); + packstr(build_ptr->slurm_user_name, buffer); + pack32(build_ptr->slurmd_user_id, buffer); + packstr(build_ptr->slurmd_user_name, buffer); + + pack16(build_ptr->slurmctld_debug, buffer); + packstr(build_ptr->slurmctld_logfile, buffer); + packstr(build_ptr->slurmctld_pidfile, buffer); + pack32(build_ptr->slurmctld_port, buffer); + pack16(build_ptr->slurmctld_port_count, buffer); + pack16(build_ptr->slurmctld_timeout, buffer); + + pack16(build_ptr->slurmd_debug, buffer); + packstr(build_ptr->slurmd_logfile, buffer); + packstr(build_ptr->slurmd_pidfile, buffer); + if (!(cluster_flags & CLUSTER_FLAG_MULTSD)) + pack32(build_ptr->slurmd_port, buffer); + + packstr(build_ptr->slurmd_spooldir, buffer); + pack16(build_ptr->slurmd_timeout, buffer); + packstr(build_ptr->srun_epilog, buffer); + packstr(build_ptr->srun_prolog, buffer); + packstr(build_ptr->state_save_location, buffer); + packstr(build_ptr->suspend_exc_nodes, buffer); + packstr(build_ptr->suspend_exc_parts, buffer); + packstr(build_ptr->suspend_program, buffer); + pack16(build_ptr->suspend_rate, buffer); + pack32(build_ptr->suspend_time, buffer); + pack16(build_ptr->suspend_timeout, buffer); + packstr(build_ptr->switch_type, buffer); + + packstr(build_ptr->task_epilog, buffer); + packstr(build_ptr->task_prolog, buffer); + packstr(build_ptr->task_plugin, buffer); + pack16(build_ptr->task_plugin_param, buffer); + packstr(build_ptr->tmp_fs, buffer); + packstr(build_ptr->topology_plugin, buffer); + pack16(build_ptr->track_wckey, buffer); + pack16(build_ptr->tree_width, buffer); + + pack16(build_ptr->use_pam, buffer); + packstr(build_ptr->unkillable_program, buffer); + pack16(build_ptr->unkillable_timeout, buffer); + packstr(build_ptr->version, buffer); + pack16(build_ptr->vsize_factor, buffer); + + pack16(build_ptr->wait_time, buffer); + + pack16(build_ptr->z_16, buffer); + pack32(build_ptr->z_32, buffer); + packstr(build_ptr->z_char, buffer); + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { pack_time(build_ptr->last_update, buffer); pack16(build_ptr->accounting_storage_enforce, buffer); @@ -5334,7 +5535,284 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **build_buffer_ptr, build_ptr->hash_val = NO_VAL; /* load the data values */ - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + /* unpack timestamp of snapshot */ + safe_unpack_time(&build_ptr->last_update, buffer); + + safe_unpack16(&build_ptr->accounting_storage_enforce, buffer); + safe_unpackstr_xmalloc( + &build_ptr->accounting_storage_backup_host, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->accounting_storage_host, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->accounting_storage_loc, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->accounting_storage_port, buffer); + safe_unpackstr_xmalloc(&build_ptr->accounting_storage_type, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->accounting_storage_user, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->acctng_store_job_comment, buffer); + + safe_unpackstr_xmalloc(&build_ptr->authtype, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->backup_addr, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->backup_controller, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->batch_start_timeout, buffer); + safe_unpack_time(&build_ptr->boot_time, buffer); + + safe_unpackstr_xmalloc(&build_ptr->checkpoint_type, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->cluster_name, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->complete_wait, buffer); + safe_unpackstr_xmalloc(&build_ptr->control_addr, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->control_machine, + &uint32_tmp,buffer); + safe_unpackstr_xmalloc(&build_ptr->crypto_type, &uint32_tmp, + buffer); + + safe_unpack32(&build_ptr->def_mem_per_cpu, buffer); + safe_unpack32(&build_ptr->debug_flags, buffer); + safe_unpack16(&build_ptr->disable_root_jobs, buffer); + + safe_unpack16(&build_ptr->enforce_part_limits, buffer); + safe_unpackstr_xmalloc(&build_ptr->epilog, &uint32_tmp, + buffer); + safe_unpack32(&build_ptr->epilog_msg_time, buffer); + safe_unpackstr_xmalloc(&build_ptr->epilog_slurmctld, + &uint32_tmp, buffer); + + safe_unpack16(&build_ptr->fast_schedule, buffer); + safe_unpack32(&build_ptr->first_job_id, buffer); + + safe_unpack16(&build_ptr->get_env_timeout, buffer); + safe_unpackstr_xmalloc(&build_ptr->gres_plugins, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->group_info, buffer); + + safe_unpack32(&build_ptr->hash_val, buffer); + + safe_unpack16(&build_ptr->health_check_interval, buffer); + safe_unpackstr_xmalloc(&build_ptr->health_check_program, + &uint32_tmp, buffer); + + safe_unpack16(&build_ptr->inactive_limit, buffer); + + safe_unpack16(&build_ptr->job_acct_gather_freq, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_acct_gather_type, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->job_ckpt_dir, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->job_comp_host, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_loc, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->job_comp_port, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_type, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_comp_user, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->job_credential_private_key, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr-> + job_credential_public_certificate, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->job_file_append, buffer); + safe_unpack16(&build_ptr->job_requeue, buffer); + safe_unpackstr_xmalloc(&build_ptr->job_submit_plugins, + &uint32_tmp, buffer); + + safe_unpack16(&build_ptr->kill_on_bad_exit, buffer); + safe_unpack16(&build_ptr->kill_wait, buffer); + + safe_unpackstr_xmalloc(&build_ptr->launch_type, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->licenses, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->mail_prog, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->max_job_cnt, buffer); + safe_unpack32(&build_ptr->max_job_id, buffer); + safe_unpack32(&build_ptr->max_mem_per_cpu, buffer); + safe_unpack32(&build_ptr->max_step_cnt, buffer); + safe_unpack16(&build_ptr->max_tasks_per_node, buffer); + safe_unpack16(&build_ptr->min_job_age, buffer); + safe_unpackstr_xmalloc(&build_ptr->mpi_default, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->mpi_params, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->msg_timeout, buffer); + + safe_unpack32(&build_ptr->next_job_id, buffer); + safe_unpackstr_xmalloc(&build_ptr->node_prefix, + &uint32_tmp, buffer); + + safe_unpack16(&build_ptr->over_time_limit, buffer); + + safe_unpackstr_xmalloc(&build_ptr->plugindir, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->plugstack, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->preempt_mode, buffer); + safe_unpackstr_xmalloc(&build_ptr->preempt_type, + &uint32_tmp, buffer); + + safe_unpack32(&build_ptr->priority_decay_hl, buffer); + safe_unpack32(&build_ptr->priority_calc_period, buffer); + safe_unpack16(&build_ptr->priority_favor_small, buffer); + safe_unpack16(&build_ptr->priority_flags, buffer); + safe_unpack32(&build_ptr->priority_max_age, buffer); + safe_unpack16(&build_ptr->priority_reset_period, buffer); + safe_unpackstr_xmalloc(&build_ptr->priority_type, &uint32_tmp, + buffer); + safe_unpack32(&build_ptr->priority_weight_age, buffer); + safe_unpack32(&build_ptr->priority_weight_fs, buffer); + safe_unpack32(&build_ptr->priority_weight_js, buffer); + safe_unpack32(&build_ptr->priority_weight_part, buffer); + safe_unpack32(&build_ptr->priority_weight_qos, buffer); + + safe_unpack16(&build_ptr->private_data, buffer); + safe_unpackstr_xmalloc(&build_ptr->proctrack_type, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&build_ptr->prolog, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&build_ptr->prolog_slurmctld, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->propagate_prio_process, buffer); + safe_unpackstr_xmalloc(&build_ptr->propagate_rlimits, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->propagate_rlimits_except, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->reboot_program, &uint32_tmp, + buffer); + safe_unpack16(&build_ptr->reconfig_flags, buffer); + safe_unpackstr_xmalloc(&build_ptr->resume_program, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->resume_rate, buffer); + safe_unpack16(&build_ptr->resume_timeout, buffer); + safe_unpack16(&build_ptr->resv_over_run, buffer); + safe_unpack16(&build_ptr->ret2service, buffer); + + safe_unpackstr_xmalloc(&build_ptr->salloc_default_command, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->sched_params, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->schedport, buffer); + safe_unpack16(&build_ptr->schedrootfltr, buffer); + safe_unpackstr_xmalloc(&build_ptr->sched_logfile, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->sched_log_level, buffer); + safe_unpack16(&build_ptr->sched_time_slice, buffer); + safe_unpackstr_xmalloc(&build_ptr->schedtype, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->select_type, + &uint32_tmp, buffer); + safe_unpack32(&count, buffer); + if (count != NO_VAL) { + List tmp_list = list_create(destroy_config_key_pair); + config_key_pair_t *object = NULL; + int i; + for (i=0; iselect_conf_key_pairs = (void *)tmp_list; + } + + safe_unpack16(&build_ptr->select_type_param, buffer); + + safe_unpackstr_xmalloc(&build_ptr->slurm_conf, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->slurm_user_id, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurm_user_name, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->slurmd_user_id, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurmd_user_name, + &uint32_tmp, buffer); + + safe_unpack16(&build_ptr->slurmctld_debug, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurmctld_logfile, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurmctld_pidfile, + &uint32_tmp, buffer); + safe_unpack32(&build_ptr->slurmctld_port, buffer); + safe_unpack16(&build_ptr->slurmctld_port_count, buffer); + safe_unpack16(&build_ptr->slurmctld_timeout, buffer); + + safe_unpack16(&build_ptr->slurmd_debug, buffer); + safe_unpackstr_xmalloc(&build_ptr->slurmd_logfile, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&build_ptr->slurmd_pidfile, &uint32_tmp, + buffer); + if (!(cluster_flags & CLUSTER_FLAG_MULTSD)) + safe_unpack32(&build_ptr->slurmd_port, buffer); + + safe_unpackstr_xmalloc(&build_ptr->slurmd_spooldir, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->slurmd_timeout, buffer); + + safe_unpackstr_xmalloc(&build_ptr->srun_epilog, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->srun_prolog, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->state_save_location, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->suspend_exc_nodes, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->suspend_exc_parts, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->suspend_program, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->suspend_rate, buffer); + safe_unpack32(&build_ptr->suspend_time, buffer); + safe_unpack16(&build_ptr->suspend_timeout, buffer); + safe_unpackstr_xmalloc(&build_ptr->switch_type, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&build_ptr->task_epilog, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->task_prolog, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->task_plugin, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->task_plugin_param, buffer); + safe_unpackstr_xmalloc(&build_ptr->tmp_fs, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&build_ptr->topology_plugin, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->track_wckey, buffer); + safe_unpack16(&build_ptr->tree_width, buffer); + + safe_unpack16(&build_ptr->use_pam, buffer); + safe_unpackstr_xmalloc(&build_ptr->unkillable_program, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->unkillable_timeout, buffer); + safe_unpackstr_xmalloc(&build_ptr->version, + &uint32_tmp, buffer); + safe_unpack16(&build_ptr->vsize_factor, buffer); + + safe_unpack16(&build_ptr->wait_time, buffer); + + safe_unpack16(&build_ptr->z_16, buffer); + safe_unpack32(&build_ptr->z_32, buffer); + safe_unpackstr_xmalloc(&build_ptr->z_char, &uint32_tmp, + buffer); + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { /* unpack timestamp of snapshot */ safe_unpack_time(&build_ptr->last_update, buffer); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 15beb857f1..e02bf7b0dd 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -528,6 +528,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->kill_wait = conf->kill_wait; conf_ptr->kill_on_bad_exit = conf->kill_on_bad_exit; + conf_ptr->launch_type = xstrdup(conf->launch_type); conf_ptr->licenses = xstrdup(conf->licenses); conf_ptr->mail_prog = xstrdup(conf->mail_prog); -- GitLab From c4d329ee6a1c85b542f16aa06a5f1ac424545b2f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 14:15:13 -0700 Subject: [PATCH 285/614] Cosmetic mods, text allignment --- src/slurmctld/job_scheduler.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index dbc95eb325..fdc8458a6f 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -489,9 +489,9 @@ next_part: part_ptr = (struct part_record *) assoc_rec.uid = job_ptr->user_id; if (!assoc_mgr_fill_in_assoc(acct_db_conn, &assoc_rec, - accounting_enforce, - (slurmdb_association_rec_t **) - &job_ptr->assoc_ptr)) { + accounting_enforce, + (slurmdb_association_rec_t **) + &job_ptr->assoc_ptr)) { job_ptr->state_reason = WAIT_NO_REASON; job_ptr->assoc_id = assoc_rec.id; } else { -- GitLab From ef1dca755b5e2564439de061cef9615e941e3199 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 15:23:01 -0700 Subject: [PATCH 286/614] Add option to print usec clock in slurm logs --- src/common/log.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/common/log.c b/src/common/log.c index 9fdc07702b..23e206693e 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -571,12 +571,17 @@ static char *vxstrfmt(const char *fmt, va_list ap) case 'T': /* "%T" => "dd Mon yyyy hh:mm:ss off" */ xstrftimecat(buf, "%a %d %b %Y %H:%M:%S %z"); break; -#ifdef USE_ISO_8601 - case 'M': /* "%M" => "yyyy-mm-ddThh:mm:ss" */ +#if defined USE_USEC_CLOCK + case 'M': /* "%M" => "usec" */ + snprintf(tmp, sizeof(tmp), "%ld", clock()); + xstrcat(buf, tmp); + break; +#elif defined USE_ISO_8601 + case 'M': /* "%M" => "yyyy-mm-ddThh:mm:ss" */ xstrftimecat(buf, "%Y-%m-%dT%T"); break; #else - case 'M': /* "%M" => "Mon DD hh:mm:ss" */ + case 'M': /* "%M" => "Mon DD hh:mm:ss" */ xstrftimecat(buf, "%b %d %T"); break; #endif -- GitLab From c4277ac71e98c250b2b411a6836750710c571193 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 22 May 2012 15:23:50 -0700 Subject: [PATCH 287/614] Minor tweaks to scheduling calls from slurmctld --- src/slurmctld/proc_req.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index e02bf7b0dd..0e070ce9fb 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -1635,7 +1635,7 @@ static void _slurm_rpc_complete_batch_script(slurm_msg_t * msg) } if (run_sched) - (void) schedule(0); + (void) schedule(0); /* Has own locking */ if (dump_job) (void) schedule_job_save(); /* Has own locking */ if (dump_node) @@ -2672,7 +2672,7 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) response_msg.msg_type = RESPONSE_SUBMIT_BATCH_JOB; response_msg.data = &submit_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); - schedule(0); /* has own locks */ + schedule(2); /* has own locks */ schedule_job_save(); /* has own locks */ schedule_node_save(); /* has own locks */ } -- GitLab From 6bf307e7f19d613fef5f9dca592ebb8482deaa3e Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 22 May 2012 16:15:54 -0700 Subject: [PATCH 288/614] Modified tests to work with select/serial --- testsuite/expect/test2.14 | 26 ++++++++++++++------------ testsuite/expect/test2.15 | 6 ++++-- testsuite/expect/test7.2 | 18 +++++++++++------- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/testsuite/expect/test2.14 b/testsuite/expect/test2.14 index a873739fc5..68f5f52787 100755 --- a/testsuite/expect/test2.14 +++ b/testsuite/expect/test2.14 @@ -39,20 +39,22 @@ set file_in "test$test_id.input" set file_out "test$test_id.output" set file_out2 "test$test_id.output2" set job_id 0 +set node_cnt 2 print_header $test_id if { [test_xcpu] } { send_user "\nWARNING: This test is incompatible with XCPU systems\n" exit 0 -} - -if {[test_front_end]} { +} elseif {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit $exit_code } -set node_cnt 2 + set available [available_nodes [default_partition]] if {$available < $node_cnt} { send_user "\nWARNING: not enough nodes currently available ($available avail, $node_cnt needed)\n" @@ -64,14 +66,14 @@ if {$available < $node_cnt} { # exec $bin_rm -f $file_in $file_out $file_out2 make_bash_script $file_in " -$srun -l $bin_id -$scontrol show job \${SLURM_JOBID} >${file_out2} -$scontrol update JobId=\${SLURM_JOBID} NumNodes=1 -. slurm_job_\${SLURM_JOBID}_resize.sh -$scontrol show job \${SLURM_JOBID} >>${file_out2} -$srun -l $bin_id -$bin_rm -f slurm_job_\${SLURM_JOBID}_resize.csh -$bin_rm -f slurm_job_\${SLURM_JOBID}_resize.sh" + $srun -l $bin_id + $scontrol show job \${SLURM_JOBID} >${file_out2} + $scontrol update JobId=\${SLURM_JOBID} NumNodes=1 + . slurm_job_\${SLURM_JOBID}_resize.sh + $scontrol show job \${SLURM_JOBID} >>${file_out2} + $srun -l $bin_id + $bin_rm -f slurm_job_\${SLURM_JOBID}_resize.csh + $bin_rm -f slurm_job_\${SLURM_JOBID}_resize.sh" # # Run job to determine what nodes are available diff --git a/testsuite/expect/test2.15 b/testsuite/expect/test2.15 index 6631bd3e42..40e4626162 100755 --- a/testsuite/expect/test2.15 +++ b/testsuite/expect/test2.15 @@ -43,10 +43,12 @@ print_header $test_id if { [test_xcpu] } { send_user "\nWARNING: This test is incompatible with XCPU systems\n" exit 0 -} -if {[test_front_end] != 0} { +} elseif {[test_front_end] != 0} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit 0 } set node_cnt 2 diff --git a/testsuite/expect/test7.2 b/testsuite/expect/test7.2 index 49c5e69f0b..cb82bd3a28 100755 --- a/testsuite/expect/test7.2 +++ b/testsuite/expect/test7.2 @@ -94,16 +94,20 @@ if { [test_bluegene] } { set node_cnt 1-1024 set task_cnt 8 } +} elseif {[test_xcpu] } { + set node_cnt 1-1 + set task_cnt 8 + +} elseif {[test_serial]} { + set node_cnt 1 + set task_cnt 1 + } else { - if { [test_xcpu] } { - set node_cnt 1-1 - set task_cnt 8 - } else { - set node_cnt 1-4 - set task_cnt 8 - } + set node_cnt 1-4 + set task_cnt 8 } + # Test uses srun based task launch # Adjust time limits as needed for large task counts */ # times are here vv -- GitLab From 72588ffb7b983837f4c06fc0281e0211fb9d7604 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 08:35:50 -0700 Subject: [PATCH 289/614] Select/serial fix for MaxNodes>1 --- src/plugins/select/serial/select_serial.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 1185898fa3..156bd5be90 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -1563,6 +1563,7 @@ static bool _is_job_spec_serial(struct job_record *job_ptr) if ((details_ptr->min_nodes > 1) && (details_ptr->min_nodes != NO_VAL)) return false; + details_ptr->max_nodes = 1; if ((details_ptr->ntasks_per_node > 1) && (details_ptr->ntasks_per_node != (uint16_t) NO_VAL)) return false; -- GitLab From 88a2e255f884fcb3ec1190dd78cec1fc09946cf8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 09:08:08 -0700 Subject: [PATCH 290/614] Supress error message due to race condition --- src/slurmctld/job_mgr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index ebdec3b7ac..5ef51bd4bc 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8885,7 +8885,13 @@ extern bool job_epilog_complete(uint32_t job_id, char *node_name, if (base_state == NODE_STATE_DOWN) { debug("Epilog complete response for job %u from DOWN " "node %s", job_id, node_name); + } else if (job_ptr->restart_cnt) { + /* Duplicate epilog complete can be due to race + * condition, especially with select/serial */ + debug("Duplicate epilog complete response for job %u", + job_id, node_name); } else { + error("Epilog complete response for non-running job " "%u, slurmctld and slurmd out of sync", job_id); } -- GitLab From 8fe27a72ad4d79d43511d2a26d9139bfbdefe1ff Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 09:17:08 -0700 Subject: [PATCH 291/614] Correction to argument in log message Extra argument in log message introduced earlier today --- src/slurmctld/job_mgr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 5ef51bd4bc..bedf218669 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8889,7 +8889,7 @@ extern bool job_epilog_complete(uint32_t job_id, char *node_name, /* Duplicate epilog complete can be due to race * condition, especially with select/serial */ debug("Duplicate epilog complete response for job %u", - job_id, node_name); + job_id); } else { error("Epilog complete response for non-running job " -- GitLab From 450706d372053dbd5b9940f9af50539b9b53c32d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 09:18:15 -0700 Subject: [PATCH 292/614] Add LicensesUsed to "scontrol show configuration" output Format is "name:used/total" --- NEWS | 2 ++ slurm/slurm.h.in | 1 + src/api/config_info.c | 5 +++++ src/common/read_config.c | 3 ++- src/common/slurm_protocol_pack.c | 4 +++- src/slurmctld/licenses.c | 26 ++++++++++++++++++++++++++ src/slurmctld/licenses.h | 2 ++ src/slurmctld/proc_req.c | 2 ++ 8 files changed, 43 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 5dd54f8bc4..ea1ba83f4f 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,8 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.5.0.pre1 ============================= + -- Add new output to "scontrol show configuration" of LicensesUsed. Output is + "name:used/total" * Changes in SLURM 2.4.0.rc2 ============================= diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 7d48bf53d9..accc7eabaf 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1856,6 +1856,7 @@ typedef struct slurm_ctl_conf { * on job termination */ char *launch_type; /* type of step launcher to use */ char *licenses; /* licenses available on this cluster */ + char *licenses_used; /* licenses used on this cluster */ char *mail_prog; /* pathname of mail program */ uint32_t max_job_cnt; /* maximum number of active jobs */ uint32_t max_job_id; /* maximum job id before using first_job_id */ diff --git a/src/api/config_info.c b/src/api/config_info.c index db389bf447..34ecb8429e 100644 --- a/src/api/config_info.c +++ b/src/api/config_info.c @@ -499,6 +499,11 @@ extern void *slurm_ctl_conf_2_key_pairs (slurm_ctl_conf_t* slurm_ctl_conf_ptr) key_pair->value = xstrdup(slurm_ctl_conf_ptr->licenses); list_append(ret_list, key_pair); + key_pair = xmalloc(sizeof(config_key_pair_t)); + key_pair->name = xstrdup("LicensesUsed"); + key_pair->value = xstrdup(slurm_ctl_conf_ptr->licenses_used); + list_append(ret_list, key_pair); + key_pair = xmalloc(sizeof(config_key_pair_t)); key_pair->name = xstrdup("MailProg"); key_pair->value = xstrdup(slurm_ctl_conf_ptr->mail_prog); diff --git a/src/common/read_config.c b/src/common/read_config.c index cb65e86d33..f3a7dc226d 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1839,6 +1839,7 @@ free_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr, bool purge_node_hash) xfree (ctl_conf_ptr->job_submit_plugins); xfree (ctl_conf_ptr->launch_type); xfree (ctl_conf_ptr->licenses); + xfree (ctl_conf_ptr->licenses_used); xfree (ctl_conf_ptr->mail_prog); xfree (ctl_conf_ptr->mpi_default); xfree (ctl_conf_ptr->mpi_params); @@ -1859,7 +1860,7 @@ free_slurm_conf (slurm_ctl_conf_t *ctl_conf_ptr, bool purge_node_hash) xfree (ctl_conf_ptr->sched_params); xfree (ctl_conf_ptr->schedtype); xfree (ctl_conf_ptr->select_type); - if(ctl_conf_ptr->select_conf_key_pairs) + if (ctl_conf_ptr->select_conf_key_pairs) list_destroy((List)ctl_conf_ptr->select_conf_key_pairs); xfree (ctl_conf_ptr->slurm_conf); xfree (ctl_conf_ptr->slurm_user_name); diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 2e24866023..26aa2e3e6d 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -4601,6 +4601,7 @@ _pack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t * build_ptr, Buf buffer, packstr(build_ptr->launch_type, buffer); packstr(build_ptr->licenses, buffer); + packstr(build_ptr->licenses_used, buffer); packstr(build_ptr->mail_prog, buffer); pack32(build_ptr->max_job_cnt, buffer); @@ -5635,9 +5636,10 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **build_buffer_ptr, safe_unpackstr_xmalloc(&build_ptr->launch_type, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&build_ptr->licenses, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&build_ptr->licenses_used, + &uint32_tmp, buffer); safe_unpackstr_xmalloc(&build_ptr->mail_prog, &uint32_tmp, buffer); diff --git a/src/slurmctld/licenses.c b/src/slurmctld/licenses.c index 53b9e027f0..0daca1f50d 100644 --- a/src/slurmctld/licenses.c +++ b/src/slurmctld/licenses.c @@ -189,6 +189,32 @@ static char * _build_license_string(List license_list) return licenses; } +/* Get string of used license information. Caller must xfree return value */ +extern char *get_licenses_used(void) +{ + char *licenses_used = NULL; + licenses_t *license_entry; + ListIterator iter; + + slurm_mutex_lock(&license_mutex); + if (license_list) { + iter = list_iterator_create(license_list); + if (iter == NULL) + fatal("malloc failure from list_iterator_create"); + while ((license_entry = (licenses_t *) list_next(iter))) { + if (licenses_used) + xstrcat(licenses_used, ","); + xstrfmtcat(licenses_used, "%s:%u/%u", + license_entry->name, license_entry->used, + license_entry->total); + } + list_iterator_destroy(iter); + } + slurm_mutex_unlock(&license_mutex); + + return licenses_used; +} + /* Initialize licenses on this system based upon slurm.conf */ extern int license_init(char *licenses) { diff --git a/src/slurmctld/licenses.h b/src/slurmctld/licenses.h index f8fa9f53a7..1ecdc0c028 100644 --- a/src/slurmctld/licenses.h +++ b/src/slurmctld/licenses.h @@ -50,6 +50,8 @@ typedef struct licenses { extern List license_list; +/* Get string of used license information. Caller must xfree return value */ +extern char *get_licenses_used(void); /* Initialize licenses on this system based upon slurm.conf */ extern int license_init(char *licenses); diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 0e070ce9fb..2faf4bfe98 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -77,6 +77,7 @@ #include "src/slurmctld/front_end.h" #include "src/slurmctld/gang.h" #include "src/slurmctld/job_scheduler.h" +#include "src/slurmctld/licenses.h" #include "src/slurmctld/locks.h" #include "src/slurmctld/proc_req.h" #include "src/slurmctld/read_config.h" @@ -530,6 +531,7 @@ void _fill_ctld_conf(slurm_ctl_conf_t * conf_ptr) conf_ptr->launch_type = xstrdup(conf->launch_type); conf_ptr->licenses = xstrdup(conf->licenses); + conf_ptr->licenses_used = get_licenses_used(); conf_ptr->mail_prog = xstrdup(conf->mail_prog); conf_ptr->max_job_cnt = conf->max_job_cnt; -- GitLab From 2bb281978e6e545431323a8907fe3d89b02cfb06 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 09:48:43 -0700 Subject: [PATCH 293/614] Fix bug in select/serial resource allocation tracking --- src/plugins/select/serial/select_serial.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 156bd5be90..83083ee3b1 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -788,13 +788,14 @@ static int _add_job_to_res(struct job_record *job_ptr, int action) job_ptr->job_id); i_last = -2; } else { - i_last = bit_fls(job->node_bitmap); + i_last = bit_fls(job->node_bitmap); if (i_first != i_last) { error("select/serial: job %u allocated more than one " "node", job_ptr->job_id); } } - for (i = i_first, n = -1; i < i_last; i++) { + + for (i = i_first, n = -1; i <= i_last; i++) { if (!bit_test(job->node_bitmap, i)) continue; n++; @@ -896,6 +897,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, int i, n; List gres_list; + if (select_state_initializing) { /* Ignore job removal until select/cons_res data structures * values are set by select_p_reconfigure() */ @@ -942,7 +944,7 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, if (node_usage[i].alloc_memory < job->memory_allocated[n]) { error("select/serial: node %s memory is " - "under-allocated (%u-%u) for job %u", + "under-allocated (%u<%u) for job %u", node_ptr->name, node_usage[i].alloc_memory, job->memory_allocated[n], -- GitLab From f212ba3c1d79396629d3df2498230c80b7fb8906 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 11:13:53 -0700 Subject: [PATCH 294/614] Fix to create a reservation with licenses and no nodes --- NEWS | 1 + src/slurmctld/reservation.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 4f7b318709..eee2dca62e 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ documents those changes that are of interest to users and admins. * Changes in SLURM 2.3.6 ======================== -- Fix DefMemPerCPU for partition definitions. + -- Fix to create a reservation with licenses and no nodes. * Changes in SLURM 2.3.5 ======================== diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 618455a992..440c278818 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -1306,7 +1306,8 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) rc = ESLURM_NODES_BUSY; goto bad_parse; } - } else if (resv_desc_ptr->node_cnt == NO_VAL) { + } else if ((resv_desc_ptr->node_cnt == NO_VAL) && + ((resv_desc_ptr->flags & RESERVE_FLAG_LIC_ONLY) == 0)) { info("Reservation request lacks node specification"); rc = ESLURM_INVALID_NODE_NAME; goto bad_parse; -- GitLab From 094b4a0cf2fee1394c7cf6fa25045029ade1b073 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 11:50:36 -0700 Subject: [PATCH 295/614] Fix issue with assoc_mgr if a bad state file is given and the database isn't up at the time the slurmctld starts, not running the priority/multifactor plugin, and then the database is started up later. --- NEWS | 3 +++ src/common/assoc_mgr.c | 29 +++++++++++++++++++---------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index eee2dca62e..39aea08aaa 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ documents those changes that are of interest to users and admins. ======================== -- Fix DefMemPerCPU for partition definitions. -- Fix to create a reservation with licenses and no nodes. + -- Fix issue with assoc_mgr if a bad state file is given and the database + isn't up at the time the slurmctld starts, not running the + priority/multifactor plugin, and then the database is started up later. * Changes in SLURM 2.3.5 ======================== diff --git a/src/common/assoc_mgr.c b/src/common/assoc_mgr.c index bced1030b5..69f5f0c16d 100644 --- a/src/common/assoc_mgr.c +++ b/src/common/assoc_mgr.c @@ -1312,11 +1312,13 @@ extern int assoc_mgr_get_user_assocs(void *db_conn, xassert(assoc->uid != NO_VAL); xassert(assoc_list); - if (!assoc_mgr_association_list) { - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ + if (!assoc_mgr_association_list) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; - } if ((!assoc_mgr_association_list || !list_count(assoc_mgr_association_list)) @@ -1359,11 +1361,15 @@ extern int assoc_mgr_fill_in_assoc(void *db_conn, if (assoc_pptr) *assoc_pptr = NULL; - if (!assoc_mgr_association_list) { - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ + if (!assoc_mgr_association_list) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; - } + if ((!assoc_mgr_association_list || !list_count(assoc_mgr_association_list)) && !(enforce & ACCOUNTING_ENFORCE_ASSOCS)) @@ -3160,9 +3166,12 @@ extern int assoc_mgr_validate_assoc_id(void *db_conn, assoc_mgr_lock_t locks = { READ_LOCK, NO_LOCK, NO_LOCK, NO_LOCK, NO_LOCK }; + /* Call assoc_mgr_refresh_lists instead of just getting the + association list because we need qos and user lists before + the association list can be made. + */ if (!assoc_mgr_association_list) - if (_get_assoc_mgr_association_list(db_conn, enforce) - == SLURM_ERROR) + if (assoc_mgr_refresh_lists(db_conn, NULL) == SLURM_ERROR) return SLURM_ERROR; if ((!assoc_mgr_association_list -- GitLab From 30a986f4c600291876f4ec3e3949934512f2cba5 Mon Sep 17 00:00:00 2001 From: Don Lipari Date: Wed, 23 May 2012 13:00:36 -0700 Subject: [PATCH 296/614] Remove duplicate code Phil and I independently found a chunk of duplicate code that can be eliminated with no change to the functionality. This is against the 2.4 branch. Don --- src/slurmctld/job_mgr.c | 37 ++++++++++---------- src/slurmctld/node_scheduler.c | 62 +--------------------------------- 2 files changed, 21 insertions(+), 78 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index ef25f1c9d9..9c7ced181b 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3770,27 +3770,27 @@ extern int job_limits_check(struct job_record **job_pptr) if ((job_min_nodes > part_max_nodes) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_MAX_NODE)))) { - info("Job %u requested too many nodes (%u) of " - "partition %s(MaxNodes %u)", - job_ptr->job_id, job_min_nodes, - part_ptr->name, part_max_nodes); + debug("Job %u requested too many nodes (%u) of " + "partition %s(MaxNodes %u)", + job_ptr->job_id, job_min_nodes, + part_ptr->name, part_max_nodes); fail_reason = WAIT_PART_NODE_LIMIT; } else if ((job_max_nodes != 0) && /* no max_nodes for job */ ((job_max_nodes < part_min_nodes) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_MIN_NODE))))) { - info("Job %u requested too few nodes (%u) of " - "partition %s(MinNodes %u)", - job_ptr->job_id, job_max_nodes, - part_ptr->name, part_min_nodes); + debug("Job %u requested too few nodes (%u) of " + "partition %s(MinNodes %u)", + job_ptr->job_id, job_max_nodes, + part_ptr->name, part_min_nodes); fail_reason = WAIT_PART_NODE_LIMIT; } else if (part_ptr->state_up == PARTITION_DOWN) { - info("Job %u requested down partition %s", - job_ptr->job_id, part_ptr->name); + debug("Job %u requested down partition %s", + job_ptr->job_id, part_ptr->name); fail_reason = WAIT_PART_DOWN; } else if (part_ptr->state_up == PARTITION_INACTIVE) { - info("Job %u requested inactive partition %s", - job_ptr->job_id, part_ptr->name); + debug("Job %u requested inactive partition %s", + job_ptr->job_id, part_ptr->name); fail_reason = WAIT_PART_INACTIVE; } else if ((((job_ptr->time_limit != NO_VAL) && (job_ptr->time_limit > part_ptr->max_time)) || @@ -3798,15 +3798,15 @@ extern int job_limits_check(struct job_record **job_pptr) (job_ptr->time_min > part_ptr->max_time))) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_TIME_LIMIT)))) { - info("Job %u exceeds partition time limit", job_ptr->job_id); + debug("Job %u exceeds partition time limit", job_ptr->job_id); fail_reason = WAIT_PART_TIME_LIMIT; } else if (qos_ptr && assoc_ptr && (qos_ptr->flags & QOS_FLAG_ENFORCE_USAGE_THRES) && (!fuzzy_equal(qos_ptr->usage_thres, NO_VAL))) { - if (!job_ptr->prio_factors) + if (!job_ptr->prio_factors) { job_ptr->prio_factors = xmalloc(sizeof(priority_factors_object_t)); - + } if (!job_ptr->prio_factors->priority_fs) { if (fuzzy_equal(assoc_ptr->usage->usage_efctv, NO_VAL)) priority_g_set_assoc_usage(assoc_ptr); @@ -3816,10 +3816,13 @@ extern int job_limits_check(struct job_record **job_pptr) (long double)assoc_ptr->usage-> shares_norm); } - if (job_ptr->prio_factors->priority_fs < qos_ptr->usage_thres) { - info("Job %u exceeds usage threahold", job_ptr->job_id); + if (job_ptr->prio_factors->priority_fs < qos_ptr->usage_thres){ + debug("Job %u exceeds usage threahold", + job_ptr->job_id); fail_reason = WAIT_QOS_THRES; } + } else if (job_ptr->priority == 0) /* user or administrator hold */ + fail_reason = WAIT_HELD; } return (fail_reason); diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 3fb3fe14de..27dcf2e7c0 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -1226,14 +1226,6 @@ extern int select_nodes(struct job_record *job_ptr, bool test_only, List preemptee_job_list = NULL; slurmdb_association_rec_t *assoc_ptr = NULL; slurmdb_qos_rec_t *qos_ptr = NULL; - uint32_t job_min_nodes, job_max_nodes; - uint32_t part_min_nodes, part_max_nodes; -#ifdef HAVE_BG - static uint16_t cpus_per_node = 0; - if (!cpus_per_node) - select_g_alter_node_cnt(SELECT_GET_NODE_CPU_CNT, - &cpus_per_node); -#endif xassert(job_ptr); xassert(job_ptr->magic == JOB_MAGIC); @@ -1254,60 +1246,8 @@ extern int select_nodes(struct job_record *job_ptr, bool test_only, job_ptr->job_id, job_ptr->partition); } -#ifdef HAVE_BG - job_min_nodes = job_ptr->details->min_cpus / cpus_per_node; - job_max_nodes = job_ptr->details->max_cpus / cpus_per_node; - part_min_nodes = part_ptr->min_nodes_orig; - part_max_nodes = part_ptr->max_nodes_orig; -#else - job_min_nodes = job_ptr->details->min_nodes; - job_max_nodes = job_ptr->details->max_nodes; - part_min_nodes = part_ptr->min_nodes; - part_max_nodes = part_ptr->max_nodes; -#endif /* Confirm that partition is up and has compatible nodes limits */ - fail_reason = WAIT_NO_REASON; - if (part_ptr->state_up == PARTITION_DOWN) - fail_reason = WAIT_PART_DOWN; - else if (part_ptr->state_up == PARTITION_INACTIVE) - fail_reason = WAIT_PART_INACTIVE; - else if (job_ptr->priority == 0) /* user or administrator hold */ - fail_reason = WAIT_HELD; - else if ((((job_ptr->time_limit != NO_VAL) && - (job_ptr->time_limit > part_ptr->max_time)) || - ((job_ptr->time_min != NO_VAL) && - (job_ptr->time_min > part_ptr->max_time))) && - (!qos_ptr || (qos_ptr && !(qos_ptr->flags & - QOS_FLAG_PART_TIME_LIMIT)))) - fail_reason = WAIT_PART_TIME_LIMIT; - else if (((job_max_nodes != 0) && - ((job_max_nodes < part_min_nodes) && - (!qos_ptr || (qos_ptr && !(qos_ptr->flags - & QOS_FLAG_PART_MIN_NODE))))) || - ((job_min_nodes > part_max_nodes) && - (!qos_ptr || (qos_ptr && !(qos_ptr->flags - & QOS_FLAG_PART_MAX_NODE))))) - fail_reason = WAIT_PART_NODE_LIMIT; - else if (qos_ptr && assoc_ptr && - (qos_ptr->flags & QOS_FLAG_ENFORCE_USAGE_THRES) && - (!fuzzy_equal(qos_ptr->usage_thres, NO_VAL))) { - if (!job_ptr->prio_factors) - job_ptr->prio_factors = - xmalloc(sizeof(priority_factors_object_t)); - - if (!job_ptr->prio_factors->priority_fs) { - if (fuzzy_equal(assoc_ptr->usage->usage_efctv, NO_VAL)) - priority_g_set_assoc_usage(assoc_ptr); - job_ptr->prio_factors->priority_fs = - priority_g_calc_fs_factor( - assoc_ptr->usage->usage_efctv, - (long double)assoc_ptr->usage-> - shares_norm); - } - if (job_ptr->prio_factors->priority_fs < qos_ptr->usage_thres) - fail_reason = WAIT_QOS_THRES; - } - + fail_reason = job_limits_check(&job_ptr); if (fail_reason != WAIT_NO_REASON) { last_job_update = now; xfree(job_ptr->state_desc); -- GitLab From 2b6b3061a8d7942acaf4d40c7f8f1d8e3293186c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 13:10:01 -0700 Subject: [PATCH 297/614] Remove unused variable from last checkin --- src/slurmctld/job_mgr.c | 2 +- src/slurmctld/node_scheduler.c | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 9c7ced181b..8fc346f0e8 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3821,7 +3821,7 @@ extern int job_limits_check(struct job_record **job_pptr) job_ptr->job_id); fail_reason = WAIT_QOS_THRES; } - } else if (job_ptr->priority == 0) /* user or administrator hold */ + } else if (job_ptr->priority == 0) { /* user or administrator hold */ fail_reason = WAIT_HELD; } diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 27dcf2e7c0..640f406676 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -1224,7 +1224,6 @@ extern int select_nodes(struct job_record *job_ptr, bool test_only, time_t now = time(NULL); bool configuring = false; List preemptee_job_list = NULL; - slurmdb_association_rec_t *assoc_ptr = NULL; slurmdb_qos_rec_t *qos_ptr = NULL; xassert(job_ptr); @@ -1234,7 +1233,6 @@ extern int select_nodes(struct job_record *job_ptr, bool test_only, return ESLURM_ACCOUNTING_POLICY; part_ptr = job_ptr->part_ptr; - assoc_ptr = (slurmdb_association_rec_t *)job_ptr->assoc_ptr; qos_ptr = (slurmdb_qos_rec_t *)job_ptr->qos_ptr; /* identify partition */ -- GitLab From f78a6a06171483f44f796fcc38f144acbbfd3ec6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 13:25:59 -0700 Subject: [PATCH 298/614] BGQ - make it so srun -i works correctly --- NEWS | 1 + src/srun/opt.c | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/NEWS b/NEWS index a2a6adb053..fad593cca4 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ documents those changes that are of interest to users and admins. ============================= -- Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. + -- BGQ - make it so srun -i works correctly * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/srun/opt.c b/src/srun/opt.c index 59352aa536..cab6ff9d61 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1722,6 +1722,7 @@ static void _opt_args(int argc, char **argv) } #if defined HAVE_BG_FILES + uint32_t taskid = 0; if (!opt.test_only) { /* Since we need the opt.argc to allocate the opt.argv array * we need to do this before actually messing with @@ -1743,6 +1744,13 @@ static void _opt_args(int argc, char **argv) command_pos += 2; if (_verbose) command_pos += 2; + if (opt.ifname) { + char *p; + taskid = strtoul(opt.ifname, &p, 10); + if ((*p == '\0') && ((int) taskid < opt.ntasks)) { + command_pos += 2; + } + } if (opt.runjob_opts) { char *save_ptr = NULL, *tok; char *tmp = xstrdup(opt.runjob_opts); @@ -1804,6 +1812,11 @@ static void _opt_args(int argc, char **argv) opt.argv[i++] = xstrdup_printf("%d", _verbose); } + if (taskid) { + opt.argv[i++] = xstrdup("--stdinrank"); + opt.argv[i++] = xstrdup_printf("%u", taskid); + } + if (opt.runjob_opts) { char *save_ptr = NULL, *tok; char *tmp = xstrdup(opt.runjob_opts); -- GitLab From 594ec30894f3f52c58f2736db61d4d123e3946b2 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 13:33:25 -0700 Subject: [PATCH 299/614] BGQ - make things work with taskid 0 --- src/srun/opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index cab6ff9d61..50e7eb9154 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1722,7 +1722,7 @@ static void _opt_args(int argc, char **argv) } #if defined HAVE_BG_FILES - uint32_t taskid = 0; + uint32_t taskid = NO_VAL; if (!opt.test_only) { /* Since we need the opt.argc to allocate the opt.argv array * we need to do this before actually messing with @@ -1812,7 +1812,7 @@ static void _opt_args(int argc, char **argv) opt.argv[i++] = xstrdup_printf("%d", _verbose); } - if (taskid) { + if (taskid != NO_VAL) { opt.argv[i++] = xstrdup("--stdinrank"); opt.argv[i++] = xstrdup_printf("%u", taskid); } -- GitLab From 612bc69cc0054d95b0672bbb3b0aed5a8452e3ee Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 23 May 2012 13:34:49 -0700 Subject: [PATCH 300/614] Clean up error logging for "scontrol reboot" --- src/scontrol/scontrol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index 7ff08373c7..63c8e74ec8 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -564,8 +564,9 @@ static int _reboot_nodes(char *node_list) conf = slurm_conf_lock(); if (conf->reboot_program == NULL) { - fprintf (stderr, "RebootProgram isn't defined"); + error("RebootProgram isn't defined"); slurm_conf_unlock(); + slurm_seterrno(SLURM_ERROR); return SLURM_ERROR; } slurm_conf_unlock(); -- GitLab From 712970134dfcfc0174d38d6981977db17cf0d9e3 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 13:56:09 -0700 Subject: [PATCH 301/614] BGQ - Add extra information for stdio with srun to the srun man page. --- doc/man/man1/srun.1 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index d838de8e65..5182b7ae40 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1381,8 +1381,15 @@ standard input of \fBsrun\fR to all remote tasks. If stdin is only to be read by a subset of the spawned tasks, specifying a file to read from rather than forwarding stdin from the \fBsrun\fR command may be preferable as it avoids moving and storing data that will never be read. +.PP For OS X, the poll() function does not support stdin, so input from a terminal is not possible. +.PP +For BGQ srun only supports stdin to 1 task running on the system. By +default it is taskid 0 but can be changed with the \-i as +described below, or \-\-runjob\-opt="\-\-stdinrank". Outside +of the taskid option none of the options below are available for a BGQ system. +.PP This behavior may be changed with the \fB\-\-output\fR, \fB\-\-error\fR, and \fB\-\-input\fR (\fB\-o\fR, \fB\-e\fR, \fB\-i\fR) options. Valid format specifications -- GitLab From 91ef42ae44c3176e3a277e909d5e280703383256 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 13:56:27 -0700 Subject: [PATCH 302/614] more uniform documentation --- doc/man/man1/srun.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 5182b7ae40..7af82ef5d0 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1404,14 +1404,14 @@ stdin is broadcast to all remote tasks. stdout and stderr is not received from any task. stdin is not sent to any task (stdin is closed). .TP -\fItaskid\fR +\fBtaskid\fR stdout and/or stderr are redirected from only the task with relative id equal to \fItaskid\fR, where 0 <= \fItaskid\fR <= \fIntasks\fR, where \fIntasks\fR is the total number of tasks in the current job step. stdin is redirected from the stdin of \fBsrun\fR to this same task. This file will be written on the node executing the task. .TP -\fIfilename\fR +\fBfilename\fR \fBsrun\fR will redirect stdout and/or stderr to the named file from all tasks. stdin will be redirected from the named file and broadcast to all @@ -1420,7 +1420,7 @@ that runs \fBsrun\fR. Depending on the cluster's file system layout, this may result in the output appearing in different places depending on whether the job is run in batch mode. .TP -format string +\fBformat string\fR \fBsrun\fR allows for a format string to be used to generate the named IO file described above. The following list of format specifiers may be -- GitLab From 7f79b5fa2f73b4ae6994744ab3009a9928a63949 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 14:18:57 -0700 Subject: [PATCH 303/614] correct name in comment --- src/common/jobacct_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/jobacct_common.h b/src/common/jobacct_common.h index 13a5f0c3d7..eb6616e512 100644 --- a/src/common/jobacct_common.h +++ b/src/common/jobacct_common.h @@ -134,7 +134,7 @@ extern struct jobacctinfo *jobacct_common_remove_task(pid_t pid, /***************************************************************/ -/* defined in common_jobacct.c */ +/* defined in jobacct_common.c */ extern pthread_mutex_t jobacct_lock; extern uint32_t jobacct_job_id; extern uint32_t jobacct_step_id; -- GitLab From 4fe889c4c31f45801b046f4250ecbb5e7857f3bf Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 15:29:44 -0700 Subject: [PATCH 304/614] fix parse_uint32/16 to complain if a non digit is given --- NEWS | 1 + src/common/proc_args.c | 10 ++++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index f798573b95..6b50834569 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,7 @@ documents those changes that are of interest to users and admins. -- Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. -- BGQ - make it so srun -i works correctly + -- fix parse_uint32/16 to complain if a non digit is given * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/common/proc_args.c b/src/common/proc_args.c index ff4b1b6b58..9213fffd36 100644 --- a/src/common/proc_args.c +++ b/src/common/proc_args.c @@ -903,12 +903,13 @@ extern int parse_uint32(char *aval, uint32_t *ival) */ uint32_t max32uint = (uint32_t) NO_VAL; long long tval; + char *p; /* * Return error for invalid value. */ - tval = strtoll(aval, (char **) NULL, 10); - if ((tval == LLONG_MIN) || (tval == LLONG_MAX) || + tval = strtoll(aval, &p, 10); + if (p[0] || (tval == LLONG_MIN) || (tval == LLONG_MAX) || (tval < 0) || (tval >= max32uint)) return 1; @@ -934,12 +935,13 @@ extern int parse_uint16(char *aval, uint16_t *ival) */ uint16_t max16uint = (uint16_t) NO_VAL; long long tval; + char *p; /* * Return error for invalid value. */ - tval = strtoll(aval, (char **) NULL, 10); - if ((tval == LLONG_MIN) || (tval == LLONG_MAX) || + tval = strtoll(aval, &p, 10); + if (p[0] || (tval == LLONG_MIN) || (tval == LLONG_MAX) || (tval < 0) || (tval >= max16uint)) return 1; -- GitLab From 9e95511084acb3a13cd0799c88da459abd94abfe Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 15:30:07 -0700 Subject: [PATCH 305/614] BGQ - better code to parse taskid --- src/srun/opt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index 50e7eb9154..3da4cda520 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1745,9 +1745,8 @@ static void _opt_args(int argc, char **argv) if (_verbose) command_pos += 2; if (opt.ifname) { - char *p; - taskid = strtoul(opt.ifname, &p, 10); - if ((*p == '\0') && ((int) taskid < opt.ntasks)) { + if (parse_uint32(opt.ifname, &taskid) + && ((int) taskid < opt.ntasks)) { command_pos += 2; } } -- GitLab From 396b10170dfaeee55f775b089fee56c5b9d5f557 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 15:30:44 -0700 Subject: [PATCH 306/614] fix documentation --- doc/man/man1/srun.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 7af82ef5d0..79faec6644 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1387,7 +1387,7 @@ a terminal is not possible. .PP For BGQ srun only supports stdin to 1 task running on the system. By default it is taskid 0 but can be changed with the \-i as -described below, or \-\-runjob\-opt="\-\-stdinrank". Outside +described below, or \-\-runjob\-opt="\-\-stdinrank=". Outside of the taskid option none of the options below are available for a BGQ system. .PP This behavior may be changed with the -- GitLab From 7c4ffbbd40b5fd9231d6bfa95fff0c3d1dce9182 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 23 May 2012 15:52:42 -0700 Subject: [PATCH 307/614] fix for using return correctly --- src/srun/opt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/srun/opt.c b/src/srun/opt.c index 3da4cda520..f29c20bec1 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1745,7 +1745,7 @@ static void _opt_args(int argc, char **argv) if (_verbose) command_pos += 2; if (opt.ifname) { - if (parse_uint32(opt.ifname, &taskid) + if (!parse_uint32(opt.ifname, &taskid) && ((int) taskid < opt.ntasks)) { command_pos += 2; } -- GitLab From 7f9145da533c1e5ec64973d7dd3f8e23bf0075ba Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 24 May 2012 08:30:28 -0700 Subject: [PATCH 308/614] Modify regression tests to work with select/serial --- testsuite/expect/test12.3 | 3 +++ testsuite/expect/test15.19 | 3 +++ testsuite/expect/test21.21 | 13 +++++++++---- testsuite/expect/test7.15 | 16 ++++++++++------ 4 files changed, 25 insertions(+), 10 deletions(-) diff --git a/testsuite/expect/test12.3 b/testsuite/expect/test12.3 index 31b3c27055..b71db53306 100755 --- a/testsuite/expect/test12.3 +++ b/testsuite/expect/test12.3 @@ -53,6 +53,9 @@ print_header $test_id if {[test_bluegene]} { send_user "\nWARNING: This test can't be run on a blue gene\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit $exit_code } # diff --git a/testsuite/expect/test15.19 b/testsuite/expect/test15.19 index b7500ca3de..0c5613f62d 100755 --- a/testsuite/expect/test15.19 +++ b/testsuite/expect/test15.19 @@ -43,6 +43,9 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit $exit_code } # diff --git a/testsuite/expect/test21.21 b/testsuite/expect/test21.21 index 6679631613..2290611c86 100755 --- a/testsuite/expect/test21.21 +++ b/testsuite/expect/test21.21 @@ -41,6 +41,11 @@ set ta slurm_test-account.1 set timeout 60 print_header $test_id +if {[test_serial]} { + send_user "\nWARNING: This test is not compatible with serial system\n" + exit 0 +} + proc _test_limits { } { global file_in srun sbatch squeue scancel bin_id number bin_sleep bin_rm ta # test maxcpumin maxcpu maxjob maxnode maxsubmit maxwall @@ -90,7 +95,7 @@ proc _test_limits { } { exp_continue } -re "launching ($number)" { - send_user "\nFAILURE: job should not have run.\n" + send_user "\nFAILURE: job should not have run 1.\n" set exit_code 1 exp_continue } @@ -127,7 +132,7 @@ proc _test_limits { } { } if { $matches != 1 } { - send_user "\nFAILURE: job dion't launch with correct limit\n" + send_user "\nFAILURE: job didn't launch with correct limit\n" set exit_code 1 return $exit_code } @@ -141,7 +146,7 @@ proc _test_limits { } { exp_continue } -re "launching ($number)" { - send_user "\nFAILURE: job should not have run.\n" + send_user "\nFAILURE: job should not have run 2.\n" set exit_code 1 exp_continue } @@ -211,7 +216,7 @@ proc _test_limits { } { exp_continue } -re "Submitted batch job ($number)" { - send_user "\nFAILURE: job should not have run.\n" + send_user "\nFAILURE: job should not have run 3.\n" set exit_code 1 exp_continue } diff --git a/testsuite/expect/test7.15 b/testsuite/expect/test7.15 index a8d56debd3..99ca7e2d6f 100755 --- a/testsuite/expect/test7.15 +++ b/testsuite/expect/test7.15 @@ -47,13 +47,17 @@ exec $bin_cc -O -o $file_prog ${file_prog}.c # is intermittent. # if { $partition == "" } { - if {[info exists env(SLURM_PARTITION)] } { - set partition $env(SLURM_PARTITION) - } else { - set partition [default_partition] - } + if {[info exists env(SLURM_PARTITION)] } { + set partition $env(SLURM_PARTITION) + } else { + set partition [default_partition] + } +} +if {[test_serial]} { + set nnodes 1 +} else { + set nnodes [available_nodes $partition] } -set nnodes [available_nodes $partition] # # Run the test_prog to ensure that no signals are blocked by -- GitLab From 62c03f733e9352fea7dc31251ceb1df1047bdd24 Mon Sep 17 00:00:00 2001 From: Jon Bringhurst Date: Thu, 24 May 2012 09:19:31 -0700 Subject: [PATCH 309/614] Pass job submit host to moab The purpose of this is so moab scripts and commands (such as 'checkjob') have consistent access to the SUBMITHOST variable. --- NEWS | 6 ++++-- src/plugins/sched/wiki2/get_jobs.c | 5 +++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 6b50834569..9bd900ea8d 100644 --- a/NEWS +++ b/NEWS @@ -5,8 +5,10 @@ documents those changes that are of interest to users and admins. ============================= -- Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. - -- BGQ - make it so srun -i works correctly - -- fix parse_uint32/16 to complain if a non digit is given + -- BGQ - make it so srun -i works correctly. + -- Fix parse_uint32/16 to complain if a non-digit is given. + -- Add SUBMITHOST to job state passed to Moab vial sched/wiki2. Patch by Jon + Bringhurst (LANL). * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/sched/wiki2/get_jobs.c b/src/plugins/sched/wiki2/get_jobs.c index 3e004d5f43..d3717356a7 100644 --- a/src/plugins/sched/wiki2/get_jobs.c +++ b/src/plugins/sched/wiki2/get_jobs.c @@ -347,6 +347,11 @@ static char * _dump_job(struct job_record *job_ptr, time_t update_time) xstrcat(buf, tmp); } + if (job_ptr->resp_host) { + snprintf(tmp, sizeof(tmp),"SUBMITHOST=\"%s\";", job_ptr->resp_host); + xstrcat(buf, tmp); + } + if (job_ptr->wckey) { if ((quote = strchr(job_ptr->wckey, (int) '\"'))) { /* Moab does not like strings containing a quote */ -- GitLab From c592b8c1e2865f153286fb3e9c4b6fb4abaf1177 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 09:46:53 -0700 Subject: [PATCH 310/614] BGQ - Fix issue when running with AllowSubBlockAllocations=Yes without compiling with --enable-debug --- NEWS | 2 ++ src/plugins/select/bluegene/ba_bgq/block_allocator.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 9bd900ea8d..a697c52501 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ documents those changes that are of interest to users and admins. -- Fix parse_uint32/16 to complain if a non-digit is given. -- Add SUBMITHOST to job state passed to Moab vial sched/wiki2. Patch by Jon Bringhurst (LANL). + -- BGQ - Fix issue when running with AllowSubBlockAllocations=Yes without + compiling with --enable-debug * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index cf40e58282..24977d33f8 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -1553,7 +1553,8 @@ extern struct job_record *ba_remove_job_in_block_job_list( if (!bg_record->job_list) return NULL; - xassert((ba_mp = list_peek(bg_record->ba_mp_list))); + ba_mp = list_peek(bg_record->ba_mp_list); + xassert(ba_mp); if (in_job_ptr && in_job_ptr->magic != JOB_MAGIC) { /* This can happen if the mmcs job hangs out in the system -- GitLab From 848f5545bd267d68f622043817b88bd63def1088 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 10:01:09 -0700 Subject: [PATCH 311/614] BGQ - caught 2 more related to last BGQ patch. Signed-off-by: Danny Auble --- src/plugins/select/bluegene/select_bluegene.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 6da8373442..dd313710c3 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -1953,8 +1953,8 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, if (jobinfo->units_avail) used_bitmap = jobinfo->units_used; else { - xassert((ba_mp = list_peek( - bg_record->ba_mp_list))); + ba_mp = list_peek(bg_record->ba_mp_list); + xassert(ba_mp); if (!ba_mp->cnode_bitmap) ba_mp->cnode_bitmap = ba_create_ba_mp_cnode_bitmap( @@ -1970,7 +1970,8 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, step_jobinfo->ionode_str = xstrdup(jobinfo->ionode_str); } else if (jobinfo->units_avail) { bitstr_t *total_bitmap = jobinfo->units_used; - xassert((ba_mp = list_peek(bg_record->ba_mp_list))); + ba_mp = list_peek(bg_record->ba_mp_list); + xassert(ba_mp); if (ba_mp->cnode_err_bitmap) { total_bitmap = bit_copy(jobinfo->units_used); bit_or(total_bitmap, ba_mp->cnode_err_bitmap); -- GitLab From 6e868b53c04e8deabce2160a2386034fe5a61624 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 24 May 2012 11:39:15 -0700 Subject: [PATCH 312/614] Remove vestigial slurm_signal_job_step() symbol from srun The srun command formerly needed to call slurm_signal_job_step() to load the symbol and have it accessible from the mpi plugins. This is no longer the case due to changes in linking since 2007. --- src/srun/srun.c | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/srun/srun.c b/src/srun/srun.c index 3c69f5cbb3..0b3809e60e 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -135,7 +135,6 @@ int sig_array[] = { static int _become_user (void); static int _call_spank_local_user (srun_job_t *job); static void _default_sigaction(int sig); -static void _define_symbols(void); static void _handle_intr(void); static void _handle_pipe(void); static void _print_job_information(resource_allocation_response_msg_t *resp); @@ -223,7 +222,6 @@ int srun(int ac, char **av) if (spank_init(NULL) < 0) { error("Plug-in initialization failed"); exit(error_exit); - _define_symbols(); } /* Be sure to call spank_fini when srun exits. @@ -1007,17 +1005,6 @@ _set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) } } -/* Plugins must be able to resolve symbols. - * Since srun statically links with src/api/libslurmhelper rather than - * dynamicaly linking with libslurm, we need to reference all needed - * symbols within srun. None of the functions below are actually - * used, but we need to load the symbols. */ -static void _define_symbols(void) -{ - /* needed by mvapich and mpichgm */ - slurm_signal_job_step(NO_VAL, NO_VAL, 0); -} - static void _pty_restore(void) { /* STDIN is probably closed by now */ -- GitLab From bdb7aa9ffbf4a6b07c45cdaf23614d7b47010e32 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 11:49:54 -0700 Subject: [PATCH 313/614] remove unneeded debug --- src/plugins/launch/poe/launch_poe.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index 689940b68f..c317d2d56e 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -726,7 +726,7 @@ extern int launch_p_step_launch( error("pipe: %m"); return 1; } - info("calling %s", opt.argv[0]); + pid = fork(); if (pid < 0) { /* (void) close(stdin_pipe[0]); */ @@ -764,10 +764,8 @@ extern int launch_p_step_launch( (void) close(stdout_pipe[1]); (void) close(stderr_pipe[1]); - info("partition = %s", opt.partition); /* NOTE: dummy_pipe is only used to wake the select() function in the * loop below when the spawned process terminates */ - info("done with exec"); return rc; } @@ -777,7 +775,6 @@ extern int launch_p_step_terminate(void) (void) unlink(cmd_fname); if (stepid_fname) (void) unlink(stepid_fname); - info("finishing"); return SLURM_SUCCESS; } -- GitLab From 8d381979c5ecdc49fbdaf940260850bf8c33b973 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 11:50:28 -0700 Subject: [PATCH 314/614] Mods to get poe to launch more correctly. Jobs still don't launch yet but things are closer. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 47 ++++++++++++++-------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 532720e76c..a86ace8dde 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -54,6 +54,7 @@ #include "src/common/xstring.h" #include "src/common/list.h" #include "src/common/hostlist.h" +#include "src/common/plugstack.h" #include "src/srun/srun_job.h" #include "src/srun/opt.h" @@ -61,8 +62,10 @@ #include "src/srun/launch.h" #include "src/plugins/switch/nrt/nrt_keys.h" -void *my_handle = NULL; -srun_job_t *job = NULL; +bool srun_max_timer = false; + +static void *my_handle = NULL; +static srun_job_t *job = NULL; int sig_array[] = { SIGINT, SIGQUIT, SIGCONT, SIGTERM, SIGHUP, @@ -227,8 +230,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, srun_job_t *job = *job_ptr; slurm_step_launch_params_t launch_params; int my_argc = 1; - char **my_argv = xmalloc(sizeof(char *)*my_argc+1); - my_argv[0] = xstrdup("/etc/pmdv12"); + char *my_argv[2] = { "/etc/pmdv12", NULL }; info("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); @@ -286,8 +288,6 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, job->jobid, job->stepid); } cleanup: - xfree(my_argv[0]); - xfree(my_argv); info("done launching"); return 0; } @@ -441,6 +441,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, slurm_step_layout_t *step_layout; hostlist_t hl; char *host; + host_usage_t *host_ptr; info("got pe_rm_get_job_info called %p %p", job_info, *job_info); @@ -467,28 +468,30 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, step_layout = launch_common_get_slurm_step_layout(job); ret_info->hosts = xmalloc(sizeof(host_usage_t) * ret_info->host_count); + host_ptr = ret_info->hosts; i=0; hl = hostlist_create(step_layout->node_list); while ((host = hostlist_shift(hl))) { slurm_addr_t addr; - ret_info->hosts->host_name = host; + host_ptr->host_name = host; /* FIXME: not sure how to handle host_address yet we are guessing the * below will do what we need. */ - /* ret_info->hosts->host_address = */ + /* host_ptr->host_address = */ /* xstrdup_printf("10.0.0.5%d", i+1); */ slurm_conf_get_addr(host, &addr); - ret_info->hosts->host_address = inet_ntoa(addr.sin_addr); - info("%s = %s", ret_info->hosts->host_name, ret_info->hosts->host_address); - ret_info->hosts->task_count = step_layout->tasks[i]; - ret_info->hosts->task_ids = - xmalloc(sizeof(int) * ret_info->hosts->task_count); - for (j=0; jhosts->task_count; j++) - ret_info->hosts->task_ids[j] = task_id++; + host_ptr->host_address = xstrdup(inet_ntoa(addr.sin_addr)); + info("%s = %s", host_ptr->host_name, host_ptr->host_address); + host_ptr->task_count = step_layout->tasks[i]; + host_ptr->task_ids = + xmalloc(sizeof(int) * host_ptr->task_count); + for (j=0; jtask_count; j++) + host_ptr->task_ids[j] = task_id++; i++; if (i > ret_info->host_count) { error("we have more nodes that we bargined for."); break; } + host_ptr++; } hostlist_destroy(hl); @@ -634,10 +637,22 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, return 1; } + /* Initialize plugin stack, read options from plugins, etc. + */ + init_spank_env(); + if (spank_init(NULL) < 0) { + error("Plug-in initialization failed"); + exit(error_exit); + } + pe_job_req = (job_request_t *)job_cmd.job_command; initialize_and_process_args(2, myargv); - info("job_type\t= %d", pe_job_req->job_type); + + if (spank_init_post_opt() < 0) { + error("Plugin stack post-option processing failed."); + exit(error_exit); + } info("num_nodes\t= %d", pe_job_req->num_nodes); if (pe_job_req->num_nodes != -1) -- GitLab From 18c966f0da228d194b9beccab8dfe006d2247cc8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 24 May 2012 12:30:41 -0700 Subject: [PATCH 315/614] Modify tests for select/serial plugin --- testsuite/expect/test1.88 | 8 +++++--- testsuite/expect/test1.95 | 9 +++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/testsuite/expect/test1.88 b/testsuite/expect/test1.88 index 0419555e14..90da1a4337 100755 --- a/testsuite/expect/test1.88 +++ b/testsuite/expect/test1.88 @@ -54,13 +54,15 @@ if {[file executable $mpicc] == 0} { send_user "\nWARNING: $mpicc does not exists\n" exit 0 } -if {[test_front_end] != 0} { +if {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 -} -if {[test_aix] == 1} { +} elseif {[test_aix]} { send_user "WARNING: Test is incompatible with AIX\n" exit 0 +} elseif {[test_serial]} { + send_user "WARNING: Test is incompatible with serial system\n" + exit 0 } # diff --git a/testsuite/expect/test1.95 b/testsuite/expect/test1.95 index 2ff0196643..93aab08cfa 100755 --- a/testsuite/expect/test1.95 +++ b/testsuite/expect/test1.95 @@ -53,13 +53,15 @@ if {[file executable $upcc] == 0} { send_user "\nWARNING: $upcc does not exists\n" exit 0 } -if {[test_front_end] != 0} { +if {[test_front_end]} { send_user "\nWARNING: This test is incompatible with front-end systems\n" exit 0 -} -if {[test_aix] == 1} { +} elseif {[test_aix]} { send_user "WARNING: Test is incompatible with AIX\n" exit 0 +} elseif {[test_serial]} { + send_user "WARNING: Test is incompatible with serial system\n" + exit 0 } # @@ -68,7 +70,6 @@ if {[test_aix] == 1} { exec $bin_rm -f $test_prog ${test_prog}.o exec $upcc -o $test_prog ${test_prog}.upc - # Delete left-over stdout/err files file delete $file_out $file_err -- GitLab From 7e216683e8af16bb6b818d6e0fce3cd5e7ee8d7b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 24 May 2012 12:30:58 -0700 Subject: [PATCH 316/614] Add SHMEM test --- testsuite/expect/Makefile.am | 2 + testsuite/expect/README | 1 + testsuite/expect/test1.96 | 156 +++++++++++++++++++++++++++++++ testsuite/expect/test1.96.prog.c | 42 +++++++++ 4 files changed, 201 insertions(+) create mode 100644 testsuite/expect/test1.96 create mode 100644 testsuite/expect/test1.96.prog.c diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am index 1154352344..5827e79003 100644 --- a/testsuite/expect/Makefile.am +++ b/testsuite/expect/Makefile.am @@ -107,6 +107,8 @@ EXTRA_DIST = \ test1.94.slave.c \ test1.95 \ test1.95.prog.upc \ + test1.96 \ + test1.96.prog.c \ test2.1 \ test2.2 \ test2.3 \ diff --git a/testsuite/expect/README b/testsuite/expect/README index c8e498e335..776ba6f1be 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -195,6 +195,7 @@ test1.92 Test of task distribution support on multi-core systems. test1.93 Test of LAM-MPI functionality test1.94 Test of MPICH2 task spawn logic test1.95 Basic UPC (Unified Parallel C) test via srun. +test1.96 Basic SHMEM test via srun. **NOTE** The above tests for mutliple processor/partition systems only test2.# Testing of scontrol options (to be run as unprivileged user). diff --git a/testsuite/expect/test1.96 b/testsuite/expect/test1.96 new file mode 100644 index 0000000000..d59fe6d335 --- /dev/null +++ b/testsuite/expect/test1.96 @@ -0,0 +1,156 @@ +#!/usr/bin/expect +############################################################################ +# Purpose: Test of SLURM functionality +# Basic SHMEM test via srun. +# +# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR +# "WARNING: ..." with an explanation of why the test can't be made, OR +# "FAILURE: ..." otherwise with an explanation of the failure, OR +# anything else indicates a failure mode that must be investigated. +############################################################################ +# Copyright (C) 2012 SchedMD LLC. +# Written by Morris Jette +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ +source ./globals + +set test_id "1.96" +set exit_code 0 +set file_in "test$test_id.input" +set file_out "test$test_id.output" +set file_err "test$test_id.error" +set test_prog "test$test_id.prog" +set job_id 0 +set task_cnt 4 + +print_header $test_id + +if {[test_front_end]} { + send_user "\nWARNING: This test is incompatible with front-end systems\n" + exit 0 +} elseif {[test_aix]} { + send_user "WARNING: Test is incompatible with AIX\n" + exit 0 +} elseif {[test_serial]} { + send_user "WARNING: Test is incompatible with serial system\n" + exit 0 +} elseif {![file exists /usr/include/mpp/shmem.h]} { + send_user "\nWARNING: /usr/include/mpp/shmem.h does not exists\n" + exit 0 +} + +# +# Delete left-over program and rebuild it +# +exec $bin_rm -f $test_prog ${test_prog}.o +exec $bin_cc -o $test_prog ${test_prog}.c -lshmem + +# Delete left-over stdout/err files +file delete $file_out $file_err + +# +# Build input script file +# +make_bash_script $file_in " + $srun -n $task_cnt $test_prog +" + +# +# Spawn an sbatch job that uses stdout/err and confirm their contents +# +set timeout $max_job_delay +set no_start 0 +set sbatch_pid [spawn $sbatch -N1 -n $task_cnt --output=$file_out --error=$file_err -t1 $file_in] +expect { + -re "Submitted batch job ($number)" { + set job_id $expect_out(1,string) + exp_continue + } + -re "Batch job submission failed" { + set no_start 1 + exp_continue + } + -re "Unable to contact" { + send_user "\nFAILURE: slurm appears to be down\n" + exit 1 + } + timeout { + send_user "\nFAILURE: srun not responding\n" + slow_kill $sbatch_pid + set exit_code 1 + } + eof { + wait + } +} + +if {$no_start != 0} { + send_user "\nWARNING: partition too small for test\n" + if {$job_id != 0} { + cancel_job $job_id + } + exit 0 +} +if {$job_id == 0} { + send_user "\nFAILURE: batch submit failure\n" + exit 1 +} + +# +# Wait for job to complete +# +if {[wait_for_job $job_id "DONE"] != 0} { + send_user "\nFAILURE: waiting for job to complete\n" + set exit_code 1 +} + +# +# Check for desired output in stdout +# +if {[wait_for_file $file_out] == 0} { + set matches 0 + + spawn $bin_cat $file_out + expect { + -re "PE ($number): 1,2,3,4,5,6,7,8" { + incr matches + exp_continue + } + eof { + wait + } + } + incr task_cnt -1 + if {$matches != $task_cnt} { + send_user "\nFAILURE: unexpected output ($matches of $task_cnt)\n" + set exit_code 1 + } +} else { + set exit_code 1 +} + +if {$exit_code == 0} { + exec $bin_rm -f $file_in $file_out $file_err $test_prog ${test_prog}.o + send_user "\nSUCCESS\n" +} else { + send_user "Check contents of $file_err\n" +} + +exit $exit_code diff --git a/testsuite/expect/test1.96.prog.c b/testsuite/expect/test1.96.prog.c new file mode 100644 index 0000000000..12f2dc1985 --- /dev/null +++ b/testsuite/expect/test1.96.prog.c @@ -0,0 +1,42 @@ +/*****************************************************************************\ + * test1.96.prog.upc - Basic SHMEM test via srun. + ***************************************************************************** + * Based upon "Code Example" in "SHMEM Tutorial" + * By Hung-Hsun Su, UPC Group, HSC Lab, Spring 2010 +\*****************************************************************************/ + +#include +#include +#include + +int me, npes, i; +int src[8], dest[8]; + +int main(int argc, char * argv[]) +{ + /* Get PE information */ + me = _my_pe(); + npes = _num_pes(); + + /* Initialize and send on PE 0 */ + if (me == 0) { + for (i = 0; i < 8; i++) + src[i] = i + 1; + /* Put source date at PE 0 to dest at PE 1+ */ + for (i = 1; i < npes; i++) + shmem_put64(dest, src, 8 * sizeof(int) / 8, i); + } + + /* Make sure the transfer is complete */ + shmem_barrier_all(); + + /* Print from PE 1+ */ + if (me > 0) { + printf("PE %d: %d", me, dest[0]); + for (i = 1; i < 8; i++) + printf(",%d", dest[i]); + printf("\n"); + } + + return 0; +} -- GitLab From 38e8a06b16d1230dff9b47a25c34ea5f1ee45c11 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 14:03:32 -0700 Subject: [PATCH 317/614] Remove pointless check. The state_reason is set to WAIT_NO_REASON so acct_policy_job_runnable will always return true. --- src/slurmctld/job_scheduler.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 8057053622..6e222fac58 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -556,10 +556,8 @@ extern int schedule(uint32_t job_limit) if ((job_ptr->state_reason == WAIT_QOS_JOB_LIMIT) || (job_ptr->state_reason == WAIT_QOS_RESOURCE_LIMIT) || - (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) { + (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) job_ptr->state_reason = WAIT_NO_REASON; - acct_policy_job_runnable(job_ptr); - } if ((job_ptr->state_reason == WAIT_NODE_NOT_AVAIL) && job_ptr->details && job_ptr->details->req_node_bitmap && -- GitLab From a84bcf12b85ac4221a024062b18fd16dabc9a5ae Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 24 May 2012 15:02:40 -0700 Subject: [PATCH 318/614] Correction to switch/nrt logic --- src/plugins/switch/nrt/nrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d4598aa334..2f14c10c36 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2050,7 +2050,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * sizeof(nrt_tableinfo_t)); - if (!jp->user_space) + if (!jp->user_space || (adapter_type == NRT_IPONLY)) table_rec_len = sizeof(nrt_ip_task_info_t); else if (adapter_type == NRT_IB) table_rec_len = sizeof(nrt_ib_task_info_t); -- GitLab From 8ed1b303288e5de210ce9db2baf9c94c191a7213 Mon Sep 17 00:00:00 2001 From: Don Albert Date: Fri, 25 May 2012 09:03:30 -0700 Subject: [PATCH 319/614] Modify scontrol show job to require -dd option to print batch script. I have implemented the changes as you suggested: using a "-dd" option to indicate that the display of the script is wanted, and setting both the "SHOW_DETAIL" and a new "SHOW_DETAIL2" flag. Since "scontrol" can be run interactively as well, I added a new "script" option to indicate that display of both the script and the details is wanted if the job is a batch job. Here are the man page updates for "man scontrol". For the "-d, --details" option: -d, --details Causes the show command to provide additional details where available. Repeating the option more than once (e.g., "-dd") will cause the show job command to also list the batch script, if the job was a batch job. For the interactive "details" option: details Causes the show command to provide additional details where available. Job information will include CPUs and NUMA memory allocated on each node. Note that on computers with hyperthreading enabled and SLURM configured to allocate cores, each listed CPU represents one physical core. Each hyperthread on that core can be allocated a separate task, so a job's CPU count and task count may differ. See the --cpu_bind and --mem_bind option descriptions in srun man pages for more information. The details option is currently only supported for the show job command. To also list the batch script for batch jobs, in addition to the details, use the script option described below instead of this option. And for the new interactive "script" option: script Causes the show job command to list the batch script for batch jobs in addition to the detail informa- tion described under the details option above. Attached are the patch file for the changes and a text file with the results of the tests I did to check out the changes. The patches are against SLURM 2.4.0-rc1. -Don Albert- --- NEWS | 2 ++ RELEASE_NOTES | 4 +++- doc/man/man1/scontrol.1 | 15 +++++++++++---- slurm/slurm.h.in | 1 + src/scontrol/info_job.c | 5 ++++- src/scontrol/scontrol.c | 14 ++++++++++++-- src/slurmctld/job_mgr.c | 2 +- 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index a697c52501..ff577aad7b 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,8 @@ documents those changes that are of interest to users and admins. Bringhurst (LANL). -- BGQ - Fix issue when running with AllowSubBlockAllocations=Yes without compiling with --enable-debug + -- Modify scontrol to require "-dd" option to report batch job's script. Patch + from Don Albert, Bull. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/RELEASE_NOTES b/RELEASE_NOTES index dc4247c55e..97eab8841b 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,5 +1,5 @@ RELEASE NOTES FOR SLURM VERSION 2.4 -10 May 2012 +25 May 2012 IMPORTANT NOTE: @@ -70,6 +70,8 @@ COMMAND CHANGES (see man pages for details) was specified. Added output format of "%R" to print partition name only without identifying the default partition with "*"). * Added cpu_run_min to the output of sshare --long. +* Modify scontrol to require "-dd" option to report batch job's script. + OTHER CHANGES ============= diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 7ade312b81..0d7147855f 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -30,7 +30,9 @@ that are configured as hidden and partitions that are unavailable to user's group. .TP \fB\-d\fR, \fB\-\-details\fR -Causes the \fBshow\fR command to provide additional details where available. +Causes the \fIshow\fR command to provide additional details where available. +Repeating the option more than once (e.g., "\-dd") will cause the \fIshow job\fR +command to also list the batch script, if the job was a batch job. .TP \fB\-h\fR, \fB\-\-help\fR Print a help message describing the usage of scontrol. @@ -151,8 +153,6 @@ If the specified partition is in use, the request is denied. .TP \fBdetails\fP Causes the \fIshow\fP command to provide additional details where available. -Batch job information will include the batch script for jobs the user is -authorized to view. Job information will include CPUs and NUMA memory allocated on each node. Note that on computers with hyperthreading enabled and SLURM configured to allocate cores, each listed CPU represents one physical core. @@ -161,7 +161,8 @@ CPU count and task count may differ. See the \fB\-\-cpu_bind\fR and \fB\-\-mem_bind\fR option descriptions in srun man pages for more information. The \fBdetails\fP option is currently only supported for the \fIshow job\fP -command. +command. To also list the batch script for batch jobs, in addition to the +details, use the \fBscript\fP option described below instead of this option. .TP \fBexit\fP @@ -275,6 +276,12 @@ daemon reads the slurm.conf configuration file (e.g. when the daemon is restarted or \fBscontrol reconfigure\fR is executed) if the SlurmSchedLogLevel parameter is present. +.TP +\fBscript\fP +Causes the \fIshow job\fP command to list the batch script for batch +jobs in addition to the detail information described under the +\fBdetails\fP option above. + .TP \fBsetdebug\fP \fILEVEL\fP Change the debug level of the slurmctld daemon. diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 62f55f3eef..3df3d08d27 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -526,6 +526,7 @@ enum node_states { * Values can be can be ORed */ #define SHOW_ALL 0x0001 /* Show info for "hidden" partitions */ #define SHOW_DETAIL 0x0002 /* Show detailed resource information */ +#define SHOW_DETAIL2 0x0004 /* Show batch script listing */ /* Define keys for ctx_key argument of slurm_step_ctx_get() */ enum ctx_keys { diff --git a/src/scontrol/info_job.c b/src/scontrol/info_job.c index 97caab696a..3f9e8b05fd 100644 --- a/src/scontrol/info_job.c +++ b/src/scontrol/info_job.c @@ -84,8 +84,11 @@ _scontrol_load_jobs(job_info_msg_t ** job_buffer_pptr, uint32_t job_id) if (all_flag) show_flags |= SHOW_ALL; - if (detail_flag) + if (detail_flag) { show_flags |= SHOW_DETAIL; + if (detail_flag > 1) + show_flags |= SHOW_DETAIL2; + } if (old_job_info_ptr) { if (last_show_flags != show_flags) diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index 63c8e74ec8..96a33d785b 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -143,7 +143,7 @@ main (int argc, char *argv[]) all_flag = 1; break; case (int)'d': - detail_flag = 1; + detail_flag++; break; case (int)'h': _usage (); @@ -706,6 +706,16 @@ _process_command (int argc, char *argv[]) } detail_flag = 1; } + else if (strncasecmp (tag, "script", MAX(tag_len, 3)) == 0) { + if (argc > 1) { + exit_code = 1; + fprintf (stderr, + "too many arguments for keyword:%s\n", + tag); + return 0; + } + detail_flag = 2; + } else if (strncasecmp (tag, "exit", MAX(tag_len, 1)) == 0) { if (argc > 1) { exit_code = 1; @@ -1039,7 +1049,7 @@ _process_command (int argc, char *argv[]) } } } - else if (strncasecmp (tag, "schedloglevel", MAX(tag_len, 2)) == 0) { + else if (strncasecmp (tag, "schedloglevel", MAX(tag_len, 3)) == 0) { if (argc > 2) { exit_code = 1; if (quiet_flag != 1) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 8fc346f0e8..a106debde4 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -5740,7 +5740,7 @@ void pack_job(struct job_record *dump_job_ptr, uint16_t show_flags, Buf buffer, packstr(dump_job_ptr->gres, buffer); packstr(dump_job_ptr->batch_host, buffer); if (!IS_JOB_COMPLETED(dump_job_ptr) && - (show_flags & SHOW_DETAIL) && + (show_flags & SHOW_DETAIL2) && ((dump_job_ptr->user_id == (uint32_t) uid) || validate_slurm_user(uid))) { char *batch_script = get_job_script(dump_job_ptr); -- GitLab From 0f5902968754bc3ed5bc5353fb5ce36b1b122188 Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Fri, 25 May 2012 09:18:54 -0700 Subject: [PATCH 320/614] Change SchedulerParamters option from "bf_res=" to "bf_resolution=" This change makes the code consistent with the documentation. Note that "bf_res=" will continue to be recognized for now. Patch from Rod Schultz, Bull. --- NEWS | 2 ++ RELEASE_NOTES | 2 ++ src/plugins/sched/backfill/backfill.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index ff577aad7b..7b1c70a7ce 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,8 @@ documents those changes that are of interest to users and admins. compiling with --enable-debug -- Modify scontrol to require "-dd" option to report batch job's script. Patch from Don Albert, Bull. + -- Modify SchedulerParamters option to match documentation: "bf_res=" + changed to "bf_resolution=". Patch from Rod Schultz, Bull. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 97eab8841b..35872187cf 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -45,6 +45,8 @@ CONFIGURATION FILE CHANGES (see "man slurm.conf" for details) 300 seconds. * Added new "SchedulerParameters" of "bf_max_job_user", maximum number of jobs to attempt backfilling per user. +* Modify SchedulerParamters option to match documentation: "bf_res=" + changed to "bf_resolution=". COMMAND CHANGES (see man pages for details) =========================================== diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index 20bb6b9094..915de2ee2e 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -379,8 +379,12 @@ static void _load_config(void) fatal("Invalid backfill scheduler max_job_bf: %d", max_backfill_job_cnt); } + /* "bf_res=" is vestigial from version 2.3 and can be removed later. + * Only "bf_resolution=" is documented. */ if (sched_params && (tmp_ptr=strstr(sched_params, "bf_res="))) backfill_resolution = atoi(tmp_ptr + 7); + if (sched_params && (tmp_ptr=strstr(sched_params, "bf_resolution="))) + backfill_resolution = atoi(tmp_ptr + 14); if (backfill_resolution < 1) { fatal("Invalid backfill scheduler resolution: %d", backfill_resolution); -- GitLab From fbc0e71219aa7d192986b90639e9d9d53b2da5f2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 09:49:11 -0700 Subject: [PATCH 321/614] Correct default NodeAddr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to man slurm.conf, the default for NodeAddr is NodeName: "By default, the NodeAddr will be identical in value to NodeName." However, it seems the default is NodeHostname (when that differs from NodeName): With the following in slurmnodes.conf: Nodename=c0-0 NodeHostname=compute-0-0 ... I get NodeName=c0-0 Arch=x86_64 CoresPerSocket=2 CPUAlloc=0 CPUErr=0 CPUTot=4 Features=intel,rack0,hugemem Gres=(null) *** NodeAddr=compute-0-0 NodeHostName=compute-0-0 *** OS=Linux RealMemory=3949 Sockets=2 State=IDLE ThreadsPerCore=1 TmpDisk=10000 Weight=1027 BootTime=2012-05-08T15:07:08 SlurmdStartTime=2012-05-25T10:30:10 (This is with 2.4.0-0.pre4.) (We are planning to use cx-y instead of compute-x-y (the rocks default) on our next cluster, to save some typing.) -- Regards, Bjørn-Helge Mevik, dr. scient, Research Computing Services, University of Oslo --- doc/man/man5/slurm.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index a4837e9515..8dc9d77778 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -2328,7 +2328,7 @@ they must exactly match the entries in the \fBNodeName\fR (e.g. "NodeName=lx[0\-7] NodeAddr="elx[0\-7]"). \fBNodeAddr\fR may also contain IP addresses. By default, the \fBNodeAddr\fR will be identical in value to -\fBNodeName\fR. +\fBNodeHostname\fR. .TP \fBCoresPerSocket\fR -- GitLab From c1c231d1785fb614010652e7a85381c1070e9858 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 15:03:51 -0700 Subject: [PATCH 322/614] Change switch/nrt node_id to be IPv4 address rather than sequence number The node_number field is normally set to the 32-bit IPv4 address of the local node's host name. Bill LePera, IBM, 4/18/2012 --- src/plugins/switch/nrt/nrt.c | 56 +++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2f14c10c36..e98fcd79ea 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -160,13 +160,13 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, char *hostname, - int node_id, nrt_task_id_t task_id, + uint32_t node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space, bool ip_v4); static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, char *hostname, - int node_id, nrt_task_id_t task_id, + uint32_t node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space, bool ip_v4); @@ -744,10 +744,11 @@ _find_free_window(slurm_nrt_adapter_t *adapter) */ static int _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int node_id, nrt_task_id_t task_id, + char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_job_key_t job_key, nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, bool user_space, bool ip_v4) { + nrt_node_number_t node_number; slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; slurm_nrt_window_t *window; @@ -763,6 +764,19 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, return SLURM_ERROR; } + /* From Bill LePera, IBM, 4/18/2012: + * The node_number field is normally set to the 32-bit IPv4 address + * of the local node's host name. */ + node_number = node_id; /* Default value is sequence number */ + for (i = 0; i < node->adapter_count; i++) { + adapter = &node->adapter_list[i]; + if (adapter->adapter_type == NRT_IPONLY) { + memcpy(&node_number, &adapter->ipv4_addr, + sizeof(node_number)); + break; + } + } + /* Reserve a window on each adapter for this task */ for (i = 0; i < adapter_cnt; i++) { adapter = &node->adapter_list[i]; @@ -783,7 +797,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; ip_table += task_id; - ip_table->node_number = node_id; + ip_table->node_number = node_number; ip_table->task_id = task_id; if (ip_v4) { memcpy(&ip_table->ip.ipv4_addr, @@ -803,13 +817,13 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table->base_lid = base_lid; ib_table->port_id = 1; ib_table->lmc = 0; + ib_table->node_number = node_number; ib_table->task_id = task_id; ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; hfi_table += task_id; - hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; } else { @@ -835,10 +849,12 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, */ static int _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, - char *hostname, int node_id, nrt_task_id_t task_id, - nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space, bool ip_v4) + char *hostname, uint32_t node_id, + nrt_task_id_t task_id, nrt_job_key_t job_key, + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, + bool user_space, bool ip_v4) { + nrt_node_number_t node_number; slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; slurm_nrt_window_t *window; @@ -854,6 +870,19 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, return SLURM_ERROR; } + /* From Bill LePera, IBM, 4/18/2012: + * The node_number field is normally set to the 32-bit IPv4 address + * of the local node's host name. */ + node_number = node_id; /* Default value is sequence number */ + for (i = 0; i < node->adapter_count; i++) { + adapter = &node->adapter_list[i]; + if (adapter->adapter_type == NRT_IPONLY) { + memcpy(&node_number, &adapter->ipv4_addr, + sizeof(node_number)); + break; + } + } + /* find the adapter */ for (i = 0; i < node->adapter_count; i++) { debug("adapter %s at index %d", @@ -887,7 +916,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[0].table; ip_table += task_id; - ip_table->node_number = node_id; + ip_table->node_number = node_number; ip_table->task_id = task_id; if (ip_v4) { memcpy(&ip_table->ip.ipv4_addr, @@ -906,13 +935,13 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, ib_table->base_lid = base_lid; ib_table->port_id = 1; ib_table->lmc = 0; + ib_table->node_number = node_number; ib_table->task_id = task_id; ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; hfi_table = (nrt_hfi_task_info_t *) tableinfo[0].table; hfi_table += task_id; - hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; } else { @@ -1086,6 +1115,7 @@ _print_libstate(const slurm_nrt_libstate_t *l) static void _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) { + char addr_str[128]; int i; assert(table); @@ -1099,6 +1129,9 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) ib_tbl_ptr += i; info(" task_id: %u", ib_tbl_ptr->task_id); info(" win_id: %hu", ib_tbl_ptr->win_id); + inet_ntop(AF_INET, &ib_tbl_ptr->node_number, addr_str, + sizeof(addr_str)); + info(" node_number: %s", addr_str); info(" node_number: %u", ib_tbl_ptr->node_number); info(" device_name: %s", ib_tbl_ptr->device_name); info(" base_lid: %u", ib_tbl_ptr->base_lid); @@ -1120,6 +1153,9 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) ip_tbl_ptr = table; ip_tbl_ptr += i; info(" task_id: %u", ip_tbl_ptr->task_id); + inet_ntop(AF_INET, &ip_tbl_ptr->node_number, addr_str, + sizeof(addr_str)); + info(" node_number: %s", addr_str); info(" node_number: %u", ip_tbl_ptr->node_number); if (ip_v4) { inet_ntop(AF_INET, &ip_tbl_ptr->ip.ipv4_addr, -- GitLab From 6feff811ac2da1cd47ca8f48dc8312570cd0b95e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 15:39:35 -0700 Subject: [PATCH 323/614] Add node_number to switch/nrt IBM task un/pack logic --- src/plugins/switch/nrt/nrt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e98fcd79ea..d9c808e669 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2175,6 +2175,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, NRT_MAX_DEVICENAME_SIZE, buf); pack32(ib_tbl_ptr->base_lid, buf); pack8(ib_tbl_ptr->lmc, buf); + pack32(ib_tbl_ptr->node_number, buf); pack8(ib_tbl_ptr->port_id, buf); pack32(ib_tbl_ptr->task_id, buf); pack16(ib_tbl_ptr->win_id, buf); @@ -2276,6 +2277,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, goto unpack_error; safe_unpack32(&ib_tbl_ptr->base_lid, buf); safe_unpack8(&ib_tbl_ptr->lmc, buf); + safe_unpack32(&ib_tbl_ptr->node_number, buf); safe_unpack8(&ib_tbl_ptr->port_id, buf); safe_unpack32(&ib_tbl_ptr->task_id, buf); safe_unpack16(&ib_tbl_ptr->win_id, buf); -- GitLab From e536180df9c45c2e63ca652e066630b45994dc59 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 16:22:50 -0700 Subject: [PATCH 324/614] Correct job struct copy in switch/nrt --- src/plugins/switch/nrt/nrt.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d9c808e669..9d7785cabd 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2415,7 +2415,10 @@ nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) new->tableinfo = (nrt_tableinfo_t *) xmalloc(job->tables_per_task * sizeof(nrt_table_info_t)); for (i = 0; i < job->tables_per_task; i++) { - if (job->tableinfo->adapter_type == NRT_IB) { + if (!job->user_space || + (job->tableinfo->adapter_type == NRT_IPONLY)) { + base_size = sizeof(nrt_ip_task_info_t); + } else if (job->tableinfo->adapter_type == NRT_IB) { base_size = sizeof(nrt_ib_task_info_t); } else if (job->tableinfo->adapter_type == NRT_HFI) { base_size = sizeof(nrt_hfi_task_info_t); -- GitLab From 6bccf407a2ff5d97a91e75c6c210580b1d6724a9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 16:28:50 -0700 Subject: [PATCH 325/614] Fix bad switch/nrt pointer --- src/plugins/switch/nrt/nrt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 9d7785cabd..ccaaa9fe02 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -813,7 +813,6 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table += task_id; strncpy(ib_table->device_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); - ib_table += task_id; ib_table->base_lid = base_lid; ib_table->port_id = 1; ib_table->lmc = 0; -- GitLab From 9e5936d14393d8440ed5a14e770d6cd091c2b558 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 24 May 2012 14:03:32 -0700 Subject: [PATCH 326/614] Remove pointless check. The state_reason is set to WAIT_NO_REASON so acct_policy_job_runnable will always return true. --- src/slurmctld/job_scheduler.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index fdc8458a6f..19f0796c47 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -517,10 +517,8 @@ next_part: part_ptr = (struct part_record *) if ((job_ptr->state_reason == WAIT_QOS_JOB_LIMIT) || (job_ptr->state_reason == WAIT_QOS_RESOURCE_LIMIT) || - (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) { + (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) job_ptr->state_reason = WAIT_NO_REASON; - acct_policy_job_runnable(job_ptr); - } if ((job_ptr->state_reason == WAIT_NODE_NOT_AVAIL) && job_ptr->details && job_ptr->details->req_node_bitmap && -- GitLab From 5ec04e0ed7d8d6ed373073a2c252ddaabb791050 Mon Sep 17 00:00:00 2001 From: Don Albert Date: Fri, 25 May 2012 09:03:30 -0700 Subject: [PATCH 327/614] Modify scontrol show job to require -dd option to print batch script. I have implemented the changes as you suggested: using a "-dd" option to indicate that the display of the script is wanted, and setting both the "SHOW_DETAIL" and a new "SHOW_DETAIL2" flag. Since "scontrol" can be run interactively as well, I added a new "script" option to indicate that display of both the script and the details is wanted if the job is a batch job. Here are the man page updates for "man scontrol". For the "-d, --details" option: -d, --details Causes the show command to provide additional details where available. Repeating the option more than once (e.g., "-dd") will cause the show job command to also list the batch script, if the job was a batch job. For the interactive "details" option: details Causes the show command to provide additional details where available. Job information will include CPUs and NUMA memory allocated on each node. Note that on computers with hyperthreading enabled and SLURM configured to allocate cores, each listed CPU represents one physical core. Each hyperthread on that core can be allocated a separate task, so a job's CPU count and task count may differ. See the --cpu_bind and --mem_bind option descriptions in srun man pages for more information. The details option is currently only supported for the show job command. To also list the batch script for batch jobs, in addition to the details, use the script option described below instead of this option. And for the new interactive "script" option: script Causes the show job command to list the batch script for batch jobs in addition to the detail informa- tion described under the details option above. Attached are the patch file for the changes and a text file with the results of the tests I did to check out the changes. The patches are against SLURM 2.4.0-rc1. -Don Albert- --- NEWS | 2 ++ RELEASE_NOTES | 4 +++- doc/man/man1/scontrol.1 | 15 +++++++++++---- slurm/slurm.h.in | 1 + src/scontrol/info_job.c | 5 ++++- src/scontrol/scontrol.c | 14 ++++++++++++-- src/slurmctld/job_mgr.c | 2 +- 7 files changed, 34 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index d9e869fa16..f4719f6fb9 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ documents those changes that are of interest to users and admins. Bringhurst (LANL). -- BGQ - Fix issue when running with AllowSubBlockAllocations=Yes without compiling with --enable-debug + -- Modify scontrol to require "-dd" option to report batch job's script. Patch + from Don Albert, Bull. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/RELEASE_NOTES b/RELEASE_NOTES index dc4247c55e..97eab8841b 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,5 +1,5 @@ RELEASE NOTES FOR SLURM VERSION 2.4 -10 May 2012 +25 May 2012 IMPORTANT NOTE: @@ -70,6 +70,8 @@ COMMAND CHANGES (see man pages for details) was specified. Added output format of "%R" to print partition name only without identifying the default partition with "*"). * Added cpu_run_min to the output of sshare --long. +* Modify scontrol to require "-dd" option to report batch job's script. + OTHER CHANGES ============= diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 7ade312b81..0d7147855f 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -30,7 +30,9 @@ that are configured as hidden and partitions that are unavailable to user's group. .TP \fB\-d\fR, \fB\-\-details\fR -Causes the \fBshow\fR command to provide additional details where available. +Causes the \fIshow\fR command to provide additional details where available. +Repeating the option more than once (e.g., "\-dd") will cause the \fIshow job\fR +command to also list the batch script, if the job was a batch job. .TP \fB\-h\fR, \fB\-\-help\fR Print a help message describing the usage of scontrol. @@ -151,8 +153,6 @@ If the specified partition is in use, the request is denied. .TP \fBdetails\fP Causes the \fIshow\fP command to provide additional details where available. -Batch job information will include the batch script for jobs the user is -authorized to view. Job information will include CPUs and NUMA memory allocated on each node. Note that on computers with hyperthreading enabled and SLURM configured to allocate cores, each listed CPU represents one physical core. @@ -161,7 +161,8 @@ CPU count and task count may differ. See the \fB\-\-cpu_bind\fR and \fB\-\-mem_bind\fR option descriptions in srun man pages for more information. The \fBdetails\fP option is currently only supported for the \fIshow job\fP -command. +command. To also list the batch script for batch jobs, in addition to the +details, use the \fBscript\fP option described below instead of this option. .TP \fBexit\fP @@ -275,6 +276,12 @@ daemon reads the slurm.conf configuration file (e.g. when the daemon is restarted or \fBscontrol reconfigure\fR is executed) if the SlurmSchedLogLevel parameter is present. +.TP +\fBscript\fP +Causes the \fIshow job\fP command to list the batch script for batch +jobs in addition to the detail information described under the +\fBdetails\fP option above. + .TP \fBsetdebug\fP \fILEVEL\fP Change the debug level of the slurmctld daemon. diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index accc7eabaf..34f14020c3 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -526,6 +526,7 @@ enum node_states { * Values can be can be ORed */ #define SHOW_ALL 0x0001 /* Show info for "hidden" partitions */ #define SHOW_DETAIL 0x0002 /* Show detailed resource information */ +#define SHOW_DETAIL2 0x0004 /* Show batch script listing */ /* Define keys for ctx_key argument of slurm_step_ctx_get() */ enum ctx_keys { diff --git a/src/scontrol/info_job.c b/src/scontrol/info_job.c index 97caab696a..3f9e8b05fd 100644 --- a/src/scontrol/info_job.c +++ b/src/scontrol/info_job.c @@ -84,8 +84,11 @@ _scontrol_load_jobs(job_info_msg_t ** job_buffer_pptr, uint32_t job_id) if (all_flag) show_flags |= SHOW_ALL; - if (detail_flag) + if (detail_flag) { show_flags |= SHOW_DETAIL; + if (detail_flag > 1) + show_flags |= SHOW_DETAIL2; + } if (old_job_info_ptr) { if (last_show_flags != show_flags) diff --git a/src/scontrol/scontrol.c b/src/scontrol/scontrol.c index 63c8e74ec8..96a33d785b 100644 --- a/src/scontrol/scontrol.c +++ b/src/scontrol/scontrol.c @@ -143,7 +143,7 @@ main (int argc, char *argv[]) all_flag = 1; break; case (int)'d': - detail_flag = 1; + detail_flag++; break; case (int)'h': _usage (); @@ -706,6 +706,16 @@ _process_command (int argc, char *argv[]) } detail_flag = 1; } + else if (strncasecmp (tag, "script", MAX(tag_len, 3)) == 0) { + if (argc > 1) { + exit_code = 1; + fprintf (stderr, + "too many arguments for keyword:%s\n", + tag); + return 0; + } + detail_flag = 2; + } else if (strncasecmp (tag, "exit", MAX(tag_len, 1)) == 0) { if (argc > 1) { exit_code = 1; @@ -1039,7 +1049,7 @@ _process_command (int argc, char *argv[]) } } } - else if (strncasecmp (tag, "schedloglevel", MAX(tag_len, 2)) == 0) { + else if (strncasecmp (tag, "schedloglevel", MAX(tag_len, 3)) == 0) { if (argc > 2) { exit_code = 1; if (quiet_flag != 1) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 6d55bf1ca2..4c4fd88cb7 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -5735,7 +5735,7 @@ void pack_job(struct job_record *dump_job_ptr, uint16_t show_flags, Buf buffer, packstr(dump_job_ptr->gres, buffer); packstr(dump_job_ptr->batch_host, buffer); if (!IS_JOB_COMPLETED(dump_job_ptr) && - (show_flags & SHOW_DETAIL) && + (show_flags & SHOW_DETAIL2) && ((dump_job_ptr->user_id == (uint32_t) uid) || validate_slurm_user(uid))) { char *batch_script = get_job_script(dump_job_ptr); -- GitLab From 15520339e2f33bc07e9412a4e176fe44d84d507b Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Fri, 25 May 2012 09:18:54 -0700 Subject: [PATCH 328/614] Change SchedulerParamters option from "bf_res=" to "bf_resolution=" This change makes the code consistent with the documentation. Note that "bf_res=" will continue to be recognized for now. Patch from Rod Schultz, Bull. --- NEWS | 2 ++ RELEASE_NOTES | 2 ++ src/plugins/sched/backfill/backfill.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index f4719f6fb9..38fcaee465 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,8 @@ documents those changes that are of interest to users and admins. compiling with --enable-debug -- Modify scontrol to require "-dd" option to report batch job's script. Patch from Don Albert, Bull. + -- Modify SchedulerParamters option to match documentation: "bf_res=" + changed to "bf_resolution=". Patch from Rod Schultz, Bull. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 97eab8841b..35872187cf 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -45,6 +45,8 @@ CONFIGURATION FILE CHANGES (see "man slurm.conf" for details) 300 seconds. * Added new "SchedulerParameters" of "bf_max_job_user", maximum number of jobs to attempt backfilling per user. +* Modify SchedulerParamters option to match documentation: "bf_res=" + changed to "bf_resolution=". COMMAND CHANGES (see man pages for details) =========================================== diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index 20bb6b9094..915de2ee2e 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -379,8 +379,12 @@ static void _load_config(void) fatal("Invalid backfill scheduler max_job_bf: %d", max_backfill_job_cnt); } + /* "bf_res=" is vestigial from version 2.3 and can be removed later. + * Only "bf_resolution=" is documented. */ if (sched_params && (tmp_ptr=strstr(sched_params, "bf_res="))) backfill_resolution = atoi(tmp_ptr + 7); + if (sched_params && (tmp_ptr=strstr(sched_params, "bf_resolution="))) + backfill_resolution = atoi(tmp_ptr + 14); if (backfill_resolution < 1) { fatal("Invalid backfill scheduler resolution: %d", backfill_resolution); -- GitLab From f5a5b3b2d7d77a0698f88334e881de29a88a2be4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 25 May 2012 09:49:11 -0700 Subject: [PATCH 329/614] Correct default NodeAddr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to man slurm.conf, the default for NodeAddr is NodeName: "By default, the NodeAddr will be identical in value to NodeName." However, it seems the default is NodeHostname (when that differs from NodeName): With the following in slurmnodes.conf: Nodename=c0-0 NodeHostname=compute-0-0 ... I get NodeName=c0-0 Arch=x86_64 CoresPerSocket=2 CPUAlloc=0 CPUErr=0 CPUTot=4 Features=intel,rack0,hugemem Gres=(null) *** NodeAddr=compute-0-0 NodeHostName=compute-0-0 *** OS=Linux RealMemory=3949 Sockets=2 State=IDLE ThreadsPerCore=1 TmpDisk=10000 Weight=1027 BootTime=2012-05-08T15:07:08 SlurmdStartTime=2012-05-25T10:30:10 (This is with 2.4.0-0.pre4.) (We are planning to use cx-y instead of compute-x-y (the rocks default) on our next cluster, to save some typing.) -- Regards, Bjørn-Helge Mevik, dr. scient, Research Computing Services, University of Oslo --- doc/man/man5/slurm.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index ea4660989c..2bba399ba4 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -2338,7 +2338,7 @@ they must exactly match the entries in the \fBNodeName\fR (e.g. "NodeName=lx[0\-7] NodeAddr="elx[0\-7]"). \fBNodeAddr\fR may also contain IP addresses. By default, the \fBNodeAddr\fR will be identical in value to -\fBNodeName\fR. +\fBNodeHostname\fR. .TP \fBCoresPerSocket\fR -- GitLab From f0324da5e4d60098f862525a541f1cc5281fd26f Mon Sep 17 00:00:00 2001 From: Don Lipari Date: Tue, 29 May 2012 11:37:40 -0700 Subject: [PATCH 330/614] Fix bug that clears job pending reason field --- NEWS | 1 + src/slurmctld/acct_policy.c | 2 +- src/slurmctld/job_scheduler.c | 7 +++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 7b1c70a7ce..6b521f0658 100644 --- a/NEWS +++ b/NEWS @@ -15,6 +15,7 @@ documents those changes that are of interest to users and admins. from Don Albert, Bull. -- Modify SchedulerParamters option to match documentation: "bf_res=" changed to "bf_resolution=". Patch from Rod Schultz, Bull. + -- Fix bug that clears job pending reason field. Patch fron Don Lipari, LLNL. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/acct_policy.c b/src/slurmctld/acct_policy.c index ad15f96f09..3eaadccd53 100644 --- a/src/slurmctld/acct_policy.c +++ b/src/slurmctld/acct_policy.c @@ -1063,7 +1063,7 @@ extern bool acct_policy_job_runnable(struct job_record *job_ptr) return true; /* clear old state reason */ - if (acct_policy_job_runnable_state(job_ptr)) + if (!acct_policy_job_runnable_state(job_ptr)) job_ptr->state_reason = WAIT_NO_REASON; job_cpu_time_limit = (uint64_t)job_ptr->time_limit diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 6e222fac58..67f9b9dc19 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -554,10 +554,9 @@ extern int schedule(uint32_t job_limit) } } - if ((job_ptr->state_reason == WAIT_QOS_JOB_LIMIT) || - (job_ptr->state_reason == WAIT_QOS_RESOURCE_LIMIT) || - (job_ptr->state_reason == WAIT_QOS_TIME_LIMIT)) - job_ptr->state_reason = WAIT_NO_REASON; + if (!acct_policy_job_runnable_state(job_ptr) && + !acct_policy_job_runnable(job_ptr)) + continue; if ((job_ptr->state_reason == WAIT_NODE_NOT_AVAIL) && job_ptr->details && job_ptr->details->req_node_bitmap && -- GitLab From 7a299c363f6ebb91ac7a70083599c5ef2e5def27 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 29 May 2012 13:45:31 -0700 Subject: [PATCH 331/614] add extra error code for missing symbols --- src/common/plugin.c | 7 +++++-- src/common/plugin.h | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/common/plugin.c b/src/common/plugin.c index 522ef8144f..6bb5faf0d0 100644 --- a/src/common/plugin.c +++ b/src/common/plugin.c @@ -100,8 +100,11 @@ const char * plugin_strerror(plugin_err_t e) return ("Dlopen of plugin file failed"); case EPLUGIN_INIT_FAILED: return ("Plugin init() callback failed"); - case EPLUGIN_MISSING_SYMBOL: + case EPLUGIN_MISSING_NAME: return ("Plugin name/type/version symbol missing"); + case EPLUGIN_MISSING_SYMBOL: + return ("Plugin missing a required symbol use " + "debug3 to see"); } return ("Unknown error"); } @@ -188,7 +191,7 @@ plugin_load_from_file(plugin_handle_t *p, const char *fq_path) (dlsym(plug, PLUGIN_TYPE) == NULL) || (dlsym(plug, PLUGIN_VERSION) == NULL)) { dlclose (plug); - return EPLUGIN_MISSING_SYMBOL; + return EPLUGIN_MISSING_NAME; } /* diff --git a/src/common/plugin.h b/src/common/plugin.h index d310252efd..2773863310 100644 --- a/src/common/plugin.h +++ b/src/common/plugin.h @@ -94,7 +94,8 @@ typedef enum { EPLUGIN_ACCESS_ERROR, /* Access denied */ EPLUGIN_DLOPEN_FAILED, /* Dlopen not successful */ EPLUGIN_INIT_FAILED, /* Plugin's init() callback failed */ - EPLUGIN_MISSING_SYMBOL /* plugin_name/type/version missing */ + EPLUGIN_MISSING_NAME, /* plugin_name/type/version missing */ + EPLUGIN_MISSING_SYMBOL, /* some symbol needed isn't found */ } plugin_err_t; const char *plugin_strerror(plugin_err_t err); -- GitLab From 6d015792600655c5486bf4456fe7052c6ae4c035 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 29 May 2012 14:20:26 -0700 Subject: [PATCH 332/614] Changed jobacct_gather plugin infrastructure to be cleaner and easier to maintain. --- NEWS | 2 + doc/html/jobacct_gatherplugins.shtml | 191 +--- src/common/Makefile.am | 7 +- src/common/Makefile.in | 41 +- src/common/jobacct_common.c | 546 ----------- src/common/jobacct_common.h | 144 --- src/common/slurm_accounting_storage.c | 1 + src/common/slurm_jobacct_gather.c | 877 ++++++++++++++---- src/common/slurm_jobacct_gather.h | 99 +- src/common/slurm_protocol_defs.c | 7 +- src/common/slurm_protocol_pack.c | 41 +- src/common/slurm_xlator.h | 10 +- src/common/slurmdbd_defs.c | 8 +- src/common/stepd_api.c | 10 +- .../filetxt/filetxt_jobacct_process.h | 8 +- .../accounting_storage/mysql/as_mysql_job.c | 5 +- .../accounting_storage/pgsql/as_pg_common.h | 2 +- .../accounting_storage/pgsql/as_pg_job.c | 2 + .../slurmdbd/accounting_storage_slurmdbd.c | 3 +- src/plugins/gres/gpu/gres_gpu.c | 1 + .../jobacct_gather/aix/jobacct_gather_aix.c | 324 +------ .../cgroup/jobacct_gather_cgroup.c | 702 ++++---------- .../cgroup/jobacct_gather_cgroup.h | 2 +- .../linux/jobacct_gather_linux.c | 622 +++---------- .../jobcomp/filetxt/filetxt_jobcomp_process.c | 3 +- .../jobcomp/filetxt/filetxt_jobcomp_process.h | 6 +- .../jobcomp/mysql/mysql_jobcomp_process.h | 2 +- .../jobcomp/pgsql/pgsql_jobcomp_process.h | 2 +- src/sacctmgr/archive_functions.c | 2 + src/sacctmgr/sacctmgr.h | 3 +- src/slurmctld/controller.c | 4 +- src/slurmctld/step_mgr.c | 9 +- src/slurmd/slurmd/req.c | 27 +- src/slurmd/slurmd/slurmd.c | 4 +- src/slurmd/slurmstepd/mgr.c | 65 +- src/slurmd/slurmstepd/req.c | 29 +- src/slurmd/slurmstepd/slurmstepd.c | 11 +- src/slurmd/slurmstepd/slurmstepd_job.c | 17 +- src/slurmdbd/proc_req.c | 3 +- src/sreport/sreport.h | 2 +- src/sstat/sstat.c | 3 +- 41 files changed, 1321 insertions(+), 2526 deletions(-) delete mode 100644 src/common/jobacct_common.c delete mode 100644 src/common/jobacct_common.h diff --git a/NEWS b/NEWS index d9e869fa16..3fb3d0473d 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,8 @@ documents those changes that are of interest to users and admins. ============================= -- Add new output to "scontrol show configuration" of LicensesUsed. Output is "name:used/total" + -- Changed jobacct_gather plugin infrastructure to be cleaner and easier to + maintain. * Changes in SLURM 2.4.0.rc2 ============================= diff --git a/doc/html/jobacct_gatherplugins.shtml b/doc/html/jobacct_gatherplugins.shtml index e2f619b7e4..47eb3552f6 100644 --- a/doc/html/jobacct_gatherplugins.shtml +++ b/doc/html/jobacct_gatherplugins.shtml @@ -5,8 +5,7 @@

      Overview

      This document describes SLURM job accounting gather plugins and the API that defines them. It is intended as a resource to programmers wishing to write -their own SLURM job accounting gather plugins. This is version 1 of the API. - +their own SLURM job accounting gather plugins.

      SLURM job accounting gather plugins must conform to the SLURM Plugin API with the following specifications: @@ -25,6 +24,10 @@ for the type of accounting package. We currently use

      • aix— Gathers information from AIX /proc table and adds this information to the standard rusage information also gathered for each job. +
      • cgroup—Gathers information from Linux cgroup +infrastructure and adds this information to the standard rusage +information also gathered for each job. (Experimental, not to be used + in production.)
      • linux—Gathers information from Linux /proc table and adds this information to the standard rusage information also gathered for each job.
      • none—No information gathered. @@ -33,7 +36,7 @@ The sacct program can be used to display gathered data from regular accounting and from these plugins.

        The programmer is urged to study src/plugins/jobacct_gather/linux and -src/common/jobacct_common.c/.h +src/common/slurm_jobacct_gather.[c|h] for a sample implementation of a SLURM job accounting gather plugin.

        All of the following functions are required. Functions which are not implemented must be stubbed. -

        jobacctinfo_t *jobacct_gather_p_create(jobacct_id_t *jobacct_id) -

        Description:
        -jobacct_gather_p_alloc() used to alloc a pointer to and initialize a -new jobacctinfo structure.

        -You will need to free the information returned by this function! -

        Arguments:
        -tid -(input) id of the task send in (uint16_t)NO_VAL if no specfic task. -

        Returns:
        -jobacctinfo structure pointer on success, or
        -NULL on failure. - -

        void jobacct_gather_p_destroy(jobacctinfo_t *jobacct) -

        Description:
        -jobacct_gather_p_free() used to free the allocation made by jobacct_gather_p_alloc(). -

        Arguments:
        -jobacct -(input) structure to be freed.
        -none -

        Returns:
        -none - -

        -int jobacct_gather_p_setinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data) -

        Description:
        -jobacct_gather_p_setinfo() is called to set the values of a jobacctinfo_t to -specific values based on inputs. -

        Arguments:
        -jobacct -(input/output) structure to be altered.
        -type -(input) enum of specific part of jobacct to alter.
        -data -(input) corresponding data to set jobacct part to. -

        Returns:
        -SLURM_SUCCESS on success, or
        -SLURM_ERROR on failure. - -

        -int jobacct_gather_p_getinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data) -

        Description:
        -jobacct_gather_p_getinfo() is called to get the values of a jobacctinfo_t -specific values based on inputs. -

        Arguments:
        -jobacct -(input) structure to be queried.
        -type -(input) enum of specific part of jobacct to get.
        -data -(output) corresponding data to from jobacct part. -

        Returns:
        -SLURM_SUCCESS on success, or
        -SLURM_ERROR on failure. - -

        -void jobacct_gather_p_pack(jobacctinfo_t *jobacct, Buf buffer) -

        Description:
        -jobacct_gather_p_pack() pack jobacctinfo_t in a buffer to send across the network. -

        Arguments:
        -jobacct -(input) structure to pack.
        -buffer -(input/output) buffer to pack structure into. -

        Returns:
        -none - -

        -void jobacct_gather_p_unpack(jobacctinfo_t *jobacct, Buf buffer) +

        int jobacct_gather_p_poll_data(List task_list, bool pgid_plugin, uint64_t cont_id)

        Description:
        -jobacct_gather_p_unpack() unpack jobacctinfo_t from a buffer received from -the network. -You will need to free the jobacctinfo_t returned by this function! +jobacct_gather_p_poll_data() Build a table of all current processes.

        Arguments:
        -jobacct -(input/output) structure to fill.
        -buffer -(input) buffer to unpack structure from.
        -

        Returns: -SLURM_SUCCESS on success, or
        -SLURM_ERROR on failure. - -

        -void jobacct_gather_p_aggregate(jobacctinfo_t *dest, jobacctinfo_t *from) -

        Description:
        -jobacct_gather_p_aggregate() is called to aggregate and get max values from two -different jobacctinfo structures. -

        Arguments:
        -dest -(input/output) initial structure to be applied to.
        -from -(input) new info to apply to dest. -

        Returns:
        -none - -

        int jobacct_gather_p_startpoll(int frequency) -

        Description:
        -jobacct_gather_p_startpoll() is called at the start of the slurmstepd, -this starts a thread that should poll information to be queried at any time -during throughout the end of the process. -Put global initialization here. -

        Arguments:
        -frequency (input) poll frequency for polling -thread. -

        Returns:
        -SLURM_SUCCESS on success, or
        -SLURM_ERROR on failure. + task_list (in/out) List containing +current processes
        + pgid_plugin (input) if we are +running with the pgid plugin + cont_id (input) container id of processes if not running with pgid

        int jobacct_gather_p_endpoll()

        Description:
        @@ -163,36 +65,6 @@ polling thread. SLURM_SUCCESS on success, or
        SLURM_ERROR on failure. -

        void jobacct_gather_p_suspend_poll(void) -

        Description:
        -jobacct_gather_p_suspend_poll() is called when the process is suspended. -This causes the polling thread to halt until the process is resumed. -

        Arguments:
        -none -

        Returns:
        -none - -

        void jobacct_gather_p_resume_poll(void) -

        Description:
        -jobacct_gather_p_resume_poll() is called when the process is resumed. -This causes the polling thread to resume operation. -

        Arguments:
        -none -

        Returns:
        -none - -

        int jobacct_gather_p_set_proctrack_container_id(uint64_t cont_id) -

        Description:
        -jobacct_gather_p_set_proctrack_container_id() is called after the -proctrack container id is known at the start of the slurmstepd, -if using a proctrack plugin to track processes this will set the head -of the process tree in the plugin. -

        Arguments:
        -cont_id (input) procktrack container id. -

        Returns:
        -SLURM_SUCCESS on success, or
        -SLURM_ERROR on failure. -

        int jobacct_gather_p_add_task(pid_t pid, uint16_t tid)

        Description:
        jobacct_gather_p_add_task() used to add a task to the poller. @@ -203,39 +75,6 @@ jobacct_gather_p_add_task() used to add a task to the poller. SLURM_SUCCESS on success, or
        SLURM_ERROR on failure. -

        jobacctinfo_t *jobacct_gather_p_stat_task(pid_t pid) -

        Description:
        -jobacct_gather_p_stat_task() used to get most recent information about task. -You need to FREE the information returned by this function! -

        Arguments:
        - pid (input) Process id -

        Returns:
        -jobacctinfo structure pointer on success, or
        -NULL on failure. - -

        jobacctinfo_t *jobacct_gather_p_remove_task(pid_t pid) -

        Description:
        -jobacct_gather_p_remove_task() used to remove a task from the poller. -You need to FREE the information returned by this function! -

        Arguments:
        - pid (input) Process id -

        Returns:
        -Pointer to removed jobacctinfo_t structure -on success, or
        -NULL on failure. - -

        -void jobacct_gather_p_2_sacct(sacct_t *sacct, jobacctinfo_t *jobacct) -

        Description:
        -jobacct_gather_p_2_sacct() is called to transfer information from data structure -jobacct to structure sacct. -

        Arguments:
        -sacct -(input/output) initial structure to be applied to.
        -jobacct -(input) jobacctinfo_t structure containing information to apply to sacct. -

        Returns:
        -none

        Versioning

        -

        This document describes version 1 of the SLURM Job Accounting Gather API. Future +

        This document describes version 2 of the SLURM Job Accounting Gather API. Future releases of SLURM may revise this API. A job accounting gather plugin conveys its ability to implement a particular API version using the mechanism outlined for SLURM plugins.

        Last modified 15 April 2011

        +

        Last modified 29 May 2012

        diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 8df61a75d1..00b5cbde52 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -32,9 +32,9 @@ noinst_LTLIBRARIES = \ libspank.la libcommon_la_SOURCES = \ - xcgroup_read_config.c xcgroup_read_config.h \ - xcgroup.c xcgroup.h \ - xcpuinfo.c xcpuinfo.h \ + xcgroup_read_config.c xcgroup_read_config.h \ + xcgroup.c xcgroup.h \ + xcpuinfo.c xcpuinfo.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ @@ -85,7 +85,6 @@ libcommon_la_SOURCES = \ uid.c uid.h \ util-net.c util-net.h \ slurm_auth.c slurm_auth.h \ - jobacct_common.c jobacct_common.h \ slurm_accounting_storage.c slurm_accounting_storage.h \ slurm_jobacct_gather.c slurm_jobacct_gather.h \ slurm_jobcomp.c slurm_jobcomp.h \ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 5b7c4abcb3..f33bac7392 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -119,22 +119,21 @@ am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ slurm_rlimits_info.c slurmdb_defs.c slurmdb_defs.h \ slurmdb_pack.c slurmdb_pack.h slurmdbd_defs.c slurmdbd_defs.h \ working_cluster.c working_cluster.h uid.c uid.h util-net.c \ - util-net.h slurm_auth.c slurm_auth.h jobacct_common.c \ - jobacct_common.h slurm_accounting_storage.c \ - slurm_accounting_storage.h slurm_jobacct_gather.c \ - slurm_jobacct_gather.h slurm_jobcomp.c slurm_jobcomp.h \ - slurm_topology.c slurm_topology.h switch.c switch.h arg_desc.c \ - arg_desc.h macros.h malloc.c malloc.h getopt.h getopt.c \ - getopt1.c unsetenv.c unsetenv.h slurm_selecttype_info.c \ - slurm_selecttype_info.h slurm_resource_info.c \ - slurm_resource_info.h hostlist.c hostlist.h \ - slurm_step_layout.c slurm_step_layout.h checkpoint.c \ - checkpoint.h job_resources.c job_resources.h parse_time.c \ - parse_time.h job_options.c job_options.h global_defaults.c \ - timers.c timers.h slurm_xlator.h stepd_api.c stepd_api.h \ - write_labelled_message.c write_labelled_message.h proc_args.c \ - proc_args.h slurm_strcasestr.c slurm_strcasestr.h node_conf.h \ - node_conf.c gres.h gres.c + util-net.h slurm_auth.c slurm_auth.h \ + slurm_accounting_storage.c slurm_accounting_storage.h \ + slurm_jobacct_gather.c slurm_jobacct_gather.h slurm_jobcomp.c \ + slurm_jobcomp.h slurm_topology.c slurm_topology.h switch.c \ + switch.h arg_desc.c arg_desc.h macros.h malloc.c malloc.h \ + getopt.h getopt.c getopt1.c unsetenv.c unsetenv.h \ + slurm_selecttype_info.c slurm_selecttype_info.h \ + slurm_resource_info.c slurm_resource_info.h hostlist.c \ + hostlist.h slurm_step_layout.c slurm_step_layout.h \ + checkpoint.c checkpoint.h job_resources.c job_resources.h \ + parse_time.c parse_time.h job_options.c job_options.h \ + global_defaults.c timers.c timers.h slurm_xlator.h stepd_api.c \ + stepd_api.h write_labelled_message.c write_labelled_message.h \ + proc_args.c proc_args.h slurm_strcasestr.c slurm_strcasestr.h \ + node_conf.h node_conf.c gres.h gres.c @HAVE_UNSETENV_FALSE@am__objects_1 = unsetenv.lo am_libcommon_la_OBJECTS = xcgroup_read_config.lo xcgroup.lo \ xcpuinfo.lo assoc_mgr.lo xmalloc.lo xassert.lo xstring.lo \ @@ -147,7 +146,7 @@ am_libcommon_la_OBJECTS = xcgroup_read_config.lo xcgroup.lo \ slurm_protocol_socket_implementation.lo slurm_protocol_defs.lo \ slurm_rlimits_info.lo slurmdb_defs.lo slurmdb_pack.lo \ slurmdbd_defs.lo working_cluster.lo uid.lo util-net.lo \ - slurm_auth.lo jobacct_common.lo slurm_accounting_storage.lo \ + slurm_auth.lo slurm_accounting_storage.lo \ slurm_jobacct_gather.lo slurm_jobcomp.lo slurm_topology.lo \ switch.lo arg_desc.lo malloc.lo getopt.lo getopt1.lo \ $(am__objects_1) slurm_selecttype_info.lo \ @@ -421,9 +420,9 @@ noinst_LTLIBRARIES = \ libspank.la libcommon_la_SOURCES = \ - xcgroup_read_config.c xcgroup_read_config.h \ - xcgroup.c xcgroup.h \ - xcpuinfo.c xcpuinfo.h \ + xcgroup_read_config.c xcgroup_read_config.h \ + xcgroup.c xcgroup.h \ + xcpuinfo.c xcpuinfo.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ @@ -474,7 +473,6 @@ libcommon_la_SOURCES = \ uid.c uid.h \ util-net.c util-net.h \ slurm_auth.c slurm_auth.h \ - jobacct_common.c jobacct_common.h \ slurm_accounting_storage.c slurm_accounting_storage.h \ slurm_jobacct_gather.c slurm_jobacct_gather.h \ slurm_jobcomp.c slurm_jobcomp.h \ @@ -620,7 +618,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/io_hdr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/job_resources.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jobacct_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/log.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@ diff --git a/src/common/jobacct_common.c b/src/common/jobacct_common.c deleted file mode 100644 index dd31fb0ff4..0000000000 --- a/src/common/jobacct_common.c +++ /dev/null @@ -1,546 +0,0 @@ -/*****************************************************************************\ - * jobacct_common.c - common functions for almost all jobacct plugins. - ***************************************************************************** - * - * Copyright (C) 2005 Hewlett-Packard Development Company, L.P. - * Written by Danny Auble, - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * This file is patterned after jobcomp_linux.c, written by Morris Jette and - * Copyright (C) 2002 The Regents of the University of California. -\*****************************************************************************/ - -#if defined(__NetBSD__) -#include -#endif - -#include "src/common/jobacct_common.h" - -/* -** Define slurm-specific aliases for use by plugins, see slurm_xlator.h -** for details. - */ -strong_alias(jobacct_common_pack, slurm_jobacct_common_pack); -strong_alias(jobacct_common_unpack, slurm_jobacct_common_unpack); -strong_alias(jobacct_common_alloc_jobacct, slurm_jobacct_common_alloc_jobacct); -strong_alias(jobacct_common_free_jobacct, slurm_jobacct_common_free_jobacct); - -pthread_mutex_t jobacct_lock = PTHREAD_MUTEX_INITIALIZER; -uint32_t jobacct_job_id = 0; -uint32_t jobacct_step_id = 0; -uint32_t jobacct_mem_limit = 0; -uint32_t jobacct_vmem_limit = 0; -uint32_t mult = 1000; - -static void _pack_jobacct_id(jobacct_id_t *jobacct_id, - uint16_t rpc_version, Buf buffer) -{ - if (jobacct_id) { - pack32((uint32_t) jobacct_id->nodeid, buffer); - pack16((uint16_t) jobacct_id->taskid, buffer); - } else { - pack32((uint32_t) 0, buffer); - pack16((uint16_t) 0, buffer); - } -} - -static int _unpack_jobacct_id(jobacct_id_t *jobacct_id, - uint16_t rpc_version, Buf buffer) -{ - safe_unpack32(&jobacct_id->nodeid, buffer); - safe_unpack16(&jobacct_id->taskid, buffer); - return SLURM_SUCCESS; -unpack_error: - return SLURM_ERROR; -} - -extern int jobacct_common_init_struct(struct jobacctinfo *jobacct, - jobacct_id_t *jobacct_id) -{ - if (!jobacct_id) { - jobacct_id_t temp_id; - temp_id.taskid = (uint16_t)NO_VAL; - temp_id.nodeid = (uint32_t)NO_VAL; - jobacct_id = &temp_id; - } - memset(jobacct, 0, sizeof(struct jobacctinfo)); - jobacct->sys_cpu_sec = 0; - jobacct->sys_cpu_usec = 0; - jobacct->user_cpu_sec = 0; - jobacct->user_cpu_usec = 0; - - jobacct->max_vsize = 0; - memcpy(&jobacct->max_vsize_id, jobacct_id, sizeof(jobacct_id_t)); - jobacct->tot_vsize = 0; - jobacct->max_rss = 0; - memcpy(&jobacct->max_rss_id, jobacct_id, sizeof(jobacct_id_t)); - jobacct->tot_rss = 0; - jobacct->max_pages = 0; - memcpy(&jobacct->max_pages_id, jobacct_id, sizeof(jobacct_id_t)); - jobacct->tot_pages = 0; - jobacct->min_cpu = (uint32_t)NO_VAL; - memcpy(&jobacct->min_cpu_id, jobacct_id, sizeof(jobacct_id_t)); - jobacct->tot_cpu = 0; - - return SLURM_SUCCESS; -} - -extern struct jobacctinfo *jobacct_common_alloc_jobacct( - jobacct_id_t *jobacct_id) -{ - struct jobacctinfo *jobacct = xmalloc(sizeof(struct jobacctinfo)); - jobacct_common_init_struct(jobacct, jobacct_id); - return jobacct; -} - -extern void jobacct_common_free_jobacct(void *object) -{ - struct jobacctinfo *jobacct = (struct jobacctinfo *)object; - xfree(jobacct); -} - -extern int jobacct_common_setinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - int rc = SLURM_SUCCESS; - int *fd = (int *)data; - struct rusage *rusage = (struct rusage *)data; - uint32_t *uint32 = (uint32_t *) data; - jobacct_id_t *jobacct_id = (jobacct_id_t *) data; - struct jobacctinfo *send = (struct jobacctinfo *) data; - - slurm_mutex_lock(&jobacct_lock); - switch (type) { - case JOBACCT_DATA_TOTAL: - memcpy(jobacct, send, sizeof(struct jobacctinfo)); - break; - case JOBACCT_DATA_PIPE: - safe_write(*fd, jobacct, sizeof(struct jobacctinfo)); - break; - case JOBACCT_DATA_RUSAGE: - jobacct->user_cpu_sec = rusage->ru_utime.tv_sec; - jobacct->user_cpu_usec = rusage->ru_utime.tv_usec; - jobacct->sys_cpu_sec = rusage->ru_stime.tv_sec; - jobacct->sys_cpu_usec = rusage->ru_stime.tv_usec; - break; - case JOBACCT_DATA_MAX_RSS: - jobacct->max_rss = *uint32; - break; - case JOBACCT_DATA_MAX_RSS_ID: - jobacct->max_rss_id = *jobacct_id; - break; - case JOBACCT_DATA_TOT_RSS: - jobacct->tot_rss = *uint32; - break; - case JOBACCT_DATA_MAX_VSIZE: - jobacct->max_vsize = *uint32; - break; - case JOBACCT_DATA_MAX_VSIZE_ID: - jobacct->max_vsize_id = *jobacct_id; - break; - case JOBACCT_DATA_TOT_VSIZE: - jobacct->tot_vsize = *uint32; - break; - case JOBACCT_DATA_MAX_PAGES: - jobacct->max_pages = *uint32; - break; - case JOBACCT_DATA_MAX_PAGES_ID: - jobacct->max_pages_id = *jobacct_id; - break; - case JOBACCT_DATA_TOT_PAGES: - jobacct->tot_pages = *uint32; - break; - case JOBACCT_DATA_MIN_CPU: - jobacct->min_cpu = *uint32; - break; - case JOBACCT_DATA_MIN_CPU_ID: - jobacct->min_cpu_id = *jobacct_id; - break; - case JOBACCT_DATA_TOT_CPU: - jobacct->tot_cpu = *uint32; - break; - default: - debug("jobacct_g_set_setinfo data_type %d invalid", type); - } - slurm_mutex_unlock(&jobacct_lock); - return rc; -rwfail: - slurm_mutex_unlock(&jobacct_lock); - return SLURM_ERROR; - -} - -extern int jobacct_common_getinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - int rc = SLURM_SUCCESS; - int *fd = (int *)data; - uint32_t *uint32 = (uint32_t *) data; - jobacct_id_t *jobacct_id = (jobacct_id_t *) data; - struct rusage *rusage = (struct rusage *)data; - struct jobacctinfo *send = (struct jobacctinfo *) data; - - slurm_mutex_lock(&jobacct_lock); - switch (type) { - case JOBACCT_DATA_TOTAL: - memcpy(send, jobacct, sizeof(struct jobacctinfo)); - break; - case JOBACCT_DATA_PIPE: - safe_read(*fd, jobacct, sizeof(struct jobacctinfo)); - break; - case JOBACCT_DATA_RUSAGE: - memset(rusage, 0, sizeof(struct rusage)); - rusage->ru_utime.tv_sec = jobacct->user_cpu_sec; - rusage->ru_utime.tv_usec = jobacct->user_cpu_usec; - rusage->ru_stime.tv_sec = jobacct->sys_cpu_sec; - rusage->ru_stime.tv_usec = jobacct->sys_cpu_usec; - break; - case JOBACCT_DATA_MAX_RSS: - *uint32 = jobacct->max_rss; - break; - case JOBACCT_DATA_MAX_RSS_ID: - *jobacct_id = jobacct->max_rss_id; - break; - case JOBACCT_DATA_TOT_RSS: - *uint32 = jobacct->tot_rss; - break; - case JOBACCT_DATA_MAX_VSIZE: - *uint32 = jobacct->max_vsize; - break; - case JOBACCT_DATA_MAX_VSIZE_ID: - *jobacct_id = jobacct->max_vsize_id; - break; - case JOBACCT_DATA_TOT_VSIZE: - *uint32 = jobacct->tot_vsize; - break; - case JOBACCT_DATA_MAX_PAGES: - *uint32 = jobacct->max_pages; - break; - case JOBACCT_DATA_MAX_PAGES_ID: - *jobacct_id = jobacct->max_pages_id; - break; - case JOBACCT_DATA_TOT_PAGES: - *uint32 = jobacct->tot_pages; - break; - case JOBACCT_DATA_MIN_CPU: - *uint32 = jobacct->min_cpu; - break; - case JOBACCT_DATA_MIN_CPU_ID: - *jobacct_id = jobacct->min_cpu_id; - break; - case JOBACCT_DATA_TOT_CPU: - *uint32 = jobacct->tot_cpu; - break; - default: - debug("jobacct_g_set_getinfo data_type %d invalid", type); - } - slurm_mutex_unlock(&jobacct_lock); - return rc; -rwfail: - slurm_mutex_unlock(&jobacct_lock); - return SLURM_ERROR; - -} - -extern void jobacct_common_aggregate(struct jobacctinfo *dest, - struct jobacctinfo *from) -{ - xassert(dest); - - if (!from) - return; - - slurm_mutex_lock(&jobacct_lock); - if (dest->max_vsize < from->max_vsize) { - dest->max_vsize = from->max_vsize; - dest->max_vsize_id = from->max_vsize_id; - } - dest->tot_vsize += from->tot_vsize; - - if (dest->max_rss < from->max_rss) { - dest->max_rss = from->max_rss; - dest->max_rss_id = from->max_rss_id; - } - dest->tot_rss += from->tot_rss; - - if (dest->max_pages < from->max_pages) { - dest->max_pages = from->max_pages; - dest->max_pages_id = from->max_pages_id; - } - dest->tot_pages += from->tot_pages; - - if ((dest->min_cpu > from->min_cpu) - || (dest->min_cpu == (uint32_t)NO_VAL)) { - if (from->min_cpu == (uint32_t)NO_VAL) - from->min_cpu = 0; - dest->min_cpu = from->min_cpu; - dest->min_cpu_id = from->min_cpu_id; - } - dest->tot_cpu += from->tot_cpu; - - if (dest->max_vsize_id.taskid == (uint16_t)NO_VAL) - dest->max_vsize_id = from->max_vsize_id; - - if (dest->max_rss_id.taskid == (uint16_t)NO_VAL) - dest->max_rss_id = from->max_rss_id; - - if (dest->max_pages_id.taskid == (uint16_t)NO_VAL) - dest->max_pages_id = from->max_pages_id; - - if (dest->min_cpu_id.taskid == (uint16_t)NO_VAL) - dest->min_cpu_id = from->min_cpu_id; - - dest->user_cpu_sec += from->user_cpu_sec; - dest->user_cpu_usec += from->user_cpu_usec; - while (dest->user_cpu_usec >= 1E6) { - dest->user_cpu_sec++; - dest->user_cpu_usec -= 1E6; - } - dest->sys_cpu_sec += from->sys_cpu_sec; - dest->sys_cpu_usec += from->sys_cpu_usec; - while (dest->sys_cpu_usec >= 1E6) { - dest->sys_cpu_sec++; - dest->sys_cpu_usec -= 1E6; - } - - slurm_mutex_unlock(&jobacct_lock); -} - -extern void jobacct_common_2_stats(slurmdb_stats_t *stats, - struct jobacctinfo *jobacct) -{ - xassert(jobacct); - xassert(stats); - slurm_mutex_lock(&jobacct_lock); - stats->vsize_max = jobacct->max_vsize; - stats->vsize_max_nodeid = jobacct->max_vsize_id.nodeid; - stats->vsize_max_taskid = jobacct->max_vsize_id.taskid; - stats->vsize_ave = (double)jobacct->tot_vsize; - stats->rss_max = jobacct->max_rss; - stats->rss_max_nodeid = jobacct->max_rss_id.nodeid; - stats->rss_max_taskid = jobacct->max_rss_id.taskid; - stats->rss_ave = (double)jobacct->tot_rss; - stats->pages_max = jobacct->max_pages; - stats->pages_max_nodeid = jobacct->max_pages_id.nodeid; - stats->pages_max_taskid = jobacct->max_pages_id.taskid; - stats->pages_ave = (double)jobacct->tot_pages; - stats->cpu_min = jobacct->min_cpu; - stats->cpu_min_nodeid = jobacct->min_cpu_id.nodeid; - stats->cpu_min_taskid = jobacct->min_cpu_id.taskid; - stats->cpu_ave = (double)jobacct->tot_cpu; - slurm_mutex_unlock(&jobacct_lock); -} - -extern void jobacct_common_pack(struct jobacctinfo *jobacct, - uint16_t rpc_version, Buf buffer) -{ - int i = 0; - - if (!jobacct) { - for (i = 0; i < 12; i++) - pack32((uint32_t) 0, buffer); - for (i = 0; i < 4; i++) - _pack_jobacct_id(NULL, rpc_version, buffer); - return; - } - - slurm_mutex_lock(&jobacct_lock); - pack32((uint32_t)jobacct->user_cpu_sec, buffer); - pack32((uint32_t)jobacct->user_cpu_usec, buffer); - pack32((uint32_t)jobacct->sys_cpu_sec, buffer); - pack32((uint32_t)jobacct->sys_cpu_usec, buffer); - pack32((uint32_t)jobacct->max_vsize, buffer); - pack32((uint32_t)jobacct->tot_vsize, buffer); - pack32((uint32_t)jobacct->max_rss, buffer); - pack32((uint32_t)jobacct->tot_rss, buffer); - pack32((uint32_t)jobacct->max_pages, buffer); - pack32((uint32_t)jobacct->tot_pages, buffer); - pack32((uint32_t)jobacct->min_cpu, buffer); - pack32((uint32_t)jobacct->tot_cpu, buffer); - - _pack_jobacct_id(&jobacct->max_vsize_id, rpc_version, buffer); - _pack_jobacct_id(&jobacct->max_rss_id, rpc_version, buffer); - _pack_jobacct_id(&jobacct->max_pages_id, rpc_version, buffer); - _pack_jobacct_id(&jobacct->min_cpu_id, rpc_version, buffer); - slurm_mutex_unlock(&jobacct_lock); -} - -/* you need to xfree this */ -extern int jobacct_common_unpack(struct jobacctinfo **jobacct, - uint16_t rpc_version, Buf buffer) -{ - uint32_t uint32_tmp; - - *jobacct = xmalloc(sizeof(struct jobacctinfo)); - safe_unpack32(&uint32_tmp, buffer); - (*jobacct)->user_cpu_sec = uint32_tmp; - safe_unpack32(&uint32_tmp, buffer); - (*jobacct)->user_cpu_usec = uint32_tmp; - safe_unpack32(&uint32_tmp, buffer); - (*jobacct)->sys_cpu_sec = uint32_tmp; - safe_unpack32(&uint32_tmp, buffer); - (*jobacct)->sys_cpu_usec = uint32_tmp; - safe_unpack32(&(*jobacct)->max_vsize, buffer); - safe_unpack32(&(*jobacct)->tot_vsize, buffer); - safe_unpack32(&(*jobacct)->max_rss, buffer); - safe_unpack32(&(*jobacct)->tot_rss, buffer); - safe_unpack32(&(*jobacct)->max_pages, buffer); - safe_unpack32(&(*jobacct)->tot_pages, buffer); - safe_unpack32(&(*jobacct)->min_cpu, buffer); - safe_unpack32(&(*jobacct)->tot_cpu, buffer); - - if (_unpack_jobacct_id(&(*jobacct)->max_vsize_id, rpc_version, buffer) - != SLURM_SUCCESS) - goto unpack_error; - if (_unpack_jobacct_id(&(*jobacct)->max_rss_id, rpc_version, buffer) - != SLURM_SUCCESS) - goto unpack_error; - if (_unpack_jobacct_id(&(*jobacct)->max_pages_id, rpc_version, buffer) - != SLURM_SUCCESS) - goto unpack_error; - if (_unpack_jobacct_id(&(*jobacct)->min_cpu_id, rpc_version, buffer) - != SLURM_SUCCESS) - goto unpack_error; - - return SLURM_SUCCESS; - -unpack_error: - debug2("jobacct_common_unpack:" - "unpack_error: size_buf(buffer) %u", - size_buf(buffer)); - xfree(*jobacct); - return SLURM_ERROR; -} - -extern int jobacct_common_set_mem_limit(uint32_t job_id, uint32_t step_id, - uint32_t mem_limit) -{ - if ((job_id == 0) || (mem_limit == 0)) { - error("jobacct_common_set_mem_limit: jobid:%u mem_limit:%u", - job_id, mem_limit); - return SLURM_ERROR; - } - - jobacct_job_id = job_id; - jobacct_step_id = step_id; - jobacct_mem_limit = mem_limit * 1024; /* MB to KB */ - jobacct_vmem_limit = jobacct_mem_limit; - jobacct_vmem_limit *= (slurm_get_vsize_factor() / 100.0); - return SLURM_SUCCESS; -} - -extern int jobacct_common_add_task(pid_t pid, jobacct_id_t *jobacct_id, - List task_list) -{ - struct jobacctinfo *jobacct = jobacct_common_alloc_jobacct(jobacct_id); - - slurm_mutex_lock(&jobacct_lock); - if(pid <= 0) { - error("invalid pid given (%d) for task acct", pid); - goto error; - } else if (!task_list) { - error("no task list created!"); - goto error; - } - - jobacct->pid = pid; - jobacct->min_cpu = 0; - debug2("adding task %u pid %d on node %u to jobacct", - jobacct_id->taskid, pid, jobacct_id->nodeid); - list_push(task_list, jobacct); - slurm_mutex_unlock(&jobacct_lock); - - return SLURM_SUCCESS; -error: - slurm_mutex_unlock(&jobacct_lock); - jobacct_common_free_jobacct(jobacct); - return SLURM_ERROR; -} - -extern struct jobacctinfo *jobacct_common_stat_task(pid_t pid, List task_list) -{ - struct jobacctinfo *jobacct = NULL; - struct jobacctinfo *ret_jobacct = NULL; - ListIterator itr = NULL; - - slurm_mutex_lock(&jobacct_lock); - if (!task_list) { - error("no task list created!"); - goto error; - } - - itr = list_iterator_create(task_list); - while((jobacct = list_next(itr))) { - if(jobacct->pid == pid) - break; - } - list_iterator_destroy(itr); - if (jobacct == NULL) - goto error; - ret_jobacct = xmalloc(sizeof(struct jobacctinfo)); - memcpy(ret_jobacct, jobacct, sizeof(struct jobacctinfo)); -error: - slurm_mutex_unlock(&jobacct_lock); - return ret_jobacct; -} - -extern struct jobacctinfo *jobacct_common_remove_task(pid_t pid, List task_list) -{ - struct jobacctinfo *jobacct = NULL; - - ListIterator itr = NULL; - - slurm_mutex_lock(&jobacct_lock); - if (!task_list) { - error("no task list created!"); - goto error; - } - - itr = list_iterator_create(task_list); - while((jobacct = list_next(itr))) { - if(jobacct->pid == pid) { - list_remove(itr); - break; - } - } - list_iterator_destroy(itr); - if(jobacct) { - debug2("removing task %u pid %d from jobacct", - jobacct->max_vsize_id.taskid, jobacct->pid); - } else { - debug2("pid(%d) not being watched in jobacct!", pid); - } -error: - slurm_mutex_unlock(&jobacct_lock); - return jobacct; -} - diff --git a/src/common/jobacct_common.h b/src/common/jobacct_common.h deleted file mode 100644 index eb6616e512..0000000000 --- a/src/common/jobacct_common.h +++ /dev/null @@ -1,144 +0,0 @@ -/*****************************************************************************\ - * jobacct_common.h - common functions for almost all jobacct plugins. - ***************************************************************************** - * - * Copyright (C) 2005 Hewlett-Packard Development Company, L.P. - * Written by Danny Auble, - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - * This file is patterned after jobcomp_linux.c, written by Morris Jette and - * Copyright (C) 2002 The Regents of the University of California. -\*****************************************************************************/ - -#ifndef _HAVE_JOBACCT_COMMON_H -#define _HAVE_JOBACCT_COMMON_H - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#if HAVE_STDINT_H -# include -#endif -#if HAVE_INTTYPES_H -# include -#endif - -#include -#include - -#include "slurm/slurmdb.h" - -#include "src/common/xmalloc.h" -#include "src/common/list.h" -#include "src/common/xstring.h" -#include "src/common/node_select.h" -#include "src/slurmd/slurmstepd/slurmstepd_job.h" - - -#include - -#define BUFFER_SIZE 4096 -#define FDUMP_FLAG 0x04 - -typedef struct { - uint16_t taskid; /* contains which task number it was on */ - uint32_t nodeid; /* contains which node number it was on */ - slurmd_job_t *job; /* contains slurmd job pointer */ -} jobacct_id_t; - -struct jobacctinfo { - pid_t pid; - uint32_t sys_cpu_sec; - uint32_t sys_cpu_usec; - uint32_t user_cpu_sec; - uint32_t user_cpu_usec; - uint32_t max_vsize; /* max size of virtual memory */ - jobacct_id_t max_vsize_id; /* contains which task number it was on */ - uint32_t tot_vsize; /* total virtual memory - (used to figure out ave later) */ - uint32_t max_rss; /* max Resident Set Size */ - jobacct_id_t max_rss_id; /* contains which task it was on */ - uint32_t tot_rss; /* total rss - (used to figure out ave later) */ - uint32_t max_pages; /* max pages */ - jobacct_id_t max_pages_id; /* contains which task it was on */ - uint32_t tot_pages; /* total pages - (used to figure out ave later) */ - uint32_t min_cpu; /* min cpu time */ - jobacct_id_t min_cpu_id; /* contains which task it was on */ - uint32_t tot_cpu; /* total cpu time(used to figure out ave later) */ -}; - -/* Define jobacctinfo_t below to avoid including extraneous slurm headers */ -#ifndef __jobacctinfo_t_defined -# define __jobacctinfo_t_defined - typedef struct jobacctinfo jobacctinfo_t; /* opaque data type */ -#endif - -/* These should only be called from the jobacct-gather plugin */ -extern int jobacct_common_init_struct(struct jobacctinfo *jobacct, - jobacct_id_t *jobacct_id); -extern struct jobacctinfo *jobacct_common_alloc_jobacct( - jobacct_id_t *jobacct_id); -extern void jobacct_common_free_jobacct(void *object); -extern int jobacct_common_setinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data); -extern int jobacct_common_getinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data); -extern void jobacct_common_aggregate(struct jobacctinfo *dest, - struct jobacctinfo *from); -extern void jobacct_common_2_stats(slurmdb_stats_t *stats, - struct jobacctinfo *jobacct); -extern void jobacct_common_pack(struct jobacctinfo *jobacct, - uint16_t rpc_version, Buf buffer); -extern int jobacct_common_unpack(struct jobacctinfo **jobacct, - uint16_t rpc_version, Buf buffer); - -extern int jobacct_common_set_mem_limit(uint32_t job_id, uint32_t step_id, - uint32_t mem_limit); -extern int jobacct_common_add_task(pid_t pid, jobacct_id_t *jobacct_id, - List task_list); -extern struct jobacctinfo *jobacct_common_stat_task(pid_t pid, List task_list); -extern struct jobacctinfo *jobacct_common_remove_task(pid_t pid, - List task_list); -/***************************************************************/ - - -/* defined in jobacct_common.c */ -extern pthread_mutex_t jobacct_lock; -extern uint32_t jobacct_job_id; -extern uint32_t jobacct_step_id; -extern uint32_t jobacct_mem_limit; /* step's memory limit in KB */ -extern uint32_t jobacct_vmem_limit; /* step's virutal memory limit in KB */ - -#endif diff --git a/src/common/slurm_accounting_storage.c b/src/common/slurm_accounting_storage.c index 0d074fe983..c3ded92528 100644 --- a/src/common/slurm_accounting_storage.c +++ b/src/common/slurm_accounting_storage.c @@ -53,6 +53,7 @@ #include "src/common/list.h" #include "src/common/plugin.h" #include "src/common/plugrack.h" +#include "src/common/node_select.h" #include "src/common/slurm_accounting_storage.h" #include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_defs.h" diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 294eae6b9f..a7128c03e4 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -59,6 +59,15 @@ #include "src/common/xstring.h" #include "src/slurmd/slurmstepd/slurmstepd_job.h" +/* +** Define slurm-specific aliases for use by plugins, see slurm_xlator.h +** for details. + */ +strong_alias(jobacctinfo_pack, slurm_jobacctinfo_pack); +strong_alias(jobacctinfo_unpack, slurm_jobacctinfo_unpack); +strong_alias(jobacctinfo_create, slurm_jobacctinfo_create); +strong_alias(jobacctinfo_destroy, slurm_jobacctinfo_destroy); + /* * WARNING: Do not change the order of these fields or add additional @@ -67,29 +76,9 @@ * at the end of the structure. */ typedef struct slurm_jobacct_gather_ops { - jobacctinfo_t *(*jobacct_gather_create)(jobacct_id_t *jobacct_id); - void (*jobacct_gather_destroy) (jobacctinfo_t *jobacct); - int (*jobacct_gather_setinfo) (jobacctinfo_t *jobacct, - enum jobacct_data_type type, - void *data); - int (*jobacct_gather_getinfo) (jobacctinfo_t *jobacct, - enum jobacct_data_type type, - void *data); - void (*jobacct_gather_pack) (jobacctinfo_t *jobacct, uint16_t rpc_version, Buf buffer); - int (*jobacct_gather_unpack) (jobacctinfo_t **jobacct, uint16_t rpc_version, Buf buffer); - void (*jobacct_gather_aggregate) (jobacctinfo_t *dest, - jobacctinfo_t *from); - int (*jobacct_gather_startpoll) (uint16_t frequency); - int (*jobacct_gather_endpoll) (); - void (*jobacct_gather_change_poll) (uint16_t frequency); - void (*jobacct_gather_suspend_poll) (); - void (*jobacct_gather_resume_poll) (); - int (*jobacct_gather_set_proctrack_container_id)(uint64_t id); - int (*jobacct_gather_add_task) (pid_t pid, jobacct_id_t *jobacct_id); - jobacctinfo_t *(*jobacct_gather_stat_task)(pid_t pid); - jobacctinfo_t *(*jobacct_gather_remove_task)(pid_t pid); - void (*jobacct_gather_2_stats) (slurmdb_stats_t *stats, - jobacctinfo_t *jobacct); + void (*poll_data) (List task_list, bool pgid_plugin, uint64_t cont_id); + int (*endpoll) (); + int (*add_task) (pid_t pid, jobacct_id_t *jobacct_id); } slurm_jobacct_gather_ops_t; /* @@ -97,30 +86,120 @@ typedef struct slurm_jobacct_gather_ops { * for slurm_jobacct_gather_ops_t. */ static const char *syms[] = { - "jobacct_gather_p_create", - "jobacct_gather_p_destroy", - "jobacct_gather_p_setinfo", - "jobacct_gather_p_getinfo", - "jobacct_gather_p_pack", - "jobacct_gather_p_unpack", - "jobacct_gather_p_aggregate", - "jobacct_gather_p_startpoll", + "jobacct_gather_p_poll_data", "jobacct_gather_p_endpoll", - "jobacct_gather_p_change_poll", - "jobacct_gather_p_suspend_poll", - "jobacct_gather_p_resume_poll", - "jobacct_gather_p_set_proctrack_container_id", "jobacct_gather_p_add_task", - "jobacct_gather_p_stat_task", - "jobacct_gather_p_remove_task", - "jobacct_gather_p_2_stats" }; static slurm_jobacct_gather_ops_t ops; static plugin_context_t *g_context = NULL; static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; -static int _slurm_jobacct_gather_init(void) +static int freq = 0; +static bool pgid_plugin = false; +static List task_list = NULL; +static uint64_t cont_id = (uint64_t)NO_VAL; +static pthread_mutex_t task_list_lock = PTHREAD_MUTEX_INITIALIZER; + +static bool jobacct_shutdown = true; +static bool jobacct_suspended = 0; + +static uint32_t jobacct_job_id = 0; +static uint32_t jobacct_step_id = 0; +static uint32_t jobacct_mem_limit = 0; +static uint32_t jobacct_vmem_limit = 0; + +/* _acct_kill_step() issue RPC to kill a slurm job step */ +static void _acct_kill_step(void) +{ + slurm_msg_t msg; + job_step_kill_msg_t req; + job_notify_msg_t notify_req; + + slurm_msg_t_init(&msg); + notify_req.job_id = jobacct_job_id; + notify_req.job_step_id = jobacct_step_id; + notify_req.message = "Exceeded job memory limit"; + msg.msg_type = REQUEST_JOB_NOTIFY; + msg.data = ¬ify_req; + slurm_send_only_controller_msg(&msg); + + /* + * Request message: + */ + req.job_id = jobacct_job_id; + req.job_step_id = jobacct_step_id; + req.signal = SIGKILL; + req.batch_flag = 0; + msg.msg_type = REQUEST_CANCEL_JOB_STEP; + msg.data = &req; + + slurm_send_only_controller_msg(&msg); +} + +static void _pack_jobacct_id(jobacct_id_t *jobacct_id, + uint16_t rpc_version, Buf buffer) +{ + if (jobacct_id) { + pack32((uint32_t) jobacct_id->nodeid, buffer); + pack16((uint16_t) jobacct_id->taskid, buffer); + } else { + pack32((uint32_t) 0, buffer); + pack16((uint16_t) 0, buffer); + } +} + +static int _unpack_jobacct_id(jobacct_id_t *jobacct_id, + uint16_t rpc_version, Buf buffer) +{ + safe_unpack32(&jobacct_id->nodeid, buffer); + safe_unpack16(&jobacct_id->taskid, buffer); + + return SLURM_SUCCESS; +unpack_error: + return SLURM_ERROR; +} + +static void _poll_data(void) +{ + if (jobacct_suspended) + return; + + /* Update the data */ + slurm_mutex_lock(&task_list_lock); + (*(ops.poll_data))(task_list, pgid_plugin, cont_id); + slurm_mutex_unlock(&task_list_lock); +} + +static void _task_sleep(int rem) +{ + while (rem) + rem = sleep(rem); /* subject to interupt */ +} + + +/* _watch_tasks() -- monitor slurm jobs and track their memory usage + * + * IN, OUT: Irrelevant; this is invoked by pthread_create() + */ + +static void *_watch_tasks(void *arg) +{ + /* Give chance for processes to spawn before starting + * the polling. This should largely eliminate the + * the chance of having /proc open when the tasks are + * spawned, which would prevent a valid checkpoint/restart + * with some systems */ + _task_sleep(1); + + while (!jobacct_shutdown) { /* Do this until shutdown is requested */ + _poll_data(); + _task_sleep(freq); + } + return NULL; +} + +extern int jobacct_gather_init(void) { char *plugin_type = "jobacct_gather"; char *type = NULL; @@ -143,23 +222,35 @@ static int _slurm_jobacct_gather_init(void) retval = SLURM_ERROR; goto done; } + plugin_type = type; + + type = slurm_get_proctrack_type(); + if(!strcasecmp(type, "proctrack/pgid")) { + info("WARNING: We will use a much slower algorithm with " + "proctrack/pgid, use Proctracktype=proctrack/linuxproc " + "or some other proctrack when using %s", + plugin_type); + pgid_plugin = true; + } + xfree(type); + xfree(plugin_type); + + type = slurm_get_accounting_storage_type(); + if(!strcasecmp(type, ACCOUNTING_STORAGE_TYPE_NONE)) { + error("WARNING: Even though we are collecting accounting " + "information you have asked for it not to be stored " + "(%s) if this is not what you have in mind you will " + "need to change it.", ACCOUNTING_STORAGE_TYPE_NONE); + } done: - slurm_mutex_unlock( &g_context_lock ); + slurm_mutex_unlock(&g_context_lock); xfree(type); return(retval); } -extern int slurm_jobacct_gather_init(void) -{ - if (_slurm_jobacct_gather_init() < 0) - return SLURM_ERROR; - - return SLURM_SUCCESS; -} - -extern int slurm_jobacct_gather_fini(void) +extern int jobacct_gather_fini(void) { int rc = SLURM_SUCCESS; @@ -172,210 +263,632 @@ extern int slurm_jobacct_gather_fini(void) return rc; } -extern jobacctinfo_t *jobacct_gather_g_create(jobacct_id_t *jobacct_id) +extern int jobacct_gather_startpoll(uint16_t frequency) { - jobacctinfo_t *jobacct = NULL; + int retval = SLURM_SUCCESS; + pthread_attr_t attr; + pthread_t _watch_tasks_thread_id; - if (_slurm_jobacct_gather_init() < 0) - return jobacct; + if (jobacct_gather_init() < 0) + return SLURM_ERROR; - slurm_mutex_lock(&g_context_lock); - jobacct = (*(ops.jobacct_gather_create))(jobacct_id); - slurm_mutex_unlock(&g_context_lock); - return jobacct; -} + if (!jobacct_shutdown) { + error("jobacct_gather_startpoll: poll already started!"); + return retval; + } -extern void jobacct_gather_g_destroy(jobacctinfo_t *jobacct) -{ - if (_slurm_jobacct_gather_init() < 0) - return; + jobacct_shutdown = false; - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_destroy))(jobacct); - slurm_mutex_unlock(&g_context_lock); - return; -} + freq = frequency; -extern int jobacct_gather_g_setinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data) -{ - int retval = SLURM_SUCCESS; + task_list = list_create(jobacctinfo_destroy); + if (frequency == 0) { /* don't want dynamic monitoring? */ + debug2("jobacct AIX dynamic logging disabled"); + return retval; + } - if (_slurm_jobacct_gather_init() < 0) - return SLURM_ERROR; + /* create polling thread */ + slurm_attr_init(&attr); + if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) + error("pthread_attr_setdetachstate error %m"); + + if (pthread_create(&_watch_tasks_thread_id, &attr, + &_watch_tasks, NULL)) { + debug("jobacct-gather failed to create _watch_tasks " + "thread: %m"); + frequency = 0; + } else + debug3("jobacct-gather AIX dynamic logging enabled"); + slurm_attr_destroy(&attr); - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_setinfo))(jobacct, type, data); - slurm_mutex_unlock(&g_context_lock); return retval; } -extern int jobacct_gather_g_getinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data) +extern int jobacct_gather_endpoll() { int retval = SLURM_SUCCESS; - if (_slurm_jobacct_gather_init() < 0) + if (jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_getinfo))(jobacct, type, data); - slurm_mutex_unlock(&g_context_lock); + jobacct_shutdown = true; + slurm_mutex_lock(&task_list_lock); + if(task_list) + list_destroy(task_list); + task_list = NULL; + slurm_mutex_unlock(&task_list_lock); + + retval = (*(ops.endpoll))(); + return retval; } -extern void jobacct_gather_g_pack(jobacctinfo_t *jobacct, - uint16_t rpc_version, Buf buffer) +extern void jobacct_gather_change_poll(uint16_t frequency) { - if (_slurm_jobacct_gather_init() < 0) + if (jobacct_gather_init() < 0) return; - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_pack))(jobacct, rpc_version, buffer); - slurm_mutex_unlock(&g_context_lock); + if (freq == 0 && frequency != 0) { + pthread_attr_t attr; + pthread_t _watch_tasks_thread_id; + /* create polling thread */ + slurm_attr_init(&attr); + if (pthread_attr_setdetachstate(&attr, + PTHREAD_CREATE_DETACHED)) + error("pthread_attr_setdetachstate error %m"); + + if (pthread_create(&_watch_tasks_thread_id, &attr, + &_watch_tasks, NULL)) { + debug("jobacct-gather failed to create _watch_tasks " + "thread: %m"); + frequency = 0; + } + else + debug3("jobacct-gather LINUX dynamic logging enabled"); + slurm_attr_destroy(&attr); + jobacct_shutdown = false; + } + + freq = frequency; + debug("jobacct-gather: frequency changed = %d", frequency); + if (freq == 0) + jobacct_shutdown = true; return; } -extern int jobacct_gather_g_unpack(jobacctinfo_t **jobacct, - uint16_t rpc_version, Buf buffer) +extern void jobacct_gather_suspend_poll() { - int retval = SLURM_SUCCESS; + jobacct_suspended = true; +} + +extern void jobacct_gather_resume_poll() +{ + jobacct_suspended = false; +} + +extern int jobacct_gather_add_task(pid_t pid, jobacct_id_t *jobacct_id) +{ + struct jobacctinfo *jobacct; - if (_slurm_jobacct_gather_init() < 0) + if (jobacct_gather_init() < 0) return SLURM_ERROR; - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_unpack))(jobacct, rpc_version, buffer); - slurm_mutex_unlock(&g_context_lock); - return retval; + if (jobacct_shutdown) + return SLURM_ERROR; + + jobacct = jobacctinfo_create(jobacct_id); + + slurm_mutex_lock(&task_list_lock); + if (pid <= 0) { + error("invalid pid given (%d) for task acct", pid); + goto error; + } else if (!task_list) { + error("no task list created!"); + goto error; + } + + jobacct->pid = pid; + jobacct->min_cpu = 0; + debug2("adding task %u pid %d on node %u to jobacct", + jobacct_id->taskid, pid, jobacct_id->nodeid); + list_push(task_list, jobacct); + slurm_mutex_unlock(&task_list_lock); + + (*(ops.add_task))(pid, jobacct_id); + + return SLURM_SUCCESS; +error: + slurm_mutex_unlock(&task_list_lock); + jobacctinfo_destroy(jobacct); + return SLURM_ERROR; } -extern void jobacct_gather_g_aggregate(jobacctinfo_t *dest, - jobacctinfo_t *from) +extern jobacctinfo_t *jobacct_gather_stat_task(pid_t pid) { - if (_slurm_jobacct_gather_init() < 0) - return; - - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_aggregate))(dest, from); - slurm_mutex_unlock(&g_context_lock); - return; + if (jobacct_shutdown) + return NULL; + else if(pid) { + struct jobacctinfo *jobacct = NULL; + struct jobacctinfo *ret_jobacct = NULL; + ListIterator itr = NULL; + + _poll_data(); + + slurm_mutex_lock(&task_list_lock); + if (!task_list) { + error("no task list created!"); + goto error; + } + + itr = list_iterator_create(task_list); + while((jobacct = list_next(itr))) { + if(jobacct->pid == pid) + break; + } + list_iterator_destroy(itr); + if (jobacct == NULL) + goto error; + ret_jobacct = xmalloc(sizeof(struct jobacctinfo)); + memcpy(ret_jobacct, jobacct, sizeof(struct jobacctinfo)); + error: + slurm_mutex_unlock(&task_list_lock); + return ret_jobacct; + } else { + /* In this situation, we are just trying to get a + * basis of information since we are not pollng. So + * we will give a chance for processes to spawn before we + * gather information. This should largely eliminate the + * the chance of having /proc open when the tasks are + * spawned, which would prevent a valid checkpoint/restart + * with some systems */ + _task_sleep(1); + _poll_data(); + return NULL; + } } -extern int jobacct_gather_g_startpoll(uint16_t frequency) +extern jobacctinfo_t *jobacct_gather_remove_task(pid_t pid) { - int retval = SLURM_SUCCESS; - if (_slurm_jobacct_gather_init() < 0) - return SLURM_ERROR; + struct jobacctinfo *jobacct = NULL; + ListIterator itr = NULL; - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_startpoll))(frequency); - slurm_mutex_unlock(&g_context_lock); - return retval; + if (jobacct_shutdown) + return NULL; + + slurm_mutex_lock(&task_list_lock); + if (!task_list) { + error("no task list created!"); + goto error; + } + + itr = list_iterator_create(task_list); + while((jobacct = list_next(itr))) { + if(jobacct->pid == pid) { + list_remove(itr); + break; + } + } + list_iterator_destroy(itr); + if(jobacct) { + debug2("removing task %u pid %d from jobacct", + jobacct->max_vsize_id.taskid, jobacct->pid); + } else { + debug2("pid(%d) not being watched in jobacct!", pid); + } +error: + slurm_mutex_unlock(&task_list_lock); + return jobacct; } -extern int jobacct_gather_g_endpoll() +extern int jobacct_gather_set_proctrack_container_id(uint64_t id) { - int retval = SLURM_SUCCESS; - if (_slurm_jobacct_gather_init() < 0) + if (pgid_plugin) + return SLURM_SUCCESS; + + if (cont_id != (uint64_t)NO_VAL) + info("Warning: jobacct: set_proctrack_container_id: cont_id " + "is already set to %"PRIu64" you are setting it to " + "%"PRIu64"", cont_id, id); + if (id <= 0) { + error("jobacct: set_proctrack_container_id: " + "I was given most likely an unset cont_id %"PRIu64"", + id); return SLURM_ERROR; + } + cont_id = id; - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_endpoll))(); - slurm_mutex_unlock(&g_context_lock); - return retval; + return SLURM_SUCCESS; } -extern void jobacct_gather_g_change_poll(uint16_t frequency) +extern int jobacct_gather_set_mem_limit(uint32_t job_id, uint32_t step_id, + uint32_t mem_limit) { - if (_slurm_jobacct_gather_init() < 0) - return; - - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_change_poll))(frequency); + if ((job_id == 0) || (mem_limit == 0)) { + error("jobacct_gather_set_mem_limit: jobid:%u mem_limit:%u", + job_id, mem_limit); + return SLURM_ERROR; + } - slurm_mutex_unlock(&g_context_lock); + jobacct_job_id = job_id; + jobacct_step_id = step_id; + jobacct_mem_limit = mem_limit * 1024; /* MB to KB */ + jobacct_vmem_limit = jobacct_mem_limit; + jobacct_vmem_limit *= (slurm_get_vsize_factor() / 100.0); + return SLURM_SUCCESS; } -extern void jobacct_gather_g_suspend_poll() +extern void jobacct_gather_handle_mem_limit( + uint32_t total_job_mem, uint32_t total_job_vsize) { - if (_slurm_jobacct_gather_init() < 0) - return; - - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_suspend_poll))(); - slurm_mutex_unlock(&g_context_lock); - return; + if (jobacct_mem_limit) { + if (jobacct_step_id == NO_VAL) { + debug("Job %u memory used:%u limit:%u KB", + jobacct_job_id, total_job_mem, jobacct_mem_limit); + } else { + debug("Step %u.%u memory used:%u limit:%u KB", + jobacct_job_id, jobacct_step_id, + total_job_mem, jobacct_mem_limit); + } + } + if (jobacct_job_id && jobacct_mem_limit && + (total_job_mem > jobacct_mem_limit)) { + if (jobacct_step_id == NO_VAL) { + error("Job %u exceeded %u KB memory limit, being " + "killed", jobacct_job_id, jobacct_mem_limit); + } else { + error("Step %u.%u exceeded %u KB memory limit, being " + "killed", jobacct_job_id, jobacct_step_id, + jobacct_mem_limit); + } + _acct_kill_step(); + } else if (jobacct_job_id && jobacct_vmem_limit && + (total_job_vsize > jobacct_vmem_limit)) { + if (jobacct_step_id == NO_VAL) { + error("Job %u exceeded %u KB virtual memory limit, " + "being killed", jobacct_job_id, + jobacct_vmem_limit); + } else { + error("Step %u.%u exceeded %u KB virtual memory " + "limit, being killed", jobacct_job_id, + jobacct_step_id, jobacct_vmem_limit); + } + _acct_kill_step(); + } } -extern void jobacct_gather_g_resume_poll() +/********************* jobacctinfo functions ******************************/ + +extern jobacctinfo_t *jobacctinfo_create(jobacct_id_t *jobacct_id) { - if (_slurm_jobacct_gather_init() < 0) - return; + struct jobacctinfo *jobacct = xmalloc(sizeof(struct jobacctinfo)); - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_resume_poll))(); - slurm_mutex_unlock(&g_context_lock); - return; + if (!jobacct_id) { + jobacct_id_t temp_id; + temp_id.taskid = (uint16_t)NO_VAL; + temp_id.nodeid = (uint32_t)NO_VAL; + jobacct_id = &temp_id; + } + memset(jobacct, 0, sizeof(struct jobacctinfo)); + jobacct->sys_cpu_sec = 0; + jobacct->sys_cpu_usec = 0; + jobacct->user_cpu_sec = 0; + jobacct->user_cpu_usec = 0; + + jobacct->max_vsize = 0; + memcpy(&jobacct->max_vsize_id, jobacct_id, sizeof(jobacct_id_t)); + jobacct->tot_vsize = 0; + jobacct->max_rss = 0; + memcpy(&jobacct->max_rss_id, jobacct_id, sizeof(jobacct_id_t)); + jobacct->tot_rss = 0; + jobacct->max_pages = 0; + memcpy(&jobacct->max_pages_id, jobacct_id, sizeof(jobacct_id_t)); + jobacct->tot_pages = 0; + jobacct->min_cpu = (uint32_t)NO_VAL; + memcpy(&jobacct->min_cpu_id, jobacct_id, sizeof(jobacct_id_t)); + jobacct->tot_cpu = 0; + + return jobacct; } -extern int jobacct_gather_g_set_proctrack_container_id(uint64_t id) +extern void jobacctinfo_destroy(void *object) { - int retval = SLURM_SUCCESS; - if (_slurm_jobacct_gather_init() < 0) - return SLURM_ERROR; + struct jobacctinfo *jobacct = (struct jobacctinfo *)object; + xfree(jobacct); +} - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_set_proctrack_container_id))(id); - slurm_mutex_unlock(&g_context_lock); - return retval; +extern int jobacctinfo_setinfo(jobacctinfo_t *jobacct, + enum jobacct_data_type type, void *data) +{ + int rc = SLURM_SUCCESS; + int *fd = (int *)data; + struct rusage *rusage = (struct rusage *)data; + uint32_t *uint32 = (uint32_t *) data; + jobacct_id_t *jobacct_id = (jobacct_id_t *) data; + struct jobacctinfo *send = (struct jobacctinfo *) data; + + switch (type) { + case JOBACCT_DATA_TOTAL: + memcpy(jobacct, send, sizeof(struct jobacctinfo)); + break; + case JOBACCT_DATA_PIPE: + safe_write(*fd, jobacct, sizeof(struct jobacctinfo)); + break; + case JOBACCT_DATA_RUSAGE: + jobacct->user_cpu_sec = rusage->ru_utime.tv_sec; + jobacct->user_cpu_usec = rusage->ru_utime.tv_usec; + jobacct->sys_cpu_sec = rusage->ru_stime.tv_sec; + jobacct->sys_cpu_usec = rusage->ru_stime.tv_usec; + break; + case JOBACCT_DATA_MAX_RSS: + jobacct->max_rss = *uint32; + break; + case JOBACCT_DATA_MAX_RSS_ID: + jobacct->max_rss_id = *jobacct_id; + break; + case JOBACCT_DATA_TOT_RSS: + jobacct->tot_rss = *uint32; + break; + case JOBACCT_DATA_MAX_VSIZE: + jobacct->max_vsize = *uint32; + break; + case JOBACCT_DATA_MAX_VSIZE_ID: + jobacct->max_vsize_id = *jobacct_id; + break; + case JOBACCT_DATA_TOT_VSIZE: + jobacct->tot_vsize = *uint32; + break; + case JOBACCT_DATA_MAX_PAGES: + jobacct->max_pages = *uint32; + break; + case JOBACCT_DATA_MAX_PAGES_ID: + jobacct->max_pages_id = *jobacct_id; + break; + case JOBACCT_DATA_TOT_PAGES: + jobacct->tot_pages = *uint32; + break; + case JOBACCT_DATA_MIN_CPU: + jobacct->min_cpu = *uint32; + break; + case JOBACCT_DATA_MIN_CPU_ID: + jobacct->min_cpu_id = *jobacct_id; + break; + case JOBACCT_DATA_TOT_CPU: + jobacct->tot_cpu = *uint32; + break; + default: + debug("jobacct_g_set_setinfo data_type %d invalid", type); + } + return rc; +rwfail: + return SLURM_ERROR; } -extern int jobacct_gather_g_add_task(pid_t pid, jobacct_id_t *jobacct_id) +extern int jobacctinfo_getinfo( + jobacctinfo_t *jobacct, enum jobacct_data_type type, void *data) { - int retval = SLURM_SUCCESS; - if (_slurm_jobacct_gather_init() < 0) - return SLURM_ERROR; - - slurm_mutex_lock(&g_context_lock); - retval = (*(ops.jobacct_gather_add_task))(pid, jobacct_id); - slurm_mutex_unlock(&g_context_lock); - return retval; + int rc = SLURM_SUCCESS; + int *fd = (int *)data; + uint32_t *uint32 = (uint32_t *) data; + jobacct_id_t *jobacct_id = (jobacct_id_t *) data; + struct rusage *rusage = (struct rusage *)data; + struct jobacctinfo *send = (struct jobacctinfo *) data; + + switch (type) { + case JOBACCT_DATA_TOTAL: + memcpy(send, jobacct, sizeof(struct jobacctinfo)); + break; + case JOBACCT_DATA_PIPE: + safe_read(*fd, jobacct, sizeof(struct jobacctinfo)); + break; + case JOBACCT_DATA_RUSAGE: + memset(rusage, 0, sizeof(struct rusage)); + rusage->ru_utime.tv_sec = jobacct->user_cpu_sec; + rusage->ru_utime.tv_usec = jobacct->user_cpu_usec; + rusage->ru_stime.tv_sec = jobacct->sys_cpu_sec; + rusage->ru_stime.tv_usec = jobacct->sys_cpu_usec; + break; + case JOBACCT_DATA_MAX_RSS: + *uint32 = jobacct->max_rss; + break; + case JOBACCT_DATA_MAX_RSS_ID: + *jobacct_id = jobacct->max_rss_id; + break; + case JOBACCT_DATA_TOT_RSS: + *uint32 = jobacct->tot_rss; + break; + case JOBACCT_DATA_MAX_VSIZE: + *uint32 = jobacct->max_vsize; + break; + case JOBACCT_DATA_MAX_VSIZE_ID: + *jobacct_id = jobacct->max_vsize_id; + break; + case JOBACCT_DATA_TOT_VSIZE: + *uint32 = jobacct->tot_vsize; + break; + case JOBACCT_DATA_MAX_PAGES: + *uint32 = jobacct->max_pages; + break; + case JOBACCT_DATA_MAX_PAGES_ID: + *jobacct_id = jobacct->max_pages_id; + break; + case JOBACCT_DATA_TOT_PAGES: + *uint32 = jobacct->tot_pages; + break; + case JOBACCT_DATA_MIN_CPU: + *uint32 = jobacct->min_cpu; + break; + case JOBACCT_DATA_MIN_CPU_ID: + *jobacct_id = jobacct->min_cpu_id; + break; + case JOBACCT_DATA_TOT_CPU: + *uint32 = jobacct->tot_cpu; + break; + default: + debug("jobacct_g_set_getinfo data_type %d invalid", type); + } + return rc; +rwfail: + return SLURM_ERROR; } -extern jobacctinfo_t *jobacct_gather_g_stat_task(pid_t pid) +extern void jobacctinfo_pack( + jobacctinfo_t *jobacct, uint16_t rpc_version, Buf buffer) { - jobacctinfo_t *jobacct = NULL; - if (_slurm_jobacct_gather_init() < 0) - return jobacct; + int i = 0; - slurm_mutex_lock(&g_context_lock); - jobacct = (*(ops.jobacct_gather_stat_task))(pid); - slurm_mutex_unlock(&g_context_lock); - return jobacct; + if (!jobacct) { + for (i = 0; i < 12; i++) + pack32((uint32_t) 0, buffer); + for (i = 0; i < 4; i++) + _pack_jobacct_id(NULL, rpc_version, buffer); + return; + } + + pack32((uint32_t)jobacct->user_cpu_sec, buffer); + pack32((uint32_t)jobacct->user_cpu_usec, buffer); + pack32((uint32_t)jobacct->sys_cpu_sec, buffer); + pack32((uint32_t)jobacct->sys_cpu_usec, buffer); + pack32((uint32_t)jobacct->max_vsize, buffer); + pack32((uint32_t)jobacct->tot_vsize, buffer); + pack32((uint32_t)jobacct->max_rss, buffer); + pack32((uint32_t)jobacct->tot_rss, buffer); + pack32((uint32_t)jobacct->max_pages, buffer); + pack32((uint32_t)jobacct->tot_pages, buffer); + pack32((uint32_t)jobacct->min_cpu, buffer); + pack32((uint32_t)jobacct->tot_cpu, buffer); + + _pack_jobacct_id(&jobacct->max_vsize_id, rpc_version, buffer); + _pack_jobacct_id(&jobacct->max_rss_id, rpc_version, buffer); + _pack_jobacct_id(&jobacct->max_pages_id, rpc_version, buffer); + _pack_jobacct_id(&jobacct->min_cpu_id, rpc_version, buffer); } -extern jobacctinfo_t *jobacct_gather_g_remove_task(pid_t pid) +extern int jobacctinfo_unpack( + jobacctinfo_t **jobacct, uint16_t rpc_version, Buf buffer) { - jobacctinfo_t *jobacct = NULL; - if (_slurm_jobacct_gather_init() < 0) - return jobacct; + uint32_t uint32_tmp; + + *jobacct = xmalloc(sizeof(struct jobacctinfo)); + safe_unpack32(&uint32_tmp, buffer); + (*jobacct)->user_cpu_sec = uint32_tmp; + safe_unpack32(&uint32_tmp, buffer); + (*jobacct)->user_cpu_usec = uint32_tmp; + safe_unpack32(&uint32_tmp, buffer); + (*jobacct)->sys_cpu_sec = uint32_tmp; + safe_unpack32(&uint32_tmp, buffer); + (*jobacct)->sys_cpu_usec = uint32_tmp; + safe_unpack32(&(*jobacct)->max_vsize, buffer); + safe_unpack32(&(*jobacct)->tot_vsize, buffer); + safe_unpack32(&(*jobacct)->max_rss, buffer); + safe_unpack32(&(*jobacct)->tot_rss, buffer); + safe_unpack32(&(*jobacct)->max_pages, buffer); + safe_unpack32(&(*jobacct)->tot_pages, buffer); + safe_unpack32(&(*jobacct)->min_cpu, buffer); + safe_unpack32(&(*jobacct)->tot_cpu, buffer); + + if (_unpack_jobacct_id(&(*jobacct)->max_vsize_id, rpc_version, buffer) + != SLURM_SUCCESS) + goto unpack_error; + if (_unpack_jobacct_id(&(*jobacct)->max_rss_id, rpc_version, buffer) + != SLURM_SUCCESS) + goto unpack_error; + if (_unpack_jobacct_id(&(*jobacct)->max_pages_id, rpc_version, buffer) + != SLURM_SUCCESS) + goto unpack_error; + if (_unpack_jobacct_id(&(*jobacct)->min_cpu_id, rpc_version, buffer) + != SLURM_SUCCESS) + goto unpack_error; - slurm_mutex_lock(&g_context_lock); - jobacct = (*(ops.jobacct_gather_remove_task))(pid); - slurm_mutex_unlock(&g_context_lock); - return jobacct; + return SLURM_SUCCESS; + +unpack_error: + debug2("jobacctinfo_unpack:" + "unpack_error: size_buf(buffer) %u", + size_buf(buffer)); + xfree(*jobacct); + return SLURM_ERROR; } -extern void jobacct_gather_g_2_stats(slurmdb_stats_t *stats, - jobacctinfo_t *jobacct) +extern void jobacctinfo_aggregate(jobacctinfo_t *dest, jobacctinfo_t *from) { - if (_slurm_jobacct_gather_init() < 0) + xassert(dest); + + if (!from) return; - slurm_mutex_lock(&g_context_lock); - (*(ops.jobacct_gather_2_stats))(stats, jobacct); - slurm_mutex_unlock(&g_context_lock); - return; + if (dest->max_vsize < from->max_vsize) { + dest->max_vsize = from->max_vsize; + dest->max_vsize_id = from->max_vsize_id; + } + dest->tot_vsize += from->tot_vsize; + + if (dest->max_rss < from->max_rss) { + dest->max_rss = from->max_rss; + dest->max_rss_id = from->max_rss_id; + } + dest->tot_rss += from->tot_rss; + + if (dest->max_pages < from->max_pages) { + dest->max_pages = from->max_pages; + dest->max_pages_id = from->max_pages_id; + } + dest->tot_pages += from->tot_pages; + + if ((dest->min_cpu > from->min_cpu) + || (dest->min_cpu == (uint32_t)NO_VAL)) { + if (from->min_cpu == (uint32_t)NO_VAL) + from->min_cpu = 0; + dest->min_cpu = from->min_cpu; + dest->min_cpu_id = from->min_cpu_id; + } + dest->tot_cpu += from->tot_cpu; + + if (dest->max_vsize_id.taskid == (uint16_t)NO_VAL) + dest->max_vsize_id = from->max_vsize_id; + + if (dest->max_rss_id.taskid == (uint16_t)NO_VAL) + dest->max_rss_id = from->max_rss_id; + + if (dest->max_pages_id.taskid == (uint16_t)NO_VAL) + dest->max_pages_id = from->max_pages_id; + + if (dest->min_cpu_id.taskid == (uint16_t)NO_VAL) + dest->min_cpu_id = from->min_cpu_id; + + dest->user_cpu_sec += from->user_cpu_sec; + dest->user_cpu_usec += from->user_cpu_usec; + while (dest->user_cpu_usec >= 1E6) { + dest->user_cpu_sec++; + dest->user_cpu_usec -= 1E6; + } + dest->sys_cpu_sec += from->sys_cpu_sec; + dest->sys_cpu_usec += from->sys_cpu_usec; + while (dest->sys_cpu_usec >= 1E6) { + dest->sys_cpu_sec++; + dest->sys_cpu_usec -= 1E6; + } +} + +extern void jobacctinfo_2_stats(slurmdb_stats_t *stats, jobacctinfo_t *jobacct) +{ + xassert(jobacct); + xassert(stats); + + stats->vsize_max = jobacct->max_vsize; + stats->vsize_max_nodeid = jobacct->max_vsize_id.nodeid; + stats->vsize_max_taskid = jobacct->max_vsize_id.taskid; + stats->vsize_ave = (double)jobacct->tot_vsize; + stats->rss_max = jobacct->max_rss; + stats->rss_max_nodeid = jobacct->max_rss_id.nodeid; + stats->rss_max_taskid = jobacct->max_rss_id.taskid; + stats->rss_ave = (double)jobacct->tot_rss; + stats->pages_max = jobacct->max_pages; + stats->pages_max_nodeid = jobacct->max_pages_id.nodeid; + stats->pages_max_taskid = jobacct->max_pages_id.taskid; + stats->pages_ave = (double)jobacct->tot_pages; + stats->cpu_min = jobacct->min_cpu; + stats->cpu_min_nodeid = jobacct->min_cpu_id.nodeid; + stats->cpu_min_taskid = jobacct->min_cpu_id.taskid; + stats->cpu_ave = (double)jobacct->tot_cpu; } diff --git a/src/common/slurm_jobacct_gather.h b/src/common/slurm_jobacct_gather.h index 62a3ed578d..b32f8d4b11 100644 --- a/src/common/slurm_jobacct_gather.h +++ b/src/common/slurm_jobacct_gather.h @@ -76,40 +76,83 @@ #include "src/common/pack.h" #include "src/common/list.h" #include "src/common/xmalloc.h" -#include "src/common/jobacct_common.h" - -extern int slurm_jobacct_gather_init(void); /* load the plugin */ -extern int slurm_jobacct_gather_fini(void); /* unload the plugin */ - -extern jobacctinfo_t *jobacct_gather_g_create(jobacct_id_t *jobacct_id); -extern void jobacct_gather_g_destroy(jobacctinfo_t *jobacct); -extern int jobacct_gather_g_setinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data); -extern int jobacct_gather_g_getinfo(jobacctinfo_t *jobacct, +#include "src/common/read_config.h" + +#include "src/slurmd/slurmstepd/slurmstepd_job.h" + +#define FDUMP_FLAG 0x04 + +typedef struct { + uint16_t taskid; /* contains which task number it was on */ + uint32_t nodeid; /* contains which node number it was on */ + slurmd_job_t *job; /* contains slurmd job pointer */ +} jobacct_id_t; + +struct jobacctinfo { + pid_t pid; + uint32_t sys_cpu_sec; + uint32_t sys_cpu_usec; + uint32_t user_cpu_sec; + uint32_t user_cpu_usec; + uint32_t max_vsize; /* max size of virtual memory */ + jobacct_id_t max_vsize_id; /* contains which task number it was on */ + uint32_t tot_vsize; /* total virtual memory + (used to figure out ave later) */ + uint32_t max_rss; /* max Resident Set Size */ + jobacct_id_t max_rss_id; /* contains which task it was on */ + uint32_t tot_rss; /* total rss + (used to figure out ave later) */ + uint32_t max_pages; /* max pages */ + jobacct_id_t max_pages_id; /* contains which task it was on */ + uint32_t tot_pages; /* total pages + (used to figure out ave later) */ + uint32_t min_cpu; /* min cpu time */ + jobacct_id_t min_cpu_id; /* contains which task it was on */ + uint32_t tot_cpu; /* total cpu time(used to figure out ave later) */ +}; + +/* Define jobacctinfo_t below to avoid including extraneous slurm headers */ +#ifndef __jobacctinfo_t_defined +# define __jobacctinfo_t_defined + typedef struct jobacctinfo jobacctinfo_t; /* opaque data type */ +#endif + +extern int jobacct_gather_init(void); /* load the plugin */ +extern int jobacct_gather_fini(void); /* unload the plugin */ + +extern int jobacct_gather_startpoll(uint16_t frequency); +extern int jobacct_gather_endpoll(); +extern void jobacct_gather_change_poll(uint16_t frequency); +extern void jobacct_gather_suspend_poll(); +extern void jobacct_gather_resume_poll(); + +extern int jobacct_gather_add_task(pid_t pid, jobacct_id_t *jobacct_id); +/* must free jobacctinfo_t if not NULL */ +extern jobacctinfo_t *jobacct_gather_stat_task(pid_t pid); +/* must free jobacctinfo_t if not NULL */ +extern jobacctinfo_t *jobacct_gather_remove_task(pid_t pid); + +extern int jobacct_gather_set_proctrack_container_id(uint64_t id); +extern int jobacct_gather_set_mem_limit(uint32_t job_id, uint32_t step_id, + uint32_t mem_limit); +extern void jobacct_gather_handle_mem_limit( + uint32_t total_job_mem, uint32_t total_job_vsize); + +extern jobacctinfo_t *jobacctinfo_create(jobacct_id_t *jobacct_id); +extern void jobacctinfo_destroy(void *object); +extern int jobacctinfo_setinfo(jobacctinfo_t *jobacct, + enum jobacct_data_type type, void *data); +extern int jobacctinfo_getinfo(jobacctinfo_t *jobacct, enum jobacct_data_type type, void *data); -extern void jobacct_gather_g_pack(jobacctinfo_t *jobacct, +extern void jobacctinfo_pack(jobacctinfo_t *jobacct, uint16_t rpc_version, Buf buffer); -extern int jobacct_gather_g_unpack(jobacctinfo_t **jobacct, +extern int jobacctinfo_unpack(jobacctinfo_t **jobacct, uint16_t rpc_version, Buf buffer); -extern void jobacct_gather_g_aggregate(jobacctinfo_t *dest, +extern void jobacctinfo_aggregate(jobacctinfo_t *dest, jobacctinfo_t *from); -extern void jobacct_gather_g_change_poll(uint16_t frequency); -extern int jobacct_gather_g_startpoll(uint16_t frequency); -extern int jobacct_gather_g_endpoll(); -extern void jobacct_gather_g_suspend_poll(); -extern void jobacct_gather_g_resume_poll(); - -extern int jobacct_gather_g_set_proctrack_container_id(uint64_t id); -extern int jobacct_gather_g_add_task(pid_t pid, jobacct_id_t *jobacct_id); -/* must free jobacctinfo_t if not NULL */ -extern jobacctinfo_t *jobacct_gather_g_stat_task(pid_t pid); -/* must free jobacctinfo_t if not NULL */ -extern jobacctinfo_t *jobacct_gather_g_remove_task(pid_t pid); - -extern void jobacct_gather_g_2_stats(slurmdb_stats_t *stats, - jobacctinfo_t *jobacct); +extern void jobacctinfo_2_stats(slurmdb_stats_t *stats, jobacctinfo_t *jobacct); #endif /*__SLURM_JOBACCT_GATHER_H__*/ diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index c20e5daa2e..0ea58b399a 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -57,6 +57,7 @@ #include "src/common/slurm_protocol_defs.h" #include "src/common/switch.h" #include "src/common/xmalloc.h" +#include "src/common/xstring.h" #include "src/common/job_options.h" #include "src/common/forward.h" #include "src/common/slurm_jobacct_gather.h" @@ -600,7 +601,7 @@ extern void slurm_free_complete_batch_script_msg( complete_batch_script_msg_t * msg) { if (msg) { - jobacct_gather_g_destroy(msg->jobacct); + jobacctinfo_destroy(msg->jobacct); xfree(msg->node_name); xfree(msg); } @@ -2218,7 +2219,7 @@ extern void slurm_free_file_bcast_msg(file_bcast_msg_t *msg) extern void slurm_free_step_complete_msg(step_complete_msg_t *msg) { if (msg) { - jobacct_gather_g_destroy(msg->jobacct); + jobacctinfo_destroy(msg->jobacct); xfree(msg); } } @@ -2227,7 +2228,7 @@ extern void slurm_free_job_step_stat(void *object) { job_step_stat_t *msg = (job_step_stat_t *)object; if (msg) { - jobacct_gather_g_destroy(msg->jobacct); + jobacctinfo_destroy(msg->jobacct); slurm_free_job_step_pids(msg->step_pids); xfree(msg); } diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 26aa2e3e6d..cbc2f179ec 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -62,6 +62,7 @@ #include "src/common/slurm_protocol_pack.h" #include "src/common/switch.h" #include "src/common/xmalloc.h" +#include "src/common/xstring.h" #include "src/common/xassert.h" #include "src/common/forward.h" #include "src/common/job_options.h" @@ -164,11 +165,11 @@ static int _unpack_node_info_members(node_info_t * node, Buf buffer, uint16_t protocol_version); static void _pack_front_end_info_request_msg( - front_end_info_request_msg_t * msg, - Buf buffer, uint16_t protocol_version); + front_end_info_request_msg_t * msg, + Buf buffer, uint16_t protocol_version); static int _unpack_front_end_info_request_msg( - front_end_info_request_msg_t ** msg, - Buf buffer, uint16_t protocol_version); + front_end_info_request_msg_t ** msg, + Buf buffer, uint16_t protocol_version); static int _unpack_front_end_info_msg(front_end_info_msg_t ** msg, Buf buffer, uint16_t protocol_version); static int _unpack_front_end_info_members(front_end_info_t *front_end, @@ -5727,8 +5728,8 @@ _unpack_slurm_ctl_conf_msg(slurm_ctl_conf_info_msg_t **build_buffer_ptr, int i; for (i=0; i= SLURM_2_5_PROTOCOL_VERSION) { - jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); + jobacctinfo_pack(msg->jobacct, protocol_version, buffer); pack32(msg->job_id, buffer); pack32(msg->job_rc, buffer); pack32(msg->slurm_rc, buffer); pack32(msg->user_id, buffer); packstr(msg->node_name, buffer); } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { - jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); + jobacctinfo_pack(msg->jobacct, protocol_version, buffer); pack32((uint32_t)msg->job_id, buffer); pack32((uint32_t)msg->job_rc, buffer); pack32((uint32_t)msg->slurm_rc, buffer); @@ -8984,8 +8985,8 @@ _unpack_complete_batch_script_msg( *msg_ptr = msg; if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { - if (jobacct_gather_g_unpack(&msg->jobacct, - protocol_version, buffer) + if (jobacctinfo_unpack(&msg->jobacct, + protocol_version, buffer) != SLURM_SUCCESS) goto unpack_error; safe_unpack32(&msg->job_id, buffer); @@ -8994,8 +8995,8 @@ _unpack_complete_batch_script_msg( safe_unpack32(&msg->user_id, buffer); safe_unpackstr_xmalloc(&msg->node_name, &uint32_tmp, buffer); } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { - if (jobacct_gather_g_unpack(&msg->jobacct, - protocol_version, buffer) + if (jobacctinfo_unpack(&msg->jobacct, + protocol_version, buffer) != SLURM_SUCCESS) goto unpack_error; safe_unpack32(&msg->job_id, buffer); @@ -9022,7 +9023,7 @@ _pack_job_step_stat(job_step_stat_t * msg, Buf buffer, { pack32((uint32_t)msg->return_code, buffer); pack32((uint32_t)msg->num_tasks, buffer); - jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); + jobacctinfo_pack(msg->jobacct, protocol_version, buffer); _pack_job_step_pids(msg->step_pids, buffer, protocol_version); } @@ -9039,7 +9040,7 @@ _unpack_job_step_stat(job_step_stat_t ** msg_ptr, Buf buffer, safe_unpack32(&msg->return_code, buffer); safe_unpack32(&msg->num_tasks, buffer); - if (jobacct_gather_g_unpack(&msg->jobacct, protocol_version, buffer) + if (jobacctinfo_unpack(&msg->jobacct, protocol_version, buffer) != SLURM_SUCCESS) goto unpack_error; rc = _unpack_job_step_pids(&msg->step_pids, buffer, protocol_version); @@ -9124,7 +9125,7 @@ _pack_step_complete_msg(step_complete_msg_t * msg, Buf buffer, pack32((uint32_t)msg->range_first, buffer); pack32((uint32_t)msg->range_last, buffer); pack32((uint32_t)msg->step_rc, buffer); - jobacct_gather_g_pack(msg->jobacct, protocol_version, buffer); + jobacctinfo_pack(msg->jobacct, protocol_version, buffer); } static int @@ -9141,7 +9142,7 @@ _unpack_step_complete_msg(step_complete_msg_t ** msg_ptr, Buf buffer, safe_unpack32(&msg->range_first, buffer); safe_unpack32(&msg->range_last, buffer); safe_unpack32(&msg->step_rc, buffer); - if (jobacct_gather_g_unpack(&msg->jobacct, protocol_version, buffer) + if (jobacctinfo_unpack(&msg->jobacct, protocol_version, buffer) != SLURM_SUCCESS) goto unpack_error; @@ -9540,7 +9541,7 @@ static void _pack_block_info_msg(block_info_t *block_info, Buf buffer, } extern void slurm_pack_block_job_info(block_job_info_t *block_job_info, - Buf buffer, uint16_t protocol_version) + Buf buffer, uint16_t protocol_version) { if (!block_job_info) { packnull(buffer); diff --git a/src/common/slurm_xlator.h b/src/common/slurm_xlator.h index 55e0df9bd2..8c73a35bd8 100644 --- a/src/common/slurm_xlator.h +++ b/src/common/slurm_xlator.h @@ -342,10 +342,10 @@ #define plugrack_set_paranoia slurm_plugrack_set_paranoia #define plugrack_use_by_type slurm_plugrack_use_by_type -#define jobacct_common_pack slurm_jobacct_common_pack -#define jobacct_common_unpack slurm_jobacct_common_unpack -#define jobacct_common_alloc_jobacct slurm_jobacct_common_alloc_jobacct -#define jobacct_common_free_jobacct slurm_jobacct_common_free_jobacct +#define jobacctinfo_pack slurm_jobacctinfo_pack +#define jobacctinfo_unpack slurm_jobacctinfo_unpack +#define jobacctinfo_create slurm_jobacctinfo_create +#define jobacctinfo_destroy slurm_jobacctinfo_destroy /* node_select.[ch] functions */ #define destroy_select_ba_request slurm_destroy_select_ba_request @@ -363,7 +363,7 @@ #include "src/common/arg_desc.h" #include "src/common/bitstring.h" #include "src/common/hostlist.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/list.h" #include "src/common/log.h" #include "src/common/macros.h" diff --git a/src/common/slurmdbd_defs.c b/src/common/slurmdbd_defs.c index 33856aa873..3f188ff72c 100644 --- a/src/common/slurmdbd_defs.c +++ b/src/common/slurmdbd_defs.c @@ -3851,8 +3851,8 @@ slurmdbd_pack_step_complete_msg(dbd_step_comp_msg_t *msg, pack32(msg->db_index, buffer); pack_time(msg->end_time, buffer); pack32(msg->exit_code, buffer); - jobacct_common_pack((struct jobacctinfo *)msg->jobacct, - rpc_version, buffer); + jobacctinfo_pack((struct jobacctinfo *)msg->jobacct, + rpc_version, buffer); pack32(msg->job_id, buffer); pack32(msg->req_uid, buffer); pack_time(msg->start_time, buffer); @@ -3871,8 +3871,8 @@ slurmdbd_unpack_step_complete_msg(dbd_step_comp_msg_t **msg, safe_unpack32(&msg_ptr->db_index, buffer); safe_unpack_time(&msg_ptr->end_time, buffer); safe_unpack32(&msg_ptr->exit_code, buffer); - jobacct_common_unpack((struct jobacctinfo **)&msg_ptr->jobacct, - rpc_version, buffer); + jobacctinfo_unpack((struct jobacctinfo **)&msg_ptr->jobacct, + rpc_version, buffer); safe_unpack32(&msg_ptr->job_id, buffer); safe_unpack32(&msg_ptr->req_uid, buffer); safe_unpack_time(&msg_ptr->start_time, buffer); diff --git a/src/common/stepd_api.c b/src/common/stepd_api.c index cdfe7e653a..f9eba9eb01 100644 --- a/src/common/stepd_api.c +++ b/src/common/stepd_api.c @@ -885,7 +885,7 @@ stepd_completion(int fd, step_complete_msg_t *sent) safe_write(fd, &sent->range_first, sizeof(int)); safe_write(fd, &sent->range_last, sizeof(int)); safe_write(fd, &sent->step_rc, sizeof(int)); - jobacct_gather_g_setinfo(sent->jobacct, JOBACCT_DATA_PIPE, &fd); + jobacctinfo_setinfo(sent->jobacct, JOBACCT_DATA_PIPE, &fd); /* Receive the return code and errno */ safe_read(fd, &rc, sizeof(int)); safe_read(fd, &errnum, sizeof(int)); @@ -920,7 +920,7 @@ rwfail: * Do pack/unpack instead to be sure of independances of * slurmd and slurmstepd */ - jobacct_gather_g_pack(sent->jobacct, SLURM_PROTOCOL_VERSION, buffer); + jobacctinfo_pack(sent->jobacct, SLURM_PROTOCOL_VERSION, buffer); len = get_buf_offset(buffer); safe_write(fd, &len, sizeof(int)); safe_write(fd, get_buf_data(buffer), len); @@ -986,14 +986,14 @@ stepd_stat_jobacct(int fd, job_step_id_msg_t *sent, job_step_stat_t *resp) safe_write(fd, &req, sizeof(int)); /* Receive the jobacct struct and return */ - resp->jobacct = jobacct_gather_g_create(NULL); + resp->jobacct = jobacctinfo_create(NULL); /* Do not attempt reading data until there is something to read. * Avoid locking the jobacct_gather plugin early and creating * possible deadlock. */ if (_wait_fd_readable(fd)) goto rwfail; - rc = jobacct_gather_g_getinfo(resp->jobacct, JOBACCT_DATA_PIPE, &fd); + rc = jobacctinfo_getinfo(resp->jobacct, JOBACCT_DATA_PIPE, &fd); safe_read(fd, &tasks, sizeof(int)); resp->num_tasks = tasks; @@ -1001,7 +1001,7 @@ stepd_stat_jobacct(int fd, job_step_id_msg_t *sent, job_step_stat_t *resp) return rc; rwfail: error("gathering job accounting: %d", rc); - jobacct_gather_g_destroy(resp->jobacct); + jobacctinfo_destroy(resp->jobacct); resp->jobacct = NULL; return rc; } diff --git a/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.h b/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.h index d177375dc7..a6eff13191 100644 --- a/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.h +++ b/src/plugins/accounting_storage/filetxt/filetxt_jobacct_process.h @@ -44,10 +44,16 @@ #ifndef _HAVE_FILETXT_JOBSLURMDB_PROCESS_H #define _HAVE_FILETXT_JOBSLURMDB_PROCESS_H -#include "src/common/jobacct_common.h" +#include +#include + +#include "src/common/xstring.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_accounting_storage.h" #include "src/slurmdbd/read_config.h" +#define BUFFER_SIZE 4096 + extern List filetxt_jobacct_process_get_jobs(slurmdb_job_cond_t *job_cond); extern int filetxt_jobacct_process_archive(slurmdb_archive_cond_t *arch_cond); diff --git a/src/plugins/accounting_storage/mysql/as_mysql_job.c b/src/plugins/accounting_storage/mysql/as_mysql_job.c index 2e03d6becc..a5eb18f58d 100644 --- a/src/plugins/accounting_storage/mysql/as_mysql_job.c +++ b/src/plugins/accounting_storage/mysql/as_mysql_job.c @@ -41,8 +41,11 @@ #include "as_mysql_usage.h" #include "as_mysql_wckey.h" +#include "src/common/node_select.h" #include "src/common/parse_time.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" + +#define BUFFER_SIZE 4096 /* Used in job functions for getting the database index based off the * submit time, job and assoc id. 0 is returned if none is found diff --git a/src/plugins/accounting_storage/pgsql/as_pg_common.h b/src/plugins/accounting_storage/pgsql/as_pg_common.h index 98c84f5041..9d95c964dc 100644 --- a/src/plugins/accounting_storage/pgsql/as_pg_common.h +++ b/src/plugins/accounting_storage/pgsql/as_pg_common.h @@ -46,7 +46,7 @@ #include "src/database/pgsql_common.h" #include "src/slurmdbd/read_config.h" #include "src/common/slurmdbd_defs.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/uid.h" #include "src/plugins/accounting_storage/common/common_as.h" diff --git a/src/plugins/accounting_storage/pgsql/as_pg_job.c b/src/plugins/accounting_storage/pgsql/as_pg_job.c index fa84e6b2d5..2cda905a47 100644 --- a/src/plugins/accounting_storage/pgsql/as_pg_job.c +++ b/src/plugins/accounting_storage/pgsql/as_pg_job.c @@ -39,6 +39,8 @@ \*****************************************************************************/ #include "as_pg_common.h" +#define BUFFER_SIZE 4096 + char *job_table = "job_table"; static storage_field_t job_table_fields[] = { { "job_db_inx", "SERIAL" }, diff --git a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c index 9efb32a7e2..1551762704 100644 --- a/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c +++ b/src/plugins/accounting_storage/slurmdbd/accounting_storage_slurmdbd.c @@ -54,7 +54,6 @@ #include "slurm/slurm_errno.h" #include "src/common/slurm_xlator.h" -#include "src/common/jobacct_common.h" #include "src/common/read_config.h" #include "src/common/slurm_accounting_storage.h" #include "src/common/slurmdbd_defs.h" @@ -63,6 +62,8 @@ #include "src/slurmctld/slurmctld.h" #include "src/slurmctld/locks.h" +#define BUFFER_SIZE 4096 + /* These are defined here so when we link with something other than * the slurmctld we will have these symbols defined. They will get * overwritten when linking with the slurmctld. diff --git a/src/plugins/gres/gpu/gres_gpu.c b/src/plugins/gres/gpu/gres_gpu.c index dfe6a5114a..ef7aeef2d0 100644 --- a/src/plugins/gres/gpu/gres_gpu.c +++ b/src/plugins/gres/gpu/gres_gpu.c @@ -67,6 +67,7 @@ #include #include +#include #include "slurm/slurm.h" #include "slurm/slurm_errno.h" diff --git a/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c b/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c index 13c66b9a10..1205046a78 100644 --- a/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c +++ b/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c @@ -42,7 +42,7 @@ #include #include "src/common/slurm_xlator.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_defs.h" #include "src/slurmd/common/proctrack.h" @@ -53,16 +53,6 @@ #define NPROCS 5000 #endif -/* These are defined here so when we link with something other than - * the slurmd we will have these symbols defined. They will get - * overwritten when linking with the slurmd. - */ -uint32_t jobacct_job_id; -pthread_mutex_t jobacct_lock; -uint32_t jobacct_mem_limit; -uint32_t jobacct_step_id; -uint32_t jobacct_vmem_limit; - /* * These variables are required by the generic plugin interface. If they * are not found in the plugin, the plugin loader will ignore it. @@ -94,14 +84,10 @@ uint32_t jobacct_vmem_limit; */ const char plugin_name[] = "Job accounting gather AIX plugin"; const char plugin_type[] = "jobacct_gather/aix"; -const uint32_t plugin_version = 100; +const uint32_t plugin_version = 200; /* Other useful declarations */ -static bool jobacct_shutdown = 0; -static bool jobacct_suspended = 0; -static List task_list = NULL; -static uint64_t cont_id = (uint64_t)NO_VAL; -static bool pgid_plugin = false; +static int pagesize = 0; #ifdef HAVE_AIX typedef struct prec { /* process record */ @@ -114,15 +100,9 @@ typedef struct prec { /* process record */ float vsize; /* max virtual size */ } prec_t; -static int freq = 0; -static int pagesize = 0; - /* Finally, pre-define all the routines. */ -static void _acct_kill_step(void); static void _get_offspring_data(List prec_list, prec_t *ancestor, pid_t pid); -static void _get_process_data(); -static void *_watch_tasks(void *arg); static void _destroy_prec(void *object); /* system call to get process table */ @@ -179,20 +159,24 @@ static void _get_offspring_data(List prec_list, prec_t *ancestor, pid_t pid) } /* - * _get_process_data() - Build a table of all current processes + * jobacct_gather_p_poll_data() - Build a table of all current processes * - * IN: pid. + * IN/OUT: task_list - list containing current processes. + * IN: pgid_plugin - if we are running with the pgid plugin. + * IN: cont_id - container id of processes if not running with pgid. * * OUT: none * - * THREADSAFE! Only one thread ever gets here. + * THREADSAFE! Only one thread ever gets here. It is locked in + * slurm_jobacct_gather. * * Assumption: * Any file with a name of the form "/proc/[0-9]+/stat" * is a Linux-style stat entry. We disregard the data if they look * wrong. */ -static void _get_process_data(void) +extern void jobacct_gather_p_poll_data( + List task_list, bool pgid_plugin, uint64_t cont_id) { struct procsinfo proc; pid_t *pids = NULL; @@ -229,7 +213,7 @@ static void _get_process_data(void) } for (i = 0; i < npids; i++) { pid = pids[i]; - if(!getprocs(&proc, sizeof(proc), 0, 0, &pid, 1)) + if (!getprocs(&proc, sizeof(proc), 0, 0, &pid, 1)) continue; /* Assume the process went away */ prec = xmalloc(sizeof(prec_t)); list_append(prec_list, prec); @@ -249,7 +233,7 @@ static void _get_process_data(void) /* prec->vsize, proc.pi_tsize, proc.pi_dvm, pagesize); */ } } else { - while(getprocs(&proc, sizeof(proc), 0, 0, &pid, 1) == 1) { + while (getprocs(&proc, sizeof(proc), 0, 0, &pid, 1) == 1) { prec = xmalloc(sizeof(prec_t)); list_append(prec_list, prec); prec->pid = proc.pi_pid; @@ -268,18 +252,18 @@ static void _get_process_data(void) /* prec->vsize, proc.pi_tsize, proc.pi_dvm, pagesize); */ } } - if(!list_count(prec_list)) + if (!list_count(prec_list)) goto finished; slurm_mutex_lock(&jobacct_lock); - if(!task_list || !list_count(task_list)) { + if (!task_list || !list_count(task_list)) { slurm_mutex_unlock(&jobacct_lock); goto finished; } itr = list_iterator_create(task_list); - while((jobacct = list_next(itr))) { + while ((jobacct = list_next(itr))) { itr2 = list_iterator_create(prec_list); - while((prec = list_next(itr2))) { + while ((prec = list_next(itr2))) { //debug2("pid %d ? %d", prec->ppid, jobacct->pid); if (prec->pid == jobacct->pid) { /* find all my descendents */ @@ -309,37 +293,8 @@ static void _get_process_data(void) list_iterator_destroy(itr2); } list_iterator_destroy(itr); - slurm_mutex_unlock(&jobacct_lock); - if (jobacct_mem_limit) { - debug("Step %u.%u memory used:%u limit:%u KB", - jobacct_job_id, jobacct_step_id, - total_job_mem, jobacct_mem_limit); - } - if (jobacct_job_id && jobacct_mem_limit && - (total_job_mem > jobacct_mem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_mem_limit); - } else { - error("Step %u.%u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_step_id, - jobacct_mem_limit); - } - _acct_kill_step(); - } else if (jobacct_job_id && jobacct_vmem_limit && - (total_job_vsize > jobacct_vmem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB virtual memory limit, " - "being killed", jobacct_job_id, - jobacct_vmem_limit); - } else { - error("Step %u.%u exceeded %u KB virtual memory " - "limit, being killed", jobacct_job_id, - jobacct_step_id, jobacct_vmem_limit); - } - _acct_kill_step(); - } + jobacct_gather_handle_mem_limit(total_job_mem, total_job_vsize); finished: list_destroy(prec_list); @@ -348,44 +303,6 @@ finished: return; } -/* _acct_kill_step() issue RPC to kill a slurm job step */ -static void _acct_kill_step(void) -{ - slurm_msg_t msg; - job_step_kill_msg_t req; - - slurm_msg_t_init(&msg); - /* - * Request message: - */ - req.job_id = jobacct_job_id; - req.job_step_id = jobacct_step_id; - req.signal = SIGKILL; - req.batch_flag = 0; - msg.msg_type = REQUEST_CANCEL_JOB_STEP; - msg.data = &req; - - slurm_send_only_controller_msg(&msg); -} - -/* _watch_tasks() -- monitor slurm jobs and track their memory usage - * - * IN, OUT: Irrelevant; this is invoked by pthread_create() - */ - -static void *_watch_tasks(void *arg) -{ - - while (!jobacct_shutdown) { /* Do this until shutdown is requested */ - if (!jobacct_suspended) { - _get_process_data(); /* Update the data */ - } - sleep(freq); - } - return NULL; -} - - static void _destroy_prec(void *object) { prec_t *prec = (prec_t *)object; @@ -401,22 +318,7 @@ static void _destroy_prec(void *object) */ extern int init ( void ) { - char *temp = slurm_get_proctrack_type(); - if(!strcasecmp(temp, "proctrack/pgid")) { - info("WARNING: We will use a much slower algorithm with " - "proctrack/pgid, use Proctracktype=proctrack/aix " - "with %s", plugin_name); - pgid_plugin = true; - } - xfree(temp); - temp = slurm_get_accounting_storage_type(); - if(!strcasecmp(temp, ACCOUNTING_STORAGE_TYPE_NONE)) { - error("WARNING: Even though we are collecting accounting " - "information you have asked for it not to be stored " - "(%s) if this is not what you have in mind you will " - "need to change it.", ACCOUNTING_STORAGE_TYPE_NONE); - } - xfree(temp); + pagesize = getpagesize()/1024; verbose("%s loaded", plugin_name); return SLURM_SUCCESS; @@ -427,199 +329,13 @@ extern int fini ( void ) return SLURM_SUCCESS; } -extern struct jobacctinfo *jobacct_gather_p_create(jobacct_id_t *jobacct_id) -{ - return jobacct_common_alloc_jobacct(jobacct_id); -} - -extern void jobacct_gather_p_destroy(struct jobacctinfo *jobacct) -{ - jobacct_common_free_jobacct(jobacct); -} - -extern int jobacct_gather_p_setinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_setinfo(jobacct, type, data); - -} - -extern int jobacct_gather_p_getinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_getinfo(jobacct, type, data); -} - -extern void jobacct_gather_p_pack(struct jobacctinfo *jobacct, - uint16_t rpc_version, Buf buffer) -{ - jobacct_common_pack(jobacct, rpc_version, buffer); -} - -extern int jobacct_gather_p_unpack(struct jobacctinfo **jobacct, - uint16_t rpc_version, Buf buffer) -{ - return jobacct_common_unpack(jobacct, rpc_version, buffer); -} - -extern void jobacct_gather_p_aggregate(struct jobacctinfo *dest, - struct jobacctinfo *from) -{ - jobacct_common_aggregate(dest, from); -} - -/* - * jobacct_startpoll() is called when the plugin is loaded by - * slurmd, before any other functions are called. Put global - * initialization here. - */ - -extern int jobacct_gather_p_startpoll(uint16_t frequency) -{ - int rc = SLURM_SUCCESS; - -#ifdef HAVE_AIX - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - - debug("%s loaded", plugin_name); - - debug("jobacct-gather: frequency = %d", frequency); - - jobacct_shutdown = false; - - freq = frequency; - pagesize = getpagesize()/1024; - task_list = list_create(jobacct_common_free_jobacct); - if (frequency == 0) { /* don't want dynamic monitoring? */ - debug2("jobacct AIX dynamic logging disabled"); - return rc; - } - - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } else - debug3("jobacct-gather AIX dynamic logging enabled"); - slurm_attr_destroy(&attr); -#else - error("jobacct-gather AIX not loaded, not an aix system, " - "check slurm.conf"); -#endif - return rc; -} - extern int jobacct_gather_p_endpoll() { - jobacct_shutdown = true; -#ifdef HAVE_AIX - slurm_mutex_lock(&jobacct_lock); - if(task_list) - list_destroy(task_list); - task_list = NULL; - slurm_mutex_unlock(&jobacct_lock); -#endif - return SLURM_SUCCESS; } -extern void jobacct_gather_p_change_poll(uint16_t frequency) -{ -#ifdef HAVE_AIX - if(freq == 0 && frequency != 0) { - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } else - debug3("jobacct-gather AIX dynamic logging enabled"); - slurm_attr_destroy(&attr); - jobacct_shutdown = false; - } - - freq = frequency; - debug("jobacct-gather: frequency changed = %d", frequency); - if (freq == 0) - jobacct_shutdown = true; -#endif - return; -} - -extern void jobacct_gather_p_suspend_poll() -{ - jobacct_suspended = true; -} - -extern void jobacct_gather_p_resume_poll() -{ - jobacct_suspended = false; -} - -extern int jobacct_gather_p_set_proctrack_container_id(uint64_t id) -{ - if (pgid_plugin) - return SLURM_SUCCESS; - - if (cont_id != (uint64_t)NO_VAL) - info("Warning: jobacct: set_proctrack_container_id: cont_id " - "is already set to %"PRIu64" you are setting it to " - "%"PRIu64"", cont_id, id); - if (id <= 0) { - error("jobacct: set_proctrack_container_id: " - "I was given most likely an unset cont_id %"PRIu64"", - id); - return SLURM_ERROR; - } - cont_id = id; - - return SLURM_SUCCESS; -} extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id) { - if (jobacct_shutdown) - return SLURM_ERROR; - return jobacct_common_add_task(pid, jobacct_id, task_list); -} - -extern struct jobacctinfo *jobacct_gather_p_stat_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - -#ifdef HAVE_AIX - _get_process_data(); -#endif - if(pid) - return jobacct_common_stat_task(pid, task_list); - else - return NULL; -} - -extern struct jobacctinfo *jobacct_gather_p_remove_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - return jobacct_common_remove_task(pid, task_list); -} - -extern void jobacct_gather_p_2_stats(slurmdb_stats_t *stats, - struct jobacctinfo *jobacct) -{ - jobacct_common_2_stats(stats, jobacct); + return SLURM_SUCCESS; } diff --git a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c index 9d7aed9fa6..d72a09a2bb 100644 --- a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c +++ b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c @@ -56,19 +56,9 @@ * overwritten when linking with the slurmd. */ #if defined (__APPLE__) -uint32_t jobacct_job_id __attribute__((weak_import)); -pthread_mutex_t jobacct_lock __attribute__((weak_import)); -uint32_t jobacct_mem_limit __attribute__((weak_import)); -uint32_t jobacct_step_id __attribute__((weak_import)); -uint32_t jobacct_vmem_limit __attribute__((weak_import)); slurmd_conf_t *conf __attribute__((weak_import)); int bg_recover __attribute__((weak_import)) = NOT_FROM_CONTROLLER; #else -uint32_t jobacct_job_id; -pthread_mutex_t jobacct_lock; -uint32_t jobacct_mem_limit; -uint32_t jobacct_step_id; -uint32_t jobacct_vmem_limit; slurmd_conf_t *conf; int bg_recover = NOT_FROM_CONTROLLER; #endif @@ -105,7 +95,7 @@ int bg_recover = NOT_FROM_CONTROLLER; */ const char plugin_name[] = "Job accounting gather cgroup plugin"; const char plugin_type[] = "jobacct_gather/cgroup"; -const uint32_t plugin_version = 100; +const uint32_t plugin_version = 200; /* Other useful declarations */ @@ -121,40 +111,208 @@ typedef struct prec { /* process record */ // int last_cpu; } prec_t; -static int freq = 0; +static int pagesize = 0; static DIR *slash_proc = NULL; static pthread_mutex_t reading_mutex = PTHREAD_MUTEX_INITIALIZER; -static bool jobacct_shutdown = 0; -static bool jobacct_suspended = 0; -static List task_list = NULL; -static uint64_t cont_id = (uint64_t)NO_VAL; -static bool pgid_plugin = false; static slurm_cgroup_conf_t slurm_cgroup_conf; /* Finally, pre-define all local routines. */ -static void _acct_kill_step(void); static void _destroy_prec(void *object); static int _is_a_lwp(uint32_t pid); -static void _get_process_data(void); static int _get_process_data_line(int in, prec_t *prec); -static void *_watch_tasks(void *arg); + +static int _is_a_lwp(uint32_t pid) { + + FILE *status_fp = NULL; + char proc_status_file[256]; + uint32_t tgid; + int rc; + + if (snprintf(proc_status_file, 256, "/proc/%d/status", pid) > 256) { + debug("jobacct_gather_cgroup: unable to build proc_status " + "fpath"); + return -1; + } + if (!(status_fp = fopen(proc_status_file, "r"))) { + debug3("jobacct_gather_cgroup: unable to open %s", + proc_status_file); + return -1; + } + + + do { + rc = fscanf(status_fp, + "Name:\t%*s\n%*[ \ta-zA-Z0-9:()]\nTgid:\t%d\n", + &tgid); + } while (rc < 0 && errno == EINTR); + fclose(status_fp); + + /* unable to read /proc/[pid]/status content */ + if (rc != 1) { + debug3("jobacct_gather_cgroup: unable to read requested " + "pattern in %s",proc_status_file); + return -1; + } + + /* if tgid differs from pid, this is a LWP (Thread POSIX) */ + if ((uint32_t) tgid != (uint32_t) pid) { + debug3("jobacct_gather_cgroup: pid=%d is a lightweight process", + tgid); + return 1; + } else + return 0; +} + +/* _get_process_data_line() - get line of data from /proc//stat + * + * IN: in - input file descriptor + * OUT: prec - the destination for the data + * + * RETVAL: ==0 - no valid data + * !=0 - data are valid + * + * Based upon stat2proc() from the ps command. It can handle arbitrary + * executable file basenames for `cmd', i.e. those with embedded + * whitespace or embedded ')'s. Such names confuse %s (see scanf(3)), + * so the string is split and %39c is used instead. + * (except for embedded ')' "(%[^)]c)" would work. + */ +static int _get_process_data_line(int in, prec_t *prec) { + char sbuf[256], *tmp; + int num_read, nvals; + char cmd[40], state[1]; + int ppid, pgrp, session, tty_nr, tpgid; + long unsigned flags, minflt, cminflt, majflt, cmajflt; + long unsigned utime, stime, starttime, vsize; + long int cutime, cstime, priority, nice, timeout, itrealvalue, rss; + long int f1,f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12; + long int f13,f14, lastcpu; + + num_read = read(in, sbuf, (sizeof(sbuf) - 1)); + if (num_read <= 0) + return 0; + sbuf[num_read] = '\0'; + + tmp = strrchr(sbuf, ')'); /* split into "PID (cmd" and "" */ + *tmp = '\0'; /* replace trailing ')' with NUL */ + /* parse these two strings separately, skipping the leading "(". */ + nvals = sscanf(sbuf, "%d (%39c", &prec->pid, cmd); + if (nvals < 2) + return 0; + + nvals = sscanf(tmp + 2, /* skip space after ')' too */ + "%c %d %d %d %d %d " + "%lu %lu %lu %lu %lu " + "%lu %lu %ld %ld %ld %ld " + "%ld %ld %lu %lu %ld " + "%lu %lu %lu %lu %lu " + "%lu %lu %lu %lu %lu " + "%lu %lu %lu %ld %ld ", + state, &ppid, &pgrp, &session, &tty_nr, &tpgid, + &flags, &minflt, &cminflt, &majflt, &cmajflt, + &utime, &stime, &cutime, &cstime, &priority, &nice, + &timeout, &itrealvalue, &starttime, &vsize, &rss, + &f1, &f2, &f3, &f4, &f5 ,&f6, &f7, &f8, &f9, &f10, &f11, + &f12, &f13, &f14, &lastcpu); + /* There are some additional fields, which we do not scan or use */ + if ((nvals < 37) || (rss < 0)) + return 0; + + /* If current pid corresponds to a Light Weight Process + * (Thread POSIX) skip it, we will only account the original + * process (pid==tgid) + */ + if (_is_a_lwp(prec->pid) > 0) + return 0; + + /* Copy the values that slurm records into our data structure */ +// prec->last_cpu = lastcpu; + return 1; +} + +static void _destroy_prec(void *object) +{ + prec_t *prec = (prec_t *)object; + xfree(prec); + return; +} + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init (void) +{ + /* If running on the slurmctld don't do any of this since it + isn't needed. + */ + if (bg_recover == NOT_FROM_CONTROLLER) { + pagesize = getpagesize(); + + /* read cgroup configuration */ + if (read_slurm_cgroup_conf(&slurm_cgroup_conf)) + return SLURM_ERROR; + + /* initialize cpuinfo internal data */ + if (xcpuinfo_init() != XCPUINFO_SUCCESS) { + free_slurm_cgroup_conf(&slurm_cgroup_conf); + return SLURM_ERROR; + } + + /* enable cpuacct cgroup subsystem */ + if (jobacct_gather_cgroup_cpuacct_init(&slurm_cgroup_conf) != + SLURM_SUCCESS) { + xcpuinfo_fini(); + free_slurm_cgroup_conf(&slurm_cgroup_conf); + return SLURM_ERROR; + } + + /* enable memory cgroup subsystem */ + if (jobacct_gather_cgroup_memory_init(&slurm_cgroup_conf) != + SLURM_SUCCESS) { + xcpuinfo_fini(); + free_slurm_cgroup_conf(&slurm_cgroup_conf); + return SLURM_ERROR; + } + info("WARNING: The %s plugin is experimental, and should " + "not currently be used in production environments.", + plugin_name); + } + + verbose("%s loaded", plugin_name); + return SLURM_SUCCESS; +} + +extern int fini (void) +{ + jobacct_gather_cgroup_cpuacct_fini(&slurm_cgroup_conf); + jobacct_gather_cgroup_memory_fini(&slurm_cgroup_conf); + + /* unload configuration */ + free_slurm_cgroup_conf(&slurm_cgroup_conf); + return SLURM_SUCCESS; +} /* - * _get_process_data() - Build a table of all current processes + * jobacct_gather_p_poll_data() - Build a table of all current processes * - * IN: pid. + * IN/OUT: task_list - list containing current processes. + * IN: pgid_plugin - if we are running with the pgid plugin. + * IN: cont_id - container id of processes if not running with pgid. * * OUT: none * - * THREADSAFE! Only one thread ever gets here. + * THREADSAFE! Only one thread ever gets here. It is locked in + * slurm_jobacct_gather. * * Assumption: * Any file with a name of the form "/proc/[0-9]+/stat" * is a Linux-style stat entry. We disregard the data if they look * wrong. */ -static void _get_process_data(void) +extern void jobacct_gather_p_poll_data( + List task_list, bool pgid_plugin, uint64_t cont_id) { static int slash_proc_open = 0; @@ -175,9 +333,8 @@ static void _get_process_data(void) long hertz; char *cpu_time, *memory_stat, *ptr; size_t cpu_time_size, memory_stat_size; - int utime, stime, total_rss, total_pgpgin, page_size; + int utime, stime, total_rss, total_pgpgin; - page_size = getpagesize(); if (!pgid_plugin && cont_id == (uint64_t)NO_VAL) { debug("cont_id hasn't been set yet not running poll"); return; @@ -239,7 +396,7 @@ static void _get_process_data(void) ptr = strstr(memory_stat, "total_pgpgin"); sscanf(ptr, "total_pgpgin %u", &total_pgpgin); prec->pages = total_pgpgin; - prec->rss = total_rss / page_size; + prec->rss = total_rss / pagesize; list_append(prec_list, prec); } else xfree(prec); @@ -322,7 +479,7 @@ static void _get_process_data(void) ptr = strstr(memory_stat, "total_pgpgin"); sscanf(ptr, "total_pgpgin %u", &total_pgpgin); prec->pages = total_pgpgin; - prec->rss = total_rss / page_size; + prec->rss = total_rss / pagesize; list_append(prec_list, prec); } else @@ -333,15 +490,8 @@ static void _get_process_data(void) } - if (!list_count(prec_list)) { + if (!list_count(prec_list) || !task_list || !list_count(task_list)) goto finished; /* We have no business being here! */ - } - - slurm_mutex_lock(&jobacct_lock); - if (!task_list || !list_count(task_list)) { - slurm_mutex_unlock(&jobacct_lock); - goto finished; - } itr = list_iterator_create(task_list); while ((jobacct = list_next(itr))) { @@ -375,42 +525,8 @@ static void _get_process_data(void) list_iterator_destroy(itr2); } list_iterator_destroy(itr); - slurm_mutex_unlock(&jobacct_lock); - if (jobacct_mem_limit) { - if (jobacct_step_id == NO_VAL) { - debug("Job %u memory used:%u limit:%u KB", - jobacct_job_id, total_job_mem, jobacct_mem_limit); - } else { - debug("Step %u.%u memory used:%u limit:%u KB", - jobacct_job_id, jobacct_step_id, - total_job_mem, jobacct_mem_limit); - } - } - if (jobacct_job_id && jobacct_mem_limit && - (total_job_mem > jobacct_mem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_mem_limit); - } else { - error("Step %u.%u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_step_id, - jobacct_mem_limit); - } - _acct_kill_step(); - } else if (jobacct_job_id && jobacct_vmem_limit && - (total_job_vsize > jobacct_vmem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB virtual memory limit, " - "being killed", jobacct_job_id, - jobacct_vmem_limit); - } else { - error("Step %u.%u exceeded %u KB virtual memory " - "limit, being killed", jobacct_job_id, - jobacct_step_id, jobacct_vmem_limit); - } - _acct_kill_step(); - } + jobacct_gather_handle_mem_limit(total_job_mem, total_job_vsize); finished: list_destroy(prec_list); @@ -418,348 +534,8 @@ finished: return; } -/* _acct_kill_step() issue RPC to kill a slurm job step */ -static void _acct_kill_step(void) -{ - slurm_msg_t msg; - job_step_kill_msg_t req; - job_notify_msg_t notify_req; - - slurm_msg_t_init(&msg); - notify_req.job_id = jobacct_job_id; - notify_req.job_step_id = jobacct_step_id; - notify_req.message = "Exceeded job memory limit"; - msg.msg_type = REQUEST_JOB_NOTIFY; - msg.data = ¬ify_req; - slurm_send_only_controller_msg(&msg); - - /* - * Request message: - */ - req.job_id = jobacct_job_id; - req.job_step_id = jobacct_step_id; - req.signal = SIGKILL; - req.batch_flag = 0; - msg.msg_type = REQUEST_CANCEL_JOB_STEP; - msg.data = &req; - - slurm_send_only_controller_msg(&msg); -} - -static int _is_a_lwp(uint32_t pid) { - - FILE *status_fp = NULL; - char proc_status_file[256]; - uint32_t tgid; - int rc; - - if (snprintf(proc_status_file, 256, "/proc/%d/status", pid) > 256) { - debug("jobacct_gather_cgroup: unable to build proc_status " - "fpath"); - return -1; - } - if (!(status_fp = fopen(proc_status_file, "r"))) { - debug3("jobacct_gather_cgroup: unable to open %s", - proc_status_file); - return -1; - } - - - do { - rc = fscanf(status_fp, - "Name:\t%*s\n%*[ \ta-zA-Z0-9:()]\nTgid:\t%d\n", - &tgid); - } while (rc < 0 && errno == EINTR); - fclose(status_fp); - - /* unable to read /proc/[pid]/status content */ - if (rc != 1) { - debug3("jobacct_gather_cgroup: unable to read requested " - "pattern in %s",proc_status_file); - return -1; - } - - /* if tgid differs from pid, this is a LWP (Thread POSIX) */ - if ((uint32_t) tgid != (uint32_t) pid) { - debug3("jobacct_gather_cgroup: pid=%d is a lightweight process", - tgid); - return 1; - } else - return 0; -} - -/* _get_process_data_line() - get line of data from /proc//stat - * - * IN: in - input file descriptor - * OUT: prec - the destination for the data - * - * RETVAL: ==0 - no valid data - * !=0 - data are valid - * - * Based upon stat2proc() from the ps command. It can handle arbitrary - * executable file basenames for `cmd', i.e. those with embedded - * whitespace or embedded ')'s. Such names confuse %s (see scanf(3)), - * so the string is split and %39c is used instead. - * (except for embedded ')' "(%[^)]c)" would work. - */ -static int _get_process_data_line(int in, prec_t *prec) { - char sbuf[256], *tmp; - int num_read, nvals; - char cmd[40], state[1]; - int ppid, pgrp, session, tty_nr, tpgid; - long unsigned flags, minflt, cminflt, majflt, cmajflt; - long unsigned utime, stime, starttime, vsize; - long int cutime, cstime, priority, nice, timeout, itrealvalue, rss; - long int f1,f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12; - long int f13,f14, lastcpu; - - num_read = read(in, sbuf, (sizeof(sbuf) - 1)); - if (num_read <= 0) - return 0; - sbuf[num_read] = '\0'; - - tmp = strrchr(sbuf, ')'); /* split into "PID (cmd" and "" */ - *tmp = '\0'; /* replace trailing ')' with NUL */ - /* parse these two strings separately, skipping the leading "(". */ - nvals = sscanf(sbuf, "%d (%39c", &prec->pid, cmd); - if (nvals < 2) - return 0; - - nvals = sscanf(tmp + 2, /* skip space after ')' too */ - "%c %d %d %d %d %d " - "%lu %lu %lu %lu %lu " - "%lu %lu %ld %ld %ld %ld " - "%ld %ld %lu %lu %ld " - "%lu %lu %lu %lu %lu " - "%lu %lu %lu %lu %lu " - "%lu %lu %lu %ld %ld ", - state, &ppid, &pgrp, &session, &tty_nr, &tpgid, - &flags, &minflt, &cminflt, &majflt, &cmajflt, - &utime, &stime, &cutime, &cstime, &priority, &nice, - &timeout, &itrealvalue, &starttime, &vsize, &rss, - &f1, &f2, &f3, &f4, &f5 ,&f6, &f7, &f8, &f9, &f10, &f11, - &f12, &f13, &f14, &lastcpu); - /* There are some additional fields, which we do not scan or use */ - if ((nvals < 37) || (rss < 0)) - return 0; - - /* If current pid corresponds to a Light Weight Process - * (Thread POSIX) skip it, we will only account the original - * process (pid==tgid) - */ - if (_is_a_lwp(prec->pid) > 0) - return 0; - - /* Copy the values that slurm records into our data structure */ -// prec->last_cpu = lastcpu; - return 1; -} - -static void _task_sleep(int rem) -{ - while (rem) - rem = sleep(rem); /* subject to interupt */ -} - -/* _watch_tasks() -- monitor slurm jobs and track their memory usage - * - * IN, OUT: Irrelevant; this is invoked by pthread_create() - */ - -static void *_watch_tasks(void *arg) -{ - /* Give chance for processes to spawn before starting - * the polling. This should largely eliminate the - * the chance of having /proc open when the tasks are - * spawned, which would prevent a valid checkpoint/restart - * with some systems */ - _task_sleep(1); - - while (!jobacct_shutdown) { /* Do this until shutdown is requested */ - if (!jobacct_suspended) - _get_process_data(); /* Update the data */ - _task_sleep(freq); - } - return NULL; -} - - -static void _destroy_prec(void *object) -{ - prec_t *prec = (prec_t *)object; - xfree(prec); - return; -} - -/* - * init() is called when the plugin is loaded, before any other functions - * are called. Put global initialization here. - */ -extern int init (void) -{ - char *temp; - - /* If running on the slurmctld don't do any of this since it - isn't needed. - */ - if (bg_recover == NOT_FROM_CONTROLLER) { - /* read cgroup configuration */ - if (read_slurm_cgroup_conf(&slurm_cgroup_conf)) - return SLURM_ERROR; - - /* initialize cpuinfo internal data */ - if (xcpuinfo_init() != XCPUINFO_SUCCESS) { - free_slurm_cgroup_conf(&slurm_cgroup_conf); - return SLURM_ERROR; - } - - /* enable cpuacct cgroup subsystem */ - if (jobacct_gather_cgroup_cpuacct_init(&slurm_cgroup_conf) != - SLURM_SUCCESS) { - xcpuinfo_fini(); - free_slurm_cgroup_conf(&slurm_cgroup_conf); - return SLURM_ERROR; - } - - /* enable memory cgroup subsystem */ - if (jobacct_gather_cgroup_memory_init(&slurm_cgroup_conf) != - SLURM_SUCCESS) { - xcpuinfo_fini(); - free_slurm_cgroup_conf(&slurm_cgroup_conf); - return SLURM_ERROR; - } - info("WARNING: The %s plugin is experimental, and should " - "not currently be used in production environments.", - plugin_name); - } - - temp = slurm_get_proctrack_type(); - if (!strcasecmp(temp, "proctrack/pgid")) { - info("WARNING: We will use a much slower algorithm with " - "proctrack/pgid, use Proctracktype=proctrack/linuxproc " - "or Proctracktype=proctrack/rms with %s", - plugin_name); - pgid_plugin = true; - } - - xfree(temp); - temp = slurm_get_accounting_storage_type(); - if (!strcasecmp(temp, ACCOUNTING_STORAGE_TYPE_NONE)) { - error("WARNING: Even though we are collecting accounting " - "information you have asked for it not to be stored " - "(%s) if this is not what you have in mind you will " - "need to change it.", ACCOUNTING_STORAGE_TYPE_NONE); - } - xfree(temp); - - verbose("%s loaded", plugin_name); - return SLURM_SUCCESS; -} - -extern int fini (void) -{ - jobacct_gather_cgroup_cpuacct_fini(&slurm_cgroup_conf); - jobacct_gather_cgroup_memory_fini(&slurm_cgroup_conf); - - /* unload configuration */ - free_slurm_cgroup_conf(&slurm_cgroup_conf); - return SLURM_SUCCESS; -} - -extern struct jobacctinfo *jobacct_gather_p_create(jobacct_id_t *jobacct_id) -{ - return jobacct_common_alloc_jobacct(jobacct_id); -} - -extern void jobacct_gather_p_destroy(struct jobacctinfo *jobacct) -{ - jobacct_common_free_jobacct(jobacct); -} - -extern int jobacct_gather_p_setinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_setinfo(jobacct, type, data); -} - -extern int jobacct_gather_p_getinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_getinfo(jobacct, type, data); -} - -extern void jobacct_gather_p_pack(struct jobacctinfo *jobacct, - uint16_t rpc_version, Buf buffer) -{ - jobacct_common_pack(jobacct, rpc_version, buffer); -} - -extern int jobacct_gather_p_unpack(struct jobacctinfo **jobacct, - uint16_t rpc_version, Buf buffer) -{ - return jobacct_common_unpack(jobacct, rpc_version, buffer); -} - -extern void jobacct_gather_p_aggregate(struct jobacctinfo *dest, - struct jobacctinfo *from) -{ - jobacct_common_aggregate(dest, from); -} - -/* - * jobacct_startpoll() is called when the plugin is loaded by - * slurmd, before any other functions are called. Put global - * initialization here. - */ - -extern int jobacct_gather_p_startpoll(uint16_t frequency) -{ - int rc = SLURM_SUCCESS; - - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - - debug("%s loaded", plugin_name); - - debug("jobacct-gather: frequency = %d", frequency); - - jobacct_shutdown = false; - - task_list = list_create(jobacct_common_free_jobacct); - - if (frequency == 0) { /* don't want dynamic monitoring? */ - debug2("jobacct-gather cgroup dynamic logging disabled"); - return rc; - } - - freq = frequency; - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } - else - debug3("jobacct-gather cgroup dynamic logging enabled"); - slurm_attr_destroy(&attr); - - return rc; -} - extern int jobacct_gather_p_endpoll() { - jobacct_shutdown = true; - slurm_mutex_lock(&jobacct_lock); - if (task_list) - list_destroy(task_list); - task_list = NULL; - slurm_mutex_unlock(&jobacct_lock); - if (slash_proc) { slurm_mutex_lock(&reading_mutex); (void) closedir(slash_proc); @@ -770,75 +546,8 @@ extern int jobacct_gather_p_endpoll() return SLURM_SUCCESS; } -extern void jobacct_gather_p_change_poll(uint16_t frequency) -{ - if (freq == 0 && frequency != 0) { - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, - PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } else - debug3("jobacct-gather cgroup dynamic logging " - "enabled"); - slurm_attr_destroy(&attr); - jobacct_shutdown = false; - } - - freq = frequency; - debug("jobacct-gather: frequency changed = %d", frequency); - if (freq == 0) - jobacct_shutdown = true; - return; -} - -extern void jobacct_gather_p_suspend_poll() -{ - jobacct_suspended = true; -} - -extern void jobacct_gather_p_resume_poll() -{ - jobacct_suspended = false; -} - -extern int jobacct_gather_p_set_proctrack_container_id(uint64_t id) -{ - if(pgid_plugin) - return SLURM_SUCCESS; - - if (cont_id != (uint64_t)NO_VAL) - info("Warning: jobacct: set_proctrack_container_id: cont_id " - "is already set to %"PRIu64" you are setting it to " - "%"PRIu64"", cont_id, id); - if (id <= 0) { - error("jobacct: set_proctrack_container_id: " - "I was given most likely an unset cont_id %"PRIu64"", - id); - return SLURM_ERROR; - } - cont_id = id; - return SLURM_SUCCESS; -} - extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id) { - int rc; - - if (jobacct_shutdown) - return SLURM_ERROR; - if ((rc = jobacct_common_add_task(pid, jobacct_id, task_list)) != - SLURM_SUCCESS) - return SLURM_ERROR; - if (jobacct_gather_cgroup_cpuacct_attach_task(pid, jobacct_id) != SLURM_SUCCESS) return SLURM_ERROR; @@ -847,42 +556,7 @@ extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id) SLURM_SUCCESS) return SLURM_ERROR; - return rc; -} - - -extern struct jobacctinfo *jobacct_gather_p_stat_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - else if(pid) { - _get_process_data(); - return jobacct_common_stat_task(pid, task_list); - } else { - /* In this situation, we are just trying to get a - * basis of information since we are not pollng. So - * we will give a chance for processes to spawn before we - * gather information. This should largely eliminate the - * the chance of having /proc open when the tasks are - * spawned, which would prevent a valid checkpoint/restart - * with some systems */ - _task_sleep(1); - _get_process_data(); - return NULL; - } -} - -extern struct jobacctinfo *jobacct_gather_p_remove_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - return jobacct_common_remove_task(pid, task_list); -} - -extern void jobacct_gather_p_2_stats(slurmdb_stats_t *stats, - struct jobacctinfo *jobacct) -{ - jobacct_common_2_stats(stats, jobacct); + return SLURM_SUCCESS; } extern char* jobacct_cgroup_create_slurm_cg(xcgroup_ns_t* ns) diff --git a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h index 470883b02d..4d0b45d2c2 100644 --- a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h +++ b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.h @@ -41,7 +41,7 @@ #include "src/common/xcgroup.h" #include "src/common/xcpuinfo.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/xcgroup_read_config.h" extern xcgroup_t task_memory_cg; diff --git a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c index 811d44aa63..f37709cdce 100644 --- a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c +++ b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c @@ -39,34 +39,17 @@ * Copyright (C) 2002 The Regents of the University of California. \*****************************************************************************/ +#include #include #include #include "src/common/slurm_xlator.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_defs.h" #include "src/slurmd/common/proctrack.h" #define _DEBUG 0 -/* These are defined here so when we link with something other than - * the slurmd we will have these symbols defined. They will get - * overwritten when linking with the slurmd. - */ -#if defined (__APPLE__) -uint32_t jobacct_job_id __attribute__((weak_import)); -pthread_mutex_t jobacct_lock __attribute__((weak_import)); -uint32_t jobacct_mem_limit __attribute__((weak_import)); -uint32_t jobacct_step_id __attribute__((weak_import)); -uint32_t jobacct_vmem_limit __attribute__((weak_import)); -#else -uint32_t jobacct_job_id; -pthread_mutex_t jobacct_lock; -uint32_t jobacct_mem_limit; -uint32_t jobacct_step_id; -uint32_t jobacct_vmem_limit; -#endif - /* * These variables are required by the generic plugin interface. If they * are not found in the plugin, the plugin loader will ignore it. @@ -98,7 +81,7 @@ uint32_t jobacct_vmem_limit; */ const char plugin_name[] = "Job accounting gather LINUX plugin"; const char plugin_type[] = "jobacct_gather/linux"; -const uint32_t plugin_version = 100; +const uint32_t plugin_version = 200; /* Other useful declarations */ @@ -112,24 +95,16 @@ typedef struct prec { /* process record */ int vsize; /* virtual size */ } prec_t; -static int freq = 0; +static int pagesize = 0; static DIR *slash_proc = NULL; static pthread_mutex_t reading_mutex = PTHREAD_MUTEX_INITIALIZER; -static bool jobacct_shutdown = 0; -static bool jobacct_suspended = 0; -static List task_list = NULL; -static uint64_t cont_id = (uint64_t)NO_VAL; -static bool pgid_plugin = false; /* Finally, pre-define all local routines. */ -static void _acct_kill_step(void); static void _destroy_prec(void *object); static int _is_a_lwp(uint32_t pid); static void _get_offspring_data(List prec_list, prec_t *ancestor, pid_t pid); -static void _get_process_data(void); static int _get_process_data_line(int in, prec_t *prec); -static void *_watch_tasks(void *arg); /* * _get_offspring_data() -- collect memory usage data for the offspring @@ -177,21 +152,158 @@ _get_offspring_data(List prec_list, prec_t *ancestor, pid_t pid) { return; } +static int _is_a_lwp(uint32_t pid) { + + FILE *status_fp = NULL; + char proc_status_file[256]; + uint32_t tgid; + int rc; + + if ( snprintf(proc_status_file, 256, + "/proc/%d/status",pid) > 256 ) { + debug("jobacct_gather_linux: unable to build proc_status " + "fpath"); + return -1; + } + if ((status_fp = fopen(proc_status_file, "r"))==NULL) { + debug3("jobacct_gather_linux: unable to open %s", + proc_status_file); + return -1; + } + + + do { + rc = fscanf(status_fp, + "Name:\t%*s\n%*[ \ta-zA-Z0-9:()]\nTgid:\t%d\n", + &tgid); + } while ( rc < 0 && errno == EINTR ); + fclose(status_fp); + + /* unable to read /proc/[pid]/status content */ + if ( rc != 1 ) { + debug3("jobacct_gather_linux: unable to read requested " + "pattern in %s",proc_status_file); + return -1; + } + + /* if tgid differs from pid, this is a LWP (Thread POSIX) */ + if ( (uint32_t) tgid != (uint32_t) pid ) { + debug3("jobacct_gather_linux: pid=%d is a lightweight process", + tgid); + return 1; + } else + return 0; + +} + +/* _get_process_data_line() - get line of data from /proc//stat + * + * IN: in - input file descriptor + * OUT: prec - the destination for the data + * + * RETVAL: ==0 - no valid data + * !=0 - data are valid + * + * Based upon stat2proc() from the ps command. It can handle arbitrary executable + * file basenames for `cmd', i.e. those with embedded whitespace or embedded ')'s. + * Such names confuse %s (see scanf(3)), so the string is split and %39c is used + * instead. (except for embedded ')' "(%[^)]c)" would work. + */ +static int _get_process_data_line(int in, prec_t *prec) { + char sbuf[256], *tmp; + int num_read, nvals; + char cmd[40], state[1]; + int ppid, pgrp, session, tty_nr, tpgid; + long unsigned flags, minflt, cminflt, majflt, cmajflt; + long unsigned utime, stime, starttime, vsize; + long int cutime, cstime, priority, nice, timeout, itrealvalue, rss; + + num_read = read(in, sbuf, (sizeof(sbuf) - 1)); + if (num_read <= 0) + return 0; + sbuf[num_read] = '\0'; + + tmp = strrchr(sbuf, ')'); /* split into "PID (cmd" and "" */ + *tmp = '\0'; /* replace trailing ')' with NUL */ + /* parse these two strings separately, skipping the leading "(". */ + nvals = sscanf(sbuf, "%d (%39c", &prec->pid, cmd); + if (nvals < 2) + return 0; + + nvals = sscanf(tmp + 2, /* skip space after ')' too */ + "%c %d %d %d %d %d " + "%lu %lu %lu %lu %lu " + "%lu %lu %ld %ld %ld %ld " + "%ld %ld %lu %lu %ld", + state, &ppid, &pgrp, &session, &tty_nr, &tpgid, + &flags, &minflt, &cminflt, &majflt, &cmajflt, + &utime, &stime, &cutime, &cstime, &priority, &nice, + &timeout, &itrealvalue, &starttime, &vsize, &rss); + /* There are some additional fields, which we do not scan or use */ + if ((nvals < 22) || (rss < 0)) + return 0; + + /* If current pid corresponds to a Light Weight Process + * (Thread POSIX) skip it, we will only account the original + * process (pid==tgid) */ + if (_is_a_lwp(prec->pid) > 0) + return 0; + + /* Copy the values that slurm records into our data structure */ + prec->ppid = ppid; + prec->pages = majflt; + prec->usec = utime; + prec->ssec = stime; + prec->vsize = vsize / 1024; /* convert from bytes to KB */ + prec->rss = rss * pagesize; /* convert from pages to KB */ + + return 1; +} + +static void _destroy_prec(void *object) +{ + prec_t *prec = (prec_t *)object; + xfree(prec); + return; +} + +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ +extern int init ( void ) +{ + pagesize = getpagesize()/1024; + + verbose("%s loaded", plugin_name); + + return SLURM_SUCCESS; +} + +extern int fini ( void ) +{ + return SLURM_SUCCESS; +} + /* - * _get_process_data() - Build a table of all current processes + * jobacct_gather_p_poll_data() - Build a table of all current processes * - * IN: pid. + * IN/OUT: task_list - list containing current processes. + * IN: pgid_plugin - if we are running with the pgid plugin. + * IN: cont_id - container id of processes if not running with pgid. * * OUT: none * - * THREADSAFE! Only one thread ever gets here. + * THREADSAFE! Only one thread ever gets here. It is locked in + * slurm_jobacct_gather. * * Assumption: * Any file with a name of the form "/proc/[0-9]+/stat" * is a Linux-style stat entry. We disregard the data if they look * wrong. */ -static void _get_process_data(void) +extern void jobacct_gather_p_poll_data( + List task_list, bool pgid_plugin, uint64_t cont_id) { static int slash_proc_open = 0; @@ -331,20 +443,13 @@ static void _get_process_data(void) } - if (!list_count(prec_list)) { + if (!list_count(prec_list) || !task_list || !list_count(task_list)) goto finished; /* We have no business being here! */ - } - - slurm_mutex_lock(&jobacct_lock); - if(!task_list || !list_count(task_list)) { - slurm_mutex_unlock(&jobacct_lock); - goto finished; - } itr = list_iterator_create(task_list); - while((jobacct = list_next(itr))) { + while ((jobacct = list_next(itr))) { itr2 = list_iterator_create(prec_list); - while((prec = list_next(itr2))) { + while ((prec = list_next(itr2))) { if (prec->pid == jobacct->pid) { #if _DEBUG info("pid:%u ppid:%u rss:%d KB", @@ -376,42 +481,8 @@ static void _get_process_data(void) list_iterator_destroy(itr2); } list_iterator_destroy(itr); - slurm_mutex_unlock(&jobacct_lock); - if (jobacct_mem_limit) { - if (jobacct_step_id == NO_VAL) { - debug("Job %u memory used:%u limit:%u KB", - jobacct_job_id, total_job_mem, jobacct_mem_limit); - } else { - debug("Step %u.%u memory used:%u limit:%u KB", - jobacct_job_id, jobacct_step_id, - total_job_mem, jobacct_mem_limit); - } - } - if (jobacct_job_id && jobacct_mem_limit && - (total_job_mem > jobacct_mem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_mem_limit); - } else { - error("Step %u.%u exceeded %u KB memory limit, being " - "killed", jobacct_job_id, jobacct_step_id, - jobacct_mem_limit); - } - _acct_kill_step(); - } else if (jobacct_job_id && jobacct_vmem_limit && - (total_job_vsize > jobacct_vmem_limit)) { - if (jobacct_step_id == NO_VAL) { - error("Job %u exceeded %u KB virtual memory limit, " - "being killed", jobacct_job_id, - jobacct_vmem_limit); - } else { - error("Step %u.%u exceeded %u KB virtual memory " - "limit, being killed", jobacct_job_id, - jobacct_step_id, jobacct_vmem_limit); - } - _acct_kill_step(); - } + jobacct_gather_handle_mem_limit(total_job_mem, total_job_vsize); finished: list_destroy(prec_list); @@ -419,411 +490,18 @@ finished: return; } -/* _acct_kill_step() issue RPC to kill a slurm job step */ -static void _acct_kill_step(void) -{ - slurm_msg_t msg; - job_step_kill_msg_t req; - job_notify_msg_t notify_req; - - slurm_msg_t_init(&msg); - notify_req.job_id = jobacct_job_id; - notify_req.job_step_id = jobacct_step_id; - notify_req.message = "Exceeded job memory limit"; - msg.msg_type = REQUEST_JOB_NOTIFY; - msg.data = ¬ify_req; - slurm_send_only_controller_msg(&msg); - - /* - * Request message: - */ - req.job_id = jobacct_job_id; - req.job_step_id = jobacct_step_id; - req.signal = SIGKILL; - req.batch_flag = 0; - msg.msg_type = REQUEST_CANCEL_JOB_STEP; - msg.data = &req; - - slurm_send_only_controller_msg(&msg); -} - -static int _is_a_lwp(uint32_t pid) { - - FILE *status_fp = NULL; - char proc_status_file[256]; - uint32_t tgid; - int rc; - - if ( snprintf(proc_status_file, 256, - "/proc/%d/status",pid) > 256 ) { - debug("jobacct_gather_linux: unable to build proc_status " - "fpath"); - return -1; - } - if ((status_fp = fopen(proc_status_file, "r"))==NULL) { - debug3("jobacct_gather_linux: unable to open %s", - proc_status_file); - return -1; - } - - - do { - rc = fscanf(status_fp, - "Name:\t%*s\n%*[ \ta-zA-Z0-9:()]\nTgid:\t%d\n", - &tgid); - } while ( rc < 0 && errno == EINTR ); - fclose(status_fp); - - /* unable to read /proc/[pid]/status content */ - if ( rc != 1 ) { - debug3("jobacct_gather_linux: unable to read requested " - "pattern in %s",proc_status_file); - return -1; - } - - /* if tgid differs from pid, this is a LWP (Thread POSIX) */ - if ( (uint32_t) tgid != (uint32_t) pid ) { - debug3("jobacct_gather_linux: pid=%d is a lightweight process", - tgid); - return 1; - } else - return 0; - -} - -/* _get_process_data_line() - get line of data from /proc//stat - * - * IN: in - input file descriptor - * OUT: prec - the destination for the data - * - * RETVAL: ==0 - no valid data - * !=0 - data are valid - * - * Based upon stat2proc() from the ps command. It can handle arbitrary executable - * file basenames for `cmd', i.e. those with embedded whitespace or embedded ')'s. - * Such names confuse %s (see scanf(3)), so the string is split and %39c is used - * instead. (except for embedded ')' "(%[^)]c)" would work. - */ -static int _get_process_data_line(int in, prec_t *prec) { - char sbuf[256], *tmp; - int num_read, nvals; - char cmd[40], state[1]; - int ppid, pgrp, session, tty_nr, tpgid; - long unsigned flags, minflt, cminflt, majflt, cmajflt; - long unsigned utime, stime, starttime, vsize; - long int cutime, cstime, priority, nice, timeout, itrealvalue, rss; - - num_read = read(in, sbuf, (sizeof(sbuf) - 1)); - if (num_read <= 0) - return 0; - sbuf[num_read] = '\0'; - - tmp = strrchr(sbuf, ')'); /* split into "PID (cmd" and "" */ - *tmp = '\0'; /* replace trailing ')' with NUL */ - /* parse these two strings separately, skipping the leading "(". */ - nvals = sscanf(sbuf, "%d (%39c", &prec->pid, cmd); - if (nvals < 2) - return 0; - - nvals = sscanf(tmp + 2, /* skip space after ')' too */ - "%c %d %d %d %d %d " - "%lu %lu %lu %lu %lu " - "%lu %lu %ld %ld %ld %ld " - "%ld %ld %lu %lu %ld", - state, &ppid, &pgrp, &session, &tty_nr, &tpgid, - &flags, &minflt, &cminflt, &majflt, &cmajflt, - &utime, &stime, &cutime, &cstime, &priority, &nice, - &timeout, &itrealvalue, &starttime, &vsize, &rss); - /* There are some additional fields, which we do not scan or use */ - if ((nvals < 22) || (rss < 0)) - return 0; - - /* If current pid corresponds to a Light Weight Process (Thread POSIX) */ - /* skip it, we will only account the original process (pid==tgid) */ - if (_is_a_lwp(prec->pid) > 0) - return 0; - - /* Copy the values that slurm records into our data structure */ - prec->ppid = ppid; - prec->pages = majflt; - prec->usec = utime; - prec->ssec = stime; - prec->vsize = vsize / 1024; /* convert from bytes to KB */ - prec->rss = rss * getpagesize() / 1024;/* convert from pages to KB */ - return 1; -} - -static void _task_sleep(int rem) -{ - while (rem) - rem = sleep(rem); /* subject to interupt */ -} - -/* _watch_tasks() -- monitor slurm jobs and track their memory usage - * - * IN, OUT: Irrelevant; this is invoked by pthread_create() - */ - -static void *_watch_tasks(void *arg) -{ - /* Give chance for processes to spawn before starting - * the polling. This should largely eliminate the - * the chance of having /proc open when the tasks are - * spawned, which would prevent a valid checkpoint/restart - * with some systems */ - _task_sleep(1); - - while(!jobacct_shutdown) { /* Do this until shutdown is requested */ - if(!jobacct_suspended) { - _get_process_data(); /* Update the data */ - } - _task_sleep(freq); - } - return NULL; -} - - -static void _destroy_prec(void *object) -{ - prec_t *prec = (prec_t *)object; - xfree(prec); - return; -} - -/* - * init() is called when the plugin is loaded, before any other functions - * are called. Put global initialization here. - */ -extern int init ( void ) -{ - char *temp = slurm_get_proctrack_type(); - if(!strcasecmp(temp, "proctrack/pgid")) { - info("WARNING: We will use a much slower algorithm with " - "proctrack/pgid, use Proctracktype=proctrack/linuxproc " - "or Proctracktype=proctrack/rms with %s", - plugin_name); - pgid_plugin = true; - } - xfree(temp); - temp = slurm_get_accounting_storage_type(); - if(!strcasecmp(temp, ACCOUNTING_STORAGE_TYPE_NONE)) { - error("WARNING: Even though we are collecting accounting " - "information you have asked for it not to be stored " - "(%s) if this is not what you have in mind you will " - "need to change it.", ACCOUNTING_STORAGE_TYPE_NONE); - } - xfree(temp); - verbose("%s loaded", plugin_name); - return SLURM_SUCCESS; -} - -extern int fini ( void ) -{ - return SLURM_SUCCESS; -} - -extern struct jobacctinfo *jobacct_gather_p_create(jobacct_id_t *jobacct_id) -{ - return jobacct_common_alloc_jobacct(jobacct_id); -} - -extern void jobacct_gather_p_destroy(struct jobacctinfo *jobacct) -{ - jobacct_common_free_jobacct(jobacct); -} - -extern int jobacct_gather_p_setinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_setinfo(jobacct, type, data); -} - -extern int jobacct_gather_p_getinfo(struct jobacctinfo *jobacct, - enum jobacct_data_type type, void *data) -{ - return jobacct_common_getinfo(jobacct, type, data); -} - -extern void jobacct_gather_p_pack(struct jobacctinfo *jobacct, - uint16_t rpc_version, Buf buffer) -{ - jobacct_common_pack(jobacct, rpc_version, buffer); -} - -extern int jobacct_gather_p_unpack(struct jobacctinfo **jobacct, - uint16_t rpc_version, Buf buffer) -{ - return jobacct_common_unpack(jobacct, rpc_version, buffer); -} - -extern void jobacct_gather_p_aggregate(struct jobacctinfo *dest, - struct jobacctinfo *from) -{ - jobacct_common_aggregate(dest, from); -} - -/* - * jobacct_startpoll() is called when the plugin is loaded by - * slurmd, before any other functions are called. Put global - * initialization here. - */ - -extern int jobacct_gather_p_startpoll(uint16_t frequency) -{ - int rc = SLURM_SUCCESS; - - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - - debug("%s loaded", plugin_name); - - debug("jobacct-gather: frequency = %d", frequency); - - jobacct_shutdown = false; - - task_list = list_create(jobacct_common_free_jobacct); - - if (frequency == 0) { /* don't want dynamic monitoring? */ - debug2("jobacct-gather LINUX dynamic logging disabled"); - return rc; - } - - freq = frequency; - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } - else - debug3("jobacct-gather LINUX dynamic logging enabled"); - slurm_attr_destroy(&attr); - - return rc; -} - extern int jobacct_gather_p_endpoll() { - jobacct_shutdown = true; - slurm_mutex_lock(&jobacct_lock); - if(task_list) - list_destroy(task_list); - task_list = NULL; - slurm_mutex_unlock(&jobacct_lock); - if (slash_proc) { slurm_mutex_lock(&reading_mutex); (void) closedir(slash_proc); slurm_mutex_unlock(&reading_mutex); } - - return SLURM_SUCCESS; -} - -extern void jobacct_gather_p_change_poll(uint16_t frequency) -{ - if(freq == 0 && frequency != 0) { - pthread_attr_t attr; - pthread_t _watch_tasks_thread_id; - /* create polling thread */ - slurm_attr_init(&attr); - if (pthread_attr_setdetachstate(&attr, - PTHREAD_CREATE_DETACHED)) - error("pthread_attr_setdetachstate error %m"); - - if (pthread_create(&_watch_tasks_thread_id, &attr, - &_watch_tasks, NULL)) { - debug("jobacct-gather failed to create _watch_tasks " - "thread: %m"); - frequency = 0; - } - else - debug3("jobacct-gather LINUX dynamic logging enabled"); - slurm_attr_destroy(&attr); - jobacct_shutdown = false; - } - - freq = frequency; - debug("jobacct-gather: frequency changed = %d", frequency); - if (freq == 0) - jobacct_shutdown = true; - return; -} - -extern void jobacct_gather_p_suspend_poll() -{ - jobacct_suspended = true; -} - -extern void jobacct_gather_p_resume_poll() -{ - jobacct_suspended = false; -} - -extern int jobacct_gather_p_set_proctrack_container_id(uint64_t id) -{ - if(pgid_plugin) - return SLURM_SUCCESS; - - if (cont_id != (uint64_t)NO_VAL) - info("Warning: jobacct: set_proctrack_container_id: cont_id " - "is already set to %"PRIu64" you are setting it to " - "%"PRIu64"", cont_id, id); - if (id <= 0) { - error("jobacct: set_proctrack_container_id: " - "I was given most likely an unset cont_id %"PRIu64"", - id); - return SLURM_ERROR; - } - cont_id = id; - return SLURM_SUCCESS; } extern int jobacct_gather_p_add_task(pid_t pid, jobacct_id_t *jobacct_id) { - if (jobacct_shutdown) - return SLURM_ERROR; - return jobacct_common_add_task(pid, jobacct_id, task_list); -} - - -extern struct jobacctinfo *jobacct_gather_p_stat_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - else if(pid) { - _get_process_data(); - return jobacct_common_stat_task(pid, task_list); - } else { - /* In this situation, we are just trying to get a - * basis of information since we are not pollng. So - * we will give a chance for processes to spawn before we - * gather information. This should largely eliminate the - * the chance of having /proc open when the tasks are - * spawned, which would prevent a valid checkpoint/restart - * with some systems */ - _task_sleep(1); - _get_process_data(); - return NULL; - } -} - -extern struct jobacctinfo *jobacct_gather_p_remove_task(pid_t pid) -{ - if (jobacct_shutdown) - return NULL; - return jobacct_common_remove_task(pid, task_list); -} - -extern void jobacct_gather_p_2_stats(slurmdb_stats_t *stats, - struct jobacctinfo *jobacct) -{ - jobacct_common_2_stats(stats, jobacct); + return SLURM_SUCCESS; } diff --git a/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.c b/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.c index 184283df29..22e6972c00 100644 --- a/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.c +++ b/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.c @@ -44,11 +44,12 @@ #include #include -#include "src/common/xstring.h" #include "src/common/xmalloc.h" #include "src/common/slurm_jobcomp.h" #include "filetxt_jobcomp_process.h" +#define BUFFER_SIZE 4096 + typedef struct { char *name; char *val; diff --git a/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.h b/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.h index cebc5c6e77..76e69c40bd 100644 --- a/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.h +++ b/src/plugins/jobcomp/filetxt/filetxt_jobcomp_process.h @@ -44,8 +44,12 @@ #ifndef _HAVE_FILETXT_JOBCOMP_PROCESS_H #define _HAVE_FILETXT_JOBCOMP_PROCESS_H -#include "src/common/jobacct_common.h" +#include + +#include "src/common/node_select.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_accounting_storage.h" +#include "src/common/xstring.h" extern List filetxt_jobcomp_process_get_jobs(slurmdb_job_cond_t *job_cond); extern int filetxt_jobcomp_process_archive(slurmdb_archive_cond_t *arch_cond); diff --git a/src/plugins/jobcomp/mysql/mysql_jobcomp_process.h b/src/plugins/jobcomp/mysql/mysql_jobcomp_process.h index 14a920845b..c99b758d42 100644 --- a/src/plugins/jobcomp/mysql/mysql_jobcomp_process.h +++ b/src/plugins/jobcomp/mysql/mysql_jobcomp_process.h @@ -46,7 +46,7 @@ #include "src/database/mysql_common.h" #include "src/common/slurm_jobcomp.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_accounting_storage.h" extern mysql_conn_t *jobcomp_mysql_conn; diff --git a/src/plugins/jobcomp/pgsql/pgsql_jobcomp_process.h b/src/plugins/jobcomp/pgsql/pgsql_jobcomp_process.h index 9079bd0b3b..f70f46aba7 100644 --- a/src/plugins/jobcomp/pgsql/pgsql_jobcomp_process.h +++ b/src/plugins/jobcomp/pgsql/pgsql_jobcomp_process.h @@ -46,7 +46,7 @@ #include "src/database/pgsql_common.h" #include "src/common/slurm_jobcomp.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_accounting_storage.h" extern PGconn *jobcomp_pgsql_db; diff --git a/src/sacctmgr/archive_functions.c b/src/sacctmgr/archive_functions.c index 0dbafb0a74..dacdb7039d 100644 --- a/src/sacctmgr/archive_functions.c +++ b/src/sacctmgr/archive_functions.c @@ -38,6 +38,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#include + #include "src/sacctmgr/sacctmgr.h" #include /* MAXPATHLEN */ #include "src/common/proc_args.h" diff --git a/src/sacctmgr/sacctmgr.h b/src/sacctmgr/sacctmgr.h index bb8d9b2449..c535f22650 100644 --- a/src/sacctmgr/sacctmgr.h +++ b/src/sacctmgr/sacctmgr.h @@ -78,7 +78,7 @@ #include "slurm/slurm.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/parse_time.h" #include "src/common/slurm_accounting_storage.h" #include "src/common/xstring.h" @@ -86,6 +86,7 @@ #define CKPT_WAIT 10 #define MAX_INPUT_FIELDS 128 +#define BUFFER_SIZE 4096 typedef enum { /* COMMON */ diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index b9a8721c23..8f31671e16 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -437,7 +437,7 @@ int main(int argc, char *argv[]) fatal( "failed to initialize checkpoint plugin" ); if (slurm_acct_storage_init(NULL) != SLURM_SUCCESS ) fatal( "failed to initialize accounting_storage plugin"); - if (slurm_jobacct_gather_init() != SLURM_SUCCESS ) + if (jobacct_gather_init() != SLURM_SUCCESS ) fatal( "failed to initialize jobacct_gather plugin"); if (job_submit_plugin_init() != SLURM_SUCCESS ) fatal( "failed to initialize job_submit plugin"); @@ -653,7 +653,7 @@ int main(int argc, char *argv[]) job_submit_plugin_fini(); slurm_preempt_fini(); g_slurm_jobcomp_fini(); - slurm_jobacct_gather_fini(); + jobacct_gather_fini(); slurm_select_fini(); slurm_topo_fini(); checkpoint_fini(); diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 7f18c6a7e4..94d1daa1d6 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -59,6 +59,7 @@ #include "src/common/checkpoint.h" #include "src/common/forward.h" #include "src/common/gres.h" +#include "src/common/node_select.h" #include "src/common/slurm_accounting_storage.h" #include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_protocol_interface.h" @@ -173,7 +174,7 @@ static struct step_record * _create_step_record(struct job_record *job_ptr) step_ptr->job_ptr = job_ptr; step_ptr->start_time = time(NULL); step_ptr->time_limit = INFINITE; - step_ptr->jobacct = jobacct_gather_g_create(NULL); + step_ptr->jobacct = jobacctinfo_create(NULL); step_ptr->requid = -1; if (list_append (job_ptr->step_list, step_ptr) == NULL) fatal ("_create_step_record: unable to allocate memory"); @@ -221,7 +222,7 @@ static void _free_step_rec(struct step_record *step_ptr) xfree(step_ptr->host); xfree(step_ptr->name); slurm_step_layout_destroy(step_ptr->step_layout); - jobacct_gather_g_destroy(step_ptr->jobacct); + jobacctinfo_destroy(step_ptr->jobacct); FREE_NULL_BITMAP(step_ptr->core_bitmap_job); FREE_NULL_BITMAP(step_ptr->exit_node_bitmap); FREE_NULL_BITMAP(step_ptr->step_node_bitmap); @@ -2685,7 +2686,7 @@ extern int step_partial_comp(step_complete_msg_t *req, uid_t uid, step_ptr->exit_code = req->step_rc; if (max_rc) *max_rc = step_ptr->exit_code; - jobacct_gather_g_aggregate(step_ptr->jobacct, req->jobacct); + jobacctinfo_aggregate(step_ptr->jobacct, req->jobacct); /* we don't want to delete the step record here since right after we delete this step again if we delete it here we won't find it when we try the second @@ -2700,7 +2701,7 @@ extern int step_partial_comp(step_complete_msg_t *req, uid_t uid, return EINVAL; } - jobacct_gather_g_aggregate(step_ptr->jobacct, req->jobacct); + jobacctinfo_aggregate(step_ptr->jobacct, req->jobacct); if (!step_ptr->exit_node_bitmap) { /* initialize the node bitmap for exited nodes */ diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 1f69607771..32f0205707 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -62,7 +62,6 @@ #include "src/common/forward.h" #include "src/common/gres.h" #include "src/common/hostlist.h" -#include "src/common/jobacct_common.h" #include "src/common/list.h" #include "src/common/log.h" #include "src/common/macros.h" @@ -1353,7 +1352,7 @@ _rpc_batch_job(slurm_msg_t *msg, bool new_msg) SELECT_JOBDATA_BLOCK_ID, &resv_id); #elif defined(HAVE_CRAY) resv_id = select_g_select_jobinfo_xstrdup(req->select_jobinfo, - SELECT_PRINT_RESV_ID); + SELECT_PRINT_RESV_ID); #endif rc = _run_prolog(req->job_id, req->uid, resv_id, req->spank_job_env, req->spank_job_env_size); @@ -1550,12 +1549,12 @@ _abort_step(uint32_t job_id, uint32_t step_id) resp.range_first = 0; resp.range_last = 0; resp.step_rc = 1; - resp.jobacct = jobacct_gather_g_create(NULL); + resp.jobacct = jobacctinfo_create(NULL); resp_msg.msg_type = REQUEST_STEP_COMPLETE; resp_msg.data = &resp; rc2 = slurm_send_recv_controller_rc_msg(&resp_msg, &rc); /* Note: we are ignoring the RPC return code */ - jobacct_gather_g_destroy(resp.jobacct); + jobacctinfo_destroy(resp.jobacct); return rc2; } @@ -1814,14 +1813,14 @@ _enforce_job_mem_limit(void) if ((!stepd_stat_jobacct(fd, &acct_req, resp)) && (resp->jobacct)) { /* resp->jobacct is NULL if account is disabled */ - jobacct_common_getinfo((struct jobacctinfo *) - resp->jobacct, - JOBACCT_DATA_TOT_RSS, - &step_rss); - jobacct_common_getinfo((struct jobacctinfo *) - resp->jobacct, - JOBACCT_DATA_TOT_VSIZE, - &step_vsize); + jobacctinfo_getinfo((struct jobacctinfo *) + resp->jobacct, + JOBACCT_DATA_TOT_RSS, + &step_rss); + jobacctinfo_getinfo((struct jobacctinfo *) + resp->jobacct, + JOBACCT_DATA_TOT_VSIZE, + &step_vsize); #if _LIMIT_INFO info("Step:%u.%u RSS:%u KB VSIZE:%u KB", stepd->jobid, stepd->stepid, @@ -3418,7 +3417,7 @@ _rpc_abort_job(slurm_msg_t *msg) &resv_id); #elif defined(HAVE_CRAY) resv_id = select_g_select_jobinfo_xstrdup(req->select_jobinfo, - SELECT_PRINT_RESV_ID); + SELECT_PRINT_RESV_ID); #endif _run_epilog(req->job_id, req->job_uid, resv_id, req->spank_job_env, req->spank_job_env_size); @@ -3767,7 +3766,7 @@ _rpc_terminate_job(slurm_msg_t *msg) &resv_id); #elif defined(HAVE_CRAY) resv_id = select_g_select_jobinfo_xstrdup(req->select_jobinfo, - SELECT_PRINT_RESV_ID); + SELECT_PRINT_RESV_ID); #endif rc = _run_epilog(req->job_id, req->job_uid, resv_id, req->spank_job_env, req->spank_job_env_size); diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index cccae637ac..6fc5fbb52e 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1418,7 +1418,7 @@ _slurmd_init(void) _set_topo_info(); _print_conf(); - if (slurm_jobacct_gather_init() != SLURM_SUCCESS) + if (jobacct_gather_init() != SLURM_SUCCESS) return SLURM_FAILURE; if (slurm_proctrack_init() != SLURM_SUCCESS) return SLURM_FAILURE; @@ -1604,7 +1604,7 @@ _slurmd_fini(void) slurmd_req(NULL); /* purge memory allocated by slurmd_req() */ fini_setproctitle(); slurm_select_fini(); - slurm_jobacct_gather_fini(); + jobacct_gather_fini(); spank_slurmd_exit(); return SLURM_SUCCESS; } diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 2a9d4a453f..7a4065c72a 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -291,7 +291,7 @@ static int _call_select_plugin_from_stepd(slurmd_job_t *job, uint64_t pagg_id, SELECT_JOBDATA_RESV_ID, &job->resv_id); if (pagg_id) select_g_select_jobinfo_set(fake_job_record.select_jobinfo, - SELECT_JOBDATA_PAGG_ID, &pagg_id); + SELECT_JOBDATA_PAGG_ID, &pagg_id); rc = (*select_fn)(&fake_job_record); select_g_select_jobinfo_free(fake_job_record.select_jobinfo); return rc; @@ -668,7 +668,7 @@ _wait_for_children_slurmstepd(slurmd_job_t *job) while((left = bit_clear_count(step_complete.bits)) > 0) { debug3("Rank %d waiting for %d (of %d) children", - step_complete.rank, left, step_complete.children); + step_complete.rank, left, step_complete.children); rc = pthread_cond_timedwait(&step_complete.cond, &step_complete.lock, &ts); if (rc == ETIMEDOUT) { @@ -719,12 +719,12 @@ _one_step_complete_msg(slurmd_job_t *job, int first, int last) msg.range_first = first; msg.range_last = last; msg.step_rc = step_complete.step_rc; - msg.jobacct = jobacct_gather_g_create(NULL); + msg.jobacct = jobacctinfo_create(NULL); /************* acct stuff ********************/ if (!acct_sent) { - jobacct_gather_g_aggregate(step_complete.jobacct, job->jobacct); - jobacct_gather_g_getinfo(step_complete.jobacct, - JOBACCT_DATA_TOTAL, msg.jobacct); + jobacctinfo_aggregate(step_complete.jobacct, job->jobacct); + jobacctinfo_getinfo(step_complete.jobacct, + JOBACCT_DATA_TOTAL, msg.jobacct); acct_sent = true; } /*********************************************/ @@ -781,7 +781,7 @@ _one_step_complete_msg(slurmd_job_t *job, int first, int last) } finished: - jobacct_gather_g_destroy(msg.jobacct); + jobacctinfo_destroy(msg.jobacct); } /* Given a starting bit in the step_complete.bits bitstring, "start", @@ -906,7 +906,7 @@ job_manager(slurmd_job_t *job) (slurmd_task_init() != SLURM_SUCCESS) || (slurm_proctrack_init() != SLURM_SUCCESS) || (checkpoint_init(ckpt_type) != SLURM_SUCCESS) || - (slurm_jobacct_gather_init() != SLURM_SUCCESS)) { + (jobacct_gather_init() != SLURM_SUCCESS)) { rc = SLURM_PLUGIN_NAME_INVALID; goto fail1; } @@ -1017,13 +1017,13 @@ job_manager(slurmd_job_t *job) * information here */ if(!conf->job_acct_gather_freq) - jobacct_gather_g_stat_task(0); + jobacct_gather_stat_task(0); /* Send job launch response with list of pids */ _send_launch_resp(job, 0); _wait_for_all_tasks(job); - jobacct_gather_g_endpoll(); + jobacct_gather_endpoll(); job->state = SLURMSTEPD_STEP_ENDING; @@ -1032,7 +1032,7 @@ job_manager(slurmd_job_t *job) error("interconnect_fini: %m"); } - fail2: +fail2: /* * First call interconnect_postfini() - In at least one case, * this will clean up any straggling processes. If this call @@ -1052,7 +1052,7 @@ job_manager(slurmd_job_t *job) step_terminate_monitor_stop(); if (!job->batch) { if (interconnect_postfini(job->switch_job, job->jmgr_pid, - job->jobid, job->stepid) < 0) + job->jobid, job->stepid) < 0) error("interconnect_postfini: %m"); } @@ -1082,7 +1082,7 @@ job_manager(slurmd_job_t *job) } debug2("After call to spank_fini()"); - fail1: +fail1: /* If interactive job startup was abnormal, * be sure to notify client. */ @@ -1351,7 +1351,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) #ifdef HAVE_AIX (void) mkcrid(0); #endif - /* jobacct_gather_g_endpoll(); + /* jobacctinfo_endpoll(); * closing jobacct files here causes deadlock */ if (conf->propagate_prio) @@ -1401,7 +1401,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) LOG_TIMESTAMP(time_stamp); verbose ("task %lu (%lu) started %s", - (unsigned long) job->task[i]->gtid, + (unsigned long) job->task[i]->gtid, (unsigned long) pid, time_stamp); job->task[i]->pid = pid; @@ -1440,12 +1440,12 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) * has already set its process group as desired */ if ((job->pty == 0) - && (setpgid (job->task[i]->pid, job->pgid) < 0)) { + && (setpgid (job->task[i]->pid, job->pgid) < 0)) { error("Unable to put task %d (pid %d) into " "pgrp %d: %m", - i, - job->task[i]->pid, - job->pgid); + i, + job->task[i]->pid, + job->pgid); } if (slurm_container_add(job, job->task[i]->pid) @@ -1457,8 +1457,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) jobacct_id.nodeid = job->nodeid; jobacct_id.taskid = job->task[i]->gtid; jobacct_id.job = job; - jobacct_gather_g_add_task(job->task[i]->pid, - &jobacct_id); + jobacct_gather_add_task(job->task[i]->pid, &jobacct_id); if (spank_task_post_fork (job, i) < 0) { error ("spank task %d post-fork failed", i); @@ -1466,7 +1465,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) goto fail2; } } - jobacct_gather_g_set_proctrack_container_id(job->cont_id); + jobacct_gather_set_proctrack_container_id(job->cont_id); /* * Now it's ok to unblock the tasks, so they may call exec. @@ -1480,7 +1479,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) * (if specified and able) */ if (pdebug_trace_process(job, job->task[i]->pid) - == SLURM_ERROR) + == SLURM_ERROR) rc = SLURM_ERROR; } @@ -1612,12 +1611,12 @@ _wait_for_any_task(slurmd_job_t *job, bool waitflag) } /************* acct stuff ********************/ - jobacct = jobacct_gather_g_remove_task(pid); + jobacct = jobacct_gather_remove_task(pid); if (jobacct) { - jobacct_gather_g_setinfo(jobacct, - JOBACCT_DATA_RUSAGE, &rusage); - jobacct_gather_g_aggregate(job->jobacct, jobacct); - jobacct_gather_g_destroy(jobacct); + jobacctinfo_setinfo(jobacct, + JOBACCT_DATA_RUSAGE, &rusage); + jobacctinfo_aggregate(job->jobacct, jobacct); + jobacctinfo_destroy(jobacct); } /*********************************************/ @@ -1789,7 +1788,7 @@ _make_batch_dir(slurmd_job_t *job) return xstrdup(path); - error: +error: return NULL; } @@ -1806,7 +1805,7 @@ _make_batch_script(batch_job_launch_msg_t *msg, char *path) snprintf(script, sizeof(script), "%s/%s", path, "slurm_script"); - again: +again: if ((fp = safeopen(script, "w", SAFEOPEN_CREATE_ONLY)) == NULL) { if ((errno != EEXIST) || (unlink(script) < 0)) { error("couldn't open `%s': %m", script); @@ -1838,7 +1837,7 @@ _make_batch_script(batch_job_launch_msg_t *msg, char *path) return xstrdup(script); - error: +error: (void) unlink(script); return NULL; @@ -2246,10 +2245,10 @@ _initgroups(slurmd_job_t *job) if ((rc = initgroups(username, gid))) { if ((errno == EPERM) && (getuid() != (uid_t) 0)) { debug("Error in initgroups(%s, %ld): %m", - username, (long)gid); + username, (long)gid); } else { error("Error in initgroups(%s, %ld): %m", - username, (long)gid); + username, (long)gid); } return -1; } diff --git a/src/slurmd/slurmstepd/req.c b/src/slurmd/slurmstepd/req.c index 3f3e5e2430..a65ba9ee70 100644 --- a/src/slurmd/slurmstepd/req.c +++ b/src/slurmd/slurmstepd/req.c @@ -58,6 +58,7 @@ #include "src/common/stepd_api.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" +#include "src/common/checkpoint.h" #include "src/slurmd/slurmd/slurmd.h" #include "src/slurmd/slurmstepd/io.h" @@ -1175,7 +1176,7 @@ _handle_suspend(int fd, slurmd_job_t *job, uid_t uid) goto done; } - jobacct_gather_g_suspend_poll(); + jobacct_gather_suspend_poll(); /* * Signal the container @@ -1247,7 +1248,7 @@ _handle_resume(int fd, slurmd_job_t *job, uid_t uid) goto done; } - jobacct_gather_g_resume_poll(); + jobacct_gather_resume_poll(); /* * Signal the container */ @@ -1326,12 +1327,12 @@ _handle_completion(int fd, slurmd_job_t *job, uid_t uid, int protocol) buf = xmalloc(len); safe_read(fd, buf, len); buffer = create_buf(buf, len); - jobacct_gather_g_unpack(&jobacct, SLURM_PROTOCOL_VERSION, + jobacctinfo_unpack(&jobacct, SLURM_PROTOCOL_VERSION, buffer); free_buf(buffer); } else { - jobacct = jobacct_gather_g_create(NULL); - jobacct_gather_g_getinfo(jobacct, JOBACCT_DATA_PIPE, &fd); + jobacct = jobacctinfo_create(NULL); + jobacctinfo_getinfo(jobacct, JOBACCT_DATA_PIPE, &fd); } /* @@ -1368,9 +1369,9 @@ _handle_completion(int fd, slurmd_job_t *job, uid_t uid, int protocol) step_complete.step_rc = MAX(step_complete.step_rc, step_rc); /************* acct stuff ********************/ - jobacct_gather_g_aggregate(step_complete.jobacct, jobacct); + jobacctinfo_aggregate(step_complete.jobacct, jobacct); timeout: - jobacct_gather_g_destroy(jobacct); + jobacctinfo_destroy(jobacct); /*********************************************/ /* Send the return code and errno, we do this within the locked @@ -1407,24 +1408,24 @@ _handle_stat_jobacct(int fd, slurmd_job_t *job, uid_t uid) "owned by uid %ld", (long)uid, job->jobid, job->stepid, (long)job->uid); /* Send NULL */ - jobacct_gather_g_setinfo(jobacct, JOBACCT_DATA_PIPE, &fd); + jobacctinfo_setinfo(jobacct, JOBACCT_DATA_PIPE, &fd); return SLURM_ERROR; } - jobacct = jobacct_gather_g_create(NULL); + jobacct = jobacctinfo_create(NULL); debug3("num tasks = %d", job->node_tasks); for (i = 0; i < job->node_tasks; i++) { - temp_jobacct = jobacct_gather_g_stat_task(job->task[i]->pid); + temp_jobacct = jobacct_gather_stat_task(job->task[i]->pid); if(temp_jobacct) { - jobacct_gather_g_aggregate(jobacct, temp_jobacct); - jobacct_gather_g_destroy(temp_jobacct); + jobacctinfo_aggregate(jobacct, temp_jobacct); + jobacctinfo_destroy(temp_jobacct); num_tasks++; } } - jobacct_gather_g_setinfo(jobacct, JOBACCT_DATA_PIPE, &fd); + jobacctinfo_setinfo(jobacct, JOBACCT_DATA_PIPE, &fd); safe_write(fd, &num_tasks, sizeof(int)); - jobacct_gather_g_destroy(jobacct); + jobacctinfo_destroy(jobacct); return SLURM_SUCCESS; rwfail: return SLURM_ERROR; diff --git a/src/slurmd/slurmstepd/slurmstepd.c b/src/slurmd/slurmstepd/slurmstepd.c index 1ffaa34bc3..6287cea27f 100644 --- a/src/slurmd/slurmstepd/slurmstepd.c +++ b/src/slurmd/slurmstepd/slurmstepd.c @@ -55,6 +55,7 @@ #include "src/common/xmalloc.h" #include "src/common/xsignal.h" #include "src/common/plugstack.h" +#include "src/common/node_select.h" #include "src/slurmd/common/slurmstepd_init.h" #include "src/slurmd/common/setproctitle.h" @@ -381,7 +382,7 @@ _init_from_slurmd(int sock, char **argv, safe_read(sock, &step_complete.max_depth, sizeof(int)); safe_read(sock, &step_complete.parent_addr, sizeof(slurm_addr_t)); step_complete.bits = bit_alloc(step_complete.children); - step_complete.jobacct = jobacct_gather_g_create(NULL); + step_complete.jobacct = jobacctinfo_create(NULL); pthread_mutex_unlock(&step_complete.lock); /* receive conf from slurmd */ @@ -391,7 +392,7 @@ _init_from_slurmd(int sock, char **argv, debug2("debug level is %d.", conf->debug_level); /* acct info */ - jobacct_gather_g_startpoll(conf->job_acct_gather_freq); + jobacct_gather_startpoll(conf->job_acct_gather_freq); switch_g_slurmd_step_init(); @@ -504,7 +505,7 @@ _step_setup(slurm_addr_t *cli, slurm_addr_t *self, slurm_msg_t *msg) } job->jmgr_pid = getpid(); - job->jobacct = jobacct_gather_g_create(NULL); + job->jobacct = jobacctinfo_create(NULL); /* Establish GRES environment variables */ if (conf->debug_flags & DEBUG_FLAG_GRES) { @@ -533,7 +534,7 @@ static void _step_cleanup(slurmd_job_t *job, slurm_msg_t *msg, int rc) { if (job) { - jobacct_gather_g_destroy(job->jobacct); + jobacctinfo_destroy(job->jobacct); if (!job->batch) job_destroy(job); } @@ -553,7 +554,7 @@ _step_cleanup(slurmd_job_t *job, slurm_msg_t *msg, int rc) fatal("handle_launch_message: Unrecognized launch RPC"); break; } - jobacct_gather_g_destroy(step_complete.jobacct); + jobacctinfo_destroy(step_complete.jobacct); xfree(msg); } diff --git a/src/slurmd/slurmstepd/slurmstepd_job.c b/src/slurmd/slurmstepd/slurmstepd_job.c index 7855d1f7a4..a7f1eecf04 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.c +++ b/src/slurmd/slurmstepd/slurmstepd_job.c @@ -279,7 +279,7 @@ job_create(launch_tasks_request_msg_t *msg) job->debug = msg->slurmd_debug; job->cpus = msg->cpus_allocated[nodeid]; if (msg->acctg_freq != (uint16_t) NO_VAL) - jobacct_gather_g_change_poll(msg->acctg_freq); + jobacct_gather_change_poll(msg->acctg_freq); job->multi_prog = msg->multi_prog; job->timelimit = (time_t) -1; job->task_flags = msg->task_flags; @@ -291,10 +291,10 @@ job_create(launch_tasks_request_msg_t *msg) &job->job_alloc_cores, &job->step_alloc_cores, &job->job_mem, &job->step_mem); if (job->step_mem) { - jobacct_common_set_mem_limit(job->jobid, job->stepid, + jobacct_gather_set_mem_limit(job->jobid, job->stepid, job->step_mem); } else if (job->job_mem) { - jobacct_common_set_mem_limit(job->jobid, job->stepid, + jobacct_gather_set_mem_limit(job->jobid, job->stepid, job->job_mem); } @@ -378,7 +378,7 @@ job_batch_job_create(batch_job_launch_msg_t *msg) job->batch = true; if (msg->acctg_freq != (uint16_t) NO_VAL) - jobacct_gather_g_change_poll(msg->acctg_freq); + jobacct_gather_change_poll(msg->acctg_freq); job->multi_prog = 0; job->open_mode = msg->open_mode; job->overcommit = (bool) msg->overcommit; @@ -414,11 +414,10 @@ job_batch_job_create(batch_job_launch_msg_t *msg) format_core_allocs(msg->cred, conf->node_name, &job->job_alloc_cores, &job->step_alloc_cores, &job->job_mem, &job->step_mem); - if (job->step_mem) { - jobacct_common_set_mem_limit(job->jobid, NO_VAL, - job->step_mem); - } else if (job->job_mem) - jobacct_common_set_mem_limit(job->jobid, NO_VAL, job->job_mem); + if (job->step_mem) + jobacct_gather_set_mem_limit(job->jobid, NO_VAL, job->step_mem); + else if (job->job_mem) + jobacct_gather_set_mem_limit(job->jobid, NO_VAL, job->job_mem); get_cred_gres(msg->cred, conf->node_name, &job->job_gres_list, &job->step_gres_list); diff --git a/src/slurmdbd/proc_req.c b/src/slurmdbd/proc_req.c index db797e0aaf..32aaf50d27 100644 --- a/src/slurmdbd/proc_req.c +++ b/src/slurmdbd/proc_req.c @@ -36,11 +36,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#include "src/common/xstring.h" #include "src/common/macros.h" #include "src/common/pack.h" #include "src/common/slurmdbd_defs.h" #include "src/common/slurm_accounting_storage.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_defs.h" #include "src/common/uid.h" diff --git a/src/sreport/sreport.h b/src/sreport/sreport.h index 468a633ee1..53cede7234 100644 --- a/src/sreport/sreport.h +++ b/src/sreport/sreport.h @@ -79,7 +79,7 @@ #include "slurm/slurm.h" #include "slurm/slurmdb.h" -#include "src/common/jobacct_common.h" +#include "src/common/slurm_jobacct_gather.h" #include "src/common/parse_time.h" #include "src/common/slurm_accounting_storage.h" #include "src/common/xstring.h" diff --git a/src/sstat/sstat.c b/src/sstat/sstat.c index 16b08d6d47..9198d255d5 100644 --- a/src/sstat/sstat.c +++ b/src/sstat/sstat.c @@ -136,8 +136,7 @@ int _do_stat(uint32_t jobid, uint32_t stepid, char *nodelist) xfree(step.pid_str); } else { hostlist_push(hl, step_stat->step_pids->node_name); - jobacct_gather_g_2_stats(&temp_stats, - step_stat->jobacct); + jobacctinfo_2_stats(&temp_stats, step_stat->jobacct); ntasks += step_stat->num_tasks; aggregate_stats(&step.stats, &temp_stats); } -- GitLab From 880c9358c5989f028657bc0f9c2c97a63669c357 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 29 May 2012 14:50:55 -0700 Subject: [PATCH 333/614] added missing space --- src/common/slurm_jobacct_gather.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index a7128c03e4..03476dce65 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -407,7 +407,7 @@ extern jobacctinfo_t *jobacct_gather_stat_task(pid_t pid) { if (jobacct_shutdown) return NULL; - else if(pid) { + else if (pid) { struct jobacctinfo *jobacct = NULL; struct jobacctinfo *ret_jobacct = NULL; ListIterator itr = NULL; -- GitLab From 40d7cd3c76b28b3129623a10a268f0ef2de3bb35 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 29 May 2012 14:30:51 -0700 Subject: [PATCH 334/614] Correction to sccept marks on a name --- doc/html/team.shtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/html/team.shtml b/doc/html/team.shtml index c430beed0e..557e1639a7 100644 --- a/doc/html/team.shtml +++ b/doc/html/team.shtml @@ -36,6 +36,7 @@ organizations. Lead SLURM developers are:
      • Joey Ekstrom (Lawrence Livermore National Laboratory/Bringham Young University)
      • Josh England (TGS Management Corporation)
      • Kent Engström (National Supercomputer Centre, Sweden)
      • +
      • Damien François (Université catholique de Louvain, Belgium)
      • Jim Garlick (Lawrence Livermore National Laboratory)
      • Didier Gazen (Laboratoire d'Aerologie, France)
      • Raphael Geissert (Debian)
      • @@ -106,9 +107,9 @@ organizations. Lead SLURM developers are:
      • Jay Windley (Linux NetworX)
      • Anne-Marie Wunderlin (Bull)
      • Nathan Yee (SchedMD)
      • -
      • Damien François (UCL)
      • +
      -

      Last modified 14 May 2012

      +

      Last modified 29 May 2012

      -- GitLab From f9d6557d61415fc235ae43279737b5324141a965 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 29 May 2012 14:32:52 -0700 Subject: [PATCH 335/614] Put some names into alphabetic order --- doc/html/team.shtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/html/team.shtml b/doc/html/team.shtml index 557e1639a7..1040755d33 100644 --- a/doc/html/team.shtml +++ b/doc/html/team.shtml @@ -28,14 +28,14 @@ organizations. Lead SLURM developers are:
    • Daniel Christians (HP)
    • Gilles Civario (Bull)
    • Chuck Clouston (Bull)
    • -
    • Phil Eckert (Lawrence Livermore National Laboratory)
    • Yuri D'Elia (Center for Biomedicine, EURAC Research, Italy)
    • -
    • Carles Fenoy (Barcelona Supercomputer Center, Spain)
    • Joseph Donaghy (Lawrence Livermore National Laboratory)
    • Chris Dunlap (Lawrence Livermore National Laboratory)
    • +
    • Phil Eckert (Lawrence Livermore National Laboratory)
    • Joey Ekstrom (Lawrence Livermore National Laboratory/Bringham Young University)
    • Josh England (TGS Management Corporation)
    • Kent Engström (National Supercomputer Centre, Sweden)
    • +
    • Carles Fenoy (Barcelona Supercomputer Center, Spain)
    • Damien François (Université catholique de Louvain, Belgium)
    • Jim Garlick (Lawrence Livermore National Laboratory)
    • Didier Gazen (Laboratoire d'Aerologie, France)
    • -- GitLab From e88281cf03f7e89851169d8f1a64a352370b0bff Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 08:39:28 -0700 Subject: [PATCH 336/614] Change license option count separator from "*" to ":" Change license option count separator from "*" to ":" for consistency with the gres option (e.g. "--licenses=foo:2 --gres=gpu:2"). The "*" will still be accepted, but is no longer documented. --- NEWS | 3 +++ doc/html/reservations.shtml | 6 +++--- doc/man/man1/salloc.1 | 4 ++-- doc/man/man1/sbatch.1 | 4 ++-- doc/man/man1/scontrol.1 | 4 ++-- doc/man/man1/srun.1 | 4 ++-- doc/man/man5/slurm.conf.5 | 4 ++-- src/slurmctld/licenses.c | 5 ++++- 8 files changed, 20 insertions(+), 14 deletions(-) diff --git a/NEWS b/NEWS index 0c402b86bb..92648aabd1 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,9 @@ documents those changes that are of interest to users and admins. "name:used/total" -- Changed jobacct_gather plugin infrastructure to be cleaner and easier to maintain. + -- Change license option count separator from "*" to ":" for consistency with + the gres option (e.g. "--licenses=foo:2 --gres=gpu:2"). The "*" will still + be accepted, but is no longer documented. * Changes in SLURM 2.4.0.rc2 ============================= diff --git a/doc/html/reservations.shtml b/doc/html/reservations.shtml index 5d6bc2f385..ea8af85b2b 100644 --- a/doc/html/reservations.shtml +++ b/doc/html/reservations.shtml @@ -75,7 +75,7 @@ license from being scheduled on this cluster during this reservation.

       $ scontrol create reservation starttime=2009-04-06T16:00:00 \
          duration=120 user=root flags=ignore_jobs \
      -   licenses=lustre*1000
      +   licenses=lustre:1000
       Reservation created: root_4
       
       $ scontrol show reservation
      @@ -168,11 +168,11 @@ licenses field to require one "cpu" for each physical CPU required to satisfy
       the request.

       $ scontrol show configuration | grep Licenses
      -Licenses  = cpu*64
      +Licenses  = cpu:64
       
       $ scontrol create reservation starttime=2009-04-06T16:00:00 \
          duration=120 user=bob flags=license_only \
      -   licenses=cpu*32
      +   licenses=cpu:32
       Reservation created: bob_5
       
      diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index fba5f4526e..dac8c5acdd 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -495,10 +495,10 @@ range of allocated nodes. \fB\-L\fR, \fB\-\-licenses\fR=<\fBlicense\fR> Specification of licenses (or other resources available on all nodes of the cluster) which must be allocated to this job. -License names can be followed by an asterisk and count +License names can be followed by a colon and count (the default count is one). Multiple license names should be comma separated (e.g. -"\-\-licenses=foo*4,bar"). +"\-\-licenses=foo:4,bar"). .TP \fB\-m\fR, \fB\-\-distribution\fR= diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index c63fa20d96..cd7113e7bb 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -550,10 +550,10 @@ range of allocated nodes. \fB\-L\fR, \fB\-\-licenses\fR=<\fBlicense\fR> Specification of licenses (or other resources available on all nodes of the cluster) which must be allocated to this job. -License names can be followed by an asterisk and count +License names can be followed by a colon and count (the default count is one). Multiple license names should be comma separated (e.g. -"\-\-licenses=foo*4,bar"). +"\-\-licenses=foo:4,bar"). .TP \fB\-M\fR, \fB\-\-clusters\fR=<\fIstring\fR> diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 0d7147855f..4879275ff7 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1081,9 +1081,9 @@ A new reservation must specify Users and/or Accounts. \fILicenses\fP= Specification of licenses (or other resources available on all nodes of the cluster) which are to be reserved. -License names can be followed by an asterisk and count +License names can be followed by a colon and count (the default count is one). -Multiple license names should be comma separated (e.g. "Licenses=foo*4,bar"). +Multiple license names should be comma separated (e.g. "Licenses=foo:4,bar"). A new reservation must specify one or more resource to be included: NodeCnt, Nodes and/or Licenses. diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 115e54fd7b..18065d60e3 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -556,10 +556,10 @@ task id. \fB\-L\fR, \fB\-\-licenses\fR=<\fBlicense\fR> Specification of licenses (or other resources available on all nodes of the cluster) which must be allocated to this job. -License names can be followed by an asterisk and count +License names can be followed by a colon and count (the default count is one). Multiple license names should be comma separated (e.g. -"\-\-licenses=foo*4,bar"). +"\-\-licenses=foo:4,bar"). .TP \fB\-m\fR, \fB\-\-distribution\fR= diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 2bba399ba4..9ddb66dc32 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -733,10 +733,10 @@ The value may not exceed 65533. \fBLicenses\fR Specification of licenses (or other resources available on all nodes of the cluster) which can be allocated to jobs. -License names can optionally be followed by an asterisk +License names can optionally be followed by a colon and count with a default count of one. Multiple license names should be comma separated (e.g. -"Licenses=foo*4,bar"). +"Licenses=foo:4,bar"). Note that SLURM prevents jobs from being scheduled if their required license specification is not available. SLURM does not prevent jobs from using licenses that are diff --git a/src/slurmctld/licenses.c b/src/slurmctld/licenses.c index 0daca1f50d..6223e0fb66 100644 --- a/src/slurmctld/licenses.c +++ b/src/slurmctld/licenses.c @@ -128,7 +128,10 @@ static List _build_license_list(char *licenses, bool *valid) *valid = false; break; } - if (token[i] == '*') { + /* ':' is used as a separator in version 2.5 or later + * '*' is used as a separator in version 2.4 or earlier + */ + if ((token[i] == ':') || (token[i] == '*')) { token[i++] = '\0'; num = (uint32_t)strtol(&token[i], &end_num,10); } -- GitLab From c99b46da16a10dd5a3d842b1c3e5c66453a404cb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 09:12:21 -0700 Subject: [PATCH 337/614] Add missing symbol to jobacct_gather/none Newly added symbol jobacct_gather_p_poll_data to jobacct_gather/none. The need for this symbol was just added in a recent restructuring of the jobacct_gather logic. --- src/plugins/jobacct_gather/none/jobacct_gather_none.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/plugins/jobacct_gather/none/jobacct_gather_none.c b/src/plugins/jobacct_gather/none/jobacct_gather_none.c index def7c8ddad..9f5402beca 100644 --- a/src/plugins/jobacct_gather/none/jobacct_gather_none.c +++ b/src/plugins/jobacct_gather/none/jobacct_gather_none.c @@ -90,6 +90,12 @@ extern int fini ( void ) return SLURM_SUCCESS; } +extern void jobacct_gather_p_poll_data(List task_list, bool pgid_plugin, + uint64_t cont_id) +{ + return; +} + extern jobacctinfo_t *jobacct_gather_p_create(jobacct_id_t *jobacct_id) { return NULL; -- GitLab From 62849b8a25f356c55dde95d21172d8348690a49a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 10:22:43 -0700 Subject: [PATCH 338/614] switch/nrt: Expand adapter window logging Expand adapter window logging to report state of windows_ids > 3 so that we can see what is happening much more clearly. --- src/plugins/switch/nrt/nrt.c | 107 ++++++++++++++++++++++++++--------- 1 file changed, 79 insertions(+), 28 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ccaaa9fe02..bf041a73ee 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1023,7 +1023,12 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) int i; nrt_window_id_t window_cnt; nrt_status_t *status = *(status_adapter->status_array); + char window_str[128]; + hostset_t hs; + hs = hostset_create(""); + if (hs == NULL) + fatal("hostset_create malloc failure"); info("--Begin Adapter Status--"); info(" adapter_name: %s", status_adapter->adapter_name); info(" adapter_type: %s", @@ -1031,21 +1036,33 @@ _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) window_cnt = *(status_adapter->window_count); info(" window_count: %hu", window_cnt); info(" --------"); - for (i = 0; i < MIN(window_cnt, NRT_DEBUG_CNT); i++) { - info(" bulk_xfer: %hu", status[i].bulk_transfer); - info(" client_pid: %u", (uint32_t)status[i].client_pid); - info(" rcontext_blocks: %u", status[i].rcontext_blocks); - info(" state: %s", _win_state_str(status[i].state)); - info(" uid: %u", (uint32_t) status[i].uid); + for (i = 0; i < window_cnt; i++) { + if ((status[i].state == NRT_WIN_AVAILABLE) && + (i >= NRT_DEBUG_CNT)) { + snprintf(window_str, sizeof(window_str), "%d", + status[i].window_id); + hostset_insert(hs, window_str); + continue; + } info(" window_id: %hu", status[i].window_id); + info(" state: %s", _win_state_str(status[i].state)); + if (status[i].state >= NRT_WIN_RESERVED) { + info(" bulk_xfer: %hu", status[i].bulk_transfer); + info(" client_pid: %u", + (uint32_t)status[i].client_pid); + info(" rcontext_blocks: %u", + status[i].rcontext_blocks); + info(" uid: %u", (uint32_t) status[i].uid); + } info(" --------"); } - if (i < window_cnt) { - info(" suppress data for windows %hu through %hu", - status[i].window_id, status[--window_cnt].window_id); + if (hostset_count(hs) > 0) { + hostset_ranged_string(hs, sizeof(window_str), window_str); + info(" suppress data for available windows %s", window_str); info(" --------"); } info("--End Adapter Status--"); + hostset_destroy(hs); } /* Used by: slurmd, slurmctld */ @@ -1056,6 +1073,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) struct slurm_nrt_adapter *a; slurm_nrt_window_t *w; char addr_str[128]; + char window_str[128]; + hostset_t hs; assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); @@ -1077,16 +1096,31 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" port_id: %hu", a->port_id); info(" special: %lu", a->special); info(" window_count: %hu", a->window_count); + hs = hostset_create(""); + if (hs == NULL) + fatal("hostset_create malloc failure"); w = a->window_list; - for (j = 0; j < MIN(a->window_count, NRT_DEBUG_CNT); j++) { -#if (NRT_DEBUG < 2) - if (w[j].state != NRT_WIN_AVAILABLE) + for (j = 0; j < a->window_count; j++) { + if ((w[j].state == NRT_WIN_AVAILABLE) && + (j >= NRT_DEBUG_CNT)) { + snprintf(window_str, sizeof(window_str), "%d", + w[j].window_id); + hostset_insert(hs, window_str); continue; -#endif - info(" window %hu: %s", w[j].window_id, - _win_state_str(w->state)); - info(" job_key %u", w[j].job_key); + } + info(" window: %hu", w[j].window_id); + info(" state: %s", _win_state_str(w[j].state)); + info(" job_key: %u", w[j].job_key); + info(" -------- "); } + if (hostset_count(hs) > 0) { + hostset_ranged_string(hs, sizeof(window_str), + window_str); + info(" suppress data for available windows %s", + window_str); + info(" -------- "); + } + hostset_destroy(hs); } info("--End Node Info--"); } @@ -3061,8 +3095,10 @@ nrt_clear_node_state(void) nrt_window_id_t window_count; nrt_status_t **status_array = NULL; nrt_cmd_clean_window_t clean_window; - #if NRT_DEBUG + char window_str[128]; + hostset_t hs; + info("nrt_clear_node_state: begin"); #endif adapter_types.num_adapter_types = &num_adapter_types; @@ -3146,13 +3182,16 @@ nrt_clear_node_state(void) adapter_status.adapter_name, _adapter_type_str(adapter_status.adapter_type), window_count); - /* Only log first NRT_DEBUG_CNT windows here */ - for (k = 0; k < MIN(window_count, NRT_DEBUG_CNT); k++){ + for (k = 0; k < window_count; k++) { + win_state_t state = (*status_array)[k].state; + if ((state == NRT_WIN_AVAILABLE) && + (k >= NRT_DEBUG_CNT)) + continue; info("window_id:%d uid:%d pid:%d state:%s", (*status_array)[k].window_id, (*status_array)[k].uid, (*status_array)[k].client_pid, - _win_state_str((*status_array)[k].state)); + _win_state_str(state)); } #endif if (window_count > max_windows) { @@ -3164,6 +3203,11 @@ nrt_clear_node_state(void) window_count, max_windows); window_count = max_windows; } +#if NRT_DEBUG + hs = hostset_create(""); + if (hs == NULL) + fatal("hostset_create malloc failure"); +#endif for (k = 0; k < window_count; k++) { clean_window.adapter_name = adapter_names. adapter_names[j]; @@ -3187,16 +3231,23 @@ nrt_clear_node_state(void) continue; } #if NRT_DEBUG - if (k < NRT_DEBUG_CNT) { - info("nrt_command(clean_window, " - "%s, %s, %u)", - clean_window.adapter_name, - _adapter_type_str(clean_window. - adapter_type), - clean_window.window_id); - } + snprintf(window_str, sizeof(window_str), "%d", + clean_window.window_id); + hostset_insert(hs, window_str); #endif } +#if NRT_DEBUG + if (hostset_count(hs) > 0) { + hostset_ranged_string(hs, sizeof(window_str), + window_str); + info("nrt_command(clean_window, %s, %s, %s)", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names. + adapter_type), + window_str); + } + hostset_destroy(hs); +#endif } for (j = 0; j < max_windows; j++) { free(status_array[j]); -- GitLab From 1385a9f07a3eec57e3a7107dc5146ba481c90e64 Mon Sep 17 00:00:00 2001 From: Andy Wettstein Date: Wed, 30 May 2012 11:42:02 -0700 Subject: [PATCH 339/614] In etc/init.d/slurm move check for scontrol In etc/init.d/slurm move check for scontrol after sourcing /etc/sysconfig/slurm. Patch from Andy Wettstein, University of Chicago. --- NEWS | 2 ++ doc/html/team.shtml | 3 ++- etc/init.d.slurm | 10 +++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 6b521f0658..a2a2d80794 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,8 @@ documents those changes that are of interest to users and admins. -- Modify SchedulerParamters option to match documentation: "bf_res=" changed to "bf_resolution=". Patch from Rod Schultz, Bull. -- Fix bug that clears job pending reason field. Patch fron Don Lipari, LLNL. + -- In etc/init.d/slurm move check for scontrol after sourcing + /etc/sysconfig/slurm. Patch from Andy Wettstein, University of Chicago. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/doc/html/team.shtml b/doc/html/team.shtml index c430beed0e..626b87e961 100644 --- a/doc/html/team.shtml +++ b/doc/html/team.shtml @@ -101,6 +101,7 @@ organizations. Lead SLURM developers are:
    • Adam Todorski (Rensselaer Polytechnic Institute)
    • Stephen Trofinoff (Swiss National Supercomputing Centre)
    • Nathan Weeks (Iowa State University)
    • +
    • Andy Wettstein (University of Chicago)
    • Tim Wickberg (Rensselaer Polytechnic Institute)
    • Ramiro Brito Willmersdorf (Universidade Federal de Pemambuco, Brazil)
    • Jay Windley (Linux NetworX)
    • @@ -109,6 +110,6 @@ organizations. Lead SLURM developers are:
    • Damien François (UCL)
    -

    Last modified 14 May 2012

    +

    Last modified 30 May 2012

    diff --git a/etc/init.d.slurm b/etc/init.d.slurm index 6f5b025436..c3ace6009e 100644 --- a/etc/init.d.slurm +++ b/etc/init.d.slurm @@ -55,11 +55,6 @@ else RETVAL=0 fi -if [ ! -x $BINDIR/scontrol ]; then - echo "Could not find $BINDIR/scontrol. Bad path?" - exit 1 -fi - # We can not use a starter program without losing environment # variables that are critical on Blue Gene systems if [ -d /bgl/BlueLight/ppcfloor ]; then @@ -80,6 +75,11 @@ else SLURMD_OPTIONS="" fi +if [ ! -x $BINDIR/scontrol ]; then + echo "Could not find $BINDIR/scontrol. Bad path?" + exit 1 +fi + if [ ! -f $CONFDIR/slurm.conf ]; then echo "Could not find $CONFDIR/slurm.conf. Bad path?" exit 1 -- GitLab From 4d0ec1af9dadd18b2514f7256aa1fa524ec58cdb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 10:45:44 -0700 Subject: [PATCH 340/614] Mods for clean switch/nrt build with NRT_DEBUG==0 --- src/plugins/switch/nrt/nrt.c | 38 +++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index bf041a73ee..ec26972b0c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -199,7 +199,6 @@ static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, Buf buf, bool ip_v4); -static char * _port_status_str(nrt_port_status_t status); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, @@ -953,22 +952,6 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, return SLURM_SUCCESS; } -static char * -_port_status_str(nrt_port_status_t status) -{ - if (status == 0) - return "Down"; - else if (status == 1) - return "Up"; - else if (status == 2) - return "Unconfig"; - else { - static char buf[16]; - snprintf(buf, sizeof(buf), "%d", status); - return buf; - } -} - static char * _win_state_str(win_state_t state) { @@ -1016,6 +999,22 @@ _adapter_type_str(nrt_adapter_t type) } #if NRT_DEBUG +static char * +_port_status_str(nrt_port_status_t status) +{ + if (status == 0) + return "Down"; + else if (status == 1) + return "Up"; + else if (status == 2) + return "Unconfig"; + else { + static char buf[16]; + snprintf(buf, sizeof(buf), "%d", status); + return buf; + } +} + /* Used by: slurmd */ static void _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) @@ -2675,7 +2674,10 @@ _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) { uint16_t job_count = 0; nrt_job_key_t *job_keys = NULL; - int err, i; + int err; +#if NRT_DEBUG + int i; +#endif #if 1 err = NRT_SUCCESS; -- GitLab From 4217f672e3a8958c9dda8be05f26be3747098475 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 12:54:08 -0700 Subject: [PATCH 341/614] Fix some tests related to switch/nrt use --- testsuite/expect/test1.26 | 6 ++++++ testsuite/expect/test1.96 | 0 testsuite/expect/test14.4 | 1 + testsuite/expect/test14.8 | 1 + 4 files changed, 8 insertions(+) mode change 100644 => 100755 testsuite/expect/test1.96 diff --git a/testsuite/expect/test1.26 b/testsuite/expect/test1.26 index 12b0e162aa..1ab88c0ea7 100755 --- a/testsuite/expect/test1.26 +++ b/testsuite/expect/test1.26 @@ -51,6 +51,12 @@ if {[test_front_end]} { exit $exit_code } +set switch [switch_type] +if {[string compare $switch "none"]} { + send_user "\nWARNING: This test is incompatible with switch/$switch\n" + exit $exit_code +} + # # Submit a 1 node job and record the node name # diff --git a/testsuite/expect/test1.96 b/testsuite/expect/test1.96 old mode 100644 new mode 100755 diff --git a/testsuite/expect/test14.4 b/testsuite/expect/test14.4 index 7bd0453366..ecb950b2a6 100755 --- a/testsuite/expect/test14.4 +++ b/testsuite/expect/test14.4 @@ -111,6 +111,7 @@ if {$job_id == 0} { # if {[wait_for_job $job_id "DONE"] != 0} { send_user "\nFAILURE: waiting for job to complete\n" + exec $scancel --quiet $job_id set exit_code 1 } diff --git a/testsuite/expect/test14.8 b/testsuite/expect/test14.8 index 1dc45717d1..a3a7016e62 100755 --- a/testsuite/expect/test14.8 +++ b/testsuite/expect/test14.8 @@ -109,6 +109,7 @@ if {$job_id == 0} { # if {[wait_for_job $job_id "DONE"] != 0} { send_user "\nFAILURE: waiting for job to complete\n" + exec $scancel --quiet $job_id set exit_code 1 } -- GitLab From aa7c59d3a282110c761cd8ee44578a8007371ea1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 30 May 2012 14:10:03 -0700 Subject: [PATCH 342/614] Fix in scheduling logic that can delay jobs with min/max node counts. --- NEWS | 1 + src/slurmctld/job_scheduler.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index a2a2d80794..23c155b581 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ documents those changes that are of interest to users and admins. -- Fix bug that clears job pending reason field. Patch fron Don Lipari, LLNL. -- In etc/init.d/slurm move check for scontrol after sourcing /etc/sysconfig/slurm. Patch from Andy Wettstein, University of Chicago. + -- Fix in scheduling logic that can delay jobs with min/max node counts. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 67f9b9dc19..5e97a20544 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -583,7 +583,9 @@ extern int schedule(uint32_t job_limit) } i = bit_overlap(avail_node_bitmap, job_ptr->part_ptr->node_bitmap); - if (( job_ptr->details && (i < job_ptr->details->max_nodes)) || + if ((job_ptr->details && + (job_ptr->details->min_nodes != NO_VAL) && + (job_ptr->details->min_nodes > i)) || (!job_ptr->details && (i == 0))) { /* Too many nodes DRAIN, DOWN, or * reserved for jobs in higher priority partition */ -- GitLab From d08e281347cf9a48acc446a4ee033ac3a88fe0ec Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 30 May 2012 14:44:09 -0700 Subject: [PATCH 343/614] BGQ - fix issue where if a step uses the entire allocation and then the next step in the allocation only uses part of the allocation it gets the correct cnodes. --- NEWS | 3 +++ src/plugins/select/bluegene/select_bluegene.c | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 23c155b581..2bce521e27 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,9 @@ documents those changes that are of interest to users and admins. -- In etc/init.d/slurm move check for scontrol after sourcing /etc/sysconfig/slurm. Patch from Andy Wettstein, University of Chicago. -- Fix in scheduling logic that can delay jobs with min/max node counts. + -- BGQ - fix issue where if a step uses the entire allocation and then + the next step in the allocation only uses part of the allocation it gets + the correct cnodes. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index dd313710c3..378d69a900 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -1961,9 +1961,13 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, bg_record); used_bitmap = ba_mp->cnode_bitmap; } + /* units_used and units_avail will be the + same, the exact opposite of used_bitmap. + */ step_jobinfo->units_used = bit_copy(used_bitmap); - step_jobinfo->units_avail = bit_copy(used_bitmap); bit_not(step_jobinfo->units_used); + step_jobinfo->units_avail = + bit_copy(step_jobinfo->units_used); bit_or(used_bitmap, step_jobinfo->units_used); } -- GitLab From 64f5265801acb225aef7c320595f6540e0c5ab4a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 31 May 2012 14:22:05 -0700 Subject: [PATCH 344/614] Cosmetic/comment mods only --- src/slurmctld/job_mgr.c | 5 ++--- src/slurmctld/slurmctld.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 4c4fd88cb7..92a2b45cd6 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2900,7 +2900,7 @@ extern void rehash_jobs(void) * IN will_run - don't initiate the job if set, just test if it could run * now or later * OUT resp - will run response (includes start location, time, etc.) - * IN allocate - resource allocation request if set, not a full job + * IN allocate - resource allocation request only if set, batch job if zero * IN submit_uid -uid of user issuing the request * OUT job_pptr - set to pointer to job record * RET 0 or an error code. If the job would only be able to execute with @@ -3009,14 +3009,13 @@ extern int job_allocate(job_desc_msg_t * job_specs, int immediate, test_only = will_run || (allocate == 0); no_alloc = test_only || too_fragmented || - (!top_prio) || (!independent); + (!top_prio) || (!independent); if (!no_alloc && !avail_front_end()) { debug("sched: job_allocate() returning, no front end nodes " "are available"); error_code = ESLURM_NODES_BUSY; } else error_code = select_nodes(job_ptr, no_alloc, NULL); - if (!test_only) { last_job_update = now; slurm_sched_schedule(); /* work for external scheduler */ diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 3917a59ccf..de8c928fb0 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -957,7 +957,7 @@ extern int job_alloc_info(uint32_t uid, uint32_t job_id, * IN will_run - don't initiate the job if set, just test if it could run * now or later * OUT resp - will run response (includes start location, time, etc.) - * IN allocate - resource allocation request if set, not a full job + * IN allocate - resource allocation request only if set, batch job if zero * IN submit_uid -uid of user issuing the request * OUT job_pptr - set to pointer to job record * RET 0 or an error code. If the job would only be able to execute with -- GitLab From 29de9b72c2685514873cedc9696157d784659846 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 31 May 2012 14:54:28 -0700 Subject: [PATCH 345/614] BGQ - add check for new IBM function to check for IO for a block and rerun autogen.sh --- Makefile.in | 80 +++-- aclocal.m4 | 74 +++-- auxdir/Makefile.in | 19 +- auxdir/config.guess | 49 ++-- auxdir/config.sub | 65 ++-- auxdir/depcomp | 74 ++++- auxdir/install-sh | 29 +- auxdir/libtool.m4 | 264 +++++++++++++---- auxdir/ltmain.sh | 95 +++--- auxdir/ltoptions.m4 | 19 +- auxdir/ltversion.m4 | 10 +- auxdir/missing | 53 +--- auxdir/x_ac_bluegene.m4 | 12 + config.h.in | 3 + configure | 277 +++++++++++------- contribs/Makefile.in | 19 +- contribs/arrayrun/Makefile.in | 19 +- contribs/cray/Makefile.in | 25 +- contribs/lua/Makefile.in | 19 +- contribs/pam/Makefile.in | 27 +- contribs/perlapi/Makefile.in | 19 +- contribs/perlapi/libslurm/Makefile.in | 19 +- contribs/perlapi/libslurmdb/Makefile.in | 19 +- contribs/phpext/Makefile.in | 19 +- contribs/sjobexit/Makefile.in | 25 +- contribs/slurmdb-direct/Makefile.in | 25 +- contribs/torque/Makefile.in | 25 +- doc/Makefile.in | 19 +- doc/html/Makefile.in | 29 +- doc/man/Makefile.in | 19 +- doc/man/man1/Makefile.in | 33 ++- doc/man/man3/Makefile.in | 29 +- doc/man/man5/Makefile.in | 33 ++- doc/man/man8/Makefile.in | 33 ++- src/Makefile.in | 19 +- src/api/Makefile.in | 31 +- src/common/Makefile.in | 27 +- src/database/Makefile.in | 23 +- src/db_api/Makefile.in | 27 +- src/plugins/Makefile.in | 19 +- src/plugins/accounting_storage/Makefile.in | 19 +- .../accounting_storage/common/Makefile.in | 21 +- .../accounting_storage/filetxt/Makefile.in | 27 +- .../accounting_storage/mysql/Makefile.in | 27 +- .../accounting_storage/none/Makefile.in | 27 +- .../accounting_storage/pgsql/Makefile.in | 27 +- .../accounting_storage/slurmdbd/Makefile.in | 27 +- src/plugins/auth/Makefile.in | 19 +- src/plugins/auth/authd/Makefile.in | 27 +- src/plugins/auth/munge/Makefile.in | 27 +- src/plugins/auth/none/Makefile.in | 27 +- src/plugins/checkpoint/Makefile.in | 19 +- src/plugins/checkpoint/aix/Makefile.in | 27 +- src/plugins/checkpoint/blcr/Makefile.in | 31 +- src/plugins/checkpoint/none/Makefile.in | 27 +- src/plugins/checkpoint/ompi/Makefile.in | 27 +- src/plugins/crypto/Makefile.in | 19 +- src/plugins/crypto/munge/Makefile.in | 27 +- src/plugins/crypto/openssl/Makefile.in | 27 +- src/plugins/gres/Makefile.in | 19 +- src/plugins/gres/gpu/Makefile.in | 27 +- src/plugins/gres/nic/Makefile.in | 27 +- src/plugins/job_submit/Makefile.in | 19 +- src/plugins/job_submit/cnode/Makefile.in | 27 +- src/plugins/job_submit/defaults/Makefile.in | 27 +- src/plugins/job_submit/logging/Makefile.in | 27 +- src/plugins/job_submit/lua/Makefile.in | 27 +- src/plugins/job_submit/partition/Makefile.in | 27 +- src/plugins/jobacct_gather/Makefile.in | 19 +- src/plugins/jobacct_gather/aix/Makefile.in | 27 +- src/plugins/jobacct_gather/cgroup/Makefile.in | 27 +- src/plugins/jobacct_gather/linux/Makefile.in | 27 +- src/plugins/jobacct_gather/none/Makefile.in | 27 +- src/plugins/jobcomp/Makefile.in | 19 +- src/plugins/jobcomp/filetxt/Makefile.in | 27 +- src/plugins/jobcomp/mysql/Makefile.in | 27 +- src/plugins/jobcomp/none/Makefile.in | 27 +- src/plugins/jobcomp/pgsql/Makefile.in | 27 +- src/plugins/jobcomp/script/Makefile.in | 27 +- src/plugins/mpi/Makefile.in | 19 +- src/plugins/mpi/lam/Makefile.in | 27 +- src/plugins/mpi/mpich1_p4/Makefile.in | 27 +- src/plugins/mpi/mpich1_shmem/Makefile.in | 27 +- src/plugins/mpi/mpichgm/Makefile.in | 27 +- src/plugins/mpi/mpichmx/Makefile.in | 27 +- src/plugins/mpi/mvapich/Makefile.in | 27 +- src/plugins/mpi/none/Makefile.in | 27 +- src/plugins/mpi/openmpi/Makefile.in | 27 +- src/plugins/mpi/pmi2/Makefile.in | 27 +- src/plugins/preempt/Makefile.in | 19 +- src/plugins/preempt/none/Makefile.in | 27 +- .../preempt/partition_prio/Makefile.in | 27 +- src/plugins/preempt/qos/Makefile.in | 27 +- src/plugins/priority/Makefile.in | 19 +- src/plugins/priority/basic/Makefile.in | 27 +- src/plugins/priority/multifactor/Makefile.in | 27 +- src/plugins/proctrack/Makefile.in | 19 +- src/plugins/proctrack/aix/Makefile.in | 27 +- src/plugins/proctrack/cgroup/Makefile.in | 27 +- src/plugins/proctrack/linuxproc/Makefile.in | 27 +- src/plugins/proctrack/lua/Makefile.in | 27 +- src/plugins/proctrack/pgid/Makefile.in | 27 +- src/plugins/proctrack/rms/Makefile.in | 27 +- src/plugins/proctrack/sgi_job/Makefile.in | 27 +- src/plugins/sched/Makefile.in | 19 +- src/plugins/sched/backfill/Makefile.in | 27 +- src/plugins/sched/builtin/Makefile.in | 27 +- src/plugins/sched/hold/Makefile.in | 27 +- src/plugins/sched/wiki/Makefile.in | 27 +- src/plugins/sched/wiki2/Makefile.in | 27 +- src/plugins/select/Makefile.in | 19 +- src/plugins/select/bluegene/Makefile.in | 41 ++- src/plugins/select/bluegene/ba/Makefile.in | 23 +- .../select/bluegene/ba_bgq/Makefile.in | 23 +- src/plugins/select/bluegene/bl/Makefile.in | 21 +- .../select/bluegene/bl_bgq/Makefile.in | 21 +- src/plugins/select/bluegene/sfree/Makefile.in | 21 +- src/plugins/select/cons_res/Makefile.in | 27 +- src/plugins/select/cray/Makefile.in | 27 +- src/plugins/select/cray/libalps/Makefile.in | 21 +- .../select/cray/libemulate/Makefile.in | 21 +- src/plugins/select/linear/Makefile.in | 27 +- src/plugins/switch/Makefile.in | 19 +- src/plugins/switch/elan/Makefile.in | 27 +- src/plugins/switch/federation/Makefile.in | 27 +- src/plugins/switch/none/Makefile.in | 27 +- src/plugins/task/Makefile.in | 19 +- src/plugins/task/affinity/Makefile.in | 27 +- src/plugins/task/cgroup/Makefile.in | 27 +- src/plugins/task/none/Makefile.in | 27 +- src/plugins/topology/3d_torus/Makefile.in | 27 +- src/plugins/topology/Makefile.in | 19 +- src/plugins/topology/node_rank/Makefile.in | 27 +- src/plugins/topology/none/Makefile.in | 27 +- src/plugins/topology/tree/Makefile.in | 27 +- src/sacct/Makefile.in | 21 +- src/sacctmgr/Makefile.in | 21 +- src/salloc/Makefile.in | 21 +- src/sattach/Makefile.in | 21 +- src/sbatch/Makefile.in | 21 +- src/sbcast/Makefile.in | 21 +- src/scancel/Makefile.in | 21 +- src/scontrol/Makefile.in | 21 +- src/sdiag/Makefile.in | 21 +- src/sinfo/Makefile.in | 21 +- src/slurmctld/Makefile.in | 21 +- src/slurmd/Makefile.in | 19 +- src/slurmd/common/Makefile.in | 21 +- src/slurmd/slurmd/Makefile.in | 21 +- src/slurmd/slurmstepd/Makefile.in | 21 +- src/slurmdbd/Makefile.in | 21 +- src/smap/Makefile.in | 21 +- src/sprio/Makefile.in | 21 +- src/squeue/Makefile.in | 21 +- src/sreport/Makefile.in | 21 +- src/srun/Makefile.in | 21 +- src/srun_cr/Makefile.in | 21 +- src/sshare/Makefile.in | 21 +- src/sstat/Makefile.in | 21 +- src/strigger/Makefile.in | 21 +- src/sview/Makefile.in | 21 +- testsuite/Makefile.in | 38 ++- testsuite/expect/Makefile.in | 19 +- testsuite/slurm_unit/Makefile.in | 19 +- testsuite/slurm_unit/api/Makefile.in | 34 ++- testsuite/slurm_unit/api/manual/Makefile.in | 35 ++- testsuite/slurm_unit/common/Makefile.in | 40 +-- 167 files changed, 3235 insertions(+), 1621 deletions(-) mode change 100755 => 100644 auxdir/ltmain.sh diff --git a/Makefile.in b/Makefile.in index 08505e7cfb..91b5ef5c90 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -125,6 +125,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkgincludedir)" HEADERS = $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -139,9 +145,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -170,6 +178,8 @@ am__relativize = \ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -418,7 +428,7 @@ all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -454,10 +464,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -468,10 +476,8 @@ $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) touch $@ slurm/slurm.h: slurm/stamp-h2 - @if test ! -f $@; then \ - rm -f slurm/stamp-h2; \ - $(MAKE) $(AM_MAKEFLAGS) slurm/stamp-h2; \ - else :; fi + @if test ! -f $@; then rm -f slurm/stamp-h2; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) slurm/stamp-h2; else :; fi slurm/stamp-h2: $(top_srcdir)/slurm/slurm.h.in $(top_builddir)/config.status @rm -f slurm/stamp-h2 @@ -513,9 +519,7 @@ uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files + dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -724,7 +728,11 @@ dist-gzip: distdir $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -732,7 +740,7 @@ dist-lzma: distdir $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -763,6 +771,8 @@ distcheck: dist bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -782,6 +792,7 @@ distcheck: dist && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -810,8 +821,16 @@ distcheck: dist list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -845,10 +864,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -937,8 +961,8 @@ uninstall-am: uninstall-pkgincludeHEADERS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ + dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ diff --git a/aclocal.m4 b/aclocal.m4 index d1afa71a72..9c3d50cbbc 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.3 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -376,12 +377,15 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -391,7 +395,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.3], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -407,19 +411,21 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.3])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -501,14 +507,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -548,6 +554,7 @@ AC_CACHE_CHECK([dependency style of $depcc], # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -612,7 +619,7 @@ AC_CACHE_CHECK([dependency style of $depcc], break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -677,10 +684,13 @@ AC_DEFUN([AM_DEP_TRACK], if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -902,12 +912,15 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -947,8 +960,8 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, +# 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -968,7 +981,7 @@ AC_DEFUN([AM_MAINTAINER_MODE], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) -AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) +AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful @@ -1079,12 +1092,15 @@ else fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -1107,13 +1123,14 @@ esac # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -1121,13 +1138,13 @@ AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1203,12 +1220,14 @@ Check your system clock]) fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -1231,13 +1250,13 @@ fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -1246,13 +1265,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])]) AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -1274,10 +1293,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) diff --git a/auxdir/Makefile.in b/auxdir/Makefile.in index 58e81ab56a..ca637179ae 100644 --- a/auxdir/Makefile.in +++ b/auxdir/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -411,10 +411,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/auxdir/config.guess b/auxdir/config.guess index 40eaed4821..d622a44e55 100755 --- a/auxdir/config.guess +++ b/auxdir/config.guess @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ timestamp='2011-05-11' # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ EOF echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ EOF *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ EOF i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ EOF test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ EOF echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ EOF i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff --git a/auxdir/config.sub b/auxdir/config.sub index 30fdca8121..c894da4550 100755 --- a/auxdir/config.sub +++ b/auxdir/config.sub @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ timestamp='2011-03-23' # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ case $maybe_os in os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -247,17 +249,22 @@ case $basic_machine in # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +298,7 @@ case $basic_machine in | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +307,7 @@ case $basic_machine in | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +322,7 @@ case $basic_machine in c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +335,10 @@ case $basic_machine in strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +361,13 @@ case $basic_machine in # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +376,10 @@ case $basic_machine in | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +413,7 @@ case $basic_machine in | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +421,11 @@ case $basic_machine in | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +725,6 @@ case $basic_machine in i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +821,18 @@ case $basic_machine in ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1141,8 @@ case $basic_machine in basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1352,7 @@ case $os in | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1548,9 +1564,6 @@ case $basic_machine in ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff --git a/auxdir/depcomp b/auxdir/depcomp index df8eea7e4c..bd0ac08958 100755 --- a/auxdir/depcomp +++ b/auxdir/depcomp @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ Environment variables: object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -90,10 +90,18 @@ if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -158,10 +166,12 @@ gcc) ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -405,6 +415,52 @@ tru64) rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -503,7 +559,9 @@ makedepend) touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation diff --git a/auxdir/install-sh b/auxdir/install-sh index 6781b987bd..a9244eb078 100755 --- a/auxdir/install-sh +++ b/auxdir/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ if test $# -eq 0; then fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ fi for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ do echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ do case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ do for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff --git a/auxdir/libtool.m4 b/auxdir/libtool.m4 index 8ff3c76f8b..828104cfde 100644 --- a/auxdir/libtool.m4 +++ b/auxdir/libtool.m4 @@ -1,8 +1,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -11,8 +11,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -146,6 +146,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -637,7 +639,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -801,6 +803,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -822,6 +825,31 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +############################################################ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +############################################################ +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -852,6 +880,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -954,7 +986,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -962,6 +1000,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -973,6 +1012,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -990,7 +1030,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1035,8 +1077,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1047,6 +1089,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1330,14 +1374,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1414,13 +1471,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1600,6 +1657,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1639,7 +1701,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2185,7 +2247,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2194,7 +2256,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2259,7 +2321,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2398,7 +2460,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2406,10 +2468,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2417,7 +2475,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2435,7 +2493,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2455,7 +2513,7 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' @@ -2466,7 +2524,7 @@ gnu*) ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2527,7 +2585,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2543,7 +2601,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2580,9 +2638,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2657,7 +2715,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2726,7 +2784,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2751,7 +2809,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2775,7 +2833,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2806,7 +2864,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2816,7 +2874,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3238,7 +3296,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3658,6 +3716,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4242,7 +4301,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4334,18 +4395,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4505,7 +4581,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4533,7 +4611,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4787,8 +4864,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5084,6 +5160,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5130,10 +5207,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5146,7 +5219,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5185,7 +5258,6 @@ _LT_EOF fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5627,9 +5699,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1], _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5787,7 +5856,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6157,7 +6225,7 @@ if test "$_lt_caught_CXX_error" != yes; then esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6918,12 +6986,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7120,7 +7194,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7253,7 +7326,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7440,6 +7512,77 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +## CAVEAT EMPTOR: +## There is no encapsulation within the following macros, do not change +## the running order or otherwise move them around unless you know exactly +## what you are doing... +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7509,6 +7652,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], diff --git a/auxdir/ltmain.sh b/auxdir/ltmain.sh old mode 100755 new mode 100644 index b4a3231ca3..c2852d8561 --- a/auxdir/ltmain.sh +++ b/auxdir/ltmain.sh @@ -1,9 +1,9 @@ -# libtool (GNU libtool) 2.4 +# libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, -# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -41,6 +41,7 @@ # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) +# --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages @@ -69,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4 Debian-2.4-2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -79,9 +80,9 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4 Debian-2.4-2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" -package_revision=1.3293 +package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -136,15 +137,10 @@ progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} -: ${EGREP="/bin/grep -E"} -: ${FGREP="/bin/grep -F"} -: ${GREP="/bin/grep"} -: ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} -: ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} @@ -387,7 +383,7 @@ case $progpath in ;; *) save_IFS="$IFS" - IFS=: + IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break @@ -771,8 +767,8 @@ func_help () s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ - s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ - s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ + s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ + s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } @@ -1052,6 +1048,7 @@ opt_finish=false opt_help=false opt_help_all=false opt_silent=: +opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false @@ -1118,6 +1115,10 @@ esac ;; --no-silent|--no-quiet) opt_silent=false +func_append preserve_args " $opt" + ;; + --no-warning|--no-warn) + opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) @@ -2059,7 +2060,7 @@ func_mode_compile () *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) + *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -3201,11 +3202,13 @@ func_mode_install () # Set up the ranlib parameters. oldlib="$destdir/$name" + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then - func_show_eval "$old_striplib $oldlib" 'exit $?' + func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. @@ -3470,7 +3473,7 @@ static const void *lt_preloaded_setup() { # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) + *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; @@ -3982,14 +3985,17 @@ func_exec_program_core () # launches target application with the remaining arguments. func_exec_program () { - for lt_wr_arg - do - case \$lt_wr_arg in - --lt-*) ;; - *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; - esac - shift - done + case \" \$* \" in + *\\ --lt-*) + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done ;; + esac func_exec_program_core \${1+\"\$@\"} } @@ -5057,9 +5063,15 @@ void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' - + $SED -n -e ' +s/^\(.\{79\}\)\(..*\)/\1\ +\2/ +h +s/\([\\"]\)/\\\1/g +s/$/\\n/ +s/\([^\n]*\).*/ fputs ("\1", f);/p +g +D' cat <<"EOF" } EOF @@ -5643,7 +5655,8 @@ func_mode_link () continue ;; - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" @@ -6150,7 +6163,8 @@ func_mode_link () lib= found=no case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) + -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ + |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" @@ -6834,7 +6848,7 @@ func_mode_link () test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" + add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in @@ -7319,6 +7333,7 @@ func_mode_link () # which has an extra 1 added just for fun # case $version_type in + # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result @@ -7438,7 +7453,7 @@ func_mode_link () versuffix="$major.$revision" ;; - linux) + linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" @@ -8026,6 +8041,11 @@ EOF # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then + # Remove ${wl} instances when linking with ld. + # FIXME: should test the right _cmds variable. + case $archive_cmds in + *\$LD\ *) wl= ;; + esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= @@ -8056,7 +8076,7 @@ EOF elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) func_apped perm_rpath " $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi done @@ -8064,11 +8084,7 @@ EOF if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi + eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. @@ -9158,6 +9174,8 @@ EOF esac done fi + func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 + tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" @@ -9267,7 +9285,8 @@ EOF *.la) func_basename "$deplib" name="$func_basename_result" - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` + func_resolve_sysroot "$deplib" + eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" diff --git a/auxdir/ltoptions.m4 b/auxdir/ltoptions.m4 index 17cfd51c0b..5d9acd8e23 100644 --- a/auxdir/ltoptions.m4 +++ b/auxdir/ltoptions.m4 @@ -326,9 +326,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) diff --git a/auxdir/ltversion.m4 b/auxdir/ltversion.m4 index 9c7b5d4118..07a8602d48 100644 --- a/auxdir/ltversion.m4 +++ b/auxdir/ltversion.m4 @@ -9,15 +9,15 @@ # @configure_input@ -# serial 3293 ltversion.m4 +# serial 3337 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.4]) -m4_define([LT_PACKAGE_REVISION], [1.3293]) +m4_define([LT_PACKAGE_VERSION], [2.4.2]) +m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.4' -macro_revision='1.3293' +[macro_version='2.4.2' +macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) diff --git a/auxdir/missing b/auxdir/missing index 28055d2ae6..86a8fc31e3 100755 --- a/auxdir/missing +++ b/auxdir/missing @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ Supported PROGRAM values: help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ case $1 in # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ WARNING: \`$1' $msg. You should only need it if \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ WARNING: \`$1' is $msg. You should only need it if \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ WARNING: \`$1' is $msg. You should only need it if touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff --git a/auxdir/x_ac_bluegene.m4 b/auxdir/x_ac_bluegene.m4 index 2fcef514d9..d1e53bf2af 100644 --- a/auxdir/x_ac_bluegene.m4 +++ b/auxdir/x_ac_bluegene.m4 @@ -295,6 +295,15 @@ AC_DEFUN([X_AC_BGQ], log4cxx::LoggerPtr logger_ptr(log4cxx::Logger::getLogger( "ibm" ));]])], [have_bgq_files=yes], [AC_MSG_ERROR(There is a problem linking to the BG/Q api.)]) + # In later versions of the driver IBM added a better function + # to see if blocks were IO connected or not. Here is a check + # to not break backwards compatibility + AC_LINK_IFELSE([AC_LANG_PROGRAM( + [[#include + #include ]], + [[ bgsched::Block::checkIO("", NULL, NULL);]])], + [have_bgq_new_io_check=yes], + [AC_MSG_RESULT(Using old iocheck.)]) AC_LANG_POP(C++) LDFLAGS="$saved_LDFLAGS" fi @@ -312,6 +321,9 @@ AC_DEFUN([X_AC_BGQ], 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]) + if test ! -z "$have_bgq_new_io_check" ; then + AC_DEFINE(HAVE_BG_NEW_IO_CHECK, 1, [Define to 1 if using code with new iocheck]) + fi AC_MSG_NOTICE([Running on a legitimate BG/Q system]) # AC_MSG_CHECKING(for BG serial value) diff --git a/config.h.in b/config.h.in index 8ba6405135..edc29923df 100644 --- a/config.h.in +++ b/config.h.in @@ -63,6 +63,9 @@ /* Define to 1 if emulating or running on Blue Gene/L or P system */ #undef HAVE_BG_L_P +/* Define to 1 if using code with new iocheck */ +#undef HAVE_BG_NEW_IO_CHECK + /* Define to 1 if you have the `cfmakeraw' function. */ #undef HAVE_CFMAKERAW diff --git a/configure b/configure index dc8e58f393..69c8296a72 100755 --- a/configure +++ b/configure @@ -781,6 +781,7 @@ BG_INCLUDES am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -1617,7 +1618,7 @@ Optional Packages: --with-bg-serial=NAME set BG_SERIAL value --with-proctrack=PATH Specify path to proctrack sources - --with-pic try to use only PIC/non-PIC objects [default=use + --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR @@ -3362,11 +3363,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3474,6 +3475,7 @@ fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -4287,6 +4289,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4346,7 +4349,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -5023,6 +5026,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -5082,7 +5086,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -5261,6 +5265,29 @@ if ac_fn_cxx_try_link "$LINENO"; then : else as_fn_error $? "There is a problem linking to the BG/Q api." "$LINENO" 5 fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + # In later versions of the driver IBM added a better function + # to see if blocks were IO connected or not. Here is a check + # to not break backwards compatibility + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + #include +int +main () +{ + bgsched::Block::checkIO("", NULL, NULL); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + have_bgq_new_io_check=yes +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using old iocheck." >&5 +$as_echo "Using old iocheck." >&6; } +fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c @@ -5297,6 +5324,11 @@ $as_echo "#define HAVE_FRONT_END 1" >>confdefs.h $as_echo "#define HAVE_BG_FILES 1" >>confdefs.h #AC_DEFINE_UNQUOTED(BG_BRIDGE_SO, "$soloc", [Define the BG_BRIDGE_SO value]) + if test ! -z "$have_bgq_new_io_check" ; then + +$as_echo "#define HAVE_BG_NEW_IO_CHECK 1" >>confdefs.h + + fi { $as_echo "$as_me:${as_lineno-$LINENO}: Running on a legitimate BG/Q system" >&5 $as_echo "$as_me: Running on a legitimate BG/Q system" >&6;} @@ -6614,6 +6646,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -6673,7 +6706,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -6998,6 +7031,7 @@ else # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -7057,7 +7091,7 @@ else break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -7151,8 +7185,8 @@ esac -macro_version='2.4' -macro_revision='1.3293' +macro_version='2.4.2' +macro_revision='1.3337' @@ -7796,6 +7830,11 @@ else lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -7835,7 +7874,7 @@ else # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -8264,7 +8303,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -8904,13 +8943,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -9057,6 +9096,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -9445,7 +9485,7 @@ $as_echo "$lt_cv_cc_needs_belf" >&6; } CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -9456,7 +9496,20 @@ sparc*-*solaris*) case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -10096,7 +10149,13 @@ else $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&5 + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 @@ -10107,6 +10166,7 @@ else fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : @@ -10139,6 +10199,7 @@ rm -f core conftest.err conftest.$ac_objext \ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : @@ -10160,7 +10221,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&5 + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 @@ -10308,7 +10371,22 @@ fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : - withval=$with_pic; pic_mode="$withval" + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac else pic_mode=default fi @@ -10381,6 +10459,10 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + + + @@ -10845,7 +10927,9 @@ lt_prog_compiler_static= case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' - lt_prog_compiler_pic='-Xcompiler -fPIC' + if test -n "$lt_prog_compiler_pic"; then + lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" + fi ;; esac else @@ -10936,18 +11020,33 @@ lt_prog_compiler_static= ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; + *Sun\ F* | *Sun*Fortran*) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + lt_prog_compiler_wl='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; + *Intel*\ [CF]*Compiler*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fPIC' + lt_prog_compiler_static='-static' + ;; + *Portland\ Group*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-fpic' + lt_prog_compiler_static='-Bstatic' + ;; esac ;; esac @@ -11309,7 +11408,6 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported @@ -11562,8 +11660,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' - hardcode_libdir_flag_spec= - hardcode_libdir_flag_spec_ld='-rpath $libdir' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ @@ -11943,6 +12040,7 @@ fi # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes + exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' @@ -11988,6 +12086,7 @@ fi hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec='' fi @@ -12016,10 +12115,6 @@ fi hardcode_shlibpath_var=no ;; - freebsd1*) - ld_shlibs=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -12032,7 +12127,7 @@ fi ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes @@ -12071,7 +12166,6 @@ fi fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes @@ -12689,11 +12783,6 @@ esac - - - - - @@ -12789,7 +12878,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -12798,7 +12887,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -12863,7 +12952,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -13002,7 +13091,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -13010,10 +13099,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -13021,7 +13106,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -13039,7 +13124,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -13059,7 +13144,7 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' @@ -13070,7 +13155,7 @@ gnu*) ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -13131,7 +13216,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -13147,7 +13232,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -13184,9 +13269,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -13280,7 +13365,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -13349,7 +13434,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -13374,7 +13459,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -13398,7 +13483,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -13429,7 +13514,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -13439,7 +13524,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -14364,7 +14449,6 @@ export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= -hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported @@ -14948,6 +15032,7 @@ fi hardcode_shlibpath_var_CXX=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else whole_archive_flag_spec_CXX='' fi @@ -14992,7 +15077,7 @@ fi esac ;; - freebsd[12]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no @@ -15668,6 +15753,7 @@ _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 @@ -16457,7 +16543,9 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared librarie ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' @@ -16610,8 +16698,6 @@ esac - - @@ -16640,7 +16726,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -16649,7 +16735,7 @@ aix3*) ;; aix[4-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -16714,7 +16800,7 @@ beos*) ;; bsdi[45]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -16851,7 +16937,7 @@ darwin* | rhapsody*) ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -16859,10 +16945,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -16870,7 +16952,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[123]*) objformat=aout ;; + freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -16888,7 +16970,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) @@ -16908,7 +16990,7 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' @@ -16919,7 +17001,7 @@ gnu*) ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -16980,7 +17062,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[3-9]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -16996,7 +17078,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -17033,9 +17115,9 @@ linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -17129,7 +17211,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -17198,7 +17280,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -17223,7 +17305,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -17247,7 +17329,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -17278,7 +17360,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -17288,7 +17370,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -17427,6 +17509,8 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu + + ac_config_commands="$ac_config_commands libtool" @@ -23167,6 +23251,7 @@ pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' @@ -23249,7 +23334,6 @@ with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' @@ -23321,7 +23405,6 @@ with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' @@ -23360,6 +23443,7 @@ _LTECHO_EOF' # Quote evaled strings. for var in SHELL \ ECHO \ +PATH_SEPARATOR \ SED \ GREP \ EGREP \ @@ -23410,7 +23494,6 @@ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ -hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ @@ -23444,7 +23527,6 @@ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ -hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ @@ -24413,8 +24495,8 @@ $as_echo X"$file" | # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -24468,6 +24550,9 @@ SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO +# The PATH separator for the build system. +PATH_SEPARATOR=$lt_PATH_SEPARATOR + # The host system. host_alias=$host_alias host=$host @@ -24769,10 +24854,6 @@ no_undefined_flag=$lt_no_undefined_flag # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator @@ -25115,10 +25196,6 @@ no_undefined_flag=$lt_no_undefined_flag_CXX # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX -# If ld is used when linking, flag to hardcode \$libdir into a binary -# during linking. This must work even if \$libdir does not exist. -hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX - # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX diff --git a/contribs/Makefile.in b/contribs/Makefile.in index a54e356a29..1a5bd79fa7 100644 --- a/contribs/Makefile.in +++ b/contribs/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -585,10 +585,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/arrayrun/Makefile.in b/contribs/arrayrun/Makefile.in index 40469943ee..7244f628c9 100644 --- a/contribs/arrayrun/Makefile.in +++ b/contribs/arrayrun/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -380,10 +380,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/cray/Makefile.in b/contribs/cray/Makefile.in index ad1be9cd10..bf6f2b0490 100644 --- a/contribs/cray/Makefile.in +++ b/contribs/cray/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -107,6 +107,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = @@ -418,10 +424,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/lua/Makefile.in b/contribs/lua/Makefile.in index 1c5231a3fe..cb9f82977c 100644 --- a/contribs/lua/Makefile.in +++ b/contribs/lua/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -380,10 +380,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/pam/Makefile.in b/contribs/pam/Makefile.in index 112089959d..0b7571ad1a 100644 --- a/contribs/pam/Makefile.in +++ b/contribs/pam/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) @HAVE_PAM_TRUE@pam_slurm_la_DEPENDENCIES = \ @@ -420,7 +426,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -pam_slurm.la: $(pam_slurm_la_OBJECTS) $(pam_slurm_la_DEPENDENCIES) +pam_slurm.la: $(pam_slurm_la_OBJECTS) $(pam_slurm_la_DEPENDENCIES) $(EXTRA_pam_slurm_la_DEPENDENCIES) $(pam_slurm_la_LINK) $(am_pam_slurm_la_rpath) $(pam_slurm_la_OBJECTS) $(pam_slurm_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -557,10 +563,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/perlapi/Makefile.in b/contribs/perlapi/Makefile.in index fe67980995..c6decd4b50 100644 --- a/contribs/perlapi/Makefile.in +++ b/contribs/perlapi/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/perlapi/libslurm/Makefile.in b/contribs/perlapi/libslurm/Makefile.in index 7dfa142f5c..fc48e7721c 100644 --- a/contribs/perlapi/libslurm/Makefile.in +++ b/contribs/perlapi/libslurm/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -415,10 +415,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: maintainer-clean-generic: diff --git a/contribs/perlapi/libslurmdb/Makefile.in b/contribs/perlapi/libslurmdb/Makefile.in index 78d09d4533..c43e64fc45 100644 --- a/contribs/perlapi/libslurmdb/Makefile.in +++ b/contribs/perlapi/libslurmdb/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -395,10 +395,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: maintainer-clean-generic: diff --git a/contribs/phpext/Makefile.in b/contribs/phpext/Makefile.in index 4d75ad2f30..1c38ec2acd 100644 --- a/contribs/phpext/Makefile.in +++ b/contribs/phpext/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -380,10 +380,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: maintainer-clean-generic: diff --git a/contribs/sjobexit/Makefile.in b/contribs/sjobexit/Makefile.in index 7f383e7ddc..3752ace6f9 100644 --- a/contribs/sjobexit/Makefile.in +++ b/contribs/sjobexit/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = @@ -408,10 +414,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/slurmdb-direct/Makefile.in b/contribs/slurmdb-direct/Makefile.in index 6bb533640c..9c8c0f9af4 100644 --- a/contribs/slurmdb-direct/Makefile.in +++ b/contribs/slurmdb-direct/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(sbindir)" SCRIPTS = $(sbin_SCRIPTS) SOURCES = @@ -409,10 +415,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/contribs/torque/Makefile.in b/contribs/torque/Makefile.in index e51e5b32b1..0d4a81b84d 100644 --- a/contribs/torque/Makefile.in +++ b/contribs/torque/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(bin_SCRIPTS) SOURCES = @@ -408,10 +414,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/doc/Makefile.in b/doc/Makefile.in index efea2f63ae..b1176a3e77 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -584,10 +584,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 858c9ce8a0..dc8df4f110 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -107,6 +107,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(htmldir)" DATA = $(html_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -477,9 +483,7 @@ uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(htmldir)" && rm -f $$files + dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -534,10 +538,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/doc/man/Makefile.in b/doc/man/Makefile.in index fe96aa8e6e..9ed18f1153 100644 --- a/doc/man/Makefile.in +++ b/doc/man/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/doc/man/man1/Makefile.in b/doc/man/man1/Makefile.in index a3ab2717a2..0ed48dfe03 100644 --- a/doc/man/man1/Makefile.in +++ b/doc/man/man1/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(htmldir)" NROFF = nroff @@ -432,9 +438,7 @@ uninstall-man1: files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @@ -452,9 +456,7 @@ uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(htmldir)" && rm -f $$files + dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -522,10 +524,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/doc/man/man3/Makefile.in b/doc/man/man3/Makefile.in index 4baaee0c49..1185414db5 100644 --- a/doc/man/man3/Makefile.in +++ b/doc/man/man3/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -104,6 +104,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" NROFF = nroff @@ -513,9 +519,7 @@ uninstall-man3: files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man3dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man3dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -583,10 +587,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/doc/man/man5/Makefile.in b/doc/man/man5/Makefile.in index b8e0052f2a..7d8a8043b3 100644 --- a/doc/man/man5/Makefile.in +++ b/doc/man/man5/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man5dir = $(mandir)/man5 am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(htmldir)" NROFF = nroff @@ -405,9 +411,7 @@ uninstall-man5: files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man5dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man5dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) install-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @@ -425,9 +429,7 @@ uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(htmldir)" && rm -f $$files + dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -495,10 +497,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/doc/man/man8/Makefile.in b/doc/man/man8/Makefile.in index 2c46deb5e8..41a4d083de 100644 --- a/doc/man/man8/Makefile.in +++ b/doc/man/man8/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man8dir = $(mandir)/man8 am__installdirs = "$(DESTDIR)$(man8dir)" "$(DESTDIR)$(htmldir)" NROFF = nroff @@ -400,9 +406,7 @@ uninstall-man8: files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man8dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man8dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) install-htmlDATA: $(html_DATA) @$(NORMAL_INSTALL) test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)" @@ -420,9 +424,7 @@ uninstall-htmlDATA: @$(NORMAL_UNINSTALL) @list='$(html_DATA)'; test -n "$(htmldir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(htmldir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(htmldir)" && rm -f $$files + dir='$(DESTDIR)$(htmldir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: @@ -490,10 +492,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) diff --git a/src/Makefile.in b/src/Makefile.in index ab36cc7843..a5182aebea 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -582,10 +582,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/api/Makefile.in b/src/api/Makefile.in index 56d44d9179..7855854874 100644 --- a/src/api/Makefile.in +++ b/src/api/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -108,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libpmi_la_DEPENDENCIES = $(top_builddir)/src/api/libslurm.la @@ -589,11 +595,11 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpmi.la: $(libpmi_la_OBJECTS) $(libpmi_la_DEPENDENCIES) +libpmi.la: $(libpmi_la_OBJECTS) $(libpmi_la_DEPENDENCIES) $(EXTRA_libpmi_la_DEPENDENCIES) $(libpmi_la_LINK) -rpath $(libdir) $(libpmi_la_OBJECTS) $(libpmi_la_LIBADD) $(LIBS) -libslurm.la: $(libslurm_la_OBJECTS) $(libslurm_la_DEPENDENCIES) +libslurm.la: $(libslurm_la_OBJECTS) $(libslurm_la_DEPENDENCIES) $(EXTRA_libslurm_la_DEPENDENCIES) $(libslurm_la_LINK) -rpath $(libdir) $(libslurm_la_OBJECTS) $(libslurm_la_LIBADD) $(LIBS) -libslurmhelper.la: $(libslurmhelper_la_OBJECTS) $(libslurmhelper_la_DEPENDENCIES) +libslurmhelper.la: $(libslurmhelper_la_OBJECTS) $(libslurmhelper_la_DEPENDENCIES) $(EXTRA_libslurmhelper_la_DEPENDENCIES) $(LINK) $(libslurmhelper_la_OBJECTS) $(libslurmhelper_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -769,10 +775,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/common/Makefile.in b/src/common/Makefile.in index f5c186616a..e61fdec02e 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -579,13 +579,13 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) +libcommon.la: $(libcommon_la_OBJECTS) $(libcommon_la_DEPENDENCIES) $(EXTRA_libcommon_la_DEPENDENCIES) $(libcommon_la_LINK) $(libcommon_la_OBJECTS) $(libcommon_la_LIBADD) $(LIBS) -libdaemonize.la: $(libdaemonize_la_OBJECTS) $(libdaemonize_la_DEPENDENCIES) +libdaemonize.la: $(libdaemonize_la_OBJECTS) $(libdaemonize_la_DEPENDENCIES) $(EXTRA_libdaemonize_la_DEPENDENCIES) $(LINK) $(libdaemonize_la_OBJECTS) $(libdaemonize_la_LIBADD) $(LIBS) -libeio.la: $(libeio_la_OBJECTS) $(libeio_la_DEPENDENCIES) +libeio.la: $(libeio_la_OBJECTS) $(libeio_la_DEPENDENCIES) $(EXTRA_libeio_la_DEPENDENCIES) $(LINK) $(libeio_la_OBJECTS) $(libeio_la_LIBADD) $(LIBS) -libspank.la: $(libspank_la_OBJECTS) $(libspank_la_DEPENDENCIES) +libspank.la: $(libspank_la_OBJECTS) $(libspank_la_DEPENDENCIES) $(EXTRA_libspank_la_DEPENDENCIES) $(LINK) $(libspank_la_OBJECTS) $(libspank_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -802,10 +802,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/database/Makefile.in b/src/database/Makefile.in index d4af511235..614899c33b 100644 --- a/src/database/Makefile.in +++ b/src/database/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -397,9 +397,9 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libslurm_mysql.la: $(libslurm_mysql_la_OBJECTS) $(libslurm_mysql_la_DEPENDENCIES) +libslurm_mysql.la: $(libslurm_mysql_la_OBJECTS) $(libslurm_mysql_la_DEPENDENCIES) $(EXTRA_libslurm_mysql_la_DEPENDENCIES) $(libslurm_mysql_la_LINK) $(am_libslurm_mysql_la_rpath) $(libslurm_mysql_la_OBJECTS) $(libslurm_mysql_la_LIBADD) $(LIBS) -libslurm_pgsql.la: $(libslurm_pgsql_la_OBJECTS) $(libslurm_pgsql_la_DEPENDENCIES) +libslurm_pgsql.la: $(libslurm_pgsql_la_OBJECTS) $(libslurm_pgsql_la_DEPENDENCIES) $(EXTRA_libslurm_pgsql_la_DEPENDENCIES) $(libslurm_pgsql_la_LINK) $(am_libslurm_pgsql_la_rpath) $(libslurm_pgsql_la_OBJECTS) $(libslurm_pgsql_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/db_api/Makefile.in b/src/db_api/Makefile.in index 21f0c25af6..fe2d44366c 100644 --- a/src/db_api/Makefile.in +++ b/src/db_api/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -108,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libslurmdb_la_DEPENDENCIES = \ @@ -488,7 +494,7 @@ clean-libLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libslurmdb.la: $(libslurmdb_la_OBJECTS) $(libslurmdb_la_DEPENDENCIES) +libslurmdb.la: $(libslurmdb_la_OBJECTS) $(libslurmdb_la_DEPENDENCIES) $(EXTRA_libslurmdb_la_DEPENDENCIES) $(libslurmdb_la_LINK) -rpath $(libdir) $(libslurmdb_la_OBJECTS) $(libslurmdb_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -650,10 +656,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/Makefile.in b/src/plugins/Makefile.in index 217dd8885d..db6f7361dc 100644 --- a/src/plugins/Makefile.in +++ b/src/plugins/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -592,10 +592,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/Makefile.in b/src/plugins/accounting_storage/Makefile.in index 4d6bf1158c..ecd598adef 100644 --- a/src/plugins/accounting_storage/Makefile.in +++ b/src/plugins/accounting_storage/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/common/Makefile.in b/src/plugins/accounting_storage/common/Makefile.in index e64146f638..f673163812 100644 --- a/src/plugins/accounting_storage/common/Makefile.in +++ b/src/plugins/accounting_storage/common/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -360,7 +360,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libaccounting_storage_common.la: $(libaccounting_storage_common_la_OBJECTS) $(libaccounting_storage_common_la_DEPENDENCIES) +libaccounting_storage_common.la: $(libaccounting_storage_common_la_OBJECTS) $(libaccounting_storage_common_la_DEPENDENCIES) $(EXTRA_libaccounting_storage_common_la_DEPENDENCIES) $(LINK) $(libaccounting_storage_common_la_OBJECTS) $(libaccounting_storage_common_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -494,10 +494,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/filetxt/Makefile.in b/src/plugins/accounting_storage/filetxt/Makefile.in index b1d7e09aff..487a2caf5a 100644 --- a/src/plugins/accounting_storage/filetxt/Makefile.in +++ b/src/plugins/accounting_storage/filetxt/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) accounting_storage_filetxt_la_LIBADD = @@ -408,7 +414,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -accounting_storage_filetxt.la: $(accounting_storage_filetxt_la_OBJECTS) $(accounting_storage_filetxt_la_DEPENDENCIES) +accounting_storage_filetxt.la: $(accounting_storage_filetxt_la_OBJECTS) $(accounting_storage_filetxt_la_DEPENDENCIES) $(EXTRA_accounting_storage_filetxt_la_DEPENDENCIES) $(accounting_storage_filetxt_la_LINK) -rpath $(pkglibdir) $(accounting_storage_filetxt_la_OBJECTS) $(accounting_storage_filetxt_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -546,10 +552,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/mysql/Makefile.in b/src/plugins/accounting_storage/mysql/Makefile.in index de9722ecc4..99734616b6 100644 --- a/src/plugins/accounting_storage/mysql/Makefile.in +++ b/src/plugins/accounting_storage/mysql/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -481,7 +487,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -accounting_storage_mysql.la: $(accounting_storage_mysql_la_OBJECTS) $(accounting_storage_mysql_la_DEPENDENCIES) +accounting_storage_mysql.la: $(accounting_storage_mysql_la_OBJECTS) $(accounting_storage_mysql_la_DEPENDENCIES) $(EXTRA_accounting_storage_mysql_la_DEPENDENCIES) $(accounting_storage_mysql_la_LINK) $(am_accounting_storage_mysql_la_rpath) $(accounting_storage_mysql_la_OBJECTS) $(accounting_storage_mysql_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -745,10 +751,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/none/Makefile.in b/src/plugins/accounting_storage/none/Makefile.in index 0632554f4b..99887758cd 100644 --- a/src/plugins/accounting_storage/none/Makefile.in +++ b/src/plugins/accounting_storage/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) accounting_storage_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -accounting_storage_none.la: $(accounting_storage_none_la_OBJECTS) $(accounting_storage_none_la_DEPENDENCIES) +accounting_storage_none.la: $(accounting_storage_none_la_OBJECTS) $(accounting_storage_none_la_DEPENDENCIES) $(EXTRA_accounting_storage_none_la_DEPENDENCIES) $(accounting_storage_none_la_LINK) -rpath $(pkglibdir) $(accounting_storage_none_la_OBJECTS) $(accounting_storage_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/pgsql/Makefile.in b/src/plugins/accounting_storage/pgsql/Makefile.in index 18cc5c99e2..4346d33b73 100644 --- a/src/plugins/accounting_storage/pgsql/Makefile.in +++ b/src/plugins/accounting_storage/pgsql/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -477,7 +483,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -accounting_storage_pgsql.la: $(accounting_storage_pgsql_la_OBJECTS) $(accounting_storage_pgsql_la_DEPENDENCIES) +accounting_storage_pgsql.la: $(accounting_storage_pgsql_la_OBJECTS) $(accounting_storage_pgsql_la_DEPENDENCIES) $(EXTRA_accounting_storage_pgsql_la_DEPENDENCIES) $(accounting_storage_pgsql_la_LINK) $(am_accounting_storage_pgsql_la_rpath) $(accounting_storage_pgsql_la_OBJECTS) $(accounting_storage_pgsql_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -749,10 +755,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/accounting_storage/slurmdbd/Makefile.in b/src/plugins/accounting_storage/slurmdbd/Makefile.in index ff99cd8b1c..be7edd60f8 100644 --- a/src/plugins/accounting_storage/slurmdbd/Makefile.in +++ b/src/plugins/accounting_storage/slurmdbd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) accounting_storage_slurmdbd_la_LIBADD = @@ -408,7 +414,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -accounting_storage_slurmdbd.la: $(accounting_storage_slurmdbd_la_OBJECTS) $(accounting_storage_slurmdbd_la_DEPENDENCIES) +accounting_storage_slurmdbd.la: $(accounting_storage_slurmdbd_la_OBJECTS) $(accounting_storage_slurmdbd_la_DEPENDENCIES) $(EXTRA_accounting_storage_slurmdbd_la_DEPENDENCIES) $(accounting_storage_slurmdbd_la_LINK) -rpath $(pkglibdir) $(accounting_storage_slurmdbd_la_OBJECTS) $(accounting_storage_slurmdbd_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -545,10 +551,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/auth/Makefile.in b/src/plugins/auth/Makefile.in index 5cd8e7a9cd..4449a02ba4 100644 --- a/src/plugins/auth/Makefile.in +++ b/src/plugins/auth/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/auth/authd/Makefile.in b/src/plugins/auth/authd/Makefile.in index d51ab4ba32..62c7aa1df3 100644 --- a/src/plugins/auth/authd/Makefile.in +++ b/src/plugins/auth/authd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) auth_authd_la_DEPENDENCIES = @@ -410,7 +416,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -auth_authd.la: $(auth_authd_la_OBJECTS) $(auth_authd_la_DEPENDENCIES) +auth_authd.la: $(auth_authd_la_OBJECTS) $(auth_authd_la_DEPENDENCIES) $(EXTRA_auth_authd_la_DEPENDENCIES) $(auth_authd_la_LINK) $(am_auth_authd_la_rpath) $(auth_authd_la_OBJECTS) $(auth_authd_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -547,10 +553,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/auth/munge/Makefile.in b/src/plugins/auth/munge/Makefile.in index bbbd6aabec..6d0734f9da 100644 --- a/src/plugins/auth/munge/Makefile.in +++ b/src/plugins/auth/munge/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -411,7 +417,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -auth_munge.la: $(auth_munge_la_OBJECTS) $(auth_munge_la_DEPENDENCIES) +auth_munge.la: $(auth_munge_la_OBJECTS) $(auth_munge_la_DEPENDENCIES) $(EXTRA_auth_munge_la_DEPENDENCIES) $(auth_munge_la_LINK) $(am_auth_munge_la_rpath) $(auth_munge_la_OBJECTS) $(auth_munge_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/auth/none/Makefile.in b/src/plugins/auth/none/Makefile.in index 965da73d8c..d97618f6bd 100644 --- a/src/plugins/auth/none/Makefile.in +++ b/src/plugins/auth/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) auth_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -auth_none.la: $(auth_none_la_OBJECTS) $(auth_none_la_DEPENDENCIES) +auth_none.la: $(auth_none_la_OBJECTS) $(auth_none_la_DEPENDENCIES) $(EXTRA_auth_none_la_DEPENDENCIES) $(auth_none_la_LINK) -rpath $(pkglibdir) $(auth_none_la_OBJECTS) $(auth_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/checkpoint/Makefile.in b/src/plugins/checkpoint/Makefile.in index 34843c607f..7db2b9890b 100644 --- a/src/plugins/checkpoint/Makefile.in +++ b/src/plugins/checkpoint/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/checkpoint/aix/Makefile.in b/src/plugins/checkpoint/aix/Makefile.in index 95e36e5fd2..5814f1a12b 100644 --- a/src/plugins/checkpoint/aix/Makefile.in +++ b/src/plugins/checkpoint/aix/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) checkpoint_aix_la_LIBADD = @@ -411,7 +417,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -checkpoint_aix.la: $(checkpoint_aix_la_OBJECTS) $(checkpoint_aix_la_DEPENDENCIES) +checkpoint_aix.la: $(checkpoint_aix_la_OBJECTS) $(checkpoint_aix_la_DEPENDENCIES) $(EXTRA_checkpoint_aix_la_DEPENDENCIES) $(checkpoint_aix_la_LINK) $(am_checkpoint_aix_la_rpath) $(checkpoint_aix_la_OBJECTS) $(checkpoint_aix_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/checkpoint/blcr/Makefile.in b/src/plugins/checkpoint/blcr/Makefile.in index 8de221098c..de55f37434 100644 --- a/src/plugins/checkpoint/blcr/Makefile.in +++ b/src/plugins/checkpoint/blcr/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -108,6 +108,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" \ "$(DESTDIR)$(pkglibexecdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) @@ -422,7 +428,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -checkpoint_blcr.la: $(checkpoint_blcr_la_OBJECTS) $(checkpoint_blcr_la_DEPENDENCIES) +checkpoint_blcr.la: $(checkpoint_blcr_la_OBJECTS) $(checkpoint_blcr_la_DEPENDENCIES) $(EXTRA_checkpoint_blcr_la_DEPENDENCIES) $(checkpoint_blcr_la_LINK) $(am_checkpoint_blcr_la_rpath) $(checkpoint_blcr_la_OBJECTS) $(checkpoint_blcr_la_LIBADD) $(LIBS) install-dist_pkglibexecSCRIPTS: $(dist_pkglibexec_SCRIPTS) @$(NORMAL_INSTALL) @@ -455,9 +461,7 @@ uninstall-dist_pkglibexecSCRIPTS: @list='$(dist_pkglibexec_SCRIPTS)'; test -n "$(pkglibexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkglibexecdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkglibexecdir)" && rm -f $$files + dir='$(DESTDIR)$(pkglibexecdir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -593,10 +597,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/checkpoint/none/Makefile.in b/src/plugins/checkpoint/none/Makefile.in index 6554212162..7dbfc2e60a 100644 --- a/src/plugins/checkpoint/none/Makefile.in +++ b/src/plugins/checkpoint/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) checkpoint_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -checkpoint_none.la: $(checkpoint_none_la_OBJECTS) $(checkpoint_none_la_DEPENDENCIES) +checkpoint_none.la: $(checkpoint_none_la_OBJECTS) $(checkpoint_none_la_DEPENDENCIES) $(EXTRA_checkpoint_none_la_DEPENDENCIES) $(checkpoint_none_la_LINK) -rpath $(pkglibdir) $(checkpoint_none_la_OBJECTS) $(checkpoint_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/checkpoint/ompi/Makefile.in b/src/plugins/checkpoint/ompi/Makefile.in index 3292228331..d943b5fc99 100644 --- a/src/plugins/checkpoint/ompi/Makefile.in +++ b/src/plugins/checkpoint/ompi/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) checkpoint_ompi_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -checkpoint_ompi.la: $(checkpoint_ompi_la_OBJECTS) $(checkpoint_ompi_la_DEPENDENCIES) +checkpoint_ompi.la: $(checkpoint_ompi_la_OBJECTS) $(checkpoint_ompi_la_DEPENDENCIES) $(EXTRA_checkpoint_ompi_la_DEPENDENCIES) $(checkpoint_ompi_la_LINK) -rpath $(pkglibdir) $(checkpoint_ompi_la_OBJECTS) $(checkpoint_ompi_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/crypto/Makefile.in b/src/plugins/crypto/Makefile.in index ac81cc766e..24378f3d71 100644 --- a/src/plugins/crypto/Makefile.in +++ b/src/plugins/crypto/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/crypto/munge/Makefile.in b/src/plugins/crypto/munge/Makefile.in index bf4c4046a0..39065694b6 100644 --- a/src/plugins/crypto/munge/Makefile.in +++ b/src/plugins/crypto/munge/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -411,7 +417,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -crypto_munge.la: $(crypto_munge_la_OBJECTS) $(crypto_munge_la_DEPENDENCIES) +crypto_munge.la: $(crypto_munge_la_OBJECTS) $(crypto_munge_la_DEPENDENCIES) $(EXTRA_crypto_munge_la_DEPENDENCIES) $(crypto_munge_la_LINK) $(am_crypto_munge_la_rpath) $(crypto_munge_la_OBJECTS) $(crypto_munge_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/crypto/openssl/Makefile.in b/src/plugins/crypto/openssl/Makefile.in index 5e04c2ab5f..1a8b003d35 100644 --- a/src/plugins/crypto/openssl/Makefile.in +++ b/src/plugins/crypto/openssl/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -414,7 +420,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -crypto_openssl.la: $(crypto_openssl_la_OBJECTS) $(crypto_openssl_la_DEPENDENCIES) +crypto_openssl.la: $(crypto_openssl_la_OBJECTS) $(crypto_openssl_la_DEPENDENCIES) $(EXTRA_crypto_openssl_la_DEPENDENCIES) $(crypto_openssl_la_LINK) $(am_crypto_openssl_la_rpath) $(crypto_openssl_la_OBJECTS) $(crypto_openssl_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -551,10 +557,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/gres/Makefile.in b/src/plugins/gres/Makefile.in index 93dbd07f26..942524d65e 100644 --- a/src/plugins/gres/Makefile.in +++ b/src/plugins/gres/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/gres/gpu/Makefile.in b/src/plugins/gres/gpu/Makefile.in index 017a280257..c6687ee3f0 100644 --- a/src/plugins/gres/gpu/Makefile.in +++ b/src/plugins/gres/gpu/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -gres_gpu.la: $(gres_gpu_la_OBJECTS) $(gres_gpu_la_DEPENDENCIES) +gres_gpu.la: $(gres_gpu_la_OBJECTS) $(gres_gpu_la_DEPENDENCIES) $(EXTRA_gres_gpu_la_DEPENDENCIES) $(gres_gpu_la_LINK) -rpath $(pkglibdir) $(gres_gpu_la_OBJECTS) $(gres_gpu_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -544,10 +550,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/gres/nic/Makefile.in b/src/plugins/gres/nic/Makefile.in index 79e5ca9e21..0248e206f5 100644 --- a/src/plugins/gres/nic/Makefile.in +++ b/src/plugins/gres/nic/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -gres_nic.la: $(gres_nic_la_OBJECTS) $(gres_nic_la_DEPENDENCIES) +gres_nic.la: $(gres_nic_la_OBJECTS) $(gres_nic_la_DEPENDENCIES) $(EXTRA_gres_nic_la_DEPENDENCIES) $(gres_nic_la_LINK) -rpath $(pkglibdir) $(gres_nic_la_OBJECTS) $(gres_nic_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -544,10 +550,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/Makefile.in b/src/plugins/job_submit/Makefile.in index 6926be1531..6f36edd91c 100644 --- a/src/plugins/job_submit/Makefile.in +++ b/src/plugins/job_submit/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/cnode/Makefile.in b/src/plugins/job_submit/cnode/Makefile.in index 14424c4809..5ae2f7d0ce 100644 --- a/src/plugins/job_submit/cnode/Makefile.in +++ b/src/plugins/job_submit/cnode/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) job_submit_cnode_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -job_submit_cnode.la: $(job_submit_cnode_la_OBJECTS) $(job_submit_cnode_la_DEPENDENCIES) +job_submit_cnode.la: $(job_submit_cnode_la_OBJECTS) $(job_submit_cnode_la_DEPENDENCIES) $(EXTRA_job_submit_cnode_la_DEPENDENCIES) $(job_submit_cnode_la_LINK) -rpath $(pkglibdir) $(job_submit_cnode_la_OBJECTS) $(job_submit_cnode_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/defaults/Makefile.in b/src/plugins/job_submit/defaults/Makefile.in index 322cd59d43..b3ea82d5fd 100644 --- a/src/plugins/job_submit/defaults/Makefile.in +++ b/src/plugins/job_submit/defaults/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) job_submit_defaults_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -job_submit_defaults.la: $(job_submit_defaults_la_OBJECTS) $(job_submit_defaults_la_DEPENDENCIES) +job_submit_defaults.la: $(job_submit_defaults_la_OBJECTS) $(job_submit_defaults_la_DEPENDENCIES) $(EXTRA_job_submit_defaults_la_DEPENDENCIES) $(job_submit_defaults_la_LINK) -rpath $(pkglibdir) $(job_submit_defaults_la_OBJECTS) $(job_submit_defaults_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/logging/Makefile.in b/src/plugins/job_submit/logging/Makefile.in index 2c138b9206..70f57dea76 100644 --- a/src/plugins/job_submit/logging/Makefile.in +++ b/src/plugins/job_submit/logging/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) job_submit_logging_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -job_submit_logging.la: $(job_submit_logging_la_OBJECTS) $(job_submit_logging_la_DEPENDENCIES) +job_submit_logging.la: $(job_submit_logging_la_OBJECTS) $(job_submit_logging_la_DEPENDENCIES) $(EXTRA_job_submit_logging_la_DEPENDENCIES) $(job_submit_logging_la_LINK) -rpath $(pkglibdir) $(job_submit_logging_la_OBJECTS) $(job_submit_logging_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/lua/Makefile.in b/src/plugins/job_submit/lua/Makefile.in index 6f99782870..d3eb3fdada 100644 --- a/src/plugins/job_submit/lua/Makefile.in +++ b/src/plugins/job_submit/lua/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) job_submit_lua_la_LIBADD = @@ -412,7 +418,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -job_submit_lua.la: $(job_submit_lua_la_OBJECTS) $(job_submit_lua_la_DEPENDENCIES) +job_submit_lua.la: $(job_submit_lua_la_OBJECTS) $(job_submit_lua_la_DEPENDENCIES) $(EXTRA_job_submit_lua_la_DEPENDENCIES) $(job_submit_lua_la_LINK) $(am_job_submit_lua_la_rpath) $(job_submit_lua_la_OBJECTS) $(job_submit_lua_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -549,10 +555,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/job_submit/partition/Makefile.in b/src/plugins/job_submit/partition/Makefile.in index 237d27251b..c71c407907 100644 --- a/src/plugins/job_submit/partition/Makefile.in +++ b/src/plugins/job_submit/partition/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) job_submit_partition_la_LIBADD = @@ -406,7 +412,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -job_submit_partition.la: $(job_submit_partition_la_OBJECTS) $(job_submit_partition_la_DEPENDENCIES) +job_submit_partition.la: $(job_submit_partition_la_OBJECTS) $(job_submit_partition_la_DEPENDENCIES) $(EXTRA_job_submit_partition_la_DEPENDENCIES) $(job_submit_partition_la_LINK) -rpath $(pkglibdir) $(job_submit_partition_la_OBJECTS) $(job_submit_partition_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -543,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobacct_gather/Makefile.in b/src/plugins/jobacct_gather/Makefile.in index 5a11651a22..2bd3b1857f 100644 --- a/src/plugins/jobacct_gather/Makefile.in +++ b/src/plugins/jobacct_gather/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobacct_gather/aix/Makefile.in b/src/plugins/jobacct_gather/aix/Makefile.in index c399b5ca9f..af422b2192 100644 --- a/src/plugins/jobacct_gather/aix/Makefile.in +++ b/src/plugins/jobacct_gather/aix/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobacct_gather_aix_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobacct_gather_aix.la: $(jobacct_gather_aix_la_OBJECTS) $(jobacct_gather_aix_la_DEPENDENCIES) +jobacct_gather_aix.la: $(jobacct_gather_aix_la_OBJECTS) $(jobacct_gather_aix_la_DEPENDENCIES) $(EXTRA_jobacct_gather_aix_la_DEPENDENCIES) $(jobacct_gather_aix_la_LINK) -rpath $(pkglibdir) $(jobacct_gather_aix_la_OBJECTS) $(jobacct_gather_aix_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobacct_gather/cgroup/Makefile.in b/src/plugins/jobacct_gather/cgroup/Makefile.in index 53e4a68cde..9fa1896790 100644 --- a/src/plugins/jobacct_gather/cgroup/Makefile.in +++ b/src/plugins/jobacct_gather/cgroup/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobacct_gather_cgroup_la_LIBADD = @@ -412,7 +418,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobacct_gather_cgroup.la: $(jobacct_gather_cgroup_la_OBJECTS) $(jobacct_gather_cgroup_la_DEPENDENCIES) +jobacct_gather_cgroup.la: $(jobacct_gather_cgroup_la_OBJECTS) $(jobacct_gather_cgroup_la_DEPENDENCIES) $(EXTRA_jobacct_gather_cgroup_la_DEPENDENCIES) $(jobacct_gather_cgroup_la_LINK) -rpath $(pkglibdir) $(jobacct_gather_cgroup_la_OBJECTS) $(jobacct_gather_cgroup_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -551,10 +557,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobacct_gather/linux/Makefile.in b/src/plugins/jobacct_gather/linux/Makefile.in index 3c761831e3..b0f32a667a 100644 --- a/src/plugins/jobacct_gather/linux/Makefile.in +++ b/src/plugins/jobacct_gather/linux/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobacct_gather_linux_la_LIBADD = @@ -406,7 +412,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobacct_gather_linux.la: $(jobacct_gather_linux_la_OBJECTS) $(jobacct_gather_linux_la_DEPENDENCIES) +jobacct_gather_linux.la: $(jobacct_gather_linux_la_OBJECTS) $(jobacct_gather_linux_la_DEPENDENCIES) $(EXTRA_jobacct_gather_linux_la_DEPENDENCIES) $(jobacct_gather_linux_la_LINK) -rpath $(pkglibdir) $(jobacct_gather_linux_la_OBJECTS) $(jobacct_gather_linux_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -543,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobacct_gather/none/Makefile.in b/src/plugins/jobacct_gather/none/Makefile.in index 81b25e2896..2e56e3892d 100644 --- a/src/plugins/jobacct_gather/none/Makefile.in +++ b/src/plugins/jobacct_gather/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobacct_gather_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobacct_gather_none.la: $(jobacct_gather_none_la_OBJECTS) $(jobacct_gather_none_la_DEPENDENCIES) +jobacct_gather_none.la: $(jobacct_gather_none_la_OBJECTS) $(jobacct_gather_none_la_DEPENDENCIES) $(EXTRA_jobacct_gather_none_la_DEPENDENCIES) $(jobacct_gather_none_la_LINK) -rpath $(pkglibdir) $(jobacct_gather_none_la_OBJECTS) $(jobacct_gather_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/Makefile.in b/src/plugins/jobcomp/Makefile.in index dc5d90ca64..59762412c9 100644 --- a/src/plugins/jobcomp/Makefile.in +++ b/src/plugins/jobcomp/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/filetxt/Makefile.in b/src/plugins/jobcomp/filetxt/Makefile.in index 0f0f1d418b..50557f92c2 100644 --- a/src/plugins/jobcomp/filetxt/Makefile.in +++ b/src/plugins/jobcomp/filetxt/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobcomp_filetxt_la_LIBADD = @@ -408,7 +414,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobcomp_filetxt.la: $(jobcomp_filetxt_la_OBJECTS) $(jobcomp_filetxt_la_DEPENDENCIES) +jobcomp_filetxt.la: $(jobcomp_filetxt_la_OBJECTS) $(jobcomp_filetxt_la_DEPENDENCIES) $(EXTRA_jobcomp_filetxt_la_DEPENDENCIES) $(jobcomp_filetxt_la_LINK) -rpath $(pkglibdir) $(jobcomp_filetxt_la_OBJECTS) $(jobcomp_filetxt_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -546,10 +552,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/mysql/Makefile.in b/src/plugins/jobcomp/mysql/Makefile.in index 41200bd90d..ec8b9303e6 100644 --- a/src/plugins/jobcomp/mysql/Makefile.in +++ b/src/plugins/jobcomp/mysql/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -424,7 +430,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobcomp_mysql.la: $(jobcomp_mysql_la_OBJECTS) $(jobcomp_mysql_la_DEPENDENCIES) +jobcomp_mysql.la: $(jobcomp_mysql_la_OBJECTS) $(jobcomp_mysql_la_DEPENDENCIES) $(EXTRA_jobcomp_mysql_la_DEPENDENCIES) $(jobcomp_mysql_la_LINK) $(am_jobcomp_mysql_la_rpath) $(jobcomp_mysql_la_OBJECTS) $(jobcomp_mysql_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -576,10 +582,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/none/Makefile.in b/src/plugins/jobcomp/none/Makefile.in index 56d8b36a25..0fbc6f2739 100644 --- a/src/plugins/jobcomp/none/Makefile.in +++ b/src/plugins/jobcomp/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobcomp_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobcomp_none.la: $(jobcomp_none_la_OBJECTS) $(jobcomp_none_la_DEPENDENCIES) +jobcomp_none.la: $(jobcomp_none_la_OBJECTS) $(jobcomp_none_la_DEPENDENCIES) $(EXTRA_jobcomp_none_la_DEPENDENCIES) $(jobcomp_none_la_LINK) -rpath $(pkglibdir) $(jobcomp_none_la_OBJECTS) $(jobcomp_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/pgsql/Makefile.in b/src/plugins/jobcomp/pgsql/Makefile.in index 1fc1781a58..2cb35597b6 100644 --- a/src/plugins/jobcomp/pgsql/Makefile.in +++ b/src/plugins/jobcomp/pgsql/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -425,7 +431,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobcomp_pgsql.la: $(jobcomp_pgsql_la_OBJECTS) $(jobcomp_pgsql_la_DEPENDENCIES) +jobcomp_pgsql.la: $(jobcomp_pgsql_la_OBJECTS) $(jobcomp_pgsql_la_DEPENDENCIES) $(EXTRA_jobcomp_pgsql_la_DEPENDENCIES) $(jobcomp_pgsql_la_LINK) $(am_jobcomp_pgsql_la_rpath) $(jobcomp_pgsql_la_OBJECTS) $(jobcomp_pgsql_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -577,10 +583,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/jobcomp/script/Makefile.in b/src/plugins/jobcomp/script/Makefile.in index e468efff95..ea887a6e1c 100644 --- a/src/plugins/jobcomp/script/Makefile.in +++ b/src/plugins/jobcomp/script/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) jobcomp_script_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -jobcomp_script.la: $(jobcomp_script_la_OBJECTS) $(jobcomp_script_la_DEPENDENCIES) +jobcomp_script.la: $(jobcomp_script_la_OBJECTS) $(jobcomp_script_la_DEPENDENCIES) $(EXTRA_jobcomp_script_la_DEPENDENCIES) $(jobcomp_script_la_LINK) -rpath $(pkglibdir) $(jobcomp_script_la_OBJECTS) $(jobcomp_script_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/Makefile.in b/src/plugins/mpi/Makefile.in index 727a2c4198..04840fe7ed 100644 --- a/src/plugins/mpi/Makefile.in +++ b/src/plugins/mpi/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/lam/Makefile.in b/src/plugins/mpi/lam/Makefile.in index 2db73fb4a4..77fc4cba49 100644 --- a/src/plugins/mpi/lam/Makefile.in +++ b/src/plugins/mpi/lam/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_lam_la_LIBADD = @@ -403,7 +409,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_lam.la: $(mpi_lam_la_OBJECTS) $(mpi_lam_la_DEPENDENCIES) +mpi_lam.la: $(mpi_lam_la_OBJECTS) $(mpi_lam_la_DEPENDENCIES) $(EXTRA_mpi_lam_la_DEPENDENCIES) $(mpi_lam_la_LINK) -rpath $(pkglibdir) $(mpi_lam_la_OBJECTS) $(mpi_lam_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -540,10 +546,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/mpich1_p4/Makefile.in b/src/plugins/mpi/mpich1_p4/Makefile.in index 9ae5a4dcd6..48f737c405 100644 --- a/src/plugins/mpi/mpich1_p4/Makefile.in +++ b/src/plugins/mpi/mpich1_p4/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_mpich1_p4_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_mpich1_p4.la: $(mpi_mpich1_p4_la_OBJECTS) $(mpi_mpich1_p4_la_DEPENDENCIES) +mpi_mpich1_p4.la: $(mpi_mpich1_p4_la_OBJECTS) $(mpi_mpich1_p4_la_DEPENDENCIES) $(EXTRA_mpi_mpich1_p4_la_DEPENDENCIES) $(mpi_mpich1_p4_la_LINK) -rpath $(pkglibdir) $(mpi_mpich1_p4_la_OBJECTS) $(mpi_mpich1_p4_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/mpich1_shmem/Makefile.in b/src/plugins/mpi/mpich1_shmem/Makefile.in index e7ff210e99..cf99428c2a 100644 --- a/src/plugins/mpi/mpich1_shmem/Makefile.in +++ b/src/plugins/mpi/mpich1_shmem/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_mpich1_shmem_la_LIBADD = @@ -403,7 +409,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_mpich1_shmem.la: $(mpi_mpich1_shmem_la_OBJECTS) $(mpi_mpich1_shmem_la_DEPENDENCIES) +mpi_mpich1_shmem.la: $(mpi_mpich1_shmem_la_OBJECTS) $(mpi_mpich1_shmem_la_DEPENDENCIES) $(EXTRA_mpi_mpich1_shmem_la_DEPENDENCIES) $(mpi_mpich1_shmem_la_LINK) -rpath $(pkglibdir) $(mpi_mpich1_shmem_la_OBJECTS) $(mpi_mpich1_shmem_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -540,10 +546,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/mpichgm/Makefile.in b/src/plugins/mpi/mpichgm/Makefile.in index ba876e9b25..bfe4e6f3fc 100644 --- a/src/plugins/mpi/mpichgm/Makefile.in +++ b/src/plugins/mpi/mpichgm/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_mpichgm_la_LIBADD = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_mpichgm.la: $(mpi_mpichgm_la_OBJECTS) $(mpi_mpichgm_la_DEPENDENCIES) +mpi_mpichgm.la: $(mpi_mpichgm_la_OBJECTS) $(mpi_mpichgm_la_DEPENDENCIES) $(EXTRA_mpi_mpichgm_la_DEPENDENCIES) $(mpi_mpichgm_la_LINK) -rpath $(pkglibdir) $(mpi_mpichgm_la_OBJECTS) $(mpi_mpichgm_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -545,10 +551,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/mpichmx/Makefile.in b/src/plugins/mpi/mpichmx/Makefile.in index 6ee7f5c78e..72a83229e1 100644 --- a/src/plugins/mpi/mpichmx/Makefile.in +++ b/src/plugins/mpi/mpichmx/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_mpichmx_la_LIBADD = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_mpichmx.la: $(mpi_mpichmx_la_OBJECTS) $(mpi_mpichmx_la_DEPENDENCIES) +mpi_mpichmx.la: $(mpi_mpichmx_la_OBJECTS) $(mpi_mpichmx_la_DEPENDENCIES) $(EXTRA_mpi_mpichmx_la_DEPENDENCIES) $(mpi_mpichmx_la_LINK) -rpath $(pkglibdir) $(mpi_mpichmx_la_OBJECTS) $(mpi_mpichmx_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -545,10 +551,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/mvapich/Makefile.in b/src/plugins/mpi/mvapich/Makefile.in index 0d4c6753ee..34d9c2e0dd 100644 --- a/src/plugins/mpi/mvapich/Makefile.in +++ b/src/plugins/mpi/mvapich/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_mvapich_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_mvapich.la: $(mpi_mvapich_la_OBJECTS) $(mpi_mvapich_la_DEPENDENCIES) +mpi_mvapich.la: $(mpi_mvapich_la_OBJECTS) $(mpi_mvapich_la_DEPENDENCIES) $(EXTRA_mpi_mvapich_la_DEPENDENCIES) $(mpi_mvapich_la_LINK) -rpath $(pkglibdir) $(mpi_mvapich_la_OBJECTS) $(mpi_mvapich_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -543,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/none/Makefile.in b/src/plugins/mpi/none/Makefile.in index c43638b34f..dcb29af6df 100644 --- a/src/plugins/mpi/none/Makefile.in +++ b/src/plugins/mpi/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_none.la: $(mpi_none_la_OBJECTS) $(mpi_none_la_DEPENDENCIES) +mpi_none.la: $(mpi_none_la_OBJECTS) $(mpi_none_la_DEPENDENCIES) $(EXTRA_mpi_none_la_DEPENDENCIES) $(mpi_none_la_LINK) -rpath $(pkglibdir) $(mpi_none_la_OBJECTS) $(mpi_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/openmpi/Makefile.in b/src/plugins/mpi/openmpi/Makefile.in index 2077aff905..a0a43784d2 100644 --- a/src/plugins/mpi/openmpi/Makefile.in +++ b/src/plugins/mpi/openmpi/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_openmpi_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_openmpi.la: $(mpi_openmpi_la_OBJECTS) $(mpi_openmpi_la_DEPENDENCIES) +mpi_openmpi.la: $(mpi_openmpi_la_OBJECTS) $(mpi_openmpi_la_DEPENDENCIES) $(EXTRA_mpi_openmpi_la_DEPENDENCIES) $(mpi_openmpi_la_LINK) -rpath $(pkglibdir) $(mpi_openmpi_la_OBJECTS) $(mpi_openmpi_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/mpi/pmi2/Makefile.in b/src/plugins/mpi/pmi2/Makefile.in index 0e7af1a3ec..99779374ee 100644 --- a/src/plugins/mpi/pmi2/Makefile.in +++ b/src/plugins/mpi/pmi2/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) mpi_pmi2_la_LIBADD = @@ -416,7 +422,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -mpi_pmi2.la: $(mpi_pmi2_la_OBJECTS) $(mpi_pmi2_la_DEPENDENCIES) +mpi_pmi2.la: $(mpi_pmi2_la_OBJECTS) $(mpi_pmi2_la_DEPENDENCIES) $(EXTRA_mpi_pmi2_la_DEPENDENCIES) $(mpi_pmi2_la_LINK) -rpath $(pkglibdir) $(mpi_pmi2_la_OBJECTS) $(mpi_pmi2_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -570,10 +576,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/preempt/Makefile.in b/src/plugins/preempt/Makefile.in index 2fc0264575..0e8438f26d 100644 --- a/src/plugins/preempt/Makefile.in +++ b/src/plugins/preempt/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/preempt/none/Makefile.in b/src/plugins/preempt/none/Makefile.in index 96a1cf942f..50ab9fb094 100644 --- a/src/plugins/preempt/none/Makefile.in +++ b/src/plugins/preempt/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) preempt_none_la_LIBADD = @@ -403,7 +409,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -preempt_none.la: $(preempt_none_la_OBJECTS) $(preempt_none_la_DEPENDENCIES) +preempt_none.la: $(preempt_none_la_OBJECTS) $(preempt_none_la_DEPENDENCIES) $(EXTRA_preempt_none_la_DEPENDENCIES) $(preempt_none_la_LINK) -rpath $(pkglibdir) $(preempt_none_la_OBJECTS) $(preempt_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -540,10 +546,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/preempt/partition_prio/Makefile.in b/src/plugins/preempt/partition_prio/Makefile.in index 3f2b76b4ec..d8db9ad274 100644 --- a/src/plugins/preempt/partition_prio/Makefile.in +++ b/src/plugins/preempt/partition_prio/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) preempt_partition_prio_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -preempt_partition_prio.la: $(preempt_partition_prio_la_OBJECTS) $(preempt_partition_prio_la_DEPENDENCIES) +preempt_partition_prio.la: $(preempt_partition_prio_la_OBJECTS) $(preempt_partition_prio_la_DEPENDENCIES) $(EXTRA_preempt_partition_prio_la_DEPENDENCIES) $(preempt_partition_prio_la_LINK) -rpath $(pkglibdir) $(preempt_partition_prio_la_OBJECTS) $(preempt_partition_prio_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/preempt/qos/Makefile.in b/src/plugins/preempt/qos/Makefile.in index 40722650a7..8061455a4b 100644 --- a/src/plugins/preempt/qos/Makefile.in +++ b/src/plugins/preempt/qos/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) preempt_qos_la_LIBADD = @@ -403,7 +409,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -preempt_qos.la: $(preempt_qos_la_OBJECTS) $(preempt_qos_la_DEPENDENCIES) +preempt_qos.la: $(preempt_qos_la_OBJECTS) $(preempt_qos_la_DEPENDENCIES) $(EXTRA_preempt_qos_la_DEPENDENCIES) $(preempt_qos_la_LINK) -rpath $(pkglibdir) $(preempt_qos_la_OBJECTS) $(preempt_qos_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -540,10 +546,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/priority/Makefile.in b/src/plugins/priority/Makefile.in index 885941b1bd..0cb32d5ab4 100644 --- a/src/plugins/priority/Makefile.in +++ b/src/plugins/priority/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/priority/basic/Makefile.in b/src/plugins/priority/basic/Makefile.in index ee5461c98a..e8c0034e83 100644 --- a/src/plugins/priority/basic/Makefile.in +++ b/src/plugins/priority/basic/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) priority_basic_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -priority_basic.la: $(priority_basic_la_OBJECTS) $(priority_basic_la_DEPENDENCIES) +priority_basic.la: $(priority_basic_la_OBJECTS) $(priority_basic_la_DEPENDENCIES) $(EXTRA_priority_basic_la_DEPENDENCIES) $(priority_basic_la_LINK) -rpath $(pkglibdir) $(priority_basic_la_OBJECTS) $(priority_basic_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/priority/multifactor/Makefile.in b/src/plugins/priority/multifactor/Makefile.in index 8c1ef826d7..08b0702903 100644 --- a/src/plugins/priority/multifactor/Makefile.in +++ b/src/plugins/priority/multifactor/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) priority_multifactor_la_DEPENDENCIES = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -priority_multifactor.la: $(priority_multifactor_la_OBJECTS) $(priority_multifactor_la_DEPENDENCIES) +priority_multifactor.la: $(priority_multifactor_la_OBJECTS) $(priority_multifactor_la_DEPENDENCIES) $(EXTRA_priority_multifactor_la_DEPENDENCIES) $(priority_multifactor_la_LINK) -rpath $(pkglibdir) $(priority_multifactor_la_OBJECTS) $(priority_multifactor_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -544,10 +550,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/Makefile.in b/src/plugins/proctrack/Makefile.in index 2188755230..ccb76272ae 100644 --- a/src/plugins/proctrack/Makefile.in +++ b/src/plugins/proctrack/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -579,10 +579,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/aix/Makefile.in b/src/plugins/proctrack/aix/Makefile.in index 7d8b040298..7d0794fcfe 100644 --- a/src/plugins/proctrack/aix/Makefile.in +++ b/src/plugins/proctrack/aix/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_aix_la_LIBADD = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_aix.la: $(proctrack_aix_la_OBJECTS) $(proctrack_aix_la_DEPENDENCIES) +proctrack_aix.la: $(proctrack_aix_la_OBJECTS) $(proctrack_aix_la_DEPENDENCIES) $(EXTRA_proctrack_aix_la_DEPENDENCIES) $(proctrack_aix_la_LINK) -rpath $(pkglibdir) $(proctrack_aix_la_OBJECTS) $(proctrack_aix_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -544,10 +550,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/cgroup/Makefile.in b/src/plugins/proctrack/cgroup/Makefile.in index 650eebe3a7..a215248e10 100644 --- a/src/plugins/proctrack/cgroup/Makefile.in +++ b/src/plugins/proctrack/cgroup/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_cgroup_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_cgroup.la: $(proctrack_cgroup_la_OBJECTS) $(proctrack_cgroup_la_DEPENDENCIES) +proctrack_cgroup.la: $(proctrack_cgroup_la_OBJECTS) $(proctrack_cgroup_la_DEPENDENCIES) $(EXTRA_proctrack_cgroup_la_DEPENDENCIES) $(proctrack_cgroup_la_LINK) -rpath $(pkglibdir) $(proctrack_cgroup_la_OBJECTS) $(proctrack_cgroup_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/linuxproc/Makefile.in b/src/plugins/proctrack/linuxproc/Makefile.in index 7366392c00..c530affcdf 100644 --- a/src/plugins/proctrack/linuxproc/Makefile.in +++ b/src/plugins/proctrack/linuxproc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_linuxproc_la_LIBADD = @@ -410,7 +416,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_linuxproc.la: $(proctrack_linuxproc_la_OBJECTS) $(proctrack_linuxproc_la_DEPENDENCIES) +proctrack_linuxproc.la: $(proctrack_linuxproc_la_OBJECTS) $(proctrack_linuxproc_la_DEPENDENCIES) $(EXTRA_proctrack_linuxproc_la_DEPENDENCIES) $(proctrack_linuxproc_la_LINK) -rpath $(pkglibdir) $(proctrack_linuxproc_la_OBJECTS) $(proctrack_linuxproc_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/lua/Makefile.in b/src/plugins/proctrack/lua/Makefile.in index 855915b3a2..8b50fc1840 100644 --- a/src/plugins/proctrack/lua/Makefile.in +++ b/src/plugins/proctrack/lua/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_lua_la_LIBADD = @@ -404,7 +410,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_lua.la: $(proctrack_lua_la_OBJECTS) $(proctrack_lua_la_DEPENDENCIES) +proctrack_lua.la: $(proctrack_lua_la_OBJECTS) $(proctrack_lua_la_DEPENDENCIES) $(EXTRA_proctrack_lua_la_DEPENDENCIES) $(proctrack_lua_la_LINK) -rpath $(pkglibdir) $(proctrack_lua_la_OBJECTS) $(proctrack_lua_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -541,10 +547,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/pgid/Makefile.in b/src/plugins/proctrack/pgid/Makefile.in index ad9ab6e67a..cb0f61fa2d 100644 --- a/src/plugins/proctrack/pgid/Makefile.in +++ b/src/plugins/proctrack/pgid/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_pgid_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_pgid.la: $(proctrack_pgid_la_OBJECTS) $(proctrack_pgid_la_DEPENDENCIES) +proctrack_pgid.la: $(proctrack_pgid_la_OBJECTS) $(proctrack_pgid_la_DEPENDENCIES) $(EXTRA_proctrack_pgid_la_DEPENDENCIES) $(proctrack_pgid_la_LINK) -rpath $(pkglibdir) $(proctrack_pgid_la_OBJECTS) $(proctrack_pgid_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/rms/Makefile.in b/src/plugins/proctrack/rms/Makefile.in index ca19444110..b175b65fa4 100644 --- a/src/plugins/proctrack/rms/Makefile.in +++ b/src/plugins/proctrack/rms/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_rms_la_DEPENDENCIES = @@ -406,7 +412,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_rms.la: $(proctrack_rms_la_OBJECTS) $(proctrack_rms_la_DEPENDENCIES) +proctrack_rms.la: $(proctrack_rms_la_OBJECTS) $(proctrack_rms_la_DEPENDENCIES) $(EXTRA_proctrack_rms_la_DEPENDENCIES) $(proctrack_rms_la_LINK) $(am_proctrack_rms_la_rpath) $(proctrack_rms_la_OBJECTS) $(proctrack_rms_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -543,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/proctrack/sgi_job/Makefile.in b/src/plugins/proctrack/sgi_job/Makefile.in index 9b5b949921..eda09d8898 100644 --- a/src/plugins/proctrack/sgi_job/Makefile.in +++ b/src/plugins/proctrack/sgi_job/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) proctrack_sgi_job_la_LIBADD = @@ -403,7 +409,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -proctrack_sgi_job.la: $(proctrack_sgi_job_la_OBJECTS) $(proctrack_sgi_job_la_DEPENDENCIES) +proctrack_sgi_job.la: $(proctrack_sgi_job_la_OBJECTS) $(proctrack_sgi_job_la_DEPENDENCIES) $(EXTRA_proctrack_sgi_job_la_DEPENDENCIES) $(proctrack_sgi_job_la_LINK) -rpath $(pkglibdir) $(proctrack_sgi_job_la_OBJECTS) $(proctrack_sgi_job_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -540,10 +546,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/Makefile.in b/src/plugins/sched/Makefile.in index 8e9c30f51f..76ceb968d6 100644 --- a/src/plugins/sched/Makefile.in +++ b/src/plugins/sched/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/backfill/Makefile.in b/src/plugins/sched/backfill/Makefile.in index 3fc62c3777..ef6b1fed3a 100644 --- a/src/plugins/sched/backfill/Makefile.in +++ b/src/plugins/sched/backfill/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) sched_backfill_la_LIBADD = @@ -407,7 +413,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -sched_backfill.la: $(sched_backfill_la_OBJECTS) $(sched_backfill_la_DEPENDENCIES) +sched_backfill.la: $(sched_backfill_la_OBJECTS) $(sched_backfill_la_DEPENDENCIES) $(EXTRA_sched_backfill_la_DEPENDENCIES) $(sched_backfill_la_LINK) -rpath $(pkglibdir) $(sched_backfill_la_OBJECTS) $(sched_backfill_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -545,10 +551,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/builtin/Makefile.in b/src/plugins/sched/builtin/Makefile.in index fa27759259..de62823853 100644 --- a/src/plugins/sched/builtin/Makefile.in +++ b/src/plugins/sched/builtin/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) sched_builtin_la_LIBADD = @@ -408,7 +414,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -sched_builtin.la: $(sched_builtin_la_OBJECTS) $(sched_builtin_la_DEPENDENCIES) +sched_builtin.la: $(sched_builtin_la_OBJECTS) $(sched_builtin_la_DEPENDENCIES) $(EXTRA_sched_builtin_la_DEPENDENCIES) $(sched_builtin_la_LINK) -rpath $(pkglibdir) $(sched_builtin_la_OBJECTS) $(sched_builtin_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -546,10 +552,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/hold/Makefile.in b/src/plugins/sched/hold/Makefile.in index e2c43f5130..cfef91a4aa 100644 --- a/src/plugins/sched/hold/Makefile.in +++ b/src/plugins/sched/hold/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) sched_hold_la_LIBADD = @@ -404,7 +410,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -sched_hold.la: $(sched_hold_la_OBJECTS) $(sched_hold_la_DEPENDENCIES) +sched_hold.la: $(sched_hold_la_OBJECTS) $(sched_hold_la_DEPENDENCIES) $(EXTRA_sched_hold_la_DEPENDENCIES) $(sched_hold_la_LINK) -rpath $(pkglibdir) $(sched_hold_la_OBJECTS) $(sched_hold_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -541,10 +547,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/wiki/Makefile.in b/src/plugins/sched/wiki/Makefile.in index f4d33aa34c..4bb5b51ade 100644 --- a/src/plugins/sched/wiki/Makefile.in +++ b/src/plugins/sched/wiki/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) sched_wiki_la_LIBADD = @@ -420,7 +426,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -sched_wiki.la: $(sched_wiki_la_OBJECTS) $(sched_wiki_la_DEPENDENCIES) +sched_wiki.la: $(sched_wiki_la_OBJECTS) $(sched_wiki_la_DEPENDENCIES) $(EXTRA_sched_wiki_la_DEPENDENCIES) $(sched_wiki_la_LINK) -rpath $(pkglibdir) $(sched_wiki_la_OBJECTS) $(sched_wiki_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -567,10 +573,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/sched/wiki2/Makefile.in b/src/plugins/sched/wiki2/Makefile.in index 782db1b320..628d3d4c47 100644 --- a/src/plugins/sched/wiki2/Makefile.in +++ b/src/plugins/sched/wiki2/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) sched_wiki2_la_LIBADD = @@ -431,7 +437,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -sched_wiki2.la: $(sched_wiki2_la_OBJECTS) $(sched_wiki2_la_DEPENDENCIES) +sched_wiki2.la: $(sched_wiki2_la_OBJECTS) $(sched_wiki2_la_DEPENDENCIES) $(EXTRA_sched_wiki2_la_DEPENDENCIES) $(sched_wiki2_la_LINK) -rpath $(pkglibdir) $(sched_wiki2_la_OBJECTS) $(sched_wiki2_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -586,10 +592,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/Makefile.in b/src/plugins/select/Makefile.in index ed7d457eab..3cc3cbdae1 100644 --- a/src/plugins/select/Makefile.in +++ b/src/plugins/select/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -577,10 +577,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 88a7acfa68..06f3b74fe9 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -137,6 +137,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" "$(DESTDIR)$(sbindir)" LTLIBRARIES = $(noinst_LTLIBRARIES) $(pkglib_LTLIBRARIES) libba_common_la_LIBADD = @@ -604,17 +610,17 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libba_common.la: $(libba_common_la_OBJECTS) $(libba_common_la_DEPENDENCIES) +libba_common.la: $(libba_common_la_OBJECTS) $(libba_common_la_DEPENDENCIES) $(EXTRA_libba_common_la_DEPENDENCIES) $(LINK) $(libba_common_la_OBJECTS) $(libba_common_la_LIBADD) $(LIBS) -libconfigure_api.la: $(libconfigure_api_la_OBJECTS) $(libconfigure_api_la_DEPENDENCIES) +libconfigure_api.la: $(libconfigure_api_la_OBJECTS) $(libconfigure_api_la_DEPENDENCIES) $(EXTRA_libconfigure_api_la_DEPENDENCIES) $(LINK) $(libconfigure_api_la_OBJECTS) $(libconfigure_api_la_LIBADD) $(LIBS) -libsched_if.la: $(libsched_if_la_OBJECTS) $(libsched_if_la_DEPENDENCIES) +libsched_if.la: $(libsched_if_la_OBJECTS) $(libsched_if_la_DEPENDENCIES) $(EXTRA_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: $(libsched_if64_la_OBJECTS) $(libsched_if64_la_DEPENDENCIES) $(EXTRA_libsched_if64_la_DEPENDENCIES) $(libsched_if64_la_LINK) $(am_libsched_if64_la_rpath) $(libsched_if64_la_OBJECTS) $(libsched_if64_la_LIBADD) $(LIBS) -runjob_plugin.la: $(runjob_plugin_la_OBJECTS) $(runjob_plugin_la_DEPENDENCIES) +runjob_plugin.la: $(runjob_plugin_la_OBJECTS) $(runjob_plugin_la_DEPENDENCIES) $(EXTRA_runjob_plugin_la_DEPENDENCIES) $(runjob_plugin_la_LINK) $(am_runjob_plugin_la_rpath) $(runjob_plugin_la_OBJECTS) $(runjob_plugin_la_LIBADD) $(LIBS) -select_bluegene.la: $(select_bluegene_la_OBJECTS) $(select_bluegene_la_DEPENDENCIES) +select_bluegene.la: $(select_bluegene_la_OBJECTS) $(select_bluegene_la_DEPENDENCIES) $(EXTRA_select_bluegene_la_DEPENDENCIES) $(select_bluegene_la_LINK) -rpath $(pkglibdir) $(select_bluegene_la_OBJECTS) $(select_bluegene_la_LIBADD) $(LIBS) install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @@ -659,10 +665,10 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -slurm_epilog$(EXEEXT): $(slurm_epilog_OBJECTS) $(slurm_epilog_DEPENDENCIES) +slurm_epilog$(EXEEXT): $(slurm_epilog_OBJECTS) $(slurm_epilog_DEPENDENCIES) $(EXTRA_slurm_epilog_DEPENDENCIES) @rm -f slurm_epilog$(EXEEXT) $(slurm_epilog_LINK) $(slurm_epilog_OBJECTS) $(slurm_epilog_LDADD) $(LIBS) -slurm_prolog$(EXEEXT): $(slurm_prolog_OBJECTS) $(slurm_prolog_DEPENDENCIES) +slurm_prolog$(EXEEXT): $(slurm_prolog_OBJECTS) $(slurm_prolog_DEPENDENCIES) $(EXTRA_slurm_prolog_DEPENDENCIES) @rm -f slurm_prolog$(EXEEXT) $(slurm_prolog_LINK) $(slurm_prolog_OBJECTS) $(slurm_prolog_LDADD) $(LIBS) @@ -972,10 +978,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/ba/Makefile.in b/src/plugins/select/bluegene/ba/Makefile.in index f83aaa55d1..a6e5fba755 100644 --- a/src/plugins/select/bluegene/ba/Makefile.in +++ b/src/plugins/select/bluegene/ba/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -384,7 +384,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libblock_allocator.la: $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_DEPENDENCIES) +libblock_allocator.la: $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_DEPENDENCIES) $(EXTRA_libblock_allocator_la_DEPENDENCIES) $(libblock_allocator_la_LINK) $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -395,7 +395,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -wire_test$(EXEEXT): $(wire_test_OBJECTS) $(wire_test_DEPENDENCIES) +wire_test$(EXEEXT): $(wire_test_OBJECTS) $(wire_test_DEPENDENCIES) $(EXTRA_wire_test_DEPENDENCIES) @rm -f wire_test$(EXEEXT) $(wire_test_LINK) $(wire_test_OBJECTS) $(wire_test_LDADD) $(LIBS) @@ -531,10 +531,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/ba_bgq/Makefile.in b/src/plugins/select/bluegene/ba_bgq/Makefile.in index 5e11027456..dcc86bc231 100644 --- a/src/plugins/select/bluegene/ba_bgq/Makefile.in +++ b/src/plugins/select/bluegene/ba_bgq/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -397,7 +397,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libblock_allocator.la: $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_DEPENDENCIES) +libblock_allocator.la: $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_DEPENDENCIES) $(EXTRA_libblock_allocator_la_DEPENDENCIES) $(libblock_allocator_la_LINK) $(libblock_allocator_la_OBJECTS) $(libblock_allocator_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @@ -408,7 +408,7 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -wire_test$(EXEEXT): $(wire_test_OBJECTS) $(wire_test_DEPENDENCIES) +wire_test$(EXEEXT): $(wire_test_OBJECTS) $(wire_test_DEPENDENCIES) $(EXTRA_wire_test_DEPENDENCIES) @rm -f wire_test$(EXEEXT) $(wire_test_LINK) $(wire_test_OBJECTS) $(wire_test_LDADD) $(LIBS) @@ -566,10 +566,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/bl/Makefile.in b/src/plugins/select/bluegene/bl/Makefile.in index d87debefe2..e7c00f94dc 100644 --- a/src/plugins/select/bluegene/bl/Makefile.in +++ b/src/plugins/select/bluegene/bl/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -368,7 +368,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libbridge_linker.la: $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_DEPENDENCIES) +libbridge_linker.la: $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_DEPENDENCIES) $(EXTRA_libbridge_linker_la_DEPENDENCIES) $(libbridge_linker_la_LINK) $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -504,10 +504,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/bl_bgq/Makefile.in b/src/plugins/select/bluegene/bl_bgq/Makefile.in index 00c108867c..0a3dc766aa 100644 --- a/src/plugins/select/bluegene/bl_bgq/Makefile.in +++ b/src/plugins/select/bluegene/bl_bgq/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -374,7 +374,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libbridge_linker.la: $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_DEPENDENCIES) +libbridge_linker.la: $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_DEPENDENCIES) $(EXTRA_libbridge_linker_la_DEPENDENCIES) $(libbridge_linker_la_LINK) $(libbridge_linker_la_OBJECTS) $(libbridge_linker_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -510,10 +510,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/bluegene/sfree/Makefile.in b/src/plugins/select/bluegene/sfree/Makefile.in index bba7ce19da..305f46e5cd 100644 --- a/src/plugins/select/bluegene/sfree/Makefile.in +++ b/src/plugins/select/bluegene/sfree/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -397,7 +397,7 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sfree$(EXEEXT): $(sfree_OBJECTS) $(sfree_DEPENDENCIES) +sfree$(EXEEXT): $(sfree_OBJECTS) $(sfree_DEPENDENCIES) $(EXTRA_sfree_DEPENDENCIES) @rm -f sfree$(EXEEXT) $(sfree_LINK) $(sfree_OBJECTS) $(sfree_LDADD) $(LIBS) @@ -536,10 +536,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/cons_res/Makefile.in b/src/plugins/select/cons_res/Makefile.in index 69fe19af65..1e08f61b94 100644 --- a/src/plugins/select/cons_res/Makefile.in +++ b/src/plugins/select/cons_res/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) select_cons_res_la_LIBADD = @@ -409,7 +415,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -select_cons_res.la: $(select_cons_res_la_OBJECTS) $(select_cons_res_la_DEPENDENCIES) +select_cons_res.la: $(select_cons_res_la_OBJECTS) $(select_cons_res_la_DEPENDENCIES) $(EXTRA_select_cons_res_la_DEPENDENCIES) $(select_cons_res_la_LINK) -rpath $(pkglibdir) $(select_cons_res_la_OBJECTS) $(select_cons_res_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -548,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/cray/Makefile.in b/src/plugins/select/cray/Makefile.in index 5f61f42398..a80da44146 100644 --- a/src/plugins/select/cray/Makefile.in +++ b/src/plugins/select/cray/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -106,6 +106,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) @HAVE_CRAY_EMULATION_FALSE@@HAVE_CRAY_TRUE@select_cray_la_DEPENDENCIES = \ @@ -460,7 +466,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -select_cray.la: $(select_cray_la_OBJECTS) $(select_cray_la_DEPENDENCIES) +select_cray.la: $(select_cray_la_OBJECTS) $(select_cray_la_DEPENDENCIES) $(EXTRA_select_cray_la_DEPENDENCIES) $(select_cray_la_LINK) -rpath $(pkglibdir) $(select_cray_la_OBJECTS) $(select_cray_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -748,10 +754,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/cray/libalps/Makefile.in b/src/plugins/select/cray/libalps/Makefile.in index 0dec64119d..02c84eac02 100644 --- a/src/plugins/select/cray/libalps/Makefile.in +++ b/src/plugins/select/cray/libalps/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -387,7 +387,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libalps.la: $(libalps_la_OBJECTS) $(libalps_la_DEPENDENCIES) +libalps.la: $(libalps_la_OBJECTS) $(libalps_la_DEPENDENCIES) $(EXTRA_libalps_la_DEPENDENCIES) $(libalps_la_LINK) $(libalps_la_OBJECTS) $(libalps_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -640,10 +640,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/cray/libemulate/Makefile.in b/src/plugins/select/cray/libemulate/Makefile.in index 70bb1450d3..41248c476a 100644 --- a/src/plugins/select/cray/libemulate/Makefile.in +++ b/src/plugins/select/cray/libemulate/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -367,7 +367,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libalps.la: $(libalps_la_OBJECTS) $(libalps_la_DEPENDENCIES) +libalps.la: $(libalps_la_OBJECTS) $(libalps_la_DEPENDENCIES) $(EXTRA_libalps_la_DEPENDENCIES) $(libalps_la_LINK) $(libalps_la_OBJECTS) $(libalps_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -516,10 +516,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/select/linear/Makefile.in b/src/plugins/select/linear/Makefile.in index 8ca7ffa909..64838ffbf5 100644 --- a/src/plugins/select/linear/Makefile.in +++ b/src/plugins/select/linear/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) select_linear_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -select_linear.la: $(select_linear_la_OBJECTS) $(select_linear_la_DEPENDENCIES) +select_linear.la: $(select_linear_la_OBJECTS) $(select_linear_la_DEPENDENCIES) $(EXTRA_select_linear_la_DEPENDENCIES) $(select_linear_la_LINK) -rpath $(pkglibdir) $(select_linear_la_OBJECTS) $(select_linear_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/switch/Makefile.in b/src/plugins/switch/Makefile.in index 6a7c7c1ca8..a30134b7dd 100644 --- a/src/plugins/switch/Makefile.in +++ b/src/plugins/switch/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/switch/elan/Makefile.in b/src/plugins/switch/elan/Makefile.in index 703171bd85..1e35a13e85 100644 --- a/src/plugins/switch/elan/Makefile.in +++ b/src/plugins/switch/elan/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) am__DEPENDENCIES_1 = @@ -426,7 +432,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -switch_elan.la: $(switch_elan_la_OBJECTS) $(switch_elan_la_DEPENDENCIES) +switch_elan.la: $(switch_elan_la_OBJECTS) $(switch_elan_la_DEPENDENCIES) $(EXTRA_switch_elan_la_DEPENDENCIES) $(switch_elan_la_LINK) $(am_switch_elan_la_rpath) $(switch_elan_la_OBJECTS) $(switch_elan_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -564,10 +570,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/switch/federation/Makefile.in b/src/plugins/switch/federation/Makefile.in index 9fb83fbd5a..f08ff81aef 100644 --- a/src/plugins/switch/federation/Makefile.in +++ b/src/plugins/switch/federation/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) switch_federation_la_LIBADD = @@ -428,7 +434,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -switch_federation.la: $(switch_federation_la_OBJECTS) $(switch_federation_la_DEPENDENCIES) +switch_federation.la: $(switch_federation_la_OBJECTS) $(switch_federation_la_DEPENDENCIES) $(EXTRA_switch_federation_la_DEPENDENCIES) $(switch_federation_la_LINK) $(am_switch_federation_la_rpath) $(switch_federation_la_OBJECTS) $(switch_federation_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -566,10 +572,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/switch/none/Makefile.in b/src/plugins/switch/none/Makefile.in index 21cb332c5b..973af4d2e4 100644 --- a/src/plugins/switch/none/Makefile.in +++ b/src/plugins/switch/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) switch_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -switch_none.la: $(switch_none_la_OBJECTS) $(switch_none_la_DEPENDENCIES) +switch_none.la: $(switch_none_la_OBJECTS) $(switch_none_la_DEPENDENCIES) $(EXTRA_switch_none_la_DEPENDENCIES) $(switch_none_la_LINK) -rpath $(pkglibdir) $(switch_none_la_OBJECTS) $(switch_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/task/Makefile.in b/src/plugins/task/Makefile.in index bdb16c6112..f849e63096 100644 --- a/src/plugins/task/Makefile.in +++ b/src/plugins/task/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/task/affinity/Makefile.in b/src/plugins/task/affinity/Makefile.in index 4b3efec9b2..1df0e53d8f 100644 --- a/src/plugins/task/affinity/Makefile.in +++ b/src/plugins/task/affinity/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) task_affinity_la_LIBADD = @@ -431,7 +437,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -task_affinity.la: $(task_affinity_la_OBJECTS) $(task_affinity_la_DEPENDENCIES) +task_affinity.la: $(task_affinity_la_OBJECTS) $(task_affinity_la_DEPENDENCIES) $(EXTRA_task_affinity_la_DEPENDENCIES) $(task_affinity_la_LINK) $(am_task_affinity_la_rpath) $(task_affinity_la_OBJECTS) $(task_affinity_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -573,10 +579,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/task/cgroup/Makefile.in b/src/plugins/task/cgroup/Makefile.in index b2df2be6d2..06bb00073f 100644 --- a/src/plugins/task/cgroup/Makefile.in +++ b/src/plugins/task/cgroup/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) task_cgroup_la_LIBADD = @@ -413,7 +419,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -task_cgroup.la: $(task_cgroup_la_OBJECTS) $(task_cgroup_la_DEPENDENCIES) +task_cgroup.la: $(task_cgroup_la_OBJECTS) $(task_cgroup_la_DEPENDENCIES) $(EXTRA_task_cgroup_la_DEPENDENCIES) $(task_cgroup_la_LINK) -rpath $(pkglibdir) $(task_cgroup_la_OBJECTS) $(task_cgroup_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -581,10 +587,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/task/none/Makefile.in b/src/plugins/task/none/Makefile.in index f30cad8d48..8c8360fb1e 100644 --- a/src/plugins/task/none/Makefile.in +++ b/src/plugins/task/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) task_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -task_none.la: $(task_none_la_OBJECTS) $(task_none_la_DEPENDENCIES) +task_none.la: $(task_none_la_OBJECTS) $(task_none_la_DEPENDENCIES) $(EXTRA_task_none_la_DEPENDENCIES) $(task_none_la_LINK) -rpath $(pkglibdir) $(task_none_la_OBJECTS) $(task_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/topology/3d_torus/Makefile.in b/src/plugins/topology/3d_torus/Makefile.in index aeabe2888e..d251566423 100644 --- a/src/plugins/topology/3d_torus/Makefile.in +++ b/src/plugins/topology/3d_torus/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) topology_3d_torus_la_LIBADD = @@ -411,7 +417,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -topology_3d_torus.la: $(topology_3d_torus_la_OBJECTS) $(topology_3d_torus_la_DEPENDENCIES) +topology_3d_torus.la: $(topology_3d_torus_la_OBJECTS) $(topology_3d_torus_la_DEPENDENCIES) $(EXTRA_topology_3d_torus_la_DEPENDENCIES) $(topology_3d_torus_la_LINK) -rpath $(pkglibdir) $(topology_3d_torus_la_OBJECTS) $(topology_3d_torus_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -550,10 +556,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/topology/Makefile.in b/src/plugins/topology/Makefile.in index e9391f5518..4a38a157c3 100644 --- a/src/plugins/topology/Makefile.in +++ b/src/plugins/topology/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -576,10 +576,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/topology/node_rank/Makefile.in b/src/plugins/topology/node_rank/Makefile.in index 4e6581e47e..9d6a1caf43 100644 --- a/src/plugins/topology/node_rank/Makefile.in +++ b/src/plugins/topology/node_rank/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) topology_node_rank_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -topology_node_rank.la: $(topology_node_rank_la_OBJECTS) $(topology_node_rank_la_DEPENDENCIES) +topology_node_rank.la: $(topology_node_rank_la_OBJECTS) $(topology_node_rank_la_DEPENDENCIES) $(EXTRA_topology_node_rank_la_DEPENDENCIES) $(topology_node_rank_la_LINK) -rpath $(pkglibdir) $(topology_node_rank_la_OBJECTS) $(topology_node_rank_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/topology/none/Makefile.in b/src/plugins/topology/none/Makefile.in index 49edbcb57a..6d77d99f9b 100644 --- a/src/plugins/topology/none/Makefile.in +++ b/src/plugins/topology/none/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) topology_none_la_LIBADD = @@ -405,7 +411,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -topology_none.la: $(topology_none_la_OBJECTS) $(topology_none_la_DEPENDENCIES) +topology_none.la: $(topology_none_la_OBJECTS) $(topology_none_la_DEPENDENCIES) $(EXTRA_topology_none_la_DEPENDENCIES) $(topology_none_la_LINK) -rpath $(pkglibdir) $(topology_none_la_OBJECTS) $(topology_none_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -542,10 +548,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/plugins/topology/tree/Makefile.in b/src/plugins/topology/tree/Makefile.in index 06e3ee413a..72fd444e4a 100644 --- a/src/plugins/topology/tree/Makefile.in +++ b/src/plugins/topology/tree/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -105,6 +105,12 @@ am__nobase_list = $(am__nobase_strip_setup); \ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) topology_tree_la_LIBADD = @@ -406,7 +412,7 @@ clean-pkglibLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -topology_tree.la: $(topology_tree_la_OBJECTS) $(topology_tree_la_DEPENDENCIES) +topology_tree.la: $(topology_tree_la_OBJECTS) $(topology_tree_la_DEPENDENCIES) $(EXTRA_topology_tree_la_DEPENDENCIES) $(topology_tree_la_LINK) -rpath $(pkglibdir) $(topology_tree_la_OBJECTS) $(topology_tree_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -543,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index 113d390c76..b052a1b0d6 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -408,7 +408,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sacct$(EXEEXT): $(sacct_OBJECTS) $(sacct_DEPENDENCIES) +sacct$(EXEEXT): $(sacct_OBJECTS) $(sacct_DEPENDENCIES) $(EXTRA_sacct_DEPENDENCIES) @rm -f sacct$(EXEEXT) $(sacct_LINK) $(sacct_OBJECTS) $(sacct_LDADD) $(LIBS) @@ -549,10 +549,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index 8d32e246ff..de2e43fc99 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -422,7 +422,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sacctmgr$(EXEEXT): $(sacctmgr_OBJECTS) $(sacctmgr_DEPENDENCIES) +sacctmgr$(EXEEXT): $(sacctmgr_OBJECTS) $(sacctmgr_DEPENDENCIES) $(EXTRA_sacctmgr_DEPENDENCIES) @rm -f sacctmgr$(EXEEXT) $(sacctmgr_LINK) $(sacctmgr_OBJECTS) $(sacctmgr_LDADD) $(LIBS) @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index 6d0f889cef..352d21c3e4 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -400,7 +400,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -salloc$(EXEEXT): $(salloc_OBJECTS) $(salloc_DEPENDENCIES) +salloc$(EXEEXT): $(salloc_OBJECTS) $(salloc_DEPENDENCIES) $(EXTRA_salloc_DEPENDENCIES) @rm -f salloc$(EXEEXT) $(salloc_LINK) $(salloc_OBJECTS) $(salloc_LDADD) $(LIBS) @@ -539,10 +539,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index 355859db16..714890f6d4 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -406,7 +406,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sattach$(EXEEXT): $(sattach_OBJECTS) $(sattach_DEPENDENCIES) +sattach$(EXEEXT): $(sattach_OBJECTS) $(sattach_DEPENDENCIES) $(EXTRA_sattach_DEPENDENCIES) @rm -f sattach$(EXEEXT) $(sattach_LINK) $(sattach_OBJECTS) $(sattach_LDADD) $(LIBS) @@ -547,10 +547,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index bd9052b1d4..43a06540de 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -400,7 +400,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sbatch$(EXEEXT): $(sbatch_OBJECTS) $(sbatch_DEPENDENCIES) +sbatch$(EXEEXT): $(sbatch_OBJECTS) $(sbatch_DEPENDENCIES) $(EXTRA_sbatch_DEPENDENCIES) @rm -f sbatch$(EXEEXT) $(sbatch_LINK) $(sbatch_OBJECTS) $(sbatch_LDADD) $(LIBS) @@ -540,10 +540,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 6b3b74f36d..08a6c5853f 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -401,7 +401,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sbcast$(EXEEXT): $(sbcast_OBJECTS) $(sbcast_DEPENDENCIES) +sbcast$(EXEEXT): $(sbcast_OBJECTS) $(sbcast_DEPENDENCIES) $(EXTRA_sbcast_DEPENDENCIES) @rm -f sbcast$(EXEEXT) $(sbcast_LINK) $(sbcast_OBJECTS) $(sbcast_LDADD) $(LIBS) @@ -541,10 +541,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index eb7f458644..d5c1f672b2 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -400,7 +400,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -scancel$(EXEEXT): $(scancel_OBJECTS) $(scancel_DEPENDENCIES) +scancel$(EXEEXT): $(scancel_OBJECTS) $(scancel_DEPENDENCIES) $(EXTRA_scancel_DEPENDENCIES) @rm -f scancel$(EXEEXT) $(scancel_LINK) $(scancel_OBJECTS) $(scancel_LDADD) $(LIBS) @@ -539,10 +539,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 69322736ee..b54c0f63f6 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -418,7 +418,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -scontrol$(EXEEXT): $(scontrol_OBJECTS) $(scontrol_DEPENDENCIES) +scontrol$(EXEEXT): $(scontrol_OBJECTS) $(scontrol_DEPENDENCIES) $(EXTRA_scontrol_DEPENDENCIES) @rm -f scontrol$(EXEEXT) $(scontrol_LINK) $(scontrol_OBJECTS) $(scontrol_LDADD) $(LIBS) @@ -566,10 +566,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sdiag/Makefile.in b/src/sdiag/Makefile.in index f113fd5459..6fa985ce61 100644 --- a/src/sdiag/Makefile.in +++ b/src/sdiag/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -397,7 +397,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sdiag$(EXEEXT): $(sdiag_OBJECTS) $(sdiag_DEPENDENCIES) +sdiag$(EXEEXT): $(sdiag_OBJECTS) $(sdiag_DEPENDENCIES) $(EXTRA_sdiag_DEPENDENCIES) @rm -f sdiag$(EXEEXT) $(sdiag_LINK) $(sdiag_OBJECTS) $(sdiag_LDADD) $(LIBS) @@ -536,10 +536,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 69638150fd..324b886583 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -402,7 +402,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sinfo$(EXEEXT): $(sinfo_OBJECTS) $(sinfo_DEPENDENCIES) +sinfo$(EXEEXT): $(sinfo_OBJECTS) $(sinfo_DEPENDENCIES) $(EXTRA_sinfo_DEPENDENCIES) @rm -f sinfo$(EXEEXT) $(sinfo_LINK) $(sinfo_OBJECTS) $(sinfo_LDADD) $(LIBS) @@ -543,10 +543,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 58e2280b4e..bc5e20938c 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -465,7 +465,7 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -slurmctld$(EXEEXT): $(slurmctld_OBJECTS) $(slurmctld_DEPENDENCIES) +slurmctld$(EXEEXT): $(slurmctld_OBJECTS) $(slurmctld_DEPENDENCIES) $(EXTRA_slurmctld_DEPENDENCIES) @rm -f slurmctld$(EXEEXT) $(slurmctld_LINK) $(slurmctld_OBJECTS) $(slurmctld_LDADD) $(LIBS) @@ -630,10 +630,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmd/Makefile.in b/src/slurmd/Makefile.in index 424d4145c1..9a1a2bb5f8 100644 --- a/src/slurmd/Makefile.in +++ b/src/slurmd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmd/common/Makefile.in b/src/slurmd/common/Makefile.in index 65b84c69e4..78987f0d8d 100644 --- a/src/slurmd/common/Makefile.in +++ b/src/slurmd/common/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -366,7 +366,7 @@ clean-noinstLTLIBRARIES: echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libslurmd_common.la: $(libslurmd_common_la_OBJECTS) $(libslurmd_common_la_DEPENDENCIES) +libslurmd_common.la: $(libslurmd_common_la_OBJECTS) $(libslurmd_common_la_DEPENDENCIES) $(EXTRA_libslurmd_common_la_DEPENDENCIES) $(LINK) $(libslurmd_common_la_OBJECTS) $(libslurmd_common_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -505,10 +505,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index 60c22f359e..5209caec09 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -419,7 +419,7 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -slurmd$(EXEEXT): $(slurmd_OBJECTS) $(slurmd_DEPENDENCIES) +slurmd$(EXEEXT): $(slurmd_OBJECTS) $(slurmd_DEPENDENCIES) $(EXTRA_slurmd_DEPENDENCIES) @rm -f slurmd$(EXEEXT) $(slurmd_LINK) $(slurmd_OBJECTS) $(slurmd_LDADD) $(LIBS) @@ -562,10 +562,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index 8ddfddfe7b..1616d8eaaa 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -425,7 +425,7 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -slurmstepd$(EXEEXT): $(slurmstepd_OBJECTS) $(slurmstepd_DEPENDENCIES) +slurmstepd$(EXEEXT): $(slurmstepd_OBJECTS) $(slurmstepd_DEPENDENCIES) $(EXTRA_slurmstepd_DEPENDENCIES) @rm -f slurmstepd$(EXEEXT) $(slurmstepd_LINK) $(slurmstepd_OBJECTS) $(slurmstepd_LDADD) $(LIBS) @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 69e984e5d8..f133d80a75 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -416,7 +416,7 @@ clean-sbinPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -slurmdbd$(EXEEXT): $(slurmdbd_OBJECTS) $(slurmdbd_DEPENDENCIES) +slurmdbd$(EXEEXT): $(slurmdbd_OBJECTS) $(slurmdbd_DEPENDENCIES) $(EXTRA_slurmdbd_DEPENDENCIES) @rm -f slurmdbd$(EXEEXT) $(slurmdbd_LINK) $(slurmdbd_OBJECTS) $(slurmdbd_LDADD) $(LIBS) @@ -559,10 +559,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index 7a6584333e..2e7f540be9 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -430,7 +430,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -smap$(EXEEXT): $(smap_OBJECTS) $(smap_DEPENDENCIES) +smap$(EXEEXT): $(smap_OBJECTS) $(smap_DEPENDENCIES) $(EXTRA_smap_DEPENDENCIES) @rm -f smap$(EXEEXT) $(smap_LINK) $(smap_OBJECTS) $(smap_LDADD) $(LIBS) @@ -574,10 +574,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index c9c7829ba3..9f105066fa 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -401,7 +401,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sprio$(EXEEXT): $(sprio_OBJECTS) $(sprio_DEPENDENCIES) +sprio$(EXEEXT): $(sprio_OBJECTS) $(sprio_DEPENDENCIES) $(EXTRA_sprio_DEPENDENCIES) @rm -f sprio$(EXEEXT) $(sprio_LINK) $(sprio_OBJECTS) $(sprio_LDADD) $(LIBS) @@ -541,10 +541,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index 7f9c812aeb..ac7d2f7847 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -402,7 +402,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -squeue$(EXEEXT): $(squeue_OBJECTS) $(squeue_DEPENDENCIES) +squeue$(EXEEXT): $(squeue_OBJECTS) $(squeue_DEPENDENCIES) $(EXTRA_squeue_DEPENDENCIES) @rm -f squeue$(EXEEXT) $(squeue_LINK) $(squeue_OBJECTS) $(squeue_LDADD) $(LIBS) @@ -543,10 +543,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 134e18e123..5b120b33f5 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -410,7 +410,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sreport$(EXEEXT): $(sreport_OBJECTS) $(sreport_DEPENDENCIES) +sreport$(EXEEXT): $(sreport_OBJECTS) $(sreport_DEPENDENCIES) $(EXTRA_sreport_DEPENDENCIES) @rm -f sreport$(EXEEXT) $(sreport_LINK) $(sreport_OBJECTS) $(sreport_LDADD) $(LIBS) @@ -554,10 +554,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 94004ef3f5..073518e37d 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -428,7 +428,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -srun$(EXEEXT): $(srun_OBJECTS) $(srun_DEPENDENCIES) +srun$(EXEEXT): $(srun_OBJECTS) $(srun_DEPENDENCIES) $(EXTRA_srun_DEPENDENCIES) @rm -f srun$(EXEEXT) $(srun_LINK) $(srun_OBJECTS) $(srun_LDADD) $(LIBS) @@ -597,10 +597,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index 31a458c6a5..73dfd58e57 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -399,7 +399,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -srun_cr$(EXEEXT): $(srun_cr_OBJECTS) $(srun_cr_DEPENDENCIES) +srun_cr$(EXEEXT): $(srun_cr_OBJECTS) $(srun_cr_DEPENDENCIES) $(EXTRA_srun_cr_DEPENDENCIES) @rm -f srun_cr$(EXEEXT) $(srun_cr_LINK) $(srun_cr_OBJECTS) $(srun_cr_LDADD) $(LIBS) @@ -537,10 +537,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 06b87e4370..639da0181d 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -403,7 +403,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sshare$(EXEEXT): $(sshare_OBJECTS) $(sshare_DEPENDENCIES) +sshare$(EXEEXT): $(sshare_OBJECTS) $(sshare_DEPENDENCIES) $(EXTRA_sshare_DEPENDENCIES) @rm -f sshare$(EXEEXT) $(sshare_LINK) $(sshare_OBJECTS) $(sshare_LDADD) $(LIBS) @@ -542,10 +542,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 1fc71415a0..5f5edcaae7 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -403,7 +403,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sstat$(EXEEXT): $(sstat_OBJECTS) $(sstat_DEPENDENCIES) +sstat$(EXEEXT): $(sstat_OBJECTS) $(sstat_DEPENDENCIES) $(EXTRA_sstat_DEPENDENCIES) @rm -f sstat$(EXEEXT) $(sstat_LINK) $(sstat_OBJECTS) $(sstat_LDADD) $(LIBS) @@ -544,10 +544,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 3195376df2..699f62b18e 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -401,7 +401,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -strigger$(EXEEXT): $(strigger_OBJECTS) $(strigger_DEPENDENCIES) +strigger$(EXEEXT): $(strigger_OBJECTS) $(strigger_DEPENDENCIES) $(EXTRA_strigger_DEPENDENCIES) @rm -f strigger$(EXEEXT) $(strigger_LINK) $(strigger_OBJECTS) $(strigger_LDADD) $(LIBS) @@ -540,10 +540,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index 21ab41b4ce..d9b81e07ee 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -434,7 +434,7 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -sview$(EXEEXT): $(sview_OBJECTS) $(sview_DEPENDENCIES) +sview$(EXEEXT): $(sview_OBJECTS) $(sview_DEPENDENCIES) $(EXTRA_sview_DEPENDENCIES) @rm -f sview$(EXEEXT) $(sview_LINK) $(sview_OBJECTS) $(sview_LDADD) $(LIBS) @@ -781,10 +781,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 35bad713ed..2568a88ec1 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -515,7 +515,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-DEJAGNU: site.exp - srcdir=`$(am__cd) $(srcdir) && pwd`; export srcdir; \ + srcdir='$(srcdir)'; export srcdir; \ EXPECT=$(EXPECT); export EXPECT; \ runtest=$(RUNTEST); \ if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \ @@ -526,12 +526,12 @@ check-DEJAGNU: site.exp else echo "WARNING: could not find \`runtest'" 1>&2; :;\ fi; \ exit $$exit_status -site.exp: Makefile +site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG) @echo 'Making a new site.exp file...' @echo '## these variables are automatically generated by make ##' >site.tmp @echo '# Do not edit here. If you wish to override these values' >>site.tmp @echo '# edit the last section' >>site.tmp - @echo 'set srcdir $(srcdir)' >>site.tmp + @echo 'set srcdir "$(srcdir)"' >>site.tmp @echo "set objdir `pwd`" >>site.tmp @echo 'set build_alias "$(build_alias)"' >>site.tmp @echo 'set build_triplet $(build_triplet)' >>site.tmp @@ -539,9 +539,16 @@ site.exp: Makefile @echo 'set host_triplet $(host_triplet)' >>site.tmp @echo 'set target_alias "$(target_alias)"' >>site.tmp @echo 'set target_triplet $(target_triplet)' >>site.tmp - @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp - @test ! -f site.exp || \ - sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp + @list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \ + echo "## Begin content included from file $$f. Do not modify. ##" \ + && cat `test -f "$$f" || echo '$(srcdir)/'`$$f \ + && echo "## End content included from file $$f. ##" \ + || exit 1; \ + done >> site.tmp + @echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp + @if test -f site.exp; then \ + sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \ + fi @-rm -f site.bak @test ! -f site.exp || mv site.exp site.bak @mv site.tmp site.exp @@ -626,10 +633,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index e14fc6e9f0..46ff57fd51 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -761,10 +761,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/slurm_unit/Makefile.in b/testsuite/slurm_unit/Makefile.in index 191ebd6584..fe5daa4414 100644 --- a/testsuite/slurm_unit/Makefile.in +++ b/testsuite/slurm_unit/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -575,10 +575,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/slurm_unit/api/Makefile.in b/testsuite/slurm_unit/api/Makefile.in index 277f8a9f3b..3187d94bb9 100644 --- a/testsuite/slurm_unit/api/Makefile.in +++ b/testsuite/slurm_unit/api/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -397,7 +397,7 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -api-test$(EXEEXT): $(api_test_OBJECTS) $(api_test_DEPENDENCIES) +api-test$(EXEEXT): $(api_test_OBJECTS) $(api_test_DEPENDENCIES) $(EXTRA_api_test_DEPENDENCIES) @rm -f api-test$(EXEEXT) $(LINK) $(api_test_OBJECTS) $(api_test_LDADD) $(LIBS) @@ -652,14 +652,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -738,10 +739,15 @@ install-am: all-am installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/slurm_unit/api/manual/Makefile.in b/testsuite/slurm_unit/api/manual/Makefile.in index 91ae78f8db..178be55c9f 100644 --- a/testsuite/slurm_unit/api/manual/Makefile.in +++ b/testsuite/slurm_unit/api/manual/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -386,28 +386,28 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -cancel-tst$(EXEEXT): $(cancel_tst_OBJECTS) $(cancel_tst_DEPENDENCIES) +cancel-tst$(EXEEXT): $(cancel_tst_OBJECTS) $(cancel_tst_DEPENDENCIES) $(EXTRA_cancel_tst_DEPENDENCIES) @rm -f cancel-tst$(EXEEXT) $(LINK) $(cancel_tst_OBJECTS) $(cancel_tst_LDADD) $(LIBS) -complete-tst$(EXEEXT): $(complete_tst_OBJECTS) $(complete_tst_DEPENDENCIES) +complete-tst$(EXEEXT): $(complete_tst_OBJECTS) $(complete_tst_DEPENDENCIES) $(EXTRA_complete_tst_DEPENDENCIES) @rm -f complete-tst$(EXEEXT) $(LINK) $(complete_tst_OBJECTS) $(complete_tst_LDADD) $(LIBS) -job_info-tst$(EXEEXT): $(job_info_tst_OBJECTS) $(job_info_tst_DEPENDENCIES) +job_info-tst$(EXEEXT): $(job_info_tst_OBJECTS) $(job_info_tst_DEPENDENCIES) $(EXTRA_job_info_tst_DEPENDENCIES) @rm -f job_info-tst$(EXEEXT) $(LINK) $(job_info_tst_OBJECTS) $(job_info_tst_LDADD) $(LIBS) -node_info-tst$(EXEEXT): $(node_info_tst_OBJECTS) $(node_info_tst_DEPENDENCIES) +node_info-tst$(EXEEXT): $(node_info_tst_OBJECTS) $(node_info_tst_DEPENDENCIES) $(EXTRA_node_info_tst_DEPENDENCIES) @rm -f node_info-tst$(EXEEXT) $(LINK) $(node_info_tst_OBJECTS) $(node_info_tst_LDADD) $(LIBS) -partition_info-tst$(EXEEXT): $(partition_info_tst_OBJECTS) $(partition_info_tst_DEPENDENCIES) +partition_info-tst$(EXEEXT): $(partition_info_tst_OBJECTS) $(partition_info_tst_DEPENDENCIES) $(EXTRA_partition_info_tst_DEPENDENCIES) @rm -f partition_info-tst$(EXEEXT) $(LINK) $(partition_info_tst_OBJECTS) $(partition_info_tst_LDADD) $(LIBS) -reconfigure-tst$(EXEEXT): $(reconfigure_tst_OBJECTS) $(reconfigure_tst_DEPENDENCIES) +reconfigure-tst$(EXEEXT): $(reconfigure_tst_OBJECTS) $(reconfigure_tst_DEPENDENCIES) $(EXTRA_reconfigure_tst_DEPENDENCIES) @rm -f reconfigure-tst$(EXEEXT) $(LINK) $(reconfigure_tst_OBJECTS) $(reconfigure_tst_LDADD) $(LIBS) -submit-tst$(EXEEXT): $(submit_tst_OBJECTS) $(submit_tst_DEPENDENCIES) +submit-tst$(EXEEXT): $(submit_tst_OBJECTS) $(submit_tst_DEPENDENCIES) $(EXTRA_submit_tst_DEPENDENCIES) @rm -f submit-tst$(EXEEXT) $(LINK) $(submit_tst_OBJECTS) $(submit_tst_LDADD) $(LIBS) -update_config-tst$(EXEEXT): $(update_config_tst_OBJECTS) $(update_config_tst_DEPENDENCIES) +update_config-tst$(EXEEXT): $(update_config_tst_OBJECTS) $(update_config_tst_DEPENDENCIES) $(EXTRA_update_config_tst_DEPENDENCIES) @rm -f update_config-tst$(EXEEXT) $(LINK) $(update_config_tst_OBJECTS) $(update_config_tst_LDADD) $(LIBS) @@ -550,10 +550,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff --git a/testsuite/slurm_unit/common/Makefile.in b/testsuite/slurm_unit/common/Makefile.in index 92d412b995..34506aca9d 100644 --- a/testsuite/slurm_unit/common/Makefile.in +++ b/testsuite/slurm_unit/common/Makefile.in @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.3 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -381,16 +381,16 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -bitstring-test$(EXEEXT): $(bitstring_test_OBJECTS) $(bitstring_test_DEPENDENCIES) +bitstring-test$(EXEEXT): $(bitstring_test_OBJECTS) $(bitstring_test_DEPENDENCIES) $(EXTRA_bitstring_test_DEPENDENCIES) @rm -f bitstring-test$(EXEEXT) $(LINK) $(bitstring_test_OBJECTS) $(bitstring_test_LDADD) $(LIBS) -log-test$(EXEEXT): $(log_test_OBJECTS) $(log_test_DEPENDENCIES) +log-test$(EXEEXT): $(log_test_OBJECTS) $(log_test_DEPENDENCIES) $(EXTRA_log_test_DEPENDENCIES) @rm -f log-test$(EXEEXT) $(LINK) $(log_test_OBJECTS) $(log_test_LDADD) $(LIBS) -pack-test$(EXEEXT): $(pack_test_OBJECTS) $(pack_test_DEPENDENCIES) +pack-test$(EXEEXT): $(pack_test_OBJECTS) $(pack_test_DEPENDENCIES) $(EXTRA_pack_test_DEPENDENCIES) @rm -f pack-test$(EXEEXT) $(LINK) $(pack_test_OBJECTS) $(pack_test_LDADD) $(LIBS) -runqsw$(EXEEXT): $(runqsw_OBJECTS) $(runqsw_DEPENDENCIES) +runqsw$(EXEEXT): $(runqsw_OBJECTS) $(runqsw_DEPENDENCIES) $(EXTRA_runqsw_DEPENDENCIES) @rm -f runqsw$(EXEEXT) $(LINK) $(runqsw_OBJECTS) $(runqsw_LDADD) $(LIBS) @@ -565,14 +565,15 @@ check-TESTS: $(TESTS) fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -622,10 +623,15 @@ install-am: all-am installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: -- GitLab From f6bede588b3c2dc6ac7fa788b9cb2ac162262c0b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 31 May 2012 14:54:44 -0700 Subject: [PATCH 346/614] BGQ - Fix checking for IO on a block with new IBM driver V1R1M1 previous function didn't always work correctly. --- NEWS | 2 + .../select/bluegene/bl_bgq/bridge_linker.cc | 62 ++++++++++++++++--- 2 files changed, 56 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index 2bce521e27..9522038e5e 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ documents those changes that are of interest to users and admins. -- BGQ - fix issue where if a step uses the entire allocation and then the next step in the allocation only uses part of the allocation it gets the correct cnodes. + -- BGQ - Fix checking for IO on a block with new IBM driver V1R1M1 previous + function didn't always work correctly. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc index 2def294598..17334b1a75 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc @@ -67,6 +67,23 @@ static bool initialized = false; #ifdef HAVE_BG_FILES + +// For future code +// +// static int _check_version( +// const unsigned major, const unsigned minor, const unsigned micro) +// { +// if ((version::major > major) +// || (version::major == major +// && version::minor > minor) +// || (version::major == major +// && version::minor == minor +// && version::mod >= micro)) +// return true; + +// return false; +// } + /* ba_system_mutex needs to be locked before coming here */ static void _setup_ba_mp(int level, uint16_t *coords, ComputeHardware::ConstPtr bgqsys) @@ -675,6 +692,7 @@ extern int bridge_block_create(bg_record_t *bg_record) extern int bridge_block_boot(bg_record_t *bg_record) { int rc = SLURM_SUCCESS; + char *function_name; if (bg_record->magic != BLOCK_MAGIC) { error("boot_block: magic was bad"); @@ -715,34 +733,62 @@ extern int bridge_block_boot(bg_record_t *bg_record) } try { - std::vector mp_vec; - if (!Block::isIOConnected(bg_record->bg_block_id, &mp_vec)) { + std::vector res_vec; +#ifdef HAVE_BG_NEW_IO_CHECK + std::vector unconn_ionode_vec; + + function_name = (char *)"Block::checkIO"; + Block::checkIO(bg_record->bg_block_id, + &unconn_ionode_vec, + &res_vec); + if (!res_vec.empty()) { error("Block %s is not IOConnected, " + "contact your admin. Midplanes not " + "connected ...", bg_record->bg_block_id); + slurm_mutex_lock(&ba_system_mutex); + BOOST_FOREACH(const std::string& res, res_vec) { + ba_mp_t *ba_mp = loc2ba_mp(res.c_str()); + if (ba_mp) + error("%s(%s)", + res.c_str(), ba_mp->coord_str); + else + error("%s", res.c_str()); + } + slurm_mutex_unlock(&ba_system_mutex); + return BG_ERROR_NO_IOBLOCK_CONNECTED; + } +#else + function_name = (char *)"Block::isIOConnected"; + if (!Block::isIOConnected( + bg_record->bg_block_id, &res_vec)) { + error("Using old method, " + "block %s is not IOConnected, " "contact your admin. Hardware not " "connected ...", bg_record->bg_block_id); - BOOST_FOREACH(const std::string& mp, mp_vec) { - error("%s", mp.c_str()); + BOOST_FOREACH(const std::string& res, res_vec) { + error("%s", res.c_str()); } return BG_ERROR_NO_IOBLOCK_CONNECTED; } +#endif } catch (const bgsched::DatabaseException& err) { - rc = bridge_handle_database_errors("Block::isIOConnected", + rc = bridge_handle_database_errors(function_name, err.getError().toValue()); if (rc != SLURM_SUCCESS) return rc; } catch (const bgsched::InputException& err) { - rc = bridge_handle_input_errors("Block::isIOConnected", + rc = bridge_handle_input_errors(function_name, err.getError().toValue(), bg_record); if (rc != SLURM_SUCCESS) return rc; } catch (const bgsched::InternalException& err) { - rc = bridge_handle_internal_errors("Block::isIOConnected", + rc = bridge_handle_internal_errors(function_name, err.getError().toValue()); if (rc != SLURM_SUCCESS) return rc; } catch (...) { - error("isIOConnected request failed ... continuing."); + error("%s request failed ... continuing.", function_name); rc = SLURM_ERROR; } -- GitLab From 00da00d42d623eb15cfdef6fb90854ce4bdee4e6 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 31 May 2012 16:35:55 -0700 Subject: [PATCH 347/614] Modify test for select/serial plugin --- testsuite/expect/test17.27 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testsuite/expect/test17.27 b/testsuite/expect/test17.27 index f7c541c650..0182a050a7 100755 --- a/testsuite/expect/test17.27 +++ b/testsuite/expect/test17.27 @@ -45,10 +45,12 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code -} -if { [test_xcpu] } { +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit $exit_code +} elseif { [test_xcpu] } { send_user "\nWARNING: This test is incompatible with XCPU systems\n" - exit 0 + exit $exit_code } # -- GitLab From 8f429bfb93e139bd7ee5ac39c8cafc4ee94dddb5 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 31 May 2012 16:59:07 -0700 Subject: [PATCH 348/614] BGQ - Fix issue when a nodeboard goes down and you want to combine blocks to make a larger small block and are running with sub-blocks. --- NEWS | 2 ++ src/plugins/select/bluegene/bg_dynamic_block.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 9522038e5e..76e1efaf78 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ documents those changes that are of interest to users and admins. the correct cnodes. -- BGQ - Fix checking for IO on a block with new IBM driver V1R1M1 previous function didn't always work correctly. + -- BGQ - Fix issue when a nodeboard goes down and you want to combine blocks + to make a larger small block and are running with sub-blocks. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bg_dynamic_block.c b/src/plugins/select/bluegene/bg_dynamic_block.c index ff0fa9a20a..d8d9ef8744 100644 --- a/src/plugins/select/bluegene/bg_dynamic_block.c +++ b/src/plugins/select/bluegene/bg_dynamic_block.c @@ -65,6 +65,7 @@ extern List create_dynamic_block(List block_list, bitstr_t *my_bitmap = NULL; select_ba_request_t blockreq; int cnodes = request->procs / bg_conf->cpu_ratio; + int orig_cnodes = cnodes; uint16_t start_geo[SYSTEM_DIMENSIONS]; if (bg_conf->sub_blocks && (cnodes < bg_conf->mp_cnode_cnt)) { @@ -205,6 +206,7 @@ extern List create_dynamic_block(List block_list, if (request->avail_mp_bitmap) ba_set_removable_mps(request->avail_mp_bitmap, 1); +try_small_again: if (request->size==1 && cnodes < bg_conf->mp_cnode_cnt) { switch(cnodes) { #ifdef HAVE_BGL @@ -440,6 +442,11 @@ setup_records: } finished: + if (!new_blocks && orig_cnodes != cnodes) { + cnodes = orig_cnodes; + goto try_small_again; + } + if (request->avail_mp_bitmap && (bit_ffc(request->avail_mp_bitmap) == -1)) ba_reset_all_removed_mps(); @@ -453,12 +460,15 @@ finished: } list_iterator_destroy(itr); - xfree(request->save_name); - if (results) + if (results) { list_destroy(results); + results = NULL; + } + errno = rc; + return new_blocks; } -- GitLab From 4c76203724add68fa0c4cc9df133f42293e07a40 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 07:57:24 -0700 Subject: [PATCH 349/614] Fix typo in comment --- testsuite/expect/README | 2 +- testsuite/expect/test2.6 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/README b/testsuite/expect/README index 776ba6f1be..1d85aca069 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -206,7 +206,7 @@ test2.3 Validate scontrol ping command. test2.4 Validate scontrol exit, quit, and !! commands. test2.5 Validate scontrol show commands for configuation, daemons, nodes, frontends, and partitions. -test2.6 Validate scontrol verbose and quite options. +test2.6 Validate scontrol verbose and quiet options. test2.7 Validate scontrol pidinfo command. test2.8 Validate scontrol show commands for jobs and steps. test2.9 Validate scontrol completing command. diff --git a/testsuite/expect/test2.6 b/testsuite/expect/test2.6 index f1c32c56de..5a995a612f 100755 --- a/testsuite/expect/test2.6 +++ b/testsuite/expect/test2.6 @@ -1,7 +1,7 @@ #!/usr/bin/expect ############################################################################ # Purpose: Test of SLURM functionality -# Validate scontrol verbose and quite options. +# Validate scontrol verbose and quiet options. # # Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR # "FAILURE: ..." otherwise with an explanation of the failure, OR -- GitLab From 7ee458024da17b3f980d415be9ff708cc728a8ca Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 09:31:42 -0700 Subject: [PATCH 350/614] Add variant of batch job throughput test --- testsuite/expect/Makefile.am | 1 + testsuite/expect/Makefile.in | 1 + testsuite/expect/test9.9.prog.c | 88 +++++++++++++++++++++++++++++++++ 3 files changed, 90 insertions(+) create mode 100644 testsuite/expect/test9.9.prog.c diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am index 5827e79003..50967bddb2 100644 --- a/testsuite/expect/Makefile.am +++ b/testsuite/expect/Makefile.am @@ -233,6 +233,7 @@ EXTRA_DIST = \ test9.8 \ test9.9 \ test9.9.bash \ + test9.9.prog.c \ test10.1 \ test10.2 \ test10.3 \ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index 7edfe55106..b363651b3f 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -517,6 +517,7 @@ EXTRA_DIST = \ test9.8 \ test9.9 \ test9.9.bash \ + test9.9.prog.c \ test10.1 \ test10.2 \ test10.3 \ diff --git a/testsuite/expect/test9.9.prog.c b/testsuite/expect/test9.9.prog.c new file mode 100644 index 0000000000..95a68e9368 --- /dev/null +++ b/testsuite/expect/test9.9.prog.c @@ -0,0 +1,88 @@ +/*****************************************************************************\ + * test9.9.prog.c - link and test algo of the multifactor plugin. + * + * Usage: test9.9.prog + * + * NOTE: This is a variant of test9.9.bash. It seems to have the ability to + * run more jobs without problems running out of process IDs (it tests the + * fork call for errors and retries), but run slower than test9.9.bash. + ***************************************************************************** + * Copyright (C) 2012 SchedMD LLC. + * Written by Morris Jette + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ +#include +#include +#include +#include +#include + +static inline void _spawn_job(char *path, char **argv) +{ + int status; + pid_t pid; + + while ((pid = fork()) < 0) + usleep(100); + if (pid == 0) { + close(1); + close(2); + execv(path, argv); + exit(0); + } + waitpid(-1, &status, WNOHANG); /* reap processes when possible */ + + //system(command); +} + +int main (int argc, char **argv) +{ + char *command[10]; + int iterations, status; + int i; + + if (argc != 5) { + printf("FAILURE: Usage: test9.9.prog " + " \n"); + exit(1); + } + iterations = atoi(argv[4]); + if (iterations < 1) { + printf("FAILURE: Invalid iterations count (%s)\n", argv[4]); + exit(1); + } + + command[0] = "sbatch"; + command[1] = "-J"; + command[2] = argv[3]; + command[3] = "-o"; + command[4] = "/dev/null"; + command[5] = "--wrap"; + command[6] = argv[2]; + command[7] = NULL; + + for (i = 0; i < iterations; i++) { + _spawn_job(argv[1], command); + } + + while ((wait(&status) >= 0)) ; + + return 0; +} -- GitLab From 7f4ace075600b8101f628d1fabc0f05ed36d38c8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 10:54:54 -0700 Subject: [PATCH 351/614] Add logic to submit batch jobs in blocks a configurable size (count) --- testsuite/expect/test9.9 | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index 2b40b4f859..687e922350 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -31,24 +31,41 @@ source ./globals set test_id "9.9" set exit_code 0 -set job_cnt 5000 set test_script "./test$test_id.bash" +# job_blocks Submit jobs in blocks of this size (job count) +set job_blocks 5000 + +# job_cnt Number of batch jobs to be submitted +set job_cnt 5000 + print_header $test_id if {[test_front_end] != 0 || $enable_memory_leak_debug != 0} { set job_cnt 2 } +# NOTE: test9.9.bash seems to have trouble running out of process IDs when +# more than about 5000 jobs are submitted at one time, so we execute the +# script multiple times if necessary. A more reliable alternative would be +# to catch the fork() failures and retry. proc _submit_jobs { job_name test_file } { - global exit_code job_cnt sbatch test_script + global exit_code job_blocks job_cnt sbatch test_script log_user 0 - spawn -nottyinit -nottycopy $test_script $sbatch "/bin/hostname" $job_name $job_cnt - expect { - eof { - wait + for {set jobs_rem $job_cnt} {$jobs_rem > 0} { } { + if {$jobs_rem > $job_blocks} { + set submit_cnt $job_blocks + } else { + set submit_cnt $jobs_rem + } + spawn -nottyinit -nottycopy $test_script $sbatch "/bin/hostname" $job_name $submit_cnt + expect { + eof { + wait + } } + set jobs_rem [expr $jobs_rem - $job_blocks] } log_user 1 if {[wait_for_all_jobs $job_name 0] != 0} { -- GitLab From 7db047898d1b6182c8715b4a5ce5f37cba423d5c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 10:55:32 -0700 Subject: [PATCH 352/614] Change minimum sleep time for wait_for_all_jobs expect test --- testsuite/expect/globals | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 244ae2cd8c..18e262c6ca 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -655,10 +655,15 @@ proc wait_for_all_jobs { job_name incr_sleep } { global scancel squeue bin_sleep set matches 0 - set sleep_time 1 set my_delay 0 set last_matches 0 set timeout 30 + + if {$incr_sleep == 0} { + set sleep_time 0.2 + } else { + set sleep_time 1 + } send_user "Waiting for all jobs to terminate\n" for {set inx 0} {$inx < 600} {incr inx} { log_user 0 -- GitLab From 1a8d0bbebf191f953459f6c334f2a87eb3387560 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 11:44:39 -0700 Subject: [PATCH 353/614] Largely cosmetic mods for select/serial logic --- src/slurmctld/job_scheduler.c | 12 +++++++++--- src/slurmctld/proc_req.c | 7 ++++++- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 2a0930b779..c982bfc900 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -419,8 +419,14 @@ extern bool replace_batch_job(slurm_msg_t * msg, void *fini_job) now = time(NULL); min_age = now - slurmctld_conf.min_job_age; lock_slurmctld(job_write_lock); - xassert(fini_job_ptr->job_resrcs); - xassert(fini_job_ptr->job_resrcs->node_bitmap); + if (!fini_job_ptr->job_resrcs || + !fini_job_ptr->job_resrcs->node_bitmap) { + /* This should never happen, but if it does, avoid using + * a bad pointer below. */ + error("job_resrcs empty for job %u", fini_job_ptr->job_id); + unlock_slurmctld(job_write_lock); + goto send_reply; + } if (!avail_front_end()) { unlock_slurmctld(job_write_lock); goto send_reply; @@ -759,7 +765,7 @@ extern int schedule(uint32_t job_limit) while (1) { if (fifo_sched) { if (job_ptr && part_iterator && - IS_JOB_PENDING(job_ptr))/* started in other part */ + IS_JOB_PENDING(job_ptr)) /*started in other part?*/ goto next_part; job_ptr = (struct job_record *) list_next(job_iterator); if (!job_ptr) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 2faf4bfe98..92d7483744 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -2674,7 +2674,12 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) response_msg.msg_type = RESPONSE_SUBMIT_BATCH_JOB; response_msg.data = &submit_msg; slurm_send_node_msg(msg->conn_fd, &response_msg); - schedule(2); /* has own locks */ + /* We need to use schedule() to initiate a batch job in order + * to run the various prologs, boot the node, etc. + * We also run schedule() even if this job could not start, + * say due to a higher priority job, since the locks are + * released above and we might start some other job here. */ + schedule(1); /* has own locks */ schedule_job_save(); /* has own locks */ schedule_node_save(); /* has own locks */ } -- GitLab From 0a1837a5fd9998bf3c9ea5b803eda34f0ffc9638 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 1 Jun 2012 14:06:12 -0700 Subject: [PATCH 354/614] BLUEGENE - correct logic to handle splitting a block. --- src/plugins/select/bluegene/bg_record_functions.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index 6c540176dc..7eb5592278 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1202,9 +1202,10 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, if (create_size != bg_conf->nodecard_cnode_cnt) { blockreq.small128 = blockreq.small32 / 4; blockreq.small32 = 0; - io_start = 0; - } else if ((io_start = - bit_ffs(smallest_bg_record->ionode_bitmap)) == -1) + } + + if ((io_start = + bit_ffs(smallest_bg_record->ionode_bitmap)) == -1) /* set the start to be the same as the start of the ionode_bitmap. If no ionodes set (not a small block) set io_start = 0. */ -- GitLab From c0fb0bbbbaa0c94a9231c406463bf3441d281921 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 1 Jun 2012 14:07:27 -0700 Subject: [PATCH 355/614] BGQ - better fix for making new blocks when nodeboard goes down and using sub-blocks. --- NEWS | 1 + .../select/bluegene/bg_record_functions.c | 45 ++++++++++++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 76e1efaf78..dfa3210f41 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ documents those changes that are of interest to users and admins. function didn't always work correctly. -- BGQ - Fix issue when a nodeboard goes down and you want to combine blocks to make a larger small block and are running with sub-blocks. + -- BLUEGENE - Better logic for making small blocks around bad nodeboard/card. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index 7eb5592278..7d8bad9605 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1249,7 +1249,6 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, smallest block that takes up the entire midplane. */ } - /* Here we need to add blocks that take up nodecards on this midplane. Since Slurm only keeps track of midplanes natively this is the only want to handle this case. @@ -1257,6 +1256,50 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, requests = list_create(destroy_bg_record); add_bg_record(requests, NULL, &blockreq, 1, io_start); + if (bg_conf->sub_blocks + && (!smallest_bg_record + || smallest_bg_record->cnode_cnt == bg_conf->mp_cnode_cnt)) { + bg_record_t *rem_record = NULL; + memset(&blockreq, 0, sizeof(select_ba_request_t)); + blockreq.conn_type[0] = SELECT_SMALL; + blockreq.save_name = mp_name; + blockreq.small256 = 2; + add_bg_record(requests, NULL, &blockreq, 1, io_start); + + itr = list_iterator_create(requests); + while ((bg_record = list_next(itr))) { + if (bit_overlap(bg_record->ionode_bitmap, + tmp_record.ionode_bitmap)) { + if (bg_record->cnode_cnt == 256) { + info("found remove record"); + print_bg_record(bg_record); + rem_record = bg_record; + list_remove(itr); + break; + } + } + } + if (!rem_record) { + /* this should never happen */ + error("down_nodecard: something bad happened " + "with creation of 256 block"); + } else { + list_iterator_reset(itr); + while ((bg_record = list_next(itr))) { + if (bg_record->cnode_cnt == 256) + continue; + if (!bit_overlap(bg_record->ionode_bitmap, + rem_record->ionode_bitmap)) { + info("removing"); + print_bg_record(bg_record); + list_delete_item(itr); + } + } + destroy_bg_record(rem_record); + } + list_iterator_destroy(itr); + } + slurm_mutex_lock(&block_state_mutex); delete_list = list_create(NULL); while ((bg_record = list_pop(requests))) { -- GitLab From 2bcc3b2e54830ee9107a2ed35946913d68c481f2 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 1 Jun 2012 14:10:26 -0700 Subject: [PATCH 356/614] remove debug from last commit --- src/plugins/select/bluegene/bg_record_functions.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index 7d8bad9605..36bfd76b97 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1271,7 +1271,6 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, if (bit_overlap(bg_record->ionode_bitmap, tmp_record.ionode_bitmap)) { if (bg_record->cnode_cnt == 256) { - info("found remove record"); print_bg_record(bg_record); rem_record = bg_record; list_remove(itr); @@ -1290,7 +1289,6 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, continue; if (!bit_overlap(bg_record->ionode_bitmap, rem_record->ionode_bitmap)) { - info("removing"); print_bg_record(bg_record); list_delete_item(itr); } -- GitLab From b2096c920058e74d90a32552b47ba52e5a6f041d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 1 Jun 2012 14:29:57 -0700 Subject: [PATCH 357/614] Move some job request validation logic outside of job locks --- src/slurmctld/job_mgr.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 92a2b45cd6..23d7f05049 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3935,11 +3935,6 @@ static int _job_create(job_desc_msg_t * job_desc, int allocate, int will_run, if (error_code != SLURM_SUCCESS) goto cleanup_fail; - /* Make sure anything that may be put in the database will be - lower case */ - xstrtolower(job_desc->account); - xstrtolower(job_desc->wckey); - if ((error_code = _validate_job_desc(job_desc, allocate, submit_uid, part_ptr))) { error_code = error_code; @@ -4310,6 +4305,11 @@ extern int validate_job_create_req(job_desc_msg_t * job_desc) _test_strlen(job_desc->work_dir, "work_dir", 1024)) return ESLURM_PATHNAME_TOO_LONG; + /* Make sure anything that may be put in the database will be + * lower case */ + xstrtolower(job_desc->account); + xstrtolower(job_desc->wckey); + return SLURM_SUCCESS; } -- GitLab From 952401ec2a56da2b005e6870a0121ccb391736bc Mon Sep 17 00:00:00 2001 From: jette Date: Sat, 2 Jun 2012 20:20:03 -0700 Subject: [PATCH 358/614] Permit more than 100 jobs to be scheduled per node. --- NEWS | 2 ++ src/plugins/select/cons_res/select_cons_res.h | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index fa56a97814..364bd5978f 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,8 @@ documents those changes that are of interest to users and admins. -- Change license option count separator from "*" to ":" for consistency with the gres option (e.g. "--licenses=foo:2 --gres=gpu:2"). The "*" will still be accepted, but is no longer documented. + -- Permit more than 100 jobs to be scheduled per node (new limit is 10,000 + jobs). * Changes in SLURM 2.4.0.rc2 ============================= diff --git a/src/plugins/select/cons_res/select_cons_res.h b/src/plugins/select/cons_res/select_cons_res.h index 7efd0ac4c0..4cd80f0672 100644 --- a/src/plugins/select/cons_res/select_cons_res.h +++ b/src/plugins/select/cons_res/select_cons_res.h @@ -79,9 +79,9 @@ * preemption, which can override these protections. */ enum node_cr_state { - NODE_CR_AVAILABLE = 0, /* The node may be IDLE or IN USE (shared) */ - NODE_CR_ONE_ROW = 1, /* node is in use by Shared=NO part */ - NODE_CR_RESERVED = 100, /* node is in use by Shared=EXCLUSIVE part */ + NODE_CR_AVAILABLE = 0, /* The node may be IDLE or IN USE (shared) */ + NODE_CR_ONE_ROW = 1, /* node is in use by Shared=NO part */ + NODE_CR_RESERVED = 10000, /* node is in use by Shared=EXCLUSIVE part */ }; /* a partition's per-row CPU allocation data */ -- GitLab From d633771e7856837edee08199bd73481884643e73 Mon Sep 17 00:00:00 2001 From: jette Date: Sun, 3 Jun 2012 10:25:08 -0700 Subject: [PATCH 359/614] Modify select/serial to start up to 10000 jobs per node --- src/plugins/select/serial/select_serial.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/select/serial/select_serial.h b/src/plugins/select/serial/select_serial.h index 95f06c0327..90da1cc35d 100644 --- a/src/plugins/select/serial/select_serial.h +++ b/src/plugins/select/serial/select_serial.h @@ -78,9 +78,9 @@ * preemption, which can override these protections. */ enum node_cr_state { - NODE_CR_AVAILABLE = 0, /* The node may be IDLE or IN USE (shared) */ - NODE_CR_ONE_ROW = 1, /* node is in use by Shared=NO part */ - NODE_CR_RESERVED = 100, /* node is in use by Shared=EXCLUSIVE part */ + NODE_CR_AVAILABLE = 0, /* The node may be IDLE or IN USE (shared) */ + NODE_CR_ONE_ROW = 1, /* node is in use by Shared=NO part */ + NODE_CR_RESERVED = 10000, /* node is in use by Shared=EXCLUSIVE part */ }; /* a partition's per-row CPU allocation data */ -- GitLab From 3e608f3a993e87ef57eaae5ea4725be92dfc416b Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Mon, 4 Jun 2012 11:08:21 -0700 Subject: [PATCH 360/614] Clarify enforcement of job's --mem option: I'd like to add the following disclaimer to the documentation of the --mem option to the salloc/sbatch/srun commands. There is currently similar wording in the slurm.conf file, but I've received a bug report in which the memory limits were exceeded (until the next accounting poll). NOTE: Enforcement of memory limits currently requires enabling of accounting, which samples memory use on a periodic basis (data need not be stored, just collected). A task may exceed the memory limit until the next periodic accounting sample. Rod Schultz, Bull --- doc/man/man1/salloc.1 | 4 ++++ doc/man/man1/sbatch.1 | 4 ++++ doc/man/man1/srun.1 | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index dac8c5acdd..e1218f2f1a 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -603,6 +603,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index cd7113e7bb..07d4a24c50 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -667,6 +667,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 18065d60e3..ec947aa028 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -661,6 +661,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> -- GitLab From 8d2929896917e9e709065c13d20f783c6bda5772 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 4 Jun 2012 11:09:49 -0700 Subject: [PATCH 361/614] Revert "Clarify enforcement of job's --mem option:" This reverts commit 3e608f3a993e87ef57eaae5ea4725be92dfc416b. --- doc/man/man1/salloc.1 | 4 ---- doc/man/man1/sbatch.1 | 4 ---- doc/man/man1/srun.1 | 4 ---- 3 files changed, 12 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index e1218f2f1a..dac8c5acdd 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -603,10 +603,6 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. -NOTE: Enforcement of memory limits currently requires enabling of -accounting, which samples memory use on a periodic basis (data need -not be stored, just collected). A task may exceed the memory limit -until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 07d4a24c50..cd7113e7bb 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -667,10 +667,6 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. -NOTE: Enforcement of memory limits currently requires enabling of -accounting, which samples memory use on a periodic basis (data need -not be stored, just collected). A task may exceed the memory limit -until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index ec947aa028..18065d60e3 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -661,10 +661,6 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. -NOTE: Enforcement of memory limits currently requires enabling of -accounting, which samples memory use on a periodic basis (data need -not be stored, just collected). A task may exceed the memory limit -until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> -- GitLab From 54b636426ae187789b13df2509e007f96e9ee198 Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Mon, 4 Jun 2012 11:10:12 -0700 Subject: [PATCH 362/614] Document enforcement of job's --mem option I'd like to add the following disclaimer to the documentation of the --mem option to the salloc/sbatch/srun commands. There is currently similar wording in the slurm.conf file, but I've received a bug report in which the memory limits were exceeded (until the next accounting poll). NOTE: Enforcement of memory limits currently requires enabling of accounting, which samples memory use on a periodic basis (data need not be stored, just collected). A task may exceed the memory limit until the next periodic accounting sample. Rod Schultz, Bull --- doc/man/man1/salloc.1 | 4 ++++ doc/man/man1/sbatch.1 | 4 ++++ doc/man/man1/srun.1 | 4 ++++ 3 files changed, 12 insertions(+) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index ab98849909..0beb4402fd 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -603,6 +603,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 16d7e13ba8..c5fcafbb5f 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -667,6 +667,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 79faec6644..85b8bfab46 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -661,6 +661,10 @@ This parameter would generally be used if whole nodes are allocated to jobs (\fBSelectType=select/linear\fR). Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. +NOTE: Enforcement of memory limits currently requires enabling of +accounting, which samples memory use on a periodic basis (data need +not be stored, just collected). A task may exceed the memory limit +until the next periodic accounting sample. .TP \fB\-\-mem\-per\-cpu\fR=<\fIMB\fR> -- GitLab From 7859dd21aa81ba08e523248148f5c354ebe54211 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 4 Jun 2012 15:06:31 -0700 Subject: [PATCH 363/614] Minor improvements to credential logging --- src/common/slurm_cred.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/common/slurm_cred.c b/src/common/slurm_cred.c index 2ac825c31c..92e1267967 100644 --- a/src/common/slurm_cred.c +++ b/src/common/slurm_cred.c @@ -997,12 +997,15 @@ slurm_cred_begin_expiration(slurm_cred_ctx_t ctx, uint32_t jobid) } j->expiration = time(NULL) + ctx->expiry_window; -#if EXTREME_DEBUG +#if DEBUG_TIME { char buf[64]; debug2("set revoke expiration for jobid %u to %s", - j->jobid, timestr (&j->expiration, buf, 64) ); + j->jobid, timestr(&j->expiration, buf, 64)); } +#else + debug2("set revoke expiration for jobid %u to %"PRIu64" UTS", + j->jobid, (uint64_t) j->expiration); #endif slurm_mutex_unlock(&ctx->mutex); return SLURM_SUCCESS; @@ -1665,7 +1668,7 @@ extern char * timestr (const time_t *tp, char *buf, size_t n) #ifdef DISABLE_LOCALTIME static int disabled = 0; if (buf == NULL) - disabled=1; + disabled = 1; if (disabled) return NULL; #endif @@ -1721,10 +1724,13 @@ _credential_revoked(slurm_cred_ctx_t ctx, slurm_cred_t *cred) } if (cred->ctime <= j->revoked) { -#if EXTREME_DEBUG +#if DEBUG_TIME char buf[64]; debug3("cred for %u revoked. expires at %s", j->jobid, timestr(&j->expiration, buf, 64)); +#else + debug3("cred for %u revoked. expires at %"PRIu64" UTS", + j->jobid, (uint64_t) j->expiration); #endif return true; } @@ -1801,7 +1807,7 @@ _clear_expired_job_states(slurm_cred_ctx_t ctx) if (!i) fatal("list_iterator_create: malloc failure"); while ((j = list_next(i))) { -#if EXTREME_DEBUG +#if DEBUG_TIME char t1[64], t2[64], t3[64]; if (j->revoked) { strcpy(t2, " revoked:"); @@ -1817,6 +1823,11 @@ _clear_expired_job_states(slurm_cred_ctx_t ctx) } debug3("state for jobid %u: ctime:%s%s%s", j->jobid, timestr(&j->ctime, t1, 64), t2, t3); +#else + debug3("state for jobid %u: ctime:%"PRIu64" revoked:%"PRIu64" " + "expires:%"PRIu64"", + j->jobid, (uint64_t)j->ctime, (uint64_t)j->revoked, + (uint64_t)j->revoked); #endif if (j->revoked && (now > j->expiration)) { list_delete_item(i); -- GitLab From 88aa72ada9cb20714fa66d52aa6a318029d34315 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 1 Jun 2012 14:50:27 -0700 Subject: [PATCH 364/614] BGQ - move variable to avoid warning when not on real BGQ system --- src/plugins/select/bluegene/bl_bgq/bridge_linker.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc index 17334b1a75..05e7989c9c 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc @@ -692,7 +692,6 @@ extern int bridge_block_create(bg_record_t *bg_record) extern int bridge_block_boot(bg_record_t *bg_record) { int rc = SLURM_SUCCESS; - char *function_name; if (bg_record->magic != BLOCK_MAGIC) { error("boot_block: magic was bad"); @@ -706,6 +705,7 @@ extern int bridge_block_boot(bg_record_t *bg_record) return SLURM_ERROR; #ifdef HAVE_BG_FILES + char *function_name; /* Lets see if we are connected to the IO. */ try { uint32_t avail, unavail; -- GitLab From 07843fd3e7000eec6046cdd5ef8e73b37516d2d9 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 15:31:32 -0700 Subject: [PATCH 365/614] BGQ - When using an old IBM driver cnodes that go into error because of a job kill timeout aren't always reported to the system. This is now handled by the runjob_mux plugin. --- NEWS | 3 + src/common/node_select.c | 15 +++ src/common/node_select.h | 8 ++ .../select/bluegene/ba_bgq/block_allocator.c | 4 + .../select/bluegene/ba_bgq/block_allocator.h | 2 + src/plugins/select/bluegene/runjob_plugin.cc | 30 ++++- src/plugins/select/bluegene/select_bluegene.c | 107 +++++++++++++++++- src/plugins/select/cons_res/select_cons_res.c | 5 + src/plugins/select/cray/other_select.c | 15 +++ src/plugins/select/cray/other_select.h | 7 ++ src/plugins/select/cray/select_cray.c | 5 + src/plugins/select/linear/select_linear.c | 5 + src/slurmctld/step_mgr.c | 21 +++- 13 files changed, 220 insertions(+), 7 deletions(-) diff --git a/NEWS b/NEWS index dfa3210f41..55339cea35 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,9 @@ documents those changes that are of interest to users and admins. -- BGQ - Fix issue when a nodeboard goes down and you want to combine blocks to make a larger small block and are running with sub-blocks. -- BLUEGENE - Better logic for making small blocks around bad nodeboard/card. + -- BGQ - When using an old IBM driver cnodes that go into error because of + a job kill timeout aren't always reported to the system. This is now + handled by the runjob_mux plugin. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/common/node_select.c b/src/common/node_select.c index d2bbd0c982..6e31d669a7 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -117,6 +117,7 @@ static int _select_get_ops(char *select_type, "select_p_select_jobinfo_xstrdup", "select_p_update_block", "select_p_update_sub_node", + "select_p_fail_cnode", "select_p_get_info_from_plugin", "select_p_update_node_config", "select_p_update_node_state", @@ -1200,6 +1201,20 @@ extern int select_g_update_sub_node (update_block_msg_t *block_desc_ptr) update_sub_node))(block_desc_ptr); } +/* + * Fail certain cnodes in a blocks midplane (usually comes from the + * IBM runjob mux) + * IN step_ptr - step that has failed cnodes + */ +extern int select_g_fail_cnode (struct step_record *step_ptr) +{ + if (slurm_select_init(0) < 0) + return SLURM_ERROR; + + return (*(select_context[select_context_default].ops. + fail_cnode))(step_ptr); +} + /* * Get select data from a plugin * IN dinfo - type of data to get from the node record diff --git a/src/common/node_select.h b/src/common/node_select.h index e55b58b275..a9fcd389b8 100644 --- a/src/common/node_select.h +++ b/src/common/node_select.h @@ -203,6 +203,7 @@ typedef struct slurm_select_ops { *block_desc_ptr); int (*update_sub_node) (update_block_msg_t *block_desc_ptr); + int (*fail_cnode) (struct step_record *step_ptr); int (*get_info_from_plugin) (enum select_plugindata_info dinfo, struct job_record *job_ptr, @@ -401,6 +402,13 @@ extern int select_g_update_sub_node (update_block_msg_t *block_desc_ptr); */ extern int select_g_update_block (update_block_msg_t *block_desc_ptr); +/* + * Fail certain cnodes in a blocks midplane (usually comes from the + * IBM runjob mux) + * IN step_ptr - step with failed cnodes + */ +extern int select_g_fail_cnode (struct step_record *step_ptr); + /******************************************************\ * JOB SPECIFIC SELECT CREDENTIAL MANAGEMENT FUNCIONS * \******************************************************/ diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 24977d33f8..1f0d67d8cc 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -1718,6 +1718,10 @@ extern int ba_translate_coord2nc(uint16_t *cnode_coords) return nc_loc; } +extern ba_mp_t *ba_inx2ba_mp(int inx) +{ + return ba_main_grid_array[inx]; +} static char *_copy_from_main(List main_mps, List ret_list) { diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.h b/src/plugins/select/bluegene/ba_bgq/block_allocator.h index 2911f6641d..337dc3b37c 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.h +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.h @@ -54,4 +54,6 @@ extern ba_mp_t ****ba_main_grid; extern ba_geo_system_t *ba_mp_geo_system; extern int ba_translate_coord2nc(uint16_t *cnode_coords); +extern ba_mp_t *ba_inx2ba_mp(int inx); + #endif /* _BLOCK_ALLOCATOR_H_ */ diff --git a/src/plugins/select/bluegene/runjob_plugin.cc b/src/plugins/select/bluegene/runjob_plugin.cc index 91103965ee..0830ecd3b2 100644 --- a/src/plugins/select/bluegene/runjob_plugin.cc +++ b/src/plugins/select/bluegene/runjob_plugin.cc @@ -48,6 +48,7 @@ extern "C" { #include "src/common/xmalloc.h" #include "src/common/list.h" #include "src/common/hostlist.h" +#include "src/common/slurm_protocol_defs.h" #include } @@ -103,7 +104,6 @@ typedef struct { static List runjob_list = NULL; static pthread_mutex_t runjob_list_lock = PTHREAD_MUTEX_INITIALIZER; - static void _destroy_runjob_job(void *object) { runjob_job_t *runjob_job = (runjob_job_t *)object; @@ -114,6 +114,22 @@ static void _destroy_runjob_job(void *object) } } +static void _send_failed_cnodes(uint32_t job_id, uint32_t step_id, uint16_t sig) +{ + int rc; + + while ((rc = slurm_kill_job_step(job_id, step_id, sig))) { + rc = slurm_get_errno(); + + if (rc == ESLURM_ALREADY_DONE || rc == ESLURM_INVALID_JOB_ID) + break; + std::cerr << "Trying to fail cnodes, message from slurmctld: " + << slurm_strerror(rc) << std::endl; + sleep (5); + } +} + + Plugin::Plugin() : bgsched::runjob::Plugin(), _mutex() @@ -366,6 +382,7 @@ void Plugin::execute(const bgsched::runjob::Terminated& data) { ListIterator itr = NULL; runjob_job_t *runjob_job = NULL; + uint16_t sig = 0; boost::lock_guard lock( _mutex ); // std::cout << "runjob " << data.pid() << " shadowing job " @@ -396,6 +413,10 @@ void Plugin::execute(const bgsched::runjob::Terminated& data) } else if (data.kill_timeout()) { std::cerr << runjob_job->job_id << "." << runjob_job->step_id << " had a kill_timeout()" << std::endl; + /* In an older driver this wasn't always caught, so + send it. + */ + sig = SIG_NODE_FAIL; } else if (!nodes.empty()) { char tmp_char[6]; @@ -418,7 +439,12 @@ void Plugin::execute(const bgsched::runjob::Terminated& data) << " had a message of '" << data.message() << "'. (" << runjob_job->total_cnodes << ")" << std::endl; - } + } // else if (data.status() == 9) + // sig = SIGKILL; + + if (sig) + _send_failed_cnodes( + runjob_job->job_id, runjob_job->step_id, sig); _destroy_runjob_job(runjob_job); } diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 378d69a900..eec15506d8 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -42,7 +42,7 @@ #include "bg_read_config.h" #include "bg_defined_block.h" -#ifdef HAVE_BGQ +#ifndef HAVE_BG_L_P # include "ba_bgq/block_allocator.h" #else # include "ba/block_allocator.h" @@ -2784,6 +2784,111 @@ end_it: #endif } +/* While the realtime server should get all the cnode state changes on + * older versions of the IBM driver if a job has a timeout it doesn't + * always happen. So what happens is the runjob_mux will now send a + * nice cancel to the slurmctld to make sure it gets marked. + */ +extern int select_p_fail_cnode(struct step_record *step_ptr) +{ +#if defined HAVE_BG && !defined HAVE_BG_L_P + bg_record_t *bg_record; + select_nodeinfo_t *nodeinfo; + select_jobinfo_t *jobinfo; + select_jobinfo_t *step_jobinfo; + struct node_record *node_ptr = NULL; + ListIterator itr, itr2; + ba_mp_t *ba_mp = NULL, *found_ba_mp; + int i; + + xassert(step_ptr); + + jobinfo = step_ptr->job_ptr->select_jobinfo->data; + step_jobinfo = step_ptr->select_jobinfo->data; + + for (i=0; istep_node_bitmap); i++) { + if (!bit_test(step_ptr->step_node_bitmap, i)) + continue; + ba_mp = ba_inx2ba_mp(i); + xassert(ba_mp); + + if (jobinfo->units_avail) { + bit_or(ba_mp->cnode_err_bitmap, + step_jobinfo->units_used); + } else { + bit_nset(ba_mp->cnode_err_bitmap, 0, + bit_size(ba_mp->cnode_err_bitmap)-1); + } + node_ptr = &(node_record_table_ptr[ba_mp->index]); + xassert(node_ptr->select_nodeinfo); + nodeinfo = (select_nodeinfo_t *)node_ptr->select_nodeinfo->data; + xassert(nodeinfo); + xfree(nodeinfo->failed_cnodes); + nodeinfo->failed_cnodes = ba_node_map_ranged_hostlist( + ba_mp->cnode_err_bitmap, ba_mp_geo_system); + } + + if (!ba_mp) { + error("select_p_fail_cnode: no ba_mp? " + "This should never happen"); + return SLURM_ERROR; + } + + slurm_mutex_lock(&block_state_mutex); + itr = list_iterator_create(bg_lists->main); + while ((bg_record = (bg_record_t *)list_next(itr))) { + if (!bit_overlap(step_ptr->step_node_bitmap, + bg_record->mp_bitmap)) + continue; + itr2 = list_iterator_create(bg_record->ba_mp_list); + while ((found_ba_mp = (ba_mp_t *)list_next(itr2))) { + float err_ratio; + + if (!found_ba_mp->used + || !bit_test(step_ptr->step_node_bitmap, + found_ba_mp->index)) + continue; + + /* perhaps this block isn't involved in this + error */ + if (jobinfo->units_avail + && found_ba_mp->cnode_usable_bitmap + && bit_overlap(found_ba_mp->cnode_usable_bitmap, + ba_mp->cnode_err_bitmap)) + continue; + + if (!found_ba_mp->cnode_err_bitmap) + found_ba_mp->cnode_err_bitmap = + bit_alloc(bg_conf->mp_cnode_cnt); + + bit_or(found_ba_mp->cnode_err_bitmap, + ba_mp->cnode_err_bitmap); + bg_record->cnode_err_cnt = + bit_set_count(found_ba_mp->cnode_err_bitmap); + + + err_ratio = (float)bg_record->cnode_err_cnt + / (float)bg_record->cnode_cnt; + bg_record->err_ratio = err_ratio * 100; + + /* handle really small ratios */ + if (!bg_record->err_ratio && bg_record->cnode_err_cnt) + bg_record->err_ratio = 1; + + debug("select_p_fail_cnode: " + "count in error for %s is %u with ratio at %u", + bg_record->bg_block_id, + bg_record->cnode_err_cnt, + bg_record->err_ratio); + } + list_iterator_destroy(itr2); + } + list_iterator_destroy(itr); + slurm_mutex_unlock(&block_state_mutex); +#endif + return SLURM_SUCCESS; +} + extern int select_p_get_info_from_plugin (enum select_plugindata_info dinfo, struct job_record *job_ptr, void *data) diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 081cdb96a4..b9a7539c05 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -2431,6 +2431,11 @@ extern int select_p_update_sub_node (update_part_msg_t *part_desc_ptr) return SLURM_SUCCESS; } +extern int select_p_fail_cnode(struct step_record *step_ptr) +{ + return SLURM_SUCCESS; +} + extern int select_p_get_info_from_plugin(enum select_plugindata_info info, struct job_record *job_ptr, void *data) diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index 18ddd3a219..dd2f63d59e 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -112,6 +112,7 @@ static slurm_select_ops_t *_other_select_get_ops(slurm_select_context_t *c) "select_p_select_jobinfo_xstrdup", "select_p_update_block", "select_p_update_sub_node", + "select_p_fail_cnode", "select_p_get_info_from_plugin", "select_p_update_node_config", "select_p_update_node_state", @@ -750,6 +751,20 @@ extern int other_update_sub_node (update_block_msg_t *block_desc_ptr) update_sub_node))(block_desc_ptr); } +/* + * Fail certain cnodes in a blocks midplane (usually comes from the + * IBM runjob mux) + * IN step_ptr - step that failed + */ +extern int other_fail_cnode (struct step_record *step_ptr) +{ + if (other_select_init() < 0) + return SLURM_ERROR; + + return (*(other_select_context->ops. + fail_cnode))(step_ptr); +} + /* * Get select data from a plugin * IN dinfo - type of data to get from the node record diff --git a/src/plugins/select/cray/other_select.h b/src/plugins/select/cray/other_select.h index ba2f746ceb..083ef4d9b0 100644 --- a/src/plugins/select/cray/other_select.h +++ b/src/plugins/select/cray/other_select.h @@ -101,6 +101,13 @@ extern int other_update_block(update_block_msg_t *block_desc_ptr); */ extern int other_update_sub_node(update_block_msg_t *block_desc_ptr); +/* + * Fail certain cnodes in a blocks midplane (usually comes from the + * IBM runjob mux) + * IN step_ptr - step that failed + */ +extern int other_fail_cnode (struct step_record *step_ptr); + /* * Get select data from a plugin * IN node_pts - current node record diff --git a/src/plugins/select/cray/select_cray.c b/src/plugins/select/cray/select_cray.c index 12db493c94..e792dca684 100644 --- a/src/plugins/select/cray/select_cray.c +++ b/src/plugins/select/cray/select_cray.c @@ -782,6 +782,11 @@ extern int select_p_update_sub_node(update_block_msg_t *block_desc_ptr) return other_update_sub_node(block_desc_ptr); } +extern int select_p_fail_cnode(struct step_record *step_ptr) +{ + return other_fail_cnode(step_ptr); +} + extern int select_p_get_info_from_plugin(enum select_jobdata_type info, struct job_record *job_ptr, void *data) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 2bb3568e25..d1f5a5d2d2 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -3295,6 +3295,11 @@ extern int select_p_update_sub_node (update_block_msg_t *block_desc_ptr) return SLURM_SUCCESS; } +extern int select_p_fail_cnode(struct step_record *step_ptr) +{ + return SLURM_SUCCESS; +} + extern int select_p_get_info_from_plugin (enum select_plugindata_info dinfo, struct job_record *job_ptr, void *data) diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index f284a33eb0..41a2f9d741 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -341,6 +341,7 @@ int job_step_signal(uint32_t job_id, uint32_t step_id, { struct job_record *job_ptr; struct step_record *step_ptr; + int rc = SLURM_SUCCESS; job_ptr = find_job_record(job_id); if (job_ptr == NULL) { @@ -348,9 +349,11 @@ int job_step_signal(uint32_t job_id, uint32_t step_id, return ESLURM_INVALID_JOB_ID; } - if (IS_JOB_FINISHED(job_ptr)) - return ESLURM_ALREADY_DONE; - if (!IS_JOB_RUNNING(job_ptr)) { + if (IS_JOB_FINISHED(job_ptr)) { + rc = ESLURM_ALREADY_DONE; + if (signal != SIG_NODE_FAIL) + return rc; + } else if (!IS_JOB_RUNNING(job_ptr)) { verbose("job_step_signal: step %u.%u can not be sent signal " "%u from state=%s", job_id, step_id, signal, job_state_string(job_ptr->job_state)); @@ -370,7 +373,17 @@ int job_step_signal(uint32_t job_id, uint32_t step_id, return ESLURM_INVALID_JOB_ID; } -#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P + /* If SIG_NODE_FAIL codes through it means we had nodes failed + so handle that in the select plugin and switch the signal + to KILL afterwards. + */ + if (signal == SIG_NODE_FAIL) { + select_g_fail_cnode(step_ptr); + signal = SIGKILL; + if (rc != SLURM_SUCCESS) + return rc; + } +#if defined HAVE_BG_FILES && !defined HAVE_BG_L_P srun_step_signal(step_ptr, signal); #endif -- GitLab From 1ec04eee184786e23f613e576c01ff7da7e47f5b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 15:46:29 -0700 Subject: [PATCH 366/614] breakout a wait function for the launch plugin --- src/plugins/launch/poe/launch_poe.c | 8 ++++++-- src/plugins/launch/runjob/launch_runjob.c | 8 ++++++-- src/plugins/launch/slurm/launch_slurm.c | 14 ++++++++++---- src/srun/launch.c | 9 +++++++++ src/srun/launch.h | 4 +++- src/srun/srun.c | 6 ++++-- 6 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index c317d2d56e..0829e0c1e2 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -712,8 +712,7 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, } extern int launch_p_step_launch( - srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc) + srun_job_t *job, slurm_step_io_fds_t *cio_fds, uint32_t *global_rc) { int rc = 0; pid_t pid; @@ -769,6 +768,11 @@ extern int launch_p_step_launch( return rc; } +extern int launch_p_step_wait(srun_job_t *job, bool got_alloc) +{ + return 0; +} + extern int launch_p_step_terminate(void) { if (cmd_fname) diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c index bd775ed7bd..4ac1e195bf 100644 --- a/src/plugins/launch/runjob/launch_runjob.c +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -376,8 +376,7 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, } extern int launch_p_step_launch( - srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc) + srun_job_t *job, slurm_step_io_fds_t *cio_fds, uint32_t *global_rc) { pthread_t msg_thread; @@ -399,6 +398,11 @@ extern int launch_p_step_launch( return 0; } +extern int launch_p_step_wait(srun_job_t *job, bool got_alloc) +{ + return 0; +} + extern int launch_p_step_terminate(void) { info("Terminating job step %u.%u", diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index ca701c94db..71cb96658e 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -391,8 +391,7 @@ extern int launch_p_create_job_step(srun_job_t *job, bool use_all_cpus, } extern int launch_p_step_launch( - srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc) + srun_job_t *job, slurm_step_io_fds_t *cio_fds, uint32_t *global_rc) { slurm_step_launch_params_t launch_params; slurm_step_launch_callbacks_t callbacks; @@ -481,6 +480,15 @@ extern int launch_p_step_launch( job->jobid, job->stepid); } +cleanup: + + return rc; +} + +extern int launch_p_step_wait(srun_job_t *job, bool got_alloc) +{ + int rc = 0; + slurm_step_launch_wait_finish(job->step_ctx); if ((MPIR_being_debugged == 0) && retry_step_begin && (retry_step_cnt < MAX_STEP_RETRIES)) { @@ -496,8 +504,6 @@ extern int launch_p_step_launch( task_state_destroy(task_state); rc = -1; } -cleanup: - return rc; } diff --git a/src/srun/launch.c b/src/srun/launch.c index 6010422474..57c7b10528 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -52,6 +52,7 @@ typedef struct { int (*step_launch) (srun_job_t *job, slurm_step_io_fds_t *cio_fds, uint32_t *global_rc, bool got_alloc); + int (*step_wait) (srun_job_t *job); int (*step_terminate) (void); void (*print_status) (void); void (*fwd_signal) (int signal); @@ -64,6 +65,7 @@ static const char *syms[] = { "launch_p_setup_srun_opt", "launch_p_create_job_step", "launch_p_step_launch", + "launch_p_step_wait", "launch_p_step_terminate", "launch_p_print_status", "launch_p_fwd_signal" @@ -350,6 +352,13 @@ extern int launch_g_step_launch( return (*(ops.step_launch))(job, cio_fds, global_rc, got_alloc); + +extern int launch_g_step_wait(srun_job_t *job) +{ + if (launch_init() < 0) + return SLURM_ERROR; + + return (*(ops.step_wait))(job); } extern int launch_g_step_terminate(void) diff --git a/src/srun/launch.h b/src/srun/launch.h index 5340f6a628..77a4a688e4 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -66,7 +66,9 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, sig_atomic_t *destroy_job); extern int launch_g_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc); + uint32_t *global_rc); + +extern int launch_g_step_wait(srun_job_t *job, bool got_alloc); extern int launch_g_step_terminate(void); diff --git a/src/srun/srun.c b/src/srun/srun.c index 0b3809e60e..690db53b4c 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -465,8 +465,10 @@ relaunch: _set_stdio_fds(job, &cio_fds); - if (launch_g_step_launch(job, &cio_fds, &global_rc, got_alloc) == -1) - goto relaunch; + if (!launch_g_step_launch(job, &cio_fds, &global_rc)) { + if (launch_g_step_wait(job, got_alloc) == -1) + goto relaunch; + } if (got_alloc) { cleanup_allocation(); -- GitLab From afe6aeb025cdc94a4428c3bac74d6450bbad28a5 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 15:46:40 -0700 Subject: [PATCH 367/614] format lines --- src/srun/launch.c | 87 +++++++++++++++++++++++------------------------ 1 file changed, 43 insertions(+), 44 deletions(-) diff --git a/src/srun/launch.c b/src/srun/launch.c index 57c7b10528..4b45b408f9 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -1,36 +1,36 @@ - /* launch.c - Define job launch plugin functions. - ***************************************************************************** - * Copyright (C) 2012 SchedMD LLC - * Written by Danny Auble - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +/* launch.c - Define job launch plugin functions. +***************************************************************************** +* Copyright (C) 2012 SchedMD LLC +* Written by Danny Auble +* +* This file is part of SLURM, a resource management program. +* For details, see . +* Please also read the included file: DISCLAIMER. +* +* SLURM is free software; you can redistribute it and/or modify it under +* the terms of the GNU General Public License as published by the Free +* Software Foundation; either version 2 of the License, or (at your option) +* any later version. +* +* In addition, as a special exception, the copyright holders give permission +* to link the code of portions of this program with the OpenSSL library under +* certain conditions as described in each individual source file, and +* distribute linked combinations including the two. You must obey the GNU +* General Public License in all respects for all of the code used other than +* OpenSSL. If you modify file(s) with this exception, you may extend this +* exception to your version of the file(s), but you are not obligated to do +* so. If you do not wish to do so, delete this exception statement from your +* version. If you delete this exception statement from all source files in +* the program, then also delete it here. +* +* SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +* details. +* +* You should have received a copy of the GNU General Public License along +* with SLURM; if not, write to the Free Software Foundation, Inc., +* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ #include @@ -51,8 +51,8 @@ typedef struct { sig_atomic_t *destroy_job); int (*step_launch) (srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc); - int (*step_wait) (srun_job_t *job); + uint32_t *global_rc); + int (*step_wait) (srun_job_t *job, bool got_alloc); int (*step_terminate) (void); void (*print_status) (void); void (*fwd_signal) (int signal); @@ -131,7 +131,7 @@ extern slurm_step_layout_t *launch_common_get_slurm_step_layout(srun_job_t *job) slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); if (!resp) - return (NULL); + return (NULL); return (resp->step_layout); } @@ -338,27 +338,26 @@ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, if (launch_init() < 0) return SLURM_ERROR; - return (*(ops.create_job_step))(job, use_all_cpus, - signal_function, - destroy_job); + return (*(ops.create_job_step))( + job, use_all_cpus, signal_function, destroy_job); } extern int launch_g_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, - uint32_t *global_rc, bool got_alloc) + uint32_t *global_rc) { if (launch_init() < 0) return SLURM_ERROR; - return (*(ops.step_launch))(job, cio_fds, global_rc, - got_alloc); + return (*(ops.step_launch))(job, cio_fds, global_rc); +} -extern int launch_g_step_wait(srun_job_t *job) +extern int launch_g_step_wait(srun_job_t *job, bool got_alloc) { if (launch_init() < 0) return SLURM_ERROR; - return (*(ops.step_wait))(job); + return (*(ops.step_wait))(job, got_alloc); } extern int launch_g_step_terminate(void) -- GitLab From fbe3c164e97159154e283b3a13c3c4385dd5a681 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 16:02:54 -0700 Subject: [PATCH 368/614] remove warning when running with no jobacct plugin --- src/common/slurm_jobacct_gather.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 03476dce65..136ed3a8d3 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -222,8 +222,11 @@ extern int jobacct_gather_init(void) retval = SLURM_ERROR; goto done; } - plugin_type = type; + if (!strcasecmp(type, "jobacct_gather/none")) + goto done; + + plugin_type = type; type = slurm_get_proctrack_type(); if(!strcasecmp(type, "proctrack/pgid")) { info("WARNING: We will use a much slower algorithm with " -- GitLab From 49b0da1ee301884131050365c1ad7fafdbcd7516 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 16:12:44 -0700 Subject: [PATCH 369/614] move _set_stdio_fds to common location in launch.c --- src/srun/launch.c | 99 ++++++++++++++++++++++++++++++++++++++++++++ src/srun/launch.h | 4 ++ src/srun/srun.c | 102 +--------------------------------------------- 3 files changed, 104 insertions(+), 101 deletions(-) diff --git a/src/srun/launch.c b/src/srun/launch.c index 4b45b408f9..32c1644a0f 100644 --- a/src/srun/launch.c +++ b/src/srun/launch.c @@ -75,6 +75,18 @@ static plugin_ops_t ops; static plugin_context_t *plugin_context = NULL; static pthread_mutex_t plugin_context_lock = PTHREAD_MUTEX_INITIALIZER; +static int +_is_local_file (fname_t *fname) +{ + if (fname->name == NULL) + return 1; + + if (fname->taskid != -1) + return 1; + + return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); +} + /* * Initialize context for plugin */ @@ -323,6 +335,93 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, return SLURM_SUCCESS; } +extern void launch_common_set_stdio_fds(srun_job_t *job, + slurm_step_io_fds_t *cio_fds) +{ + bool err_shares_out = false; + int file_flags; + + if (opt.open_mode == OPEN_MODE_APPEND) + file_flags = O_CREAT|O_WRONLY|O_APPEND; + else if (opt.open_mode == OPEN_MODE_TRUNCATE) + file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; + else { + slurm_ctl_conf_t *conf; + conf = slurm_conf_lock(); + if (conf->job_file_append) + file_flags = O_CREAT|O_WRONLY|O_APPEND; + else + file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; + slurm_conf_unlock(); + } + + /* + * create stdin file descriptor + */ + if (_is_local_file(job->ifname)) { + if ((job->ifname->name == NULL) || + (job->ifname->taskid != -1)) { + cio_fds->in.fd = STDIN_FILENO; + } else { + cio_fds->in.fd = open(job->ifname->name, O_RDONLY); + if (cio_fds->in.fd == -1) { + error("Could not open stdin file: %m"); + exit(error_exit); + } + } + if (job->ifname->type == IO_ONE) { + cio_fds->in.taskid = job->ifname->taskid; + cio_fds->in.nodeid = slurm_step_layout_host_id( + launch_common_get_slurm_step_layout(job), + job->ifname->taskid); + } + } + + /* + * create stdout file descriptor + */ + if (_is_local_file(job->ofname)) { + if ((job->ofname->name == NULL) || + (job->ofname->taskid != -1)) { + cio_fds->out.fd = STDOUT_FILENO; + } else { + cio_fds->out.fd = open(job->ofname->name, + file_flags, 0644); + if (cio_fds->out.fd == -1) { + error("Could not open stdout file: %m"); + exit(error_exit); + } + } + if (job->ofname->name != NULL + && job->efname->name != NULL + && !strcmp(job->ofname->name, job->efname->name)) { + err_shares_out = true; + } + } + + /* + * create seperate stderr file descriptor only if stderr is not sharing + * the stdout file descriptor + */ + if (err_shares_out) { + debug3("stdout and stderr sharing a file"); + cio_fds->err.fd = cio_fds->out.fd; + cio_fds->err.taskid = cio_fds->out.taskid; + } else if (_is_local_file(job->efname)) { + if ((job->efname->name == NULL) || + (job->efname->taskid != -1)) { + cio_fds->err.fd = STDERR_FILENO; + } else { + cio_fds->err.fd = open(job->efname->name, + file_flags, 0644); + if (cio_fds->err.fd == -1) { + error("Could not open stderr file: %m"); + exit(error_exit); + } + } + } +} + extern int launch_g_setup_srun_opt(char **rest) { if (launch_init() < 0) diff --git a/src/srun/launch.h b/src/srun/launch.h index 77a4a688e4..4285e41b4a 100644 --- a/src/srun/launch.h +++ b/src/srun/launch.h @@ -57,6 +57,10 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); +extern void launch_common_set_stdio_fds(srun_job_t *job, + slurm_step_io_fds_t *cio_fds); + + extern int launch_init(void); extern int launch_fini(void); extern int launch_g_setup_srun_opt(char **rest); diff --git a/src/srun/srun.c b/src/srun/srun.c index 690db53b4c..d5ddb08f38 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -146,7 +146,6 @@ static void _set_env_vars(resource_allocation_response_msg_t *resp); static void _set_exit_code(void); static void _set_node_alias(void); static void _step_opt_exclusive(void); -static void _set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds); static void _set_submit_dir_env(void); static void _set_prio_process_env(void); static int _set_rlimit_env(void); @@ -463,7 +462,7 @@ relaunch: exit(error_exit); } - _set_stdio_fds(job, &cio_fds); + launch_common_set_stdio_fds(job, &cio_fds); if (!launch_g_step_launch(job, &cio_fds, &global_rc)) { if (launch_g_step_wait(job, got_alloc) == -1) @@ -908,105 +907,6 @@ static int _run_srun_script (srun_job_t *job, char *script) /* NOTREACHED */ } -static int -_is_local_file (fname_t *fname) -{ - if (fname->name == NULL) - return 1; - - if (fname->taskid != -1) - return 1; - - return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); -} - -static void -_set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) -{ - bool err_shares_out = false; - int file_flags; - - if (opt.open_mode == OPEN_MODE_APPEND) - file_flags = O_CREAT|O_WRONLY|O_APPEND; - else if (opt.open_mode == OPEN_MODE_TRUNCATE) - file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; - else { - slurm_ctl_conf_t *conf; - conf = slurm_conf_lock(); - if (conf->job_file_append) - file_flags = O_CREAT|O_WRONLY|O_APPEND; - else - file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; - slurm_conf_unlock(); - } - - /* - * create stdin file descriptor - */ - if (_is_local_file(job->ifname)) { - if ((job->ifname->name == NULL) || - (job->ifname->taskid != -1)) { - cio_fds->in.fd = STDIN_FILENO; - } else { - cio_fds->in.fd = open(job->ifname->name, O_RDONLY); - if (cio_fds->in.fd == -1) { - error("Could not open stdin file: %m"); - exit(error_exit); - } - } - if (job->ifname->type == IO_ONE) { - cio_fds->in.taskid = job->ifname->taskid; - cio_fds->in.nodeid = slurm_step_layout_host_id( - launch_common_get_slurm_step_layout(job), - job->ifname->taskid); - } - } - - /* - * create stdout file descriptor - */ - if (_is_local_file(job->ofname)) { - if ((job->ofname->name == NULL) || - (job->ofname->taskid != -1)) { - cio_fds->out.fd = STDOUT_FILENO; - } else { - cio_fds->out.fd = open(job->ofname->name, - file_flags, 0644); - if (cio_fds->out.fd == -1) { - error("Could not open stdout file: %m"); - exit(error_exit); - } - } - if (job->ofname->name != NULL - && job->efname->name != NULL - && !strcmp(job->ofname->name, job->efname->name)) { - err_shares_out = true; - } - } - - /* - * create seperate stderr file descriptor only if stderr is not sharing - * the stdout file descriptor - */ - if (err_shares_out) { - debug3("stdout and stderr sharing a file"); - cio_fds->err.fd = cio_fds->out.fd; - cio_fds->err.taskid = cio_fds->out.taskid; - } else if (_is_local_file(job->efname)) { - if ((job->efname->name == NULL) || - (job->efname->taskid != -1)) { - cio_fds->err.fd = STDERR_FILENO; - } else { - cio_fds->err.fd = open(job->efname->name, - file_flags, 0644); - if (cio_fds->err.fd == -1) { - error("Could not open stderr file: %m"); - exit(error_exit); - } - } - } -} - static void _pty_restore(void) { /* STDIN is probably closed by now */ -- GitLab From 97cfcd567c0375027852d44d3d6b99cccec74bbd Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 16:14:24 -0700 Subject: [PATCH 370/614] use launch plugin more with the poe plugin --- src/plugins/switch/nrt/libpermapi/shr_64.c | 181 ++------------------- 1 file changed, 14 insertions(+), 167 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index a86ace8dde..2ca909ae2d 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -73,119 +73,6 @@ int sig_array[] = { extern char **environ; -static int -_is_local_file (fname_t *fname) -{ - if (fname->name == NULL) - return 1; - - if (fname->taskid != -1) - return 1; - - return ((fname->type != IO_PER_TASK) && (fname->type != IO_ONE)); -} - -static slurm_step_layout_t * -_get_slurm_step_layout(srun_job_t *job) -{ - job_step_create_response_msg_t *resp; - - if (!job || !job->step_ctx) - return (NULL); - - slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_RESP, &resp); - if (!resp) - return (NULL); - return (resp->step_layout); -} - -static void -_set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds) -{ - bool err_shares_out = false; - int file_flags; - - if (opt.open_mode == OPEN_MODE_APPEND) - file_flags = O_CREAT|O_WRONLY|O_APPEND; - else if (opt.open_mode == OPEN_MODE_TRUNCATE) - file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; - else { - slurm_ctl_conf_t *conf; - conf = slurm_conf_lock(); - if (conf->job_file_append) - file_flags = O_CREAT|O_WRONLY|O_APPEND; - else - file_flags = O_CREAT|O_WRONLY|O_APPEND|O_TRUNC; - slurm_conf_unlock(); - } - - /* - * create stdin file descriptor - */ - if (_is_local_file(job->ifname)) { - if ((job->ifname->name == NULL) || - (job->ifname->taskid != -1)) { - cio_fds->in.fd = STDIN_FILENO; - } else { - cio_fds->in.fd = open(job->ifname->name, O_RDONLY); - if (cio_fds->in.fd == -1) { - error("Could not open stdin file: %m"); - exit(error_exit); - } - } - if (job->ifname->type == IO_ONE) { - cio_fds->in.taskid = job->ifname->taskid; - cio_fds->in.nodeid = slurm_step_layout_host_id( - _get_slurm_step_layout(job), - job->ifname->taskid); - } - } - - /* - * create stdout file descriptor - */ - if (_is_local_file(job->ofname)) { - if ((job->ofname->name == NULL) || - (job->ofname->taskid != -1)) { - cio_fds->out.fd = STDOUT_FILENO; - } else { - cio_fds->out.fd = open(job->ofname->name, - file_flags, 0644); - if (cio_fds->out.fd == -1) { - error("Could not open stdout file: %m"); - exit(error_exit); - } - } - if (job->ofname->name != NULL - && job->efname->name != NULL - && !strcmp(job->ofname->name, job->efname->name)) { - err_shares_out = true; - } - } - - /* - * create seperate stderr file descriptor only if stderr is not sharing - * the stdout file descriptor - */ - if (err_shares_out) { - debug3("stdout and stderr sharing a file"); - cio_fds->err.fd = cio_fds->out.fd; - cio_fds->err.taskid = cio_fds->out.taskid; - } else if (_is_local_file(job->efname)) { - if ((job->efname->name == NULL) || - (job->efname->taskid != -1)) { - cio_fds->err.fd = STDERR_FILENO; - } else { - cio_fds->err.fd = open(job->efname->name, - file_flags, 0644); - if (cio_fds->err.fd == -1) { - error("Could not open stderr file: %m"); - exit(error_exit); - } - } - } -} - static nrt_job_key_t _get_nrt_job_key(srun_job_t *job) { job_step_create_response_msg_t *resp; @@ -228,66 +115,26 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, { srun_job_t **job_ptr = (srun_job_t **)resource_mgr; srun_job_t *job = *job_ptr; - slurm_step_launch_params_t launch_params; int my_argc = 1; char *my_argv[2] = { "/etc/pmdv12", NULL }; +// char *my_argv[2] = { "/bin/hostname", NULL }; + slurm_step_io_fds_t cio_fds = SLURM_STEP_IO_FDS_INITIALIZER; + uint32_t global_rc = 0; info("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); - slurm_step_launch_params_t_init(&launch_params); - launch_params.gid = opt.gid; - launch_params.alias_list = job->alias_list; - launch_params.argc = my_argc; - launch_params.argv = my_argv; - launch_params.multi_prog = opt.multi_prog ? true : false; - launch_params.cwd = opt.cwd; - launch_params.slurmd_debug = opt.slurmd_debug; - launch_params.buffered_stdio = !opt.unbuffered; - launch_params.labelio = opt.labelio ? true : false; - launch_params.remote_output_filename =fname_remote_string(job->ofname); - launch_params.remote_input_filename = fname_remote_string(job->ifname); - launch_params.remote_error_filename = fname_remote_string(job->efname); - launch_params.task_prolog = opt.task_prolog; - launch_params.task_epilog = opt.task_epilog; - launch_params.cpu_bind = opt.cpu_bind; - launch_params.cpu_bind_type = opt.cpu_bind_type; - launch_params.mem_bind = opt.mem_bind; - launch_params.mem_bind_type = opt.mem_bind_type; - launch_params.open_mode = opt.open_mode; - if (opt.acctg_freq >= 0) - launch_params.acctg_freq = opt.acctg_freq; - launch_params.pty = opt.pty; - launch_params.cpus_per_task = 1; - launch_params.task_dist = opt.distribution; - launch_params.ckpt_dir = opt.ckpt_dir; - launch_params.restart_dir = opt.restart_dir; - launch_params.preserve_env = opt.preserve_env; - launch_params.spank_job_env = opt.spank_job_env; - launch_params.spank_job_env_size = opt.spank_job_env_size; - - _set_stdio_fds(job, &launch_params.local_fds); - rm_sockfds[0] = launch_params.local_fds.in.fd; - rm_sockfds[1] = launch_params.local_fds.out.fd; - rm_sockfds[2] = launch_params.local_fds.err.fd; - - launch_params.parallel_debug = false; - - update_job_state(job, SRUN_JOB_LAUNCHING); - if (slurm_step_launch(job->step_ctx, &launch_params, NULL) != - SLURM_SUCCESS) { - error("Application launch failed: %m"); - slurm_step_launch_wait_finish(job->step_ctx); - goto cleanup; - } + opt.argc = my_argc; + opt.argv = my_argv; + + launch_common_set_stdio_fds(job, &cio_fds); + + if (launch_g_step_launch(job, &cio_fds, &global_rc)) + return 1; + + rm_sockfds[0] = cio_fds.in.fd; + rm_sockfds[1] = cio_fds.out.fd; + rm_sockfds[2] = cio_fds.err.fd; - update_job_state(job, SRUN_JOB_STARTING); - if (slurm_step_launch_wait_start(job->step_ctx) == SLURM_SUCCESS) { - update_job_state(job, SRUN_JOB_RUNNING); - } else { - info("Job step %u.%u aborted before step completely launched.", - job->jobid, job->stepid); - } -cleanup: info("done launching"); return 0; } -- GitLab From e94612933be6e7c0b20356d4075d552f36bf0dd4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 4 Jun 2012 16:29:24 -0700 Subject: [PATCH 371/614] add new hook to select/serial --- src/plugins/select/serial/select_serial.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/select/serial/select_serial.c b/src/plugins/select/serial/select_serial.c index 83083ee3b1..ed25f5df56 100644 --- a/src/plugins/select/serial/select_serial.c +++ b/src/plugins/select/serial/select_serial.c @@ -2064,6 +2064,11 @@ extern int select_p_update_sub_node(update_part_msg_t *part_desc_ptr) return SLURM_SUCCESS; } +extern int select_p_fail_cnode(struct step_record *step_ptr) +{ + return SLURM_SUCCESS; +} + extern int select_p_get_info_from_plugin(enum select_plugindata_info info, struct job_record *job_ptr, void *data) -- GitLab From 1cee6a1a76be1b2f6727f3ee76414db1dc3f5910 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 5 Jun 2012 07:55:02 -0700 Subject: [PATCH 372/614] Add SRN_DEBUG env var based upon srun -v and -Q options This will be used to control POE and PMD options for IBM PE. --- doc/man/man1/srun.1 | 11 +++++++++-- src/srun/srun.c | 34 +++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index ec947aa028..c578654068 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1,10 +1,10 @@ -.TH "srun" "1" "SLURM 2.4" "October 2011" "SLURM Commands" +.TH "srun" "1" "SLURM 2.5" "July 2012" "SLURM Commands" .SH "NAME" srun \- Run parallel jobs .SH "SYNOPSIS" -\fBsrun\fR [\fIOPTIONS\fR...] \fIexecutable \fR[\fIargs\fR...] +\fBsrun\fR [\fIOPTIONS\fR...] \fIexecutable \fR[\fIargs\fR...] .SH "DESCRIPTION" Run a parallel job on cluster managed by SLURM. If necessary, srun will @@ -1839,6 +1839,13 @@ The value will be set component types listed in \fBSLURM_TOPOLOGY_ADDR\fR. Each component will be identified as either "switch" or "node". A period is used to separate each hardware component type. +.TP +\fBSRUN_DEBUG\fR +Set to the logging level of the \fBsrun\fR command. +Default value is 3 (info level). +The value is incremented or decremented based upon the \-\-verbose and +\-\-quiet options. + .TP \fBMPIRUN_NOALLOCATE\fR Do not allocate a block on Blue Gene systems only. diff --git a/src/srun/srun.c b/src/srun/srun.c index d5ddb08f38..6dac1300ee 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -592,25 +592,33 @@ _print_job_information(resource_allocation_response_msg_t *resp) xfree(str); } -/* Set SLURM_UMASK environment variable with current state */ +/* Set some environment variables with current state */ static int _set_umask_env(void) { - char mask_char[5]; - mode_t mask; + if (!getenv("SRUN_DEBUG")) { /* do not change current value */ + /* NOTE: Default debug level is 3 (info) */ + int log_level = LOG_LEVEL_INFO + _verbose - opt.quiet; - if (getenv("SLURM_UMASK")) /* use this value */ - return SLURM_SUCCESS; + if (setenvf(NULL, "SRUN_DEBUG", "%d", log_level) < 0) + error ("unable to set SRUN_DEBUG in environment"); + } + + if (!getenv("SLURM_UMASK")) { /* do not change current value */ + char mask_char[5]; + mode_t mask; - mask = (int)umask(0); - umask(mask); + mask = (int)umask(0); + umask(mask); - sprintf(mask_char, "0%d%d%d", - ((mask>>6)&07), ((mask>>3)&07), mask&07); - if (setenvf(NULL, "SLURM_UMASK", "%s", mask_char) < 0) { - error ("unable to set SLURM_UMASK in environment"); - return SLURM_FAILURE; + sprintf(mask_char, "0%d%d%d", + ((mask>>6)&07), ((mask>>3)&07), mask&07); + if (setenvf(NULL, "SLURM_UMASK", "%s", mask_char) < 0) { + error ("unable to set SLURM_UMASK in environment"); + return SLURM_FAILURE; + } + debug ("propagating UMASK=%s", mask_char); } - debug ("propagating UMASK=%s", mask_char); + return SLURM_SUCCESS; } -- GitLab From 7c8750f07eba2f0fd09e868092dbcd28dd5729da Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 5 Jun 2012 08:32:02 -0700 Subject: [PATCH 373/614] Updates to High Throughput Computing web page These changes reflect findings from the select/serial plugin development work --- doc/html/high_throughput.shtml | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/doc/html/high_throughput.shtml b/doc/html/high_throughput.shtml index 2e9708551f..9dbb2e479e 100644 --- a/doc/html/high_throughput.shtml +++ b/doc/html/high_throughput.shtml @@ -11,7 +11,7 @@ for this material.

    Performance Results

    -

    SLURM has also been validated to process 100,000 jobs and job steps per hour +

    SLURM has also been validated to execute 500 simple batch jobs per second on a sustained basis with short bursts of activity at a much higher level. Actual performance depends upon the jobs to be executed plus the hardware and configuration used.

    @@ -53,13 +53,26 @@ be set quite high for memory size, open file count and stack size.

    SLURM Configuration

    Several SLURM configuration parameters should be adjusted to -reflect the needs of high throughput computing.

    +reflect the needs of high throughput computing. The changes described below +will not be possible in all environments, but these are the configuration +options that you may want to consider for higher throughput.

      +
    • AccountingStorageType: +Disabling accounting will improve job throughput. Disable storing of +accounting by using the accounting_storage/none plugin.
    • +
    • JobAcctGatherType: +Disabling the collection of job accounting information will improve job +throughput. Disable collection of accounting by using the +jobacct_gather/none plugin.
    • +
    • JobCompType: +Disabling recording of job completion information will improve job +throughput. Disable recording of job completion information by using the +jobcomp/none plugin.
    • MaxJobCount: Controls how many jobs may be in the slurmctld daemon records at any point in time (pending, running, suspended or completed[temporarily]). -The default value is 10,000
    • +The default value is 10,000.
    • MessageTimeout: Controls how long to wait for a response to messages. The default value is 10 seconds. @@ -91,6 +104,10 @@ jobs or less) and interval to 30 seconds or more will limit the overhead of backfill scheduling (NOTE: the default values are fine for both of these parameters).
    +
  • SchedulerType: +If most jobs are short lived then use of the sched/builtin plugin is +recomended. This manages a queue of jobs on a First-In-First-Out (FIFO) basis +and eliminates logic used to sort the queue by priority.
  • SelectType: If only serial jobs (single CPU jobs) are to be executed, use of the select/serial plugin is recommended. This plugin eliminates much of @@ -113,6 +130,6 @@ numbers of simultaneous requests are to be supported.
  • appropriate for your environment. -

    Last modified 7 March 2012

    +

    Last modified 5 June 2012

    -- GitLab From 2cde8d3fc75aa3281ac63e514665d5ad096ab2f5 Mon Sep 17 00:00:00 2001 From: Don Lipari Date: Tue, 5 Jun 2012 14:21:55 -0700 Subject: [PATCH 374/614] Quieting down the job_mgr I'd like to propose quieting down the job_mgr a tad. This is a refinement to: https://github.com/SchedMD/slurm/commit/30a986f4c600291876f4ec3e3949934512f2cba5 --- src/slurmctld/job_mgr.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index a106debde4..bce9632467 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3770,27 +3770,27 @@ extern int job_limits_check(struct job_record **job_pptr) if ((job_min_nodes > part_max_nodes) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_MAX_NODE)))) { - debug("Job %u requested too many nodes (%u) of " - "partition %s(MaxNodes %u)", - job_ptr->job_id, job_min_nodes, - part_ptr->name, part_max_nodes); + debug2("Job %u requested too many nodes (%u) of " + "partition %s(MaxNodes %u)", + job_ptr->job_id, job_min_nodes, + part_ptr->name, part_max_nodes); fail_reason = WAIT_PART_NODE_LIMIT; } else if ((job_max_nodes != 0) && /* no max_nodes for job */ ((job_max_nodes < part_min_nodes) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_MIN_NODE))))) { - debug("Job %u requested too few nodes (%u) of " - "partition %s(MinNodes %u)", - job_ptr->job_id, job_max_nodes, - part_ptr->name, part_min_nodes); + debug2("Job %u requested too few nodes (%u) of " + "partition %s(MinNodes %u)", + job_ptr->job_id, job_max_nodes, + part_ptr->name, part_min_nodes); fail_reason = WAIT_PART_NODE_LIMIT; } else if (part_ptr->state_up == PARTITION_DOWN) { - debug("Job %u requested down partition %s", - job_ptr->job_id, part_ptr->name); + debug2("Job %u requested down partition %s", + job_ptr->job_id, part_ptr->name); fail_reason = WAIT_PART_DOWN; } else if (part_ptr->state_up == PARTITION_INACTIVE) { - debug("Job %u requested inactive partition %s", - job_ptr->job_id, part_ptr->name); + debug2("Job %u requested inactive partition %s", + job_ptr->job_id, part_ptr->name); fail_reason = WAIT_PART_INACTIVE; } else if ((((job_ptr->time_limit != NO_VAL) && (job_ptr->time_limit > part_ptr->max_time)) || @@ -3798,7 +3798,7 @@ extern int job_limits_check(struct job_record **job_pptr) (job_ptr->time_min > part_ptr->max_time))) && (!qos_ptr || (qos_ptr && !(qos_ptr->flags & QOS_FLAG_PART_TIME_LIMIT)))) { - debug("Job %u exceeds partition time limit", job_ptr->job_id); + debug2("Job %u exceeds partition time limit", job_ptr->job_id); fail_reason = WAIT_PART_TIME_LIMIT; } else if (qos_ptr && assoc_ptr && (qos_ptr->flags & QOS_FLAG_ENFORCE_USAGE_THRES) && @@ -3817,8 +3817,8 @@ extern int job_limits_check(struct job_record **job_pptr) shares_norm); } if (job_ptr->prio_factors->priority_fs < qos_ptr->usage_thres){ - debug("Job %u exceeds usage threahold", - job_ptr->job_id); + debug2("Job %u exceeds usage threahold", + job_ptr->job_id); fail_reason = WAIT_QOS_THRES; } } else if (job_ptr->priority == 0) { /* user or administrator hold */ -- GitLab From 1fee4fe41f7923d39f44fff33af13661c6bec3fd Mon Sep 17 00:00:00 2001 From: Phil Eckert Date: Tue, 5 Jun 2012 14:38:39 -0700 Subject: [PATCH 375/614] Permit held job to be modified I was doing some checking to find out why the the 2.4 branch and master branch of schedmd was not allowing held jobs to be modified, when attempting to do so, scontrol would return: slurm_update error: Requested partition configuration not available now I did some debugging and found that it was caused by code added to the tail end of job_limits_check() in job_mgr.c. It had this addition: } else if (job_ptr->priority == 0) { /* user or administrator hold */ fail_reason = WAIT_HELD; } It is causes all modifications done by scontrol on held jobs, to fail. --- src/slurmctld/job_mgr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index bce9632467..8978270ee6 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -8005,8 +8005,9 @@ int update_job(job_desc_msg_t * job_specs, uid_t uid) if (fail_reason != WAIT_NO_REASON) { if (fail_reason == WAIT_QOS_THRES) error_code = ESLURM_QOS_THRES; - else if (fail_reason == WAIT_PART_TIME_LIMIT || - fail_reason == WAIT_PART_NODE_LIMIT) + else if ((fail_reason == WAIT_PART_TIME_LIMIT) || + (fail_reason == WAIT_PART_NODE_LIMIT) || + (fail_reason == WAIT_HELD)) error_code = SLURM_SUCCESS; else error_code = ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE; -- GitLab From b05dcd83c1a7d2bc7e6ebd906611a3a7fa6e8004 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 6 Jun 2012 15:07:53 -0700 Subject: [PATCH 376/614] Largely cosmetic mods for switch/nrt --- src/plugins/switch/nrt/nrt.c | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ec26972b0c..76bb1cb2d9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -91,10 +91,16 @@ mode_t nrt_umask; * module. */ +/* Notes about job_key: + * - It must be unique for every job step. + * - It is a 32-bit quantity. + * - We might use the bottom 16-bits of job ID an step ID, but that could + * result in conflicts for long-lived job steps. + */ typedef struct slurm_nrt_window { nrt_window_id_t window_id; win_state_t state; - nrt_job_key_t job_key; /* FIXME: Perhaps change to uid or client_pid? */ + nrt_job_key_t job_key; } slurm_nrt_window_t; typedef struct slurm_nrt_adapter { @@ -2635,7 +2641,9 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) _adapter_type_str(adapter_names.adapter_type), nrt_err_str(err)); rc = SLURM_ERROR; - max_windows = 16; /* FIXME: What should this be? */ + /* We will still try to unload the windows. It is unclear what + * the maximum window count is, but 512 is largest seen. */ + max_windows = 1024; } for (i = 0; i < tableinfo->table_length; i++) { @@ -2757,8 +2765,6 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) return rc; } -/* FIXME: Ne need to set a bunch of these paramters appropriately */ -#define TBD0 0 bzero(&table_info, sizeof(nrt_table_info_t)); table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; @@ -2777,7 +2783,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.is_user_space = 0; } table_info.context_id = 0; - table_info.table_id = TBD0; +/* FIXME: Need to set table_id here */ + table_info.table_id = 0; if (job_name) { char *sep = strrchr(job_name,'/'); if (sep) @@ -2794,7 +2801,9 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) NRT_MAX_PROTO_NAME_LEN); } table_info.use_bulk_transfer = jp->bulk_xfer; - table_info.bulk_transfer_resources = TBD0; +/* FIXME: Can not find documentation about bulk_transfer_resources. + * Perhaps use a new job --network option? */ + table_info.bulk_transfer_resources = 0; /* The following fields only apply to Power7 processors * and have no effect on x86 processors: * immed_send_slots_per_win -- GitLab From 68b42250f79138b7be2bea373f2cc9970ff58aa3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 6 Jun 2012 15:55:40 -0700 Subject: [PATCH 377/614] Add switch/nrt support for bulk_xfer_resources --- src/plugins/switch/nrt/nrt.c | 12 ++++++++---- src/plugins/switch/nrt/slurm_nrt.h | 3 ++- src/plugins/switch/nrt/switch_nrt.c | 27 +++++++++++++++++++++++---- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 76bb1cb2d9..3037cff43d 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -143,6 +143,7 @@ struct slurm_nrt_jobinfo { /* pid from getpid() */ nrt_job_key_t job_key; uint8_t bulk_xfer; /* flag */ + uint32_t bulk_xfer_resources; uint8_t ip_v4; /* flag */ uint8_t user_space; /* flag */ char *protocol; /* MPI, UPC, LAPI, PAMI, etc. */ @@ -1229,6 +1230,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %hu", j->bulk_xfer); + info(" bulk_xfer_resources: %lu", j->bulk_xfer_resources); info(" ip_v4: %hu", j->ip_v4); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); @@ -2036,7 +2038,8 @@ _next_key(void) extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, - char *adapter_name, bool bulk_xfer, bool ip_v4, + char *adapter_name, bool bulk_xfer, + uint32_t bulk_xfer_resources, bool ip_v4, bool user_space, char *protocol) { int nnodes, nprocs = 0; @@ -2062,6 +2065,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, slurm_seterrno_ret(EINVAL); jp->bulk_xfer = (uint8_t) bulk_xfer; + jp->bulk_xfer_resources = bulk_xfer_resources; jp->ip_v4 = (uint8_t) ip_v4; jp->job_key = _next_key(); jp->nodenames = hostlist_copy(hl); @@ -2274,6 +2278,7 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->magic, buf); pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); + pack32(j->bulk_xfer_resources, buf); pack8(j->ip_v4, buf); pack8(j->user_space, buf); pack16(j->tables_per_task, buf); @@ -2391,6 +2396,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); safe_unpack32(&j->job_key, buf); safe_unpack8(&j->bulk_xfer, buf); + safe_unpack32(&j->bulk_xfer_resources, buf); safe_unpack8(&j->ip_v4, buf); safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); @@ -2801,9 +2807,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) NRT_MAX_PROTO_NAME_LEN); } table_info.use_bulk_transfer = jp->bulk_xfer; -/* FIXME: Can not find documentation about bulk_transfer_resources. - * Perhaps use a new job --network option? */ - table_info.bulk_transfer_resources = 0; + table_info.bulk_transfer_resources = jp->bulk_xfer_resources; /* The following fields only apply to Power7 processors * and have no effect on x86 processors: * immed_send_slots_per_win diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 2a2e33edf1..c78934554f 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -99,7 +99,8 @@ extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, bool bulk_xfer, - bool ip_v4, bool user_space, char *protocol); + uint32_t bulk_xfer_resources, bool ip_v4, + bool user_space, char *protocol); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index c326a73e8f..d7071fd478 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -395,9 +395,10 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, { hostlist_t list = NULL; bool bulk_xfer = false, ip_v4 = true, user_space = false; + uint32_t bulk_xfer_resources = 0; bool sn_all; int err; - char *adapter_name = NULL, *protocol = "mpi"; + char *adapter_name = NULL, *protocol = "mpi", *bulk_ptr = NULL; #if NRT_DEBUG info("switch_p_build_jobinfo(): nodelist:%s network:%s", @@ -411,9 +412,26 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, fatal("hostlist_create(%s): %m", nodelist); if (network && - (strstr(network, "bulk_xfer") || - strstr(network, "BULK_XFER"))) + ((bulk_ptr = strstr(network, "bulk_xfer")) || + (bulk_ptr = strstr(network, "BULK_XFER")))) { bulk_xfer = true; + if ((bulk_ptr[9] == '=') && + (bulk_ptr[10] >= '0') && + (bulk_ptr[10] <= '9')) { + long int resources; + char *end_ptr = NULL; + bulk_ptr += 10; + resources = strtol(bulk_ptr, &end_ptr, 10); + if ((end_ptr[0] == 'k') || (end_ptr[0] == 'K')) + resources *= 1024; + else if ((end_ptr[0] == 'm') || (end_ptr[0] == 'M')) + resources *= (1024 * 1024); + else if ((end_ptr[0] == 'g') || (end_ptr[0] == 'G')) + resources *= (1024 * 1024 * 1024); + if (resources >= 0) + bulk_xfer_resources = resources; + } + } if (network && (strstr(network, "ipv4") || @@ -464,7 +482,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, tasks_per_node, tids, sn_all, adapter_name, - bulk_xfer, ip_v4, user_space, protocol); + bulk_xfer, bulk_xfer_resources, + ip_v4, user_space, protocol); hostlist_destroy(list); xfree(adapter_name); -- GitLab From d4cb5f767cb66bb992bd795c10a7b51e46df2f22 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 6 Jun 2012 16:08:36 -0700 Subject: [PATCH 378/614] Update switch/nrt --network option man pages Update salloc/sbatch/srun man pages for the --entwork option and a resource size specification for the bulk_transfer option. --- doc/man/man1/salloc.1 | 7 +++++-- doc/man/man1/sbatch.1 | 7 +++++-- doc/man/man1/srun.1 | 7 +++++-- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index e1218f2f1a..4f26c6e589 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -741,8 +741,11 @@ Multiple values may be specified in a comma separated list. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR -Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +\fBBULK_XFER\fR [=<\fIresources\fR> +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). +The optional \fIresources\fR specification is a numeric value which can have +a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or +gigabytes. .TP \fBIPV4\fR Use Internet Protocol (IP) version 4 communications (default) diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 07d4a24c50..7013d28965 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -805,8 +805,11 @@ Multiple values may be specified in a comma separated list. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR -Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +\fBBULK_XFER\fR [=<\fIresources\fR> +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). +The optional \fIresources\fR specification is a numeric value which can have +a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or +gigabytes. .TP \fBIPV4\fR Use Internet Protocol (IP) version 4 communications (default) diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index c578654068..2ba228ea69 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -843,8 +843,11 @@ Multiple values may be specified in a comma separated list. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR -Enable bulk transfer of data using Remote Direct-Memory Access (RDMA) +\fBBULK_XFER\fR [=<\fIresources\fR> +Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). +The optional \fIresources\fR specification is a numeric value which can have +a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or +gigabytes. .TP \fBIPV4\fR Use Internet Protocol (IP) version 4 communications (default) -- GitLab From 82bc3b12bbee90cb898e9021b698553940c6fa3e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:51:23 -0700 Subject: [PATCH 379/614] update docs for sacct --dump --- doc/man/man1/sacct.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/sacct.1 b/doc/man/man1/sacct.1 index 3a2dc0bead..3b0609bbe1 100644 --- a/doc/man/man1/sacct.1 +++ b/doc/man/man1/sacct.1 @@ -792,7 +792,7 @@ this value is the number of non\-leap seconds since the Epoch (00:00:00 UTC, January 1, 1970) .TP 5 -\f3uid.gid\fP +blockid (if job ran on a BlueGene cluster) .TP 6 (Reserved) @@ -850,7 +850,7 @@ this value is the number of non\-leap seconds since the Epoch (00:00:00 UTC, January 1, 1970) .TP 5 -\f3uid.gid\fP +blockid (if job ran on a BlueGene cluster) .TP 6 (Reserved) @@ -1000,7 +1000,7 @@ this value is the number of non\-leap seconds since the Epoch (00:00:00 UTC, January 1, 1970) .TP 5 -\f3uid.gid\fP +blockid (if job ran on a BlueGene cluster) .TP 6 (Reserved) -- GitLab From a6809dd38e6c58e656463144e2556b197c3e3e55 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 5 Jun 2012 10:40:55 -0700 Subject: [PATCH 380/614] make use of the SRUN_DEBUG env var --- src/plugins/switch/nrt/libpermapi/shr_64.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 2ca909ae2d..cee38ebc72 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -407,6 +407,10 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg) { + log_options_t log_opts = LOG_OPTS_INITIALIZER; + int debug_level = 0; + char *srun_debug = NULL; + /* SLURM was originally written against 1300, so we will * return that, no matter what comes in so we always work. */ @@ -430,6 +434,17 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, /* Set up slurmctld message handler */ slurmctld_msg_init(); slurm_set_launch_type("launch/slurm"); + + if ((srun_debug = getenv("SRUN_DEBUG"))) + debug_level = atoi(srun_debug); + if (debug_level) { + log_opts.stderr_level = debug_level; + log_opts.logfile_level = debug_level; + log_opts.syslog_level = debug_level; + + log_alter(log_opts, LOG_DAEMON, "/dev/null"); + } + return 0; } -- GitLab From 4d6c1517fcfb3d560469469ba631098097da2bd4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 5 Jun 2012 10:48:54 -0700 Subject: [PATCH 381/614] moved/removed debug messages --- src/plugins/switch/nrt/libpermapi/shr_64.c | 57 ++++++++++++---------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index cee38ebc72..57ffe6dae4 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -327,7 +327,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, /* xstrdup_printf("10.0.0.5%d", i+1); */ slurm_conf_get_addr(host, &addr); host_ptr->host_address = xstrdup(inet_ntoa(addr.sin_addr)); - info("%s = %s", host_ptr->host_name, host_ptr->host_address); + //info("%s = %s", host_ptr->host_name, host_ptr->host_address); host_ptr->task_count = step_layout->tasks[i]; host_ptr->task_ids = xmalloc(sizeof(int) * host_ptr->task_count); @@ -516,47 +516,50 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, exit(error_exit); } - info("num_nodes\t= %d", pe_job_req->num_nodes); + /* info("num_nodes\t= %d", pe_job_req->num_nodes); */ + /* info("tasks_per_node\t= %d", pe_job_req->tasks_per_node); */ + /* info("total_tasks\t= %d", pe_job_req->total_tasks); */ + /* info("usage_mode\t= %d", pe_job_req->node_usage); */ + /* info("network_usage protocols\t= %s", pe_job_req->network_usage.protocols); */ + /* info("network_usage adapter_usage\t= %s", pe_job_req->network_usage.adapter_usage); */ + /* info("network_usage adapter_type\t= %s", pe_job_req->network_usage.adapter_type); */ + /* info("network_usage mode\t= %s", pe_job_req->network_usage.mode); */ + /* info("network_usage instance\t= %s", pe_job_req->network_usage.instances); */ + /* info("network_usage dev_type\t= %s", pe_job_req->network_usage.dev_type); */ + + /* info("check_pointable\t= %d", pe_job_req->check_pointable); */ + + /* info("check_dir\t= %s", pe_job_req->check_dir); */ + + /* info("task_affinity\t= %s", pe_job_req->task_affinity); */ + + /* info("pthreads\t= %d", pe_job_req->parallel_threads); */ + /* info("save_job\t= %s", pe_job_req->save_job_file); */ + + /* info("require\t= %s", pe_job_req->requirements); */ + + /* info("node_topology\t= %s", pe_job_req->node_topology); */ + + /* info("pool\t= %s", pe_job_req->pool); */ + if (pe_job_req->num_nodes != -1) opt.max_nodes = opt.min_nodes = pe_job_req->num_nodes; - info("tasks_per_node\t= %d", pe_job_req->tasks_per_node); if (pe_job_req->tasks_per_node != -1) opt.ntasks_per_node = pe_job_req->tasks_per_node; - info("total_tasks\t= %d", pe_job_req->total_tasks); if (pe_job_req->total_tasks != -1) { opt.ntasks_set = true; opt.ntasks = pe_job_req->total_tasks; } - info("usage_mode\t= %d", pe_job_req->node_usage); - - info("network_usage protocols\t= %s", pe_job_req->network_usage.protocols); + xfree(opt.mpi_type); opt.mpi_type = xstrdup(pe_job_req->network_usage.protocols); - info("network_usage adapter_usage\t= %s", pe_job_req->network_usage.adapter_usage); - info("network_usage adapter_type\t= %s", pe_job_req->network_usage.adapter_type); - info("network_usage mode\t= %s", pe_job_req->network_usage.mode); + xfree(opt.network); opt.network = xstrdup(pe_job_req->network_usage.mode); - info("network_usage instance\t= %s", pe_job_req->network_usage.instances); - info("network_usage dev_type\t= %s", pe_job_req->network_usage.dev_type); - - info("check_pointable\t= %d", pe_job_req->check_pointable); - - info("check_dir\t= %s", pe_job_req->check_dir); - - info("task_affinity\t= %s", pe_job_req->task_affinity); - info("pthreads\t= %d", pe_job_req->parallel_threads); - - /* info("pool\t= %s", pe_job_req->pool); */ /* opt.partition = xstrdup(pe_job_req->pool); */ - info("save_job\t= %s", pe_job_req->save_job_file); - - info("require\t= %s", pe_job_req->requirements); - - info("node_topology\t= %s", pe_job_req->node_topology); /* /\* now global "opt" should be filled in and available, */ /* * create a job from opt */ /* *\/ */ @@ -619,7 +622,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, else if (!opt.job_name_set_env && opt.argc) setenvfs("SLURM_JOB_NAME=%s", opt.argv[0]); - if ( !(resp = allocate_nodes()) ) + if (!(resp = allocate_nodes())) return error_exit; //got_alloc = true; -- GitLab From 8bc0566fe59904028efea40a7323944d9998353b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 5 Jun 2012 11:49:39 -0700 Subject: [PATCH 382/614] make debug available by using -vvv with srun --- src/plugins/switch/nrt/libpermapi/shr_64.c | 71 +++++++++++----------- 1 file changed, 36 insertions(+), 35 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 57ffe6dae4..f69c61b039 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -121,7 +121,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, slurm_step_io_fds_t cio_fds = SLURM_STEP_IO_FDS_INITIALIZER; uint32_t global_rc = 0; - info("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); + debug("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); opt.argc = my_argc; opt.argv = my_argv; @@ -153,7 +153,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) resource_mgr = NULL; dlclose(my_handle); - info("got pe_rm_free called"); + debug("got pe_rm_free called"); } @@ -168,7 +168,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { - info("got pe_rm_free_event called"); + debug("got pe_rm_free_event called"); if (job_event) { xfree(*job_event); } @@ -238,8 +238,8 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, { job_event_t *ret_event = NULL; int *state; - info("got pe_rm_get_event called %d %p %p", rm_timeout, - job_event, *job_event); + debug("got pe_rm_get_event called %d %p %p", + rm_timeout, job_event, *job_event); ret_event = xmalloc(sizeof(job_event_t)); *job_event = ret_event; @@ -290,7 +290,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char *host; host_usage_t *host_ptr; - info("got pe_rm_get_job_info called %p %p", job_info, *job_info); + debug("got pe_rm_get_job_info called %p %p", job_info, *job_info); *job_info = ret_info; @@ -327,7 +327,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, /* xstrdup_printf("10.0.0.5%d", i+1); */ slurm_conf_get_addr(host, &addr); host_ptr->host_address = xstrdup(inet_ntoa(addr.sin_addr)); - //info("%s = %s", host_ptr->host_name, host_ptr->host_address); + debug3("%s = %s", host_ptr->host_name, host_ptr->host_address); host_ptr->task_count = step_layout->tasks[i]; host_ptr->task_ids = xmalloc(sizeof(int) * host_ptr->task_count); @@ -429,7 +429,10 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, #else fatal("I haven't been told where I am. This should never happen."); #endif - info("got pe_rm_init called %s", rm_id); + debug("got pe_rm_init called %s", rm_id); + + if (slurm_select_init(1) != SLURM_SUCCESS ) + fatal( "failed to initialize node selection plugin" ); /* Set up slurmctld message handler */ slurmctld_msg_init(); @@ -467,7 +470,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { - info("got pe_rm_send_event called"); + debug("got pe_rm_send_event called"); return 0; } @@ -492,7 +495,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, job_request_t *pe_job_req = NULL; char *myargv[3] = { "poe", "poe", NULL }; - info("got pe_rm_submit_job called %d", job_cmd.job_format); + debug("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { /* We don't handle files */ error("SLURM doesn't handle files to submit_job"); @@ -516,31 +519,29 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, exit(error_exit); } - /* info("num_nodes\t= %d", pe_job_req->num_nodes); */ - /* info("tasks_per_node\t= %d", pe_job_req->tasks_per_node); */ - /* info("total_tasks\t= %d", pe_job_req->total_tasks); */ - /* info("usage_mode\t= %d", pe_job_req->node_usage); */ - /* info("network_usage protocols\t= %s", pe_job_req->network_usage.protocols); */ - /* info("network_usage adapter_usage\t= %s", pe_job_req->network_usage.adapter_usage); */ - /* info("network_usage adapter_type\t= %s", pe_job_req->network_usage.adapter_type); */ - /* info("network_usage mode\t= %s", pe_job_req->network_usage.mode); */ - /* info("network_usage instance\t= %s", pe_job_req->network_usage.instances); */ - /* info("network_usage dev_type\t= %s", pe_job_req->network_usage.dev_type); */ - - /* info("check_pointable\t= %d", pe_job_req->check_pointable); */ - - /* info("check_dir\t= %s", pe_job_req->check_dir); */ - - /* info("task_affinity\t= %s", pe_job_req->task_affinity); */ - - /* info("pthreads\t= %d", pe_job_req->parallel_threads); */ - /* info("save_job\t= %s", pe_job_req->save_job_file); */ - - /* info("require\t= %s", pe_job_req->requirements); */ - - /* info("node_topology\t= %s", pe_job_req->node_topology); */ - - /* info("pool\t= %s", pe_job_req->pool); */ + debug2("num_nodes\t= %d", pe_job_req->num_nodes); + debug2("tasks_per_node\t= %d", pe_job_req->tasks_per_node); + debug2("total_tasks\t= %d", pe_job_req->total_tasks); + debug2("usage_mode\t= %d", pe_job_req->node_usage); + debug2("network_usage protocols\t= %s", + pe_job_req->network_usage.protocols); + debug2("network_usage adapter_usage\t= %s", + pe_job_req->network_usage.adapter_usage); + debug2("network_usage adapter_type\t= %s", + pe_job_req->network_usage.adapter_type); + debug2("network_usage mode\t= %s", pe_job_req->network_usage.mode); + debug2("network_usage instance\t= %s", + pe_job_req->network_usage.instances); + debug2("network_usage dev_type\t= %s", + pe_job_req->network_usage.dev_type); + debug2("check_pointable\t= %d", pe_job_req->check_pointable); + debug2("check_dir\t= %s", pe_job_req->check_dir); + debug2("task_affinity\t= %s", pe_job_req->task_affinity); + debug2("pthreads\t= %d", pe_job_req->parallel_threads); + debug2("save_job\t= %s", pe_job_req->save_job_file); + debug2("require\t= %s", pe_job_req->requirements); + debug2("node_topology\t= %s", pe_job_req->node_topology); + debug2("pool\t= %s", pe_job_req->pool); if (pe_job_req->num_nodes != -1) opt.max_nodes = opt.min_nodes = pe_job_req->num_nodes; -- GitLab From 8e1aaa682001ea42f0baa6c4b45a9f4be19dddf4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:53:37 -0700 Subject: [PATCH 383/614] Added user_managed_io to srun opts struct --- src/plugins/launch/slurm/launch_slurm.c | 1 + src/srun/opt.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 71cb96658e..3cb65769ff 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -435,6 +435,7 @@ extern int launch_p_step_launch( launch_params.preserve_env = opt.preserve_env; launch_params.spank_job_env = opt.spank_job_env; launch_params.spank_job_env_size = opt.spank_job_env_size; + launch_params.user_managed_io = opt.user_managed_io; memcpy(&launch_params.local_fds, cio_fds, sizeof(slurm_step_io_fds_t)); diff --git a/src/srun/opt.h b/src/srun/opt.h index a9e4e2ff90..a94f755cee 100644 --- a/src/srun/opt.h +++ b/src/srun/opt.h @@ -225,6 +225,7 @@ typedef struct srun_options { int spank_job_env_size; /* size of spank_job_env */ int req_switch; /* Minimum number of switches */ int wait4switch; /* Maximum time to wait for minimum switches */ + bool user_managed_io; /* 0 for "normal" IO, 1 for "user manged" IO */ char *runjob_opts; /* Runjob command options, BGQ only */ } opt_t; -- GitLab From 1c4929a1f3000d22d8be240cda817bc919b6d5f8 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:56:41 -0700 Subject: [PATCH 384/614] add slurm_conf_get_nodename_from_addr --- src/common/read_config.c | 35 ++++++++++++++++++++++++++++++++++- src/common/read_config.h | 8 ++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/src/common/read_config.c b/src/common/read_config.c index f3a7dc226d..fcf483e215 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -43,16 +43,19 @@ # include "config.h" #endif +#include #include #include #include #include #include +#include #include #include #include #include #include +#include #include #include #include @@ -1496,7 +1499,6 @@ extern char *slurm_conf_get_nodename(const char *node_hostname) _init_slurmd_nodehash(); idx = _get_hash_idx(node_hostname); - p = host_to_node_hashtbl[idx]; while (p) { if (strcmp(p->hostname, node_hostname) == 0) { @@ -1580,6 +1582,37 @@ extern char *slurm_conf_get_nodeaddr(const char *node_hostname) return NULL; } +/* + * slurm_conf_get_nodename_from_addr - Return the NodeName for given NodeAddr + * + * NOTE: Call xfree() to release returned value's memory. + * NOTE: Caller must NOT be holding slurm_conf_lock(). + */ +extern char *slurm_conf_get_nodename_from_addr(const char *node_addr) +{ + unsigned char buf[HOSTENT_SIZE]; + struct hostent *hptr; + unsigned long addr = inet_addr(node_addr); + char *start_name, *ret_name = NULL, *dot_ptr; + + if (!(hptr = get_host_by_addr((char *)&addr, sizeof(addr), AF_INET, + buf, sizeof(buf), NULL))) { + error("%m"); + return NULL; + } + + start_name = xstrdup(hptr->h_name); + dot_ptr = strchr(start_name, '.'); + if (dot_ptr == NULL) + dot_ptr = start_name + strlen(start_name); + else + dot_ptr[0] = '\0'; + + ret_name = slurm_conf_get_aliases(start_name); + xfree(start_name); + return ret_name; +} + /* * slurm_conf_get_aliased_nodename - Return the NodeName for the * complete hostname string returned by gethostname if there is diff --git a/src/common/read_config.h b/src/common/read_config.h index 0fe1362fd5..06e7af13c5 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -366,6 +366,14 @@ extern char *slurm_conf_get_aliases(const char *node_hostname); */ extern char *slurm_conf_get_nodeaddr(const char *node_hostname); +/* + * slurm_conf_get_nodename_from_addr - Return the NodeName for given NodeAddr + * + * NOTE: Call xfree() to release returned value's memory. + * NOTE: Caller must NOT be holding slurm_conf_lock(). + */ +extern char *slurm_conf_get_nodename_from_addr(const char *node_addr); + /* * slurm_conf_get_aliased_nodename - Return the NodeName matching an alias * of the local hostname -- GitLab From a45d53c70f07d0a926326883247b953435981748 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:57:13 -0700 Subject: [PATCH 385/614] alter slurm_step_ctx_daemon_per_node_hack to work on new poe interface --- slurm/slurm.h.in | 9 ++++++--- src/api/step_ctx.c | 47 ++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 45 insertions(+), 11 deletions(-) diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 34f14020c3..1f19d7390e 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -2433,14 +2433,17 @@ extern int slurm_jobinfo_ctx_get PARAMS((switch_jobinfo_t *jobinfo, * to run a single process per node, regardless of the settings * selected at slurm_step_ctx_create time. * - * This is primarily used on AIX by the slurm_ll_api in support of - * poe. The slurm_ll_api will want to launch a single pmd daemon + * This is primarily used when launching 1 task per node as done + * with IBM's PE where we want to launch a single pmd daemon * on each node regardless of the number of tasks running on each * node. * IN ctx - job step context generated by slurm_step_ctx_create + * IN addr_array - address of nodes to run on + * IN node_cnt - number of nodes to run on * RET SLURM_SUCCESS or SLURM_ERROR (with slurm_errno set) */ -extern int slurm_step_ctx_daemon_per_node_hack PARAMS((slurm_step_ctx_t *ctx)); +extern int slurm_step_ctx_daemon_per_node_hack PARAMS( + (slurm_step_ctx_t *ctx, char **addr_array, uint32_t node_cnt)); /* * slurm_step_ctx_destroy - free allocated memory for a job step context. diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index 2a56666fee..63f63610ed 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -58,6 +58,7 @@ #include "src/common/bitstring.h" #include "src/common/hostlist.h" #include "src/common/net.h" +#include "src/common/read_config.h" #include "src/common/slurm_cred.h" #include "src/common/slurm_protocol_api.h" #include "src/common/slurm_protocol_defs.h" @@ -348,6 +349,7 @@ slurm_step_ctx_get (slurm_step_ctx_t *ctx, int ctx_key, ...) case SLURM_STEP_CTX_USER_MANAGED_SOCKETS: int_ptr = va_arg(ap, int *); int_array_pptr = va_arg(ap, int **); + if (ctx->launch_state == NULL || ctx->launch_state->user_managed_io == false || ctx->launch_state->io.user == NULL) { @@ -411,18 +413,27 @@ slurm_step_ctx_destroy (slurm_step_ctx_t *ctx) * to run a single process per node, regardless of the settings * selected at slurm_step_ctx_create time. * - * This is primarily used on AIX by the slurm_ll_api in support of - * poe. The slurm_ll_api will want to launch a single pmd daemon + * This is primarily used when launching 1 task per node as done + * with IBM's PE where we want to launch a single pmd daemon * on each node regardless of the number of tasks running on each * node. * IN ctx - job step context generated by slurm_step_ctx_create + * IN addr_array - address of nodes to run on + * IN node_cnt - number of nodes to run on * RET SLURM_SUCCESS or SLURM_ERROR (with slurm_errno set) */ extern int -slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx) +slurm_step_ctx_daemon_per_node_hack( + slurm_step_ctx_t *ctx, char **addr_array, uint32_t node_cnt) { slurm_step_layout_t *new_layout, *old_layout; int i; + hostlist_t hl = NULL; + char *name = NULL; + /* Since this could be called lots of times in a single + process we need to make sure it keeps counting up. + */ + static int task_id = 0; if ((ctx == NULL) || (ctx->magic != STEP_CTX_MAGIC)) { slurm_seterrno(EINVAL); @@ -430,15 +441,35 @@ slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx) } /* hack the context node count */ - ctx->step_req->num_tasks = ctx->step_req->min_nodes; + ctx->step_req->num_tasks = node_cnt; /* hack the context step layout */ old_layout = ctx->step_resp->step_layout; new_layout = (slurm_step_layout_t *) xmalloc(sizeof(slurm_step_layout_t)); - new_layout->node_cnt = old_layout->node_cnt; - new_layout->task_cnt = old_layout->node_cnt; - new_layout->node_list = xstrdup(old_layout->node_list); + ctx->step_req->num_tasks = new_layout->task_cnt = new_layout->node_cnt + = node_cnt; + + for (i=0; inode_list = hostlist_ranged_string_xmalloc(hl); + hostlist_destroy(hl); + slurm_step_layout_destroy(old_layout); new_layout->tasks = (uint16_t *) xmalloc(sizeof(uint16_t) * new_layout->node_cnt); @@ -447,7 +478,7 @@ slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx) for (i = 0; i < new_layout->node_cnt; i++) { new_layout->tasks[i] = 1; new_layout->tids[i] = (uint32_t *)xmalloc(sizeof(uint32_t)); - new_layout->tids[i][0] = i; + new_layout->tids[i][0] = task_id++; } ctx->step_resp->step_layout = new_layout; -- GitLab From dac313c87ef643c61709cad34db54d658e799af0 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:57:57 -0700 Subject: [PATCH 386/614] poe launching now can start pmd and get things going, no job actually ran yet though. --- src/plugins/switch/nrt/libpermapi/shr_64.c | 37 ++++++++++++++++------ 1 file changed, 28 insertions(+), 9 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index f69c61b039..b64363a321 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -116,26 +116,47 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, srun_job_t **job_ptr = (srun_job_t **)resource_mgr; srun_job_t *job = *job_ptr; int my_argc = 1; - char *my_argv[2] = { "/etc/pmdv12", NULL }; + char *my_argv[2] = { connect_param->executable, NULL }; // char *my_argv[2] = { "/bin/hostname", NULL }; slurm_step_io_fds_t cio_fds = SLURM_STEP_IO_FDS_INITIALIZER; uint32_t global_rc = 0; + int i, rc, fd_cnt; + int *ctx_sockfds = NULL; - debug("got pe_rm_connect called %p %d", rm_sockfds, rm_sockfds[0]); + debug("got pe_rm_connect called"); opt.argc = my_argc; opt.argv = my_argv; + opt.user_managed_io = true; launch_common_set_stdio_fds(job, &cio_fds); + if (slurm_step_ctx_daemon_per_node_hack(job->step_ctx, + connect_param->machine_name, + connect_param->machine_count) + != SLURM_SUCCESS) + return -1; + if (launch_g_step_launch(job, &cio_fds, &global_rc)) - return 1; + return -1; + + rc = slurm_step_ctx_get(job->step_ctx, + SLURM_STEP_CTX_USER_MANAGED_SOCKETS, + &fd_cnt, &ctx_sockfds); + if (ctx_sockfds == NULL) { + error("Unable to get pmd IO socket array %d", rc); + return -5; + } + if (fd_cnt != connect_param->machine_count) { + error("looking for %d sockets but got back %d", + connect_param->machine_count, fd_cnt); + return -5; + } - rm_sockfds[0] = cio_fds.in.fd; - rm_sockfds[1] = cio_fds.out.fd; - rm_sockfds[2] = cio_fds.err.fd; + for (i=0; inetwork_usage.mode); - /* opt.partition = xstrdup(pe_job_req->pool); */ - /* /\* now global "opt" should be filled in and available, */ /* * create a job from opt */ /* *\/ */ -- GitLab From 3988270dd1987221819836c2ed7fb3ca59ad65b4 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 16:59:41 -0700 Subject: [PATCH 387/614] fix warning --- src/plugins/switch/nrt/nrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 3037cff43d..598612c5dc 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1230,7 +1230,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %hu", j->bulk_xfer); - info(" bulk_xfer_resources: %lu", j->bulk_xfer_resources); + info(" bulk_xfer_resources: %u", j->bulk_xfer_resources); info(" ip_v4: %hu", j->ip_v4); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); -- GitLab From 7f214f3797f066c74c3b55237c62c31b183b1696 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 6 Jun 2012 17:02:39 -0700 Subject: [PATCH 388/614] update RELEASE_NOTES for 2.5 --- RELEASE_NOTES | 79 +++++++-------------------------------------------- 1 file changed, 10 insertions(+), 69 deletions(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 35872187cf..ef727f706e 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -1,10 +1,10 @@ -RELEASE NOTES FOR SLURM VERSION 2.4 -25 May 2012 +RELEASE NOTES FOR SLURM VERSION 2.5 +6 June 2012 IMPORTANT NOTE: If using the slurmdbd (SLURM DataBase Daemon) you must update this first. -The 2.4 slurmdbd will work with SLURM daemons of version 2.1.3 and above. +The 2.5 slurmdbd will work with SLURM daemons of version 2.1.3 and above. You will not need to update all clusters at the same time, but it is very important to update slurmdbd first and having it running before updating any other clusters making use of it. No real harm will come from updating @@ -18,82 +18,29 @@ innodb_buffer_pool_size=64M under the [mysqld] reference in the my.cnf file and restarting the mysqld. This is needed when converting large tables over to the new database schema. -SLURM can be upgraded from version 2.3 to version 2.4 without loss of jobs or +SLURM can be upgraded from version 2.4 to version 2.5 without loss of jobs or other state information. HIGHLIGHTS ========== -* Up to 500% higher throughput for short-lived jobs (depending upon - configuration). -* Major modifications to support IBM BlueGene/Q systems. -* New SPANK callbacks added to slurmd: slurm_spank_slurmd_{init,exit} and - job epilog/prolog: slurm_spank_job_{prolog,epilog}. -* Added MPI plugin, mpi/pmi2, which supports MPI_Comm_spawn() function. + CONFIGURATION FILE CHANGES (see "man slurm.conf" for details) ============================================================= -* "PriorityFlags" added -* "RebootProgram" added -* "ReconfigFlags" added -* "SlurmdDebugLevel" and "SlurmctldDebugLevel" now accept string names in - addition to numeric values (e.g. "info", "verbose", "debug", etc.). Output - of scontrol and sview commands also use the string names. -* Changed default value of "StateSaveLocation" configuration parameter from - "/tmp" to "/var/spool" to help avoid purging. -* Change default "SchedulerParameters" "max_switch_wait" field value from 60 to - 300 seconds. -* Added new "SchedulerParameters" of "bf_max_job_user", maximum number of jobs - to attempt backfilling per user. -* Modify SchedulerParamters option to match documentation: "bf_res=" - changed to "bf_resolution=". + COMMAND CHANGES (see man pages for details) =========================================== -* Modified advance reservation to select resources optimized for network - topology and accept multiple specific block sizes rather than a single node - count. -* Added trigger flag for a permanent trigger. The trigger will NOT be purged - after an event occurs, but only when explicitly deleted. -* Added the ability to reboot all compute nodes after they become idle. The - RebootProgram configuration parameter must be set and an authorized user - must execute the command "scontrol reboot_nodes". -* Added the ability to update a node's NodeAddr and NodeHostName with scontrol. -* Added the option "--name" to the sacct and squeue commands. -* Add support for job allocations with multiple job constraint counts. For - example: salloc -C "[rack1*2&rack2*4]" ... will allocate the job 2 nodes - from rack1 and 4 nodes from rack2. Support for only a single constraint - name been added to job step support. -* Changed meaning of squeue "-n" option to job name from node name for - consistency with other commands. The "-w" option was added for a short - node name option. Long options --names and --nodes remain unchanged. -* Sinfo output format of "%P" now prints "*" after default partition even if - no field width is specified (previously included "*" only if no field width - was specified. Added output format of "%R" to print partition name only - without identifying the default partition with "*"). -* Added cpu_run_min to the output of sshare --long. -* Modify scontrol to require "-dd" option to report batch job's script. OTHER CHANGES ============= -* Improve task binding logic by making fuller use of HWLOC library, - especially with respect to Opteron 6000 series processors. -* Changde to output tools labels from "BP" to "Midplane" (i.e. "BP_List" was - changed to "MidplaneList"). -* Modified srun to fork a processes which can terminate the job and/or step - allocation if the initial srun process is abnormallly terminated (e.g. by - SIGKILL). -* Added support for Cray GPU memory allocation as GRES (Generic RESources). -* Correct setting of CUDA_VISIBLE_DEVICES for gres/gpu plugin if device files - to be used are not in numeric order (e.g. GPU 1 maps to "/dev/nvidia4"). -* Cray - Add support for zero compute note resource allocation to run batch - script on front-end node with no ALPS reservation. Useful for pre- or post- - processing. NOTE: The partition must be configured with MinNodes=0. + API CHANGES =========== -* Added the UserID of the user issuing the RPC to the job_submit/lua functions. + Changed members of the following structs ======================================== @@ -101,17 +48,10 @@ Changed members of the following structs Added the following struct definitions ====================================== -block_info_t: cnode_err_cnt added -slurm_ctl_conf_t priority_flags, reboot_program and reconfig_flags added -trigger_info_t: flags added -update_node_msg_t: node_addr and node_hostname added -slurmdb_association_cond_t: grp_mem_list added -slurmdb_association_rec_t: grp_mem added -slurmdb_qos_rec_t: grp_mem added + Changed the following enums and #defines ======================================== -TRIGGER_FLAG_PERM Added Added the following API's @@ -120,3 +60,4 @@ Added the following API's Changed the following API's =========================== +slurm_step_ctx_daemon_per_node_hack - ported to newer poe interface -- GitLab From fb391e89f675f203f7cb8849c2d8a61956327d07 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 7 Jun 2012 13:30:56 -0700 Subject: [PATCH 389/614] NRT - more flushing out of the perm api. You should be able to launch jobs now. --- src/api/step_ctx.c | 14 +++++---- src/plugins/switch/nrt/libpermapi/shr_64.c | 33 +++++++++++++++------- 2 files changed, 31 insertions(+), 16 deletions(-) diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index 63f63610ed..dba9583b67 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -430,10 +430,6 @@ slurm_step_ctx_daemon_per_node_hack( int i; hostlist_t hl = NULL; char *name = NULL; - /* Since this could be called lots of times in a single - process we need to make sure it keeps counting up. - */ - static int task_id = 0; if ((ctx == NULL) || (ctx->magic != STEP_CTX_MAGIC)) { slurm_seterrno(EINVAL); @@ -478,13 +474,19 @@ slurm_step_ctx_daemon_per_node_hack( for (i = 0; i < new_layout->node_cnt; i++) { new_layout->tasks[i] = 1; new_layout->tids[i] = (uint32_t *)xmalloc(sizeof(uint32_t)); - new_layout->tids[i][0] = task_id++; + new_layout->tids[i][0] = i; } ctx->step_resp->step_layout = new_layout; /* recreate the launch state structure now that the settings have changed */ - step_launch_state_destroy(ctx->launch_state); + + +/* FIXME: currently we have to make multiple calls for this so + destroying it does not work. This isn't a good solution either and + should only be viewed as temporary. +*/ + //step_launch_state_destroy(ctx->launch_state); ctx->launch_state = step_launch_state_create(ctx); return SLURM_SUCCESS; diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index b64363a321..9b6cd7f1de 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -42,7 +42,6 @@ #include #include -#include "src/common/slurm_xlator.h" #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -134,29 +133,41 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, if (slurm_step_ctx_daemon_per_node_hack(job->step_ctx, connect_param->machine_name, connect_param->machine_count) - != SLURM_SUCCESS) + != SLURM_SUCCESS) { + *error_msg = xstrdup_printf( + "pe_rm_connect: problem with hack"); + error("%s", *error_msg); return -1; + } - if (launch_g_step_launch(job, &cio_fds, &global_rc)) + if (launch_g_step_launch(job, &cio_fds, &global_rc)) { + *error_msg = xstrdup_printf( + "pe_rm_connect: problem with launch"); + error("%s", *error_msg); return -1; + } rc = slurm_step_ctx_get(job->step_ctx, SLURM_STEP_CTX_USER_MANAGED_SOCKETS, &fd_cnt, &ctx_sockfds); if (ctx_sockfds == NULL) { - error("Unable to get pmd IO socket array %d", rc); - return -5; + *error_msg = xstrdup_printf( + "pe_rm_connect: Unable to get pmd IO socket array %d", + rc); + error("%s", *error_msg); + return -1; } if (fd_cnt != connect_param->machine_count) { - error("looking for %d sockets but got back %d", - connect_param->machine_count, fd_cnt); - return -5; + *error_msg = xstrdup_printf( + "pe_rm_connect: looking for %d sockets but got back %d", + connect_param->machine_count, fd_cnt); + error("%s", *error_msg); + return -1; } for (i=0; ihost_address = xstrdup(inet_ntoa(addr.sin_addr)); - debug3("%s = %s", host_ptr->host_name, host_ptr->host_address); host_ptr->task_count = step_layout->tasks[i]; host_ptr->task_ids = xmalloc(sizeof(int) * host_ptr->task_count); for (j=0; jtask_count; j++) host_ptr->task_ids[j] = task_id++; + debug3("%s = %s %d tasks", + host_ptr->host_name, host_ptr->host_address, + host_ptr->task_count); i++; if (i > ret_info->host_count) { error("we have more nodes that we bargined for."); -- GitLab From 57cde49ceb977a1e76449bb0a26cc9517d63983f Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 7 Jun 2012 13:33:51 -0700 Subject: [PATCH 390/614] minor formating changes --- src/common/slurm_jobacct_gather.c | 1 + src/common/slurm_jobacct_gather.h | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 136ed3a8d3..d607b76974 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -54,6 +54,7 @@ #include "src/common/macros.h" #include "src/common/plugin.h" #include "src/common/plugrack.h" +#include "src/common/read_config.h" #include "src/common/slurm_jobacct_gather.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" diff --git a/src/common/slurm_jobacct_gather.h b/src/common/slurm_jobacct_gather.h index b32f8d4b11..d798c647b8 100644 --- a/src/common/slurm_jobacct_gather.h +++ b/src/common/slurm_jobacct_gather.h @@ -76,7 +76,6 @@ #include "src/common/pack.h" #include "src/common/list.h" #include "src/common/xmalloc.h" -#include "src/common/read_config.h" #include "src/slurmd/slurmstepd/slurmstepd_job.h" @@ -143,14 +142,13 @@ extern void jobacctinfo_destroy(void *object); extern int jobacctinfo_setinfo(jobacctinfo_t *jobacct, enum jobacct_data_type type, void *data); extern int jobacctinfo_getinfo(jobacctinfo_t *jobacct, - enum jobacct_data_type type, void *data); + enum jobacct_data_type type, void *data); extern void jobacctinfo_pack(jobacctinfo_t *jobacct, - uint16_t rpc_version, Buf buffer); + uint16_t rpc_version, Buf buffer); extern int jobacctinfo_unpack(jobacctinfo_t **jobacct, - uint16_t rpc_version, Buf buffer); + uint16_t rpc_version, Buf buffer); -extern void jobacctinfo_aggregate(jobacctinfo_t *dest, - jobacctinfo_t *from); +extern void jobacctinfo_aggregate(jobacctinfo_t *dest, jobacctinfo_t *from); extern void jobacctinfo_2_stats(slurmdb_stats_t *stats, jobacctinfo_t *jobacct); -- GitLab From 1a75336c1f204a472ca1d571e92d8586d9c2b2ca Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 7 Jun 2012 13:42:52 -0700 Subject: [PATCH 391/614] put a -1 at the end of the instance (as the document says to) --- src/plugins/switch/nrt/libpermapi/shr_64.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 9b6cd7f1de..edda1b1dde 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -336,8 +336,9 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, ret_info->protocol[0] = xstrdup(opt.mpi_type); ret_info->mode = xmalloc(sizeof(char *)*2); ret_info->mode[0] = xstrdup(opt.network); - ret_info->instance = xmalloc(sizeof(int)); - *ret_info->instance = 1; + ret_info->instance = xmalloc(sizeof(int)*3); + ret_info->instance[0] = 1; + ret_info->instance[1] = -1; /* FIXME: not sure how to handle devicename yet */ ret_info->devicename = xmalloc(sizeof(char *)*2); ret_info->devicename[0] = xstrdup("sn_all"); -- GitLab From 11e2a59c8732eca858c2e5f6ed20cf9b72c1c4e7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 7 Jun 2012 10:03:06 -0700 Subject: [PATCH 392/614] Add explanation of switch/nrt table_id and context_id --- src/plugins/switch/nrt/nrt.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 598612c5dc..725383bca4 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2725,6 +2725,30 @@ _check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) * for a given adapter, load the table only once for that adapter. * * Used by: slurmd + * + * Notes on context_id and table_id from Bill LePera, IBM, 6/7/2012: + * + * Each NRT is uniquely identified by a combination of three elements: job_key, + * context_id, and table_id. context_id and table_id usually start at zero and + * are incremented based on how many NRTs are required to define all the + * resources used for a job, based on factors like striping, instances, and + * number of protocols. + * + * For example, a scheduler building an NRT for a job using a single protocol, + * single network (no striping), and a single instance would set both + * context_id and table_id to zero. A multi-protocol job (one that used both + * MPI and PAMI, for example), would build at least one NRT for each protocol. + * In this case, there would be two NRTs, with context_id 0 and 1. If you are + * still using a single network and single instance, the table_id's for both + * NRTs would be zero, and these would be the only two NRTs needed for the job. + * + * The table_id is incremented on a per-protocol basis, based on number of + * networks (or stripes) and number of instances. For example, a single- + * protocol job running across two networks using four instances would need + * 2 * 4 = 8 NRTs, with context_id set to 0 for each, and table_id 0 - 7. If + * this same job was a multi-protocol job, you would need 16 NRTs total + * (2 protocols * 2 networks * 4 instances), with context_id 0 and 1, and + * table_id 0-7 within each protocol. */ extern int nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) @@ -2788,6 +2812,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.is_ipv4 = 0; table_info.is_user_space = 0; } +/* FIXME: Need to set context_id here */ table_info.context_id = 0; /* FIXME: Need to set table_id here */ table_info.table_id = 0; -- GitLab From e63e069d2b474254c713e77b9248dd163adc7b03 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 7 Jun 2012 10:44:01 -0700 Subject: [PATCH 393/614] Adds some support in switch/nrt for multiple protocols --- src/plugins/switch/nrt/nrt.c | 20 +++++++++++++++++ src/plugins/switch/nrt/switch_nrt.c | 35 ++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 725383bca4..b16bff074f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -76,6 +76,7 @@ #define NRT_NODECOUNT 128 #define NRT_HASHCOUNT 128 #define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) +#define NRT_MAX_PROTO_CNT 20 pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; extern bool nrt_need_state_save; @@ -2759,10 +2760,29 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) int rc; nrt_cmd_load_table_t load_table; nrt_table_info_t table_info; + int protocol_cnt = 0; + char protocol_name[NRT_MAX_PROTO_CNT][NRT_MAX_PROTO_NAME_LEN]; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); + if (jp->protocol) { + char *tok, *save_ptr; + char *protocol = xstrdup(jp->protocol); + tok = strtok_r(protocol, ",", &save_ptr); + while (tok) { + if (protocol_cnt >= NRT_MAX_PROTO_CNT) { + error("too many protocols for job (%s)", + jp->protocol); + break; + } + strncpy(&protocol_name[protocol_cnt++][0], tok, + NRT_MAX_PROTO_NAME_LEN); + tok = strtok_r(NULL, ",", &save_ptr); + } + xfree(protocol); + } + #if NRT_DEBUG info("nrt_load_table"); _print_jobinfo(jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index d7071fd478..90f39204e5 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -398,7 +398,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, uint32_t bulk_xfer_resources = 0; bool sn_all; int err; - char *adapter_name = NULL, *protocol = "mpi", *bulk_ptr = NULL; + char *adapter_name = NULL, *bulk_ptr = NULL, *protocol = NULL; #if NRT_DEBUG info("switch_p_build_jobinfo(): nodelist:%s network:%s", @@ -452,14 +452,36 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, strstr(network, "US"))) user_space = true; + if (network && + (strstr(network, "lapi") || + strstr(network, "LAPI"))) { + if (protocol) + xstrcat(protocol, ","); + xstrcat(protocol, "lapi"); + } + if (network && + (strstr(network, "mpi") || + strstr(network, "MPI"))) { + if (protocol) + xstrcat(protocol, ","); + xstrcat(protocol, "mpi"); + } if (network && (strstr(network, "pami") || - strstr(network, "PAMI"))) - protocol = "pami"; + strstr(network, "PAMI"))) { + if (protocol) + xstrcat(protocol, ","); + xstrcat(protocol, "pami"); + } if (network && - (strstr(network, "lapi") || - strstr(network, "LAPI"))) - protocol = "lapi"; + (strstr(network, "upc") || + strstr(network, "UPC"))) { + if (protocol) + xstrcat(protocol, ","); + xstrcat(protocol, "upc"); + } + if (protocol == NULL) + xstrcat(protocol, "mpi"); if (!network) { /* default to sn_all */ @@ -485,6 +507,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, bulk_xfer, bulk_xfer_resources, ip_v4, user_space, protocol); + xfree(protocol); hostlist_destroy(list); xfree(adapter_name); -- GitLab From 5a36e9d4c7a64d292085dabd1e215ecca2b55898 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 7 Jun 2012 13:59:03 -0700 Subject: [PATCH 394/614] switch/nrt: Major refactoring of --network parsing logic --- src/plugins/switch/nrt/nrt.c | 69 ++++++++++------ src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 120 ++++++++++------------------ 3 files changed, 89 insertions(+), 102 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b16bff074f..14fdb433ea 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1172,7 +1172,7 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) inet_ntop(AF_INET, &ib_tbl_ptr->node_number, addr_str, sizeof(addr_str)); info(" node_number: %s", addr_str); - info(" node_number: %u", ib_tbl_ptr->node_number); +/* info(" node_number: %u", ib_tbl_ptr->node_number); */ info(" device_name: %s", ib_tbl_ptr->device_name); info(" base_lid: %u", ib_tbl_ptr->base_lid); info(" port_id: %hu", ib_tbl_ptr->port_id); @@ -1196,7 +1196,7 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) inet_ntop(AF_INET, &ip_tbl_ptr->node_number, addr_str, sizeof(addr_str)); info(" node_number: %s", addr_str); - info(" node_number: %u", ip_tbl_ptr->node_number); +/* info(" node_number: %u", ip_tbl_ptr->node_number); */ if (ip_v4) { inet_ntop(AF_INET, &ip_tbl_ptr->ip.ipv4_addr, addr_str, sizeof(addr_str)); @@ -1243,6 +1243,8 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" nodenames: %s (slurmctld internal use only)", buf); info(" num_tasks: %d", j->num_tasks); for (i = 0; i < j->tables_per_task; i++) { + info(" adapter_type: %s", + _adapter_type_str(j->tableinfo[i].adapter_type)); if (j->user_space) adapter_type = j->tableinfo[i].adapter_type; else @@ -2030,6 +2032,33 @@ _next_key(void) return key; } +static int _get_protocol_cnt(char *protocol) +{ + char *paren_ptr, *protocol_str, *save_ptr = NULL, *token; + int protocol_cnt = 0; + + if (!protocol) + return 1; + + protocol_str = xstrdup(protocol); + token = strtok_r(protocol_str, ",", &save_ptr); + while (token) { + paren_ptr = strchr(token, '('); + if (paren_ptr) + protocol_cnt += atoi(paren_ptr+1); + else + protocol_cnt++; + token = strtok_r(NULL, ",", &save_ptr); + } + xfree(protocol_str); + + if (protocol_cnt <= 0) { + info("Invalid job protocol(%s)", protocol); + protocol_cnt = 1; + } + return protocol_cnt; +} + /* Setup everything for the job. Assign tasks across * nodes based on the hostlist given and create the network table used * on all nodes of the job. @@ -3255,6 +3284,7 @@ nrt_clear_node_state(void) } #endif if (window_count > max_windows) { +/* FIXME: Seeing (2 > 0) for eth0 */ error("nrt_command(status_adapter, %s, %s): " "window_count > max_windows (%u > %hu)", adapter_status.adapter_name, @@ -3393,20 +3423,20 @@ extern char *nrt_err_str(int rc) } -/* return an adapter name from within a job's "network" string - * IN network - job's "network" specification +/* Determine if a token is the name of an adapter + * IN token - token from job's "network" specification * IN list - hostlist of allocated nodes - * RET - A network name, must xfree() or NULL if none found */ -extern char *nrt_adapter_name_check(char *network, hostlist_t hl) + * RET - True if token is a adapter name, false otherwise */ +extern bool nrt_adapter_name_check(char *token, hostlist_t hl) { int i; hostlist_iterator_t hi; slurm_nrt_nodeinfo_t *node; - char *host, *net_str = NULL, *token = NULL, *last = NULL; - char *adapter_name = NULL; + char *host; + bool name_found = false; - if (!network || !hl) - return NULL; + if (!token || !hl) + return name_found; hi = hostlist_iterator_create(hl); host = hostlist_next(hi); @@ -3414,21 +3444,14 @@ extern char *nrt_adapter_name_check(char *network, hostlist_t hl) _lock(); node = _find_node(nrt_state, host); if (node && node->adapter_list) { - net_str = xstrdup(network); - token = strtok_r(network, ",", &last); - } - while (token) { for (i = 0; i < node->adapter_count; i++) { - if (!strcmp(token,node->adapter_list[i].adapter_name)){ - adapter_name = xstrdup(token); - break; - } - } - if (adapter_name) + if (strcmp(token,node->adapter_list[i].adapter_name)) + continue; + name_found = true; break; - token = strtok_r(NULL, ",", &last); + } } _unlock(); - xfree(net_str); - return adapter_name; + + return name_found; } diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index c78934554f..81aa453234 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -83,7 +83,7 @@ enum { #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) -extern char *nrt_adapter_name_check(char *network, hostlist_t hl); +extern bool nrt_adapter_name_check(char *token, hostlist_t hl); extern int nrt_clear_node_state(void); extern char *nrt_err_str(int rc); extern int nrt_slurmctld_init(void); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 90f39204e5..88aa7ecf2f 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -396,9 +396,11 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, hostlist_t list = NULL; bool bulk_xfer = false, ip_v4 = true, user_space = false; uint32_t bulk_xfer_resources = 0; - bool sn_all; + bool sn_all = true; /* default to sn_all */ int err; - char *adapter_name = NULL, *bulk_ptr = NULL, *protocol = NULL; + char *adapter_name = NULL; + char *protocol = NULL; + char *network_str = NULL, *token = NULL, *save_ptr = NULL; #if NRT_DEBUG info("switch_p_build_jobinfo(): nodelist:%s network:%s", @@ -411,17 +413,16 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (!list) fatal("hostlist_create(%s): %m", nodelist); - if (network && - ((bulk_ptr = strstr(network, "bulk_xfer")) || - (bulk_ptr = strstr(network, "BULK_XFER")))) { - bulk_xfer = true; - if ((bulk_ptr[9] == '=') && - (bulk_ptr[10] >= '0') && - (bulk_ptr[10] <= '9')) { + if (network) { + network_str = xstrdup(network); + token = strtok_r(network_str, ",", &save_ptr); + } + while (token) { + if (!strncasecmp(token, "bulk_xfer=", 10)) { long int resources; char *end_ptr = NULL; - bulk_ptr += 10; - resources = strtol(bulk_ptr, &end_ptr, 10); + bulk_xfer = true; + resources = strtol(token+10, &end_ptr, 10); if ((end_ptr[0] == 'k') || (end_ptr[0] == 'K')) resources *= 1024; else if ((end_ptr[0] == 'm') || (end_ptr[0] == 'M')) @@ -430,86 +431,49 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, resources *= (1024 * 1024 * 1024); if (resources >= 0) bulk_xfer_resources = resources; + } else if (!strcasecmp(token, "bulk_xfer")) { + bulk_xfer = true; + + } else if (!strcasecmp(token, "ipv4")) { + ip_v4 = true; + } else if (!strcasecmp(token, "ipv6")) { + ip_v4 = false; + } else if (!strcasecmp(token, "us")) { + user_space = true; + + } else if ((!strncasecmp(token, "lapi", 4)) || + (!strncasecmp(token, "mpi", 3)) || + (!strncasecmp(token, "pami", 4)) || + (!strncasecmp(token, "upc", 3))) { + if (protocol) + xstrcat(protocol, ","); + xstrcat(protocol, token); + + } else if (!strcasecmp(token, "sn_all")) { + sn_all = true; + } else if (!strcasecmp(token, "sn_single")) { + sn_all = false; + } else if (nrt_adapter_name_check(token, list)) { +/* FIXME: Need to propagate to nrt_build_jobinfo() below */ + info("Found adapter %s in network string", token); + adapter_name = xstrdup(token); + sn_all = false; } + token = strtok_r(NULL, ",", &save_ptr); } - if (network && - (strstr(network, "ipv4") || - strstr(network, "IPV4"))) { - ip_v4 = true; - user_space = false; - } - - if (network && - (strstr(network, "ipv6") || - strstr(network, "IPV6"))) { - ip_v4 = false; - user_space = false; - } - - if (network && - (strstr(network, "us") || - strstr(network, "US"))) - user_space = true; - - if (network && - (strstr(network, "lapi") || - strstr(network, "LAPI"))) { - if (protocol) - xstrcat(protocol, ","); - xstrcat(protocol, "lapi"); - } - if (network && - (strstr(network, "mpi") || - strstr(network, "MPI"))) { - if (protocol) - xstrcat(protocol, ","); - xstrcat(protocol, "mpi"); - } - if (network && - (strstr(network, "pami") || - strstr(network, "PAMI"))) { - if (protocol) - xstrcat(protocol, ","); - xstrcat(protocol, "pami"); - } - if (network && - (strstr(network, "upc") || - strstr(network, "UPC"))) { - if (protocol) - xstrcat(protocol, ","); - xstrcat(protocol, "upc"); - } if (protocol == NULL) xstrcat(protocol, "mpi"); - if (!network) { - /* default to sn_all */ - sn_all = true; - } else if (strstr(network, "sn_all") || - strstr(network, "SN_ALL")) { - debug3("Found sn_all in network string"); - sn_all = true; - } else if (strstr(network, "sn_single") || - strstr(network, "SN_SINGLE")) { - debug3("Found sn_single in network string"); - sn_all = false; - } else if ((adapter_name = nrt_adapter_name_check(network, list))) { - info("Found adapter %s in network string", adapter_name); - sn_all = false; - } else { - /* default to sn_all */ - sn_all = true; - } - err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, tasks_per_node, tids, sn_all, adapter_name, bulk_xfer, bulk_xfer_resources, ip_v4, user_space, protocol); + xfree(adapter_name); xfree(protocol); hostlist_destroy(list); - xfree(adapter_name); + xfree(network_str); return err; } -- GitLab From c0c2dd59c2576af601c4471f9d216eea89e34bd0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 7 Jun 2012 15:46:01 -0700 Subject: [PATCH 395/614] switch/nrt added more job communications data --- src/plugins/switch/nrt/nrt.c | 20 +++++++++++++++----- src/plugins/switch/nrt/nrt_keys.h | 20 +++++++++++++++++--- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 14fdb433ea..f7c86eb3b6 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2548,9 +2548,10 @@ nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) extern int nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) { - nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **)data; - int *tables_per = (int *)data; - int *job_key = (int *)data; + nrt_comm_table_t **comm_table = (nrt_comm_table_t **) data; + nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **) data; + int *tables_per = (int *) data; + int *job_key = (int *) data; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2560,10 +2561,18 @@ nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) *tableinfo = jp->tableinfo; break; case NRT_JOBINFO_TABLESPERTASK: - *tables_per = jp->tables_per_task; + *tables_per = (int) jp->tables_per_task; break; case NRT_JOBINFO_KEY: - *job_key = jp->job_key; + *job_key = (int) jp->job_key; + break; + case NRT_JOBINFO_COMM_INFO: + if (jp->tableinfo) + *comm_table = jp->tableinfo->comm_table_ptr; + else { + *comm_table = NULL; + slurm_seterrno_ret(EINVAL); + } break; default: slurm_seterrno_ret(EINVAL); @@ -2876,6 +2885,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } else { table_info.job_name[0] = '\0'; } +/* FIXME: Need to set on a per-table record basis */ if (jp->protocol) { strncpy(table_info.protocol_name, jp->protocol, NRT_MAX_PROTO_NAME_LEN); diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index ff1cb99e76..ba1e065714 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -1,6 +1,5 @@ /*****************************************************************************\ ** nrt_keys.h - Key definitions used by the get_jobinfo functions - ** $Id$ ***************************************************************************** * Copyright (C) 2004 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). @@ -52,15 +51,30 @@ enum { NRT_JOBINFO_TABLESPERTASK, NRT_JOBINFO_KEY, NRT_JOBINFO_PROTOCOL, - NRT_JOBINFO_MODE + NRT_JOBINFO_MODE, + NRT_JOBINFO_COMM_INFO }; /* Information shared between slurm_ll_api and the slurm NRT driver */ +typedef struct nrt_comm_record { + nrt_context_id_t context_id; + nrt_table_id_t table_id; + char device_name[NRT_MAX_DEVICENAME_SIZE]; /* eth0, mlx4_0, etc. */ + char protocol_name[NRT_MAX_PROTO_NAME_LEN]; /* MPI, LAPI, UPC, etc. */ +} nrt_comm_record_t; + +typedef struct nrt_comm_table { + uint16_t nrt_comm_count; + nrt_comm_record_t *nrt_comm_ptr; +} nrt_comm_table_t; + typedef struct nrt_tableinfo { uint32_t table_length; - void *table; /* Pointer to nrt_*_task_info_t*/ + void *table; /* Pointer to nrt_*_task_info_t */ char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; +/* FIXME: Need to populate, un/pack, and free this data structure */ + nrt_comm_table_t *comm_table_ptr; } nrt_tableinfo_t; #endif /* _NRT_KEYS_INCLUDED */ -- GitLab From 76d1608d009a65085f5d0887db2d18cd09cd84a6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 8 Jun 2012 10:16:19 -0700 Subject: [PATCH 396/614] Major update to man page description of --network job option Needed for switch/nrt plugin enhancements --- doc/man/man1/salloc.1 | 64 +++++++++++++++++++++++++++++++++++-------- doc/man/man1/sbatch.1 | 64 +++++++++++++++++++++++++++++++++++-------- doc/man/man1/srun.1 | 62 +++++++++++++++++++++++++++++++++-------- 3 files changed, 155 insertions(+), 35 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 4f26c6e589..0f30288a81 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -1,4 +1,4 @@ -.TH "salloc" "1" "SLURM 2.4" "October 2011" "SLURM Commands" +.TH "salloc" "1" "SLURM 2.5" "June 2012" "SLURM Commands" .SH "NAME" salloc \- Obtain a SLURM job allocation (a set of nodes), execute a command, @@ -738,38 +738,78 @@ This option is current supported on systems with IBM's Parallel Environment (PE) See IBM's LoadLeveler job command keyword documentation about the keyword "network" for more information. Multiple values may be specified in a comma separated list. +All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR> +\fBBULK_XFER\fR [=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBINSTANCES\fR [=<\fIcount\fR>] +Specify number of network connections for each task on each network connection. +The default instance count is 1. +.TP \fBIPV4\fR -Use Internet Protocol (IP) version 4 communications (default) +Use Internet Protocol (IP) version 4 communications (default). .TP \fBIPV6\fR -Use Internet Protocol (IP) version 6 communications +Use Internet Protocol (IP) version 6 communications. +.TP +\fBLAPI\fR [(\fIcount\fR)] +Use the LAPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP -\fBLAPI\fR -Use the LAPI protocol +\fBMPI\fR [(\fIcount\fR)] +Use the MPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. +MPI is the default protocol. .TP -\fBPAMI\fR -Use the PAMI protocol +\fBPAMI\fR [(\fIcount\fR)] +Use the PAMI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBSN_ALL\fR -Use all available switch networks (default) +Use all available switch networks (default). .TP \fBSN_SINGLE\fR -Use one available switch networks +Use one available switch network. +.TP +\fBUPC\fR [(\fIcount\fR)] +Use the UPC protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBUS\fR -Use User Space communications +Use User Space communications. .TP Specific adapter name -One specific adapter name may be specified (e.g. "eth0") +One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). +.TP + +Some examples of network specifications: +.TP +\fBInstances=2,US,MPI,SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. +.TP +\fBUS,MPI(2),SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. This is a variation on the above example. +.TP +\fBIPV4,LAPI,SN_Single\fR +Create a IP version 4 connection for LAPI communications on one switch network +for each task. +.TP +\fBInstances=2,US,LAPI,MPI\fR +Create two user space connections each for LAPI and MPI communcations on every +switch network for each task. Note that SN_ALL is the default option so every +switch network is used. Also note that Instances=2 specifies that two +connections are established for each protocol (LAPI and MPI) and each task. +If there are two networks and four tasks on the node then a total +of 32 connections are estabhished (2 instances x 2 protocols x 2 networks x +4 tasks). .RE .TP diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 7013d28965..eecffd3663 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -1,4 +1,4 @@ -.TH "sbatch" "1" "SLURM 2.4" "October 2011" "SLURM Commands" +.TH "sbatch" "1" "SLURM 2.5" "June 2012" "SLURM Commands" .SH "NAME" sbatch \- Submit a batch script to SLURM. @@ -802,38 +802,78 @@ This option is current supported on systems with IBM's Parallel Environment (PE) See IBM's LoadLeveler job command keyword documentation about the keyword "network" for more information. Multiple values may be specified in a comma separated list. +All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR> +\fBBULK_XFER\fR [=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBINSTANCES\fR [=<\fIcount\fR>] +Specify number of network connections for each task on each network connection. +The default instance count is 1. +.TP \fBIPV4\fR -Use Internet Protocol (IP) version 4 communications (default) +Use Internet Protocol (IP) version 4 communications (default). .TP \fBIPV6\fR -Use Internet Protocol (IP) version 6 communications +Use Internet Protocol (IP) version 6 communications. +.TP +\fBLAPI\fR [(\fIcount\fR)] +Use the LAPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP -\fBLAPI\fR -Use the LAPI protocol +\fBMPI\fR [(\fIcount\fR)] +Use the MPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. +MPI is the default protocol. .TP -\fBPAMI\fR -Use the PAMI protocol +\fBPAMI\fR [(\fIcount\fR)] +Use the PAMI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBSN_ALL\fR -Use all available switch networks (default) +Use all available switch networks (default). .TP \fBSN_SINGLE\fR -Use one available switch networks +Use one available switch network. +.TP +\fBUPC\fR [(\fIcount\fR)] +Use the UPC protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBUS\fR -Use User Space communications +Use User Space communications. .TP Specific adapter name -One specific adapter name may be specified (e.g. "eth0") +One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). +.TP + +Some examples of network specifications: +.TP +\fBInstances=2,US,MPI,SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. +.TP +\fBUS,MPI(2),SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. This is a variation on the above example. +.TP +\fBIPV4,LAPI,SN_Single\fR +Create a IP version 4 connection for LAPI communications on one switch network +for each task. +.TP +\fBInstances=2,US,LAPI,MPI\fR +Create two user space connections each for LAPI and MPI communcations on every +switch network for each task. Note that SN_ALL is the default option so every +switch network is used. Also note that Instances=2 specifies that two +connections are established for each protocol (LAPI and MPI) and each task. +If there are two networks and four tasks on the node then a total +of 32 connections are estabhished (2 instances x 2 protocols x 2 networks x +4 tasks). .RE .TP diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 2ba228ea69..63fd1a2a81 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -840,38 +840,78 @@ This option is current supported on systems with IBM's Parallel Environment (PE) See IBM's LoadLeveler job command keyword documentation about the keyword "network" for more information. Multiple values may be specified in a comma separated list. +All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR> +\fBBULK_XFER\fR [=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBINSTANCES\fR [=<\fIcount\fR>] +Specify number of network connections for each task on each network connection. +The default instance count is 1. +.TP \fBIPV4\fR -Use Internet Protocol (IP) version 4 communications (default) +Use Internet Protocol (IP) version 4 communications (default). .TP \fBIPV6\fR -Use Internet Protocol (IP) version 6 communications +Use Internet Protocol (IP) version 6 communications. +.TP +\fBLAPI\fR [(\fIcount\fR)] +Use the LAPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP -\fBLAPI\fR -Use the LAPI protocol +\fBMPI\fR [(\fIcount\fR)] +Use the MPI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. +MPI is the default protocol. .TP -\fBPAMI\fR -Use the PAMI protocol +\fBPAMI\fR [(\fIcount\fR)] +Use the PAMI protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBSN_ALL\fR -Use all available switch networks (default) +Use all available switch networks (default). .TP \fBSN_SINGLE\fR -Use one available switch networks +Use one available switch network. +.TP +\fBUPC\fR [(\fIcount\fR)] +Use the UPC protocol. Optionally specify the number of network connections +with this protocol for each task. Default count is 1. .TP \fBUS\fR -Use User Space communications +Use User Space communications. .TP Specific adapter name -One specific adapter name may be specified (e.g. "eth0") +One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). +.TP + +Some examples of network specifications: +.TP +\fBInstances=2,US,MPI,SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. +.TP +\fBUS,MPI(2),SN_ALL\fR +Create two user space connections for MPI communications on every switch +network for each task. This is a variation on the above example. +.TP +\fBIPV4,LAPI,SN_Single\fR +Create a IP version 4 connection for LAPI communications on one switch network +for each task. +.TP +\fBInstances=2,US,LAPI,MPI\fR +Create two user space connections each for LAPI and MPI communcations on every +switch network for each task. Note that SN_ALL is the default option so every +switch network is used. Also note that Instances=2 specifies that two +connections are established for each protocol (LAPI and MPI) and each task. +If there are two networks and four tasks on the node then a total +of 32 connections are estabhished (2 instances x 2 protocols x 2 networks x +4 tasks). .RE .TP -- GitLab From 935eb6744f6aaec575de1e4ef30dc708021ac9f4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 8 Jun 2012 13:10:17 -0700 Subject: [PATCH 397/614] Improve switch/nrt protocol parsing and support --- src/plugins/switch/nrt/nrt.c | 60 ++++++++++++++++++++++------- src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 45 ++++++++++++++++++---- 3 files changed, 85 insertions(+), 22 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f7c86eb3b6..9b452433f9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -160,6 +160,16 @@ typedef struct { nrt_adapter_t adapter_type; } nrt_cache_entry_t; + +typedef struct nrt_protocol_info { + char protocol_name[NRT_MAX_PROTO_NAME_LEN]; + int protocol_cnt; /* Instances of this protocol */ +} nrt_protocol_info_t; +typedef struct nrt_protocol_table { + nrt_protocol_info_t protocol_table[NRT_MAX_PROTO_CNT]; + int protocol_table_cnt; /* Count of entries in protocol_table */ +} nrt_protocol_table_t; + static int lid_cache_size = 0; static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; @@ -2032,31 +2042,49 @@ _next_key(void) return key; } -static int _get_protocol_cnt(char *protocol) +/* Translate a protocol string (e.g. "lapi(2),mpi" into a table. + * Caller must free returned value. */ +static nrt_protocol_table_t *_get_protocol_table(char *protocol) { + nrt_protocol_table_t *protocol_table; char *paren_ptr, *protocol_str, *save_ptr = NULL, *token; - int protocol_cnt = 0; + int protocol_cnt, i; - if (!protocol) - return 1; + protocol_table = xmalloc(sizeof(nrt_protocol_table_t)); + if (!protocol) + protocol = "mpi"; protocol_str = xstrdup(protocol); token = strtok_r(protocol_str, ",", &save_ptr); while (token) { paren_ptr = strchr(token, '('); - if (paren_ptr) - protocol_cnt += atoi(paren_ptr+1); - else - protocol_cnt++; + if (paren_ptr) { + protocol_cnt = atoi(paren_ptr+1); + paren_ptr[0] = '\0'; /* end string before '(' */ + } else + protocol_cnt = 1; + for (i = 0; i < protocol_table->protocol_table_cnt; i++) { + if (!strcmp(token, protocol_table->protocol_table[i]. + protocol_name)) { + protocol_table->protocol_table[i]. + protocol_cnt += protocol_cnt; + break; + } + } + if ((i >= protocol_table->protocol_table_cnt) && + (i < NRT_MAX_PROTO_CNT)) { + /* Need to add new protocol type */ + strncpy(protocol_table->protocol_table[i].protocol_name, + token, NRT_MAX_PROTO_NAME_LEN); + protocol_table->protocol_table[i].protocol_cnt = + protocol_cnt; + protocol_table->protocol_table_cnt++; + } token = strtok_r(NULL, ",", &save_ptr); } xfree(protocol_str); - if (protocol_cnt <= 0) { - info("Invalid job protocol(%s)", protocol); - protocol_cnt = 1; - } - return protocol_cnt; + return protocol_table; } /* Setup everything for the job. Assign tasks across @@ -2070,7 +2098,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, bool bulk_xfer, uint32_t bulk_xfer_resources, bool ip_v4, - bool user_space, char *protocol) + bool user_space, char *protocol, int instances) { int nnodes, nprocs = 0; hostlist_iterator_t hi; @@ -2082,6 +2110,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; int table_rec_len = 0; + nrt_protocol_table_t *protocol_table; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2101,7 +2130,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->nodenames = hostlist_copy(hl); jp->num_tasks = nprocs; jp->user_space = (uint8_t) user_space; +/* FIXME: mutliple protocols per job possible */ jp->protocol = xstrdup(protocol); + protocol_table = _get_protocol_table(protocol); + xfree(protocol_table); hi = hostlist_iterator_create(hl); diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 81aa453234..266b8426db 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -100,7 +100,7 @@ extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, bool bulk_xfer, uint32_t bulk_xfer_resources, bool ip_v4, - bool user_space, char *protocol); + bool user_space, char *protocol, int instances); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 88aa7ecf2f..95afbc45d9 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -397,7 +397,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, bool bulk_xfer = false, ip_v4 = true, user_space = false; uint32_t bulk_xfer_resources = 0; bool sn_all = true; /* default to sn_all */ - int err; + int instances = 1; + int err = SLURM_SUCCESS; char *adapter_name = NULL; char *protocol = NULL; char *network_str = NULL, *token = NULL, *save_ptr = NULL; @@ -418,6 +419,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, token = strtok_r(network_str, ",", &save_ptr); } while (token) { + /* bulk_xfer options */ if (!strncasecmp(token, "bulk_xfer=", 10)) { long int resources; char *end_ptr = NULL; @@ -431,9 +433,28 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, resources *= (1024 * 1024 * 1024); if (resources >= 0) bulk_xfer_resources = resources; + else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; + } } else if (!strcasecmp(token, "bulk_xfer")) { bulk_xfer = true; + /* instances options */ + } else if (!strncasecmp(token, "instances=", 10)) { + long int count; + char *end_ptr = NULL; + count = strtol(token+10, &end_ptr, 10); + if ((end_ptr[0] == 'k') || (end_ptr[0] == 'K')) + count *= 1024; + if (count >= 0) + instances = count; + else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; + } + + /* network options */ } else if (!strcasecmp(token, "ipv4")) { ip_v4 = true; } else if (!strcasecmp(token, "ipv6")) { @@ -441,6 +462,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } else if (!strcasecmp(token, "us")) { user_space = true; + /* protocol options */ } else if ((!strncasecmp(token, "lapi", 4)) || (!strncasecmp(token, "mpi", 3)) || (!strncasecmp(token, "pami", 4)) || @@ -449,15 +471,20 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, xstrcat(protocol, ","); xstrcat(protocol, token); + /* adapter options */ } else if (!strcasecmp(token, "sn_all")) { sn_all = true; } else if (!strcasecmp(token, "sn_single")) { sn_all = false; } else if (nrt_adapter_name_check(token, list)) { -/* FIXME: Need to propagate to nrt_build_jobinfo() below */ - info("Found adapter %s in network string", token); + debug("Found adapter %s in network string", token); adapter_name = xstrdup(token); sn_all = false; + + /* other */ + } else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; } token = strtok_r(NULL, ",", &save_ptr); } @@ -465,10 +492,14 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (protocol == NULL) xstrcat(protocol, "mpi"); - err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, - tasks_per_node, tids, sn_all, adapter_name, - bulk_xfer, bulk_xfer_resources, - ip_v4, user_space, protocol); + if (err == SLURM_SUCCESS) { + err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, + list, tasks_per_node, tids, sn_all, + adapter_name, + bulk_xfer, bulk_xfer_resources, + ip_v4, user_space, protocol, + instances); + } xfree(adapter_name); xfree(protocol); -- GitLab From 1ae90ca8dd65f4e3c68848b79907cd03550e2f59 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Mon, 11 Jun 2012 10:44:57 -0700 Subject: [PATCH 398/614] Enhance scontrol show job test for -d and -dd options --- testsuite/expect/test2.8 | 136 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 135 insertions(+), 1 deletion(-) diff --git a/testsuite/expect/test2.8 b/testsuite/expect/test2.8 index b06e6bb232..48323ee2a3 100755 --- a/testsuite/expect/test2.8 +++ b/testsuite/expect/test2.8 @@ -102,6 +102,9 @@ exec $bin_rm -f $file_in # NOTE: Running "scontrol show job" and looking for these job IDs # may not work due to a bug in awk not scanning large output buffers # +# NOTE: Match "JobId=" only +# +send_user "\nGetting more info for job id 1 ($job_id1)\n" set matches 0 spawn $scontrol show job $job_id1 expect { @@ -109,6 +112,14 @@ expect { incr matches exp_continue } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } timeout { send_user "\nFAILURE: scontrol not responding\n" set exit_code 1 @@ -117,12 +128,21 @@ expect { wait } } +send_user "\nGetting more info for job id 2 ($job_id2)\n" spawn $scontrol show job $job_id2 expect { -re "JobId=$job_id2 " { incr matches exp_continue } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } timeout { send_user "\nFAILURE: scontrol not responding\n" set exit_code 1 @@ -131,8 +151,122 @@ expect { wait } } + + if {$matches != 2} { - send_user "\nFAILURE: scontrol found $matches of 2 jobs\n" + send_user "\nFAILURE: scontrol failed to find matching job ($matches != 2)\n" + set exit_code 1 +} + +# +# using the scontrol -d option to display more info about job +# +send_user "\nGetting more info for job id 1 ($job_id1) with -d option\n" +set matches 0 +spawn $scontrol -d show job $job_id1 +expect { + -re "JobId=$job_id1 " { + incr matches + exp_continue + } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } + timeout { + send_user "\n FAILURE scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } +} +send_user "\nGetting more info for job id 2 ($job_id2) with -d option\n" +spawn $scontrol -d show job $job_id2 +expect { + -re "JobId=$job_id2 " { + incr matches + exp_continue + } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } + timeout { + send_user "\nFAILURE: scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } + +} +if {$matches != 4} { + send_user "\nFAILURE: scontrol failed to find matching job ($matches != 4)\n" + set exit_code 1 +} + +# +# using the scontrol -dd option to display more info about job +# +send_user "\nGetting more info for job id 1 ($job_id1) with -dd option\n" +set matches 0 +spawn $scontrol -dd show job $job_id1 +expect { + -re "JobId=$job_id1 " { + incr matches + exp_continue + } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } + timeout { + send_user "\n FAILURE scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } +} +send_user "\nGetting more info for job id 2 ($job_id2) with -dd option\n" +spawn $scontrol -dd show job $job_id2 +expect { + -re "JobId=$job_id2 " { + incr matches + exp_continue + } + -re "CPU_IDs=" { + incr matches + exp_continue + } + -re "BatchScript=" { + incr matches + exp_continue + } + timeout { + send_user "\nFAILURE: scontrol not responding\n" + set exit_code 1 + } + eof { + wait + } + +} +if {$matches != 6} { + send_user "\nFAILURE: scontrol failed to find matching job ($matches != 6)\n" set exit_code 1 } -- GitLab From 7348b302b7c8077cb6bc6c283bb334d6ace33b34 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 11:15:09 -0700 Subject: [PATCH 399/614] Add support for switch/nrt network option devtype=ib|hfi|etc This includes only the documentation and parsing. not support for the underlying resource selection --- doc/man/man1/salloc.1 | 11 +++++++++++ doc/man/man1/sbatch.1 | 11 +++++++++++ doc/man/man1/srun.1 | 11 +++++++++++ src/plugins/switch/nrt/nrt.c | 6 +++--- src/plugins/switch/nrt/slurm_nrt.h | 7 ++++--- src/plugins/switch/nrt/switch_nrt.c | 21 ++++++++++++++++++++- 6 files changed, 60 insertions(+), 7 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 0f30288a81..32f614534c 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -748,6 +748,13 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBDEVTYPE\fR [=<\fItype\fR>] +Specify the device type to use for communications. +The supported values of \fItype\fR are: +"IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), +"IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and +"KMUX" (Kernel Emulation of HPCE). +.TP \fBINSTANCES\fR [=<\fIcount\fR>] Specify number of network connections for each task on each network connection. The default instance count is 1. @@ -798,6 +805,10 @@ network for each task. Create two user space connections for MPI communications on every switch network for each task. This is a variation on the above example. .TP +\fBUS,MPI(3),IB\fR +Create three user space connections for MPI communications on every InfiniBand +network for each task. +.TP \fBIPV4,LAPI,SN_Single\fR Create a IP version 4 connection for LAPI communications on one switch network for each task. diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index eecffd3663..91fc5db2e7 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -812,6 +812,13 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBDEVTYPE\fR [=<\fItype\fR>] +Specify the device type to use for communications. +The supported values of \fItype\fR are: +"IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), +"IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and +"KMUX" (Kernel Emulation of HPCE). +.TP \fBINSTANCES\fR [=<\fIcount\fR>] Specify number of network connections for each task on each network connection. The default instance count is 1. @@ -862,6 +869,10 @@ network for each task. Create two user space connections for MPI communications on every switch network for each task. This is a variation on the above example. .TP +\fBUS,MPI(3),IB\fR +Create three user space connections for MPI communications on every InfiniBand +network for each task. +.TP \fBIPV4,LAPI,SN_Single\fR Create a IP version 4 connection for LAPI communications on one switch network for each task. diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 63fd1a2a81..a46fbfa97f 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -850,6 +850,13 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP +\fBDEVTYPE\fR [=<\fItype\fR>] +Specify the device type to use for communications. +The supported values of \fItype\fR are: +"IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), +"IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and +"KMUX" (Kernel Emulation of HPCE). +.TP \fBINSTANCES\fR [=<\fIcount\fR>] Specify number of network connections for each task on each network connection. The default instance count is 1. @@ -900,6 +907,10 @@ network for each task. Create two user space connections for MPI communications on every switch network for each task. This is a variation on the above example. .TP +\fBUS,MPI(3),IB\fR +Create three user space connections for MPI communications on every InfiniBand +network for each task. +.TP \fBIPV4,LAPI,SN_Single\fR Create a IP version 4 connection for LAPI communications on one switch network for each task. diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 9b452433f9..58f2c8c92f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2096,9 +2096,9 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, - char *adapter_name, bool bulk_xfer, - uint32_t bulk_xfer_resources, bool ip_v4, - bool user_space, char *protocol, int instances) + char *adapter_name, int dev_type, + bool bulk_xfer, uint32_t bulk_xfer_resources, + bool ip_v4, bool user_space, char *protocol, int instances) { int nnodes, nprocs = 0; hostlist_iterator_t hi; diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 266b8426db..f635773007 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -98,9 +98,10 @@ extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, - bool sn_all, char *adapter_name, bool bulk_xfer, - uint32_t bulk_xfer_resources, bool ip_v4, - bool user_space, char *protocol, int instances); + bool sn_all, char *adapter_name, int dev_type, + bool bulk_xfer, uint32_t bulk_xfer_resources, + bool ip_v4, bool user_space, char *protocol, + int instances); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 95afbc45d9..d3a5e994bc 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -398,6 +398,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, uint32_t bulk_xfer_resources = 0; bool sn_all = true; /* default to sn_all */ int instances = 1; + int dev_type = NRT_ADAP_UNSUPPORTED; int err = SLURM_SUCCESS; char *adapter_name = NULL; char *protocol = NULL; @@ -440,6 +441,24 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } else if (!strcasecmp(token, "bulk_xfer")) { bulk_xfer = true; + /* device type options */ + } else if (!strncasecmp(token, "devtype=", 8)) { + char *type_ptr = token + 8; + if (!strcasecmp(type_ptr, "ib")) { + dev_type = NRT_IB; + } else if (!strcasecmp(type_ptr, "hfi")) { + dev_type = NRT_HFI; + } else if (!strcasecmp(type_ptr, "iponly")) { + dev_type = NRT_IPONLY; + } else if (!strcasecmp(type_ptr, "hpce")) { + dev_type = NRT_HPCE; + } else if (!strcasecmp(type_ptr, "kmux")) { + dev_type = NRT_KMUX; + } else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; + } + /* instances options */ } else if (!strncasecmp(token, "instances=", 10)) { long int count; @@ -495,7 +514,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (err == SLURM_SUCCESS) { err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, list, tasks_per_node, tids, sn_all, - adapter_name, + adapter_name, dev_type, bulk_xfer, bulk_xfer_resources, ip_v4, user_space, protocol, instances); -- GitLab From b28bb581fa2730cc4054e9ca4352f31b5eb921f7 Mon Sep 17 00:00:00 2001 From: Martin Perry Date: Mon, 11 Jun 2012 12:10:09 -0700 Subject: [PATCH 400/614] Initial patch adding cgroup web page from Martin Perry, Bull --- doc/html/Makefile.am | 1 + doc/html/Makefile.in | 1 + doc/html/cgroups.shtml | 172 +++++++++++++++++++++++++++++++++++ doc/html/documentation.shtml | 1 + doc/man/man5/cgroup.conf.5 | 164 ++++----------------------------- 5 files changed, 193 insertions(+), 146 deletions(-) create mode 100644 doc/html/cgroups.shtml diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index 059c66bc11..0e9f9bcaa1 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -8,6 +8,7 @@ generated_html = \ authplugins.html \ big_sys.html \ bluegene.html \ + cgroups.html \ checkpoint_blcr.html \ checkpoint_plugins.html \ cons_res.html \ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index dc8df4f110..bd85344f24 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -324,6 +324,7 @@ generated_html = \ authplugins.html \ big_sys.html \ bluegene.html \ + cgroups.html \ checkpoint_blcr.html \ checkpoint_plugins.html \ cons_res.html \ diff --git a/doc/html/cgroups.shtml b/doc/html/cgroups.shtml new file mode 100644 index 0000000000..af372753cd --- /dev/null +++ b/doc/html/cgroups.shtml @@ -0,0 +1,172 @@ + + +

    Cgroups Guide

    +

    Cgroups Overview

    +For a comprehensive description of Linux Control Groups (cgroups) see the + +cgroups documentation at kernel.org. Detailed knowledge of cgroups is not +required to use cgroups in SLURM, but a basic understanding of the +following features of cgroups is helpful: +
      +
    • Cgroup - a container for a set of processes subject to common +controls or monitoring, implemented as a directory and a set of files +(state objects) in the cgroup +virtual filesystem.
    • +
    • Subsystem - a module, typically a resource controller, that applies +a set of parameters to the cgroups in a hierarchy.
    • +
    • Hierarchy - a set of cgroups organized in a tree structure, with one +or more associated subsystems.
    • +
    • State Objects - pseudofiles that represent the state of a cgroup or +apply controls to a cgroup: +
        +
      • tasks - identifies the processes (PIDs) in the cgroup. +
      • release_agent - specifies the location of the script or program to +be called when the cgroup becomes empty.
      • +
      • notify_on_release - controls whether the release_agent is called for +the cgroup.
      • +
      • additional state objects specific to each subsystem.
      • +
      +
    +
    +

    Use of Cgroups in SLURM

    +SLURM provides cgroup versions of a number of plugins. Currently, there are +cgroup versions of the proctrack (process tracking), task (task management) and +jobacct_gather (job accounting statistics) plugins. The cgroup versions of +these plugins may be configured instead of the standard versions. The cgroup +plugins can provide a number of benefits over the +standard plugins, as described below. +

    +

    SLURM Cgroups Configuration Overview

    +There are several sets of configuration options for SLURM cgroups: +
      +
    • slurm.conf provides options to enable the +cgroup plugins. Each plugin may be enabled or disabled independently +of the others.
    • +
    • cgroup.conf provides general options that +are common to all cgroup plugins, plus additional options that apply only to +specific plugins.
    • +
    • Additional configuration is required to enable automatic removal of SLURM +cgroups when they are no longer in use. +See Cleanup of SLURM Cgroups below for details.
    • +
    + +
    +

    Currently Available Cgroup Plugins

    +

    proctrack/cgroup plugin

    +The proctrack/cgroup plugin is an alternative to the proctrack/linux plugin +for process tracking and suspend/resume capability. proctrack/cgroup provides +more reliable tracking and control than proctrack/linux. proctrack/cgroup uses +the freezer subsystem. +

    +To enable this plugin, configure the following option in slurm.conf: +

    ProctrackType=proctrack/cgroup
    +

    +There are no specific options for this plugin in cgroup.conf, but the general +options apply. See the cgroup.conf man page for +details. +

    task/cgroup plugin

    +The task/cgroup plugin is an alternative to the task/affinity plugin for task +management. task/cgroup provides the following features: +
      +
    • The ability to confine jobs and steps to their allocated cpuset.
    • +
    • The ability to bind tasks to sockets, cores and threads within their step's +allocated cpuset on a node.
    • +
        +
      • Supports block and cyclic distribution of allocated cpus to tasks for +binding.
      • +
      +
    • The ability to confine jobs and steps to specific memory resources.
    • +
    • The ability to confine jobs to their allocated set of generic resources +(gres devices).
    • +
    +The task/cgroup plugin uses the cpuset, memory and devices subsystems. +

    +To enable this plugin, configure the following option in slurm.conf: +

    TaskPlugin=task/cgroup
    +

    +There are many specific options for this plugin in cgroup.conf. The general +options also apply. See the cgroup.conf man page +for details. +

    jobacct_gather/cgroup plugin

    +The jobacct_gather/cgroup plugin is an alternative to the jobacct_gather/linux +plugin for the collection of accounting statistics for jobs, steps and tasks. +The cgroup plugin may provide improved performance over jobacct_gather/linux. +jobacct_gather/cgroup uses the cpuacct and memory subsystems. Note: the cpu and +memory statistics collected by this plugin do not represent the same resources +as the cpu and memory statistics collected by the jobacct_gather/linux plugin +(sourced from /proc stat). At present, jobacct_gather/cgroup should be +considered experimental. +

    +To enable this plugin, configure the following option in slurm.conf: +

    JobacctGatherType=jobacct_gather/cgroup
    +

    +There are no specific options for this plugin in cgroup.conf, but the general +options apply. See the cgroup.conf man page for +details. +

    +

    Organization of SLURM Cgroups

    +SLURM cgroups are organized as follows. A base directory (mount point) is +created at /cgroup, or as configured by the CgroupMountpoint option in +cgroup.conf. All cgroup +hierarchies are created below this base directory. A separate hierarchy is +created for each cgroup subsystem in use. The name of the root cgroup in each +hierarchy is the subsystem name. A cgroup named slurm is created below +the root cgroup in each hierarchy. Below each slurm cgroup, cgroups for +SLURM users, jobs, steps and tasks are created dynamically as needed. The names +of these cgroups consist of a prefix identifying the SLURM entity (user, job, +step or task), followed by the relevant numeric id. The following example shows +the path of the task cgroup in the cpuset hierarchy for taskid#2 of stepid#0 of +jobid#123 for userid#100, using the default base directory (/cgroup): +

    /cgroup/cpuset/slurm/uid_100/job_123/step_0/task_2

    +Note that this structure applies to a specific compute node. Jobs that use more +than one node will have a cgroup structure on each node. + +

    +

    Cleanup of SLURM Cgroups

    +Linux provides a mechanism for the automatic removal of a cgroup when its +state changes from non-empty to empty. A cgroup is empty when no processes are +attached to it and it has no child cgroups. The SLURM cgroups implementation +allows this mechanism to be used to automatically remove the relevant SLURM +cgroups when tasks, steps and jobs terminate. To enable this automatic removal +feature, follow these steps: +
      +
    • If desired, configure the location of the SLURM Cgroup release agent +directory. This is done using the CgroupReleaseAgentDir option in +cgroup.conf. +The default location is /etc/slurm/cgroup.
    • +
      +
      +       [sulu] (slurm) etc> cat cgroup.conf | grep CgroupReleaseAgentDir
      +       CgroupReleaseAgentDir="/etc/slurm/cgroup"
      +
      +
    • Create the common release agent file. This file should be named +release_common. An example script for this file is provided in the +SLURM delivery at etc/cgroup.release_common.example. The example script will +automatically remove user, job, step and task cgroups as they become empty. The +file must have execute permission for root.

    • +
    • Create release agent files for each cgroup subsystem to be used by SLURM. +This depends on which cgroup plugins are enabled. For example, the +proctrack/cgroup plugin uses the freezer subsystem. See +Currently Available Cgroup Plugins above to find out +which subsystems are used by each plugin. The name of each release agent file +must be of the form release_<subsystem name>. These files should +be created as symbolic links to the common release agent file, +release_common. The files must have execute permission for root. See +the following example.
    • +
      +
      +       [sulu] (slurm) etc> ls -al /etc/slurm/cgroup
      +       total 12
      +       drwxr-xr-x 2 root root 4096 2010-04-23 14:55 .
      +       drwxr-xr-x 4 root root 4096 2010-07-22 14:48 ..
      +       -rwxrwxrwx 1 root root  234 2010-04-23 14:52 release_common
      +       lrwxrwxrwx 1 root root   32 2010-04-23 11:04 release_cpuset -> /etc/slurm/cgroup/release_common
      +       lrwxrwxrwx 1 root root   32 2010-04-23 11:03 release_freezer -> /etc/slurm/cgroup/release_common
      +
      +
      +
    + + +

    Last modified 6 June 2012

    + + diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml index b42463c32d..116333dfcd 100644 --- a/doc/html/documentation.shtml +++ b/doc/html/documentation.shtml @@ -26,6 +26,7 @@ Also see Publications and Presentations.
    • Quick Start Administrator Guide
    • Accounting
    • +
    • Cgroups Guide
    • Configuration Tool (Full version)
    • Configuration Tool (Simplified version)
    • CPU Management User and Administrator Guide
    • diff --git a/doc/man/man5/cgroup.conf.5 b/doc/man/man5/cgroup.conf.5 index 5a06a0e765..c5807b680d 100644 --- a/doc/man/man5/cgroup.conf.5 +++ b/doc/man/man5/cgroup.conf.5 @@ -1,4 +1,4 @@ -.TH "cgroup.conf" "5" "December 2010" "cgroup.conf 2.2" \ +.TH "cgroup.conf" "5" "June 2012" "cgroup.conf 2.2" \ "Slurm cgroup configuration file" .SH "NAME" @@ -6,7 +6,7 @@ cgroup.conf \- Slurm configuration file for the cgroup support .SH "DESCRIPTION" -\fBcgroup.conf\fP is an ASCII file which defines parameters used by +\fBcgroup.conf\fP is an ASCII file which defines parameters used by Slurm's Linux cgroup related plugins. The file location can be modified at system build time using the DEFAULT_SLURM_CONF parameter or at execution time by setting the SLURM_CONF @@ -20,9 +20,10 @@ The size of each line in the file is limited to 1024 characters. Changes to the configuration file take effect upon restart of SLURM daemons, daemon receipt of the SIGHUP signal, or execution of the command "scontrol reconfigure" unless otherwise noted. + .LP -Two cgroup plugins are currently available in SLURM. The first -one is a proctrack plugin, the second one a task plugin. +For general Slurm Cgroups information, see the Cgroups Guide at +. .LP The following cgroup.conf parameters are defined to control the general behavior @@ -38,98 +39,33 @@ one per subsystem. The default \fIPATH\fR is /cgroup. \fBCgroupAutomount\fR= Slurm cgroup plugins require valid and functional cgroup subsystem to be mounted under /cgroup/. -When launched, plugins check their subsystem availability. If not available, -the plugin launch fails unless CgroupAutomount is set to yes. In that case, the +When launched, plugins check their subsystem availability. If not available, +the plugin launch fails unless CgroupAutomount is set to yes. In that case, the plugin will first try to mount the required subsystems. .TP \fBCgroupReleaseAgentDir\fR= -Used to tune the cgroup system behavior. This parameter identifies the location -of the directory containing Slurm cgroup release_agent files. A release_agent file -is required for each mounted subsystem. The release_agent file name must have the -following format: release_. For instance, the release_agent file -for the cpuset subsystem must be named release_cpuset. See also CLEANUP OF -CGROUPS below. - -.SH "PROCTRACK/CGROUP PLUGIN" - -Slurm \fBproctrack/cgroup\fP plugin is used to track processes using the -freezer control group subsystem. It creates a hierarchical set of -directories for each step, putting the step tasks into the leaf. -.LP -This directory structure is like the following: -.br -/cgroup/freezer/uid_%uid/job_%jobid/step_%stepid -.LP -Slurm cgroup proctrack plugin is enabled with the following parameter -in slurm.conf: -.br -ProctrackType=proctrack/cgroup - -.LP -No particular cgroup.conf parameter is defined to control the behavior -of this particular plugin. - -.SH "JOBACCT_GATHER/CGROUP PLUGIN" - -Slurm \fBjobacct_gather/cgroup\fP plugin is an experimental plugin -that uses cgroups to generate accounting statistics instead of the linux -/proc table. The plugin creates a hierarchical set of -directories for each task. -.LP -This directory structure is like the following: -.br -/cgroup/cpuacct/uid_%uid/job_%jobid/step_%stepid/task_%taskid -.LP -Slurm cgroup jobacct_gather plugin is enabled with the following parameter -in slurm.conf: -.br -JobAcctGatherType=jobacct_gather/cgroup - -.LP -No particular cgroup.conf parameter is defined to control the behavior -of this particular plugin. +Used to tune the cgroup system behavior. This parameter identifies the location +of the directory containing Slurm cgroup release_agent files. .SH "TASK/CGROUP PLUGIN" -.LP -Slurm \fBtask/cgroup\fP plugin is used to enforce allocated resources -constraints, thus avoiding tasks to use unallocated resources. It currently -only uses cpuset subsystem but could use memory and devices subsystems in a -near future too. - -.LP -It creates a hierarchical set of directories for each task and subsystem. -The directory structure is like the following: -.br -/cgroup/%subsys/uid_%uid/job_%jobid/step_%stepid/task_%taskid - -.LP -Slurm cgroup task plugin is enabled with the following parameter -in slurm.conf: -.br -TaskPlugin=task/cgroup - .LP The following cgroup.conf parameters are defined to control the behavior of this particular plugin: .TP \fBConstrainCores\fR= -If configured to "yes" then constrain allowed cores to the subset of +If configured to "yes" then constrain allowed cores to the subset of allocated resources. It uses the cpuset subsystem. The default value is "no". + .TP \fBTaskAffinity\fR= -If configured to "yes" then set a default task affinity to bind each step +If configured to "yes" then set a default task affinity to bind each step task to a subset of the allocated cores using \fBsched_setaffinity\fP. The default value is "no". -.LP -The following cgroup.conf parameters could be defined to control the behavior -of this particular plugin in a next version where memory and devices support -would be added : - .TP \fBAllowedRAMSpace\fR= Constrain the job cgroup RAM to this percentage of the allocated memory. @@ -190,13 +126,13 @@ The default value is "no". .TP \fBAllowedDevicesFile\fR= -If the ConstrainDevices field is set to "yes" then this file has to be used to declare -the devices that need to be allowed by default for all the jobs. The current implementation +If the ConstrainDevices field is set to "yes" then this file has to be used to declare +the devices that need to be allowed by default for all the jobs. The current implementation of cgroup devices subsystem works as a whitelist of entries, which means that in order to isolate the access of a job upon particular devices we need to allow the access on all -the devices, supported by default and then deny on those that the job does not have the -permission to use. The default value is "/etc/slurm/cgroup_allowed_devices_file.conf". The syntax of -the file accepts one device per line and it permits lines like /dev/sda* or /dev/cpu/*/*. +the devices, supported by default and then deny on those that the job does not have the +permission to use. The default value is "/etc/slurm/cgroup_allowed_devices_file.conf". The syntax of +the file accepts one device per line and it permits lines like /dev/sda* or /dev/cpu/*/*. See also an example of this file in etc/allowed_devices_file.conf.example. @@ -217,72 +153,8 @@ ConstrainCores=yes .br # -.SH "NOTES" -.LP -Only one instance of a cgroup subsystem is valid at a time in the kernel. -If you try to mount another cgroup hierarchy that uses the same cpuset -subsystem it will fail. -However you can mount another cgroup hierarchy for a different cpuset -subsystem. - -.SH CLEANUP OF CGROUPS -.LP -To allow cgroups to be removed automatically when they are no longer in use -the notify_on_release flag is set in each cgroup when the cgroup is -instantiated. The release_agent file for each subsystem is set up when the -subsystem is mounted. The name of each release_agent file is -release_. The directory is specified via the -CgroupReleaseAgentDir parameter in cgroup.conf. A simple release agent -mechanism to remove slurm cgroups when they become empty may be set up by -creating the release agent files for each required subsystem as symbolic -links to a common release agent script, as shown in the example below: - -[sulu] (slurm) etc> cat cgroup.conf | grep CgroupReleaseAgentDir -.br -CgroupReleaseAgentDir="/etc/slurm/cgroup" -.br - -[sulu] (slurm) etc> ls \-al /etc/slurm/cgroup -.br -total 12 -.br -drwxr-xr-x 2 root root 4096 2010-04-23 14:55 . -.br -drwxr-xr-x 4 root root 4096 2010-07-22 14:48 .. -.br -\-rwxrwxrwx 1 root root 234 2010-04-23 14:52 release_common -.br -lrwxrwxrwx 1 root root 32 2010-04-23 11:04 release_cpuset -> /etc/slurm/cgroup/release_common -.br -lrwxrwxrwx 1 root root 32 2010-04-23 11:03 release_freezer -> /etc/slurm/cgroup/release_common - -[sulu] (slurm) etc> cat /etc/slurm/cgroup/release_common -.br -#!/bin/bash -.br -base_path=/cgroup -.br -progname=$(basename $0) -.br -subsystem=${progname##*_} -.br -.br -rmcg=${base_path}/${subsystem}$@ -.br -uidcg=${rmcg%/job*} -.br -if [[ \-d ${base_path}/${subsystem} ]] -.br -then -.br - flock \-x ${uidcg} \-c "rmdir ${rmcg}" -.br -fi -.br -[sulu] (slurm) etc> - .SH "COPYING" -Copyright (C) 2010 Lawrence Livermore National Security. +Copyright (C) 2010-2012 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). CODE\-OCEC\-09\-009. All rights reserved. .LP -- GitLab From ce07c50948a1616e4de9a16714e09303ceb9ab44 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 11 Jun 2012 12:22:05 -0700 Subject: [PATCH 401/614] minor changes to the file --- doc/html/cgroups.shtml | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/doc/html/cgroups.shtml b/doc/html/cgroups.shtml index af372753cd..44899f77bf 100644 --- a/doc/html/cgroups.shtml +++ b/doc/html/cgroups.shtml @@ -29,13 +29,15 @@ the cgroup.

    Use of Cgroups in SLURM

    -SLURM provides cgroup versions of a number of plugins. Currently, there are -cgroup versions of the proctrack (process tracking), task (task management) and -jobacct_gather (job accounting statistics) plugins. The cgroup versions of -these plugins may be configured instead of the standard versions. The cgroup -plugins can provide a number of benefits over the -standard plugins, as described below. -

    +SLURM provides cgroup versions of a number of plugins. +
      +
    • proctrack (process tracking)
    • +
    • task (task management)
    • +
    • jobacct_gather (job accounting statistics)
    • +The cgroup plugins can provide a number of benefits over the +other more standard plugins, as described below. +
    +

    SLURM Cgroups Configuration Overview

    There are several sets of configuration options for SLURM cgroups:
      @@ -53,10 +55,10 @@ See Cleanup of SLURM Cgroups below for details.

      Currently Available Cgroup Plugins

      proctrack/cgroup plugin

      -The proctrack/cgroup plugin is an alternative to the proctrack/linux plugin -for process tracking and suspend/resume capability. proctrack/cgroup provides -more reliable tracking and control than proctrack/linux. proctrack/cgroup uses -the freezer subsystem. +The proctrack/cgroup plugin is an alternative to other proctrack +plugins such as proctrack/linux for process tracking and +suspend/resume capability. proctrack/cgroup uses the freezer subsystem +which is more reliable for tracking and control than proctrack/linux.

      To enable this plugin, configure the following option in slurm.conf:

      ProctrackType=proctrack/cgroup
      @@ -65,8 +67,9 @@ There are no specific options for this plugin in cgroup.conf, but the general options apply. See the cgroup.conf man page for details.

      task/cgroup plugin

      -The task/cgroup plugin is an alternative to the task/affinity plugin for task -management. task/cgroup provides the following features: +The task/cgroup plugin is an alternative other task plugins such as +task/affinity plugin for task management. task/cgroup provides the +following features:
      • The ability to confine jobs and steps to their allocated cpuset.
      • The ability to bind tasks to sockets, cores and threads within their step's @@ -88,14 +91,15 @@ There are many specific options for this plugin in cgroup.conf. The general options also apply. See the cgroup.conf man page for details.

        jobacct_gather/cgroup plugin

        +At present, jobacct_gather/cgroup should be considered experimental. +

        The jobacct_gather/cgroup plugin is an alternative to the jobacct_gather/linux plugin for the collection of accounting statistics for jobs, steps and tasks. The cgroup plugin may provide improved performance over jobacct_gather/linux. jobacct_gather/cgroup uses the cpuacct and memory subsystems. Note: the cpu and memory statistics collected by this plugin do not represent the same resources as the cpu and memory statistics collected by the jobacct_gather/linux plugin -(sourced from /proc stat). At present, jobacct_gather/cgroup should be -considered experimental. +(sourced from /proc stat).

        To enable this plugin, configure the following option in slurm.conf:

        JobacctGatherType=jobacct_gather/cgroup
        -- GitLab From 50e2fa9725902625915a3a25c8d62affe7701305 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 14:17:51 -0700 Subject: [PATCH 402/614] Mostly cosmetic mods, data type corrections --- src/plugins/switch/nrt/nrt.c | 9 ++++++++- src/plugins/switch/nrt/slurm_nrt.h | 3 ++- src/plugins/switch/nrt/switch_nrt.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 58f2c8c92f..69496dfe6f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2060,6 +2060,11 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) paren_ptr = strchr(token, '('); if (paren_ptr) { protocol_cnt = atoi(paren_ptr+1); + if (protocol_cnt == 0) { + verbose("switch/nrt: invalid job protocol: %s", + protocol); + break; + } paren_ptr[0] = '\0'; /* end string before '(' */ } else protocol_cnt = 1; @@ -2083,6 +2088,8 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) token = strtok_r(NULL, ",", &save_ptr); } xfree(protocol_str); + if (protocol_table->protocol_table_cnt == 0) + xfree(protocol_table); return protocol_table; } @@ -2096,7 +2103,7 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, - char *adapter_name, int dev_type, + char *adapter_name, nrt_adapter_t dev_type, bool bulk_xfer, uint32_t bulk_xfer_resources, bool ip_v4, bool user_space, char *protocol, int instances) { diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index f635773007..612814cdf6 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -98,7 +98,8 @@ extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *np, bool ptr_into_array); extern int nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **jh); extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, - bool sn_all, char *adapter_name, int dev_type, + bool sn_all, + char *adapter_name, nrt_adapter_t dev_type, bool bulk_xfer, uint32_t bulk_xfer_resources, bool ip_v4, bool user_space, char *protocol, int instances); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index d3a5e994bc..4d9eae0ba4 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -398,7 +398,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, uint32_t bulk_xfer_resources = 0; bool sn_all = true; /* default to sn_all */ int instances = 1; - int dev_type = NRT_ADAP_UNSUPPORTED; + int dev_type = NRT_MAX_ADAPTER_TYPES; int err = SLURM_SUCCESS; char *adapter_name = NULL; char *protocol = NULL; -- GitLab From 5f0395270c97383d2f1b7baea8bc1ede876be143 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 14:33:23 -0700 Subject: [PATCH 403/614] Fix switch window management if allocated device not first in list --- src/plugins/switch/nrt/nrt.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 69496dfe6f..3ccd0efb62 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -769,6 +769,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; slurm_nrt_window_t *window; + int adapters_set = 0; int i; assert(tableinfo); @@ -795,7 +796,9 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, } /* Reserve a window on each adapter for this task */ - for (i = 0; i < adapter_cnt; i++) { + for (i = 0; + ((i < node->adapter_count) && (adapters_set < adapter_cnt)); + i++) { adapter = &node->adapter_list[i]; if (adapter->adapter_type != adapter_type) continue; @@ -812,7 +815,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (!user_space || (adapter_type == NRT_IPONLY)) { nrt_ip_task_info_t *ip_table; - ip_table = (nrt_ip_task_info_t *) tableinfo[i].table; + ip_table = (nrt_ip_task_info_t *) + tableinfo[adapters_set].table; ip_table += task_id; ip_table->node_number = node_number; ip_table->task_id = task_id; @@ -826,7 +830,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; - ib_table = (nrt_ib_task_info_t *) tableinfo[i].table; + ib_table = (nrt_ib_task_info_t *) + tableinfo[adapters_set].table; ib_table += task_id; strncpy(ib_table->device_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); @@ -838,7 +843,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; - hfi_table = (nrt_hfi_task_info_t *) tableinfo[i].table; + hfi_table = (nrt_hfi_task_info_t *) + tableinfo[adapters_set].table; hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; @@ -847,9 +853,10 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, adapter_type); } - strncpy(tableinfo[i].adapter_name, adapter->adapter_name, - NRT_MAX_ADAPTER_NAME_LEN); - tableinfo[i].adapter_type = adapter_type; + strncpy(tableinfo[adapters_set].adapter_name, + adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[adapters_set].adapter_type = adapter_type; + adapters_set++; } return SLURM_SUCCESS; -- GitLab From 012d2f51f0e93546d84b75cde88dab5bc08be861 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 15:35:57 -0700 Subject: [PATCH 404/614] Improve switch/nrt logic for adapter type support --- src/plugins/switch/nrt/nrt.c | 54 ++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 15 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 3ccd0efb62..ba89031344 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -800,7 +800,8 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, ((i < node->adapter_count) && (adapters_set < adapter_cnt)); i++) { adapter = &node->adapter_list[i]; - if (adapter->adapter_type != adapter_type) + if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && + (adapter->adapter_type != adapter_type)) continue; if (user_space) { window = _find_free_window(adapter); @@ -910,16 +911,24 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, for (i = 0; i < node->adapter_count; i++) { debug("adapter %s at index %d", node->adapter_list[i].adapter_name, i); - if (strcasecmp(node->adapter_list[i].adapter_name, - adapter_name) == 0) { + if (adapter_name) { + if (!strcasecmp(node->adapter_list[i].adapter_name, + adapter_name)) { + adapter = &node->adapter_list[i]; + break; + } + continue; + } + if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && + (adapter->adapter_type == adapter_type)) { adapter = &node->adapter_list[i]; - debug("Found adapter %s", adapter_name); break; } } if (adapter == NULL) { - error("Failed to find adapter %s on node %s", - adapter_name, hostname); + error("Failed to find adapter %s of type %s on node %s", + adapter_name, _adapter_type_str(adapter_type), + hostname); return SLURM_ERROR; } @@ -2121,6 +2130,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, slurm_nrt_nodeinfo_t *node; int rc; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; + nrt_adapter_t first_adapter_type = NRT_MAX_ADAPTER_TYPES; nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; int table_rec_len = 0; @@ -2130,6 +2140,9 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, assert(jp->magic == NRT_JOBINFO_MAGIC); assert(tasks_per_node); + if (dev_type != NRT_MAX_ADAPTER_TYPES) + adapter_type = dev_type; + nnodes = hostlist_count(hl); for (i = 0; i < nnodes; i++) nprocs += tasks_per_node[i]; @@ -2163,21 +2176,26 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if (node && node->adapter_list) { for (i = 0; i < node->adapter_count; i++) { nrt_adapter_t ad_type; + /* Match specific adapter name */ if (adapter_name && strcmp(adapter_name, node->adapter_list[i].adapter_name)) { continue; } + /* Match specific adapter type (IB, HFI, etc) */ ad_type = node->adapter_list[i].adapter_type; - if ((ad_type == NRT_IPONLY) || - (ad_type == NRT_HPCE)) { - if (jp->user_space) + if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && + (adapter_type != ad_type)) + continue; + if (jp->user_space) { + if ((ad_type == NRT_IPONLY) || + (ad_type == NRT_HPCE)) continue; + if (adapter_type == NRT_MAX_ADAPTER_TYPES) + adapter_type = ad_type; } - if (adapter_type == NRT_MAX_ADAPTER_TYPES) - adapter_type = ad_type; - else if (adapter_type != ad_type) - continue; + if (first_adapter_type == NRT_MAX_ADAPTER_TYPES) + first_adapter_type = ad_type; adapter_type_count++; /* FIXME: It's unclear how this works, each node would have different logical_id * although the network_id seems to be common for our IB switches */ @@ -2190,6 +2208,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->tables_per_task = adapter_type_count; } else if (adapter_type_count >= 1) { jp->tables_per_task = 1; + if (adapter_type == NRT_MAX_ADAPTER_TYPES) + adapter_type = first_adapter_type; } else { jp->tables_per_task = 0; info("switch/nrt: no adapter found for job"); @@ -2211,8 +2231,9 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, else if (adapter_type == NRT_HFI) table_rec_len = sizeof(nrt_hfi_task_info_t); else { - fatal("Unsupported adapter_type: %s", - _adapter_type_str(adapter_type)); + info("Unsupported adapter_type: %s", + _adapter_type_str(adapter_type)); ++ slurm_seterrno_ret(EINVAL); } for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; @@ -2955,6 +2976,9 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) error("nrt_command(load table): %s", nrt_err_str(err)); return SLURM_ERROR; } +/* FIXME: Must modify to issue one call per job per node. + * Do not loop on the load_table call on a per-task basis */ +break; } umask(nrt_umask); -- GitLab From 291e8c94ee5f90e57797e60f129ab6896b6168b3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 15:38:31 -0700 Subject: [PATCH 405/614] Correction to logic in last switch/nrt checkin --- src/plugins/switch/nrt/nrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ba89031344..7dc70dd43c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2233,7 +2233,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, else { info("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); -+ slurm_seterrno_ret(EINVAL); + slurm_seterrno_ret(EINVAL); } for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; -- GitLab From 938b578798c23c63ef38c4a8ed3ba97085a054ee Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Mon, 11 Jun 2012 15:55:16 -0700 Subject: [PATCH 406/614] Update tests for select/serial --- testsuite/expect/test15.20 | 8 +++++--- testsuite/expect/test15.24 | 5 +++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/testsuite/expect/test15.20 b/testsuite/expect/test15.20 index f7f32603bc..2e7d291705 100755 --- a/testsuite/expect/test15.20 +++ b/testsuite/expect/test15.20 @@ -42,9 +42,11 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" - exit $exit_code -} -if { [test_xcpu] } { + exit 0 +} elseif {[test_serial]} { + send_user "\nWARNING: This test is incompatible with serial systems\n" + exit 0 +} elseif { [test_xcpu] } { send_user "\nWARNING: This test is incompatible with XCPU systems\n" exit 0 } diff --git a/testsuite/expect/test15.24 b/testsuite/expect/test15.24 index faa4addff9..f8b68a7c33 100755 --- a/testsuite/expect/test15.24 +++ b/testsuite/expect/test15.24 @@ -43,13 +43,14 @@ print_header $test_id if {[test_cray]} { send_user "\nWARNING: This test is incompatible with Cray systems\n" exit $exit_code -} -if { [test_bluegene] } { +} elseif { [test_bluegene] } { if { [test_emulated] } { set task_cnt 1 } else { set task_cnt 10 } +} elseif {[test_serial]} { + set task_cnt 1 } else { set task_cnt 10 } -- GitLab From 2bfb017ddc2f0cee04c5c4ca4a52fc0b0167b0f9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 17:32:08 -0700 Subject: [PATCH 407/614] Minor error handling improvements --- src/api/step_ctx.c | 7 +++++-- src/common/read_config.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index dba9583b67..ea7565df66 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -451,6 +451,7 @@ slurm_step_ctx_daemon_per_node_hack( if (!name) { if (hl) hostlist_destroy(hl); + slurm_seterrno(ESLURM_INVALID_NODE_NAME); return SLURM_ERROR; } @@ -460,8 +461,10 @@ slurm_step_ctx_daemon_per_node_hack( hostlist_push_host(hl, name); xfree(name); } - if (!hl) + if (!hl) { + slurm_seterrno(ESLURM_INVALID_NODE_COUNT); return SLURM_ERROR; + } hostlist_sort(hl); new_layout->node_list = hostlist_ranged_string_xmalloc(hl); hostlist_destroy(hl); @@ -479,7 +482,7 @@ slurm_step_ctx_daemon_per_node_hack( ctx->step_resp->step_layout = new_layout; /* recreate the launch state structure now that the settings - have changed */ + * have changed */ /* FIXME: currently we have to make multiple calls for this so diff --git a/src/common/read_config.c b/src/common/read_config.c index fcf483e215..6e2a971302 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1597,7 +1597,7 @@ extern char *slurm_conf_get_nodename_from_addr(const char *node_addr) if (!(hptr = get_host_by_addr((char *)&addr, sizeof(addr), AF_INET, buf, sizeof(buf), NULL))) { - error("%m"); + error("No node found with addr %s", node_addr); return NULL; } -- GitLab From 6802052bf735f74e2a27c6c3c5861c145e7f0c72 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 11 Jun 2012 17:32:39 -0700 Subject: [PATCH 408/614] Major update to test7.3 for new job launch APIs (for POE) --- testsuite/expect/test7.3.prog.c | 60 +++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/test7.3.prog.c b/testsuite/expect/test7.3.prog.c index b7352ee229..f7aa51eb56 100644 --- a/testsuite/expect/test7.3.prog.c +++ b/testsuite/expect/test7.3.prog.c @@ -28,6 +28,8 @@ * with SLURM; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ +#include +#include #include #include #include @@ -42,6 +44,41 @@ static void _do_task_work(int *fd_array, int tasks); +node_info_msg_t *node_info = NULL; +static void _load_node_info(void) +{ + slurm_load_node(0, &node_info, SHOW_ALL); +} + +static char *_get_host_addr(char *node_name) +{ + int i; + char *node_addr = NULL; + struct hostent *host; + + if (!node_info) + return NULL; + for (i = 0; i < node_info->record_count; i++) { + if (strcmp(node_name, node_info->node_array[i].name)) + continue; + host = gethostbyname2(node_info->node_array[i].node_addr, AF_INET); + if (host && host->h_length) { + node_addr = calloc(128, 1); + inet_ntop(AF_INET, (void *)host->h_addr_list[0], + node_addr, 128); + } + break; + } + + return node_addr; +} + +static void _free_node_info(void) +{ + if (node_info) + slurm_free_node_info_msg(node_info); +} + int main (int argc, char *argv[]) { int i, min_nodes = 1, max_nodes = 1, nodes, tasks = 0, rc = 0; @@ -51,6 +88,8 @@ int main (int argc, char *argv[]) slurm_step_ctx_t *ctx = NULL; slurm_step_launch_params_t launch[1]; char *task_argv[3]; + char **node_addr; + hostlist_t hl; int *fd_array = NULL; int num_fd; @@ -141,9 +180,26 @@ int main (int argc, char *argv[]) * Hack to run one task per node, regardless of what we set up * when we created the job step context. */ - if (slurm_step_ctx_daemon_per_node_hack(ctx) != SLURM_SUCCESS) { + node_addr = calloc(sizeof(char *), job_resp->node_cnt); + hl = slurm_hostlist_create(job_resp->node_list); + _load_node_info(); + for (i = 0; i < nodes; i++) { + char *hostname = slurm_hostlist_shift(hl); + if (hostname) { + node_addr[i] = _get_host_addr(hostname); + free(hostname); + } + } + _free_node_info(); + slurm_hostlist_destroy(hl); + rc = slurm_step_ctx_daemon_per_node_hack(ctx, node_addr, + job_resp->node_cnt); + for (i = 0; i < nodes; i++) { + if (node_addr[i]) + free(node_addr[i]); + } + if (rc != SLURM_SUCCESS) { slurm_perror("slurm_step_ctx_daemon_per_node_hack"); - rc = 1; goto done; } -- GitLab From 2531f220b2c4274b2e7ea33c9f9b5f304b84c68e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 12 Jun 2012 08:08:42 -0700 Subject: [PATCH 409/614] Tweaks to regression tests --- testsuite/expect/README | 2 +- testsuite/expect/test12.2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/README b/testsuite/expect/README index 1d85aca069..d7ef9d2961 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -354,7 +354,7 @@ test9.5 Stress test of per-task input files. test9.6 Stress test of per-task output files. test9.7 Stress test multiple simultaneous commands via multiple threads. test9.8 Stress test with maximum slurmctld message concurrency. -test9.9 Throughput test for 2000 jobs for timing +test9.9 Throughput test for 5000 jobs for timing test10.# Testing of smap options. diff --git a/testsuite/expect/test12.2 b/testsuite/expect/test12.2 index 7c18248d1b..c7100ec633 100755 --- a/testsuite/expect/test12.2 +++ b/testsuite/expect/test12.2 @@ -116,7 +116,7 @@ proc _get_mem {prog} { # Compute error in KB set diff_mem [expr $mem_used - $mem_size] set error_mem [expr abs($diff_mem)] - if {$error_mem > 4100} { + if {($mem_used < $mem_size) || ($error_mem > 4200)} { send_user "\nFAILURE: sstat memory use discrepancy of $error_mem KB\n" send_user " Wanted $mem_size KB, got $mem_used KB\n" return 1 -- GitLab From 5fe4bb2ed623bf617680b8e174ea2489cc262af2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 12 Jun 2012 08:54:51 -0700 Subject: [PATCH 410/614] Fix for test23.2 if DefMemPerCPU or DefMemPerNode configured --- testsuite/expect/test23.2 | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/testsuite/expect/test23.2 b/testsuite/expect/test23.2 index aa73aeeb6c..3cc9eefce8 100755 --- a/testsuite/expect/test23.2 +++ b/testsuite/expect/test23.2 @@ -170,7 +170,7 @@ expect { # Build input script file1 # make_bash_script $file_in1 " -$srun $file_in2 +$srun --mem=2 $file_in2 " @@ -178,7 +178,7 @@ $srun $file_in2 # Build input script file2 # make_bash_script $file_in2 " -$srun $file_in3 +$srun --mem=2 $file_in3 " @@ -186,15 +186,17 @@ $srun $file_in3 # Build input script file3 # make_bash_script $file_in3 " -$srun sleep 10 +$srun --mem=2 sleep 10 " # # Spawn a job via srun using this account +# NOTE: --mem option here and in scripts above to permit running more than one +# step per job if DefMemPerCPU or DefMemPerNode is configured. # set job_id3 0 -spawn $sbatch -N1 -t1 -v --account=$test_acct --output=/dev/null $file_in1 +spawn $sbatch -N1 -t1 -v --mem=10 --account=$test_acct --output=/dev/null $file_in1 expect { -re "Submitted batch job ($number)" { set job_id3 $expect_out(1,string) -- GitLab From ee2e6c413fb2d49caf005629ed16079aaf88aa72 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 12 Jun 2012 10:30:54 -0700 Subject: [PATCH 411/614] switch/nrt command and logic tweaks --- src/plugins/switch/nrt/nrt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7dc70dd43c..c435d25c1b 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -814,7 +814,7 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, window->job_key = job_key; } - if (!user_space || (adapter_type == NRT_IPONLY)) { + if (!user_space) { nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[adapters_set].table; @@ -944,7 +944,7 @@ _allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, window->job_key = job_key; } - if (!user_space || (adapter_type == NRT_IPONLY)) { + if (!user_space) { nrt_ip_task_info_t *ip_table; ip_table = (nrt_ip_task_info_t *) tableinfo[0].table; ip_table += task_id; @@ -2208,8 +2208,12 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->tables_per_task = adapter_type_count; } else if (adapter_type_count >= 1) { jp->tables_per_task = 1; - if (adapter_type == NRT_MAX_ADAPTER_TYPES) + if (adapter_type == NRT_MAX_ADAPTER_TYPES) { + /* Use same adapter type on all nodes even if the + * adapter types are in different orders on different + * nodes allocated to the job */ adapter_type = first_adapter_type; + } } else { jp->tables_per_task = 0; info("switch/nrt: no adapter found for job"); @@ -2224,7 +2228,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * sizeof(nrt_tableinfo_t)); - if (!jp->user_space || (adapter_type == NRT_IPONLY)) + if (!jp->user_space) table_rec_len = sizeof(nrt_ip_task_info_t); else if (adapter_type == NRT_IB) table_rec_len = sizeof(nrt_ib_task_info_t); -- GitLab From 68e797cdcc8a83195b1c3f865539f348a233d639 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 12 Jun 2012 11:17:53 -0700 Subject: [PATCH 412/614] BGQ - Added information on how to setup the runjob_mux to run as SlurmUser. --- NEWS | 1 + doc/html/bluegene.shtml | 65 +++++++++++++++++++++++++++++++++++------ 2 files changed, 57 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 55339cea35..83ccaba5a5 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,7 @@ documents those changes that are of interest to users and admins. -- BGQ - When using an old IBM driver cnodes that go into error because of a job kill timeout aren't always reported to the system. This is now handled by the runjob_mux plugin. + -- BGQ - Added information on how to setup the runjob_mux to run as SlurmUser. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml index e08d15d152..33c09bc93e 100644 --- a/doc/html/bluegene.shtml +++ b/doc/html/bluegene.shtml @@ -98,9 +98,11 @@ Note that this is a c-node count.

        Task Launch on BlueGene/Q only

        -

        Use SLURM's srun command to launch tasks (srun is a wrapper for IBM's -runjob command. -SLURM job step information, including accounting, functions as expected.

        +

        Use SLURM's srun command to launch tasks (srun uses + an api interface into IBM's runjob command). +SLURM job step information, including accounting, functions as + expected. Totalview and other debuggers will also work with srun. + IBM's runjob will not work under SLURM.

        Task Launch on BlueGene/L and BlueGene/P only

        @@ -279,15 +281,60 @@ plugin = /usr/lib64/slurm/runjob_plugin.so plugin_flags = 0x0101 # RTLD_LAZY | RTLD_GLOBAL -

        After these settings are set (re)start each runjob_mux running on your -system.

        +

        You also need to set things up so the runjob_mux is ran by the + SlurmUser. This can be done by editting 2 files.

        +

        Back in your bg.properties file alter the [master.user] section. +

        +[master.user]
        +...
        +runjob_mux=slurm
        +
        +

        Then in /etc/init.d/bgagent add SlurmUser to the --users line.

        +
        +OPTIONS="--users bgqadmin,bgws,bgqsysdb,slurm"
        +
        +

        After these settings are set flush the runjob_server and (re)start + each runjob_mux running on your system.

        +
        +> /bgsys/drivers/ppcfloor/sbin/master_stop binaries
        +stopped
        +> sudo /etc/init.d/bgagent restart
        +Shutting down bgagentd:                                    [  OK  ]
        +Starting bgagentd:
        +Startup of bgagentd completed:                             [  OK  ]
        +> /bgsys/drivers/ppcfloor/sbin/master_start binaries
        +> /bgsys/drivers/ppcfloor/sbin/bgmaster_server_refresh_config
        +success!
        +> /bgsys/drivers/ppcfloor/sbin/master_start runjob_mux
        +started runjob_mux
        +> ps aux | grep runjob_mux
        +slurm       25461  0.0  0.3 518528 48064 ?        Sl   13:00   0:00 runjob_mux
        +

        When a new version of SLURM is installed it is a wise idea to "refresh" the -runjob_mux with the new plugin. This can be done with no job loss -using the IBM runjob_mux_refresh_config command. This will -reload the plugin and all should be good afterway. After doing this +runjob_mux with the new plugin. This can be done in one of two ways. +

          +
        • Stopping and restarting the runjob_mux. While this + option works every time jobs running under the runjob_mux will not + survive so plan your updates accordingly. +
          +> /bgsys/drivers/ppcfloor/sbin/master_stop runjob_mux
          +stopped runjob_mux
          +> /bgsys/drivers/ppcfloor/sbin/master_start runjob_mux
          +started runjob_mux
          +
          +
        • +
        • WARNING! As of IBM driver V1R1M1 this +method did not work. It appears to in the logs, but loads the old +plugin (presumably still in memory) other than the new one, +so use at your own risk and don't complain if it doesn't work. +

          This method allows no job loss using the +IBM runjob_mux_refresh_config command. This should +reload the plugin and all should be good afterwards. After doing this you may see some warning/error messages about the current running jobs -when finishing not being known. This is expected and can usually be ignored. +when finishing not being known. This is expected and can usually be +ignored.

        • +

        Notes about sub-block allocations:

        -- GitLab From 9fc491a2ea7afa4f548f71e12213c583ef448226 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 12 Jun 2012 11:40:03 -0700 Subject: [PATCH 413/614] Simplify switch/nrt internal function arguments --- src/plugins/switch/nrt/nrt.c | 60 ++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 33 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c435d25c1b..4b796707d6 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -135,7 +135,7 @@ struct slurm_nrt_libstate { nrt_job_key_t key_index; }; -struct slurm_nrt_jobinfo { +typedef struct slurm_nrt_jobinfo { uint32_t magic; /* version from nrt_version() */ /* adapter from lid in table */ @@ -153,7 +153,7 @@ struct slurm_nrt_jobinfo { hostlist_t nodenames; uint32_t num_tasks; -}; +} slurm_nrt_jobinfo_t; typedef struct { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; @@ -176,18 +176,13 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; /* Local functions */ static char * _adapter_type_str(nrt_adapter_t type); -static int _allocate_windows_all(int adapter_cnt, - nrt_tableinfo_t *tableinfo, char *hostname, +static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_job_key_t job_key, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space, bool ip_v4); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); static int _allocate_window_single(char *adapter_name, - nrt_tableinfo_t *tableinfo, char *hostname, + slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_job_key_t job_key, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space, bool ip_v4); + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -760,11 +755,15 @@ _find_free_window(slurm_nrt_adapter_t *adapter) * Used by: slurmctld */ static int -_allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_job_key_t job_key, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid, bool user_space, bool ip_v4) -{ +_allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, + uint32_t node_id, nrt_task_id_t task_id, + nrt_adapter_t adapter_type, nrt_logical_id_t base_lid) +{ + int adapter_cnt = jp->tables_per_task; + nrt_tableinfo_t *tableinfo = jp->tableinfo; + nrt_job_key_t job_key = jp->job_key; + bool ip_v4 = jp->ip_v4; + bool user_space = jp->user_space; nrt_node_number_t node_number; slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; @@ -872,12 +871,15 @@ _allocate_windows_all(int adapter_cnt, nrt_tableinfo_t *tableinfo, * Used by: slurmctld */ static int -_allocate_window_single(char *adapter_name, nrt_tableinfo_t *tableinfo, +_allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, - nrt_task_id_t task_id, nrt_job_key_t job_key, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid, - bool user_space, bool ip_v4) + nrt_task_id_t task_id, nrt_adapter_t adapter_type, + nrt_logical_id_t base_lid) { + nrt_tableinfo_t *tableinfo = jp->tableinfo; + nrt_job_key_t job_key = jp->job_key; + bool ip_v4 = jp->ip_v4; + bool user_space = jp->user_space; nrt_node_number_t node_number; slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; @@ -2258,24 +2260,16 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, for (j = 0; j < tasks_per_node[i]; j++) { if (adapter_name == NULL) { - rc = _allocate_windows_all(jp->tables_per_task, - jp->tableinfo, - host, i, tids[i][j], - jp->job_key, + rc = _allocate_windows_all(jp, host, i, + tids[i][j], adapter_type, - base_lid, - jp->user_space, - ip_v4); + base_lid); } else { rc = _allocate_window_single(adapter_name, - jp->tableinfo, - host, i, + jp, host, i, tids[i][j], - jp->job_key, adapter_type, - base_lid, - jp->user_space, - ip_v4); + base_lid); } if (rc != SLURM_SUCCESS) { _unlock(); -- GitLab From 70da2d61da94e7f23c725980ad1b52e02d53542b Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 12 Jun 2012 11:42:22 -0700 Subject: [PATCH 414/614] update select plugin to be correct --- doc/html/selectplugins.shtml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/html/selectplugins.shtml b/doc/html/selectplugins.shtml index aec9d76a59..e82ce448d3 100644 --- a/doc/html/selectplugins.shtml +++ b/doc/html/selectplugins.shtml @@ -61,7 +61,7 @@ if (select_p_job_test(all available nodes) != SLURM_SUCCESS) { /* leave the job queued for later execution */ else { while (!select_p_job_ready()) - wait + wait /* execute the job */ /* wait for job to end or be terminated */ select_p_job_fini() @@ -441,7 +441,7 @@ to the select plugin specific information about a job.
        Call xfree() to release the memory allocated for the return value.

        int select_p_job_test (struct job_record *job_ptr, -bitstr_t *bitmap, int min_nodes, int max_nodes, int req_nodes, int mode, +bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint32_t mode, List preemption_candidates, List *preempted_jobs);

        Description: Given a job's scheduling requirement specification and a set of nodes which might be used to satisfy the request, identify @@ -640,6 +640,15 @@ Pointer to the step which has completed execution.

        Returns: SLURM_SUCCESS if successful. On failure, the plugin should return SLURM_ERROR.

        +

        int select_p_fail_cnode(struct step_record *step_ptr);

        +

        Description: This function fails + certain cnodes in a blocks midplane.

        +

        Arguments:
        +step_ptr    (input) +information on the step that has failed cnodes.

        +

        Returns: SLURM_SUCCESS if successful. On failure, +the plugin should return SLURM_ERROR.

        + @@ -664,7 +673,7 @@ be used for an advanced reservation.

        Get Information Functions

        -

        int select_p_get_info_from_plugin(enum select_data_info info, +

        int select_p_get_info_from_plugin(enum select_plugindata_info dinfo, struct job_record *job_ptr, void *data);

        Description: Get plugin-specific information about a job.

        -- GitLab From 73689f4ff15da76a65ad97a4b109315cdbb9e0dd Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 12 Jun 2012 11:45:02 -0700 Subject: [PATCH 415/614] update last modified times --- doc/html/bluegene.shtml | 2 +- doc/html/selectplugins.shtml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml index 33c09bc93e..eda17f5059 100644 --- a/doc/html/bluegene.shtml +++ b/doc/html/bluegene.shtml @@ -865,6 +865,6 @@ scheduling logic, etc.

        -

        Last modified 30 January 2012

        +

        Last modified 12 June 2012

        diff --git a/doc/html/selectplugins.shtml b/doc/html/selectplugins.shtml index e82ce448d3..dcc1fac952 100644 --- a/doc/html/selectplugins.shtml +++ b/doc/html/selectplugins.shtml @@ -751,6 +751,6 @@ to maintain data format compatibility across different versions of the plugin.top

        -

        Last modified 3 August 2011

        +

        Last modified 12 June 2012

        -- GitLab From f0d470e6bc513767bcafc1f7cf6da48b5886b362 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 13 Jun 2012 11:13:06 -0700 Subject: [PATCH 416/614] Improve memory consumption on step layouts with high task count. --- NEWS | 1 + src/common/slurm_step_layout.c | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 83ccaba5a5..03f244dbdb 100644 --- a/NEWS +++ b/NEWS @@ -31,6 +31,7 @@ documents those changes that are of interest to users and admins. a job kill timeout aren't always reported to the system. This is now handled by the runjob_mux plugin. -- BGQ - Added information on how to setup the runjob_mux to run as SlurmUser. + -- Improve memory consumption on step layouts with high task count. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index ffc0e2a9c9..5bea947358 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -650,15 +650,14 @@ static int _task_layout_cyclic(slurm_step_layout_t *step_layout, int i, j, taskid = 0; bool over_subscribe = false; - for (i=0; inode_cnt; i++) { - step_layout->tids[i] = xmalloc(sizeof(uint32_t) - * step_layout->task_cnt); - } for (j=0; taskidtask_cnt; j++) { /* cycle counter */ bool space_remaining = false; for (i=0; ((inode_cnt) && (taskidtask_cnt)); i++) { if ((jtids[i], sizeof(uint32_t) + * step_layout->tasks[i]+1); + step_layout->tids[i][step_layout->tasks[i]] = taskid; taskid++; -- GitLab From 1ae400879fbd03348bbb80a0f0cc0f19863477ea Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 13 Jun 2012 11:13:23 -0700 Subject: [PATCH 417/614] fix test to work correctly with mpich2 --- testsuite/expect/test1.88 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/expect/test1.88 b/testsuite/expect/test1.88 index 0419555e14..08bcaa1003 100755 --- a/testsuite/expect/test1.88 +++ b/testsuite/expect/test1.88 @@ -69,7 +69,7 @@ if {[test_aix] == 1} { exec $bin_rm -f $test_prog ${test_prog}.o if {$use_pmi} { set pmi_link "-rpath $slurm_dir/lib -L $slurm_dir/lib -lpmi" - exec $mpicc -Xlinker $pmi_link -o $test_prog ${test_prog}.c + eval exec $mpicc -Xlinker $pmi_link -o $test_prog ${test_prog}.c } else { exec $mpicc -o $test_prog ${test_prog}.c } -- GitLab From bb94cf0dd5ca99f3ea1ef23d3a1e84bc291f70f9 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 13 Jun 2012 11:57:18 -0700 Subject: [PATCH 418/614] fix typo. --- src/plugins/select/bluegene/bl_bgq/bridge_status.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_status.cc b/src/plugins/select/bluegene/bl_bgq/bridge_status.cc index 9da5541296..3127ccdc20 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_status.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_status.cc @@ -910,7 +910,7 @@ void event_handler::handleRealtimeStartedRealtimeEvent( if (!rt_running) { uint16_t coords[SYSTEM_DIMENSIONS]; slurm_mutex_lock(&rt_mutex); - info("RealTime server started backup!"); + info("RealTime server started back up!"); rt_running = 1; /* To make sure we don't have any missing state */ if (blocks_are_created) -- GitLab From 9c0ca8db65043d687bcc53945f8a2e314973e157 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 13 Jun 2012 12:04:56 -0700 Subject: [PATCH 419/614] BGQ - quiter debug when the real time server comes back but there are still messages we find when we poll but haven't given it back to the real time yet. --- NEWS | 3 +++ src/plugins/select/bluegene/bl_bgq/bridge_status.cc | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 03f244dbdb..fed0ded0c4 100644 --- a/NEWS +++ b/NEWS @@ -32,6 +32,9 @@ documents those changes that are of interest to users and admins. handled by the runjob_mux plugin. -- BGQ - Added information on how to setup the runjob_mux to run as SlurmUser. -- Improve memory consumption on step layouts with high task count. + -- BGQ - quiter debug when the real time server comes back but there are + still messages we find when we poll but haven't given it back to the real + time yet. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_status.cc b/src/plugins/select/bluegene/bl_bgq/bridge_status.cc index 3127ccdc20..999287e2a0 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_status.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_status.cc @@ -911,12 +911,12 @@ void event_handler::handleRealtimeStartedRealtimeEvent( uint16_t coords[SYSTEM_DIMENSIONS]; slurm_mutex_lock(&rt_mutex); info("RealTime server started back up!"); - rt_running = 1; /* To make sure we don't have any missing state */ if (blocks_are_created) _do_block_poll(); /* only do every 30 seconds */ _do_hardware_poll(0, coords, bridge_get_compute_hardware()); + rt_running = 1; } } -- GitLab From 7135f58b7aec50979fd21c75d8e6a6566471edd4 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 13 Jun 2012 15:32:11 -0700 Subject: [PATCH 420/614] Add switch/nrt support for HPCE network --- src/plugins/switch/nrt/nrt.c | 146 +++++++++++++++++++++++++++++------ 1 file changed, 124 insertions(+), 22 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4b796707d6..16b4c8e309 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -581,6 +581,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, slurm_nrt_adapter_t *adapter = NULL; slurm_nrt_window_t *window = NULL; int i, j; + int rc = SLURM_SUCCESS; bool adapter_found; uint16_t win_id = 0; @@ -601,7 +602,8 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, for (i = 0; i < adapter_cnt; i++) { if (tableinfo[i].table == NULL) { error("tableinfo[%d].table is NULL", i); - return SLURM_ERROR; + rc = SLURM_ERROR; + continue; } adapter_found = false; @@ -617,7 +619,8 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (ib_tbl_ptr == NULL) { error("tableinfo[%d].table[%d] is " "NULL", i, task_id); - return SLURM_ERROR; + rc = SLURM_ERROR; + continue; } if (adapter->lid == ib_tbl_ptr->base_lid) { adapter_found = true; @@ -637,7 +640,8 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (hfi_tbl_ptr == NULL) { error("tableinfo[%d].table[%d] is " "NULL", i, task_id); - return SLURM_ERROR; + rc = SLURM_ERROR; + continue; } if (adapter->lid == hfi_tbl_ptr->lid) { adapter_found = true; @@ -651,17 +655,41 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, hfi_tbl_ptr->win_id, task_id); break; } + } else if ((adapter->adapter_type == NRT_HPCE) || + (adapter->adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + hpce_tbl_ptr = tableinfo[i].table + task_id; + if (hpce_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d] is " + "NULL", i, task_id); + rc = SLURM_ERROR; + continue; + } +/* FIXME: These should probably match network_id or something else */ +// if (adapter->lid == hpce_tbl_ptr->lid) { + if (1) { + adapter_found = true; + win_id = hpce_tbl_ptr->win_id; + debug3("Setting status %s adapter %s " + "window %hu for task %d", + state == NRT_WIN_UNAVAILABLE ? + "UNLOADED" : "LOADED", + adapter->adapter_name, + hpce_tbl_ptr->win_id, task_id); + break; + } } else { - fatal("_window_state_set: Missing support for " - "adapter type %hu", - adapter->adapter_type); + error("_window_state_set: Missing support for " + "adapter type %s", + _adapter_type_str(adapter->adapter_type)); } } if (!adapter_found) { error("Did not find adapter %s with lid %hu ", adapter->adapter_name, adapter->lid); - return SLURM_ERROR; + rc = SLURM_ERROR; + continue; } window = _find_window(adapter, win_id); @@ -672,7 +700,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, } } - return SLURM_SUCCESS; + return rc; } /* If the node is already in the node list then simply return * a pointer to it, otherwise dynamically allocate memory to the @@ -848,9 +876,17 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; + } else if ((adapter_type == NRT_HPCE) || + (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_table; + hpce_table = (nrt_hpce_task_info_t *) + tableinfo[adapters_set].table; + hpce_table += task_id; + hpce_table->task_id = task_id; + hpce_table->win_id = window->window_id; } else { - fatal("Missing support for adapter type %d", - adapter_type); + error("Missing support for adapter type %s", + _adapter_type_str(adapter_type)); } strncpy(tableinfo[adapters_set].adapter_name, @@ -978,8 +1014,16 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, hfi_table += task_id; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; + } else if ((adapter_type == NRT_HPCE) || + (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_table; + hpce_table = (nrt_hpce_task_info_t *) tableinfo[0].table; + hpce_table += task_id; + hpce_table->task_id = task_id; + hpce_table->win_id = window->window_id; } else { - fatal("Missing support for adapter type %d", adapter_type); + error("Missing support for adapter type %s", + _adapter_type_str(adapter_type)); } strncpy(tableinfo[0].adapter_name, adapter_name, @@ -1214,8 +1258,19 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) info(" lpar_id: %u", hfi_tbl_ptr->lpar_id); info(" lid: %u", hfi_tbl_ptr->lid); info(" win_id: %hu", hfi_tbl_ptr->win_id); - } else if ((adapter_type == NRT_IPONLY) || - (adapter_type == NRT_HPCE)) { /* HPC Ethernet */ + } else if ((adapter_type == NRT_HPCE) || + (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + hpce_tbl_ptr = table; + hpce_tbl_ptr += i; + info(" task_id: %u", hpce_tbl_ptr->task_id); + info(" win_id: %hu", hpce_tbl_ptr->win_id); + inet_ntop(AF_INET, &hpce_tbl_ptr->node_number, + addr_str, sizeof(addr_str)); + info(" node_number: %s", addr_str); +/* info(" node_number: %u", hpce_tbl_ptr->node_number); */ + info(" device_name: %s", hpce_tbl_ptr->device_name); + } else if (adapter_type == NRT_IPONLY) { nrt_ip_task_info_t *ip_tbl_ptr; char addr_str[128]; ip_tbl_ptr = table; @@ -2191,7 +2246,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, continue; if (jp->user_space) { if ((ad_type == NRT_IPONLY) || - (ad_type == NRT_HPCE)) + (ad_type == NRT_HPCE) || + (ad_type == NRT_KMUX)) continue; if (adapter_type == NRT_MAX_ADAPTER_TYPES) adapter_type = ad_type; @@ -2236,6 +2292,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, table_rec_len = sizeof(nrt_ib_task_info_t); else if (adapter_type == NRT_HFI) table_rec_len = sizeof(nrt_hfi_task_info_t); + else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) + table_rec_len = sizeof(nrt_hpce_task_info_t); else { info("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); @@ -2348,9 +2406,20 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, tmp_8 = hfi_tbl_ptr->win_id; pack8(tmp_8, buf); } + } else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + for (i = 0, hpce_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, hpce_tbl_ptr++) { + pack32(hpce_tbl_ptr->task_id, buf); + pack16(hpce_tbl_ptr->win_id, buf); + pack32(hpce_tbl_ptr->node_number, buf); + packmem(hpce_tbl_ptr->device_name, + NRT_MAX_DEVICENAME_SIZE, buf); + } } else { - fatal("_pack_tableinfo: Missing support for adapter type %hu", - adapter_type); + error("_pack_tableinfo: Missing support for adapter type %s", + _adapter_type_str(adapter_type)); } packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); } @@ -2460,9 +2529,24 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, safe_unpack8(&tmp_8, buf); hfi_tbl_ptr->win_id = tmp_8; } + } else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + tableinfo->table = (nrt_hpce_task_info_t *) + xmalloc(tableinfo->table_length * + sizeof(nrt_hpce_task_info_t)); + for (i = 0, hpce_tbl_ptr = tableinfo->table; + i < tableinfo->table_length; + i++, hpce_tbl_ptr++) { + safe_unpack32(&hpce_tbl_ptr->task_id, buf); + safe_unpack16(&hpce_tbl_ptr->win_id, buf); + safe_unpack32(&hpce_tbl_ptr->node_number, buf); + safe_unpackmem(hpce_tbl_ptr->device_name, &size, buf); + if (size != NRT_MAX_DEVICENAME_SIZE) + goto unpack_error; + } } else { - fatal("_unpack_tableinfo: Missing support for adapter " - "type %hu", adapter_type); + error("_unpack_tableinfo: Missing support for adapter type %s", + _adapter_type_str(adapter_type)); } safe_unpackmem_ptr(&name_ptr, &size, buf); if (size != NRT_MAX_DEVICENAME_SIZE) @@ -2561,9 +2645,13 @@ nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) base_size = sizeof(nrt_ib_task_info_t); } else if (job->tableinfo->adapter_type == NRT_HFI) { base_size = sizeof(nrt_hfi_task_info_t); + } else if ((job->tableinfo->adapter_type == NRT_HPCE) || + (job->tableinfo->adapter_type == NRT_KMUX)) { + base_size = sizeof(nrt_hpce_task_info_t); } else { - fatal("nrt_copy_jobinfo: Missing support for adapter " - "type %hu", job->tableinfo->adapter_type); + error("nrt_copy_jobinfo: Missing support for adapter " + "type %s", + _adapter_type_str(job->tableinfo->adapter_type)); } new->tableinfo[i].table_length = job->tableinfo[i].table_length; table_size = base_size * job->tableinfo[i].table_length; @@ -2767,9 +2855,16 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) hfi_tbl_ptr = (nrt_hfi_task_info_t *) tableinfo->table; hfi_tbl_ptr += i; window_id = hfi_tbl_ptr->win_id; + } else if ((adapter_names.adapter_type == NRT_HPCE) || + (adapter_names.adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + hpce_tbl_ptr = (nrt_hpce_task_info_t *) tableinfo-> + table; + hpce_tbl_ptr += i; + window_id = hpce_tbl_ptr->win_id; } else { - fatal("_wait_for_all_windows: Missing support for " - "adapter_type:%s", + error("_wait_for_all_windows: Missing support for " + "adapter_type %s", _adapter_type_str(tableinfo->adapter_type)); } @@ -3073,6 +3168,13 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) jp->tableinfo[i].table; hfi_tbl_ptr += j; window_id = hfi_tbl_ptr->win_id; + } else if ((jp->tableinfo[i].adapter_type==NRT_HPCE) || + (jp->tableinfo[i].adapter_type==NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + hpce_tbl_ptr = (nrt_hpce_task_info_t *) + jp->tableinfo[i].table; + hpce_tbl_ptr += j; + window_id = hpce_tbl_ptr->win_id; } else { fatal("nrt_unload_table: invalid adapter " "type: %s", -- GitLab From 7a2c889dc078cc353be3a9b103e476d0ac9e2847 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 14 Jun 2012 11:33:46 -0700 Subject: [PATCH 421/614] switch/nrt logic for mutliple adapter type job record --- src/plugins/switch/nrt/nrt.c | 92 ++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 41 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 16b4c8e309..6bda1978c2 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -209,16 +209,14 @@ static int _job_step_window_state(slurm_nrt_jobinfo_t *jp, static void _lock(void); static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); -static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, - nrt_adapter_t adapter_type, Buf buf, - bool ip_v4); +static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, + slurm_nrt_jobinfo_t *jp); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status); static int _unpack_tableinfo(nrt_tableinfo_t *tableinfo, - nrt_adapter_t adapter_type, Buf buf, - bool ip_v4); + Buf buf, slurm_nrt_jobinfo_t *jp); static int _wait_for_all_windows(nrt_tableinfo_t *tableinfo); static int _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, @@ -891,7 +889,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, strncpy(tableinfo[adapters_set].adapter_name, adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); - tableinfo[adapters_set].adapter_type = adapter_type; + tableinfo[adapters_set].adapter_type = adapter->adapter_type; adapters_set++; } @@ -1028,6 +1026,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, strncpy(tableinfo[0].adapter_name, adapter_name, NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[0].adapter_type = adapter->adapter_type; return SLURM_SUCCESS; } @@ -1326,6 +1325,8 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" nodenames: %s (slurmctld internal use only)", buf); info(" num_tasks: %d", j->num_tasks); for (i = 0; i < j->tables_per_task; i++) { + info("--Header NRT table--"); + info(" adapter_name: %s", j->tableinfo[i].adapter_name); info(" adapter_type: %s", _adapter_type_str(j->tableinfo[i].adapter_type)); if (j->user_space) @@ -2355,12 +2356,23 @@ fail: } static void -_pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf, bool ip_v4) +_pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) { + uint32_t adapter_type; + bool ip_v4; int i, j; + xassert(tableinfo); + xassert(jp); + + ip_v4 = jp->ip_v4; + packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); + adapter_type = tableinfo->adapter_type; + pack32(adapter_type, buf); + if (!jp->user_space) + adapter_type = NRT_IPONLY; pack32(tableinfo->table_length, buf); + if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; for (i = 0, ib_tbl_ptr = tableinfo->table; @@ -2421,7 +2433,6 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, error("_pack_tableinfo: Missing support for adapter type %s", _adapter_type_str(adapter_type)); } - packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); } /* Used by: all */ @@ -2429,7 +2440,6 @@ extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { int i; - nrt_adapter_t adapter_type; assert(j); assert(j->magic == NRT_JOBINFO_MAGIC); @@ -2450,27 +2460,37 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->num_tasks, buf); packstr(j->protocol, buf); - for (i = 0; i < j->tables_per_task; i++) { - if (!j->user_space) - adapter_type = NRT_IPONLY; - else - adapter_type = j->tableinfo[i].adapter_type; - _pack_tableinfo(&j->tableinfo[i], adapter_type, buf, j->ip_v4); - } + for (i = 0; i < j->tables_per_task; i++) + _pack_tableinfo(&j->tableinfo[i], buf, j); return SLURM_SUCCESS; } /* return 0 on success, -1 on failure */ static int -_unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, - Buf buf, bool ip_v4) +_unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) { - uint32_t size; + uint32_t tmp_32, adapter_type; + uint16_t tmp_16; + uint8_t tmp_8; char *name_ptr; int i, j; + bool ip_v4; + + xassert(jp); + xassert(tableinfo); + safe_unpackmem_ptr(&name_ptr, &tmp_32, buf); + if (tmp_32 != NRT_MAX_DEVICENAME_SIZE) + goto unpack_error; + memcpy(tableinfo->adapter_name, name_ptr, tmp_32); + safe_unpack32(&adapter_type, buf); + tableinfo->adapter_type = (int) adapter_type; + ip_v4 = jp->ip_v4; + if (!jp->user_space) + adapter_type = NRT_IPONLY; safe_unpack32(&tableinfo->table_length, buf); + if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; tableinfo->table = (nrt_ib_task_info_t *) @@ -2479,8 +2499,8 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, ib_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, ib_tbl_ptr++) { - safe_unpackmem(ib_tbl_ptr->device_name, &size, buf); - if (size != NRT_MAX_DEVICENAME_SIZE) + safe_unpackmem(ib_tbl_ptr->device_name, &tmp_32, buf); + if (tmp_32 != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; safe_unpack32(&ib_tbl_ptr->base_lid, buf); safe_unpack8(&ib_tbl_ptr->lmc, buf); @@ -2500,8 +2520,8 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, if (ip_v4) { safe_unpackmem((char *) &ip_tbl_ptr->ip.ipv4_addr, - &size, buf); - if (size != sizeof(in_addr_t)) + &tmp_32, buf); + if (tmp_32 != sizeof(in_addr_t)) goto unpack_error; } else { for (j = 0; j < 4; j++) { @@ -2521,8 +2541,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, for (i = 0, hfi_tbl_ptr = tableinfo->table; i < tableinfo->table_length; i++, hfi_tbl_ptr++) { - uint16_t tmp_16; - uint8_t tmp_8; + safe_unpack32(&hfi_tbl_ptr->task_id, buf); safe_unpack16(&tmp_16, buf); hfi_tbl_ptr->lid = tmp_16; @@ -2540,30 +2559,26 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, nrt_adapter_t adapter_type, safe_unpack32(&hpce_tbl_ptr->task_id, buf); safe_unpack16(&hpce_tbl_ptr->win_id, buf); safe_unpack32(&hpce_tbl_ptr->node_number, buf); - safe_unpackmem(hpce_tbl_ptr->device_name, &size, buf); - if (size != NRT_MAX_DEVICENAME_SIZE) + safe_unpackmem(hpce_tbl_ptr->device_name, &tmp_32,buf); + if (tmp_32 != NRT_MAX_DEVICENAME_SIZE) goto unpack_error; } } else { error("_unpack_tableinfo: Missing support for adapter type %s", _adapter_type_str(adapter_type)); } - safe_unpackmem_ptr(&name_ptr, &size, buf); - if (size != NRT_MAX_DEVICENAME_SIZE) - goto unpack_error; - memcpy(tableinfo->adapter_name, name_ptr, size); - return 0; + + return SLURM_SUCCESS; unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ error("unpack error in _unpack_tableinfo"); - return -1; + return SLURM_ERROR; } /* Used by: all */ extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { - nrt_adapter_t adapter_type; uint32_t uint32_tmp; int i; @@ -2586,12 +2601,7 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); for (i = 0; i < j->tables_per_task; i++) { - if (!j->user_space) - adapter_type = NRT_IPONLY; - else - adapter_type = j->tableinfo[i].adapter_type; - if (_unpack_tableinfo(&j->tableinfo[i], adapter_type, buf, - j->ip_v4)) + if (_unpack_tableinfo(&j->tableinfo[i], buf, j)) goto unpack_error; } -- GitLab From e4c5ac02c07a30722cfebda77781e361b27128d2 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 14 Jun 2012 12:18:01 -0700 Subject: [PATCH 422/614] switch/nrt logic for multiple network_id values --- src/plugins/switch/nrt/nrt.c | 58 +++++++++++++++--------------- src/plugins/switch/nrt/nrt_keys.h | 1 + src/plugins/switch/nrt/slurm_nrt.h | 3 +- 3 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6bda1978c2..86c494c19f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -139,7 +139,6 @@ typedef struct slurm_nrt_jobinfo { uint32_t magic; /* version from nrt_version() */ /* adapter from lid in table */ - nrt_network_id_t network_id; /* uid from getuid() */ /* pid from getpid() */ nrt_job_key_t job_key; @@ -178,11 +177,13 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); + nrt_adapter_t adapter_type, int network_id, + nrt_logical_id_t base_lid); static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid); + nrt_adapter_t adapter_type, int network_id, + nrt_logical_id_t base_lid); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -783,7 +784,8 @@ _find_free_window(slurm_nrt_adapter_t *adapter) static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, - nrt_adapter_t adapter_type, nrt_logical_id_t base_lid) + nrt_adapter_t adapter_type, int network_id, + nrt_logical_id_t base_lid) { int adapter_cnt = jp->tables_per_task; nrt_tableinfo_t *tableinfo = jp->tableinfo; @@ -828,6 +830,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && (adapter->adapter_type != adapter_type)) continue; + if ((network_id >= 0) && (adapter->network_id != network_id)) + continue; if (user_space) { window = _find_free_window(adapter); if (window == NULL) { @@ -890,6 +894,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, strncpy(tableinfo[adapters_set].adapter_name, adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); tableinfo[adapters_set].adapter_type = adapter->adapter_type; + tableinfo[adapters_set].network_id = adapter->network_id; adapters_set++; } @@ -908,7 +913,7 @@ static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, - nrt_logical_id_t base_lid) + int network_id, nrt_logical_id_t base_lid) { nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; @@ -955,6 +960,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } continue; } + if ((network_id >= 0) && (adapter->network_id != network_id)) + continue; if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && (adapter->adapter_type == adapter_type)) { adapter = &node->adapter_list[i]; @@ -1027,6 +1034,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, strncpy(tableinfo[0].adapter_name, adapter_name, NRT_MAX_ADAPTER_NAME_LEN); tableinfo[0].adapter_type = adapter->adapter_type; + tableinfo[0].network_id = adapter->network_id; return SLURM_SUCCESS; } @@ -1310,7 +1318,6 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info("--Begin Jobinfo--"); info(" job_key: %u", j->job_key); - info(" network_id: %lu", j->network_id); info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %hu", j->bulk_xfer); info(" bulk_xfer_resources: %u", j->bulk_xfer_resources); @@ -1329,6 +1336,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" adapter_name: %s", j->tableinfo[i].adapter_name); info(" adapter_type: %s", _adapter_type_str(j->tableinfo[i].adapter_type)); + info(" network_id: %lu", j->tableinfo[i].network_id); if (j->user_space) adapter_type = j->tableinfo[i].adapter_type; else @@ -2188,7 +2196,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, slurm_nrt_nodeinfo_t *node; int rc; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; - nrt_adapter_t first_adapter_type = NRT_MAX_ADAPTER_TYPES; + int network_id = -1; nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; int table_rec_len = 0; @@ -2245,34 +2253,22 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && (adapter_type != ad_type)) continue; - if (jp->user_space) { - if ((ad_type == NRT_IPONLY) || - (ad_type == NRT_HPCE) || - (ad_type == NRT_KMUX)) - continue; - if (adapter_type == NRT_MAX_ADAPTER_TYPES) - adapter_type = ad_type; - } - if (first_adapter_type == NRT_MAX_ADAPTER_TYPES) - first_adapter_type = ad_type; + if (jp->user_space && (ad_type == NRT_IPONLY)) + continue; adapter_type_count++; /* FIXME: It's unclear how this works, each node would have different logical_id * although the network_id seems to be common for our IB switches */ base_lid = MIN(base_lid, node->adapter_list[i].lid); - jp->network_id = node->adapter_list[i].network_id; + if (!sn_all) { + adapter_type = ad_type; + network_id = node->adapter_list[i].network_id; + break; + } } } - if (sn_all) { + if (adapter_type_count >= 1) { jp->tables_per_task = adapter_type_count; - } else if (adapter_type_count >= 1) { - jp->tables_per_task = 1; - if (adapter_type == NRT_MAX_ADAPTER_TYPES) { - /* Use same adapter type on all nodes even if the - * adapter types are in different orders on different - * nodes allocated to the job */ - adapter_type = first_adapter_type; - } } else { jp->tables_per_task = 0; info("switch/nrt: no adapter found for job"); @@ -2322,12 +2318,14 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, rc = _allocate_windows_all(jp, host, i, tids[i][j], adapter_type, + network_id, base_lid); } else { rc = _allocate_window_single(adapter_name, jp, host, i, tids[i][j], adapter_type, + network_id, base_lid); } if (rc != SLURM_SUCCESS) { @@ -2369,6 +2367,7 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); adapter_type = tableinfo->adapter_type; pack32(adapter_type, buf); + pack64(tableinfo->network_id, buf); if (!jp->user_space) adapter_type = NRT_IPONLY; pack32(tableinfo->table_length, buf); @@ -2456,7 +2455,6 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack8(j->ip_v4, buf); pack8(j->user_space, buf); pack16(j->tables_per_task, buf); - pack64(j->network_id, buf); pack32(j->num_tasks, buf); packstr(j->protocol, buf); @@ -2486,6 +2484,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) memcpy(tableinfo->adapter_name, name_ptr, tmp_32); safe_unpack32(&adapter_type, buf); tableinfo->adapter_type = (int) adapter_type; + safe_unpack64(&tableinfo->network_id, buf); ip_v4 = jp->ip_v4; if (!jp->user_space) adapter_type = NRT_IPONLY; @@ -2594,7 +2593,6 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack8(&j->ip_v4, buf); safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); - safe_unpack64(&j->network_id, buf); safe_unpack32(&j->num_tasks, buf); safe_unpackstr_xmalloc(&j->protocol, &uint32_tmp, buf); @@ -3027,7 +3025,7 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.num_tasks = jp->tableinfo[i].table_length; table_info.job_key = jp->job_key; table_info.uid = uid; - table_info.network_id = jp->network_id; + table_info.network_id = jp->tableinfo[i].network_id; table_info.pid = pid; table_info.adapter_type = jp->tableinfo[i].adapter_type; if (jp->user_space) { diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index ba1e065714..b108788307 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -73,6 +73,7 @@ typedef struct nrt_tableinfo { void *table; /* Pointer to nrt_*_task_info_t */ char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; + nrt_network_id_t network_id; /* FIXME: Need to populate, un/pack, and free this data structure */ nrt_comm_table_t *comm_table_ptr; } nrt_tableinfo_t; diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 612814cdf6..f8b473e6a4 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -77,8 +77,9 @@ enum { EUNLOAD }; +/* FIXME: Need to look at performances. Test9.9 running slow on NRT */ #define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ -#define NRT_DEBUG_CNT 4 /* Count of windows, adapters, etc to log +#define NRT_DEBUG_CNT 0 /* Count of windows, adapters, etc to log * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) -- GitLab From 9b0c7080b6e463f105fe6ee8fa0f27cf0d12e9f1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 14 Jun 2012 13:53:31 -0700 Subject: [PATCH 423/614] switch/nrt mods to record protocol by table, not by job --- src/plugins/switch/nrt/nrt.c | 62 +++++++++++++----------------------- 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 86c494c19f..681bcbd73a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -146,7 +146,6 @@ typedef struct slurm_nrt_jobinfo { uint32_t bulk_xfer_resources; uint8_t ip_v4; /* flag */ uint8_t user_space; /* flag */ - char *protocol; /* MPI, UPC, LAPI, PAMI, etc. */ uint16_t tables_per_task; nrt_tableinfo_t *tableinfo; @@ -178,12 +177,12 @@ static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_logical_id_t base_lid); + char *protocol_name, nrt_logical_id_t base_lid); static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_logical_id_t base_lid); + char *protocol_name, nrt_logical_id_t base_lid); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -785,7 +784,7 @@ static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_logical_id_t base_lid) + char *protocol_name, nrt_logical_id_t base_lid) { int adapter_cnt = jp->tables_per_task; nrt_tableinfo_t *tableinfo = jp->tableinfo; @@ -895,6 +894,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); tableinfo[adapters_set].adapter_type = adapter->adapter_type; tableinfo[adapters_set].network_id = adapter->network_id; + strncpy(tableinfo[adapters_set].protocol_name, protocol_name, + NRT_MAX_PROTO_NAME_LEN); + adapters_set++; } @@ -913,7 +915,8 @@ static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, - int network_id, nrt_logical_id_t base_lid) + int network_id, char *protocol_name, + nrt_logical_id_t base_lid) { nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; @@ -1035,6 +1038,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, NRT_MAX_ADAPTER_NAME_LEN); tableinfo[0].adapter_type = adapter->adapter_type; tableinfo[0].network_id = adapter->network_id; + strncpy(tableinfo[0].protocol_name, protocol_name, + NRT_MAX_PROTO_NAME_LEN); return SLURM_SUCCESS; } @@ -1324,7 +1329,6 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" ip_v4: %hu", j->ip_v4); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); - info(" protocol: %s", j->protocol); if (j->nodenames) hostlist_ranged_string(j->nodenames, sizeof(buf), buf); else @@ -1337,6 +1341,7 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" adapter_type: %s", _adapter_type_str(j->tableinfo[i].adapter_type)); info(" network_id: %lu", j->tableinfo[i].network_id); + info(" protocol_name: %s", j->tableinfo[i].protocol_name); if (j->user_space) adapter_type = j->tableinfo[i].adapter_type; else @@ -2223,8 +2228,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->nodenames = hostlist_copy(hl); jp->num_tasks = nprocs; jp->user_space = (uint8_t) user_space; -/* FIXME: mutliple protocols per job possible */ - jp->protocol = xstrdup(protocol); protocol_table = _get_protocol_table(protocol); xfree(protocol_table); @@ -2319,6 +2322,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, tids[i][j], adapter_type, network_id, + protocol, base_lid); } else { rc = _allocate_window_single(adapter_name, @@ -2326,6 +2330,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, tids[i][j], adapter_type, network_id, + protocol, base_lid); } if (rc != SLURM_SUCCESS) { @@ -2364,10 +2369,11 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) xassert(jp); ip_v4 = jp->ip_v4; - packmem(tableinfo->adapter_name, NRT_MAX_DEVICENAME_SIZE, buf); + packmem(tableinfo->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); adapter_type = tableinfo->adapter_type; pack32(adapter_type, buf); pack64(tableinfo->network_id, buf); + packmem(tableinfo->protocol_name, NRT_MAX_PROTO_NAME_LEN, buf); if (!jp->user_space) adapter_type = NRT_IPONLY; pack32(tableinfo->table_length, buf); @@ -2456,7 +2462,6 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack8(j->user_space, buf); pack16(j->tables_per_task, buf); pack32(j->num_tasks, buf); - packstr(j->protocol, buf); for (i = 0; i < j->tables_per_task; i++) _pack_tableinfo(&j->tableinfo[i], buf, j); @@ -2479,12 +2484,16 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) xassert(tableinfo); safe_unpackmem_ptr(&name_ptr, &tmp_32, buf); - if (tmp_32 != NRT_MAX_DEVICENAME_SIZE) + if (tmp_32 != NRT_MAX_ADAPTER_NAME_LEN) goto unpack_error; memcpy(tableinfo->adapter_name, name_ptr, tmp_32); safe_unpack32(&adapter_type, buf); tableinfo->adapter_type = (int) adapter_type; safe_unpack64(&tableinfo->network_id, buf); + safe_unpackmem_ptr(&name_ptr, &tmp_32, buf); + if (tmp_32 != NRT_MAX_PROTO_NAME_LEN) + goto unpack_error; + memcpy(tableinfo->protocol_name, name_ptr, tmp_32); ip_v4 = jp->ip_v4; if (!jp->user_space) adapter_type = NRT_IPONLY; @@ -2578,7 +2587,6 @@ unpack_error: /* safe_unpackXX are macros which jump to unpack_error */ extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) { - uint32_t uint32_tmp; int i; assert(j); @@ -2594,7 +2602,6 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); safe_unpack32(&j->num_tasks, buf); - safe_unpackstr_xmalloc(&j->protocol, &uint32_tmp, buf); j->tableinfo = (nrt_tableinfo_t *) xmalloc(j->tables_per_task * sizeof(nrt_tableinfo_t)); @@ -2611,7 +2618,6 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) unpack_error: error("nrt_unpack_jobinfo error"); - xfree(j->protocol); if (j->tableinfo) { for (i = 0; i < j->tables_per_task; i++) xfree(j->tableinfo[i].table); @@ -2687,7 +2693,6 @@ nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) } jp->magic = 0; - xfree(jp->protocol); if ((jp->tables_per_task > 0) && (jp->tableinfo != NULL)) { for (i = 0; i < jp->tables_per_task; i++) { tableinfo = &jp->tableinfo[i]; @@ -2966,29 +2971,10 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) int rc; nrt_cmd_load_table_t load_table; nrt_table_info_t table_info; - int protocol_cnt = 0; - char protocol_name[NRT_MAX_PROTO_CNT][NRT_MAX_PROTO_NAME_LEN]; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); - if (jp->protocol) { - char *tok, *save_ptr; - char *protocol = xstrdup(jp->protocol); - tok = strtok_r(protocol, ",", &save_ptr); - while (tok) { - if (protocol_cnt >= NRT_MAX_PROTO_CNT) { - error("too many protocols for job (%s)", - jp->protocol); - break; - } - strncpy(&protocol_name[protocol_cnt++][0], tok, - NRT_MAX_PROTO_NAME_LEN); - tok = strtok_r(NULL, ",", &save_ptr); - } - xfree(protocol); - } - #if NRT_DEBUG info("nrt_load_table"); _print_jobinfo(jp); @@ -3053,11 +3039,9 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } else { table_info.job_name[0] = '\0'; } -/* FIXME: Need to set on a per-table record basis */ - if (jp->protocol) { - strncpy(table_info.protocol_name, jp->protocol, - NRT_MAX_PROTO_NAME_LEN); - } + strncpy(table_info.protocol_name, + jp->tableinfo[i].protocol_name, + NRT_MAX_PROTO_NAME_LEN); table_info.use_bulk_transfer = jp->bulk_xfer; table_info.bulk_transfer_resources = jp->bulk_xfer_resources; /* The following fields only apply to Power7 processors -- GitLab From 481dfaa50facba96c623ce52541fbab900294889 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 14 Jun 2012 13:59:42 -0700 Subject: [PATCH 424/614] switch/nrt header file mod needed for previous checkin --- src/plugins/switch/nrt/nrt.c | 2 +- src/plugins/switch/nrt/nrt_keys.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 681bcbd73a..2f0fbac8e9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2645,7 +2645,7 @@ nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) } memcpy(new, job, sizeof(slurm_nrt_jobinfo_t)); - /* table will be empty (and table_size == 0) when the network string +/* FIXME: table will be empty (and table_size == 0) when the network string * from poe does not contain "us". * (See man poe: -euilib or MP_EUILIB) */ diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index b108788307..d4f2f303ba 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -74,6 +74,7 @@ typedef struct nrt_tableinfo { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; nrt_network_id_t network_id; + char protocol_name[NRT_MAX_PROTO_NAME_LEN]; /* MPI, LAPI, UPC, etc. */ /* FIXME: Need to populate, un/pack, and free this data structure */ nrt_comm_table_t *comm_table_ptr; } nrt_tableinfo_t; -- GitLab From ae69df75edd767c483ab99f6f1f13050870b5846 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 14 Jun 2012 16:00:40 -0700 Subject: [PATCH 425/614] switch/nrt add table_id and context_id infrastructure for NRT APIs --- src/plugins/switch/nrt/nrt.c | 19 ++++++++++++++----- src/plugins/switch/nrt/nrt_keys.h | 6 ++++-- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 2f0fbac8e9..d0381d8f31 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -896,7 +896,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, tableinfo[adapters_set].network_id = adapter->network_id; strncpy(tableinfo[adapters_set].protocol_name, protocol_name, NRT_MAX_PROTO_NAME_LEN); - +/* FIXME: Need to set context_id & table_id */ + tableinfo[adapters_set].context_id = 0; + tableinfo[adapters_set].table_id = adapters_set; adapters_set++; } @@ -1040,6 +1042,9 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, tableinfo[0].network_id = adapter->network_id; strncpy(tableinfo[0].protocol_name, protocol_name, NRT_MAX_PROTO_NAME_LEN); +/* FIXME: Need to set context_id & table_id */ + tableinfo[0].context_id = 0; + tableinfo[0].table_id = 0; return SLURM_SUCCESS; } @@ -1340,8 +1345,10 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" adapter_name: %s", j->tableinfo[i].adapter_name); info(" adapter_type: %s", _adapter_type_str(j->tableinfo[i].adapter_type)); + info(" context_id: %u", j->tableinfo[i].context_id); info(" network_id: %lu", j->tableinfo[i].network_id); info(" protocol_name: %s", j->tableinfo[i].protocol_name); + info(" table_id: %u", j->tableinfo[i].table_id); if (j->user_space) adapter_type = j->tableinfo[i].adapter_type; else @@ -2372,10 +2379,12 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) packmem(tableinfo->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); adapter_type = tableinfo->adapter_type; pack32(adapter_type, buf); + pack16(tableinfo->context_id, buf); pack64(tableinfo->network_id, buf); packmem(tableinfo->protocol_name, NRT_MAX_PROTO_NAME_LEN, buf); if (!jp->user_space) adapter_type = NRT_IPONLY; + pack16(tableinfo->table_id, buf); pack32(tableinfo->table_length, buf); if (adapter_type == NRT_IB) { @@ -2489,6 +2498,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) memcpy(tableinfo->adapter_name, name_ptr, tmp_32); safe_unpack32(&adapter_type, buf); tableinfo->adapter_type = (int) adapter_type; + safe_unpack16(&tableinfo->context_id, buf); safe_unpack64(&tableinfo->network_id, buf); safe_unpackmem_ptr(&name_ptr, &tmp_32, buf); if (tmp_32 != NRT_MAX_PROTO_NAME_LEN) @@ -2497,6 +2507,7 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) ip_v4 = jp->ip_v4; if (!jp->user_space) adapter_type = NRT_IPONLY; + safe_unpack16(&tableinfo->table_id, buf); safe_unpack32(&tableinfo->table_length, buf); if (adapter_type == NRT_IB) { @@ -3024,10 +3035,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.is_ipv4 = 0; table_info.is_user_space = 0; } -/* FIXME: Need to set context_id here */ - table_info.context_id = 0; -/* FIXME: Need to set table_id here */ - table_info.table_id = 0; + table_info.context_id = jp->tableinfo[i].context_id; + table_info.table_id = jp->tableinfo[i].table_id; if (job_name) { char *sep = strrchr(job_name,'/'); if (sep) diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index d4f2f303ba..7cfcc9d538 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -69,12 +69,14 @@ typedef struct nrt_comm_table { } nrt_comm_table_t; typedef struct nrt_tableinfo { - uint32_t table_length; - void *table; /* Pointer to nrt_*_task_info_t */ char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; + nrt_context_id_t context_id; nrt_network_id_t network_id; char protocol_name[NRT_MAX_PROTO_NAME_LEN]; /* MPI, LAPI, UPC, etc. */ + nrt_table_id_t table_id; + uint32_t table_length; + void *table; /* Pointer to nrt_*_task_info_t */ /* FIXME: Need to populate, un/pack, and free this data structure */ nrt_comm_table_t *comm_table_ptr; } nrt_tableinfo_t; -- GitLab From 53b3ce0affa1ea57ad9a8153a792288bea782279 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 11 Jun 2012 16:40:39 -0700 Subject: [PATCH 426/614] Make libsrun so we can easily compile against it for the poe plugin --- configure | 3 +- configure.ac | 1 + src/plugins/launch/poe/launch_poe.c | 2 +- src/plugins/launch/slurm/launch_slurm.c | 6 +- src/plugins/mpi/pmi2/setup.h | 4 +- src/plugins/switch/nrt/libpermapi/Makefile.am | 25 +- src/plugins/switch/nrt/libpermapi/Makefile.in | 99 +-- src/plugins/switch/nrt/libpermapi/shr_64.c | 9 +- src/srun/Makefile.am | 32 +- src/srun/Makefile.in | 275 +++++--- src/srun/libsrun/Makefile.am | 29 + src/srun/libsrun/Makefile.in | 631 ++++++++++++++++++ src/srun/{ => libsrun}/allocate.c | 6 +- src/srun/{ => libsrun}/allocate.h | 2 +- src/srun/{ => libsrun}/debugger.c | 4 +- src/srun/{ => libsrun}/debugger.h | 2 +- src/srun/{ => libsrun}/fname.c | 6 +- src/srun/{ => libsrun}/fname.h | 2 +- src/srun/{ => libsrun}/launch.c | 2 +- src/srun/{ => libsrun}/launch.h | 6 +- src/srun/{ => libsrun}/multi_prog.c | 5 +- src/srun/{ => libsrun}/multi_prog.h | 0 src/srun/{ => libsrun}/opt.c | 8 +- src/srun/{ => libsrun}/opt.h | 3 +- src/srun/{ => libsrun}/srun_job.c | 11 +- src/srun/{ => libsrun}/srun_job.h | 0 src/srun/srun.c | 12 +- src/srun/srun_pty.c | 4 +- src/srun/srun_pty.h | 2 +- 29 files changed, 938 insertions(+), 253 deletions(-) create mode 100644 src/srun/libsrun/Makefile.am create mode 100644 src/srun/libsrun/Makefile.in rename src/srun/{ => libsrun}/allocate.c (99%) rename src/srun/{ => libsrun}/allocate.h (99%) rename src/srun/{ => libsrun}/debugger.c (98%) rename src/srun/{ => libsrun}/debugger.h (99%) rename src/srun/{ => libsrun}/fname.c (97%) rename src/srun/{ => libsrun}/fname.h (98%) rename src/srun/{ => libsrun}/launch.c (99%) rename src/srun/{ => libsrun}/launch.h (97%) rename src/srun/{ => libsrun}/multi_prog.c (99%) rename src/srun/{ => libsrun}/multi_prog.h (100%) rename src/srun/{ => libsrun}/opt.c (99%) rename src/srun/{ => libsrun}/opt.h (99%) rename src/srun/{ => libsrun}/srun_job.c (99%) rename src/srun/{ => libsrun}/srun_job.h (100%) diff --git a/configure b/configure index 3a2d6e911c..c068457ca2 100755 --- a/configure +++ b/configure @@ -22183,7 +22183,7 @@ fi -ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sdiag/Makefile src/sprio/Makefile src/srun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/cgroup/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile src/plugins/launch/runjob/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/select/serial/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/mpi/pmi2/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html doc/html/configurator.easy.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" +ac_config_files="$ac_config_files Makefile config.xml auxdir/Makefile contribs/Makefile contribs/arrayrun/Makefile contribs/cray/Makefile contribs/lua/Makefile contribs/pam/Makefile contribs/perlapi/Makefile contribs/perlapi/libslurm/Makefile contribs/perlapi/libslurm/perl/Makefile.PL contribs/perlapi/libslurmdb/Makefile contribs/perlapi/libslurmdb/perl/Makefile.PL contribs/torque/Makefile contribs/phpext/Makefile contribs/phpext/slurm_php/config.m4 contribs/sjobexit/Makefile contribs/slurmdb-direct/Makefile src/Makefile src/api/Makefile src/common/Makefile src/db_api/Makefile src/database/Makefile src/sacct/Makefile src/sacctmgr/Makefile src/sreport/Makefile src/sstat/Makefile src/sshare/Makefile src/salloc/Makefile src/sbatch/Makefile src/sattach/Makefile src/sdiag/Makefile src/sprio/Makefile src/srun/Makefile src/srun/libsrun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile src/slurmd/slurmd/Makefile src/slurmd/slurmstepd/Makefile src/slurmdbd/Makefile src/slurmctld/Makefile src/sbcast/Makefile src/scontrol/Makefile src/scancel/Makefile src/squeue/Makefile src/sinfo/Makefile src/smap/Makefile src/strigger/Makefile src/sview/Makefile src/plugins/Makefile src/plugins/accounting_storage/Makefile src/plugins/accounting_storage/common/Makefile src/plugins/accounting_storage/filetxt/Makefile src/plugins/accounting_storage/mysql/Makefile src/plugins/accounting_storage/pgsql/Makefile src/plugins/accounting_storage/none/Makefile src/plugins/accounting_storage/slurmdbd/Makefile src/plugins/auth/Makefile src/plugins/auth/authd/Makefile src/plugins/auth/munge/Makefile src/plugins/auth/none/Makefile src/plugins/checkpoint/Makefile src/plugins/checkpoint/aix/Makefile src/plugins/checkpoint/none/Makefile src/plugins/checkpoint/ompi/Makefile src/plugins/checkpoint/blcr/Makefile src/plugins/checkpoint/blcr/cr_checkpoint.sh src/plugins/checkpoint/blcr/cr_restart.sh src/plugins/crypto/Makefile src/plugins/crypto/munge/Makefile src/plugins/crypto/openssl/Makefile src/plugins/gres/Makefile src/plugins/gres/gpu/Makefile src/plugins/gres/nic/Makefile src/plugins/jobacct_gather/Makefile src/plugins/jobacct_gather/linux/Makefile src/plugins/jobacct_gather/aix/Makefile src/plugins/jobacct_gather/cgroup/Makefile src/plugins/jobacct_gather/none/Makefile src/plugins/jobcomp/Makefile src/plugins/jobcomp/filetxt/Makefile src/plugins/jobcomp/none/Makefile src/plugins/jobcomp/script/Makefile src/plugins/jobcomp/mysql/Makefile src/plugins/jobcomp/pgsql/Makefile src/plugins/job_submit/Makefile src/plugins/job_submit/cnode/Makefile src/plugins/job_submit/defaults/Makefile src/plugins/job_submit/logging/Makefile src/plugins/job_submit/lua/Makefile src/plugins/job_submit/partition/Makefile src/plugins/launch/Makefile src/plugins/launch/poe/Makefile src/plugins/launch/runjob/Makefile src/plugins/launch/slurm/Makefile src/plugins/preempt/Makefile src/plugins/preempt/none/Makefile src/plugins/preempt/partition_prio/Makefile src/plugins/preempt/qos/Makefile src/plugins/priority/Makefile src/plugins/priority/basic/Makefile src/plugins/priority/multifactor/Makefile src/plugins/proctrack/Makefile src/plugins/proctrack/aix/Makefile src/plugins/proctrack/cgroup/Makefile src/plugins/proctrack/pgid/Makefile src/plugins/proctrack/linuxproc/Makefile src/plugins/proctrack/sgi_job/Makefile src/plugins/proctrack/lua/Makefile src/plugins/sched/Makefile src/plugins/sched/backfill/Makefile src/plugins/sched/builtin/Makefile src/plugins/sched/hold/Makefile src/plugins/sched/wiki/Makefile src/plugins/sched/wiki2/Makefile src/plugins/select/Makefile src/plugins/select/bluegene/Makefile src/plugins/select/bluegene/ba/Makefile src/plugins/select/bluegene/ba_bgq/Makefile src/plugins/select/bluegene/bl/Makefile src/plugins/select/bluegene/bl_bgq/Makefile src/plugins/select/bluegene/sfree/Makefile src/plugins/select/cons_res/Makefile src/plugins/select/cray/Makefile src/plugins/select/cray/libalps/Makefile src/plugins/select/cray/libemulate/Makefile src/plugins/select/linear/Makefile src/plugins/select/serial/Makefile src/plugins/switch/Makefile src/plugins/switch/none/Makefile src/plugins/switch/nrt/Makefile src/plugins/switch/nrt/libpermapi/Makefile src/plugins/mpi/Makefile src/plugins/mpi/mpich1_p4/Makefile src/plugins/mpi/mpich1_shmem/Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mpichmx/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile src/plugins/mpi/none/Makefile src/plugins/mpi/openmpi/Makefile src/plugins/mpi/pmi2/Makefile src/plugins/task/Makefile src/plugins/task/affinity/Makefile src/plugins/task/cgroup/Makefile src/plugins/task/none/Makefile src/plugins/topology/Makefile src/plugins/topology/3d_torus/Makefile src/plugins/topology/node_rank/Makefile src/plugins/topology/none/Makefile src/plugins/topology/tree/Makefile doc/Makefile doc/man/Makefile doc/man/man1/Makefile doc/man/man3/Makefile doc/man/man5/Makefile doc/man/man8/Makefile doc/html/Makefile doc/html/configurator.html doc/html/configurator.easy.html testsuite/Makefile testsuite/expect/Makefile testsuite/slurm_unit/Makefile testsuite/slurm_unit/api/Makefile testsuite/slurm_unit/api/manual/Makefile testsuite/slurm_unit/common/Makefile" cat >confcache <<\_ACEOF @@ -23489,6 +23489,7 @@ do "src/sdiag/Makefile") CONFIG_FILES="$CONFIG_FILES src/sdiag/Makefile" ;; "src/sprio/Makefile") CONFIG_FILES="$CONFIG_FILES src/sprio/Makefile" ;; "src/srun/Makefile") CONFIG_FILES="$CONFIG_FILES src/srun/Makefile" ;; + "src/srun/libsrun/Makefile") CONFIG_FILES="$CONFIG_FILES src/srun/libsrun/Makefile" ;; "src/srun_cr/Makefile") CONFIG_FILES="$CONFIG_FILES src/srun_cr/Makefile" ;; "src/slurmd/Makefile") CONFIG_FILES="$CONFIG_FILES src/slurmd/Makefile" ;; "src/slurmd/common/Makefile") CONFIG_FILES="$CONFIG_FILES src/slurmd/common/Makefile" ;; diff --git a/configure.ac b/configure.ac index f5c55429f2..3c02b3baff 100644 --- a/configure.ac +++ b/configure.ac @@ -429,6 +429,7 @@ AC_CONFIG_FILES([Makefile src/sdiag/Makefile src/sprio/Makefile src/srun/Makefile + src/srun/libsrun/Makefile src/srun_cr/Makefile src/slurmd/Makefile src/slurmd/common/Makefile diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index 0829e0c1e2..bb77c1b5c3 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -44,7 +44,7 @@ #include #include -#include "src/srun/launch.h" +#include "src/srun/libsrun/launch.h" #include "src/common/env.h" /* * These variables are required by the generic plugin interface. If they diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 3cb65769ff..218ef81e87 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -44,9 +44,9 @@ #include #include "src/api/pmi_server.h" -#include "src/srun/allocate.h" -#include "src/srun/launch.h" -#include "src/srun/multi_prog.h" +#include "src/srun/libsrun/allocate.h" +#include "src/srun/libsrun/launch.h" +#include "src/srun/libsrun/multi_prog.h" #include "src/plugins/launch/slurm/task_state.h" diff --git a/src/plugins/mpi/pmi2/setup.h b/src/plugins/mpi/pmi2/setup.h index 2c28314c49..ad24da0118 100644 --- a/src/plugins/mpi/pmi2/setup.h +++ b/src/plugins/mpi/pmi2/setup.h @@ -59,8 +59,8 @@ #include "src/slurmd/slurmstepd/slurmstepd_job.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" +#include "src/srun/libsrun/srun_job.h" +#include "src/srun/libsrun/opt.h" #include "tree.h" diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.am b/src/plugins/switch/nrt/libpermapi/Makefile.am index 6a3e098dd8..50614fff15 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.am +++ b/src/plugins/switch/nrt/libpermapi/Makefile.am @@ -1,11 +1,11 @@ # Makefile.am for libpermapi for poe to interface with AUTOMAKE_OPTIONS = foreign -CLEANFILES = core.* PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/srun/libsrun # making a .la @@ -13,24 +13,13 @@ pkglib_LTLIBRARIES = libpermapi.la CPPFLAGS = -DMYSELF_SO=\"$(libdir)/slurm/libpermapi.so\" -convenience_libs = \ - $(top_builddir)/src/api/libslurm.o -lpthread $(DL_LIBS) +libpermapi_la_SOURCES = shr_64.c -srun_dir = $(top_srcdir)/src/srun +libpermapi_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(DL_LIBS) -libpermapi_la_SOURCES = shr_64.c \ - $(srun_dir)/opt.c \ - $(srun_dir)/srun_job.c \ - $(srun_dir)/srun_pty.c \ - $(srun_dir)/debugger.c \ - $(srun_dir)/fname.c \ - $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c \ - $(srun_dir)/launch.c - -libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ - $(convenience_libs) +libpermapi_la_LIBADD = $(top_builddir)/src/srun/libsrun/libsrun.la \ + $(top_builddir)/src/api/libslurmhelper.la force: -$(convenience_libs) : force +$(libpermapi_la_LIBADD) : force @cd `dirname $@` && $(MAKE) `basename $@` diff --git a/src/plugins/switch/nrt/libpermapi/Makefile.in b/src/plugins/switch/nrt/libpermapi/Makefile.in index be9433cc73..3200a4e5ba 100644 --- a/src/plugins/switch/nrt/libpermapi/Makefile.in +++ b/src/plugins/switch/nrt/libpermapi/Makefile.in @@ -112,9 +112,10 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(pkglibdir)" LTLIBRARIES = $(pkglib_LTLIBRARIES) -libpermapi_la_LIBADD = -am_libpermapi_la_OBJECTS = shr_64.lo opt.lo srun_job.lo srun_pty.lo \ - debugger.lo fname.lo allocate.lo multi_prog.lo launch.lo +libpermapi_la_DEPENDENCIES = \ + $(top_builddir)/src/srun/libsrun/libsrun.la \ + $(top_builddir)/src/api/libslurmhelper.la +am_libpermapi_la_OBJECTS = shr_64.lo libpermapi_la_OBJECTS = $(am_libpermapi_la_OBJECTS) libpermapi_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -339,28 +340,17 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AUTOMAKE_OPTIONS = foreign -CLEANFILES = core.* PLUGIN_FLAGS = -module -avoid-version --export-dynamic -INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common \ + -I$(top_srcdir)/src/srun/libsrun + # making a .la pkglib_LTLIBRARIES = libpermapi.la -convenience_libs = \ - $(top_builddir)/src/api/libslurm.o -lpthread $(DL_LIBS) - -srun_dir = $(top_srcdir)/src/srun -libpermapi_la_SOURCES = shr_64.c \ - $(srun_dir)/opt.c \ - $(srun_dir)/srun_job.c \ - $(srun_dir)/srun_pty.c \ - $(srun_dir)/debugger.c \ - $(srun_dir)/fname.c \ - $(srun_dir)/allocate.c \ - $(srun_dir)/multi_prog.c \ - $(srun_dir)/launch.c - -libpermapi_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ - $(convenience_libs) +libpermapi_la_SOURCES = shr_64.c +libpermapi_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) $(DL_LIBS) +libpermapi_la_LIBADD = $(top_builddir)/src/srun/libsrun/libsrun.la \ + $(top_builddir)/src/api/libslurmhelper.la all: all-am @@ -436,15 +426,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shr_64.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_pty.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -467,62 +449,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< -opt.lo: $(srun_dir)/opt.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT opt.lo -MD -MP -MF $(DEPDIR)/opt.Tpo -c -o opt.lo `test -f '$(srun_dir)/opt.c' || echo '$(srcdir)/'`$(srun_dir)/opt.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/opt.Tpo $(DEPDIR)/opt.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/opt.c' object='opt.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o opt.lo `test -f '$(srun_dir)/opt.c' || echo '$(srcdir)/'`$(srun_dir)/opt.c - -srun_job.lo: $(srun_dir)/srun_job.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srun_job.lo -MD -MP -MF $(DEPDIR)/srun_job.Tpo -c -o srun_job.lo `test -f '$(srun_dir)/srun_job.c' || echo '$(srcdir)/'`$(srun_dir)/srun_job.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/srun_job.Tpo $(DEPDIR)/srun_job.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/srun_job.c' object='srun_job.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srun_job.lo `test -f '$(srun_dir)/srun_job.c' || echo '$(srcdir)/'`$(srun_dir)/srun_job.c - -srun_pty.lo: $(srun_dir)/srun_pty.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT srun_pty.lo -MD -MP -MF $(DEPDIR)/srun_pty.Tpo -c -o srun_pty.lo `test -f '$(srun_dir)/srun_pty.c' || echo '$(srcdir)/'`$(srun_dir)/srun_pty.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/srun_pty.Tpo $(DEPDIR)/srun_pty.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/srun_pty.c' object='srun_pty.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o srun_pty.lo `test -f '$(srun_dir)/srun_pty.c' || echo '$(srcdir)/'`$(srun_dir)/srun_pty.c - -debugger.lo: $(srun_dir)/debugger.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debugger.lo -MD -MP -MF $(DEPDIR)/debugger.Tpo -c -o debugger.lo `test -f '$(srun_dir)/debugger.c' || echo '$(srcdir)/'`$(srun_dir)/debugger.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/debugger.Tpo $(DEPDIR)/debugger.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/debugger.c' object='debugger.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debugger.lo `test -f '$(srun_dir)/debugger.c' || echo '$(srcdir)/'`$(srun_dir)/debugger.c - -fname.lo: $(srun_dir)/fname.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fname.lo -MD -MP -MF $(DEPDIR)/fname.Tpo -c -o fname.lo `test -f '$(srun_dir)/fname.c' || echo '$(srcdir)/'`$(srun_dir)/fname.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/fname.Tpo $(DEPDIR)/fname.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/fname.c' object='fname.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fname.lo `test -f '$(srun_dir)/fname.c' || echo '$(srcdir)/'`$(srun_dir)/fname.c - -allocate.lo: $(srun_dir)/allocate.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT allocate.lo -MD -MP -MF $(DEPDIR)/allocate.Tpo -c -o allocate.lo `test -f '$(srun_dir)/allocate.c' || echo '$(srcdir)/'`$(srun_dir)/allocate.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/allocate.Tpo $(DEPDIR)/allocate.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/allocate.c' object='allocate.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o allocate.lo `test -f '$(srun_dir)/allocate.c' || echo '$(srcdir)/'`$(srun_dir)/allocate.c - -multi_prog.lo: $(srun_dir)/multi_prog.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT multi_prog.lo -MD -MP -MF $(DEPDIR)/multi_prog.Tpo -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/multi_prog.Tpo $(DEPDIR)/multi_prog.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/multi_prog.c' object='multi_prog.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o multi_prog.lo `test -f '$(srun_dir)/multi_prog.c' || echo '$(srcdir)/'`$(srun_dir)/multi_prog.c - -launch.lo: $(srun_dir)/launch.c -@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT launch.lo -MD -MP -MF $(DEPDIR)/launch.Tpo -c -o launch.lo `test -f '$(srun_dir)/launch.c' || echo '$(srcdir)/'`$(srun_dir)/launch.c -@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/launch.Tpo $(DEPDIR)/launch.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(srun_dir)/launch.c' object='launch.lo' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o launch.lo `test -f '$(srun_dir)/launch.c' || echo '$(srcdir)/'`$(srun_dir)/launch.c - mostlyclean-libtool: -rm -f *.lo @@ -640,7 +566,6 @@ install-strip: mostlyclean-generic: clean-generic: - -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) @@ -738,7 +663,7 @@ uninstall-am: uninstall-pkglibLTLIBRARIES force: -$(convenience_libs) : force +$(libpermapi_la_LIBADD) : force @cd `dirname $@` && $(MAKE) `basename $@` # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index edda1b1dde..79065da748 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -55,13 +55,14 @@ #include "src/common/hostlist.h" #include "src/common/plugstack.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" -#include "src/srun/allocate.h" -#include "src/srun/launch.h" +#include "src/srun/libsrun/srun_job.h" +#include "src/srun/libsrun/opt.h" +#include "src/srun/libsrun/allocate.h" +#include "src/srun/libsrun/launch.h" #include "src/plugins/switch/nrt/nrt_keys.h" bool srun_max_timer = false; +bool srun_shutdown = false; static void *my_handle = NULL; static srun_job_t *job = NULL; diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 869e028cf1..2098245a26 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -1,35 +1,22 @@ # +SUBDIRS = libsrun + AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* -INCLUDES = -I$(top_srcdir) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun bin_PROGRAMS = srun +convenience_libs = $(top_builddir)/src/srun/libsrun/libsrun.la \ + $(top_builddir)/src/api/libslurm.o + srun_SOURCES = \ srun.c \ - opt.c opt.h \ - srun_job.c srun_job.h \ srun_pty.c srun_pty.h \ - debugger.h \ - debugger.c \ - fname.c \ - fname.h \ - allocate.c \ - allocate.h \ - launch.c launch.h \ - multi_prog.c multi_prog.h \ srun.wrapper.c - - -# pthread is needed for compiling with g++ (which is used for linking -# no matter if on a BGQ or not because of mentioning a .cc file -convenience_libs = \ - $(top_builddir)/src/api/libslurm.o -lpthread $(DL_LIBS) - -srun_LDADD = \ - $(convenience_libs) +srun_LDADD = $(convenience_libs) $(DL_LIBS) srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) @@ -43,11 +30,6 @@ force: $(convenience_libs) : force @cd `dirname $@` && $(MAKE) `basename $@` -# debugging information is required for symbols in the debugger -# module so that a debugger can debugger to spawned tasks -debugger.o : debugger.c - $(COMPILE) -c -g -o debugger.o $(srcdir)/debugger.c - install-exec-local: umask 022; \ if [ -x /usr/lib/rpm/debugedit ]; then \ diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 2f377116b5..65f0fd6cc1 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -90,15 +90,11 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_srun_OBJECTS = srun.$(OBJEXT) opt.$(OBJEXT) srun_job.$(OBJEXT) \ - srun_pty.$(OBJEXT) debugger.$(OBJEXT) fname.$(OBJEXT) \ - allocate.$(OBJEXT) launch.$(OBJEXT) multi_prog.$(OBJEXT) \ +am_srun_OBJECTS = srun.$(OBJEXT) srun_pty.$(OBJEXT) \ srun.wrapper.$(OBJEXT) srun_OBJECTS = $(am_srun_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) -srun_DEPENDENCIES = $(am__DEPENDENCIES_2) +srun_DEPENDENCIES = $(convenience_libs) $(am__DEPENDENCIES_1) srun_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(srun_LDFLAGS) \ $(LDFLAGS) -o $@ @@ -117,9 +113,47 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(srun_SOURCES) DIST_SOURCES = $(srun_SOURCES) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-dvi-recursive install-exec-recursive \ + install-html-recursive install-info-recursive \ + install-pdf-recursive install-ps-recursive install-recursive \ + installcheck-recursive installdirs-recursive pdf-recursive \ + ps-recursive uninstall-recursive +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ + $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ + distdir ETAGS = etags CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ @@ -321,35 +355,21 @@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ +SUBDIRS = libsrun AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* -INCLUDES = -I$(top_srcdir) +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun +convenience_libs = $(top_builddir)/src/srun/libsrun/libsrun.la \ + $(top_builddir)/src/api/libslurm.o + srun_SOURCES = \ srun.c \ - opt.c opt.h \ - srun_job.c srun_job.h \ srun_pty.c srun_pty.h \ - debugger.h \ - debugger.c \ - fname.c \ - fname.h \ - allocate.c \ - allocate.h \ - launch.c launch.h \ - multi_prog.c multi_prog.h \ srun.wrapper.c - -# pthread is needed for compiling with g++ (which is used for linking -# no matter if on a BGQ or not because of mentioning a .cc file -convenience_libs = \ - $(top_builddir)/src/api/libslurm.o -lpthread $(DL_LIBS) - -srun_LDADD = \ - $(convenience_libs) - +srun_LDADD = $(convenience_libs) $(DL_LIBS) srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(am__append_1) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj @@ -436,15 +456,8 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun.wrapper.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_pty.Po@am__quote@ .c.o: @@ -474,6 +487,76 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +$(RECURSIVE_CLEAN_TARGETS): + @fail= failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -484,10 +567,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -506,7 +602,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ fi; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -556,22 +652,51 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(PROGRAMS) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ @@ -594,102 +719,100 @@ distclean-generic: maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive html-am: -info: info-am +info: info-recursive info-am: install-data-am: -install-dvi: install-dvi-am +install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-exec-local -install-html: install-html-am +install-html: install-html-recursive install-html-am: -install-info: install-info-am +install-info: install-info-recursive install-info-am: install-man: -install-pdf: install-pdf-am +install-pdf: install-pdf-recursive install-pdf-am: -install-ps: install-ps-am +install-ps: install-ps-recursive install-ps-am: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-binPROGRAMS install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-exec-local \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ +.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ + install-am install-strip tags-recursive + +.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ + all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-exec-local install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ - uninstall-am uninstall-binPROGRAMS + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS force: $(convenience_libs) : force @cd `dirname $@` && $(MAKE) `basename $@` -# debugging information is required for symbols in the debugger -# module so that a debugger can debugger to spawned tasks -debugger.o : debugger.c - $(COMPILE) -c -g -o debugger.o $(srcdir)/debugger.c - install-exec-local: umask 022; \ if [ -x /usr/lib/rpm/debugedit ]; then \ diff --git a/src/srun/libsrun/Makefile.am b/src/srun/libsrun/Makefile.am new file mode 100644 index 0000000000..ca7144c5c0 --- /dev/null +++ b/src/srun/libsrun/Makefile.am @@ -0,0 +1,29 @@ +# + +AUTOMAKE_OPTIONS = foreign +CLEANFILES = core.* + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun + +noinst_LTLIBRARIES = libsrun.la + +libsrun_la_SOURCES = \ + allocate.c allocate.h \ + debugger.c debugger.h \ + fname.c fname.h \ + launch.c launch.h \ + multi_prog.c multi_prog.h \ + opt.c opt.h \ + srun_job.c srun_job.h +libsrun_la_LIBADD = $(DL_LIBS) +libsrun_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic + +force: +$(convenience_libs) : force + @cd `dirname $@` && $(MAKE) `basename $@` + +# debugging information is required for symbols in the debugger +# module so that a debugger can debugger to spawned tasks +debugger.o : debugger.c + $(COMPILE) -c -g -o debugger.o $(srcdir)/debugger.c + diff --git a/src/srun/libsrun/Makefile.in b/src/srun/libsrun/Makefile.in new file mode 100644 index 0000000000..217f870f0f --- /dev/null +++ b/src/srun/libsrun/Makefile.in @@ -0,0 +1,631 @@ +# Makefile.in generated by automake 1.11.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = src/srun/libsrun +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/auxdir/acx_pthread.m4 \ + $(top_srcdir)/auxdir/libtool.m4 \ + $(top_srcdir)/auxdir/ltoptions.m4 \ + $(top_srcdir)/auxdir/ltsugar.m4 \ + $(top_srcdir)/auxdir/ltversion.m4 \ + $(top_srcdir)/auxdir/lt~obsolete.m4 \ + $(top_srcdir)/auxdir/slurm.m4 \ + $(top_srcdir)/auxdir/x_ac__system_configuration.m4 \ + $(top_srcdir)/auxdir/x_ac_affinity.m4 \ + $(top_srcdir)/auxdir/x_ac_aix.m4 \ + $(top_srcdir)/auxdir/x_ac_blcr.m4 \ + $(top_srcdir)/auxdir/x_ac_bluegene.m4 \ + $(top_srcdir)/auxdir/x_ac_cflags.m4 \ + $(top_srcdir)/auxdir/x_ac_cray.m4 \ + $(top_srcdir)/auxdir/x_ac_databases.m4 \ + $(top_srcdir)/auxdir/x_ac_debug.m4 \ + $(top_srcdir)/auxdir/x_ac_dlfcn.m4 \ + $(top_srcdir)/auxdir/x_ac_env.m4 \ + $(top_srcdir)/auxdir/x_ac_gpl_licensed.m4 \ + $(top_srcdir)/auxdir/x_ac_hwloc.m4 \ + $(top_srcdir)/auxdir/x_ac_iso.m4 \ + $(top_srcdir)/auxdir/x_ac_lua.m4 \ + $(top_srcdir)/auxdir/x_ac_man2html.m4 \ + $(top_srcdir)/auxdir/x_ac_munge.m4 \ + $(top_srcdir)/auxdir/x_ac_ncurses.m4 \ + $(top_srcdir)/auxdir/x_ac_nrt.m4 \ + $(top_srcdir)/auxdir/x_ac_pam.m4 \ + $(top_srcdir)/auxdir/x_ac_printf_null.m4 \ + $(top_srcdir)/auxdir/x_ac_ptrace.m4 \ + $(top_srcdir)/auxdir/x_ac_readline.m4 \ + $(top_srcdir)/auxdir/x_ac_setpgrp.m4 \ + $(top_srcdir)/auxdir/x_ac_setproctitle.m4 \ + $(top_srcdir)/auxdir/x_ac_sgi_job.m4 \ + $(top_srcdir)/auxdir/x_ac_slurm_ssl.m4 \ + $(top_srcdir)/auxdir/x_ac_srun.m4 \ + $(top_srcdir)/auxdir/x_ac_sun_const.m4 \ + $(top_srcdir)/auxdir/x_ac_xcpu.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h $(top_builddir)/slurm/slurm.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +LTLIBRARIES = $(noinst_LTLIBRARIES) +am__DEPENDENCIES_1 = +libsrun_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +am_libsrun_la_OBJECTS = allocate.lo debugger.lo fname.lo launch.lo \ + multi_prog.lo opt.lo srun_job.lo +libsrun_la_OBJECTS = $(am_libsrun_la_OBJECTS) +libsrun_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(libsrun_la_LDFLAGS) $(LDFLAGS) -o $@ +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/slurm +depcomp = $(SHELL) $(top_srcdir)/auxdir/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ + $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ + --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ + $(LDFLAGS) -o $@ +SOURCES = $(libsrun_la_SOURCES) +DIST_SOURCES = $(libsrun_la_SOURCES) +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AR = @AR@ +AUTHD_CFLAGS = @AUTHD_CFLAGS@ +AUTHD_LIBS = @AUTHD_LIBS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BGL_LOADED = @BGL_LOADED@ +BGQ_LOADED = @BGQ_LOADED@ +BG_INCLUDES = @BG_INCLUDES@ +BG_LDFLAGS = @BG_LDFLAGS@ +BG_L_P_LOADED = @BG_L_P_LOADED@ +BLCR_CPPFLAGS = @BLCR_CPPFLAGS@ +BLCR_HOME = @BLCR_HOME@ +BLCR_LDFLAGS = @BLCR_LDFLAGS@ +BLCR_LIBS = @BLCR_LIBS@ +BLUEGENE_LOADED = @BLUEGENE_LOADED@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CMD_LDFLAGS = @CMD_LDFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DL_LIBS = @DL_LIBS@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +HAVEMYSQLCONFIG = @HAVEMYSQLCONFIG@ +HAVEPGCONFIG = @HAVEPGCONFIG@ +HAVE_AIX = @HAVE_AIX@ +HAVE_MAN2HTML = @HAVE_MAN2HTML@ +HAVE_NRT = @HAVE_NRT@ +HAVE_OPENSSL = @HAVE_OPENSSL@ +HAVE_SOME_CURSES = @HAVE_SOME_CURSES@ +HWLOC_CPPFLAGS = @HWLOC_CPPFLAGS@ +HWLOC_LDFLAGS = @HWLOC_LDFLAGS@ +HWLOC_LIBS = @HWLOC_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_LDFLAGS = @LIB_LDFLAGS@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +MUNGE_CPPFLAGS = @MUNGE_CPPFLAGS@ +MUNGE_LDFLAGS = @MUNGE_LDFLAGS@ +MUNGE_LIBS = @MUNGE_LIBS@ +MYSQL_CFLAGS = @MYSQL_CFLAGS@ +MYSQL_LIBS = @MYSQL_LIBS@ +NCURSES = @NCURSES@ +NM = @NM@ +NMEDIT = @NMEDIT@ +NRT_CPPFLAGS = @NRT_CPPFLAGS@ +NRT_LDFLAGS = @NRT_LDFLAGS@ +NUMA_LIBS = @NUMA_LIBS@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PAM_DIR = @PAM_DIR@ +PAM_LIBS = @PAM_LIBS@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PGSQL_CFLAGS = @PGSQL_CFLAGS@ +PGSQL_LIBS = @PGSQL_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ +PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ +PROCTRACKDIR = @PROCTRACKDIR@ +PROJECT = @PROJECT@ +PTHREAD_CC = @PTHREAD_CC@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +RANLIB = @RANLIB@ +READLINE_LIBS = @READLINE_LIBS@ +REAL_BGQ_LOADED = @REAL_BGQ_LOADED@ +REAL_BG_L_P_LOADED = @REAL_BG_L_P_LOADED@ +RELEASE = @RELEASE@ +RUNJOB_LDFLAGS = @RUNJOB_LDFLAGS@ +SED = @SED@ +SEMAPHORE_LIBS = @SEMAPHORE_LIBS@ +SEMAPHORE_SOURCES = @SEMAPHORE_SOURCES@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SLURMCTLD_PORT = @SLURMCTLD_PORT@ +SLURMCTLD_PORT_COUNT = @SLURMCTLD_PORT_COUNT@ +SLURMDBD_PORT = @SLURMDBD_PORT@ +SLURMD_PORT = @SLURMD_PORT@ +SLURM_API_AGE = @SLURM_API_AGE@ +SLURM_API_CURRENT = @SLURM_API_CURRENT@ +SLURM_API_MAJOR = @SLURM_API_MAJOR@ +SLURM_API_REVISION = @SLURM_API_REVISION@ +SLURM_API_VERSION = @SLURM_API_VERSION@ +SLURM_MAJOR = @SLURM_MAJOR@ +SLURM_MICRO = @SLURM_MICRO@ +SLURM_MINOR = @SLURM_MINOR@ +SLURM_PREFIX = @SLURM_PREFIX@ +SLURM_VERSION_NUMBER = @SLURM_VERSION_NUMBER@ +SLURM_VERSION_STRING = @SLURM_VERSION_STRING@ +SO_LDFLAGS = @SO_LDFLAGS@ +SSL_CPPFLAGS = @SSL_CPPFLAGS@ +SSL_LDFLAGS = @SSL_LDFLAGS@ +SSL_LIBS = @SSL_LIBS@ +STRIP = @STRIP@ +UTIL_LIBS = @UTIL_LIBS@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +ac_have_man2html = @ac_have_man2html@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +lua_CFLAGS = @lua_CFLAGS@ +lua_LIBS = @lua_LIBS@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +AUTOMAKE_OPTIONS = foreign +CLEANFILES = core.* +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/srun/libsrun +noinst_LTLIBRARIES = libsrun.la +libsrun_la_SOURCES = \ + allocate.c allocate.h \ + debugger.c debugger.h \ + fname.c fname.h \ + launch.c launch.h \ + multi_prog.c multi_prog.h \ + opt.c opt.h \ + srun_job.c srun_job.h + +libsrun_la_LIBADD = $(DL_LIBS) +libsrun_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/srun/libsrun/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/srun/libsrun/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ + dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ + test "$$dir" != "$$p" || dir=.; \ + echo "rm -f \"$${dir}/so_locations\""; \ + rm -f "$${dir}/so_locations"; \ + done +libsrun.la: $(libsrun_la_OBJECTS) $(libsrun_la_DEPENDENCIES) $(EXTRA_libsrun_la_DEPENDENCIES) + $(libsrun_la_LINK) $(libsrun_la_OBJECTS) $(libsrun_la_LIBADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/allocate.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debugger.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fname.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/launch.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multi_prog.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/opt.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/srun_job.Plo@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(LTLIBRARIES) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ + mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstLTLIBRARIES ctags distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags uninstall uninstall-am + + +force: +$(convenience_libs) : force + @cd `dirname $@` && $(MAKE) `basename $@` + +# debugging information is required for symbols in the debugger +# module so that a debugger can debugger to spawned tasks +debugger.o : debugger.c + $(COMPILE) -c -g -o debugger.o $(srcdir)/debugger.c + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/src/srun/allocate.c b/src/srun/libsrun/allocate.c similarity index 99% rename from src/srun/allocate.c rename to src/srun/libsrun/allocate.c index 9b05a6a1ef..d5a7cd249e 100644 --- a/src/srun/allocate.c +++ b/src/srun/libsrun/allocate.c @@ -58,9 +58,9 @@ #include "src/common/env.h" #include "src/common/fd.h" -#include "src/srun/allocate.h" -#include "src/srun/opt.h" -#include "src/srun/launch.h" +#include "allocate.h" +#include "opt.h" +#include "launch.h" #ifdef HAVE_BG #include "src/common/node_select.h" diff --git a/src/srun/allocate.h b/src/srun/libsrun/allocate.h similarity index 99% rename from src/srun/allocate.h rename to src/srun/libsrun/allocate.h index c8002d9d82..b638badc0f 100644 --- a/src/srun/allocate.h +++ b/src/srun/libsrun/allocate.h @@ -42,7 +42,7 @@ #include "slurm/slurm.h" -#include "src/srun/srun_job.h" +#include "srun_job.h" typedef struct slurmctld_communication_addr { uint16_t port; diff --git a/src/srun/debugger.c b/src/srun/libsrun/debugger.c similarity index 98% rename from src/srun/debugger.c rename to src/srun/libsrun/debugger.c index e85675a545..2750557bdc 100644 --- a/src/srun/debugger.c +++ b/src/srun/libsrun/debugger.c @@ -50,8 +50,8 @@ #include "src/common/log.h" -#include "src/srun/debugger.h" -#include "src/srun/srun_job.h" +#include "debugger.h" +#include "srun_job.h" /* * Instantiate extern variables from debugger.h diff --git a/src/srun/debugger.h b/src/srun/libsrun/debugger.h similarity index 99% rename from src/srun/debugger.h rename to src/srun/libsrun/debugger.h index 53b57ecafe..b39c133003 100644 --- a/src/srun/debugger.h +++ b/src/srun/libsrun/debugger.h @@ -37,7 +37,7 @@ #endif #endif -#include "src/srun/srun_job.h" +#include "srun_job.h" /***************************************************************************** * DEBUGGING SUPPORT * *****************************************************************************/ diff --git a/src/srun/fname.c b/src/srun/libsrun/fname.c similarity index 97% rename from src/srun/fname.c rename to src/srun/libsrun/fname.c index a254049739..44d1bd14c7 100644 --- a/src/srun/fname.c +++ b/src/srun/libsrun/fname.c @@ -46,10 +46,8 @@ #include #include -#include "src/srun/fname.h" -#include "src/srun/opt.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" +#include "fname.h" +#include "opt.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" diff --git a/src/srun/fname.h b/src/srun/libsrun/fname.h similarity index 98% rename from src/srun/fname.h rename to src/srun/libsrun/fname.h index 67b1a3dba8..d5b07dabaf 100644 --- a/src/srun/fname.h +++ b/src/srun/libsrun/fname.h @@ -43,7 +43,7 @@ # include "config.h" #endif -#include "src/srun/srun_job.h" +#include "srun_job.h" /* * Create an filename from a (probably user supplied) filename format. diff --git a/src/srun/launch.c b/src/srun/libsrun/launch.c similarity index 99% rename from src/srun/launch.c rename to src/srun/libsrun/launch.c index 32c1644a0f..e674b9a68b 100644 --- a/src/srun/launch.c +++ b/src/srun/libsrun/launch.c @@ -36,7 +36,7 @@ #include #include -#include "src/srun/launch.h" +#include "launch.h" #include "src/common/env.h" #include "src/common/xstring.h" diff --git a/src/srun/launch.h b/src/srun/libsrun/launch.h similarity index 97% rename from src/srun/launch.h rename to src/srun/libsrun/launch.h index 4285e41b4a..6d67b13709 100644 --- a/src/srun/launch.h +++ b/src/srun/libsrun/launch.h @@ -46,9 +46,9 @@ #include "src/common/xstring.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" -#include "src/srun/debugger.h" +#include "srun_job.h" +#include "opt.h" +#include "debugger.h" extern slurm_step_layout_t *launch_common_get_slurm_step_layout( srun_job_t *job); diff --git a/src/srun/multi_prog.c b/src/srun/libsrun/multi_prog.c similarity index 99% rename from src/srun/multi_prog.c rename to src/srun/libsrun/multi_prog.c index a61a3e7047..803636a6e2 100644 --- a/src/srun/multi_prog.c +++ b/src/srun/libsrun/multi_prog.c @@ -60,8 +60,9 @@ #include "src/common/xassert.h" #include "src/common/xmalloc.h" #include "src/common/xstring.h" -#include "src/srun/debugger.h" -#include "src/srun/opt.h" + +#include "debugger.h" +#include "opt.h" /* Given a program name, translate it to a fully qualified pathname * as needed based upon the PATH environment variable */ diff --git a/src/srun/multi_prog.h b/src/srun/libsrun/multi_prog.h similarity index 100% rename from src/srun/multi_prog.h rename to src/srun/libsrun/multi_prog.h diff --git a/src/srun/opt.c b/src/srun/libsrun/opt.c similarity index 99% rename from src/srun/opt.c rename to src/srun/libsrun/opt.c index fad7eae889..cf30d0a974 100644 --- a/src/srun/opt.c +++ b/src/srun/libsrun/opt.c @@ -89,10 +89,10 @@ #include "src/api/pmi_server.h" -#include "src/srun/debugger.h" -#include "src/srun/launch.h" -#include "src/srun/multi_prog.h" -#include "src/srun/opt.h" +#include "debugger.h" +#include "launch.h" +#include "multi_prog.h" +#include "opt.h" /* generic OPT_ definitions -- mainly for use with env vars */ #define OPT_NONE 0x00 diff --git a/src/srun/opt.h b/src/srun/libsrun/opt.h similarity index 99% rename from src/srun/opt.h rename to src/srun/libsrun/opt.h index a94f755cee..5cb469f1a8 100644 --- a/src/srun/opt.h +++ b/src/srun/libsrun/opt.h @@ -55,7 +55,8 @@ #include "src/common/macros.h" /* true and false */ #include "src/common/env.h" -#include "src/srun/fname.h" + +#include "fname.h" #define DEFAULT_IMMEDIATE 1 #define MAX_THREADS 60 diff --git a/src/srun/srun_job.c b/src/srun/libsrun/srun_job.c similarity index 99% rename from src/srun/srun_job.c rename to src/srun/libsrun/srun_job.c index d9caa723b2..52cc152e39 100644 --- a/src/srun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -63,10 +63,13 @@ #include "src/common/forward.h" #include "src/common/fd.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" -#include "src/srun/fname.h" -#include "src/srun/debugger.h" +#include "allocate.h" +#include "srun_job.h" +#include "opt.h" +#include "fname.h" +#include "debugger.h" +#include "launch.h" +#include "multi_prog.h" /* * allocation information structure used to store general information diff --git a/src/srun/srun_job.h b/src/srun/libsrun/srun_job.h similarity index 100% rename from src/srun/srun_job.h rename to src/srun/libsrun/srun_job.h diff --git a/src/srun/srun.c b/src/srun/srun.c index 6dac1300ee..752b4f078a 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -88,13 +88,13 @@ #include "src/common/xsignal.h" #include "src/common/xstring.h" -#include "src/srun/launch.h" -#include "src/srun/allocate.h" -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" -#include "src/srun/debugger.h" +#include "launch.h" +#include "allocate.h" +#include "srun_job.h" +#include "opt.h" +#include "debugger.h" #include "src/srun/srun_pty.h" -#include "src/srun/multi_prog.h" +#include "multi_prog.h" #include "src/api/pmi_server.h" #include "src/api/step_ctx.h" #include "src/api/step_launch.h" diff --git a/src/srun/srun_pty.c b/src/srun/srun_pty.c index 1034f9c927..daebf6302c 100644 --- a/src/srun/srun_pty.c +++ b/src/srun/srun_pty.c @@ -64,8 +64,8 @@ #include "src/common/xstring.h" #include "src/common/xsignal.h" -#include "src/srun/opt.h" -#include "src/srun/srun_job.h" +#include "opt.h" +#include "srun_job.h" #define MAX_RETRIES 3 diff --git a/src/srun/srun_pty.h b/src/srun/srun_pty.h index 41382afd5f..5dcb1451c3 100644 --- a/src/srun/srun_pty.h +++ b/src/srun/srun_pty.h @@ -40,7 +40,7 @@ #ifndef _SIGNALS_H #define _SIGNALS_H -#include "src/srun/srun_job.h" +#include "srun_job.h" typedef struct srun_job signal_job_t; -- GitLab From d947281058178e0f856d82870a9037d27dc47081 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 14 Jun 2012 16:28:10 -0700 Subject: [PATCH 427/614] Restructure of srun code to allow outside programs to utilize existing logic. --- src/plugins/launch/poe/launch_poe.c | 11 +- src/plugins/switch/nrt/libpermapi/shr_64.c | 160 +--- src/srun/libsrun/srun_job.c | 803 +++++++++++++++++++++ src/srun/libsrun/srun_job.h | 14 +- src/srun/srun.c | 754 +------------------ 5 files changed, 861 insertions(+), 881 deletions(-) diff --git a/src/plugins/launch/poe/launch_poe.c b/src/plugins/launch/poe/launch_poe.c index bb77c1b5c3..50436ac2bc 100644 --- a/src/plugins/launch/poe/launch_poe.c +++ b/src/plugins/launch/poe/launch_poe.c @@ -591,11 +591,11 @@ static char *_build_poe_command(uint32_t job_id) } if (opt.immediate) setenv("MP_RETRY", "0", 1); - if (_verbose) { - int info_level = MIN((_verbose + 1), 6); - snprintf(value, sizeof(value), "%d", info_level); - setenv("MP_INFOLEVEL", value, 1); - } + /* if (_verbose) { */ + /* int info_level = MIN((_verbose + 1), 6); */ + /* snprintf(value, sizeof(value), "%d", info_level); */ + /* setenv("MP_INFOLEVEL", value, 1); */ + /* } */ if (opt.labelio) setenv("MP_LABELIO", "yes", 0); if (!strcmp(protocol, "multi")) @@ -644,6 +644,7 @@ static char *_build_poe_command(uint32_t job_id) really needs to have RMPOOL set just set it to something. */ setenv("MP_RMPOOL", "SLURM", 1); + setenv("SLURM_STARTED_STEP", "YES", 1); //disable_status = opt.disable_status; //quit_on_intr = opt.quit_on_intr; //srun_jobid = xstrdup(opt.jobid); diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 79065da748..426262c52c 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -66,6 +66,10 @@ bool srun_shutdown = false; static void *my_handle = NULL; static srun_job_t *job = NULL; +static int debug_level = 0; +static bool got_alloc = false; +static bool slurm_started = false; +static log_options_t log_opts = LOG_OPTS_INITIALIZER; int sig_array[] = { SIGINT, SIGQUIT, SIGCONT, SIGTERM, SIGHUP, @@ -130,7 +134,6 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, opt.user_managed_io = true; launch_common_set_stdio_fds(job, &cio_fds); - if (slurm_step_ctx_daemon_per_node_hack(job->step_ctx, connect_param->machine_name, connect_param->machine_count) @@ -180,14 +183,29 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, */ extern void pe_rm_free(rmhandle_t *resource_mgr) { - //srun_job_t *job = (srun_job_t *)*resource_mgr; - /* We are at the end so don't worry about freeing the - srun_job_t pointer */ - resource_mgr = NULL; + uint32_t rc = 0; + srun_job_t **job_ptr; + srun_job_t *job; + + /* If the PMD calls this and it didn't launch anything we need + * to not do anything here or PMD will crap out on it. */ + if (!resource_mgr || !*resource_mgr) + return; + job_ptr = (srun_job_t **)*resource_mgr; + job = *job_ptr; + if (!job) + return; + + /* OK we are now really running something */ + debug("got pe_rm_free called %p %p", job, job->step_ctx); + if (launch_g_step_wait(job, got_alloc) != -1) { + /* We are at the end so don't worry about freeing the + srun_job_t pointer */ + fini_srun(job, got_alloc, &rc, 0, slurm_started); + } + *resource_mgr = NULL; dlclose(my_handle); - debug("got pe_rm_free called"); - } /* The memory that is allocated to events generated by the resource @@ -342,7 +360,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, ret_info->instance[1] = -1; /* FIXME: not sure how to handle devicename yet */ ret_info->devicename = xmalloc(sizeof(char *)*2); - ret_info->devicename[0] = xstrdup("sn_all"); + ret_info->devicename[0] = xstrdup("mlx4_0"); ret_info->num_network = 1; ret_info->host_count = job->nhosts; @@ -443,8 +461,6 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, char** error_msg) { - log_options_t log_opts = LOG_OPTS_INITIALIZER; - int debug_level = 0; char *srun_debug = NULL; /* SLURM was originally written against 1300, so we will @@ -484,6 +500,10 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, log_alter(log_opts, LOG_DAEMON, "/dev/null"); } + /* This will be used later in the code to set the _verbose level. */ + if (debug_level >= LOG_LEVEL_INFO) + debug_level -= LOG_LEVEL_INFO; + return 0; } @@ -527,34 +547,22 @@ extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, char** error_msg) { - resource_allocation_response_msg_t *resp; job_request_t *pe_job_req = NULL; char *myargv[3] = { "poe", "poe", NULL }; + if (getenv("SLURM_STARTED_STEP")) + slurm_started = true; + debug("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { /* We don't handle files */ error("SLURM doesn't handle files to submit_job"); - return 1; + return -1; } - /* Initialize plugin stack, read options from plugins, etc. - */ - init_spank_env(); - if (spank_init(NULL) < 0) { - error("Plug-in initialization failed"); - exit(error_exit); - } + init_srun(2, myargv, &log_opts, debug_level, 1); pe_job_req = (job_request_t *)job_cmd.job_command; - - initialize_and_process_args(2, myargv); - - if (spank_init_post_opt() < 0) { - error("Plugin stack post-option processing failed."); - exit(error_exit); - } - debug2("num_nodes\t= %d", pe_job_req->num_nodes); debug2("tasks_per_node\t= %d", pe_job_req->tasks_per_node); debug2("total_tasks\t= %d", pe_job_req->total_tasks); @@ -595,102 +603,6 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, xfree(opt.network); opt.network = xstrdup(pe_job_req->network_usage.mode); -/* /\* now global "opt" should be filled in and available, */ -/* * create a job from opt */ -/* *\/ */ -/* if (opt.test_only) { */ -/* int rc = allocate_test(); */ -/* if (rc) { */ -/* slurm_perror("allocation failure"); */ -/* exit (1); */ -/* } */ -/* exit (0); */ - -/* } else if (opt.no_alloc) { */ -/* info("do not allocate resources"); */ -/* job = job_create_noalloc(); */ -/* if (create_job_step(job, false) < 0) { */ -/* exit(error_exit); */ -/* } */ - if ((resp = existing_allocation())) { - if (opt.nodes_set_env && !opt.nodes_set_opt && - (opt.min_nodes > resp->node_cnt)) { - /* This signifies the job used the --no-kill option - * and a node went DOWN or it used a node count range - * specification, was checkpointed from one size and - * restarted at a different size */ - error("SLURM_NNODES environment varariable " - "conflicts with allocated node count (%u!=%u).", - opt.min_nodes, resp->node_cnt); - /* Modify options to match resource allocation. - * NOTE: Some options are not supported */ - opt.min_nodes = resp->node_cnt; - xfree(opt.alloc_nodelist); - if (!opt.ntasks_set) - opt.ntasks = opt.min_nodes; - } - if (opt.alloc_nodelist == NULL) - opt.alloc_nodelist = xstrdup(resp->node_list); - /* if (opt.exclusive) */ - /* _step_opt_exclusive(); */ - //_set_env_vars(resp); - //if (_validate_relative(resp)) - // exit(error_exit); - job = job_step_create_allocation(resp); - slurm_free_resource_allocation_response_msg(resp); - - if (opt.begin != 0) { - error("--begin is ignored because nodes" - " are already allocated."); - } - if (!job || create_job_step(job, false) < 0) - exit(error_exit); - } else { - /* Combined job allocation and job step launch */ - if (opt.relative_set && opt.relative) { - fatal("--relative option invalid for job allocation " - "request"); - } - - if (!opt.job_name_set_env && opt.job_name_set_cmd) - setenvfs("SLURM_JOB_NAME=%s", opt.job_name); - else if (!opt.job_name_set_env && opt.argc) - setenvfs("SLURM_JOB_NAME=%s", opt.argv[0]); - - if (!(resp = allocate_nodes())) - return error_exit; - - //got_alloc = true; - //_print_job_information(resp); - //_set_env_vars(resp); - /* if (_validate_relative(resp)) { */ - /* slurm_complete_job(resp->job_id, 1); */ - /* return error_exit; */ - /* } */ - job = job_create_allocation(resp); - - opt.exclusive = false; /* not applicable for this step */ - opt.time_limit = NO_VAL;/* not applicable for step, only job */ - xfree(opt.constraints); /* not applicable for this step */ - if (!opt.job_name_set_cmd && opt.job_name_set_env) { - /* 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=%u", opt.uid); */ - - if (!job || create_job_step(job, true) < 0) { - slurm_complete_job(resp->job_id, 1); - return error_exit; - } - - slurm_free_resource_allocation_response_msg(resp); - } - //*resource_mgr = (void *)job; + create_srun_job(&job, &got_alloc, slurm_started); return 0; } - diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c index 52cc152e39..386a6b2c51 100644 --- a/src/srun/libsrun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -50,18 +50,27 @@ #include #include #include +#include /* MAXPATHLEN */ +#include + #include "src/common/bitstring.h" #include "src/common/cbuf.h" #include "src/common/hostlist.h" #include "src/common/log.h" +#include "src/common/plugstack.h" #include "src/common/read_config.h" #include "src/common/slurm_protocol_api.h" +#include "src/common/slurm_rlimits_info.h" #include "src/common/xmalloc.h" +#include "src/common/xsignal.h" #include "src/common/xstring.h" #include "src/common/io_hdr.h" #include "src/common/forward.h" #include "src/common/fd.h" +#include "src/common/uid.h" + +#include "src/api/step_launch.h" #include "allocate.h" #include "srun_job.h" @@ -87,6 +96,9 @@ typedef struct allocation_info { uint32_t stepid; } allocation_info_t; +static int shepard_fd = -1; +static pthread_t signal_thread = (pthread_t) 0; + /* * Prototypes: */ @@ -95,6 +107,26 @@ static int _compute_task_count(allocation_info_t *info); static void _set_ntasks(allocation_info_t *info); static srun_job_t *_job_create_structure(allocation_info_t *info); static char * _normalize_hostlist(const char *hostlist); +static int _become_user(void); +static int _call_spank_local_user(srun_job_t *job); +static void _default_sigaction(int sig); +static long _diff_tv_str(struct timeval *tv1, struct timeval *tv2); +static void _handle_intr(srun_job_t *job); +static void _handle_pipe(void); +static void _print_job_information(resource_allocation_response_msg_t *resp); +static void _run_srun_epilog (srun_job_t *job); +static void _run_srun_prolog (srun_job_t *job); +static int _run_srun_script (srun_job_t *job, char *script); +static void _set_env_vars(resource_allocation_response_msg_t *resp); +static void _set_prio_process_env(void); +static int _set_rlimit_env(void); +static void _set_submit_dir_env(void); +static int _set_umask_env(void); +static void _shepard_notify(int shepard_fd); +static int _shepard_spawn(srun_job_t *job, bool got_alloc); +static void *_srun_signal_mgr(void *no_data); +static void _step_opt_exclusive(void); +static int _validate_relative(resource_allocation_response_msg_t *resp); /* @@ -367,6 +399,254 @@ job_create_allocation(resource_allocation_response_msg_t *resp) return (job); } +extern void init_srun(int ac, char **av, + log_options_t *logopt, int debug_level, + bool slurm_started) +{ + /* This must happen before we spawn any threads + * which are not designed to handle them */ + if (xsignal_block(sig_array) < 0) + error("Unable to block signals"); + + /* Initialize plugin stack, read options from plugins, etc. + */ + init_spank_env(); + if (spank_init(NULL) < 0) { + error("Plug-in initialization failed"); + exit(error_exit); + } + + /* Be sure to call spank_fini when srun exits. + */ + if (atexit((void (*) (void)) spank_fini) < 0) + error("Failed to register atexit handler for plugins: %m"); + + /* set default options, process commandline arguments, and + * verify some basic values + */ + if (initialize_and_process_args(ac, av) < 0) { + error ("srun initialization failed"); + exit (1); + } + record_ppid(); + + if (spank_init_post_opt() < 0) { + error("Plugin stack post-option processing failed."); + exit(error_exit); + } + + /* reinit log with new verbosity (if changed by command line) + */ + if (logopt && (_verbose || opt.quiet)) { + /* If log level is already increased, only increment the + * level to the difference of _verbose an LOG_LEVEL_INFO + */ + if ((_verbose -= (logopt->stderr_level - LOG_LEVEL_INFO)) > 0) + logopt->stderr_level += _verbose; + logopt->stderr_level -= opt.quiet; + logopt->prefix_level = 1; + log_alter(*logopt, 0, NULL); + } else + _verbose = debug_level; + + (void) _set_rlimit_env(); + _set_prio_process_env(); + (void) _set_umask_env(); + _set_submit_dir_env(); + + /* Set up slurmctld message handler */ + slurmctld_msg_init(); +} + +extern void create_srun_job(srun_job_t **p_job, bool *got_alloc, + bool slurm_started) +{ + resource_allocation_response_msg_t *resp; + srun_job_t *job = NULL; + + /* now global "opt" should be filled in and available, + * create a job from opt + */ + if (opt.test_only) { + int rc = allocate_test(); + if (rc) { + slurm_perror("allocation failure"); + exit (1); + } + exit (0); + + } else if (opt.no_alloc) { + info("do not allocate resources"); + job = job_create_noalloc(); + if (create_job_step(job, false) < 0) { + exit(error_exit); + } + } else if ((resp = existing_allocation())) { + select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, + &resp->node_cnt); + if (opt.nodes_set_env && !opt.nodes_set_opt && + (opt.min_nodes > resp->node_cnt)) { + /* This signifies the job used the --no-kill option + * and a node went DOWN or it used a node count range + * specification, was checkpointed from one size and + * restarted at a different size */ + error("SLURM_NNODES environment varariable " + "conflicts with allocated node count (%u!=%u).", + opt.min_nodes, resp->node_cnt); + /* Modify options to match resource allocation. + * NOTE: Some options are not supported */ + opt.min_nodes = resp->node_cnt; + xfree(opt.alloc_nodelist); + if (!opt.ntasks_set) + opt.ntasks = opt.min_nodes; + } + if (opt.alloc_nodelist == NULL) + opt.alloc_nodelist = xstrdup(resp->node_list); + if (opt.exclusive) + _step_opt_exclusive(); + _set_env_vars(resp); + if (_validate_relative(resp)) + exit(error_exit); + job = job_step_create_allocation(resp); + slurm_free_resource_allocation_response_msg(resp); + + if (opt.begin != 0) { + error("--begin is ignored because nodes" + " are already allocated."); + } + if (!job || create_job_step(job, false) < 0) + exit(error_exit); + } else { + /* Combined job allocation and job step launch */ +#if defined HAVE_FRONT_END && (!defined HAVE_BG || defined HAVE_BG_L_P || !defined HAVE_BG_FILES) + uid_t my_uid = getuid(); + if ((my_uid != 0) && + (my_uid != slurm_get_slurm_user_id())) { + error("srun task launch not supported on this system"); + exit(error_exit); + } +#endif + if (opt.relative_set && opt.relative) { + fatal("--relative option invalid for job allocation " + "request"); + } + + if (!opt.job_name_set_env && opt.job_name_set_cmd) + setenvfs("SLURM_JOB_NAME=%s", opt.job_name); + else if (!opt.job_name_set_env && opt.argc) + setenvfs("SLURM_JOB_NAME=%s", opt.argv[0]); + + if ( !(resp = allocate_nodes()) ) + exit(error_exit); + *got_alloc = true; + _print_job_information(resp); + _set_env_vars(resp); + if (_validate_relative(resp)) { + slurm_complete_job(resp->job_id, 1); + exit(error_exit); + } + job = job_create_allocation(resp); + + opt.exclusive = false; /* not applicable for this step */ + opt.time_limit = NO_VAL;/* not applicable for step, only job */ + xfree(opt.constraints); /* not applicable for this step */ + if (!opt.job_name_set_cmd && opt.job_name_set_env) { + /* 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=%u", opt.uid); + + if (!job || create_job_step(job, true) < 0) { + slurm_complete_job(resp->job_id, 1); + exit(error_exit); + } + + slurm_free_resource_allocation_response_msg(resp); + } + + /* + * Become --uid user + */ + if (_become_user () < 0) + info("Warning: Unable to assume uid=%u", opt.uid); + + if (!slurm_started) { + /* + * Spawn process to insure clean-up of job and/or step + * on abnormal termination + */ + shepard_fd = _shepard_spawn(job, got_alloc); + } + + *p_job = job; +} + +extern void pre_launch_srun_job(srun_job_t *job, bool slurm_started) +{ + pthread_attr_t thread_attr; + if (!signal_thread) { + slurm_attr_init(&thread_attr); + while (pthread_create(&signal_thread, &thread_attr, + _srun_signal_mgr, job)) { + error("pthread_create error %m"); + sleep(1); + } + slurm_attr_destroy(&thread_attr); + } + + /* if running from poe This already happened in srun. */ + if (slurm_started) + return; + + _run_srun_prolog(job); + if (_call_spank_local_user (job) < 0) { + error("Failure in local plugin stack"); + slurm_step_launch_abort(job->step_ctx); + exit(error_exit); + } +} + +extern void fini_srun(srun_job_t *job, bool got_alloc, uint32_t *global_rc, + pthread_t signal_thread, bool slurm_started) +{ + /* If running from poe Most of this already happened in srun. */ + if (slurm_started) + goto cleanup; + if (got_alloc) { + cleanup_allocation(); + + /* send the controller we were cancelled */ + if (job->state >= SRUN_JOB_CANCELLED) + slurm_complete_job(job->jobid, NO_VAL); + else + slurm_complete_job(job->jobid, *global_rc); + } + _shepard_notify(shepard_fd); + +cleanup: + if (signal_thread) { + srun_shutdown = true; + pthread_kill(signal_thread, SIGINT); + pthread_join(signal_thread, NULL); + } + + if (!slurm_started) + _run_srun_epilog(job); + + slurm_step_ctx_destroy(job->step_ctx); + + if (WIFEXITED(*global_rc)) + *global_rc = WEXITSTATUS(*global_rc); + + mpir_cleanup(); + log_fini(); +} + void update_job_state(srun_job_t *job, srun_job_state_t state) { @@ -540,3 +820,526 @@ _normalize_hostlist(const char *hostlist) return buf; } +static int _become_user (void) +{ + char *user = uid_to_string(opt.uid); + gid_t gid = gid_from_uid(opt.uid); + + if (strcmp(user, "nobody") == 0) { + xfree(user); + return (error ("Invalid user id %u: %m", opt.uid)); + } + + if (opt.uid == getuid ()) { + xfree(user); + return (0); + } + + if ((opt.egid != (gid_t) -1) && (setgid (opt.egid) < 0)) { + xfree(user); + return (error ("setgid: %m")); + } + + initgroups (user, gid); /* Ignore errors */ + xfree(user); + + if (setuid (opt.uid) < 0) + return (error ("setuid: %m")); + + return (0); +} + +static int _call_spank_local_user (srun_job_t *job) +{ + struct spank_launcher_job_info info[1]; + + info->uid = opt.uid; + info->gid = opt.gid; + info->jobid = job->jobid; + info->stepid = job->stepid; + info->step_layout = launch_common_get_slurm_step_layout(job); + info->argc = opt.argc; + info->argv = opt.argv; + + return spank_local_user(info); +} + +static void _default_sigaction(int sig) +{ + struct sigaction act; + if (sigaction(sig, NULL, &act)) { + error("sigaction(%d): %m", sig); + return; + } + if (act.sa_handler != SIG_IGN) + return; + + act.sa_handler = SIG_DFL; + if (sigaction(sig, &act, NULL)) + error("sigaction(%d): %m", sig); +} + +/* Return the number of microseconds between tv1 and tv2 with a maximum + * a maximum value of 10,000,000 to prevent overflows */ +static long _diff_tv_str(struct timeval *tv1, struct timeval *tv2) +{ + long delta_t; + + delta_t = MIN((tv2->tv_sec - tv1->tv_sec), 10); + delta_t *= 1000000; + delta_t += tv2->tv_usec - tv1->tv_usec; + return delta_t; +} + +static void _handle_intr(srun_job_t *job) +{ + static struct timeval last_intr = { 0, 0 }; + static struct timeval last_intr_sent = { 0, 0 }; + struct timeval now; + + gettimeofday(&now, NULL); + if (!opt.quit_on_intr && (_diff_tv_str(&last_intr, &now) > 1000000)) { + if (opt.disable_status) { + info("sending Ctrl-C to job %u.%u", + job->jobid, job->stepid); + launch_g_fwd_signal(SIGINT); + } else if (job->state < SRUN_JOB_FORCETERM) { + info("interrupt (one more within 1 sec to abort)"); + launch_g_print_status(); + } else { + info("interrupt (abort already in progress)"); + launch_g_print_status(); + } + last_intr = now; + } else { /* second Ctrl-C in half as many seconds */ + update_job_state(job, SRUN_JOB_CANCELLED); + /* terminate job */ + if (job->state < SRUN_JOB_FORCETERM) { + if (_diff_tv_str(&last_intr_sent, &now) < 1000000) { + job_force_termination(job); + launch_g_fwd_signal(SIGKILL); + return; + } + + info("sending Ctrl-C to job %u.%u", + job->jobid, job->stepid); + last_intr_sent = now; + launch_g_fwd_signal(SIGINT); + } else + job_force_termination(job); + + launch_g_fwd_signal(SIGKILL); + } +} + +static void _handle_pipe(void) +{ + static int ending = 0; + + if (ending) + return; + ending = 1; + launch_g_fwd_signal(SIGKILL); +} + + +static void _print_job_information(resource_allocation_response_msg_t *resp) +{ + int i; + char *str = NULL; + char *sep = ""; + + if (!_verbose) + return; + + xstrfmtcat(str, "jobid %u: nodes(%u):`%s', cpu counts: ", + resp->job_id, resp->node_cnt, resp->node_list); + + for (i = 0; i < resp->num_cpu_groups; i++) { + xstrfmtcat(str, "%s%u(x%u)", + sep, resp->cpus_per_node[i], + resp->cpu_count_reps[i]); + sep = ","; + } + verbose("%s", str); + xfree(str); +} + +static void _run_srun_epilog (srun_job_t *job) +{ + int rc; + + if (opt.epilog && strcasecmp(opt.epilog, "none") != 0) { + rc = _run_srun_script(job, opt.epilog); + debug("srun epilog rc = %d", rc); + } +} + +static void _run_srun_prolog (srun_job_t *job) +{ + int rc; + + if (opt.prolog && strcasecmp(opt.prolog, "none") != 0) { + rc = _run_srun_script(job, opt.prolog); + debug("srun prolog rc = %d", rc); + } +} + +static int _run_srun_script (srun_job_t *job, char *script) +{ + int status; + pid_t cpid; + int i; + char **args = NULL; + + if (script == NULL || script[0] == '\0') + return 0; + + if (access(script, R_OK | X_OK) < 0) { + info("Access denied for %s: %m", script); + return 0; + } + + if ((cpid = fork()) < 0) { + error ("run_srun_script: fork: %m"); + return -1; + } + if (cpid == 0) { + + /* set the scripts command line arguments to the arguments + * for the application, but shifted one higher + */ + args = xmalloc(sizeof(char *) * 1024); + args[0] = script; + for (i = 0; i < opt.argc; i++) { + args[i+1] = opt.argv[i]; + } + args[i+1] = NULL; + execv(script, args); + error("help! %m"); + exit(127); + } + + do { + if (waitpid(cpid, &status, 0) < 0) { + if (errno == EINTR) + continue; + error("waitpid: %m"); + return 0; + } else + return status; + } while(1); + + /* NOTREACHED */ +} + +static void _set_env_vars(resource_allocation_response_msg_t *resp) +{ + char *tmp; + + if (!getenv("SLURM_JOB_CPUS_PER_NODE")) { + tmp = uint32_compressed_to_str(resp->num_cpu_groups, + resp->cpus_per_node, + resp->cpu_count_reps); + if (setenvf(NULL, "SLURM_JOB_CPUS_PER_NODE", "%s", tmp) < 0) { + error("unable to set SLURM_JOB_CPUS_PER_NODE in " + "environment"); + } + xfree(tmp); + } + + if (resp->alias_list) { + if (setenv("SLURM_NODE_ALIASES", resp->alias_list, 1) < 0) { + error("unable to set SLURM_NODE_ALIASES in " + "environment"); + } + } else { + unsetenv("SLURM_NODE_ALIASES"); + } + + return; +} + +/* + * _set_prio_process_env + * + * Set the internal SLURM_PRIO_PROCESS environment variable to support + * the propagation of the users nice value and the "PropagatePrioProcess" + * config keyword. + */ +static void _set_prio_process_env(void) +{ + int retval; + + errno = 0; /* needed to detect a real failure since prio can be -1 */ + + if ((retval = getpriority (PRIO_PROCESS, 0)) == -1) { + if (errno) { + error ("getpriority(PRIO_PROCESS): %m"); + return; + } + } + + if (setenvf (NULL, "SLURM_PRIO_PROCESS", "%d", retval) < 0) { + error ("unable to set SLURM_PRIO_PROCESS in environment"); + return; + } + + debug ("propagating SLURM_PRIO_PROCESS=%d", retval); +} + +/* Set SLURM_RLIMIT_* environment variables with current resource + * limit values, reset RLIMIT_NOFILE to maximum possible value */ +static int _set_rlimit_env(void) +{ + int rc = SLURM_SUCCESS; + struct rlimit rlim[1]; + unsigned long cur; + char name[64], *format; + slurm_rlimits_info_t *rli; + + /* Modify limits with any command-line options */ + if (opt.propagate && parse_rlimits( opt.propagate, PROPAGATE_RLIMITS)){ + error( "--propagate=%s is not valid.", opt.propagate ); + exit(error_exit); + } + + for (rli = get_slurm_rlimits_info(); rli->name != NULL; rli++ ) { + + if (rli->propagate_flag != PROPAGATE_RLIMITS) + continue; + + if (getrlimit (rli->resource, rlim) < 0) { + error ("getrlimit (RLIMIT_%s): %m", rli->name); + rc = SLURM_FAILURE; + continue; + } + + cur = (unsigned long) rlim->rlim_cur; + snprintf(name, sizeof(name), "SLURM_RLIMIT_%s", rli->name); + if (opt.propagate && rli->propagate_flag == PROPAGATE_RLIMITS) + /* + * Prepend 'U' to indicate user requested propagate + */ + format = "U%lu"; + else + format = "%lu"; + + if (setenvf (NULL, name, format, cur) < 0) { + error ("unable to set %s in environment", name); + rc = SLURM_FAILURE; + continue; + } + + debug ("propagating RLIMIT_%s=%lu", rli->name, cur); + } + + /* + * Now increase NOFILE to the max available for this srun + */ + if (getrlimit (RLIMIT_NOFILE, rlim) < 0) + return (error ("getrlimit (RLIMIT_NOFILE): %m")); + + if (rlim->rlim_cur < rlim->rlim_max) { + rlim->rlim_cur = rlim->rlim_max; + if (setrlimit (RLIMIT_NOFILE, rlim) < 0) + return (error ("Unable to increase max no. files: %m")); + } + + return rc; +} + +/* Set SLURM_SUBMIT_DIR environment variable with current state */ +static void _set_submit_dir_env(void) +{ + char buf[MAXPATHLEN + 1]; + + if ((getcwd(buf, MAXPATHLEN)) == NULL) { + error("getcwd failed: %m"); + exit(error_exit); + } + + if (setenvf(NULL, "SLURM_SUBMIT_DIR", "%s", buf) < 0) { + error("unable to set SLURM_SUBMIT_DIR in environment"); + return; + } +} + +/* Set some environment variables with current state */ +static int _set_umask_env(void) +{ + if (!getenv("SRUN_DEBUG")) { /* do not change current value */ + /* NOTE: Default debug level is 3 (info) */ + int log_level = LOG_LEVEL_INFO + _verbose - opt.quiet; + + if (setenvf(NULL, "SRUN_DEBUG", "%d", log_level) < 0) + error ("unable to set SRUN_DEBUG in environment"); + } + + if (!getenv("SLURM_UMASK")) { /* do not change current value */ + char mask_char[5]; + mode_t mask; + + mask = (int)umask(0); + umask(mask); + + sprintf(mask_char, "0%d%d%d", + ((mask>>6)&07), ((mask>>3)&07), mask&07); + if (setenvf(NULL, "SLURM_UMASK", "%s", mask_char) < 0) { + error ("unable to set SLURM_UMASK in environment"); + return SLURM_FAILURE; + } + debug ("propagating UMASK=%s", mask_char); + } + + return SLURM_SUCCESS; +} + +static void _shepard_notify(int shepard_fd) +{ + int rc; + + while (1) { + rc = write(shepard_fd, "", 1); + if (rc == -1) { + if ((errno == EAGAIN) || (errno == EINTR)) + continue; + error("write(shepard): %m"); + } + break; + } + close(shepard_fd); +} + +static int _shepard_spawn(srun_job_t *job, bool got_alloc) +{ + int shepard_pipe[2], rc; + pid_t shepard_pid; + char buf[1]; + + if (pipe(shepard_pipe)) { + error("pipe: %m"); + return -1; + } + + shepard_pid = fork(); + if (shepard_pid == -1) { + error("fork: %m"); + return -1; + } + if (shepard_pid != 0) { + close(shepard_pipe[0]); + return shepard_pipe[1]; + } + + /* Wait for parent to notify of completion or I/O error on abort */ + close(shepard_pipe[1]); + while (1) { + rc = read(shepard_pipe[0], buf, 1); + if (rc == 1) { + exit(0); + } else if (rc == 0) { + break; /* EOF */ + } else if (rc == -1) { + if ((errno == EAGAIN) || (errno == EINTR)) + continue; + break; + } + } + + (void) slurm_terminate_job_step(job->jobid, job->stepid); + if (got_alloc) + slurm_complete_job(job->jobid, NO_VAL); + exit(0); + return -1; +} + +/* _srun_signal_mgr - Process daemon-wide signals */ +static void *_srun_signal_mgr(void *job_ptr) +{ + int sig; + int i, rc; + sigset_t set; + srun_job_t *job = (srun_job_t *)job_ptr; + + /* Make sure no required signals are ignored (possibly inherited) */ + for (i = 0; sig_array[i]; i++) + _default_sigaction(sig_array[i]); + while (!srun_shutdown) { + xsignal_sigset_create(sig_array, &set); + rc = sigwait(&set, &sig); + if (rc == EINTR) + continue; + switch (sig) { + case SIGINT: + if (!srun_shutdown) + _handle_intr(job); + break; + case SIGQUIT: + info("Quit"); + /* continue with slurm_step_launch_abort */ + case SIGTERM: + case SIGHUP: + /* No need to call job_force_termination here since we + * are ending the job now and we don't need to update + * the state. */ + info("forcing job termination"); + launch_g_fwd_signal(SIGKILL); + break; + case SIGCONT: + info("got SIGCONT"); + break; + case SIGPIPE: + _handle_pipe(); + break; + case SIGALRM: + if (srun_max_timer) { + info("First task exited %ds ago", opt.max_wait); + launch_g_print_status(); + launch_g_step_terminate(); + } + break; + default: + launch_g_fwd_signal(sig); + break; + } + } + return NULL; +} + +/* opt.exclusive is set, disable user task layout controls */ +static void _step_opt_exclusive(void) +{ + if (!opt.ntasks_set) { + error("--ntasks must be set with --exclusive"); + exit(error_exit); + } + if (opt.relative_set) { + error("--relative disabled, incompatible with --exclusive"); + exit(error_exit); + } + if (opt.exc_nodes) { + error("--exclude is incompatible with --exclusive"); + exit(error_exit); + } +} + +static int _validate_relative(resource_allocation_response_msg_t *resp) +{ + + if (opt.relative_set && + ((opt.relative + opt.min_nodes) > resp->node_cnt)) { + if (opt.nodes_set_opt) { /* -N command line option used */ + error("--relative and --nodes option incompatible " + "with count of allocated nodes (%d+%d>%d)", + opt.relative, opt.min_nodes, resp->node_cnt); + } else { /* SLURM_NNODES option used */ + error("--relative and SLURM_NNODES option incompatible " + "with count of allocated nodes (%d+%d>%d)", + opt.relative, opt.min_nodes, resp->node_cnt); + } + return -1; + } + return 0; +} + diff --git a/src/srun/libsrun/srun_job.h b/src/srun/libsrun/srun_job.h index 974d2e45eb..4ad62d6f47 100644 --- a/src/srun/libsrun/srun_job.h +++ b/src/srun/libsrun/srun_job.h @@ -52,6 +52,7 @@ #include "src/common/macros.h" #include "src/common/node_select.h" #include "src/common/slurm_protocol_defs.h" + #include "src/api/step_io.h" @@ -129,8 +130,17 @@ extern srun_job_t *job_step_create_allocation( resource_allocation_response_msg_t *resp); extern srun_job_t * job_create_allocation( resource_allocation_response_msg_t *resp); -extern srun_job_t * job_create_structure( - resource_allocation_response_msg_t *resp); + +extern void init_srun(int ac, char **av, + log_options_t *logopt, int debug_level, + bool slurm_started); + +extern void create_srun_job(srun_job_t **p_job, bool *got_alloc, + bool slurm_started); +extern void pre_launch_srun_job(srun_job_t *job, bool slurm_started); + +extern void fini_srun(srun_job_t *job, bool got_alloc, uint32_t *global_rc, + pthread_t signal_thread, bool slurm_started); /* * Update job filenames and modes for stderr, stdout, and stdin. diff --git a/src/srun/srun.c b/src/srun/srun.c index 752b4f078a..0783feca81 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -132,30 +132,11 @@ int sig_array[] = { /* * forward declaration of static funcs */ -static int _become_user (void); -static int _call_spank_local_user (srun_job_t *job); -static void _default_sigaction(int sig); -static void _handle_intr(void); -static void _handle_pipe(void); -static void _print_job_information(resource_allocation_response_msg_t *resp); static void _pty_restore(void); -static void _run_srun_prolog (srun_job_t *job); -static void _run_srun_epilog (srun_job_t *job); -static int _run_srun_script (srun_job_t *job, char *script); -static void _set_env_vars(resource_allocation_response_msg_t *resp); static void _set_exit_code(void); static void _set_node_alias(void); -static void _step_opt_exclusive(void); -static void _set_submit_dir_env(void); -static void _set_prio_process_env(void); -static int _set_rlimit_env(void); -static int _set_umask_env(void); -static void _shepard_notify(int shepard_fd); -static int _shepard_spawn(srun_job_t *job, bool got_alloc); static int _slurm_debug_env_val (void); -static void *_srun_signal_mgr(void *no_data); static char *_uint16_array_to_str(int count, const uint16_t *array); -static int _validate_relative(resource_allocation_response_msg_t *resp); /* * from libvirt-0.6.2 GPL2 @@ -179,14 +160,11 @@ void cfmakeraw(struct termios *attr) int srun(int ac, char **av) { - resource_allocation_response_msg_t *resp; int debug_level; env_t *env = xmalloc(sizeof(env_t)); log_options_t logopt = LOG_OPTS_STDERR_ONLY; - pthread_attr_t thread_attr; pthread_t signal_thread = (pthread_t) 0; bool got_alloc = false; - int shepard_fd = -1; slurm_step_io_fds_t cio_fds = SLURM_STEP_IO_FDS_INITIALIZER; env->stepid = -1; @@ -205,181 +183,15 @@ int srun(int ac, char **av) if (slurm_select_init(1) != SLURM_SUCCESS ) fatal( "failed to initialize node selection plugin" ); - /* This must happen before we spawn any threads - * which are not designed to handle them */ - if (xsignal_block(sig_array) < 0) - error("Unable to block signals"); #ifndef HAVE_CRAY_EMULATION if (is_cray_system() || is_cray_select_type()) { error("operation not supported on Cray systems - use aprun(1)"); exit(error_exit); } #endif - /* Initialize plugin stack, read options from plugins, etc. - */ - init_spank_env(); - if (spank_init(NULL) < 0) { - error("Plug-in initialization failed"); - exit(error_exit); - } - - /* Be sure to call spank_fini when srun exits. - */ - if (atexit((void (*) (void)) spank_fini) < 0) - error("Failed to register atexit handler for plugins: %m"); - - /* set default options, process commandline arguments, and - * verify some basic values - */ - if (initialize_and_process_args(ac, av) < 0) { - error ("srun initialization failed"); - exit (1); - } - record_ppid(); - - if (spank_init_post_opt() < 0) { - error("Plugin stack post-option processing failed."); - exit(error_exit); - } - - /* reinit log with new verbosity (if changed by command line) - */ - if (_verbose || opt.quiet) { - /* If log level is already increased, only increment the - * level to the difference of _verbose an LOG_LEVEL_INFO - */ - if ((_verbose -= (logopt.stderr_level - LOG_LEVEL_INFO)) > 0) - logopt.stderr_level += _verbose; - logopt.stderr_level -= opt.quiet; - logopt.prefix_level = 1; - log_alter(logopt, 0, NULL); - } else - _verbose = debug_level; - - (void) _set_rlimit_env(); - _set_prio_process_env(); - (void) _set_umask_env(); - _set_submit_dir_env(); - - /* Set up slurmctld message handler */ - slurmctld_msg_init(); - - /* now global "opt" should be filled in and available, - * create a job from opt - */ - if (opt.test_only) { - int rc = allocate_test(); - if (rc) { - slurm_perror("allocation failure"); - exit (1); - } - exit (0); - - } else if (opt.no_alloc) { - info("do not allocate resources"); - job = job_create_noalloc(); - if (create_job_step(job, false) < 0) { - exit(error_exit); - } - } else if ((resp = existing_allocation())) { - select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, - &resp->node_cnt); - if (opt.nodes_set_env && !opt.nodes_set_opt && - (opt.min_nodes > resp->node_cnt)) { - /* This signifies the job used the --no-kill option - * and a node went DOWN or it used a node count range - * specification, was checkpointed from one size and - * restarted at a different size */ - error("SLURM_NNODES environment varariable " - "conflicts with allocated node count (%u!=%u).", - opt.min_nodes, resp->node_cnt); - /* Modify options to match resource allocation. - * NOTE: Some options are not supported */ - opt.min_nodes = resp->node_cnt; - xfree(opt.alloc_nodelist); - if (!opt.ntasks_set) - opt.ntasks = opt.min_nodes; - } - if (opt.alloc_nodelist == NULL) - opt.alloc_nodelist = xstrdup(resp->node_list); - if (opt.exclusive) - _step_opt_exclusive(); - _set_env_vars(resp); - if (_validate_relative(resp)) - exit(error_exit); - job = job_step_create_allocation(resp); - slurm_free_resource_allocation_response_msg(resp); - - if (opt.begin != 0) { - error("--begin is ignored because nodes" - " are already allocated."); - } - if (!job || create_job_step(job, false) < 0) - exit(error_exit); - } else { - /* Combined job allocation and job step launch */ -#if defined HAVE_FRONT_END && (!defined HAVE_BG || defined HAVE_BG_L_P || !defined HAVE_BG_FILES) - uid_t my_uid = getuid(); - if ((my_uid != 0) && - (my_uid != slurm_get_slurm_user_id())) { - error("srun task launch not supported on this system"); - exit(error_exit); - } -#endif - if (opt.relative_set && opt.relative) { - fatal("--relative option invalid for job allocation " - "request"); - } - - if (!opt.job_name_set_env && opt.job_name_set_cmd) - setenvfs("SLURM_JOB_NAME=%s", opt.job_name); - else if (!opt.job_name_set_env && opt.argc) - setenvfs("SLURM_JOB_NAME=%s", opt.argv[0]); - - if ( !(resp = allocate_nodes()) ) - exit(error_exit); - got_alloc = true; - _print_job_information(resp); - _set_env_vars(resp); - if (_validate_relative(resp)) { - slurm_complete_job(resp->job_id, 1); - exit(error_exit); - } - job = job_create_allocation(resp); - - opt.exclusive = false; /* not applicable for this step */ - opt.time_limit = NO_VAL;/* not applicable for step, only job */ - xfree(opt.constraints); /* not applicable for this step */ - if (!opt.job_name_set_cmd && opt.job_name_set_env) { - /* 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=%u", opt.uid); - - if (!job || create_job_step(job, true) < 0) { - slurm_complete_job(resp->job_id, 1); - exit(error_exit); - } - - slurm_free_resource_allocation_response_msg(resp); - } - - /* - * Become --uid user - */ - if (_become_user () < 0) - info("Warning: Unable to assume uid=%u", opt.uid); - - /* - * Spawn process to insure clean-up of job and/or step on abnormal - * termination - */ - shepard_fd = _shepard_spawn(job, got_alloc); + init_srun(ac, av, &logopt, debug_level, 0); + create_srun_job(&job, &got_alloc, 0); /* * Enhance environment for job @@ -443,24 +255,9 @@ int srun(int ac, char **av) xfree(env); _set_node_alias(); - if (!signal_thread) { - slurm_attr_init(&thread_attr); - while (pthread_create(&signal_thread, &thread_attr, - _srun_signal_mgr, NULL)) { - error("pthread_create error %m"); - sleep(1); - } - slurm_attr_destroy(&thread_attr); - } - /* re_launch: */ relaunch: - _run_srun_prolog(job); - if (_call_spank_local_user (job) < 0) { - error("Failure in local plugin stack"); - slurm_step_launch_abort(job->step_ctx); - exit(error_exit); - } + pre_launch_srun_job(job, 0); launch_common_set_stdio_fds(job, &cio_fds); @@ -469,48 +266,11 @@ relaunch: goto relaunch; } - if (got_alloc) { - cleanup_allocation(); + fini_srun(job, got_alloc, &global_rc, signal_thread, 0); - /* send the controller we were cancelled */ - if (job->state >= SRUN_JOB_CANCELLED) - slurm_complete_job(job->jobid, NO_VAL); - else - slurm_complete_job(job->jobid, global_rc); - } - _shepard_notify(shepard_fd); - - if (signal_thread) { - srun_shutdown = true; - pthread_kill(signal_thread, SIGINT); - pthread_join(signal_thread, NULL); - } - _run_srun_epilog(job); - slurm_step_ctx_destroy(job->step_ctx); - mpir_cleanup(); - log_fini(); - - if (WIFEXITED(global_rc)) - global_rc = WEXITSTATUS(global_rc); return (int)global_rc; } -static int _call_spank_local_user (srun_job_t *job) -{ - struct spank_launcher_job_info info[1]; - - info->uid = opt.uid; - info->gid = opt.gid; - info->jobid = job->jobid; - info->stepid = job->stepid; - info->step_layout = launch_common_get_slurm_step_layout(job); - info->argc = opt.argc; - info->argv = opt.argv; - - return spank_local_user(info); -} - - static int _slurm_debug_env_val (void) { long int level = 0; @@ -569,103 +329,6 @@ static char *_uint16_array_to_str(int array_len, const uint16_t *array) return str; } -static void -_print_job_information(resource_allocation_response_msg_t *resp) -{ - int i; - char *str = NULL; - char *sep = ""; - - if (!_verbose) - return; - - xstrfmtcat(str, "jobid %u: nodes(%u):`%s', cpu counts: ", - resp->job_id, resp->node_cnt, resp->node_list); - - for (i = 0; i < resp->num_cpu_groups; i++) { - xstrfmtcat(str, "%s%u(x%u)", - sep, resp->cpus_per_node[i], - resp->cpu_count_reps[i]); - sep = ","; - } - verbose("%s", str); - xfree(str); -} - -/* Set some environment variables with current state */ -static int _set_umask_env(void) -{ - if (!getenv("SRUN_DEBUG")) { /* do not change current value */ - /* NOTE: Default debug level is 3 (info) */ - int log_level = LOG_LEVEL_INFO + _verbose - opt.quiet; - - if (setenvf(NULL, "SRUN_DEBUG", "%d", log_level) < 0) - error ("unable to set SRUN_DEBUG in environment"); - } - - if (!getenv("SLURM_UMASK")) { /* do not change current value */ - char mask_char[5]; - mode_t mask; - - mask = (int)umask(0); - umask(mask); - - sprintf(mask_char, "0%d%d%d", - ((mask>>6)&07), ((mask>>3)&07), mask&07); - if (setenvf(NULL, "SLURM_UMASK", "%s", mask_char) < 0) { - error ("unable to set SLURM_UMASK in environment"); - return SLURM_FAILURE; - } - debug ("propagating UMASK=%s", mask_char); - } - - return SLURM_SUCCESS; -} - -/* Set SLURM_SUBMIT_DIR environment variable with current state */ -static void _set_submit_dir_env(void) -{ - char buf[MAXPATHLEN + 1]; - - if ((getcwd(buf, MAXPATHLEN)) == NULL) { - error("getcwd failed: %m"); - exit(error_exit); - } - - if (setenvf(NULL, "SLURM_SUBMIT_DIR", "%s", buf) < 0) { - error("unable to set SLURM_SUBMIT_DIR in environment"); - return; - } -} - -/* - * _set_prio_process_env - * - * Set the internal SLURM_PRIO_PROCESS environment variable to support - * the propagation of the users nice value and the "PropagatePrioProcess" - * config keyword. - */ -static void _set_prio_process_env(void) -{ - int retval; - - errno = 0; /* needed to detect a real failure since prio can be -1 */ - - if ((retval = getpriority (PRIO_PROCESS, 0)) == -1) { - if (errno) { - error ("getpriority(PRIO_PROCESS): %m"); - return; - } - } - - if (setenvf (NULL, "SLURM_PRIO_PROCESS", "%d", retval) < 0) { - error ("unable to set SLURM_PRIO_PROCESS in environment"); - return; - } - - debug ("propagating SLURM_PRIO_PROCESS=%d", retval); -} - static void _set_exit_code(void) { int i; @@ -688,113 +351,6 @@ static void _set_exit_code(void) } } -static void _set_env_vars(resource_allocation_response_msg_t *resp) -{ - char *tmp; - - if (!getenv("SLURM_JOB_CPUS_PER_NODE")) { - tmp = uint32_compressed_to_str(resp->num_cpu_groups, - resp->cpus_per_node, - resp->cpu_count_reps); - if (setenvf(NULL, "SLURM_JOB_CPUS_PER_NODE", "%s", tmp) < 0) { - error("unable to set SLURM_JOB_CPUS_PER_NODE in " - "environment"); - } - xfree(tmp); - } - - if (resp->alias_list) { - if (setenv("SLURM_NODE_ALIASES", resp->alias_list, 1) < 0) { - error("unable to set SLURM_NODE_ALIASES in " - "environment"); - } - } else { - unsetenv("SLURM_NODE_ALIASES"); - } - - return; -} - -static int _validate_relative(resource_allocation_response_msg_t *resp) -{ - - if (opt.relative_set && - ((opt.relative + opt.min_nodes) > resp->node_cnt)) { - if (opt.nodes_set_opt) { /* -N command line option used */ - error("--relative and --nodes option incompatible " - "with count of allocated nodes (%d+%d>%d)", - opt.relative, opt.min_nodes, resp->node_cnt); - } else { /* SLURM_NNODES option used */ - error("--relative and SLURM_NNODES option incompatible " - "with count of allocated nodes (%d+%d>%d)", - opt.relative, opt.min_nodes, resp->node_cnt); - } - return -1; - } - return 0; -} - -/* Set SLURM_RLIMIT_* environment variables with current resource - * limit values, reset RLIMIT_NOFILE to maximum possible value */ -static int _set_rlimit_env(void) -{ - int rc = SLURM_SUCCESS; - struct rlimit rlim[1]; - unsigned long cur; - char name[64], *format; - slurm_rlimits_info_t *rli; - - /* Modify limits with any command-line options */ - if (opt.propagate && parse_rlimits( opt.propagate, PROPAGATE_RLIMITS)){ - error( "--propagate=%s is not valid.", opt.propagate ); - exit(error_exit); - } - - for (rli = get_slurm_rlimits_info(); rli->name != NULL; rli++ ) { - - if (rli->propagate_flag != PROPAGATE_RLIMITS) - continue; - - if (getrlimit (rli->resource, rlim) < 0) { - error ("getrlimit (RLIMIT_%s): %m", rli->name); - rc = SLURM_FAILURE; - continue; - } - - cur = (unsigned long) rlim->rlim_cur; - snprintf(name, sizeof(name), "SLURM_RLIMIT_%s", rli->name); - if (opt.propagate && rli->propagate_flag == PROPAGATE_RLIMITS) - /* - * Prepend 'U' to indicate user requested propagate - */ - format = "U%lu"; - else - format = "%lu"; - - if (setenvf (NULL, name, format, cur) < 0) { - error ("unable to set %s in environment", name); - rc = SLURM_FAILURE; - continue; - } - - debug ("propagating RLIMIT_%s=%lu", rli->name, cur); - } - - /* - * Now increase NOFILE to the max available for this srun - */ - if (getrlimit (RLIMIT_NOFILE, rlim) < 0) - return (error ("getrlimit (RLIMIT_NOFILE): %m")); - - if (rlim->rlim_cur < rlim->rlim_max) { - rlim->rlim_cur = rlim->rlim_max; - if (setrlimit (RLIMIT_NOFILE, rlim) < 0) - return (error ("Unable to increase max no. files: %m")); - } - - return rc; -} - static void _set_node_alias(void) { char *aliases, *save_ptr = NULL, *tmp; @@ -818,311 +374,9 @@ static void _set_node_alias(void) xfree(aliases); } -static int _become_user (void) -{ - char *user = uid_to_string(opt.uid); - gid_t gid = gid_from_uid(opt.uid); - - if (strcmp(user, "nobody") == 0) { - xfree(user); - return (error ("Invalid user id %u: %m", opt.uid)); - } - - if (opt.uid == getuid ()) { - xfree(user); - return (0); - } - - if ((opt.egid != (gid_t) -1) && (setgid (opt.egid) < 0)) { - xfree(user); - return (error ("setgid: %m")); - } - - initgroups (user, gid); /* Ignore errors */ - xfree(user); - - if (setuid (opt.uid) < 0) - return (error ("setuid: %m")); - - return (0); -} - -static void _run_srun_prolog (srun_job_t *job) -{ - int rc; - - if (opt.prolog && strcasecmp(opt.prolog, "none") != 0) { - rc = _run_srun_script(job, opt.prolog); - debug("srun prolog rc = %d", rc); - } -} - -static void _run_srun_epilog (srun_job_t *job) -{ - int rc; - - if (opt.epilog && strcasecmp(opt.epilog, "none") != 0) { - rc = _run_srun_script(job, opt.epilog); - debug("srun epilog rc = %d", rc); - } -} - -static int _run_srun_script (srun_job_t *job, char *script) -{ - int status; - pid_t cpid; - int i; - char **args = NULL; - - if (script == NULL || script[0] == '\0') - return 0; - - if (access(script, R_OK | X_OK) < 0) { - info("Access denied for %s: %m", script); - return 0; - } - - if ((cpid = fork()) < 0) { - error ("run_srun_script: fork: %m"); - return -1; - } - if (cpid == 0) { - - /* set the scripts command line arguments to the arguments - * for the application, but shifted one higher - */ - args = xmalloc(sizeof(char *) * 1024); - args[0] = script; - for (i = 0; i < opt.argc; i++) { - args[i+1] = opt.argv[i]; - } - args[i+1] = NULL; - execv(script, args); - error("help! %m"); - exit(127); - } - - do { - if (waitpid(cpid, &status, 0) < 0) { - if (errno == EINTR) - continue; - error("waitpid: %m"); - return 0; - } else - return status; - } while(1); - - /* NOTREACHED */ -} - static void _pty_restore(void) { /* STDIN is probably closed by now */ if (tcsetattr(STDOUT_FILENO, TCSANOW, &termdefaults) < 0) fprintf(stderr, "tcsetattr: %s\n", strerror(errno)); } - -/* opt.exclusive is set, disable user task layout controls */ -static void _step_opt_exclusive(void) -{ - if (!opt.ntasks_set) { - error("--ntasks must be set with --exclusive"); - exit(error_exit); - } - if (opt.relative_set) { - error("--relative disabled, incompatible with --exclusive"); - exit(error_exit); - } - if (opt.exc_nodes) { - error("--exclude is incompatible with --exclusive"); - exit(error_exit); - } -} - -/* Return the number of microseconds between tv1 and tv2 with a maximum - * a maximum value of 10,000,000 to prevent overflows */ -static long _diff_tv_str(struct timeval *tv1,struct timeval *tv2) -{ - long delta_t; - - delta_t = MIN((tv2->tv_sec - tv1->tv_sec), 10); - delta_t *= 1000000; - delta_t += tv2->tv_usec - tv1->tv_usec; - return delta_t; -} - -static void _handle_intr(void) -{ - static struct timeval last_intr = { 0, 0 }; - static struct timeval last_intr_sent = { 0, 0 }; - struct timeval now; - - gettimeofday(&now, NULL); - if (!opt.quit_on_intr && (_diff_tv_str(&last_intr, &now) > 1000000)) { - if (opt.disable_status) { - info("sending Ctrl-C to job %u.%u", - job->jobid, job->stepid); - launch_g_fwd_signal(SIGINT); - } else if (job->state < SRUN_JOB_FORCETERM) { - info("interrupt (one more within 1 sec to abort)"); - launch_g_print_status(); - } else { - info("interrupt (abort already in progress)"); - launch_g_print_status(); - } - last_intr = now; - } else { /* second Ctrl-C in half as many seconds */ - update_job_state(job, SRUN_JOB_CANCELLED); - /* terminate job */ - if (job->state < SRUN_JOB_FORCETERM) { - if (_diff_tv_str(&last_intr_sent, &now) < 1000000) { - job_force_termination(job); - launch_g_fwd_signal(SIGKILL); - return; - } - - info("sending Ctrl-C to job %u.%u", - job->jobid, job->stepid); - last_intr_sent = now; - launch_g_fwd_signal(SIGINT); - } else - job_force_termination(job); - - launch_g_fwd_signal(SIGKILL); - } -} -static void _default_sigaction(int sig) -{ - struct sigaction act; - if (sigaction(sig, NULL, &act)) { - error("sigaction(%d): %m", sig); - return; - } - if (act.sa_handler != SIG_IGN) - return; - - act.sa_handler = SIG_DFL; - if (sigaction(sig, &act, NULL)) - error("sigaction(%d): %m", sig); -} - -static void _handle_pipe(void) -{ - static int ending = 0; - - if (ending) - return; - ending = 1; - launch_g_fwd_signal(SIGKILL); -} - -/* _srun_signal_mgr - Process daemon-wide signals */ -static void *_srun_signal_mgr(void *no_data) -{ - int sig; - int i, rc; - sigset_t set; - - /* Make sure no required signals are ignored (possibly inherited) */ - for (i = 0; sig_array[i]; i++) - _default_sigaction(sig_array[i]); - while (!srun_shutdown) { - xsignal_sigset_create(sig_array, &set); - rc = sigwait(&set, &sig); - if (rc == EINTR) - continue; - switch (sig) { - case SIGINT: - if (!srun_shutdown) - _handle_intr(); - break; - case SIGQUIT: - info("Quit"); - /* continue with slurm_step_launch_abort */ - case SIGTERM: - case SIGHUP: - /* No need to call job_force_termination here since we - * are ending the job now and we don't need to update - * the state. */ - info("forcing job termination"); - launch_g_fwd_signal(SIGKILL); - break; - case SIGCONT: - info("got SIGCONT"); - break; - case SIGPIPE: - _handle_pipe(); - break; - case SIGALRM: - if (srun_max_timer) { - info("First task exited %ds ago", opt.max_wait); - launch_g_print_status(); - launch_g_step_terminate(); - } - break; - default: - launch_g_fwd_signal(sig); - break; - } - } - return NULL; -} - -static void _shepard_notify(int shepard_fd) -{ - int rc; - - while (1) { - rc = write(shepard_fd, "", 1); - if (rc == -1) { - if ((errno == EAGAIN) || (errno == EINTR)) - continue; - error("write(shepard): %m"); - } - break; - } - close(shepard_fd); -} - -static int _shepard_spawn(srun_job_t *job, bool got_alloc) -{ - int shepard_pipe[2], rc; - pid_t shepard_pid; - char buf[1]; - - if (pipe(shepard_pipe)) { - error("pipe: %m"); - return -1; - } - - shepard_pid = fork(); - if (shepard_pid == -1) { - error("fork: %m"); - return -1; - } - if (shepard_pid != 0) { - close(shepard_pipe[0]); - return shepard_pipe[1]; - } - - /* Wait for parent to notify of completion or I/O error on abort */ - close(shepard_pipe[1]); - while (1) { - rc = read(shepard_pipe[0], buf, 1); - if (rc == 1) { - exit(0); - } else if (rc == 0) { - break; /* EOF */ - } else if (rc == -1) { - if ((errno == EAGAIN) || (errno == EINTR)) - continue; - break; - } - } - - (void) slurm_terminate_job_step(job->jobid, job->stepid); - if (got_alloc) - slurm_complete_job(job->jobid, NO_VAL); - exit(0); - return -1; -} -- GitLab From 817e3680a174ff4290bee3ee7d26f795446f007a Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 14 Jun 2012 16:28:33 -0700 Subject: [PATCH 428/614] indent correctly --- src/srun/libsrun/srun_job.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c index 386a6b2c51..f186bad911 100644 --- a/src/srun/libsrun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -147,8 +147,8 @@ job_create_noalloc(void) } srand48(getpid()); ai->jobid = MIN_NOALLOC_JOBID + - ((uint32_t) lrand48() % - (MAX_NOALLOC_JOBID - MIN_NOALLOC_JOBID + 1)); + ((uint32_t) lrand48() % + (MAX_NOALLOC_JOBID - MIN_NOALLOC_JOBID + 1)); ai->stepid = (uint32_t) (lrand48()); ai->nodelist = opt.nodelist; ai->nnodes = hostlist_count(hl); @@ -166,7 +166,7 @@ job_create_noalloc(void) job_update_io_fnames(job); - error: +error: xfree(ai); return (job); @@ -786,7 +786,7 @@ _job_create_structure(allocation_info_t *ainfo) job->ntasks = opt.ntasks; for (i=0; inum_cpu_groups; i++) { job->cpu_count += ainfo->cpus_per_node[i] * - ainfo->cpu_count_reps[i]; + ainfo->cpu_count_reps[i]; } job->rc = -1; -- GitLab From 74a08b9bc48a5f1aadab722bceea6601292fb8bb Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 14 Jun 2012 16:29:13 -0700 Subject: [PATCH 429/614] NEWS for 2 commits ago --- NEWS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NEWS b/NEWS index c768541b1b..fcad298e84 100644 --- a/NEWS +++ b/NEWS @@ -12,6 +12,8 @@ documents those changes that are of interest to users and admins. be accepted, but is no longer documented. -- Permit more than 100 jobs to be scheduled per node (new limit is 10,000 jobs). + -- Restructure of srun code to allow outside programs to utilize existing + logic. * Changes in SLURM 2.4.0.rc2 ============================= -- GitLab From 6d064d1e02fbb3d2832e512e205c394edbaceb64 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 15 Jun 2012 09:49:20 -0700 Subject: [PATCH 430/614] Clarify PrologSlurmctld configuration parameter use --- doc/man/man5/slurm.conf.5 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 8dc9d77778..6317936993 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1169,6 +1169,12 @@ resources for use. While this program is running, the nodes associated with the job will be have a POWER_UP/CONFIGURING flag set in their state, which can be readily viewed. +The slurmctld daemon will wait indefinitely for this program to complete. +Once the program completes with an exit code of zero, the nodes will be +considered ready for use and the program will be started. +If some node can not be made available for use, the program should drain +the node (typically using the scontrol command) and terminate with a non\-zero +exit code. A non\-zero exit code will result in the job being requeued (where possible) or killed. See \fBProlog and Epilog Scripts\fR for more information. -- GitLab From c8f4d22b78c86e9fc890386b8eb7160439a10bcf Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 15 Jun 2012 11:10:29 -0700 Subject: [PATCH 431/614] switch/nrt remove instance count support using parenthesis after protocol type If multiple network instances are required, then use the instance=# option rather than parenthesis after the protocol name. This is far simpler especially if someone specifies different prococols with difference instance counts or specifies an instance count in both places (after protocol name plus using instance=#). --- doc/man/man1/salloc.1 | 26 +++++++++----------------- doc/man/man1/sbatch.1 | 26 +++++++++----------------- doc/man/man1/srun.1 | 26 +++++++++----------------- src/plugins/switch/nrt/nrt.c | 25 ++++--------------------- 4 files changed, 31 insertions(+), 72 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 32f614534c..d9eff837ca 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -765,18 +765,15 @@ Use Internet Protocol (IP) version 4 communications (default). \fBIPV6\fR Use Internet Protocol (IP) version 6 communications. .TP -\fBLAPI\fR [(\fIcount\fR)] -Use the LAPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBLAPI\fR +Use the LAPI protocol. .TP -\fBMPI\fR [(\fIcount\fR)] -Use the MPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBMPI\fR +Use the MPI protocol. MPI is the default protocol. .TP -\fBPAMI\fR [(\fIcount\fR)] -Use the PAMI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBPAMI\fR +Use the PAMI protocol. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -784,9 +781,8 @@ Use all available switch networks (default). \fBSN_SINGLE\fR Use one available switch network. .TP -\fBUPC\fR [(\fIcount\fR)] -Use the UPC protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBUPC\fR +Use the UPC protocol. .TP \fBUS\fR Use User Space communications. @@ -801,11 +797,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI(2),SN_ALL\fR -Create two user space connections for MPI communications on every switch -network for each task. This is a variation on the above example. -.TP -\fBUS,MPI(3),IB\fR +\fBUS,MPI,Instances=3,IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 91fc5db2e7..d6fd2db3fa 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -829,18 +829,15 @@ Use Internet Protocol (IP) version 4 communications (default). \fBIPV6\fR Use Internet Protocol (IP) version 6 communications. .TP -\fBLAPI\fR [(\fIcount\fR)] -Use the LAPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBLAPI\fR +Use the LAPI protocol. .TP -\fBMPI\fR [(\fIcount\fR)] -Use the MPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBMPI\fR +Use the MPI protocol. MPI is the default protocol. .TP -\fBPAMI\fR [(\fIcount\fR)] -Use the PAMI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBPAMI\fR +Use the PAMI protocol. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -848,9 +845,8 @@ Use all available switch networks (default). \fBSN_SINGLE\fR Use one available switch network. .TP -\fBUPC\fR [(\fIcount\fR)] -Use the UPC protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBUPC\fR +Use the UPC protocol. .TP \fBUS\fR Use User Space communications. @@ -865,11 +861,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI(2),SN_ALL\fR -Create two user space connections for MPI communications on every switch -network for each task. This is a variation on the above example. -.TP -\fBUS,MPI(3),IB\fR +\fBUS,MPI,Instances=3,IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index a46fbfa97f..80e668654f 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -867,18 +867,15 @@ Use Internet Protocol (IP) version 4 communications (default). \fBIPV6\fR Use Internet Protocol (IP) version 6 communications. .TP -\fBLAPI\fR [(\fIcount\fR)] -Use the LAPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBLAPI\fR +Use the LAPI protocol. .TP -\fBMPI\fR [(\fIcount\fR)] -Use the MPI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBMPI\fR +Use the MPI protocol. MPI is the default protocol. .TP -\fBPAMI\fR [(\fIcount\fR)] -Use the PAMI protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBPAMI\fR +Use the PAMI protocol. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -886,9 +883,8 @@ Use all available switch networks (default). \fBSN_SINGLE\fR Use one available switch network. .TP -\fBUPC\fR [(\fIcount\fR)] -Use the UPC protocol. Optionally specify the number of network connections -with this protocol for each task. Default count is 1. +\fBUPC\fR +Use the UPC protocol. .TP \fBUS\fR Use User Space communications. @@ -903,11 +899,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI(2),SN_ALL\fR -Create two user space connections for MPI communications on every switch -network for each task. This is a variation on the above example. -.TP -\fBUS,MPI(3),IB\fR +\fBUS,MPI,Instances=3,IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d0381d8f31..0ad736ddbe 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -161,7 +161,6 @@ typedef struct { typedef struct nrt_protocol_info { char protocol_name[NRT_MAX_PROTO_NAME_LEN]; - int protocol_cnt; /* Instances of this protocol */ } nrt_protocol_info_t; typedef struct nrt_protocol_table { nrt_protocol_info_t protocol_table[NRT_MAX_PROTO_CNT]; @@ -2136,13 +2135,13 @@ _next_key(void) return key; } -/* Translate a protocol string (e.g. "lapi(2),mpi" into a table. +/* Translate a protocol string (e.g. "lapi,mpi" into a table. * Caller must free returned value. */ static nrt_protocol_table_t *_get_protocol_table(char *protocol) { nrt_protocol_table_t *protocol_table; - char *paren_ptr, *protocol_str, *save_ptr = NULL, *token; - int protocol_cnt, i; + char *protocol_str, *save_ptr = NULL, *token; + int i; protocol_table = xmalloc(sizeof(nrt_protocol_table_t)); @@ -2151,32 +2150,16 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) protocol_str = xstrdup(protocol); token = strtok_r(protocol_str, ",", &save_ptr); while (token) { - paren_ptr = strchr(token, '('); - if (paren_ptr) { - protocol_cnt = atoi(paren_ptr+1); - if (protocol_cnt == 0) { - verbose("switch/nrt: invalid job protocol: %s", - protocol); - break; - } - paren_ptr[0] = '\0'; /* end string before '(' */ - } else - protocol_cnt = 1; for (i = 0; i < protocol_table->protocol_table_cnt; i++) { if (!strcmp(token, protocol_table->protocol_table[i]. - protocol_name)) { - protocol_table->protocol_table[i]. - protocol_cnt += protocol_cnt; + protocol_name)) break; - } } if ((i >= protocol_table->protocol_table_cnt) && (i < NRT_MAX_PROTO_CNT)) { /* Need to add new protocol type */ strncpy(protocol_table->protocol_table[i].protocol_name, token, NRT_MAX_PROTO_NAME_LEN); - protocol_table->protocol_table[i].protocol_cnt = - protocol_cnt; protocol_table->protocol_table_cnt++; } token = strtok_r(NULL, ",", &save_ptr); -- GitLab From ee753e09c7d49e99e42e22dded7a136b7c4dd865 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 15 Jun 2012 11:49:22 -0700 Subject: [PATCH 432/614] BLUEGENE - update documentation for block state changing --- doc/man/man1/scontrol.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 0d7147855f..b1ba7287fc 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1211,7 +1211,7 @@ Bluegene systems only! \fIBlockName\fP= Identify the bluegene block to be updated. This specification is required. .TP -\fIState\fP= +\fIState\fP= This will update the state of a bluegene block to either FREE or ERROR. (i.e. update BlockName=RMP0 STATE=ERROR) State error will not allow jobs to run on the block. \fBWARNING!!!!\fR This will cancel any -- GitLab From 4467bc64dd95e4e51886e7b345a0afa24a209d2e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 15 Jun 2012 11:50:02 -0700 Subject: [PATCH 433/614] BGQ - update runjob launch plugin to work correctly under code switch --- src/plugins/launch/runjob/launch_runjob.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/launch/runjob/launch_runjob.c b/src/plugins/launch/runjob/launch_runjob.c index 4ac1e195bf..e4bb674d78 100644 --- a/src/plugins/launch/runjob/launch_runjob.c +++ b/src/plugins/launch/runjob/launch_runjob.c @@ -39,13 +39,14 @@ # include "config.h" #endif +#include "src/common/proc_args.h" #include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_auth.h" #include "src/api/step_ctx.h" #include "src/api/step_launch.h" -#include "src/srun/launch.h" +#include "src/srun/libsrun/launch.h" #include "src/plugins/launch/runjob/runjob_interface.h" @@ -94,7 +95,7 @@ static void _send_step_complete_rpc(int step_rc) msg.range_first = 0; msg.range_last = 0; msg.step_rc = step_rc; - msg.jobacct = jobacct_gather_g_create(NULL); + msg.jobacct = jobacctinfo_create(NULL); slurm_msg_t_init(&req); req.msg_type = REQUEST_STEP_COMPLETE; @@ -104,7 +105,7 @@ static void _send_step_complete_rpc(int step_rc) debug3("Sending step complete RPC to slurmctld"); if (slurm_send_recv_controller_rc_msg(&req, &rc) < 0) error("Error sending step complete RPC to slurmctld"); - jobacct_gather_g_destroy(msg.jobacct); + jobacctinfo_destroy(msg.jobacct); } static void @@ -287,7 +288,7 @@ extern int launch_p_setup_srun_opt(char **rest) opt.argv = (char **) xmalloc((opt.argc + 2) * sizeof(char *)); if (!opt.test_only) { - i = 0; + int i = 0; /* First arg has to be something when sending it to the runjob api. This can be anything, srun seemed most logical, but it doesn't matter. -- GitLab From 090ea2807e4b949ce2107c6b7d021534d474c416 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 15 Jun 2012 13:17:34 -0700 Subject: [PATCH 434/614] Minor test changes for configured Epilog delay --- testsuite/expect/test1.43 | 4 ++++ testsuite/expect/test12.2 | 2 +- testsuite/expect/test12.4 | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/testsuite/expect/test1.43 b/testsuite/expect/test1.43 index cbd3e691d4..35a69390d1 100755 --- a/testsuite/expect/test1.43 +++ b/testsuite/expect/test1.43 @@ -46,6 +46,7 @@ if {[test_cray]} { # # Spawn a srun jobs with ever larger node counts # +set alloc_fail 0 set timeout 60 for {set node_cnt 1} {$node_cnt > 0} {set node_cnt [expr $node_cnt * 2]} { set srun_pid [spawn $srun --test-only -N$node_cnt -t1 $bin_printenv SLURMD_NODENAME] @@ -55,6 +56,7 @@ for {set node_cnt 1} {$node_cnt > 0} {set node_cnt [expr $node_cnt * 2]} { exp_continue } -re "allocation failure" { + set alloc_fail 1 set node_cnt 0 exp_continue } @@ -77,6 +79,8 @@ for {set node_cnt 1} {$node_cnt > 0} {set node_cnt [expr $node_cnt * 2]} { if {$jobs_run == 0} { send_user "\nFAILURE: No jobs run\n" set exit_code 1 +} elseif {$alloc_fail == 1} { + send_user "\nError expected. No worries.\n" } if {$exit_code == 0} { diff --git a/testsuite/expect/test12.2 b/testsuite/expect/test12.2 index c7100ec633..f1fc880e5d 100755 --- a/testsuite/expect/test12.2 +++ b/testsuite/expect/test12.2 @@ -221,7 +221,7 @@ if {[wait_for_job $job_id "RUNNING"] != 0} { } # Wait for data to get logged -exec $bin_sleep 5 +exec $bin_sleep 10 if {[_get_mem $sstat] != 0} { set exit_code 1 diff --git a/testsuite/expect/test12.4 b/testsuite/expect/test12.4 index da865f9191..da3624c161 100755 --- a/testsuite/expect/test12.4 +++ b/testsuite/expect/test12.4 @@ -186,7 +186,7 @@ if {$job_id == 0} { } if { $using_slurmdbd } { - sleep 5 + sleep 10 } -- GitLab From 8f8ad9b3e0d2aeb6ea13c5d9989acf0156d6f59e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 15 Jun 2012 14:17:07 -0700 Subject: [PATCH 435/614] switch/nrt add some support for multiple protocols and instances If the user's network specification includes "sn_single" or a specific adapter name, this adds support for multiple protocols and an instance count. Support is still lacking for "sn_all" and limited testing has been done. --- src/plugins/switch/nrt/nrt.c | 186 +++++++++++++++++++++-------------- 1 file changed, 110 insertions(+), 76 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 0ad736ddbe..0cbdf6a44e 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -181,7 +181,8 @@ static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - char *protocol_name, nrt_logical_id_t base_lid); + nrt_protocol_table_t *protocol_table, int instances, + nrt_logical_id_t base_lid); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -916,8 +917,8 @@ static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, - int network_id, char *protocol_name, - nrt_logical_id_t base_lid) + int network_id, nrt_protocol_table_t *protocol_table, + int instances, nrt_logical_id_t base_lid) { nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; @@ -927,12 +928,13 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter = NULL; slurm_nrt_window_t *window; - int i; + int i, table_inx; + nrt_context_id_t context_id; + nrt_table_id_t table_id; assert(tableinfo); assert(hostname); - debug("in _allocate_window_single"); node = _find_node(nrt_state, hostname); if (node == NULL) { error("Failed to find node in node_list: %s", hostname); @@ -979,71 +981,87 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, return SLURM_ERROR; } - if (user_space) { - /* Reserve a window on the adapter for this task */ - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; - } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - } + table_inx = -1; + for (context_id = 0; context_id < protocol_table->protocol_table_cnt; + context_id++) { + for (table_id = 0; table_id < instances; table_id++) { + table_inx++; + if (user_space) { + /* Reserve a window on the adapter for task */ + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s " + "adapter %s", + node->name, + adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; + } - if (!user_space) { - nrt_ip_task_info_t *ip_table; - ip_table = (nrt_ip_task_info_t *) tableinfo[0].table; - ip_table += task_id; - ip_table->node_number = node_number; - ip_table->task_id = task_id; - if (ip_v4) { - memcpy(&ip_table->ip.ipv4_addr, - &adapter->ipv4_addr, sizeof(in_addr_t)); - } else { - memcpy(&ip_table->ip.ipv6_addr, - &adapter->ipv6_addr, sizeof(struct in6_addr)); - } - } else if (adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_table; - ib_table = (nrt_ib_task_info_t *) tableinfo[0].table; - ib_table += task_id; - strncpy(ib_table->device_name, adapter_name, - NRT_MAX_DEVICENAME_SIZE); - ib_table += task_id; - ib_table->base_lid = base_lid; - ib_table->port_id = 1; - ib_table->lmc = 0; - ib_table->node_number = node_number; - ib_table->task_id = task_id; - ib_table->win_id = window->window_id; - } else if (adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_table; - hfi_table = (nrt_hfi_task_info_t *) tableinfo[0].table; - hfi_table += task_id; - hfi_table->task_id = task_id; - hfi_table->win_id = window->window_id; - } else if ((adapter_type == NRT_HPCE) || - (adapter_type == NRT_KMUX)) { - nrt_hpce_task_info_t *hpce_table; - hpce_table = (nrt_hpce_task_info_t *) tableinfo[0].table; - hpce_table += task_id; - hpce_table->task_id = task_id; - hpce_table->win_id = window->window_id; - } else { - error("Missing support for adapter type %s", - _adapter_type_str(adapter_type)); - } + if (!user_space) { + nrt_ip_task_info_t *ip_table; + ip_table = (nrt_ip_task_info_t *) + tableinfo[table_inx].table; + ip_table += task_id; + ip_table->node_number = node_number; + ip_table->task_id = task_id; + if (ip_v4) { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, + sizeof(in_addr_t)); + } else { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, + sizeof(struct in6_addr)); + } + } else if (adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_table; + ib_table = (nrt_ib_task_info_t *) + tableinfo[table_inx].table; + ib_table += task_id; + strncpy(ib_table->device_name, adapter_name, + NRT_MAX_DEVICENAME_SIZE); + ib_table->base_lid = base_lid; + ib_table->port_id = 1; + ib_table->lmc = 0; + ib_table->node_number = node_number; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; + } else if (adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_table; + hfi_table = (nrt_hfi_task_info_t *) + tableinfo[table_inx].table; + hfi_table += task_id; + hfi_table->task_id = task_id; + hfi_table->win_id = window->window_id; + } else if ((adapter_type == NRT_HPCE) || + (adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_table; + hpce_table = (nrt_hpce_task_info_t *) + tableinfo[table_inx].table; + hpce_table += task_id; + hpce_table->task_id = task_id; + hpce_table->win_id = window->window_id; + } else { + error("Missing support for adapter type %s", + _adapter_type_str(adapter_type)); + } - strncpy(tableinfo[0].adapter_name, adapter_name, - NRT_MAX_ADAPTER_NAME_LEN); - tableinfo[0].adapter_type = adapter->adapter_type; - tableinfo[0].network_id = adapter->network_id; - strncpy(tableinfo[0].protocol_name, protocol_name, - NRT_MAX_PROTO_NAME_LEN); -/* FIXME: Need to set context_id & table_id */ - tableinfo[0].context_id = 0; - tableinfo[0].table_id = 0; + strncpy(tableinfo[table_inx].adapter_name, adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[table_inx].adapter_type = adapter-> + adapter_type; + tableinfo[table_inx].network_id = adapter->network_id; + strncpy(tableinfo[table_inx].protocol_name, + protocol_table->protocol_table[context_id]. + protocol_name, + NRT_MAX_PROTO_NAME_LEN); + tableinfo[table_inx].context_id = context_id; + tableinfo[table_inx].table_id = table_id; + } + } return SLURM_SUCCESS; } @@ -2165,8 +2183,6 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) token = strtok_r(NULL, ",", &save_ptr); } xfree(protocol_str); - if (protocol_table->protocol_table_cnt == 0) - xfree(protocol_table); return protocol_table; } @@ -2195,7 +2211,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; int table_rec_len = 0; - nrt_protocol_table_t *protocol_table; + nrt_protocol_table_t *protocol_table = NULL; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2218,10 +2234,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, jp->nodenames = hostlist_copy(hl); jp->num_tasks = nprocs; jp->user_space = (uint8_t) user_space; - protocol_table = _get_protocol_table(protocol); - xfree(protocol_table); - - hi = hostlist_iterator_create(hl); /* * Peek at the first host to figure out tables_per_task and adapter @@ -2229,6 +2241,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, * adapters per node. Bad things will happen if this assumption is * incorrect. */ + hi = hostlist_iterator_create(hl); host = hostlist_next(hi); _lock(); node = _find_node(nrt_state, host); @@ -2273,6 +2286,23 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if (jp->tables_per_task == 0) return SLURM_FAILURE; + if (instances <= 0) { + info("switch/nrt: invalid instances specification (%d)", + instances); + return SLURM_FAILURE; + } + jp->tables_per_task *= instances; + + protocol_table = _get_protocol_table(protocol); + if ((protocol_table == NULL) || + (protocol_table->protocol_table_cnt <= 0)) { + info("switch/nrt: invalid protcol specification (%s)", + protocol); + xfree(protocol_table); + return SLURM_FAILURE; + } + jp->tables_per_task *= protocol_table->protocol_table_cnt; + /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * sizeof(nrt_tableinfo_t)); @@ -2307,6 +2337,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, error("Failed to get next host"); for (j = 0; j < tasks_per_node[i]; j++) { + if (adapter_name == NULL) { rc = _allocate_windows_all(jp, host, i, tids[i][j], @@ -2320,7 +2351,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, tids[i][j], adapter_type, network_id, - protocol, + protocol_table, + instances, base_lid); } if (rc != SLURM_SUCCESS) { @@ -2339,11 +2371,13 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, #endif hostlist_iterator_destroy(hi); + xfree(protocol_table); return SLURM_SUCCESS; fail: free(host); hostlist_iterator_destroy(hi); + xfree(protocol_table); /* slurmctld will call nrt_free_jobinfo on jp */ return SLURM_FAILURE; } -- GitLab From 1b7035dcbad2fa07d3efd7bd47ca88eb15611e05 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 18 Jun 2012 09:52:12 -0700 Subject: [PATCH 436/614] BGQ - fix for if a request comes in smaller than the smallest block and we must use a small block instead of a shared midplane block. --- NEWS | 2 ++ .../select/bluegene/bg_dynamic_block.c | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/NEWS b/NEWS index fed0ded0c4..8abb1fd42a 100644 --- a/NEWS +++ b/NEWS @@ -35,6 +35,8 @@ documents those changes that are of interest to users and admins. -- BGQ - quiter debug when the real time server comes back but there are still messages we find when we poll but haven't given it back to the real time yet. + -- BGQ - fix for if a request comes in smaller than the smallest block and + we must use a small block instead of a shared midplane block. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bg_dynamic_block.c b/src/plugins/select/bluegene/bg_dynamic_block.c index d8d9ef8744..db6f845278 100644 --- a/src/plugins/select/bluegene/bg_dynamic_block.c +++ b/src/plugins/select/bluegene/bg_dynamic_block.c @@ -44,7 +44,7 @@ static int _split_block(List block_list, List new_blocks, static int _breakup_blocks(List block_list, List new_blocks, select_ba_request_t *request, List my_block_list, - bool only_free, bool only_small); + int cnodes, bool only_free, bool only_small); /* * create_dynamic_block - create new block(s) to be used for a new @@ -65,9 +65,13 @@ extern List create_dynamic_block(List block_list, bitstr_t *my_bitmap = NULL; select_ba_request_t blockreq; int cnodes = request->procs / bg_conf->cpu_ratio; - int orig_cnodes = cnodes; + int orig_cnodes; uint16_t start_geo[SYSTEM_DIMENSIONS]; + if (cnodes < bg_conf->smallest_block) + cnodes = bg_conf->smallest_block; + orig_cnodes = cnodes; + if (bg_conf->sub_blocks && (cnodes < bg_conf->mp_cnode_cnt)) { cnodes = bg_conf->mp_cnode_cnt; } else if (cnodes < bg_conf->smallest_block) { @@ -258,21 +262,21 @@ try_small_again: /* check only blocks that are free and small */ if (_breakup_blocks(block_list, new_blocks, request, my_block_list, - true, true) + cnodes, true, true) == SLURM_SUCCESS) goto finished; /* check only blocks that are free and any size */ if (_breakup_blocks(block_list, new_blocks, request, my_block_list, - true, false) + cnodes, true, false) == SLURM_SUCCESS) goto finished; /* check usable blocks that are small with any state */ if (_breakup_blocks(block_list, new_blocks, request, my_block_list, - false, true) + cnodes, false, true) == SLURM_SUCCESS) goto finished; @@ -284,7 +288,7 @@ try_small_again: */ /* if (_breakup_blocks(block_list, new_blocks, */ /* request, my_block_list, */ - /* false, false) */ + /* cnodes, false, false) */ /* == SLURM_SUCCESS) */ /* goto finished; */ @@ -778,7 +782,7 @@ finished: static int _breakup_blocks(List block_list, List new_blocks, select_ba_request_t *request, List my_block_list, - bool only_free, bool only_small) + int cnodes, bool only_free, bool only_small) { int rc = SLURM_ERROR; bg_record_t *bg_record = NULL; @@ -786,7 +790,6 @@ static int _breakup_blocks(List block_list, List new_blocks, int total_cnode_cnt=0; char start_char[SYSTEM_DIMENSIONS+1]; bitstr_t *ionodes = bit_alloc(bg_conf->ionodes_per_mp); - int cnodes = request->procs / bg_conf->cpu_ratio; int curr_mp_bit = -1; int dim; -- GitLab From cd025504ae03e9d5b838ed5ab811611402f96f4f Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 18 Jun 2012 10:51:32 -0700 Subject: [PATCH 437/614] Fix issues on large jobs (>64k tasks) to have the correct counter type when packing the step layout structure. --- NEWS | 2 ++ src/common/slurm_step_layout.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 8abb1fd42a..7022a487d1 100644 --- a/NEWS +++ b/NEWS @@ -37,6 +37,8 @@ documents those changes that are of interest to users and admins. time yet. -- BGQ - fix for if a request comes in smaller than the smallest block and we must use a small block instead of a shared midplane block. + -- Fix issues on large jobs (>64k tasks) to have the correct counter type when + packing the step layout structure. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index 5bea947358..ac823da727 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -283,7 +283,7 @@ extern slurm_step_layout_t *slurm_step_layout_copy( extern void pack_slurm_step_layout(slurm_step_layout_t *step_layout, Buf buffer, uint16_t protocol_version) { - uint16_t i = 0; + uint32_t i = 0; if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { if (step_layout) -- GitLab From 16cf94c8bb046d1da3a7a8be4fe0676f078740fb Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 18 Jun 2012 12:39:55 -0700 Subject: [PATCH 438/614] update scontrol update block docs. --- doc/man/man1/scontrol.1 | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index b1ba7287fc..a3e3085736 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1204,7 +1204,7 @@ E.g. Users=jones1,smith2. A new reservation must specify Users and/or Accounts. .TP -\fBSPECIFICATIONS FOR UPDATE, BLOCK \fR +\fBSPECIFICATIONS FOR UPDATE BLOCK/SUBMP \fR .TP Bluegene systems only! .TP @@ -1212,12 +1212,31 @@ Bluegene systems only! Identify the bluegene block to be updated. This specification is required. .TP \fIState\fP= -This will update the state of a bluegene block to either FREE or ERROR. -(i.e. update BlockName=RMP0 STATE=ERROR) State error will not allow jobs -to run on the block. \fBWARNING!!!!\fR This will cancel any -running job on the block! On dynamically laid out systems REMOVE will -free and remove the block from the system. If the block is smaller -than a midplane every block on that midplane will be removed. +This will update the state of a bluegene block. +(i.e. update BlockName=RMP0 STATE=ERROR) +\fBWARNING!!!!\fR With the exception of the RESUME state, all other +state values will cancel any running job on the block! +.RS +.TP 10 +\fIFREE\fP +Return the block to a free state. +.TP +\fIERROR\fP +Make it so jobs don't run on the block. +.TP +\fIRECREATE\fP +Destroy the current block and create a new one to take its place. +.TP +\fIREMOVE\fP +Free and remove the block from the system. If the block is smaller +than a midplane every block on that midplane will be removed. (only +available on dynamic laid out systems) +.TP +\fIRESUME\fP +If a block is in ERROR state RESUME will return the block to its +previous usable state (FREE or READY). +.RE + .TP \fISubMPName\fP= Identify the bluegene ionodes to be updated (i.e. bg000[0\-3]). This -- GitLab From 7ecb524dc3c9d7d93a23412f9f9dfb4dafe136e4 Mon Sep 17 00:00:00 2001 From: jette Date: Wed, 20 Jun 2012 09:44:22 -0700 Subject: [PATCH 439/614] Update BLCR web links --- doc/html/checkpoint_blcr.shtml | 4 ++-- doc/html/checkpoint_plugins.shtml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/html/checkpoint_blcr.shtml b/doc/html/checkpoint_blcr.shtml index b400f59278..c5ac40abfb 100644 --- a/doc/html/checkpoint_blcr.shtml +++ b/doc/html/checkpoint_blcr.shtml @@ -4,7 +4,7 @@

        Overview

        SLURM version 2.0 has been integrated with - + Berkeley Lab Checkpoint/Restart (BLCR) in order to provide automatic job checkpoint/restart support. Functionality provided includes: @@ -193,6 +193,6 @@ option at job submit time or scontrol's ImageDir option.

        -

        Last modified 26 March 2012

        +

        Last modified 20 June 2012

        diff --git a/doc/html/checkpoint_plugins.shtml b/doc/html/checkpoint_plugins.shtml index 2e21ec7a57..de5054a43d 100644 --- a/doc/html/checkpoint_plugins.shtml +++ b/doc/html/checkpoint_plugins.shtml @@ -18,7 +18,7 @@ We recommend, for example:

        • aix—AIX system checkpoint.
        • blcr— - + Berkeley Lab Checkpoint/Restart (BLCR)
        • none—No job checkpoint.
        • ompi—OpenMPI checkpoint (requires OpenMPI version 1.3 or higher).
        • @@ -186,6 +186,6 @@ A checkpoint plugin conveys its ability to implement a particular API version using the mechanism outlined for SLURM plugins.

          -

          Last modified 10 March 2009

          +

          Last modified 20 June 2012

          -- GitLab From a0ad146d16c5b4508a5d9ebaa5abd316be7dda1f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 13:50:58 -0700 Subject: [PATCH 440/614] Cosmetic mods. No logic changes. --- src/sbatch/opt.c | 3 +-- src/slurmctld/job_mgr.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index 59fa03a778..c37106a755 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2365,8 +2365,7 @@ static bool _opt_verify(void) if(!opt.nodes_set) { opt.nodes_set = 1; hostlist_uniq(hl); - opt.min_nodes = opt.max_nodes - = hostlist_count(hl); + opt.min_nodes = opt.max_nodes = hostlist_count(hl); } hostlist_destroy(hl); } diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 8978270ee6..363f93b72c 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2921,10 +2921,11 @@ extern int job_allocate(job_desc_msg_t * job_specs, int immediate, int error_code; bool no_alloc, top_prio, test_only, too_fragmented, independent; struct job_record *job_ptr; + time_t now = time(NULL); + error_code = _job_create(job_specs, allocate, will_run, &job_ptr, submit_uid); *job_pptr = job_ptr; - time_t now = time(NULL); if (error_code) { if (job_ptr && (immediate || will_run)) { -- GitLab From 273dffecf19b0e93d81a8a0c26ec7ec26ff7dee3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 13:53:01 -0700 Subject: [PATCH 441/614] Mods for zero size allocation This change permits a user to get a zero size allocation by specifying a task count of zero with no node count specification. --- src/sbatch/opt.c | 2 +- src/sbatch/sbatch.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index c37106a755..4aedfbcdea 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2161,7 +2161,7 @@ static bool _opt_verify(void) setenv("SLURM_JOB_NAME", opt.job_name, 0); /* check for realistic arguments */ - if (opt.ntasks <= 0) { + if (opt.ntasks < 0) { error("invalid number of tasks (-n %d)", opt.ntasks); verified = false; } diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index 939b9472eb..964d5e4273 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -281,12 +281,14 @@ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) desc->req_nodes = opt.nodelist; desc->exc_nodes = opt.exc_nodes; desc->partition = opt.partition; - if (opt.nodes_set || opt.min_nodes) - desc->min_nodes = opt.min_nodes; if (opt.licenses) desc->licenses = xstrdup(opt.licenses); - if (opt.nodes_set || opt.max_nodes) - desc->max_nodes = opt.max_nodes; + if (opt.nodes_set) { + desc->min_nodes = opt.min_nodes; + if (opt.max_nodes) + desc->max_nodes = opt.max_nodes; + } else if (opt.ntasks_set && (opt.ntasks == 0)) + desc->min_nodes = 0; if (opt.ntasks_per_node) desc->ntasks_per_node = opt.ntasks_per_node; desc->user_id = opt.uid; -- GitLab From 7fc48554b86d91720b1210b9d270cf0f57862829 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 14:29:58 -0700 Subject: [PATCH 442/614] Fix bug in gang scheduling table initialization Without this fix, gang scheduling mode could start without creating a list resulting in an assert when jobs are submitted. --- NEWS | 1 + src/slurmctld/read_config.c | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 7022a487d1..c426dc2bc1 100644 --- a/NEWS +++ b/NEWS @@ -39,6 +39,7 @@ documents those changes that are of interest to users and admins. we must use a small block instead of a shared midplane block. -- Fix issues on large jobs (>64k tasks) to have the correct counter type when packing the step layout structure. + -- Fix bug in gang scheduling table initialization. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index fd31840230..b1343f836b 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -115,7 +115,7 @@ static int _sync_nodes_to_jobs(void); static int _sync_nodes_to_active_job(struct job_record *job_ptr); static void _sync_nodes_to_suspended_job(struct job_record *job_ptr); static void _sync_part_prio(void); -static int _update_preempt(uint16_t old_enable_preempt); +static int _update_preempt(uint16_t old_enable_preempt, bool reconfig); #ifdef HAVE_ELAN static void _validate_node_proc_count(void); #endif @@ -877,7 +877,7 @@ int read_slurm_conf(int recover, bool reconfig) fatal( "failed to initialize preempt plugin" ); } xfree(old_preempt_type); - rc = _update_preempt(old_preempt_mode); + rc = _update_preempt(old_preempt_mode, reconfig); error_code = MAX(error_code, rc); /* not fatal */ /* Update plugin parameters as possible */ @@ -1318,12 +1318,13 @@ static int _preserve_select_type_param(slurm_ctl_conf_t *ctl_conf_ptr, /* Start or stop the gang scheduler module as needed based upon changes in * configuration */ -static int _update_preempt(uint16_t old_preempt_mode) +static int _update_preempt(uint16_t old_preempt_mode, bool reconfig) { uint16_t new_preempt_mode = slurm_get_preempt_mode(); - if ((old_preempt_mode & PREEMPT_MODE_GANG) == - (new_preempt_mode & PREEMPT_MODE_GANG)) + if (reconfig && + ((old_preempt_mode & PREEMPT_MODE_GANG) == + (new_preempt_mode & PREEMPT_MODE_GANG))) return SLURM_SUCCESS; if (new_preempt_mode & PREEMPT_MODE_GANG) { -- GitLab From 473855b7f982fee2088f7d48e59701098ff392c6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 13:50:58 -0700 Subject: [PATCH 443/614] Cosmetic mods. No logic changes. --- src/sbatch/opt.c | 3 +-- src/slurmctld/job_mgr.c | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index 59fa03a778..c37106a755 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2365,8 +2365,7 @@ static bool _opt_verify(void) if(!opt.nodes_set) { opt.nodes_set = 1; hostlist_uniq(hl); - opt.min_nodes = opt.max_nodes - = hostlist_count(hl); + opt.min_nodes = opt.max_nodes = hostlist_count(hl); } hostlist_destroy(hl); } diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 2bee79671d..3d73a0594e 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2920,10 +2920,11 @@ extern int job_allocate(job_desc_msg_t * job_specs, int immediate, int error_code; bool no_alloc, top_prio, test_only, too_fragmented, independent; struct job_record *job_ptr; + time_t now = time(NULL); + error_code = _job_create(job_specs, allocate, will_run, &job_ptr, submit_uid); *job_pptr = job_ptr; - time_t now = time(NULL); if (error_code) { if (job_ptr && (immediate || will_run)) { -- GitLab From 1e4f4ffc185d87fe9e6c5e32b55cccc4bba70c1c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 13:53:01 -0700 Subject: [PATCH 444/614] Mods for zero size allocation This change permits a user to get a zero size allocation by specifying a task count of zero with no node count specification. --- src/sbatch/opt.c | 2 +- src/sbatch/sbatch.c | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index c37106a755..4aedfbcdea 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -2161,7 +2161,7 @@ static bool _opt_verify(void) setenv("SLURM_JOB_NAME", opt.job_name, 0); /* check for realistic arguments */ - if (opt.ntasks <= 0) { + if (opt.ntasks < 0) { error("invalid number of tasks (-n %d)", opt.ntasks); verified = false; } diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index 939b9472eb..964d5e4273 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -281,12 +281,14 @@ static int _fill_job_desc_from_opts(job_desc_msg_t *desc) desc->req_nodes = opt.nodelist; desc->exc_nodes = opt.exc_nodes; desc->partition = opt.partition; - if (opt.nodes_set || opt.min_nodes) - desc->min_nodes = opt.min_nodes; if (opt.licenses) desc->licenses = xstrdup(opt.licenses); - if (opt.nodes_set || opt.max_nodes) - desc->max_nodes = opt.max_nodes; + if (opt.nodes_set) { + desc->min_nodes = opt.min_nodes; + if (opt.max_nodes) + desc->max_nodes = opt.max_nodes; + } else if (opt.ntasks_set && (opt.ntasks == 0)) + desc->min_nodes = 0; if (opt.ntasks_per_node) desc->ntasks_per_node = opt.ntasks_per_node; desc->user_id = opt.uid; -- GitLab From 74daee901705142f0b834b2d04e861b38b8fcd23 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 20 Jun 2012 14:32:34 -0700 Subject: [PATCH 445/614] BGQ - fix issue where if a user was asking for tasks and ntasks-per-node but not node count the node count is correctly figured out. --- NEWS | 2 ++ src/plugins/select/bluegene/select_bluegene.c | 5 +++++ src/srun/opt.c | 8 ++++++-- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index c426dc2bc1..9559c8107c 100644 --- a/NEWS +++ b/NEWS @@ -40,6 +40,8 @@ documents those changes that are of interest to users and admins. -- Fix issues on large jobs (>64k tasks) to have the correct counter type when packing the step layout structure. -- Fix bug in gang scheduling table initialization. + -- BGQ - fix issue where if a user was asking for tasks and ntasks-per-node + but not node count the node count is correctly figured out. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index eec15506d8..997d756b78 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -3030,6 +3030,11 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) if (job_desc->min_nodes == (uint32_t) NO_VAL) return SLURM_SUCCESS; + else if ((job_desc->min_nodes == 1) + && (job_desc->min_cpus != NO_VAL) + && (job_desc->ntasks_per_node != NO_VAL)) + job_desc->min_nodes = job_desc->min_cpus + / job_desc->ntasks_per_node; get_select_jobinfo(job_desc->select_jobinfo->data, SELECT_JOBDATA_GEOMETRY, &req_geometry); diff --git a/src/srun/opt.c b/src/srun/opt.c index f29c20bec1..2f6c37d5db 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -1665,8 +1665,12 @@ static void _opt_args(int argc, char **argv) opt.max_nodes = opt.min_nodes = node_cnt = opt.ntasks; } - } else if (node_cnt < opt.ntasks) - opt.max_nodes = opt.min_nodes = node_cnt = opt.ntasks; + } else if (node_cnt < opt.ntasks) { + node_cnt = opt.ntasks; + if (opt.ntasks_per_node != NO_VAL) + node_cnt /= opt.ntasks_per_node; + opt.max_nodes = opt.min_nodes = node_cnt; + } if (!opt.ntasks_per_node || (opt.ntasks_per_node == NO_VAL)) { /* We always want the next larger number if -- GitLab From 29d79ef8e4c7e3dc91f8ef41766dcadd0a765a18 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 15:38:16 -0700 Subject: [PATCH 446/614] Revert commit 7fc48554b86d91720b1210b9d270cf0f57862829 The underlying problem is in the sched plugin logic in SLURM v2.4 --- src/slurmctld/read_config.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index b1343f836b..fd31840230 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -115,7 +115,7 @@ static int _sync_nodes_to_jobs(void); static int _sync_nodes_to_active_job(struct job_record *job_ptr); static void _sync_nodes_to_suspended_job(struct job_record *job_ptr); static void _sync_part_prio(void); -static int _update_preempt(uint16_t old_enable_preempt, bool reconfig); +static int _update_preempt(uint16_t old_enable_preempt); #ifdef HAVE_ELAN static void _validate_node_proc_count(void); #endif @@ -877,7 +877,7 @@ int read_slurm_conf(int recover, bool reconfig) fatal( "failed to initialize preempt plugin" ); } xfree(old_preempt_type); - rc = _update_preempt(old_preempt_mode, reconfig); + rc = _update_preempt(old_preempt_mode); error_code = MAX(error_code, rc); /* not fatal */ /* Update plugin parameters as possible */ @@ -1318,13 +1318,12 @@ static int _preserve_select_type_param(slurm_ctl_conf_t *ctl_conf_ptr, /* Start or stop the gang scheduler module as needed based upon changes in * configuration */ -static int _update_preempt(uint16_t old_preempt_mode, bool reconfig) +static int _update_preempt(uint16_t old_preempt_mode) { uint16_t new_preempt_mode = slurm_get_preempt_mode(); - if (reconfig && - ((old_preempt_mode & PREEMPT_MODE_GANG) == - (new_preempt_mode & PREEMPT_MODE_GANG))) + if ((old_preempt_mode & PREEMPT_MODE_GANG) == + (new_preempt_mode & PREEMPT_MODE_GANG)) return SLURM_SUCCESS; if (new_preempt_mode & PREEMPT_MODE_GANG) { -- GitLab From 70a77c022d63eaadb0a8a56ce85b65e3d4a984cc Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 15:40:48 -0700 Subject: [PATCH 447/614] Add error message on error condition --- src/slurmctld/read_config.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index fd31840230..2452667183 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1337,6 +1337,7 @@ static int _update_preempt(uint16_t old_preempt_mode) return gs_fini(); } + error("Invalid gang scheduling mode change"); return EINVAL; } -- GitLab From 09392f9cd4666eb7137f419d97881a464c1e6fe9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 16:06:22 -0700 Subject: [PATCH 448/614] This fixes starting gs_init in v2.4 --- src/slurmctld/read_config.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 2452667183..1f51fd78dc 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -115,7 +115,7 @@ static int _sync_nodes_to_jobs(void); static int _sync_nodes_to_active_job(struct job_record *job_ptr); static void _sync_nodes_to_suspended_job(struct job_record *job_ptr); static void _sync_part_prio(void); -static int _update_preempt(uint16_t old_enable_preempt); +static int _update_preempt(uint16_t old_enable_preempt, bool reconfig); #ifdef HAVE_ELAN static void _validate_node_proc_count(void); #endif @@ -877,7 +877,7 @@ int read_slurm_conf(int recover, bool reconfig) fatal( "failed to initialize preempt plugin" ); } xfree(old_preempt_type); - rc = _update_preempt(old_preempt_mode); + rc = _update_preempt(old_preempt_mode, reconfig); error_code = MAX(error_code, rc); /* not fatal */ /* Update plugin parameters as possible */ @@ -1318,10 +1318,13 @@ static int _preserve_select_type_param(slurm_ctl_conf_t *ctl_conf_ptr, /* Start or stop the gang scheduler module as needed based upon changes in * configuration */ -static int _update_preempt(uint16_t old_preempt_mode) +static int _update_preempt(uint16_t old_preempt_mode, bool reconfig) { uint16_t new_preempt_mode = slurm_get_preempt_mode(); + if (!reconfig && (new_preempt_mode & PREEMPT_MODE_GANG)) + return gs_init(); + if ((old_preempt_mode & PREEMPT_MODE_GANG) == (new_preempt_mode & PREEMPT_MODE_GANG)) return SLURM_SUCCESS; -- GitLab From c9a272ac11358825ea5a225b894f3899652a5785 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 16:20:02 -0700 Subject: [PATCH 449/614] Fix gang scheduler initialization logic --- src/slurmctld/read_config.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 1f51fd78dc..d829fd39a8 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -115,7 +115,7 @@ static int _sync_nodes_to_jobs(void); static int _sync_nodes_to_active_job(struct job_record *job_ptr); static void _sync_nodes_to_suspended_job(struct job_record *job_ptr); static void _sync_part_prio(void); -static int _update_preempt(uint16_t old_enable_preempt, bool reconfig); +static int _update_preempt(uint16_t old_enable_preempt); #ifdef HAVE_ELAN static void _validate_node_proc_count(void); #endif @@ -748,6 +748,11 @@ int read_slurm_conf(int recover, bool reconfig) g_slurm_jobcomp_init(slurmctld_conf.job_comp_loc); if (slurm_sched_init() != SLURM_SUCCESS) fatal("Failed to initialize sched plugin"); + if (!reconfig && (old_preempt_mode & PREEMPT_MODE_GANG) && + (gs_init() != SLURM_SUCCESS)) { + /* gs_init() must immediately follow slurm_sched_init() */ + fatal("Failed to initialize gang scheduler"); + } if (switch_init() != SLURM_SUCCESS) fatal("Failed to initialize switch plugin"); @@ -877,7 +882,7 @@ int read_slurm_conf(int recover, bool reconfig) fatal( "failed to initialize preempt plugin" ); } xfree(old_preempt_type); - rc = _update_preempt(old_preempt_mode, reconfig); + rc = _update_preempt(old_preempt_mode); error_code = MAX(error_code, rc); /* not fatal */ /* Update plugin parameters as possible */ @@ -1318,13 +1323,10 @@ static int _preserve_select_type_param(slurm_ctl_conf_t *ctl_conf_ptr, /* Start or stop the gang scheduler module as needed based upon changes in * configuration */ -static int _update_preempt(uint16_t old_preempt_mode, bool reconfig) +static int _update_preempt(uint16_t old_preempt_mode) { uint16_t new_preempt_mode = slurm_get_preempt_mode(); - if (!reconfig && (new_preempt_mode & PREEMPT_MODE_GANG)) - return gs_init(); - if ((old_preempt_mode & PREEMPT_MODE_GANG) == (new_preempt_mode & PREEMPT_MODE_GANG)) return SLURM_SUCCESS; -- GitLab From b3ac9da5f8f878177b9222b9eb0c80eccc2e1802 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 20 Jun 2012 16:56:32 -0700 Subject: [PATCH 450/614] Fix for too small malloc in step layout logic --- src/common/slurm_step_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index ac823da727..dc07fda67f 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -656,7 +656,7 @@ static int _task_layout_cyclic(slurm_step_layout_t *step_layout, && (taskidtask_cnt)); i++) { if ((jtids[i], sizeof(uint32_t) - * step_layout->tasks[i]+1); + * (step_layout->tasks[i] + 1)); step_layout->tids[i][step_layout->tasks[i]] = taskid; -- GitLab From 6ad5a6b3e623e5db1aee167f82decae698ad29d5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 08:07:25 -0700 Subject: [PATCH 451/614] Run backfill scheduler when only one job to set estimated start time --- src/plugins/sched/backfill/backfill.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index 915de2ee2e..d482df66e3 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -550,7 +550,7 @@ static int _attempt_backfill(void) filter_root = true; job_queue = build_job_queue(true); - if (list_count(job_queue) <= 1) { + if (list_count(job_queue) == 0) { debug("backfill: no jobs to backfill"); list_destroy(job_queue); return 0; -- GitLab From c54bc57cc37bde4a36f84a3b54546da2c41c4586 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 08:20:36 -0700 Subject: [PATCH 452/614] Add select/serial to configuration tool options --- doc/html/configurator.easy.html.in | 10 ++++++---- doc/html/configurator.html.in | 6 +++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/html/configurator.easy.html.in b/doc/html/configurator.easy.html.in index a188e9aa21..f7eb8d939f 100644 --- a/doc/html/configurator.easy.html.in +++ b/doc/html/configurator.easy.html.in @@ -200,7 +200,7 @@ function displayfile()
          -

          SLURM Version @SLURM_MAJOR@.@SLURM_MINOR@ Configuration Tool

          +

          SLURM Version @SLURM_MAJOR@.@SLURM_MINOR@ Configuration Tool - Easy Version

          This form can be used to create a SLURM configuration file with you controlling many of the important configuration parameters.

          @@ -454,11 +454,13 @@ Select one value for SelectType:
          Core and Memory as consumable resources. + +BlueGene: For IBM Blue Gene systems only
          Linear: Node-base resource allocation, does not manage individual processor allocation
          - -BlueGene: For IBM Blue Gene systems only
          + +Serial: Execute single CPU jobs only

          Task Launch

          @@ -541,5 +543,5 @@ Specify a specify the fully qualified pathname for the file.

          Legal Notices
          -Last modified 3 April 2012

          +Last modified 21 June 2012

          diff --git a/doc/html/configurator.html.in b/doc/html/configurator.html.in index cbb17f2bff..1dfc45f834 100644 --- a/doc/html/configurator.html.in +++ b/doc/html/configurator.html.in @@ -636,11 +636,11 @@ Select one value for SelectType:
          Core and Memory as consumable resources. + +BlueGene: For IBM Blue Gene systems only
          Linear: Node-base resource allocation, does not manage individual processor allocation
          - -BlueGene: For IBM Blue Gene systems only
          Serial: Supports single CPU job allocations only

          @@ -853,5 +853,5 @@ before terminating all remaining tasks. A value of zero indicates unlimited wait


          Legal Notices
          -Last modified 3 April 2012

          +Last modified 21 June 2012

          -- GitLab From 0dd883c6ad63714c6e53aab8fd3b55e9eef466d3 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 21 Jun 2012 08:53:12 -0700 Subject: [PATCH 453/614] Update jobacct gather plugin web page --- doc/html/jobacct_gatherplugins.shtml | 217 +++++++++++++++++- .../jobacct_gather/aix/jobacct_gather_aix.c | 2 +- .../cgroup/jobacct_gather_cgroup.c | 2 +- .../linux/jobacct_gather_linux.c | 2 +- .../jobacct_gather/none/jobacct_gather_none.c | 6 +- 5 files changed, 212 insertions(+), 17 deletions(-) diff --git a/doc/html/jobacct_gatherplugins.shtml b/doc/html/jobacct_gatherplugins.shtml index 47eb3552f6..3fa76ad3f7 100644 --- a/doc/html/jobacct_gatherplugins.shtml +++ b/doc/html/jobacct_gatherplugins.shtml @@ -47,17 +47,17 @@ implemented must be stubbed.

          int jobacct_gather_p_poll_data(List task_list, bool pgid_plugin, uint64_t cont_id)

          Description:
          -jobacct_gather_p_poll_data() Build a table of all current processes. +Build a table of all current processes.

          Arguments:
          task_list (in/out) List containing current processes
          pgid_plugin (input) if we are -running with the pgid plugin +running with the pgid plugin
          cont_id (input) container id of processes if not running with pgid -

          int jobacct_gather_p_endpoll() +

          int jobacct_gather_p_endpoll(void)

          Description:
          -jobacct_gather_p_endpoll() is called when the process is finished to stop the +Called when the process is finished to stop the polling thread.

          Arguments:
          none @@ -67,7 +67,7 @@ polling thread.

          int jobacct_gather_p_add_task(pid_t pid, uint16_t tid)

          Description:
          -jobacct_gather_p_add_task() used to add a task to the poller. +Used to add a task to the poller.

          Arguments:
          pid (input) Process id
          tid (input) slurm global task id @@ -76,26 +76,221 @@ jobacct_gather_p_add_task() used to add a task to the poller. SLURM_ERROR on failure. -

          Job Account Gathering

          +

          All of the following functions are not required but may be used. + +

          int jobacct_gather_init(void) +

          Description:
          +Loads the job account gather plugin. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacct_gather_fini(void) +

          Description:
          +Unloads the job account gathering plugin. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacct_gather_startpoll(uin16_t frequency) +

          Description:
          +Creates and starts the polling thread. +

          Arguments:
          + frequency (input) frequency of the polling. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacct_gather_change_poll(uint16_t frequency) +

          Description:
          +Changes the polling thread to a new frequency. +

          Arguments:
          + frequency (input) frequency of the polling +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacct_gather_suspend_poll(void) +

          Description:
          +Temporarily stops the polling thread. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacct_gather_resume_poll(void) +

          Description:
          +Resumes the polling thread that was stopped. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          jobacctinfo_t *jobacct_gather_stat_task(pid_t + pid) +

          Description:
          +Gets the basis of the information of the task. +

          Arguments:
          +pid (input) process id. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          jobacctinfo_t *jobacct_gather_remove_task(pid_t pid) +

          Description:
          +Removes the task. +

          Arguments:
          +pid (input) process id. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int + jobacct_gather_set_proctrack_container_id(uint64_t id) +

          Description:
          + Sets the proctrack container to a given id. +

          Arguments:
          +id (input) id to set. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacct_gather_set_mem_limit(uint32_t job_id, + uint32_t step_id,uint32_t mem_limit) +

          Description:
          +Sets the memory limit of the job account. +

          Arguments:
          +job_id (input) id of the job.
          +sted_id (input) id of the step.
          +mem_limit (input) memory limit in megabytes. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacct_gather_handle_mem_limit(uint32_t total_job_mem, uint32_t total_job_vsize) +

          Description:
          +Called to find out how much memory is used. +

          Arguments:
          + total_job_mem (input) total +amount of memory for jobs.
          + total_job_vsize (input) the +total job size. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          Job Account Info

          +

          All of the following functions are not required but may be used. + +

          jobacctinfo_t *jobacctinfo_create(jobacct_id_t *jobacct_id) +

          Description:
          +Creates the job account info. +

          Arguments:
          + jobacct_id (input) the job +account id. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacctinfo_destroy(void *object) +

          Description:
          +Destroys the job account info. +

          Arguments:
          + object (input) the job that needs to be destroyed +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacctinfo_setinfo(jobacctinfo_t *jobacct, enum jobacct_data_type type, void *data) +

          Description:
          +Set the information for the job. +

          Arguments:
          + jobacct (input) job account
          + type(input) enum telling the plugin how to transform the data.
          + data (input/output) Is a void * and +the actual data type depends upon the first argument to this function (type). +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacctinfo_getinfo(jobacctinfo_t *jobacct, enum jobacct_data_type type, void *data) +

          Description:
          +Gets the information about the job. +

          Arguments:
          + jobacct (input) job account.
          +type (input) the +data type of the job account. +data +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacctinfo_pack(jobacctinfo_t *jobacct, +uint16_t rpc_version, Buf buffer) +

          Description:
          +Packs the job account information. +

          Arguments:
          +jobacct (input) the job account.
          +rpc_version (input) the +rpc version.
          +buffer (input) the buffer. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          int jobacctinfo_unpack(jobacctinfo_t **jobacct, +uint16_t rpc_version, Buf buffer) +

          Description:
          +Unpacks the job account information. +

          Arguments:
          +jobacct (input) the job account.
          +rpc_version (input) the rpc +version.
          +buffer (input) the buffer. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacctinfo_aggregate(jobacctinfo_t *dest, jobacctinfo_t *from) +

          Description:
          +Aggregates the jobs. +

          Arguments:
          +dest (input) New destination of the job.
          +from (input) Original location of job. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          void jobacctinfo_2_stats(slurmdb_stats_t *stats, jobacctinfo_t *jobacct) +

          Description:
          +Gets the stats of the job in accounting. +

          Arguments:
          +stats (input) slurm data base stat.
          +jobacct (input) the job account. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          Parameters

          -

          These parameters can be used in the slurm.conf to set up type of -plugin and the frequency at which to gather information about running jobs. +

          These parameters can be used in the slurm.conf to configure the +plugin and the frequency at which to gather information about running jobs.

          JobAcctGatherType
          Specifies which plugin should be used.
          JobAcctGatherFrequency -
          Let the plugin know how long between pollings. +
          Time interval between pollings in seconds.

          Versioning

          This document describes version 2 of the SLURM Job Accounting Gather API. Future releases of SLURM may revise this API. A job accounting gather plugin conveys its ability to implement a particular API version using the mechanism outlined -for SLURM plugins. +for SLURM plugins.

          +

          Last modified 29 May 2012

          +

          Last modified 21 June 2012

          diff --git a/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c b/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c index 1205046a78..1d38aaaf3a 100644 --- a/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c +++ b/src/plugins/jobacct_gather/aix/jobacct_gather_aix.c @@ -329,7 +329,7 @@ extern int fini ( void ) return SLURM_SUCCESS; } -extern int jobacct_gather_p_endpoll() +extern int jobacct_gather_p_endpoll ( void ) { return SLURM_SUCCESS; } diff --git a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c index d72a09a2bb..9566d5abff 100644 --- a/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c +++ b/src/plugins/jobacct_gather/cgroup/jobacct_gather_cgroup.c @@ -534,7 +534,7 @@ finished: return; } -extern int jobacct_gather_p_endpoll() +extern int jobacct_gather_p_endpoll(void) { if (slash_proc) { slurm_mutex_lock(&reading_mutex); diff --git a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c index f37709cdce..1d38cc2b2f 100644 --- a/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c +++ b/src/plugins/jobacct_gather/linux/jobacct_gather_linux.c @@ -490,7 +490,7 @@ finished: return; } -extern int jobacct_gather_p_endpoll() +extern int jobacct_gather_p_endpoll(void) { if (slash_proc) { slurm_mutex_lock(&reading_mutex); diff --git a/src/plugins/jobacct_gather/none/jobacct_gather_none.c b/src/plugins/jobacct_gather/none/jobacct_gather_none.c index 9f5402beca..7ad9c520a0 100644 --- a/src/plugins/jobacct_gather/none/jobacct_gather_none.c +++ b/src/plugins/jobacct_gather/none/jobacct_gather_none.c @@ -141,7 +141,7 @@ extern int jobacct_gather_p_startpoll(uint16_t frequency) return SLURM_SUCCESS; } -extern int jobacct_gather_p_endpoll() +extern int jobacct_gather_p_endpoll(void) { return SLURM_SUCCESS; } @@ -151,12 +151,12 @@ extern void jobacct_gather_p_change_poll(uint16_t frequency) return; } -extern void jobacct_gather_p_suspend_poll() +extern void jobacct_gather_p_suspend_poll(void) { return; } -extern void jobacct_gather_p_resume_poll() +extern void jobacct_gather_p_resume_poll(void) { return; } -- GitLab From 3f3df331505396517ab56900749a1d1e9ed59978 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 09:02:57 -0700 Subject: [PATCH 454/614] Modify reservation resource selection to optimize placement When a new reservation is created, the code tries first with current idle nodes: /* First: Try to reserve nodes that are currently IDLE */ if (bit_overlap(avail_bitmap, idle_node_bitmap) >= node_cnt) { bit_and(avail_bitmap, idle_node_bitmap); ret_bitmap = select_g_resv_test(avail_bitmap, node_cnt, resv_desc_ptr->core_cnt, core_bitmap); if (ret_bitmap) goto fini; } /* Second: Try to reserve nodes that are will be IDLE */ I guess there's a reason for this behaviour: performance. However, I think it should be always the second option. Creating a new reservation is not a usual task, so the best effort should prevail versus performance at creation time. --- src/slurmctld/reservation.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 03e2526a04..9606b88be5 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -2676,15 +2676,6 @@ static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, } save_bitmap = bit_copy(avail_bitmap); - /* First: Try to reserve nodes that are currently IDLE */ - if (bit_overlap(avail_bitmap, idle_node_bitmap) >= node_cnt) { - bit_and(avail_bitmap, idle_node_bitmap); - ret_bitmap = select_g_resv_test(avail_bitmap, node_cnt); - if (ret_bitmap) - goto fini; - } - - /* Second: Try to reserve nodes that are will be IDLE */ bit_or(avail_bitmap, save_bitmap); /* restore avail_bitmap */ job_iterator = list_iterator_create(job_list); if (job_iterator == NULL) -- GitLab From 5089455658acc8ed92321cf5d5d8e1b6a13e4e2e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 11:39:35 -0700 Subject: [PATCH 455/614] Merge branch 'slurm-2.4' Conflicts: src/srun/opt.c --- src/plugins/switch/nrt/nrt.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 0cbdf6a44e..28a02ebea9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1345,7 +1345,6 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info("--Begin Jobinfo--"); info(" job_key: %u", j->job_key); - info(" table_size: %u", j->tables_per_task); info(" bulk_xfer: %hu", j->bulk_xfer); info(" bulk_xfer_resources: %u", j->bulk_xfer_resources); info(" ip_v4: %hu", j->ip_v4); @@ -3087,9 +3086,6 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) error("nrt_command(load table): %s", nrt_err_str(err)); return SLURM_ERROR; } -/* FIXME: Must modify to issue one call per job per node. - * Do not loop on the load_table call on a per-task basis */ -break; } umask(nrt_umask); @@ -3120,16 +3116,18 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, unload_window.window_id = window_id; } #if NRT_DEBUG - info("nrt_command(unload_window, %s, %u, %u, %hu)", - adapter_name, adapter_type, job_key, window_id); + info("nrt_command(unload_window, %s, %s, %u, %hu)", + adapter_name, _adapter_type_str(adapter_type), + job_key, window_id); #endif err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_WINDOW, &unload_window); if (err == NRT_SUCCESS) return SLURM_SUCCESS; debug("Unable to unload window for job_key %u, " - "nrt_unload_window(%s, %u): %s", - job_key, adapter_name, adapter_type, nrt_err_str(err)); + "nrt_unload_window(%s, %s): %s", + job_key, adapter_name, _adapter_type_str(adapter_type), + nrt_err_str(err)); if (i == 0) { clean_window.adapter_name = adapter_name; @@ -3482,7 +3480,7 @@ nrt_clear_node_state(void) } #endif if (window_count > max_windows) { -/* FIXME: Seeing (2 > 0) for eth0 */ +/* FIXME: Seeing max_windows==0 and window_count>0 for ethernet adapter */ error("nrt_command(status_adapter, %s, %s): " "window_count > max_windows (%u > %hu)", adapter_status.adapter_name, -- GitLab From 7fc7d5d24c51ecbec5cc1df619abdb5e6b8a2d09 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 11:40:05 -0700 Subject: [PATCH 456/614] Major restructuring of switch/nrt state restore without logic changes --- src/plugins/switch/nrt/nrt.c | 247 +++++++++++++++++------------------ 1 file changed, 118 insertions(+), 129 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 28a02ebea9..d6ec82cdc1 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -223,10 +223,8 @@ static int _wait_for_window_unloaded(char *adapter_name, nrt_window_id_t window_id, int retry, unsigned int max_windows); static char * _win_state_str(win_state_t state); -static int _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, - win_state_t state, nrt_job_key_t job_key); - +static int _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, + win_state_t state); /* The _lock() and _unlock() functions are used to lock/unlock a * global mutex. Used to serialize access to the global library * state variable nrt_state. @@ -505,15 +503,7 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, { hostlist_iterator_t hi; char *host; - int proc_cnt; - int nprocs; - int nnodes; - int i, j; int err, rc = SLURM_SUCCESS; - int task_cnt; - int full_node_cnt; - int min_procs_per_node; - int max_procs_per_node; xassert(!hostlist_is_empty(hl)); xassert(jp); @@ -526,44 +516,25 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, (jp->tableinfo[0].table_length == 0)) return SLURM_SUCCESS; - debug3("jp->tables_per_task = %d", jp->tables_per_task); - nprocs = jp->tableinfo[0].table_length; hi = hostlist_iterator_create(hl); - - debug("Finding windows"); - nnodes = hostlist_count(hl); - full_node_cnt = nprocs % nnodes; - min_procs_per_node = nprocs / nnodes; - max_procs_per_node = (nprocs + nnodes - 1) / nnodes; - - proc_cnt = 0; _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if (!host) - error("Failed to get next host"); - - if (i < full_node_cnt) - task_cnt = max_procs_per_node; - else - task_cnt = min_procs_per_node; - - for (j = 0; j < task_cnt; j++) { - err = _window_state_set(jp->tables_per_task, - jp->tableinfo, - host, proc_cnt, - state, jp->job_key); - rc = MAX(rc, err); - proc_cnt++; - } + while ((host = hostlist_next(hi))) { + err = _window_state_set(jp, host, state); + rc = MAX(rc, err); free(host); } _unlock(); - hostlist_iterator_destroy(hi); + return rc; } +static char *_state_str(win_state_t state) +{ + if (state == NRT_WIN_UNAVAILABLE) + return "UNLOADED"; + return "LOADED"; +} /* Find the correct NRT structs and set the state * of the switch windows for the specified task_id. @@ -571,9 +542,7 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, * Used by: slurmctld */ static int -_window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, - char *hostname, int task_id, win_state_t state, - nrt_job_key_t job_key) +_window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) { slurm_nrt_nodeinfo_t *node = NULL; slurm_nrt_adapter_t *adapter = NULL; @@ -582,10 +551,13 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, int rc = SLURM_SUCCESS; bool adapter_found; uint16_t win_id = 0; + nrt_job_key_t job_key = jp->job_key; + nrt_table_id_t table_cnt = jp->tables_per_task; + nrt_tableinfo_t *tableinfo = jp->tableinfo; + nrt_task_id_t task_id; assert(tableinfo); assert(hostname); - assert(adapter_cnt <= NRT_MAXADAPTERS); node = _find_node(nrt_state, hostname); if (node == NULL) { @@ -597,7 +569,7 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, return SLURM_ERROR; } - for (i = 0; i < adapter_cnt; i++) { + for (i = 0; i < table_cnt; i++) { if (tableinfo[i].table == NULL) { error("tableinfo[%d].table is NULL", i); rc = SLURM_ERROR; @@ -611,92 +583,105 @@ _window_state_set(int adapter_cnt, nrt_tableinfo_t *tableinfo, if (strcasecmp(adapter->adapter_name, tableinfo[i].adapter_name)) continue; - if (adapter->adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = tableinfo[i].table + task_id; - if (ib_tbl_ptr == NULL) { - error("tableinfo[%d].table[%d] is " - "NULL", i, task_id); - rc = SLURM_ERROR; - continue; - } - if (adapter->lid == ib_tbl_ptr->base_lid) { - adapter_found = true; - win_id = ib_tbl_ptr->win_id; - debug3("Setting status %s adapter %s " - "lid %hu window %hu for task %d", - state == NRT_WIN_UNAVAILABLE ? - "UNLOADED" : "LOADED", - adapter->adapter_name, - ib_tbl_ptr->base_lid, - ib_tbl_ptr->win_id, task_id); - break; - } - } else if (adapter->adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = tableinfo[i].table + task_id; - if (hfi_tbl_ptr == NULL) { - error("tableinfo[%d].table[%d] is " - "NULL", i, task_id); - rc = SLURM_ERROR; - continue; - } - if (adapter->lid == hfi_tbl_ptr->lid) { - adapter_found = true; - win_id = hfi_tbl_ptr->win_id; - debug3("Setting status %s adapter %s " - "lid %hu window %hu for task %d", - state == NRT_WIN_UNAVAILABLE ? - "UNLOADED" : "LOADED", - adapter->adapter_name, - hfi_tbl_ptr->lid, - hfi_tbl_ptr->win_id, task_id); - break; - } - } else if ((adapter->adapter_type == NRT_HPCE) || - (adapter->adapter_type == NRT_KMUX)) { - nrt_hpce_task_info_t *hpce_tbl_ptr; - hpce_tbl_ptr = tableinfo[i].table + task_id; - if (hpce_tbl_ptr == NULL) { - error("tableinfo[%d].table[%d] is " - "NULL", i, task_id); - rc = SLURM_ERROR; - continue; - } -/* FIXME: These should probably match network_id or something else */ -// if (adapter->lid == hpce_tbl_ptr->lid) { - if (1) { - adapter_found = true; - win_id = hpce_tbl_ptr->win_id; - debug3("Setting status %s adapter %s " - "window %hu for task %d", - state == NRT_WIN_UNAVAILABLE ? - "UNLOADED" : "LOADED", - adapter->adapter_name, - hpce_tbl_ptr->win_id, task_id); - break; + for (task_id = 0; task_id < tableinfo[i].table_length; + task_id++) { + if (adapter->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_tbl_ptr; + ib_tbl_ptr = tableinfo[i].table + + task_id; + if (ib_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d]" + " is NULL", i, task_id); + rc = SLURM_ERROR; + continue; + } + if (adapter->lid == + ib_tbl_ptr->base_lid) { + adapter_found = true; + win_id = ib_tbl_ptr->win_id; + debug3("Setting status %s " + "adapter %s lid %hu " + "window %hu for task %d", + _state_str(state), + adapter->adapter_name, + ib_tbl_ptr->base_lid, + ib_tbl_ptr->win_id, + task_id); + break; + } + } else if (adapter->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_tbl_ptr; + hfi_tbl_ptr = tableinfo[i].table + + task_id; + if (hfi_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d]" + " is NULL", i, task_id); + rc = SLURM_ERROR; + continue; + } + if (adapter->lid == hfi_tbl_ptr->lid) { + adapter_found = true; + win_id = hfi_tbl_ptr->win_id; + debug3("Setting status %s " + "adapter %s lid %hu " + "window %hu for task %d", + _state_str(state), + adapter->adapter_name, + hfi_tbl_ptr->lid, + hfi_tbl_ptr->win_id, + task_id); + break; + } + } else if ((adapter->adapter_type==NRT_HPCE) || + (adapter->adapter_type==NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_tbl_ptr; + hpce_tbl_ptr = tableinfo[i].table + + task_id; + if (hpce_tbl_ptr == NULL) { + error("tableinfo[%d].table[%d]" + " is NULL", i, task_id); + rc = SLURM_ERROR; + continue; + } + /* FIXME: These should probably match network_id or something else */ + // if (adapter->lid == hpce_tbl_ptr->lid) { + if (1) { + adapter_found = true; + win_id = hpce_tbl_ptr->win_id; + debug3("Setting status %s " + "adapter %s window %hu " + "for task %d", + _state_str(state), + adapter->adapter_name, + hpce_tbl_ptr->win_id, + task_id); + break; + } + } else { + error("_window_state_set: Missing " + "support for adapter type %s", + _adapter_type_str(adapter-> + adapter_type)); + } - } else { - error("_window_state_set: Missing support for " - "adapter type %s", - _adapter_type_str(adapter->adapter_type)); + window = _find_window(adapter, win_id); + if (window) { + window->state = state; + if (state == NRT_WIN_UNAVAILABLE) + window->job_key = 0; + else + window->job_key = job_key; + } + } /* for each task */ + if (!adapter_found) { + error("Did not find adapter %s with lid %hu ", + adapter->adapter_name, adapter->lid); + rc = SLURM_ERROR; + continue; } - } - if (!adapter_found) { - error("Did not find adapter %s with lid %hu ", - adapter->adapter_name, adapter->lid); - rc = SLURM_ERROR; - continue; - } - - window = _find_window(adapter, win_id); - if (window) { - window->state = state; - window->job_key = - (state == NRT_WIN_UNAVAILABLE) ? 0 : job_key; - } - } + } /* for each adapter */ + } /* for each table */ return rc; } @@ -2127,6 +2112,10 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) extern int nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) { +#if NRT_DEBUG + info("nrt_job_step_allocated: resetting window state"); + _print_jobinfo(jp); +#endif return _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); } -- GitLab From c8189de24410acf1aff4c7eb2228979d32890b2b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 14:59:06 -0700 Subject: [PATCH 457/614] switch/nrt logging improvements --- src/plugins/switch/nrt/nrt.c | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d6ec82cdc1..d355a027ee 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -211,6 +211,7 @@ static nrt_job_key_t _next_key(void); static int _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static void _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp); +static char * _state_str(win_state_t state); static void _unlock(void); static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer); static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, @@ -532,8 +533,18 @@ _job_step_window_state(slurm_nrt_jobinfo_t *jp, hostlist_t hl, static char *_state_str(win_state_t state) { if (state == NRT_WIN_UNAVAILABLE) - return "UNLOADED"; - return "LOADED"; + return "Unavailable"; + if (state == NRT_WIN_INVALID) + return "Invalid"; + if (state == NRT_WIN_AVAILABLE) + return "Available"; + if (state == NRT_WIN_RESERVED) + return "Reserved"; + if (state == NRT_WIN_READY) + return "Ready"; + if (state == NRT_WIN_RUNNING) + return "Running"; + return "Unknown"; } /* Find the correct NRT structs and set the state @@ -669,9 +680,9 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) if (window) { window->state = state; if (state == NRT_WIN_UNAVAILABLE) - window->job_key = 0; - else window->job_key = job_key; + else + window->job_key = 0; } } /* for each task */ if (!adapter_found) { @@ -2112,11 +2123,17 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) extern int nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) { + int rc; #if NRT_DEBUG info("nrt_job_step_allocated: resetting window state"); _print_jobinfo(jp); #endif - return _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); + rc = _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); +#if NRT_DEBUG + info("nrt_job_step_allocated: window state reset complete"); + _print_libstate(nrt_state); +#endif + return rc; } /* Assign a unique key to each job. The key is used later to -- GitLab From 218cfb6fd81ff83f11675b183cdd5d05c990d067 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 16:07:10 -0700 Subject: [PATCH 458/614] Cosmetic mods --- src/plugins/switch/nrt/switch_nrt.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 4d9eae0ba4..8c7a8e5d8a 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -588,7 +588,8 @@ static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) return rc; } -extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) +extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, + char *nodelist) { #if NRT_DEBUG info("switch_p_job_step_complete()"); @@ -613,7 +614,8 @@ extern bool switch_p_part_comp(void) return true; } -extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, char *nodelist) +extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, + char *nodelist) { hostlist_t list = NULL; int rc; @@ -771,7 +773,7 @@ static void *_state_save_thread(void *arg) char *dir_name = (char *)arg; while (1) { - sleep(300); + sleep(2); if (nrt_need_state_save) { nrt_need_state_save = false; _switch_p_libstate_save(dir_name, false); -- GitLab From 44365b06d48fc6a110843ce74f29e0dc432f7ab5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 21 Jun 2012 16:14:24 -0700 Subject: [PATCH 459/614] Fix some switch/nrt logic --- src/plugins/switch/nrt/nrt.c | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d355a027ee..06ad042762 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -181,8 +181,7 @@ static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_protocol_table_t *protocol_table, int instances, - nrt_logical_id_t base_lid); + nrt_protocol_table_t *protocol_table, int instances); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _check_rdma_job_count(char *adapter_name, @@ -598,8 +597,8 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) task_id++) { if (adapter->adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_tbl_ptr; - ib_tbl_ptr = tableinfo[i].table + - task_id; + ib_tbl_ptr = tableinfo[i].table; + ib_tbl_ptr += task_id; if (ib_tbl_ptr == NULL) { error("tableinfo[%d].table[%d]" " is NULL", i, task_id); @@ -618,12 +617,11 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) ib_tbl_ptr->base_lid, ib_tbl_ptr->win_id, task_id); - break; } } else if (adapter->adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_tbl_ptr; - hfi_tbl_ptr = tableinfo[i].table + - task_id; + hfi_tbl_ptr = tableinfo[i].table; + hfi_tbl_ptr += task_id; if (hfi_tbl_ptr == NULL) { error("tableinfo[%d].table[%d]" " is NULL", i, task_id); @@ -641,13 +639,12 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) hfi_tbl_ptr->lid, hfi_tbl_ptr->win_id, task_id); - break; } } else if ((adapter->adapter_type==NRT_HPCE) || (adapter->adapter_type==NRT_KMUX)) { nrt_hpce_task_info_t *hpce_tbl_ptr; - hpce_tbl_ptr = tableinfo[i].table + - task_id; + hpce_tbl_ptr = tableinfo[i].table; + hpce_tbl_ptr += task_id; if (hpce_tbl_ptr == NULL) { error("tableinfo[%d].table[%d]" " is NULL", i, task_id); @@ -666,7 +663,6 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) adapter->adapter_name, hpce_tbl_ptr->win_id, task_id); - break; } } else { error("_window_state_set: Missing " @@ -686,8 +682,11 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) } } /* for each task */ if (!adapter_found) { - error("Did not find adapter %s with lid %hu ", - adapter->adapter_name, adapter->lid); + error("Did not find adapter %s of type %s " + "with lid %hu ", + adapter->adapter_name, + _adapter_type_str(adapter->adapter_type), + adapter->lid); rc = SLURM_ERROR; continue; } @@ -914,7 +913,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, nrt_protocol_table_t *protocol_table, - int instances, nrt_logical_id_t base_lid) + int instances) { nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; @@ -1019,7 +1018,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, ib_table += task_id; strncpy(ib_table->device_name, adapter_name, NRT_MAX_DEVICENAME_SIZE); - ib_table->base_lid = base_lid; + ib_table->base_lid = adapter->lid; ib_table->port_id = 1; ib_table->lmc = 0; ib_table->node_number = node_number; @@ -1030,6 +1029,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, hfi_table = (nrt_hfi_task_info_t *) tableinfo[table_inx].table; hfi_table += task_id; + hfi_table->lid = adapter->lid; hfi_table->task_id = task_id; hfi_table->win_id = window->window_id; } else if ((adapter_type == NRT_HPCE) || @@ -2357,8 +2357,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, adapter_type, network_id, protocol_table, - instances, - base_lid); + instances); } if (rc != SLURM_SUCCESS) { _unlock(); -- GitLab From c79cd5038d0d88b1faf6431dc338227dbf98dd53 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 22 Jun 2012 09:02:56 -0700 Subject: [PATCH 460/614] Move logic to always give the first --- NEWS | 2 ++ src/slurmctld/node_scheduler.c | 18 +++++++++--------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 9559c8107c..f135161302 100644 --- a/NEWS +++ b/NEWS @@ -42,6 +42,8 @@ documents those changes that are of interest to users and admins. -- Fix bug in gang scheduling table initialization. -- BGQ - fix issue where if a user was asking for tasks and ntasks-per-node but not node count the node count is correctly figured out. + -- Move logic to always use the 1st alphanumeric node as the batch host for + batch jobs. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 640f406676..16994dcfde 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -135,13 +135,6 @@ extern void allocate_nodes(struct job_record *job_ptr) struct node_record *node_ptr; bool has_cloud = false, has_cloud_power_save = false; - xfree(job_ptr->batch_host); -#ifdef HAVE_FRONT_END - job_ptr->front_end_ptr = assign_front_end(); - xassert(job_ptr->front_end_ptr); - job_ptr->batch_host = xstrdup(job_ptr->front_end_ptr->name); -#endif - for (i = 0, node_ptr = node_record_table_ptr; i < node_record_count; i++, node_ptr++) { if (!bit_test(job_ptr->node_bitmap, i)) @@ -153,9 +146,8 @@ extern void allocate_nodes(struct job_record *job_ptr) has_cloud_power_save = true; } make_node_alloc(node_ptr, job_ptr); - if (job_ptr->batch_host == NULL) - job_ptr->batch_host = xstrdup(node_ptr->name); } + last_node_update = time(NULL); license_job_get(job_ptr); @@ -2045,6 +2037,12 @@ extern void build_node_details(struct job_record *job_ptr) xrealloc(job_ptr->node_addr, (sizeof(slurm_addr_t) * job_ptr->node_cnt)); + xfree(job_ptr->batch_host); +#ifdef HAVE_FRONT_END + job_ptr->front_end_ptr = assign_front_end(); + xassert(job_ptr->front_end_ptr); + job_ptr->batch_host = xstrdup(job_ptr->front_end_ptr->name); +#endif while ((this_node_name = hostlist_shift(host_list))) { if ((node_ptr = find_node_record(this_node_name))) { memcpy(&job_ptr->node_addr[node_inx++], @@ -2053,6 +2051,8 @@ extern void build_node_details(struct job_record *job_ptr) error("Invalid node %s in JobId=%u", this_node_name, job_ptr->job_id); } + if (job_ptr->batch_host == NULL) + job_ptr->batch_host = xstrdup(this_node_name); free(this_node_name); } hostlist_destroy(host_list); -- GitLab From a6bfc62bce45cdd46bab59692d620b72632a1469 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 11:07:08 -0700 Subject: [PATCH 461/614] Add switch/nrt support for sn_all and multiple protocols --- src/plugins/switch/nrt/nrt.c | 216 +++++++++++++++++++++-------------- 1 file changed, 129 insertions(+), 87 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 06ad042762..1af008e36f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -176,7 +176,8 @@ static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - char *protocol_name, nrt_logical_id_t base_lid); + nrt_protocol_table_t *protocol_table, + nrt_logical_id_t base_lid); static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, @@ -779,7 +780,8 @@ static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - char *protocol_name, nrt_logical_id_t base_lid) + nrt_protocol_table_t *protocol_table, + nrt_logical_id_t base_lid) { int adapter_cnt = jp->tables_per_task; nrt_tableinfo_t *tableinfo = jp->tableinfo; @@ -790,6 +792,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; slurm_nrt_window_t *window; + nrt_context_id_t context_id; int adapters_set = 0; int i; @@ -826,76 +829,109 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, continue; if ((network_id >= 0) && (adapter->network_id != network_id)) continue; - if (user_space) { - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s adapter %s", - node->name, adapter->adapter_name); - return SLURM_ERROR; + for (context_id = 0; + context_id < protocol_table->protocol_table_cnt; + context_id++) { + if (user_space) { + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on node %s " + "adapter %s", + node->name, + adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - } - if (!user_space) { - nrt_ip_task_info_t *ip_table; - ip_table = (nrt_ip_task_info_t *) - tableinfo[adapters_set].table; - ip_table += task_id; - ip_table->node_number = node_number; - ip_table->task_id = task_id; - if (ip_v4) { - memcpy(&ip_table->ip.ipv4_addr, - &adapter->ipv4_addr, sizeof(in_addr_t)); + if (!user_space) { + nrt_ip_task_info_t *ip_table; + if (!tableinfo[adapters_set].table) { + tableinfo[adapters_set].table = + xmalloc(sizeof(nrt_ip_task_info_t)* + tableinfo[adapters_set].table_length); + } + ip_table = (nrt_ip_task_info_t *) + tableinfo[adapters_set].table; + ip_table += task_id; + ip_table->node_number = node_number; + ip_table->task_id = task_id; + if (ip_v4) { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, + sizeof(in_addr_t)); + } else { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, + sizeof(struct in6_addr)); + } + } else if (adapter->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_table; + if (!tableinfo[adapters_set].table) { + tableinfo[adapters_set].table = + xmalloc(sizeof(nrt_ib_task_info_t)* + tableinfo[adapters_set].table_length); + } + ib_table = (nrt_ib_task_info_t *) + tableinfo[adapters_set].table; + ib_table += task_id; + strncpy(ib_table->device_name, + adapter->adapter_name, + NRT_MAX_DEVICENAME_SIZE); + ib_table->base_lid = base_lid; + ib_table->port_id = 1; + ib_table->lmc = 0; + ib_table->node_number = node_number; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; + } else if (adapter->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_table; + if (!tableinfo[adapters_set].table) { + tableinfo[adapters_set].table = + xmalloc(sizeof(nrt_hfi_task_info_t)* + tableinfo[adapters_set].table_length); + } + hfi_table = (nrt_hfi_task_info_t *) + tableinfo[adapters_set].table; + hfi_table += task_id; + hfi_table->task_id = task_id; + hfi_table->win_id = window->window_id; + } else if ((adapter->adapter_type == NRT_HPCE) || + (adapter->adapter_type == NRT_KMUX)) { + nrt_hpce_task_info_t *hpce_table; + if (!tableinfo[adapters_set].table) { + tableinfo[adapters_set].table = + xmalloc(sizeof(nrt_hpce_task_info_t)* + tableinfo[adapters_set].table_length); + } + hpce_table = (nrt_hpce_task_info_t *) + tableinfo[adapters_set].table; + hpce_table += task_id; + hpce_table->task_id = task_id; + hpce_table->win_id = window->window_id; } else { - memcpy(&ip_table->ip.ipv6_addr, - &adapter->ipv6_addr, - sizeof(struct in6_addr)); + error("Missing support for adapter type %s", + _adapter_type_str(adapter->adapter_type)); } - } else if (adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_table; - ib_table = (nrt_ib_task_info_t *) - tableinfo[adapters_set].table; - ib_table += task_id; - strncpy(ib_table->device_name, adapter->adapter_name, - NRT_MAX_DEVICENAME_SIZE); - ib_table->base_lid = base_lid; - ib_table->port_id = 1; - ib_table->lmc = 0; - ib_table->node_number = node_number; - ib_table->task_id = task_id; - ib_table->win_id = window->window_id; - } else if (adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_table; - hfi_table = (nrt_hfi_task_info_t *) - tableinfo[adapters_set].table; - hfi_table += task_id; - hfi_table->task_id = task_id; - hfi_table->win_id = window->window_id; - } else if ((adapter_type == NRT_HPCE) || - (adapter_type == NRT_KMUX)) { - nrt_hpce_task_info_t *hpce_table; - hpce_table = (nrt_hpce_task_info_t *) - tableinfo[adapters_set].table; - hpce_table += task_id; - hpce_table->task_id = task_id; - hpce_table->win_id = window->window_id; - } else { - error("Missing support for adapter type %s", - _adapter_type_str(adapter_type)); - } - strncpy(tableinfo[adapters_set].adapter_name, - adapter->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); - tableinfo[adapters_set].adapter_type = adapter->adapter_type; - tableinfo[adapters_set].network_id = adapter->network_id; - strncpy(tableinfo[adapters_set].protocol_name, protocol_name, - NRT_MAX_PROTO_NAME_LEN); -/* FIXME: Need to set context_id & table_id */ - tableinfo[adapters_set].context_id = 0; - tableinfo[adapters_set].table_id = adapters_set; - adapters_set++; - } + strncpy(tableinfo[adapters_set].adapter_name, + adapter->adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[adapters_set].adapter_type = adapter-> + adapter_type; + tableinfo[adapters_set].network_id = adapter-> + network_id; + strncpy(tableinfo[adapters_set].protocol_name, + protocol_table->protocol_table[context_id]. + protocol_name, + NRT_MAX_PROTO_NAME_LEN); + tableinfo[adapters_set].context_id = context_id; + /* FIXME: Need to set table_id */ + tableinfo[adapters_set].table_id = adapters_set; + adapters_set++; + } /* for each context */ + } /* for each adapter */ return SLURM_SUCCESS; } @@ -997,6 +1033,11 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, if (!user_space) { nrt_ip_task_info_t *ip_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_ip_task_info_t)* + tableinfo[table_inx].table_length); + } ip_table = (nrt_ip_task_info_t *) tableinfo[table_inx].table; ip_table += task_id; @@ -1013,6 +1054,11 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_ib_task_info_t)* + tableinfo[table_inx].table_length); + } ib_table = (nrt_ib_task_info_t *) tableinfo[table_inx].table; ib_table += task_id; @@ -1026,6 +1072,11 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_hfi_task_info_t)* + tableinfo[table_inx].table_length); + } hfi_table = (nrt_hfi_task_info_t *) tableinfo[table_inx].table; hfi_table += task_id; @@ -1035,6 +1086,11 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) { nrt_hpce_task_info_t *hpce_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_hpce_task_info_t)* + tableinfo[table_inx].table_length); + } hpce_table = (nrt_hpce_task_info_t *) tableinfo[table_inx].table; hpce_table += task_id; @@ -1048,7 +1104,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, strncpy(tableinfo[table_inx].adapter_name, adapter_name, NRT_MAX_ADAPTER_NAME_LEN); tableinfo[table_inx].adapter_type = adapter-> - adapter_type; + adapter_type; tableinfo[table_inx].network_id = adapter->network_id; strncpy(tableinfo[table_inx].protocol_name, protocol_table->protocol_table[context_id]. @@ -1056,8 +1112,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, NRT_MAX_PROTO_NAME_LEN); tableinfo[table_inx].context_id = context_id; tableinfo[table_inx].table_id = table_id; - } - } + } /* for each table */ + } /* for each context */ return SLURM_SUCCESS; } @@ -1320,7 +1376,7 @@ _print_table(void *table, int size, nrt_adapter_t adapter_type, bool ip_v4) info(" ipv6_addr: %s", addr_str); } } else { - fatal("Unsupported adapter_type: %s", + error("Unsupported adapter_type: %s", _adapter_type_str(adapter_type)); } info(" ------"); @@ -2215,7 +2271,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int network_id = -1; nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; - int table_rec_len = 0; nrt_protocol_table_t *protocol_table = NULL; assert(jp); @@ -2311,22 +2366,9 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, /* Allocate memory for each nrt_tableinfo_t */ jp->tableinfo = (nrt_tableinfo_t *) xmalloc(jp->tables_per_task * sizeof(nrt_tableinfo_t)); - if (!jp->user_space) - table_rec_len = sizeof(nrt_ip_task_info_t); - else if (adapter_type == NRT_IB) - table_rec_len = sizeof(nrt_ib_task_info_t); - else if (adapter_type == NRT_HFI) - table_rec_len = sizeof(nrt_hfi_task_info_t); - else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) - table_rec_len = sizeof(nrt_hpce_task_info_t); - else { - info("Unsupported adapter_type: %s", - _adapter_type_str(adapter_type)); - slurm_seterrno_ret(EINVAL); - } for (i = 0; i < jp->tables_per_task; i++) { jp->tableinfo[i].table_length = nprocs; - jp->tableinfo[i].table = xmalloc(nprocs * table_rec_len); + /* jp->tableinfo[i].table allocated with windows function */ } #if NRT_DEBUG @@ -2348,7 +2390,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, tids[i][j], adapter_type, network_id, - protocol, + protocol_table, base_lid); } else { rc = _allocate_window_single(adapter_name, -- GitLab From ea8ca91da785ff2bc79397db9c7feb5ab8f55c0c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 22 Jun 2012 11:37:02 -0700 Subject: [PATCH 462/614] BLUEGENE - fix race condition where if a nodeboard/card goes down at the same time a block is destroyed and that block just happens to be the smallest overlapping block over the bad hardware. --- NEWS | 3 +++ .../select/bluegene/bg_record_functions.c | 20 ++++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index f135161302..37fd27fe4f 100644 --- a/NEWS +++ b/NEWS @@ -44,6 +44,9 @@ documents those changes that are of interest to users and admins. but not node count the node count is correctly figured out. -- Move logic to always use the 1st alphanumeric node as the batch host for batch jobs. + -- BLUEGENE - fix race condition where if a nodeboard/card goes down at the + same time a block is destroyed and that block just happens to be the + smallest overlapping block over the bad hardware. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index 36bfd76b97..b6d1e262c6 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1068,9 +1068,10 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, smallest_bg_record = bg_record; } list_iterator_destroy(itr); - slurm_mutex_unlock(&block_state_mutex); - if (!slurmctld_locked) - unlock_slurmctld(job_write_lock); + + /* We cannot unlock block_state_mutex here until we are done + * with smallest_bg_record. + */ if (bg_conf->layout_mode != LAYOUT_DYNAMIC) { debug3("running non-dynamic mode"); @@ -1086,14 +1087,17 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, && (smallest_bg_record->cnode_cnt < bg_conf->mp_cnode_cnt)){ if (smallest_bg_record->state & BG_BLOCK_ERROR_FLAG) { rc = SLURM_NO_CHANGE_IN_DATA; + slurm_mutex_unlock(&block_state_mutex); goto cleanup; } + slurm_mutex_unlock(&block_state_mutex); rc = put_block_in_error_state( smallest_bg_record, reason); goto cleanup; } + slurm_mutex_unlock(&block_state_mutex); debug("No block under 1 midplane available for this nodecard. " "Draining the whole node."); if (!node_already_down(mp_name)) { @@ -1134,6 +1138,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, if (!cnt_set) { FREE_NULL_BITMAP(iobitmap); rc = SLURM_ERROR; + slurm_mutex_unlock(&block_state_mutex); goto cleanup; } /* set the start to be the same as the start of the @@ -1157,6 +1162,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, smallest_bg_record->bg_block_id); if (smallest_bg_record->state & BG_BLOCK_ERROR_FLAG) { rc = SLURM_NO_CHANGE_IN_DATA; + slurm_mutex_unlock(&block_state_mutex); goto cleanup; } @@ -1166,6 +1172,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, sleep(1); if (smallest_bg_record->cnode_cnt == create_size) { + slurm_mutex_unlock(&block_state_mutex); rc = put_block_in_error_state( smallest_bg_record, reason); goto cleanup; @@ -1176,6 +1183,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, * have a create_size that is bigger than a * block that is already made. */ + slurm_mutex_unlock(&block_state_mutex); rc = put_block_in_error_state( smallest_bg_record, reason); goto cleanup; @@ -1226,6 +1234,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, blockreq.small128 = 4; break; case 512: + slurm_mutex_unlock(&block_state_mutex); if (!node_already_down(mp_name)) { if (slurmctld_locked) drain_nodes(mp_name, reason, @@ -1298,7 +1307,6 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, list_iterator_destroy(itr); } - slurm_mutex_lock(&block_state_mutex); delete_list = list_create(NULL); while ((bg_record = list_pop(requests))) { itr = list_iterator_create(bg_lists->main); @@ -1343,13 +1351,15 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, slurm_mutex_unlock(&block_state_mutex); free_block_list(NO_VAL, delete_list, delete_it, 0); list_destroy(delete_list); + slurm_mutex_lock(&block_state_mutex); } - slurm_mutex_lock(&block_state_mutex); sort_bg_record_inc_size(bg_lists->main); slurm_mutex_unlock(&block_state_mutex); last_bg_update = time(NULL); cleanup: + if (!slurmctld_locked) + unlock_slurmctld(job_write_lock); FREE_NULL_BITMAP(tmp_record.mp_bitmap); FREE_NULL_BITMAP(tmp_record.ionode_bitmap); -- GitLab From a92947d6cea996cf9d60dc210ec2f316ac65f11c Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 22 Jun 2012 12:30:02 -0700 Subject: [PATCH 463/614] BLUEGENE - alter node count correctly if not given but task count is. --- src/plugins/select/bluegene/select_bluegene.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 997d756b78..2fc520fbca 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -3031,10 +3031,13 @@ extern int select_p_alter_node_cnt(enum select_node_cnt type, void *data) if (job_desc->min_nodes == (uint32_t) NO_VAL) return SLURM_SUCCESS; else if ((job_desc->min_nodes == 1) - && (job_desc->min_cpus != NO_VAL) - && (job_desc->ntasks_per_node != NO_VAL)) - job_desc->min_nodes = job_desc->min_cpus - / job_desc->ntasks_per_node; + && (job_desc->min_cpus != NO_VAL)) { + job_desc->min_nodes = job_desc->min_cpus; + if (job_desc->ntasks_per_node + && job_desc->ntasks_per_node != NO_VAL) + job_desc->min_nodes /= + job_desc->ntasks_per_node; + } get_select_jobinfo(job_desc->select_jobinfo->data, SELECT_JOBDATA_GEOMETRY, &req_geometry); -- GitLab From 86196b70b54f359cb072c76592741f7383795ffa Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 22 Jun 2012 12:31:52 -0700 Subject: [PATCH 464/614] remove NEWS item missed from commit 29d79ef8e4c7e3dc91f8ef41766dcadd0a765a18 --- NEWS | 1 - 1 file changed, 1 deletion(-) diff --git a/NEWS b/NEWS index 37fd27fe4f..dbd4d40e72 100644 --- a/NEWS +++ b/NEWS @@ -39,7 +39,6 @@ documents those changes that are of interest to users and admins. we must use a small block instead of a shared midplane block. -- Fix issues on large jobs (>64k tasks) to have the correct counter type when packing the step layout structure. - -- Fix bug in gang scheduling table initialization. -- BGQ - fix issue where if a user was asking for tasks and ntasks-per-node but not node count the node count is correctly figured out. -- Move logic to always use the 1st alphanumeric node as the batch host for -- GitLab From a253d3611e28d89e3f66d3eb70cf2d69ef3bc364 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 12:32:37 -0700 Subject: [PATCH 465/614] switch/nrt get instances working with sn_all --- src/plugins/switch/nrt/nrt.c | 229 ++++++++++++++++++----------------- 1 file changed, 119 insertions(+), 110 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 1af008e36f..7bf0069b20 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -177,7 +177,7 @@ static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, nrt_protocol_table_t *protocol_table, - nrt_logical_id_t base_lid); + nrt_logical_id_t base_lid, int instances); static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, @@ -781,9 +781,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, nrt_protocol_table_t *protocol_table, - nrt_logical_id_t base_lid) + nrt_logical_id_t base_lid, int instances) { - int adapter_cnt = jp->tables_per_task; +/* FIXME: check argument uses, especially base_lid */ nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; bool ip_v4 = jp->ip_v4; @@ -793,8 +793,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, slurm_nrt_adapter_t *adapter; slurm_nrt_window_t *window; nrt_context_id_t context_id; - int adapters_set = 0; - int i; + nrt_table_id_t table_id; + int i, j, table_inx; assert(tableinfo); assert(hostname); @@ -820,116 +820,124 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, } /* Reserve a window on each adapter for this task */ - for (i = 0; - ((i < node->adapter_count) && (adapters_set < adapter_cnt)); - i++) { - adapter = &node->adapter_list[i]; - if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && - (adapter->adapter_type != adapter_type)) - continue; - if ((network_id >= 0) && (adapter->network_id != network_id)) - continue; - for (context_id = 0; - context_id < protocol_table->protocol_table_cnt; - context_id++) { - if (user_space) { - window = _find_free_window(adapter); - if (window == NULL) { - error("No free windows on node %s " - "adapter %s", - node->name, - adapter->adapter_name); + table_inx = -1; + for (context_id = 0; context_id < protocol_table->protocol_table_cnt; + context_id++) { + table_id = -1; + for (i = 0; i < node->adapter_count; i++) { + adapter = &node->adapter_list[i]; + if ((adapter_type != NRT_MAX_ADAPTER_TYPES) && + (adapter->adapter_type != adapter_type)) + continue; + if ((network_id >= 0) && + (adapter->network_id != network_id)) + continue; + for (j = 0; j < instances; j++) { + table_id++; + table_inx++; + if (table_inx >= jp->tables_per_task) { + error("switch/nrt table count bad"); return SLURM_ERROR; } - window->state = NRT_WIN_UNAVAILABLE; - window->job_key = job_key; - } - - if (!user_space) { - nrt_ip_task_info_t *ip_table; - if (!tableinfo[adapters_set].table) { - tableinfo[adapters_set].table = - xmalloc(sizeof(nrt_ip_task_info_t)* - tableinfo[adapters_set].table_length); + if (user_space) { + window = _find_free_window(adapter); + if (window == NULL) { + error("No free windows on " + "node %s adapter %s", + node->name, + adapter->adapter_name); + return SLURM_ERROR; + } + window->state = NRT_WIN_UNAVAILABLE; + window->job_key = job_key; } - ip_table = (nrt_ip_task_info_t *) - tableinfo[adapters_set].table; - ip_table += task_id; - ip_table->node_number = node_number; - ip_table->task_id = task_id; - if (ip_v4) { - memcpy(&ip_table->ip.ipv4_addr, - &adapter->ipv4_addr, - sizeof(in_addr_t)); + + if (!user_space) { + nrt_ip_task_info_t *ip_table; +/* FIXME: Try to make the xmalloc cleaner and uniform */ + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_ip_task_info_t)* + tableinfo[table_inx].table_length); + } + ip_table = (nrt_ip_task_info_t *) + tableinfo[table_inx].table; + ip_table += task_id; + ip_table->node_number = node_number; + ip_table->task_id = task_id; + if (ip_v4) { + memcpy(&ip_table->ip.ipv4_addr, + &adapter->ipv4_addr, + sizeof(in_addr_t)); + } else { + memcpy(&ip_table->ip.ipv6_addr, + &adapter->ipv6_addr, + sizeof(struct in6_addr)); + } + } else if (adapter->adapter_type == NRT_IB) { + nrt_ib_task_info_t *ib_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_ib_task_info_t)* + tableinfo[table_inx].table_length); + } + ib_table = (nrt_ib_task_info_t *) + tableinfo[table_inx].table; + ib_table += task_id; + strncpy(ib_table->device_name, + adapter->adapter_name, + NRT_MAX_DEVICENAME_SIZE); + ib_table->base_lid = base_lid; + ib_table->port_id = 1; + ib_table->lmc = 0; + ib_table->node_number = node_number; + ib_table->task_id = task_id; + ib_table->win_id = window->window_id; + } else if (adapter->adapter_type == NRT_HFI) { + nrt_hfi_task_info_t *hfi_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_hfi_task_info_t)* + tableinfo[table_inx].table_length); + } + hfi_table = (nrt_hfi_task_info_t *) + tableinfo[table_inx].table; + hfi_table += task_id; + hfi_table->task_id = task_id; + hfi_table->win_id = window->window_id; + } else if ((adapter->adapter_type == NRT_HPCE)|| + (adapter->adapter_type == NRT_KMUX)){ + nrt_hpce_task_info_t *hpce_table; + if (!tableinfo[table_inx].table) { + tableinfo[table_inx].table = + xmalloc(sizeof(nrt_hpce_task_info_t)* + tableinfo[table_inx].table_length); + } + hpce_table = (nrt_hpce_task_info_t *) + tableinfo[table_inx].table; + hpce_table += task_id; + hpce_table->task_id = task_id; + hpce_table->win_id = window->window_id; } else { - memcpy(&ip_table->ip.ipv6_addr, - &adapter->ipv6_addr, - sizeof(struct in6_addr)); + error("Missing support for adapter " + "type %s", + _adapter_type_str(adapter->adapter_type)); } - } else if (adapter->adapter_type == NRT_IB) { - nrt_ib_task_info_t *ib_table; - if (!tableinfo[adapters_set].table) { - tableinfo[adapters_set].table = - xmalloc(sizeof(nrt_ib_task_info_t)* - tableinfo[adapters_set].table_length); - } - ib_table = (nrt_ib_task_info_t *) - tableinfo[adapters_set].table; - ib_table += task_id; - strncpy(ib_table->device_name, - adapter->adapter_name, - NRT_MAX_DEVICENAME_SIZE); - ib_table->base_lid = base_lid; - ib_table->port_id = 1; - ib_table->lmc = 0; - ib_table->node_number = node_number; - ib_table->task_id = task_id; - ib_table->win_id = window->window_id; - } else if (adapter->adapter_type == NRT_HFI) { - nrt_hfi_task_info_t *hfi_table; - if (!tableinfo[adapters_set].table) { - tableinfo[adapters_set].table = - xmalloc(sizeof(nrt_hfi_task_info_t)* - tableinfo[adapters_set].table_length); - } - hfi_table = (nrt_hfi_task_info_t *) - tableinfo[adapters_set].table; - hfi_table += task_id; - hfi_table->task_id = task_id; - hfi_table->win_id = window->window_id; - } else if ((adapter->adapter_type == NRT_HPCE) || - (adapter->adapter_type == NRT_KMUX)) { - nrt_hpce_task_info_t *hpce_table; - if (!tableinfo[adapters_set].table) { - tableinfo[adapters_set].table = - xmalloc(sizeof(nrt_hpce_task_info_t)* - tableinfo[adapters_set].table_length); - } - hpce_table = (nrt_hpce_task_info_t *) - tableinfo[adapters_set].table; - hpce_table += task_id; - hpce_table->task_id = task_id; - hpce_table->win_id = window->window_id; - } else { - error("Missing support for adapter type %s", - _adapter_type_str(adapter->adapter_type)); - } - strncpy(tableinfo[adapters_set].adapter_name, - adapter->adapter_name, - NRT_MAX_ADAPTER_NAME_LEN); - tableinfo[adapters_set].adapter_type = adapter-> - adapter_type; - tableinfo[adapters_set].network_id = adapter-> - network_id; - strncpy(tableinfo[adapters_set].protocol_name, - protocol_table->protocol_table[context_id]. - protocol_name, - NRT_MAX_PROTO_NAME_LEN); - tableinfo[adapters_set].context_id = context_id; - /* FIXME: Need to set table_id */ - tableinfo[adapters_set].table_id = adapters_set; - adapters_set++; + strncpy(tableinfo[table_inx].adapter_name, + adapter->adapter_name, + NRT_MAX_ADAPTER_NAME_LEN); + tableinfo[table_inx].adapter_type = adapter-> + adapter_type; + tableinfo[table_inx].network_id = adapter-> + network_id; + strncpy(tableinfo[table_inx].protocol_name, + protocol_table->protocol_table[context_id]. + protocol_name, + NRT_MAX_PROTO_NAME_LEN); + tableinfo[table_inx].context_id = context_id; + tableinfo[table_inx].table_id = table_id; + } /* for each table */ } /* for each context */ } /* for each adapter */ @@ -2391,7 +2399,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, adapter_type, network_id, protocol_table, - base_lid); + base_lid, + instances); } else { rc = _allocate_window_single(adapter_name, jp, host, i, -- GitLab From 528bffbb0ca6eb7c3353d6d89e832faf06d69c99 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 12:56:36 -0700 Subject: [PATCH 466/614] switch/nrt fix setting of base_lid --- src/plugins/switch/nrt/nrt.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 7bf0069b20..93af521822 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -176,8 +176,7 @@ static char * _adapter_type_str(nrt_adapter_t type); static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_protocol_table_t *protocol_table, - nrt_logical_id_t base_lid, int instances); + nrt_protocol_table_t *protocol_table, int instances); static int _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, @@ -780,10 +779,8 @@ static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, - nrt_protocol_table_t *protocol_table, - nrt_logical_id_t base_lid, int instances) + nrt_protocol_table_t *protocol_table, int instances) { -/* FIXME: check argument uses, especially base_lid */ nrt_tableinfo_t *tableinfo = jp->tableinfo; nrt_job_key_t job_key = jp->job_key; bool ip_v4 = jp->ip_v4; @@ -832,6 +829,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if ((network_id >= 0) && (adapter->network_id != network_id)) continue; + if (user_space && + (adapter->adapter_type == NRT_IPONLY)) + continue; for (j = 0; j < instances; j++) { table_id++; table_inx++; @@ -887,7 +887,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, strncpy(ib_table->device_name, adapter->adapter_name, NRT_MAX_DEVICENAME_SIZE); - ib_table->base_lid = base_lid; + ib_table->base_lid = adapter->lid; ib_table->port_id = 1; ib_table->lmc = 0; ib_table->node_number = node_number; @@ -2277,7 +2277,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int rc; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; int network_id = -1; - nrt_logical_id_t base_lid = 0xffffff; int adapter_type_count = 0; nrt_protocol_table_t *protocol_table = NULL; @@ -2330,10 +2329,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if (jp->user_space && (ad_type == NRT_IPONLY)) continue; adapter_type_count++; -/* FIXME: It's unclear how this works, each node would have different logical_id - * although the network_id seems to be common for our IB switches */ - base_lid = MIN(base_lid, - node->adapter_list[i].lid); if (!sn_all) { adapter_type = ad_type; network_id = node->adapter_list[i].network_id; @@ -2399,7 +2394,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, adapter_type, network_id, protocol_table, - base_lid, instances); } else { rc = _allocate_window_single(adapter_name, -- GitLab From 86cf332cfc5362a56709298df8b38449e7d89e7e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 13:20:26 -0700 Subject: [PATCH 467/614] switch/nrt, memory allocation logic improvements --- src/plugins/switch/nrt/README | 47 +++++++++--------- src/plugins/switch/nrt/nrt.c | 90 ++++++++++++++++++----------------- 2 files changed, 70 insertions(+), 67 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index 2f0643469d..11c00bf637 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -1,26 +1,25 @@ -1. Configuration file nrt.conf -1A. Add nrt.conf man page -1B. Add nrt.conf example -1C. Modify nrt.conf parsing and data structures to support adapter_type +Sample tests -2. NRT APIs -2A. Convert all Federation switch API calls to Torrent switch API calls - (largely completed as part of evaluation, but largely untested) -2B. Convert Federation switch data structures to Torrent switch data structures - Add adapter type - In the adapter resources, how "spigot" used? - "lid" and "network_id" are now arrays, how are they used? - Resolve window state incompatabilities (data structure union, IB or HPCE) - Remove adapter memory specifications (done) - Many window and adapter fields that do remain have different sizes - We have no details about the differences in data structures between IB and HPCE, - but code changes for that will clearly be needed - (started as part of evaluation, but the work is untested) +./srun -N2 --network="sn_all,devtype=ib" hostname +./srun -N2 --network="sn_all,devtype=iponly" hostname +./srun -N2 --network="sn_single,devtype=ib" hostname +./srun -N2 --network="sn_single,devtype=ib,us" hostname +./srun -N2 --network="sn_single,devtype=iponly,ipv4" hostname +./srun -N2 --network="sn_single,devtype=iponly,ipv6" hostname +./srun -N2 --network="sn_all,ipv6" hostname +./srun -N2 --network="mlx4_0" hostname +./srun -N2 --network="eth0" hostname +./srun -N2 --network="mlx4_0,mpi,lapi" hostname +./srun -N2 --network="mlx4_0,mpi,lapi,us" hostname +./srun -N2 --network="mlx4_0,mpi,lapi,instances=3" hostname +./srun -N2 -n4 --network="mlx4_0,mpi,lapi,us,instances=3" hostname +./srun -N2 --network="sn_all" hostname +./srun -N2 --network="sn_all,mpi,lapi" hostname +./srun -N2 --network="sn_all,mpi,lapi" hostname +./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=2" hostname +./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=3,us" hostname -3. POE support -3A. Data structures needed to allocate resources to job are similar, but require some mods - Minor changes needed to job credential -3B. Task launch completely new - Pass window allocation information using socket -3C. Elimination of POE would require IBM to expose details of network communications - Likely major effort and not possible without close cooperation with IBM +FAILURES +./srun -N2 --network="sn_all,devtype=hfi" hostname +./srun -N2 --network="sn_single,devtype=hfi" hostname +./srun -N2 --network="sn_single,devtype=iponly,us" hostname diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 93af521822..d49798e29a 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -768,6 +768,32 @@ _find_free_window(slurm_nrt_adapter_t *adapter) return (slurm_nrt_window_t *) NULL; } +static void _table_alloc(nrt_tableinfo_t *tableinfo, int table_inx, + nrt_adapter_t adapter_type) +{ + int table_size; + + if (tableinfo[table_inx].table) + return; + if (adapter_type == NRT_IB) + table_size = sizeof(nrt_ib_task_info_t); + else if (adapter_type == NRT_HFI) + table_size = sizeof(nrt_hfi_task_info_t); + else if (adapter_type == NRT_IPONLY) + table_size = sizeof(nrt_ip_task_info_t); + else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) + table_size = sizeof(nrt_hpce_task_info_t); + else { + error("Missing support for adapter type %s", + _adapter_type_str(adapter_type)); + return; + } + tableinfo[table_inx].table = xmalloc(table_size * + tableinfo[table_inx]. + table_length); + return; +} + /* For a given process, fill out an nrt_creator_per_task_input_t * struct (an array of these makes up the network table loaded * for each job). Assign adapters, lids and switch windows to @@ -854,12 +880,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (!user_space) { nrt_ip_task_info_t *ip_table; -/* FIXME: Try to make the xmalloc cleaner and uniform */ - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_ip_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + NRT_IPONLY); ip_table = (nrt_ip_task_info_t *) tableinfo[table_inx].table; ip_table += task_id; @@ -876,11 +898,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, } } else if (adapter->adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_ib_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter->adapter_type); ib_table = (nrt_ib_task_info_t *) tableinfo[table_inx].table; ib_table += task_id; @@ -895,11 +914,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, ib_table->win_id = window->window_id; } else if (adapter->adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_hfi_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter->adapter_type); hfi_table = (nrt_hfi_task_info_t *) tableinfo[table_inx].table; hfi_table += task_id; @@ -908,11 +924,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, } else if ((adapter->adapter_type == NRT_HPCE)|| (adapter->adapter_type == NRT_KMUX)){ nrt_hpce_task_info_t *hpce_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_hpce_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter->adapter_type); hpce_table = (nrt_hpce_task_info_t *) tableinfo[table_inx].table; hpce_table += task_id; @@ -921,7 +934,9 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, } else { error("Missing support for adapter " "type %s", - _adapter_type_str(adapter->adapter_type)); + _adapter_type_str(adapter-> + adapter_type)); + return SLURM_ERROR; } strncpy(tableinfo[table_inx].adapter_name, @@ -932,7 +947,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, tableinfo[table_inx].network_id = adapter-> network_id; strncpy(tableinfo[table_inx].protocol_name, - protocol_table->protocol_table[context_id]. + protocol_table-> + protocol_table[context_id]. protocol_name, NRT_MAX_PROTO_NAME_LEN); tableinfo[table_inx].context_id = context_id; @@ -1041,11 +1057,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, if (!user_space) { nrt_ip_task_info_t *ip_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_ip_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, NRT_IPONLY); ip_table = (nrt_ip_task_info_t *) tableinfo[table_inx].table; ip_table += task_id; @@ -1062,11 +1074,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } } else if (adapter_type == NRT_IB) { nrt_ib_task_info_t *ib_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_ib_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter_type); ib_table = (nrt_ib_task_info_t *) tableinfo[table_inx].table; ib_table += task_id; @@ -1080,11 +1089,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, ib_table->win_id = window->window_id; } else if (adapter_type == NRT_HFI) { nrt_hfi_task_info_t *hfi_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_hfi_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter_type); hfi_table = (nrt_hfi_task_info_t *) tableinfo[table_inx].table; hfi_table += task_id; @@ -1094,11 +1100,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } else if ((adapter_type == NRT_HPCE) || (adapter_type == NRT_KMUX)) { nrt_hpce_task_info_t *hpce_table; - if (!tableinfo[table_inx].table) { - tableinfo[table_inx].table = - xmalloc(sizeof(nrt_hpce_task_info_t)* - tableinfo[table_inx].table_length); - } + _table_alloc(tableinfo, table_inx, + adapter_type); hpce_table = (nrt_hpce_task_info_t *) tableinfo[table_inx].table; hpce_table += task_id; @@ -1107,6 +1110,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } else { error("Missing support for adapter type %s", _adapter_type_str(adapter_type)); + return SLURM_ERROR; } strncpy(tableinfo[table_inx].adapter_name, adapter_name, -- GitLab From 140a85f52d63a10c71877b8ff6d997b29a0d1dc0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 13:43:07 -0700 Subject: [PATCH 468/614] switch/nrt: Note that job keys not available from adapter status --- src/plugins/switch/nrt/nrt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index d49798e29a..b95daf35a9 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1712,9 +1712,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) window_ptr->window_id = (*status_array)[k]. window_id; window_ptr->state = (*status_array)[k].state; -/* FIXME: This appears to be bad */ - window_ptr->job_key = (*status_array)[k]. - client_pid; + /* window_ptr->job_key = Not_Available */ } /* Now get adapter info (port_id, network_id, etc.) */ @@ -1804,7 +1802,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) /* Assumes a pre-allocated nodeinfo structure and uses _get_adapters * to do the dirty work. We probably collect more information about - * the adapters on a give node than we need to but it was done + * the adapters on a give node than we need to, but it was done * in the interest of being prepared for future requirements. * * Used by: slurmd @@ -3351,7 +3349,7 @@ _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) #if NRT_DEBUG info("_unpack_libstate"); _print_libstate(lp); - #endif +#endif return SLURM_SUCCESS; unpack_error: -- GitLab From bbdce438f3173a8a039a65d1c7f652e3e8cc395d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 14:41:06 -0700 Subject: [PATCH 469/614] switch/nrt: improve identification if adapters in slurmctld restart logic --- src/plugins/switch/nrt/nrt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b95daf35a9..740abd2ac2 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -651,9 +651,8 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) rc = SLURM_ERROR; continue; } - /* FIXME: These should probably match network_id or something else */ - // if (adapter->lid == hpce_tbl_ptr->lid) { - if (1) { + if (adapter->network_id == + tableinfo[i].network_id) { adapter_found = true; win_id = hpce_tbl_ptr->win_id; debug3("Setting status %s " -- GitLab From 05f293b72209380d900b0820ad0b93a3f7310ffc Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 22 Jun 2012 14:42:08 -0700 Subject: [PATCH 470/614] switch/nrt: remove some logic planed for getting adapter/protocol information Use existing functions and data types to get the information --- src/plugins/switch/nrt/nrt.c | 9 --------- src/plugins/switch/nrt/nrt_keys.h | 32 ++++++++++++++----------------- 2 files changed, 14 insertions(+), 27 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 740abd2ac2..bf6234cbf1 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2792,7 +2792,6 @@ nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) extern int nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) { - nrt_comm_table_t **comm_table = (nrt_comm_table_t **) data; nrt_tableinfo_t **tableinfo = (nrt_tableinfo_t **) data; int *tables_per = (int *) data; int *job_key = (int *) data; @@ -2810,14 +2809,6 @@ nrt_get_jobinfo(slurm_nrt_jobinfo_t *jp, int key, void *data) case NRT_JOBINFO_KEY: *job_key = (int) jp->job_key; break; - case NRT_JOBINFO_COMM_INFO: - if (jp->tableinfo) - *comm_table = jp->tableinfo->comm_table_ptr; - else { - *comm_table = NULL; - slurm_seterrno_ret(EINVAL); - } - break; default: slurm_seterrno_ret(EINVAL); } diff --git a/src/plugins/switch/nrt/nrt_keys.h b/src/plugins/switch/nrt/nrt_keys.h index 7cfcc9d538..8e0aac0d99 100644 --- a/src/plugins/switch/nrt/nrt_keys.h +++ b/src/plugins/switch/nrt/nrt_keys.h @@ -48,28 +48,15 @@ enum { /* NRT specific get_jobinfo keys */ NRT_JOBINFO_TABLEINFO, - NRT_JOBINFO_TABLESPERTASK, + NRT_JOBINFO_TABLESPERTASK, /* Count of nrt_tableinfo records */ NRT_JOBINFO_KEY, NRT_JOBINFO_PROTOCOL, - NRT_JOBINFO_MODE, - NRT_JOBINFO_COMM_INFO + NRT_JOBINFO_MODE }; /* Information shared between slurm_ll_api and the slurm NRT driver */ -typedef struct nrt_comm_record { - nrt_context_id_t context_id; - nrt_table_id_t table_id; - char device_name[NRT_MAX_DEVICENAME_SIZE]; /* eth0, mlx4_0, etc. */ - char protocol_name[NRT_MAX_PROTO_NAME_LEN]; /* MPI, LAPI, UPC, etc. */ -} nrt_comm_record_t; - -typedef struct nrt_comm_table { - uint16_t nrt_comm_count; - nrt_comm_record_t *nrt_comm_ptr; -} nrt_comm_table_t; - typedef struct nrt_tableinfo { - char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; + char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; /* eth0, mlx4_0, etc. */ nrt_adapter_t adapter_type; nrt_context_id_t context_id; nrt_network_id_t network_id; @@ -77,8 +64,17 @@ typedef struct nrt_tableinfo { nrt_table_id_t table_id; uint32_t table_length; void *table; /* Pointer to nrt_*_task_info_t */ -/* FIXME: Need to populate, un/pack, and free this data structure */ - nrt_comm_table_t *comm_table_ptr; } nrt_tableinfo_t; +/* In order to determine the adapters and protocols in use: + * int table_cnt; + * nrt_tableinfo_t *tables; + * switch_p_get_jobinfo(switch_job_ptr, NRT_JOBINFO_TABLESPERTASK, &table_cnt); + * switch_p_get_jobinfo(switch_job_ptr, NRT_JOBINFO_TABLESPERTASK, &table); + * for (i=0, table_ptr=table; iadapter_name, + * table_ptr->protocol_name); + * } + */ + #endif /* _NRT_KEYS_INCLUDED */ -- GitLab From 31dcc0c2d79f7962a5f8159dcbc87a10debddd89 Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Sun, 24 Jun 2012 18:52:59 -0700 Subject: [PATCH 471/614] Add FAQ about job start time estimate --- doc/html/faq.shtml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/doc/html/faq.shtml b/doc/html/faq.shtml index f0495c5784..6923734403 100644 --- a/doc/html/faq.shtml +++ b/doc/html/faq.shtml @@ -46,6 +46,8 @@ the slurm-dev mailing list? running?
        • Why is my MPIHCH2 or MVAPICH2 job not running with SLURM? Why does the DAKOTA program not run with SLURM?
        • +
        • Why does squeue (and "scontrol show +jobid") sometimes not display a job's estimated start time?
        • For Administrators

          @@ -816,6 +818,17 @@ rather than the appropriate library, the application will fail. In the case of Rename DAKOTA's function and references from regcomp to something else to make it work properly.

          +

          26. Why does squeue (and "scontrol show +jobid") sometimes not display a job's estimated start time?
          +When the backfill scheduler is configured, it provides an estimated start time +for jobs that are candidates for backfill. Pending jobs with dependencies +will not have an estimate as it is difficult to predict what resources will +be available when the jobs they are dependent on terminate. Also note that +the estimate is better for jobs expected to start soon, as most running jobs +end before their estimated time. There are other restrictions on backfill that +may apply. See the backfill section for more details. +

          + @@ -1500,6 +1513,6 @@ https://github.com/SchedMD/slurm/commit/91e543d433bed11e0df13ce0499be641774c99a3 -

          Last modified 23 March 2012

          +

          Last modified 24 June 2012

          -- GitLab From 284b8801380a164c1e307a69c9588bb21a344d0e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 08:37:33 -0700 Subject: [PATCH 472/614] switch/nrt: move adapter_info logging to separate function, log more fields --- src/plugins/switch/nrt/nrt.c | 82 +++++++++++++++++++++++++----------- 1 file changed, 58 insertions(+), 24 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index bf6234cbf1..e76e73df09 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1192,6 +1192,59 @@ _port_status_str(nrt_port_status_t status) } } +/* Used by: slurmd */ +static void +_print_adapter_info(nrt_adapter_info_t *adapter_info) +{ + char addr_v4_str[128], addr_v6_str[128]; + int i; + + if (!adapter_info) { + error("_print_adapter_info with NULL adapter_info"); + return; + } + + info("--Begin Adapter Info--"); + info(" adapter_name: %s", adapter_info->adapter_name); + info(" adapter_type: %s", + _adapter_type_str(adapter_info->adapter_type)); + info(" cau_indexes_avail: %hu", adapter_info->cau_indexes_avail); + info(" immed_slots_avail: %hu", adapter_info->immed_slots_avail); + inet_ntop(AF_INET, &adapter_info->node_number, + addr_v4_str, sizeof(addr_v4_str)); + info(" node_number: %s", addr_v4_str); +/* FIXME: Need to forward node_number to slurmctld */ + info(" num_ports: %hu", adapter_info->num_ports); + info(" rcontext_block_count: %"PRIu64"", + adapter_info->rcontext_block_count); +/* FIXME: Need to forward rcontext_block_count to slurmctld */ + info(" window_count: %hu", adapter_info->window_count); + for (i = 0; i < adapter_info->num_ports; i++) { + inet_ntop(AF_INET, + &adapter_info->port[i].ipv4_addr, + addr_v4_str, sizeof(addr_v4_str)); + inet_ntop(AF_INET6, + &adapter_info->port[i].ipv6_addr, + addr_v6_str, sizeof(addr_v6_str)); + info(" port_id:%hu status:%s lid:%u " + "network_id:%lu special:%lu " + "ipv4_addr:%s ipv6_addr:%s/%hu", + adapter_info->port[i].port_id, + _port_status_str(adapter_info->port[i].status), + adapter_info->port[i].lid, + adapter_info->port[i].network_id, + adapter_info->port[i].special, + addr_v4_str, addr_v6_str, + adapter_info->port[i].ipv6_prefix_len); + } +#if 0 + /* This always seems to count up from 0 to window_count-1 */ + for (i = 0; i < adapter_info->window_count; i++) + debug(" window_id: %u", adapter_info->window_list[i]); +#endif + info("--End Adapter Info--"); +} + /* Used by: slurmd */ static void _print_adapter_status(nrt_cmd_status_adapter_t *status_adapter) @@ -1735,30 +1788,11 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; } #if NRT_DEBUG - info("nrt_command(adapter_info, %s, %s), ports:%hu", + info("nrt_command(adapter_info, %s, %s)", query_adapter_info.adapter_name, - _adapter_type_str(query_adapter_info.adapter_type), - adapter_info.num_ports); - for (k = 0; k < adapter_info.num_ports; k++) { - char addr_v4_str[128], addr_v6_str[128]; - inet_ntop(AF_INET, - &adapter_info.port[k].ipv4_addr, - addr_v4_str, sizeof(addr_v4_str)); - inet_ntop(AF_INET6, - &adapter_info.port[k].ipv6_addr, - addr_v6_str, sizeof(addr_v6_str)); - info("port_id:%hu status:%s lid:%u " - "network_id:%lu special:%lu " - "ipv4_addr:%s ipv6_addr:%s/%hu", - adapter_info.port[k].port_id, - _port_status_str(adapter_info.port[k]. - status), - adapter_info.port[k].lid, - adapter_info.port[k].network_id, - adapter_info.port[k].special, - addr_v4_str, addr_v6_str, - adapter_info.port[k].ipv6_prefix_len); - } + _adapter_type_str(query_adapter_info. + adapter_type)); + _print_adapter_info(&adapter_info); #endif for (k = 0; k < adapter_info.num_ports; k++) { if (adapter_info.port[k].status != 1) @@ -2065,7 +2099,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) } } tmp_a->window_list = tmp_w; - tmp_w = NULL; /* don't free if unpack error on next adapter */ + tmp_w = NULL; /* don't free if unpack error on next adapter */ } #if NRT_DEBUG info("_unpack_nodeinfo"); -- GitLab From bbb4e741cd7e7992d52154a4e8a11fbc25091536 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 25 Jun 2012 10:28:49 -0700 Subject: [PATCH 473/614] Fix bug when querying accounting looking for a job node size. --- NEWS | 1 + .../accounting_storage/mysql/as_mysql_jobacct_process.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index dbd4d40e72..4d017a2496 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,7 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - fix race condition where if a nodeboard/card goes down at the same time a block is destroyed and that block just happens to be the smallest overlapping block over the bad hardware. + -- Fix bug when querying accounting looking for a job node size. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c index 21efe7e78c..b2472dff58 100644 --- a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c +++ b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c @@ -1220,11 +1220,11 @@ extern int setup_job_cond_limits(mysql_conn_t *mysql_conn, if (job_cond->nodes_max) { xstrfmtcat(*extra, - "(t1.alloc_nodes between %u and %u))", + "(t1.nodes_alloc between %u and %u))", job_cond->nodes_min, job_cond->nodes_max); } else { - xstrfmtcat(*extra, "(t1.alloc_nodes='%u'))", + xstrfmtcat(*extra, "(t1.nodes_alloc='%u'))", job_cond->nodes_min); } -- GitLab From 9955b7df245f1160f204cf707c6deaa8c9f58e22 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 25 Jun 2012 10:35:10 -0700 Subject: [PATCH 474/614] same as last patch for alloc_cpus -> cpus_alloc --- .../accounting_storage/mysql/as_mysql_jobacct_process.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c index b2472dff58..752ed5f671 100644 --- a/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c +++ b/src/plugins/accounting_storage/mysql/as_mysql_jobacct_process.c @@ -1202,11 +1202,11 @@ extern int setup_job_cond_limits(mysql_conn_t *mysql_conn, xstrcat(*extra, " where ("); if (job_cond->cpus_max) { - xstrfmtcat(*extra, "(t1.alloc_cpus between %u and %u))", + xstrfmtcat(*extra, "(t1.cpus_alloc between %u and %u))", job_cond->cpus_min, job_cond->cpus_max); } else { - xstrfmtcat(*extra, "(t1.alloc_cpus='%u'))", + xstrfmtcat(*extra, "(t1.cpus_alloc='%u'))", job_cond->cpus_min); } -- GitLab From e2e2780123554f9f5bfea2e9a9c8dfff852330bf Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 10:46:02 -0700 Subject: [PATCH 475/614] switch/nrt: add node_number to node state and add version string to state save file --- src/plugins/switch/nrt/nrt.c | 93 ++++++++++++++++++++++-------------- 1 file changed, 56 insertions(+), 37 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e76e73df09..ca40d5c39b 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -78,6 +78,9 @@ #define NRT_MAX_ADAPTERS (NRT_MAX_ADAPTERS_PER_TYPE * NRT_MAX_ADAPTER_TYPES) #define NRT_MAX_PROTO_CNT 20 +/* Change NRT_STATE_VERSION value when changing the state save format */ +#define NRT_STATE_VERSION "VER001" + pthread_mutex_t global_lock = PTHREAD_MUTEX_INITIALIZER; extern bool nrt_need_state_save; slurm_nrt_libstate_t * nrt_state = NULL; @@ -107,6 +110,7 @@ typedef struct slurm_nrt_window { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; + uint64_t rcontext_block_count; /* # of RDMA context blocks */ in_addr_t ipv4_addr; struct in6_addr ipv6_addr; nrt_logical_id_t lid; @@ -117,13 +121,14 @@ typedef struct slurm_nrt_adapter { slurm_nrt_window_t *window_list; } slurm_nrt_adapter_t; -struct slurm_nrt_nodeinfo { +typedef struct slurm_nrt_nodeinfo { uint32_t magic; char name[NRT_HOSTLEN]; uint32_t adapter_count; struct slurm_nrt_adapter *adapter_list; struct slurm_nrt_nodeinfo *next; -}; + nrt_node_number_t node_number; +} slurm_nrt_nodeinfo_t; struct slurm_nrt_libstate { uint32_t magic; @@ -831,15 +836,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, /* From Bill LePera, IBM, 4/18/2012: * The node_number field is normally set to the 32-bit IPv4 address * of the local node's host name. */ - node_number = node_id; /* Default value is sequence number */ - for (i = 0; i < node->adapter_count; i++) { - adapter = &node->adapter_list[i]; - if (adapter->adapter_type == NRT_IPONLY) { - memcpy(&node_number, &adapter->ipv4_addr, - sizeof(node_number)); - break; - } - } + node_number = node->node_number; /* Reserve a window on each adapter for this task */ table_inx = -1; @@ -998,15 +995,7 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, /* From Bill LePera, IBM, 4/18/2012: * The node_number field is normally set to the 32-bit IPv4 address * of the local node's host name. */ - node_number = node_id; /* Default value is sequence number */ - for (i = 0; i < node->adapter_count; i++) { - adapter = &node->adapter_list[i]; - if (adapter->adapter_type == NRT_IPONLY) { - memcpy(&node_number, &adapter->ipv4_addr, - sizeof(node_number)); - break; - } - } + node_number = node->node_number; /* find the adapter */ for (i = 0; i < node->adapter_count; i++) { @@ -1213,7 +1202,6 @@ _print_adapter_info(nrt_adapter_info_t *adapter_info) inet_ntop(AF_INET, &adapter_info->node_number, addr_v4_str, sizeof(addr_v4_str)); info(" node_number: %s", addr_v4_str); -/* FIXME: Need to forward node_number to slurmctld */ info(" num_ports: %hu", adapter_info->num_ports); info(" rcontext_block_count: %"PRIu64"", adapter_info->rcontext_block_count); @@ -1240,7 +1228,7 @@ _print_adapter_info(nrt_adapter_info_t *adapter_info) #if 0 /* This always seems to count up from 0 to window_count-1 */ for (i = 0; i < adapter_info->window_count; i++) - debug(" window_id: %u", adapter_info->window_list[i]); + info(" window_id: %u", adapter_info->window_list[i]); #endif info("--End Adapter Info--"); } @@ -1310,6 +1298,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info("--Begin Node Info--"); info(" node: %s", n->name); + inet_ntop(AF_INET, &n->node_number, addr_str,sizeof(addr_str)); + info(" node_number: %s", addr_str); info(" adapter_count: %u", n->adapter_count); for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; @@ -1322,6 +1312,7 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" ipv6_addr: %s", addr_str); info(" lid: %u", a->lid); info(" network_id: %lu", a->network_id); + info(" port_id: %hu", a->port_id); info(" special: %lu", a->special); info(" window_count: %hu", a->window_count); @@ -1794,6 +1785,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) adapter_type)); _print_adapter_info(&adapter_info); #endif + if (adapter_info.node_number != 0) + n->node_number = adapter_info.node_number; for (k = 0; k < adapter_info.num_ports; k++) { if (adapter_info.port[k].status != 1) continue; @@ -1875,6 +1868,7 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) offset = get_buf_offset(buf); pack32(n->magic, buf); packmem(n->name, NRT_HOSTLEN, buf); + pack32(n->node_number, buf); pack32(n->adapter_count, buf); for (i = 0; i < n->adapter_count; i++) { a = n->adapter_list + i; @@ -1917,6 +1911,7 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) _print_nodeinfo(src); #endif strncpy(dest->name, src->name, NRT_HOSTLEN); + dest->node_number = src->node_number; dest->adapter_count = src->adapter_count; for (i = 0; i < dest->adapter_count; i++) { sa = src->adapter_list + i; @@ -2005,6 +2000,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) int i, j, rc = SLURM_SUCCESS; struct slurm_nrt_adapter *tmp_a = NULL; slurm_nrt_window_t *tmp_w = NULL; + nrt_node_number_t node_number; uint32_t size; slurm_nrt_nodeinfo_t *tmp_n = NULL; char *name_ptr, name[NRT_HOSTLEN]; @@ -2025,6 +2021,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) if (size != NRT_HOSTLEN) goto unpack_error; memcpy(name, name_ptr, size); + safe_unpack32(&node_number, buf); /* When the slurmctld is in normal operating mode (NOT backup mode), * the global nrt_state structure should NEVER be NULL at the time that @@ -2052,6 +2049,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) if (name != NULL) { tmp_n = _find_node(nrt_state, name); if (tmp_n != NULL) { + tmp_n->node_number = node_number; if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { slurm_seterrno_ret(EUNPACK); } else { @@ -2067,6 +2065,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) if (tmp_n == NULL) return SLURM_ERROR; tmp_n->magic = magic; + tmp_n->node_number = node_number; safe_unpack32(&tmp_n->adapter_count, buf); for (i = 0; i < tmp_n->adapter_count; i++) { tmp_a = tmp_n->adapter_list + i; @@ -3321,6 +3320,7 @@ _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) _print_libstate(lp); #endif offset = get_buf_offset(buffer); + packstr(NRT_STATE_VERSION, buffer); pack32(lp->magic, buffer); pack32(lp->node_count, buffer); for (i = 0; i < lp->node_count; i++) @@ -3353,11 +3353,29 @@ nrt_libstate_save(Buf buffer, bool free_flag) static int _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) { + char *ver_str = NULL; + uint32_t ver_str_len; + uint16_t protocol_version = (uint16_t) NO_VAL; uint32_t node_count; int i; - assert(lp->magic == NRT_LIBSTATE_MAGIC); + /* Validate state version */ + safe_unpackstr_xmalloc(&ver_str, &ver_str_len, buffer); + debug3("Version string in job_state header is %s", ver_str); + if (ver_str) { + if (!strcmp(ver_str, NRT_STATE_VERSION)) + protocol_version = SLURM_PROTOCOL_VERSION; + } + if (protocol_version == (uint16_t) NO_VAL) { + error("******************************************************"); + error("Can not recover switch/nrt state, incompatible version"); + error("******************************************************"); + xfree(ver_str); + return EFAULT; + } + xfree(ver_str); + assert(lp->magic == NRT_LIBSTATE_MAGIC); safe_unpack32(&lp->magic, buffer); safe_unpack32(&node_count, buffer); for (i = 0; i < node_count; i++) { @@ -3386,6 +3404,8 @@ unpack_error: extern int nrt_libstate_restore(Buf buffer) { + int rc; + _lock(); assert(!nrt_state); @@ -3395,10 +3415,10 @@ nrt_libstate_restore(Buf buffer) _unlock(); return SLURM_FAILURE; } - _unpack_libstate(nrt_state, buffer); + rc = _unpack_libstate(nrt_state, buffer); _unlock(); - return SLURM_SUCCESS; + return rc; } extern int @@ -3537,6 +3557,16 @@ nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } + if (window_count > max_windows) { +/* FIXME: Seeing max_windows==0 and window_count>0 for ethernet adapter */ + error("nrt_command(status_adapter, %s, %s): " + "window_count > max_windows (%u > %hu)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count, max_windows); + window_count = max_windows; + } #if NRT_DEBUG info("nrt_command(status_adapter, %s, %s) " "window_count: %hu", @@ -3554,18 +3584,7 @@ nrt_clear_node_state(void) (*status_array)[k].client_pid, _win_state_str(state)); } -#endif - if (window_count > max_windows) { -/* FIXME: Seeing max_windows==0 and window_count>0 for ethernet adapter */ - error("nrt_command(status_adapter, %s, %s): " - "window_count > max_windows (%u > %hu)", - adapter_status.adapter_name, - _adapter_type_str(adapter_status. - adapter_type), - window_count, max_windows); - window_count = max_windows; - } -#if NRT_DEBUG + hs = hostset_create(""); if (hs == NULL) fatal("hostset_create malloc failure"); -- GitLab From a639869ee8d3601110b608332ba0ff29bfe00b78 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 11:54:24 -0700 Subject: [PATCH 476/614] switch/nrt: add rcontext_block_count to adapter status table --- src/plugins/switch/nrt/nrt.c | 45 +++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 18 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ca40d5c39b..1834f00c7c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -110,12 +110,12 @@ typedef struct slurm_nrt_window { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; - uint64_t rcontext_block_count; /* # of RDMA context blocks */ in_addr_t ipv4_addr; struct in6_addr ipv6_addr; nrt_logical_id_t lid; nrt_network_id_t network_id; nrt_port_id_t port_id; + uint64_t rcontext_block_count; /* # of RDMA context blocks */ uint64_t special; nrt_window_id_t window_count; slurm_nrt_window_t *window_list; @@ -125,7 +125,7 @@ typedef struct slurm_nrt_nodeinfo { uint32_t magic; char name[NRT_HOSTLEN]; uint32_t adapter_count; - struct slurm_nrt_adapter *adapter_list; + slurm_nrt_adapter_t *adapter_list; struct slurm_nrt_nodeinfo *next; nrt_node_number_t node_number; } slurm_nrt_nodeinfo_t; @@ -742,7 +742,7 @@ _alloc_node(slurm_nrt_libstate_t *lp, char *name) n = lp->node_list + (lp->node_count++); n->magic = NRT_NODEINFO_MAGIC; n->name[0] = '\0'; - n->adapter_list = (struct slurm_nrt_adapter *) + n->adapter_list = (slurm_nrt_adapter_t *) xmalloc(NRT_MAXADAPTERS * sizeof(struct slurm_nrt_adapter)); @@ -1205,7 +1205,6 @@ _print_adapter_info(nrt_adapter_info_t *adapter_info) info(" num_ports: %hu", adapter_info->num_ports); info(" rcontext_block_count: %"PRIu64"", adapter_info->rcontext_block_count); -/* FIXME: Need to forward rcontext_block_count to slurmctld */ info(" window_count: %hu", adapter_info->window_count); for (i = 0; i < adapter_info->num_ports; i++) { inet_ntop(AF_INET, @@ -1287,7 +1286,7 @@ static void _print_nodeinfo(slurm_nrt_nodeinfo_t *n) { int i, j; - struct slurm_nrt_adapter *a; + slurm_nrt_adapter_t *a; slurm_nrt_window_t *w; char addr_str[128]; char window_str[128]; @@ -1314,6 +1313,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" network_id: %lu", a->network_id); info(" port_id: %hu", a->port_id); + info(" rcontext_block_count: %"PRIu64"", + a->rcontext_block_count); info(" special: %lu", a->special); info(" window_count: %hu", a->window_count); hs = hostset_create(""); @@ -1615,8 +1616,8 @@ nrt_alloc_nodeinfo(slurm_nrt_nodeinfo_t **n) assert(n); new = (slurm_nrt_nodeinfo_t *) xmalloc(sizeof(slurm_nrt_nodeinfo_t)); - new->adapter_list = (struct slurm_nrt_adapter *) - xmalloc(sizeof(struct slurm_nrt_adapter) * + new->adapter_list = (slurm_nrt_adapter_t *) + xmalloc(sizeof(slurm_nrt_adapter_t) * NRT_MAX_ADAPTER_TYPES * NRT_MAX_ADAPTERS_PER_TYPE); new->magic = NRT_NODEINFO_MAGIC; new->adapter_count = 0; @@ -1787,6 +1788,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) #endif if (adapter_info.node_number != 0) n->node_number = adapter_info.node_number; + adapter_ptr->rcontext_block_count = + adapter_info.rcontext_block_count; +/* FIXME: set rcontext_block_count here for test purposes, value is 0 on SMD cluster */ +adapter_ptr->rcontext_block_count = 10000; for (k = 0; k < adapter_info.num_ports; k++) { if (adapter_info.port[k].status != 1) continue; @@ -1854,7 +1859,7 @@ nrt_build_nodeinfo(slurm_nrt_nodeinfo_t *n, char *name) extern int nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) { - struct slurm_nrt_adapter *a; + slurm_nrt_adapter_t *a; uint16_t dummy16; int i, j, offset; @@ -1881,6 +1886,7 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) pack32(a->lid, buf); pack64(a->network_id, buf); pack8(a->port_id, buf); + pack64(a->rcontext_block_count, buf); pack64(a->special, buf); pack16(a->window_count, buf); for (j = 0; j < a->window_count; j++) { @@ -1899,8 +1905,8 @@ static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) { int i, j; - struct slurm_nrt_adapter *sa = NULL; - struct slurm_nrt_adapter *da = NULL; + slurm_nrt_adapter_t *sa = NULL; + slurm_nrt_adapter_t *da = NULL; assert(dest); assert(src); @@ -1924,6 +1930,7 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) da->lid = sa->lid; da->network_id = sa->network_id; da->port_id = sa->port_id; + da->rcontext_block_count = sa->rcontext_block_count; da->special = sa->special; da->window_count = sa->window_count; da->window_list = (slurm_nrt_window_t *) @@ -1964,13 +1971,14 @@ _fake_unpack_adapters(Buf buf) if (dummy32 != NRT_MAX_ADAPTER_NAME_LEN) goto unpack_error; safe_unpack16(&dummy16, buf); - safe_unpack32(&dummy32, buf); + safe_unpack32(&dummy32, buf); /* ipv4_addr */ for (j = 0; j < 4; j++) - safe_unpack32(&dummy32, buf); - safe_unpack32(&dummy32, buf); - safe_unpack64(&dummy64, buf); - safe_unpack8 (&dummy8, buf); - safe_unpack64(&dummy64, buf); + safe_unpack32(&dummy32, buf); /* ipv6_addr */ + safe_unpack32(&dummy32, buf); /* lid */ + safe_unpack64(&dummy64, buf); /* network_id */ + safe_unpack8 (&dummy8, buf); /* port_id */ + safe_unpack64(&dummy64, buf); /* rcontext_block_count */ + safe_unpack64(&dummy64, buf); /* special */ safe_unpack16(&window_count, buf); for (j = 0; j < window_count; j++) { safe_unpack16(&dummy16, buf); @@ -1998,7 +2006,7 @@ static int _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) { int i, j, rc = SLURM_SUCCESS; - struct slurm_nrt_adapter *tmp_a = NULL; + slurm_nrt_adapter_t *tmp_a = NULL; slurm_nrt_window_t *tmp_w = NULL; nrt_node_number_t node_number; uint32_t size; @@ -2083,6 +2091,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack32(&tmp_a->lid, buf); safe_unpack64(&tmp_a->network_id, buf); safe_unpack8(&tmp_a->port_id, buf); + safe_unpack64(&tmp_a->rcontext_block_count, buf); safe_unpack64(&tmp_a->special, buf); safe_unpack16(&tmp_a->window_count, buf); tmp_w = (slurm_nrt_window_t *) @@ -2135,7 +2144,7 @@ nrt_unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) extern void nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *n, bool ptr_into_array) { - struct slurm_nrt_adapter *adapter; + slurm_nrt_adapter_t *adapter; int i; if (!n) -- GitLab From 66c0a2b3c5d298512e43b596a6f5d12e510214ae Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 25 Jun 2012 12:11:12 -0700 Subject: [PATCH 477/614] BLUEGENE - fix possible race condition if cleaning up a block and the removal of the job on the block failed. --- NEWS | 2 ++ .../select/bluegene/bl_bgq/bridge_linker.cc | 16 +++++++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 4d017a2496..d72661b439 100644 --- a/NEWS +++ b/NEWS @@ -47,6 +47,8 @@ documents those changes that are of interest to users and admins. same time a block is destroyed and that block just happens to be the smallest overlapping block over the bad hardware. -- Fix bug when querying accounting looking for a job node size. + -- BLUEGENE - fix possible race condition if cleaning up a block and the + removal of the job on the block failed. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc index 05e7989c9c..a41261a55c 100644 --- a/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc +++ b/src/plugins/select/bluegene/bl_bgq/bridge_linker.cc @@ -326,6 +326,7 @@ static int _block_wait_for_jobs(char *bg_block_id, struct job_record *job_ptr) static void _remove_jobs_on_block_and_reset(char *block_id, struct job_record *job_ptr) { + char *mp_str = NULL; bg_record_t *bg_record = NULL; int job_remove_failed = 0; slurmctld_lock_t job_read_lock = @@ -352,11 +353,7 @@ static void _remove_jobs_on_block_and_reset(char *block_id, if (bg_record) { if (job_remove_failed) { if (bg_record->mp_str) - slurm_drain_nodes( - bg_record->mp_str, - (char *) - "_term_agent: Couldn't remove job", - slurm_get_slurm_user_id()); + mp_str = xstrdup(bg_record->mp_str); else error("Block %s doesn't have a node list.", block_id); @@ -372,6 +369,15 @@ static void _remove_jobs_on_block_and_reset(char *block_id, slurm_mutex_unlock(&block_state_mutex); if (job_ptr) unlock_slurmctld(job_read_lock); + + /* avoid locking issues just do this afterwards. */ + if (mp_str) { + slurm_drain_nodes(mp_str, + (char *)"_term_agent: Couldn't remove job", + slurm_get_slurm_user_id()); + xfree(mp_str); + } + } extern int bridge_init(char *properties_file) -- GitLab From 013a496be5ade66440567c875fa94d212b7b3879 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 25 Jun 2012 12:47:06 -0700 Subject: [PATCH 478/614] BLUEGENE - remove xassert if num_unused_cpus isn't correct --- src/plugins/select/bluegene/bg_record_functions.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index b6d1e262c6..a5a97ddd23 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1620,10 +1620,13 @@ extern int bg_reset_block(bg_record_t *bg_record, struct job_record *job_ptr) if (!list_count(bg_lists->job_running) && (num_unused_cpus != num_possible_unused_cpus)) { + /* This should never happen, but if it does reset the + num_unused_cpus and go on your way. + */ error("Hey we are here with no jobs and we have only " "%d usuable cpus. We should have %d!", num_unused_cpus, num_possible_unused_cpus); - xassert(0); + //xassert(0); num_unused_cpus = num_possible_unused_cpus; } -- GitLab From 27a1c47a31f288b6cad1118a3f5ede50170409b5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 13:07:18 -0700 Subject: [PATCH 479/614] switch/nrt: add bulk_xfer support logic (can't test with current system) --- src/plugins/switch/nrt/README | 2 + src/plugins/switch/nrt/nrt.c | 76 ++++++++++++----------------------- 2 files changed, 28 insertions(+), 50 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index 11c00bf637..b9d4c4a8e7 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -19,6 +19,8 @@ Sample tests ./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=2" hostname ./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=3,us" hostname +./srun -N2 --network="mlx4_0,bulk_xfer=1000,us" hostname + FAILURES ./srun -N2 --network="sn_all,devtype=hfi" hostname ./srun -N2 --network="sn_single,devtype=hfi" hostname diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 1834f00c7c..21a915ec86 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -189,8 +189,6 @@ static int _allocate_window_single(char *adapter_name, nrt_protocol_table_t *protocol_table, int instances); static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); -static int _check_rdma_job_count(char *adapter_name, - nrt_adapter_t adapter_type); static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); static int _fake_unpack_adapters(Buf buf); @@ -854,6 +852,18 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (user_space && (adapter->adapter_type == NRT_IPONLY)) continue; + if (jp->bulk_xfer) { + if (adapter->rcontext_block_count < + jp->bulk_xfer_resources) { + info("Insufficient bulk_xfer resources" + " on adapter %s " + "(%"PRIu64" < %u)", + adapter->adapter_name, + adapter->rcontext_block_count, + jp->bulk_xfer_resources); + return SLURM_ERROR; + } + } for (j = 0; j < instances; j++) { table_id++; table_inx++; @@ -1018,11 +1028,20 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } } if (adapter == NULL) { - error("Failed to find adapter %s of type %s on node %s", - adapter_name, _adapter_type_str(adapter_type), - hostname); + info("Failed to find adapter %s of type %s on node %s", + adapter_name, _adapter_type_str(adapter_type), hostname); return SLURM_ERROR; } + if (jp->bulk_xfer) { + if (adapter->rcontext_block_count < jp->bulk_xfer_resources) { + info("Insufficient bulk_xfer resources on adapter %s " + "(%"PRIu64" < %u)", + adapter->adapter_name, + adapter->rcontext_block_count, + jp->bulk_xfer_resources); + return SLURM_ERROR; + } + } table_inx = -1; for (context_id = 0; context_id < protocol_table->protocol_table_cnt; @@ -1041,6 +1060,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; +/* FIXME: How do these get made available on failure */ +/* FIXME: Track actual use of bulk_xfer resources too */ } if (!user_space) { @@ -3006,44 +3027,6 @@ _wait_for_all_windows(nrt_tableinfo_t *tableinfo) return rc; } -static int -_check_rdma_job_count(char *adapter_name, nrt_adapter_t adapter_type) -{ - uint16_t job_count = 0; - nrt_job_key_t *job_keys = NULL; - int err; -#if NRT_DEBUG - int i; -#endif - -#if 1 - err = NRT_SUCCESS; -#else -/* FIXME: Address this later, RDMA jobs are those using bulk transters */ - err = nrt_rdma_jobs(NRT_VERSION, adapter_name, adapter_type, - &job_count, &job_keys); -#endif - if (err != NRT_SUCCESS) { - error("nrt_rdma_jobs(): %s", nrt_err_str(err)); - return SLURM_ERROR; - } -#if NRT_DEBUG - info("_check_rdma_job_count: nrt_rdma_jobs:"); - info("adapter_name:%s adapter_type:%s", adapter_name, - _adapter_type_str(adapter_type)); - for (i = 0; i < job_count; i++) - info(" job_keys[%d]:%u", i, job_keys[i]); -#endif - if (job_keys) - free(job_keys); - if (job_count >= 4) { - error("RDMA job_count is too high: %hu", job_count); - return SLURM_ERROR; - } - - return SLURM_SUCCESS; -} - /* Load a network table on node. If table contains more than one window * for a given adapter, load the table only once for that adapter. * @@ -3110,13 +3093,6 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) if (adapter_name == NULL) continue; - if (jp->bulk_xfer && (i == 0)) { - rc = _check_rdma_job_count(adapter_name, - jp->tableinfo[i]. - adapter_type); - if (rc != SLURM_SUCCESS) - return rc; - } bzero(&table_info, sizeof(nrt_table_info_t)); table_info.num_tasks = jp->tableinfo[i].table_length; -- GitLab From 5a374f8e123c45c16181c4d73dd8b495a9a82cd1 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 13:37:09 -0700 Subject: [PATCH 480/614] switch/nrt: logging improvements --- src/plugins/switch/nrt/README | 1 - src/plugins/switch/nrt/nrt.c | 15 ++++++++------- src/plugins/switch/nrt/switch_nrt.c | 5 +++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/plugins/switch/nrt/README b/src/plugins/switch/nrt/README index b9d4c4a8e7..a1c44db46c 100644 --- a/src/plugins/switch/nrt/README +++ b/src/plugins/switch/nrt/README @@ -18,7 +18,6 @@ Sample tests ./srun -N2 --network="sn_all,mpi,lapi" hostname ./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=2" hostname ./srun -N2 -n4 --network="sn_all,mpi,lapi,instances=3,us" hostname - ./srun -N2 --network="mlx4_0,bulk_xfer=1000,us" hostname FAILURES diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 21a915ec86..fedc63e84d 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1744,12 +1744,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) rc = SLURM_ERROR; continue; } -#if NRT_DEBUG - info("nrt_command(status_adapter, %s, %s)", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type)); - _print_adapter_status(&adapter_status); -#endif if (window_count > max_windows) { error("nrt_command(status_adapter, %s, %s): " "window_count > max_windows (%u > %hu)", @@ -1757,8 +1751,15 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) _adapter_type_str(adapter_status. adapter_type), window_count, max_windows); + /* Reset value to avoid logging bad data */ window_count = max_windows; } +#if NRT_DEBUG + info("nrt_command(status_adapter, %s, %s)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status.adapter_type)); + _print_adapter_status(&adapter_status); +#endif adapter_ptr = &n->adapter_list[n->adapter_count]; strncpy(adapter_ptr->adapter_name, adapter_status.adapter_name, @@ -3543,13 +3544,13 @@ nrt_clear_node_state(void) continue; } if (window_count > max_windows) { -/* FIXME: Seeing max_windows==0 and window_count>0 for ethernet adapter */ error("nrt_command(status_adapter, %s, %s): " "window_count > max_windows (%u > %hu)", adapter_status.adapter_name, _adapter_type_str(adapter_status. adapter_type), window_count, max_windows); + /* Reset value to avoid logging bad data */ window_count = max_windows; } #if NRT_DEBUG diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 8c7a8e5d8a..a927e74929 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -510,6 +510,11 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, if (protocol == NULL) xstrcat(protocol, "mpi"); + if (!user_space) { + /* Bulk transfer only supported with user space */ + bulk_xfer = false; + bulk_xfer_resources = 0; + } if (err == SLURM_SUCCESS) { err = nrt_build_jobinfo((slurm_nrt_jobinfo_t *)switch_job, -- GitLab From 337db3f103245ad9e2de1aa92ae21b8fb4d1476e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 25 Jun 2012 14:41:59 -0700 Subject: [PATCH 481/614] BLUEGENE - fix issue if a cable was in an error state make it so we can check if a block is still makable if the cable wasn't in error. --- NEWS | 2 ++ .../select/bluegene/ba_bgq/block_allocator.c | 33 ++++++++++--------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index d72661b439..61d4a6cde0 100644 --- a/NEWS +++ b/NEWS @@ -49,6 +49,8 @@ documents those changes that are of interest to users and admins. -- Fix bug when querying accounting looking for a job node size. -- BLUEGENE - fix possible race condition if cleaning up a block and the removal of the job on the block failed. + -- BLUEGENE - fix issue if a cable was in an error state make it so we can + check if a block is still makable if the cable wasn't in error. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 1f0d67d8cc..61a6a74b65 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -661,22 +661,25 @@ extern int check_and_set_mp_list(List mps) curr_ba_switch->usage)); rc = SLURM_ERROR; goto end_it; - } else if ((curr_ba_switch->usage - & BG_SWITCH_CABLE_ERROR_SET) - && (ba_switch->usage & BG_SWITCH_OUT_PASS)) { - if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) - info("check_and_set_mp_list: " - "%s(%d)'s cable is not available " - "can't make this block. " - "We need %s and system is %s", - ba_mp->coord_str, i, - ba_switch_usage_str( - ba_switch->usage), - ba_switch_usage_str( - curr_ba_switch->usage)); - rc = SLURM_ERROR; - goto end_it; } + /* Since we are only checking to see if this + block is creatable we don't need to check + hardware issues like bad cables. + */ + /* else if ((curr_ba_switch->usage */ + /* & BG_SWITCH_CABLE_ERROR_SET) */ + /* && (ba_switch->usage & BG_SWITCH_OUT_PASS)) { */ + /* if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) */ + /* info("check_and_set_mp_list: " */ + /* "%s(%d)'s cable is not available " */ + /* "can't really make this block. " */ + /* "We need %s and system is %s", */ + /* ba_mp->coord_str, i, */ + /* ba_switch_usage_str( */ + /* ba_switch->usage), */ + /* ba_switch_usage_str( */ + /* curr_ba_switch->usage)); */ + /* } */ if (ba_debug_flags & DEBUG_FLAG_BG_ALGO_DEEP) info("check_and_set_mp_list: " -- GitLab From cd91c2baabdd13a8dab90deaccb81d6042887b0e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 15:20:41 -0700 Subject: [PATCH 482/614] switch/nrt: add tracking of RDMA resources already allocated to jobs --- src/plugins/switch/nrt/nrt.c | 135 ++++++++++++++++++++++++++--------- 1 file changed, 101 insertions(+), 34 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index fedc63e84d..e781c3cc73 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -99,7 +99,7 @@ mode_t nrt_umask; * - It must be unique for every job step. * - It is a 32-bit quantity. * - We might use the bottom 16-bits of job ID an step ID, but that could - * result in conflicts for long-lived job steps. + * result in conflicts for long-lived jobs or job steps. */ typedef struct slurm_nrt_window { nrt_window_id_t window_id; @@ -107,6 +107,11 @@ typedef struct slurm_nrt_window { nrt_job_key_t job_key; } slurm_nrt_window_t; +typedef struct slurm_nrt_block { + uint32_t rcontext_block_use; /* RDMA context blocks used */ + nrt_job_key_t job_key; +} slurm_nrt_block_t; + typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; @@ -116,6 +121,9 @@ typedef struct slurm_nrt_adapter { nrt_network_id_t network_id; nrt_port_id_t port_id; uint64_t rcontext_block_count; /* # of RDMA context blocks */ + uint64_t rcontext_block_used; /* # of RDMA context blocks used */ + uint16_t block_count; + slurm_nrt_block_t *block_list; uint64_t special; nrt_window_id_t window_count; slurm_nrt_window_t *window_list; @@ -178,6 +186,8 @@ static nrt_cache_entry_t lid_cache[NRT_MAX_ADAPTERS]; /* Local functions */ static char * _adapter_type_str(nrt_adapter_t type); +static int _add_block_use(slurm_nrt_jobinfo_t *jp, + slurm_nrt_adapter_t *adapter); static int _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, uint32_t node_id, nrt_task_id_t task_id, nrt_adapter_t adapter_type, int network_id, @@ -199,6 +209,8 @@ static slurm_nrt_window_t * _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id); static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); +static void _free_block_use(slurm_nrt_jobinfo_t *jp, + slurm_nrt_adapter_t *adapter); static void _free_libstate(slurm_nrt_libstate_t *lp); static int _get_adapters(slurm_nrt_nodeinfo_t *n); static void _hash_add_nodeinfo(slurm_nrt_libstate_t *state, @@ -446,34 +458,35 @@ _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id) } /* - * For one node, free all of the windows belonging to a particular - * job step (as identified by the job_key). + * For one node, free all of the RDMA blocks and windows belonging to a + * particular job step (as identified by the job_key). */ static void -_free_windows_by_job_key(uint16_t job_key, char *node_name) +_free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) { slurm_nrt_nodeinfo_t *node; slurm_nrt_adapter_t *adapter; slurm_nrt_window_t *window; int i, j; - /* debug3("_free_windows_by_job_key(%u, %s)", job_key, node_name); */ + /* debug3("_free_resources_by_job_key(%u, %s)", jp->job_key, node_name); */ if ((node = _find_node(nrt_state, node_name)) == NULL) return; if (node->adapter_list == NULL) { - error("_free_windows_by_job_key, " + error("_free_resources_by_job, " "adapter_list NULL for node %s", node_name); return; } for (i = 0; i < node->adapter_count; i++) { adapter = &node->adapter_list[i]; if (adapter->window_list == NULL) { - error("_free_windows_by_job_key, " + error("_free_resources_by_job, " "window_list NULL for node %s adapter %s", node->name, adapter->adapter_name); continue; } + _free_block_use(jp, adapter); /* We could check here to see if this adapter's name * is in the nrt_jobinfo tablinfo list to avoid the next * loop if the adapter isn't in use by the job step. @@ -484,7 +497,7 @@ _free_windows_by_job_key(uint16_t job_key, char *node_name) for (j = 0; j < adapter->window_count; j++) { window = &adapter->window_list[j]; - if (window->job_key == job_key) { + if (window->job_key == jp->job_key) { /* debug3("Freeing adapter %s window %d", adapter->name, window->id); */ window->state = NRT_WIN_UNAVAILABLE; @@ -796,6 +809,80 @@ static void _table_alloc(nrt_tableinfo_t *tableinfo, int table_inx, return; } +/* Track RDMA blocks allocated to a job on each adapter */ +static int +_add_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) +{ + int i; + uint64_t blocks_free; + slurm_nrt_block_t *block_ptr, *free_block; + + if (jp->bulk_xfer && jp->bulk_xfer_resources) { + blocks_free = adapter->rcontext_block_count - + adapter->rcontext_block_used; + if (blocks_free < jp->bulk_xfer_resources) { + info("Insufficient bulk_xfer resources on adapter %s " + "(%"PRIu64" < %u)", + adapter->adapter_name, blocks_free, + jp->bulk_xfer_resources); + return SLURM_ERROR; + } + + free_block = NULL; + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key == jp->job_key) { + free_block = block_ptr; + break; + } else if ((block_ptr->job_key == 0) && + (free_block == 0)) { + free_block = block_ptr; + } + } + if (free_block == NULL) { + xrealloc(adapter->block_list, + sizeof(slurm_nrt_block_t) * + (adapter->block_count + 8)); + free_block = adapter->block_list + adapter->block_count; + adapter->block_count += 8; + } + free_block->job_key = jp->job_key; + free_block->rcontext_block_use = jp->bulk_xfer_resources; + adapter->rcontext_block_used += jp->bulk_xfer_resources; +#if 0 + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key) { + info("adapter:%s block:%d job_key:%u blocks:%u", + adapter->adapter_name, i, + block_ptr->job_key, + free_block->rcontext_block_use); + } + } +#endif + } + return SLURM_SUCCESS; +} +static void +_free_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) +{ + int i; + slurm_nrt_block_t *block_ptr; + + if ((jp->bulk_xfer == 0) || (jp->bulk_xfer_resources == 0)) + return; + + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key != jp->job_key) + continue; + adapter->rcontext_block_used -= block_ptr->rcontext_block_use; + block_ptr->job_key = 0; + block_ptr->rcontext_block_use = 0; + break; + } +} + /* For a given process, fill out an nrt_creator_per_task_input_t * struct (an array of these makes up the network table loaded * for each job). Assign adapters, lids and switch windows to @@ -852,18 +939,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (user_space && (adapter->adapter_type == NRT_IPONLY)) continue; - if (jp->bulk_xfer) { - if (adapter->rcontext_block_count < - jp->bulk_xfer_resources) { - info("Insufficient bulk_xfer resources" - " on adapter %s " - "(%"PRIu64" < %u)", - adapter->adapter_name, - adapter->rcontext_block_count, - jp->bulk_xfer_resources); - return SLURM_ERROR; - } - } + if (_add_block_use(jp, adapter)) + return SLURM_ERROR; for (j = 0; j < instances; j++) { table_id++; table_inx++; @@ -1032,16 +1109,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, adapter_name, _adapter_type_str(adapter_type), hostname); return SLURM_ERROR; } - if (jp->bulk_xfer) { - if (adapter->rcontext_block_count < jp->bulk_xfer_resources) { - info("Insufficient bulk_xfer resources on adapter %s " - "(%"PRIu64" < %u)", - adapter->adapter_name, - adapter->rcontext_block_count, - jp->bulk_xfer_resources); - return SLURM_ERROR; - } - } + if (_add_block_use(jp, adapter)) + return SLURM_ERROR; table_inx = -1; for (context_id = 0; context_id < protocol_table->protocol_table_cnt; @@ -1060,8 +1129,6 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } window->state = NRT_WIN_UNAVAILABLE; window->job_key = job_key; -/* FIXME: How do these get made available on failure */ -/* FIXME: Track actual use of bulk_xfer resources too */ } if (!user_space) { @@ -2213,7 +2280,7 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) /* The hl hostlist may contain duplicate node_names (poe -hostfile * triggers duplicates in the hostlist). Since there - * is no reason to call _free_windows_by_job_key more than once + * is no reason to call _free_resources_by_job more than once * per node_name, we create a new unique hostlist. */ uniq_hl = hostlist_copy(hl); @@ -2223,7 +2290,7 @@ nrt_job_step_complete(slurm_nrt_jobinfo_t *jp, hostlist_t hl) _lock(); if (nrt_state != NULL) { while ((node_name = hostlist_next(hi)) != NULL) { - _free_windows_by_job_key(jp->job_key, node_name); + _free_resources_by_job(jp, node_name); free(node_name); } } else { /* nrt_state == NULL */ -- GitLab From 07ddca83725322b88a9075c12a1240077fe92383 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 25 Jun 2012 16:56:25 -0700 Subject: [PATCH 483/614] switch/nrt: fix somw state save/restore logic --- src/plugins/switch/nrt/nrt.c | 9 ++------- src/plugins/switch/nrt/slurm_nrt.h | 1 - src/plugins/switch/nrt/switch_nrt.c | 13 ++++++++++--- src/slurmctld/controller.c | 6 +++++- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index e781c3cc73..409d839648 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -500,7 +500,7 @@ _free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) if (window->job_key == jp->job_key) { /* debug3("Freeing adapter %s window %d", adapter->name, window->id); */ - window->state = NRT_WIN_UNAVAILABLE; + window->state = NRT_WIN_AVAILABLE; window->job_key = 0; } } @@ -710,6 +710,7 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) return rc; } + /* If the node is already in the node list then simply return * a pointer to it, otherwise dynamically allocate memory to the * node list if necessary. @@ -1879,8 +1880,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) n->node_number = adapter_info.node_number; adapter_ptr->rcontext_block_count = adapter_info.rcontext_block_count; -/* FIXME: set rcontext_block_count here for test purposes, value is 0 on SMD cluster */ -adapter_ptr->rcontext_block_count = 10000; for (k = 0; k < adapter_info.num_ports; k++) { if (adapter_info.port[k].status != 1) continue; @@ -2854,10 +2853,6 @@ nrt_copy_jobinfo(slurm_nrt_jobinfo_t *job) } memcpy(new, job, sizeof(slurm_nrt_jobinfo_t)); -/* FIXME: table will be empty (and table_size == 0) when the network string - * from poe does not contain "us". - * (See man poe: -euilib or MP_EUILIB) - */ new->tableinfo = (nrt_tableinfo_t *) xmalloc(job->tables_per_task * sizeof(nrt_table_info_t)); for (i = 0; i < job->tables_per_task; i++) { diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index f8b473e6a4..5bf9fd16a8 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -49,7 +49,6 @@ #if HAVE_LIBNRT # include -# define RSCT_DEVTYPE_INFINIBAND 32 #else # error "Must have libnrt to compile this module!" #endif diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index a927e74929..cad1720dd2 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -525,6 +525,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, instances); } + nrt_need_state_save = true; xfree(adapter_name); xfree(protocol); hostlist_destroy(list); @@ -596,19 +597,25 @@ static inline int _make_step_comp(switch_jobinfo_t *jobinfo, char *nodelist) extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) { + int rc; #if NRT_DEBUG info("switch_p_job_step_complete()"); #endif - return _make_step_comp(jobinfo, nodelist); + rc = _make_step_comp(jobinfo, nodelist); + nrt_need_state_save = true; + return rc; } extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, char *nodelist) { + int rc; #if NRT_DEBUG info("switch_p_job_step_part_comp()"); #endif - return _make_step_comp(jobinfo, nodelist); + rc = _make_step_comp(jobinfo, nodelist); + nrt_need_state_save = true; + return rc; } extern bool switch_p_part_comp(void) @@ -778,7 +785,7 @@ static void *_state_save_thread(void *arg) char *dir_name = (char *)arg; while (1) { - sleep(2); + sleep(10); if (nrt_need_state_save) { nrt_need_state_save = false; _switch_p_libstate_save(dir_name, false); diff --git a/src/slurmctld/controller.c b/src/slurmctld/controller.c index 8f31671e16..8bd524bf96 100644 --- a/src/slurmctld/controller.c +++ b/src/slurmctld/controller.c @@ -238,6 +238,7 @@ int main(int argc, char *argv[]) assoc_init_args_t assoc_init_arg; pthread_t assoc_cache_thread; slurm_trigger_callbacks_t callbacks; + char *dir_name; /* * Establish initial configuration @@ -569,6 +570,9 @@ int main(int argc, char *argv[]) _slurmctld_background(NULL); /* termination of controller */ + dir_name = slurm_get_state_save_location(); + switch_save(dir_name); + xfree(dir_name); slurm_priority_fini(); shutdown_state_save(); pthread_join(slurmctld_config.thread_id_sig, NULL); @@ -619,7 +623,7 @@ int main(int argc, char *argv[]) { /* This should purge all allocated memory, *\ \* Anything left over represents a leak. */ - char *dir_name; + /* Give running agents a chance to complete and free memory. * Wait up to 60 seconds (3 seconds * 20) */ -- GitLab From 20325418fbf6ffc3b4f1bb95320e114d3654182a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 07:55:51 -0700 Subject: [PATCH 484/614] switch/nrt: Set DEBUG_FLAG==0, Note areas still requiring work --- src/plugins/switch/nrt/nrt.c | 6 ++++++ src/plugins/switch/nrt/slurm_nrt.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 409d839648..aeac3f5670 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -3606,6 +3606,12 @@ nrt_clear_node_state(void) continue; } if (window_count > max_windows) { +/* FIXME: Investigate this error on eth0? */ +/* FIXME: Check for memory leaks */ +/* FIXME: Investigate slow throughput reported by test9.9 */ +/* FIXME: Replace NRT_DEBUG with DebugFlag */ +/* FIXME: Add tests for new network options */ +/* FIXME: Review and test Torrent logic */ error("nrt_command(status_adapter, %s, %s): " "window_count > max_windows (%u > %hu)", adapter_status.adapter_name, diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 5bf9fd16a8..b817e9a699 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -77,7 +77,7 @@ enum { }; /* FIXME: Need to look at performances. Test9.9 running slow on NRT */ -#define NRT_DEBUG 1 /* Enable extra logging. 0=off, 1=on, 2=verbose */ +#define NRT_DEBUG 0 /* Enable extra logging. 0=off, 1=on, 2=verbose */ #define NRT_DEBUG_CNT 0 /* Count of windows, adapters, etc to log * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 -- GitLab From 37587b6bb00e31aef3e65eebeecb024c8e07a418 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 09:53:45 -0700 Subject: [PATCH 485/614] Put nodes names in alphabetic order in node table. --- NEWS | 1 + src/slurmctld/read_config.c | 51 +++++++++++++++++++++++++++++++++---- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 61d4a6cde0..8570b16cc0 100644 --- a/NEWS +++ b/NEWS @@ -51,6 +51,7 @@ documents those changes that are of interest to users and admins. removal of the job on the block failed. -- BLUEGENE - fix issue if a cable was in an error state make it so we can check if a block is still makable if the cable wasn't in error. + -- Put nodes names in alphabetic order in node table. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 2452667183..5c99d8e41c 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -121,11 +121,50 @@ static void _validate_node_proc_count(void); #endif /* - * _reorder_node_record_table - order node table in ascending order of node_rank + * _reorder_nodes_by_name - order node table in ascending order of name + */ +static void _reorder_nodes_by_name(void) +{ + struct node_record *node_ptr, *node_ptr2; + int i, j, min_inx; + + /* Now we need to sort the node records */ + for (i = 0; i < node_record_count; i++) { + min_inx = i; + for (j = i + 1; j < node_record_count; j++) { + if (strcmp(node_record_table_ptr[j].name, + node_record_table_ptr[min_inx].name) < 0) + min_inx = j; + } + + if (min_inx != i) { /* swap records */ + struct node_record node_record_tmp; + + j = sizeof(struct node_record); + node_ptr = node_record_table_ptr + i; + node_ptr2 = node_record_table_ptr + min_inx; + + memcpy(&node_record_tmp, node_ptr, j); + memcpy(node_ptr, node_ptr2, j); + memcpy(node_ptr2, &node_record_tmp, j); + } + } + +#if _DEBUG + /* Log the results */ + for (i=0, node_ptr = node_record_table_ptr; i < node_record_count; + i++, node_ptr++) { + info("node_rank[%d]: %s", i, node_ptr->name); + } +#endif +} + +/* + * _reorder_nodes_by_rank - order node table in ascending order of node_rank * This depends on the TopologyPlugin and/or SelectPlugin, which may generate * such a ranking. */ -static void _reorder_node_record_table(void) +static void _reorder_nodes_by_rank(void) { struct node_record *node_ptr, *node_ptr2; int i, j, min_inx; @@ -146,7 +185,7 @@ static void _reorder_node_record_table(void) struct node_record node_record_tmp; j = sizeof(struct node_record); - node_ptr = node_record_table_ptr + i; + node_ptr = node_record_table_ptr + i; node_ptr2 = node_record_table_ptr + min_inx; memcpy(&node_record_tmp, node_ptr, j); @@ -159,7 +198,7 @@ static void _reorder_node_record_table(void) /* Log the results */ for (i=0, node_ptr = node_record_table_ptr; i < node_record_count; i++, node_ptr++) { - info("%s: %u", node_ptr->name, node_ptr->node_rank); + info("node_rank[%u]: %s", node_ptr->node_rank, node_ptr->name); } #endif } @@ -771,7 +810,9 @@ int read_slurm_conf(int recover, bool reconfig) do_reorder_nodes |= select_g_node_ranking(node_record_table_ptr, node_record_count); if (do_reorder_nodes) - _reorder_node_record_table(); + _reorder_nodes_by_rank(); + else + _reorder_nodes_by_name(); rehash_node(); rehash_jobs(); -- GitLab From 501688ed3cd4c261833e807445c57a294a196257 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 09:17:09 -0700 Subject: [PATCH 486/614] If preempted job should have a grace time and preempt mode is not cancel but job is going to be canceled because it is interactive or other reason it now receives the grace time. --- NEWS | 3 +++ src/slurmctld/node_scheduler.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/NEWS b/NEWS index 8570b16cc0..aa46cb3444 100644 --- a/NEWS +++ b/NEWS @@ -52,6 +52,9 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - fix issue if a cable was in an error state make it so we can check if a block is still makable if the cable wasn't in error. -- Put nodes names in alphabetic order in node table. + -- If preempted job should have a grace time and preempt mode is not cancel + but job is going to be canceled because it is interactive or other reason + it now receives the grace time. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 16994dcfde..5a49059d15 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -1168,6 +1168,11 @@ static void _preempt_jobs(List preemptee_job_list, int *error_code) } if (rc != SLURM_SUCCESS) { + if ((mode != PREEMPT_MODE_CANCEL) + && (slurm_job_check_grace(job_ptr) + == SLURM_SUCCESS)) + continue; + rc = job_signal(job_ptr->job_id, SIGKILL, 0, 0, true); if (rc == SLURM_SUCCESS) info("preempted job %u had to be killed", -- GitLab From f7a14fa5696d3b397a59f194cad061d7eb607014 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 09:17:57 -0700 Subject: [PATCH 487/614] replace signed with unsigned counter to avoid warning when compiling with c++ --- src/slurmd/slurmstepd/slurmstepd_job.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmd/slurmstepd/slurmstepd_job.h b/src/slurmd/slurmstepd/slurmstepd_job.h index 5dd5a7a127..32690d2188 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.h +++ b/src/slurmd/slurmstepd/slurmstepd_job.h @@ -232,7 +232,7 @@ slurmd_task_info_t * task_info_create(int taskid, int gtaskid, static inline slurmd_task_info_t * job_task_info_by_pid (slurmd_job_t *job, pid_t pid) { - int i; + uint32_t i; for (i = 0; i < job->node_tasks; i++) { if (job->task[i]->pid == pid) return (job->task[i]); -- GitLab From f8ae9a15c0b0f04d88a8cf32ad6119603f597d36 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 10:35:48 -0700 Subject: [PATCH 488/614] BGQ - Modified documents to explain new plugin_flags needed in bg.properties in order for the runjob_mux to run correctly. Signed-off-by: Danny Auble --- NEWS | 2 ++ doc/html/bluegene.shtml | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index aa46cb3444..f620ec39e2 100644 --- a/NEWS +++ b/NEWS @@ -55,6 +55,8 @@ documents those changes that are of interest to users and admins. -- If preempted job should have a grace time and preempt mode is not cancel but job is going to be canceled because it is interactive or other reason it now receives the grace time. + -- BGQ - Modified documents to explain new plugin_flags needed in bg.properties + in order for the runjob_mux to run correctly. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml index eda17f5059..b219eae4b6 100644 --- a/doc/html/bluegene.shtml +++ b/doc/html/bluegene.shtml @@ -267,8 +267,9 @@ SLURM plugin for the IBM runjob_mux. This can be done by altering the bg.properties file. In the [runjob.mux] section of the bg.properties file change the plugin option to $prefix/lib/slurm/runjob_plugin.so and also set the plugin_flags -option to 0x0101 (RTLD_LAZY | RTLD_GLOBAL) which allows the -forwarding of symbols to shared objects like SLURM uses for plugins.

          +option to 0x0109 (RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND) +which allows the forwarding of symbols to shared objects like SLURM +uses for plugins.

           [runjob.mux]
           ...
          @@ -278,7 +279,7 @@ plugin = /usr/lib64/slurm/runjob_plugin.so
               # runjob_mux_refresh_config command on the
               # Login Node where a runjob_mux process runs.
           ...
          -plugin_flags = 0x0101 # RTLD_LAZY | RTLD_GLOBAL
          +plugin_flags = 0x0109 # RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND
           

          You also need to set things up so the runjob_mux is ran by the -- GitLab From d83bf5f806aad6df3ec490461c05044b7080cd5e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 10:37:15 -0700 Subject: [PATCH 489/614] BGQ - change linking from libslurm.o to libslurmhelper.la to avoid warning. --- NEWS | 1 + src/plugins/select/bluegene/Makefile.am | 8 ++++---- src/plugins/select/bluegene/Makefile.in | 26 +++++++++++++------------ 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/NEWS b/NEWS index f620ec39e2..b54f7feb14 100644 --- a/NEWS +++ b/NEWS @@ -57,6 +57,7 @@ documents those changes that are of interest to users and admins. it now receives the grace time. -- BGQ - Modified documents to explain new plugin_flags needed in bg.properties in order for the runjob_mux to run correctly. + -- BGQ - change linking from libslurm.o to libslurmhelper.la to avoid warning. * Changes in SLURM 2.4.0.rc1 ============================= diff --git a/src/plugins/select/bluegene/Makefile.am b/src/plugins/select/bluegene/Makefile.am index 95af1f7dd8..6266282ce8 100644 --- a/src/plugins/select/bluegene/Makefile.am +++ b/src/plugins/select/bluegene/Makefile.am @@ -13,7 +13,8 @@ pkglib_LTLIBRARIES = select_bluegene.la noinst_LTLIBRARIES = libba_common.la libconfigure_api.la -convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) +convenience_libs = $(top_builddir)/src/api/libslurmhelper.la \ + -lpthread $(DL_LIBS) # These are needed for pack/unpack of structures for cross-cluster stuff select_bluegene_la_SOURCES = select_bluegene.c \ @@ -57,9 +58,8 @@ if BGQ_LOADED pkglib_LTLIBRARIES += runjob_plugin.la runjob_plugin_la_SOURCES = runjob_plugin.cc - runjob_plugin_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ - $(convenience_libs) -lpthread - + runjob_plugin_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) + runjob_plugin_la_LIBADD = $(convenience_libs) endif select_bluegene_la_SOURCES += \ diff --git a/src/plugins/select/bluegene/Makefile.in b/src/plugins/select/bluegene/Makefile.in index 06f3b74fe9..2d7aeb0a01 100644 --- a/src/plugins/select/bluegene/Makefile.in +++ b/src/plugins/select/bluegene/Makefile.in @@ -169,7 +169,11 @@ libsched_if64_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(libsched_if64_la_LDFLAGS) $(LDFLAGS) -o $@ @BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_libsched_if64_la_rpath = -rpath \ @BGL_LOADED_TRUE@@BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ $(pkglibdir) -runjob_plugin_la_LIBADD = +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(top_builddir)/src/api/libslurmhelper.la \ + $(am__DEPENDENCIES_1) +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@runjob_plugin_la_DEPENDENCIES = \ +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_2) am__runjob_plugin_la_SOURCES_DIST = runjob_plugin.cc @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_runjob_plugin_la_OBJECTS = \ @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ runjob_plugin.lo @@ -179,11 +183,10 @@ runjob_plugin_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(CXXFLAGS) $(runjob_plugin_la_LDFLAGS) $(LDFLAGS) -o $@ @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@am_runjob_plugin_la_rpath = \ @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ -rpath $(pkglibdir) -am__DEPENDENCIES_1 = -@BLUEGENE_LOADED_TRUE@am__DEPENDENCIES_2 = $(block_allocator_lib) \ +@BLUEGENE_LOADED_TRUE@am__DEPENDENCIES_3 = $(block_allocator_lib) \ @BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_1) select_bluegene_la_DEPENDENCIES = libba_common.la \ - $(am__DEPENDENCIES_2) + $(am__DEPENDENCIES_3) am__select_bluegene_la_SOURCES_DIST = select_bluegene.c bg_job_info.c \ bg_job_info.h bg_node_info.c bg_node_info.h bg_core.c \ bg_core.h bg_defined_block.c bg_defined_block.h \ @@ -208,10 +211,8 @@ am__slurm_epilog_SOURCES_DIST = slurm_epilog.c @BLUEGENE_LOADED_TRUE@am_slurm_epilog_OBJECTS = \ @BLUEGENE_LOADED_TRUE@ slurm_epilog.$(OBJEXT) slurm_epilog_OBJECTS = $(am_slurm_epilog_OBJECTS) -am__DEPENDENCIES_3 = $(top_builddir)/src/api/libslurm.o \ - $(am__DEPENDENCIES_1) @BLUEGENE_LOADED_TRUE@slurm_epilog_DEPENDENCIES = \ -@BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_3) +@BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_2) slurm_epilog_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(slurm_epilog_LDFLAGS) $(LDFLAGS) -o $@ @@ -220,7 +221,7 @@ am__slurm_prolog_SOURCES_DIST = slurm_prolog.c @BLUEGENE_LOADED_TRUE@ slurm_prolog.$(OBJEXT) slurm_prolog_OBJECTS = $(am_slurm_prolog_OBJECTS) @BLUEGENE_LOADED_TRUE@slurm_prolog_DEPENDENCIES = \ -@BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_3) +@BLUEGENE_LOADED_TRUE@ $(am__DEPENDENCIES_2) slurm_prolog_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(slurm_prolog_LDFLAGS) $(LDFLAGS) -o $@ @@ -509,7 +510,9 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common $(BG_INCLUDES) pkglib_LTLIBRARIES = select_bluegene.la $(am__append_2) \ $(am__append_3) $(am__append_5) noinst_LTLIBRARIES = libba_common.la libconfigure_api.la -convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) +convenience_libs = $(top_builddir)/src/api/libslurmhelper.la \ + -lpthread $(DL_LIBS) + # These are needed for pack/unpack of structures for cross-cluster stuff select_bluegene_la_SOURCES = select_bluegene.c bg_job_info.c \ @@ -527,9 +530,8 @@ select_bluegene_la_LIBADD = libba_common.la $(am__append_7) @BG_L_P_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@block_allocator_lib = ba/libblock_allocator.la @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@nodist_EXTRA_select_bluegene_la_SOURCES = dummy.cxx @BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@runjob_plugin_la_SOURCES = runjob_plugin.cc -@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@runjob_plugin_la_LDFLAGS = -export-dynamic $(SO_LDFLAGS) $(PLUGIN_FLAGS) \ -@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@ $(convenience_libs) -lpthread - +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@runjob_plugin_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +@BGQ_LOADED_TRUE@@BLUEGENE_LOADED_TRUE@runjob_plugin_la_LIBADD = $(convenience_libs) @BLUEGENE_LOADED_TRUE@slurm_prolog_LDADD = $(convenience_libs) @BLUEGENE_LOADED_TRUE@slurm_prolog_SOURCES = slurm_prolog.c @BLUEGENE_LOADED_TRUE@slurm_prolog_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -- GitLab From 562fb1579723296eaf5e57f8c4540526f06bd5ad Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 11:40:32 -0700 Subject: [PATCH 490/614] update date --- doc/html/bluegene.shtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml index b219eae4b6..a043317998 100644 --- a/doc/html/bluegene.shtml +++ b/doc/html/bluegene.shtml @@ -866,6 +866,6 @@ scheduling logic, etc.

          -

          Last modified 12 June 2012

          +

          Last modified 26 June 2012

          -- GitLab From caa000debd89221872fe1a6d8cea4f53728c4a51 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 11:59:16 -0700 Subject: [PATCH 491/614] Backport expect test for select/serial --- testsuite/expect/globals | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/testsuite/expect/globals b/testsuite/expect/globals index b0fa6822d9..d9a274b4d8 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1275,6 +1275,36 @@ proc test_cray { } { return $cray } +################################################################ +# +# Proc: test_serial +# +# Purpose: Determine if the system runs only serial jobs +# +# Returns 1 if the system is serial, 0 otherwise +# +################################################################ + +proc test_serial { } { + global scontrol bin_bash bin_grep + + log_user 0 + set serial 0 + spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SelectType" + expect { + "select/serial" { + set serial 1 + exp_continue + } + eof { + wait + } + } + log_user 1 + + return $serial +} + ################################################################ # # Proc: test_emulated -- GitLab From 10d43dfa0f9bd00dddeca851d3c311f774b83a31 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 13:05:09 -0700 Subject: [PATCH 492/614] make sure sview sorts nodes in partition list. --- src/sview/part_info.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/sview/part_info.c b/src/sview/part_info.c index 421eb95f4c..47f591737e 100644 --- a/src/sview/part_info.c +++ b/src/sview/part_info.c @@ -1706,6 +1706,7 @@ static List _create_part_info_list(partition_info_msg_t *part_info_ptr, sview_part_info->sub_part_total.reason = sview_part_sub->reason; } + hostlist_sort(sview_part_sub->hl); } list_iterator_destroy(itr); } -- GitLab From 3e6a353a2657cc98b6016daff8bafa79f5954e31 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 14:26:53 -0700 Subject: [PATCH 493/614] Correction for possible race condition in plugin initialization --- src/common/checkpoint.c | 5 ++++- src/common/mpi.c | 12 +++++++----- src/common/node_select.c | 10 ++++++---- src/common/slurm_accounting_storage.c | 6 +++++- src/common/slurm_auth.c | 5 ++++- src/common/slurm_cred.c | 6 ++++-- src/common/slurm_jobacct_gather.c | 9 ++++++--- src/common/slurm_jobcomp.c | 6 +++++- src/common/slurm_priority.c | 6 +++++- src/common/slurm_topology.c | 6 +++++- src/common/switch.c | 5 ++++- src/slurmctld/job_submit.c | 5 ++++- src/slurmctld/preempt.c | 5 ++++- src/slurmctld/sched_plugin.c | 5 ++++- src/slurmd/common/proctrack.c | 5 ++++- src/slurmd/common/task_plugin.c | 5 ++++- src/srun/libsrun/launch.c | 5 ++++- 17 files changed, 79 insertions(+), 27 deletions(-) diff --git a/src/common/checkpoint.c b/src/common/checkpoint.c index 11ae26a6d8..d9b99877c6 100644 --- a/src/common/checkpoint.c +++ b/src/common/checkpoint.c @@ -102,6 +102,7 @@ static const char *syms[] = { static slurm_checkpoint_ops_t ops; static plugin_context_t *g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; /* initialize checkpoint plugin */ extern int @@ -110,7 +111,7 @@ checkpoint_init(char *type) int retval = SLURM_SUCCESS; char *plugin_type = "checkpoint"; - if (g_context) + if (init_run && g_context) return retval; slurm_mutex_lock(&context_lock); @@ -126,6 +127,7 @@ checkpoint_init(char *type) retval = SLURM_ERROR; goto done; } + init_run = true; verbose("Checkpoint plugin loaded: %s", type); done: @@ -143,6 +145,7 @@ checkpoint_fini(void) return SLURM_SUCCESS; slurm_mutex_lock(&context_lock); + init_run = false; rc = plugin_context_destroy(g_context); slurm_mutex_unlock(&context_lock); return rc; diff --git a/src/common/mpi.c b/src/common/mpi.c index 076c7fd4a3..9dc2cd187b 100644 --- a/src/common/mpi.c +++ b/src/common/mpi.c @@ -84,7 +84,7 @@ static const char *syms[] = { static slurm_mpi_ops_t ops; static plugin_context_t *g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - +static bool init_run = false; int _mpi_init (char *mpi_type) { @@ -93,7 +93,7 @@ int _mpi_init (char *mpi_type) char *type = NULL; int got_default = 0; - if ( g_context ) + if (init_run && g_context) return retval; slurm_mutex_lock( &context_lock ); @@ -122,10 +122,11 @@ int _mpi_init (char *mpi_type) retval = SLURM_ERROR; goto done; } + init_run = true; done: xfree(type); - if(got_default) + if (got_default) xfree(mpi_type); slurm_mutex_unlock( &context_lock ); return retval; @@ -137,7 +138,7 @@ int mpi_hook_slurmstepd_init (char ***env) debug("mpi type = %s", mpi_type); - if(_mpi_init(mpi_type) == SLURM_ERROR) + if (_mpi_init(mpi_type) == SLURM_ERROR) return SLURM_ERROR; unsetenvp (*env, "SLURM_MPI_TYPE"); @@ -165,7 +166,7 @@ int mpi_hook_client_init (char *mpi_type) { debug("mpi type = %s", mpi_type); - if(_mpi_init(mpi_type) == SLURM_ERROR) + if (_mpi_init(mpi_type) == SLURM_ERROR) return SLURM_ERROR; return SLURM_SUCCESS; @@ -210,6 +211,7 @@ int mpi_fini (void) if (!g_context) return SLURM_SUCCESS; + init_run = false; rc = plugin_context_destroy(g_context); return rc; } diff --git a/src/common/node_select.c b/src/common/node_select.c index abb2a725ff..ce4e7cadf5 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -123,7 +123,7 @@ static int select_context_default = -1; static slurm_select_ops_t *ops = NULL; static plugin_context_t **select_context = NULL; static pthread_mutex_t select_context_lock = PTHREAD_MUTEX_INITIALIZER; - +static bool init_run = false; /** * delete a block request */ @@ -196,7 +196,7 @@ extern int slurm_select_init(bool only_default) char *dir_array = NULL, *head = NULL; char *plugin_type = "select"; - if ( select_context ) + if ( init_run && select_context ) return retval; slurm_mutex_lock( &select_context_lock ); @@ -352,7 +352,7 @@ extern int slurm_select_init(bool only_default) } skip_load_all: - if(select_context_default == -1) + if (select_context_default == -1) fatal("Can't find plugin for %s", type); /* Insure that plugin_id is valid and unique */ @@ -374,6 +374,7 @@ skip_load_all: } } + init_run = true; done: slurm_mutex_unlock( &select_context_lock ); @@ -389,7 +390,8 @@ extern int slurm_select_fini(void) slurm_mutex_lock(&select_context_lock); if (!select_context) goto fini; - + + init_run = false; for (i=0; i= 0) + if (init_run && (g_context_cnt >= 0)) return rc; slurm_mutex_lock(&g_context_lock); @@ -144,6 +145,7 @@ extern int job_submit_plugin_init(void) g_context_cnt++; names = NULL; /* for next iteration */ } + init_run = true; fini: slurm_mutex_unlock(&g_context_lock); @@ -167,6 +169,7 @@ extern int job_submit_plugin_fini(void) if (g_context_cnt < 0) goto fini; + init_run = false; for (i=0; i= 0 ) + if ( init_run && (g_task_context_num >= 0) ) return retval; slurm_mutex_lock( &g_task_context_lock ); @@ -138,6 +139,7 @@ extern int slurmd_task_init(void) g_task_context_num++; task_plugin_list = NULL; /* for next iteration */ } + init_run = true; done: slurm_mutex_unlock( &g_task_context_lock ); @@ -162,6 +164,7 @@ extern int slurmd_task_fini(void) if (!g_task_context) goto done; + init_run = false; for (i = 0; i < g_task_context_num; i++) { if (g_task_context[i]) { if (plugin_context_destroy(g_task_context[i]) != diff --git a/src/srun/libsrun/launch.c b/src/srun/libsrun/launch.c index e674b9a68b..d79cba9fde 100644 --- a/src/srun/libsrun/launch.c +++ b/src/srun/libsrun/launch.c @@ -74,6 +74,7 @@ static const char *syms[] = { static plugin_ops_t ops; static plugin_context_t *plugin_context = NULL; static pthread_mutex_t plugin_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; static int _is_local_file (fname_t *fname) @@ -96,7 +97,7 @@ extern int launch_init(void) char *plugin_type = "launch"; char *type = NULL; - if (plugin_context) + if (init_run && plugin_context) return retval; slurm_mutex_lock(&plugin_context_lock); @@ -113,6 +114,7 @@ extern int launch_init(void) retval = SLURM_ERROR; goto done; } + init_run = true; done: slurm_mutex_unlock(&plugin_context_lock); @@ -128,6 +130,7 @@ extern int location_fini(void) if (!plugin_context) return SLURM_SUCCESS; + init_run = false; rc = plugin_context_destroy(plugin_context); plugin_context = NULL; -- GitLab From 7bed576b42d68b95182aa6f48788e78daf643d8c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 14:53:46 -0700 Subject: [PATCH 494/614] Correct plugin race condition introduced in https://github.com/SchedMD/slurm/commit/e7c17c70a899fb98c9054272ee078f67b2f7e4fc --- src/common/gres.c | 5 ++++- src/common/mpi.c | 6 ++++-- src/common/node_select.c | 5 ++++- src/common/slurm_accounting_storage.c | 7 +++++-- src/common/slurm_auth.c | 7 +++++-- src/common/slurm_jobacct_gather.c | 7 +++++-- src/common/slurm_priority.c | 7 +++++-- src/common/slurm_topology.c | 8 +++++--- src/common/switch.c | 8 +++++--- src/slurmctld/job_submit.c | 5 ++++- src/slurmctld/sched_plugin.c | 6 ++++-- 11 files changed, 50 insertions(+), 21 deletions(-) diff --git a/src/common/gres.c b/src/common/gres.c index b47a3bc67a..043756683b 100644 --- a/src/common/gres.c +++ b/src/common/gres.c @@ -124,6 +124,7 @@ static slurm_gres_context_t *gres_context = NULL; static char *gres_plugin_list = NULL; static pthread_mutex_t gres_context_lock = PTHREAD_MUTEX_INITIALIZER; static List gres_conf_list = NULL; +static bool init_run = false; /* Local functions */ static gres_node_state_t * @@ -338,7 +339,7 @@ extern int gres_plugin_init(void) int i, j, rc = SLURM_SUCCESS; char *last = NULL, *names, *one_name, *full_name; - if (gres_context_cnt >= 0) + if (init_run && (gres_context_cnt >= 0)) return rc; slurm_mutex_lock(&gres_context_lock); @@ -406,6 +407,7 @@ extern int gres_plugin_init(void) gres_context[i].gres_name_colon_len = strlen(gres_context[i].gres_name_colon); } + init_run = true; fini: slurm_mutex_unlock(&gres_context_lock); return rc; @@ -424,6 +426,7 @@ extern int gres_plugin_fini(void) if (gres_context_cnt < 0) goto fini; + init_run = false; for (i=0; iops.acct_storage_fini))(); rc = _acct_storage_context_destroy( g_acct_storage_context ); g_acct_storage_context = NULL; diff --git a/src/common/slurm_auth.c b/src/common/slurm_auth.c index 652127f443..12ad31e8df 100644 --- a/src/common/slurm_auth.c +++ b/src/common/slurm_auth.c @@ -106,6 +106,7 @@ struct slurm_auth_context { */ static slurm_auth_context_t g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; /* * Order of advisory arguments passed to some of the plugins. @@ -315,7 +316,7 @@ extern int slurm_auth_init( char *auth_type ) int retval = SLURM_SUCCESS; char *auth_type_local = NULL; - if ( g_context ) + if ( init_run && g_context ) return retval; slurm_mutex_lock( &context_lock ); @@ -346,7 +347,8 @@ extern int slurm_auth_init( char *auth_type ) _slurm_auth_context_destroy( g_context ); g_context = NULL; retval = SLURM_ERROR; - } + } else + init_run = true; done: xfree(auth_type_local); @@ -363,6 +365,7 @@ slurm_auth_fini( void ) if ( !g_context ) return SLURM_SUCCESS; + init_run = false; rc = _slurm_auth_context_destroy( g_context ); g_context = NULL; return rc; diff --git a/src/common/slurm_jobacct_gather.c b/src/common/slurm_jobacct_gather.c index 3c07c15405..b927c9c937 100644 --- a/src/common/slurm_jobacct_gather.c +++ b/src/common/slurm_jobacct_gather.c @@ -107,6 +107,7 @@ typedef struct slurm_jobacct_gather_context { static slurm_jobacct_gather_context_t *g_jobacct_gather_context = NULL; static pthread_mutex_t g_jobacct_gather_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; static int _slurm_jobacct_gather_init(void); @@ -258,7 +259,7 @@ static int _slurm_jobacct_gather_init(void) char *jobacct_gather_type = NULL; int retval=SLURM_SUCCESS; - if ( g_jobacct_gather_context ) + if (init_run && g_jobacct_gather_context ) return(retval); slurm_mutex_lock( &g_jobacct_gather_context_lock ); @@ -281,7 +282,8 @@ static int _slurm_jobacct_gather_init(void) g_jobacct_gather_context); g_jobacct_gather_context = NULL; retval = SLURM_ERROR; - } + } else + init_run = true; done: slurm_mutex_unlock( &g_jobacct_gather_context_lock ); @@ -304,6 +306,7 @@ extern int slurm_jobacct_gather_fini(void) slurm_mutex_lock( &g_jobacct_gather_context_lock ); if (g_jobacct_gather_context) { + init_run = false; rc = _slurm_jobacct_gather_context_destroy( g_jobacct_gather_context); g_jobacct_gather_context = NULL; diff --git a/src/common/slurm_priority.c b/src/common/slurm_priority.c index a86432541f..8a7579917e 100644 --- a/src/common/slurm_priority.c +++ b/src/common/slurm_priority.c @@ -63,6 +63,7 @@ typedef struct slurm_priority_context { static slurm_priority_context_t * g_priority_context = NULL; static pthread_mutex_t g_priority_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; /* * Local functions @@ -198,7 +199,7 @@ extern int slurm_priority_init(void) int retval = SLURM_SUCCESS; char *priority_type = NULL; - if ( g_priority_context ) + if ( init_run && g_priority_context ) return retval; slurm_mutex_lock( &g_priority_context_lock ); @@ -221,7 +222,8 @@ extern int slurm_priority_init(void) _priority_context_destroy( g_priority_context ); g_priority_context = NULL; retval = SLURM_ERROR; - } + } else + init_run = true; done: slurm_mutex_unlock( &g_priority_context_lock ); @@ -236,6 +238,7 @@ extern int slurm_priority_fini(void) if (!g_priority_context) return SLURM_SUCCESS; + init_run = false; rc = _priority_context_destroy( g_priority_context ); g_priority_context = NULL; return rc; diff --git a/src/common/slurm_topology.c b/src/common/slurm_topology.c index 8d4a265159..3229fa2bb2 100644 --- a/src/common/slurm_topology.c +++ b/src/common/slurm_topology.c @@ -75,7 +75,7 @@ typedef struct slurm_topo_context { static slurm_topo_context_t *g_topo_context = NULL; static pthread_mutex_t g_topo_context_lock = PTHREAD_MUTEX_INITIALIZER; - +static bool init_run = false; /* ************************************************************************ */ /* TAG( slurm_topo_get_ops ) */ @@ -207,7 +207,7 @@ slurm_topo_init( void ) int retval = SLURM_SUCCESS; char *topo_type = NULL; - if ( g_topo_context ) + if ( init_run && g_topo_context ) return retval; slurm_mutex_lock( &g_topo_context_lock ); @@ -229,7 +229,8 @@ slurm_topo_init( void ) slurm_topo_context_destroy( g_topo_context ); g_topo_context = NULL; retval = SLURM_ERROR; - } + } else + init_run = true; done: slurm_mutex_unlock( &g_topo_context_lock ); @@ -248,6 +249,7 @@ slurm_topo_fini( void ) if (!g_topo_context) return SLURM_SUCCESS; + init_run = false; rc = slurm_topo_context_destroy(g_topo_context); g_topo_context = NULL; return rc; diff --git a/src/common/switch.c b/src/common/switch.c index 5a8ac8b16e..2d4fb84548 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -127,7 +127,7 @@ struct slurm_switch_context { static slurm_switch_context_t *g_context = NULL; static pthread_mutex_t context_lock = PTHREAD_MUTEX_INITIALIZER; - +static bool init_run = false; static slurm_switch_context_t * _slurm_switch_context_create(const char *switch_type) @@ -288,7 +288,7 @@ extern int switch_init( void ) int retval = SLURM_SUCCESS; char *switch_type = NULL; - if ( g_context ) + if ( init_run && g_context ) return retval; slurm_mutex_lock( &context_lock ); @@ -309,7 +309,8 @@ extern int switch_init( void ) _slurm_switch_context_destroy( g_context ); g_context = NULL; retval = SLURM_ERROR; - } + } else + init_run = true; done: slurm_mutex_unlock( &context_lock ); @@ -324,6 +325,7 @@ extern int switch_fini(void) if (!g_context) return SLURM_SUCCESS; + init_run = false; rc = _slurm_switch_context_destroy(g_context); return rc; } diff --git a/src/slurmctld/job_submit.c b/src/slurmctld/job_submit.c index 56c3e3b146..2def3b5dce 100644 --- a/src/slurmctld/job_submit.c +++ b/src/slurmctld/job_submit.c @@ -93,6 +93,7 @@ static int submit_context_cnt = -1; static slurm_submit_context_t *submit_context = NULL; static char *submit_plugin_list = NULL; static pthread_mutex_t submit_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; static int _load_submit_plugin(char *plugin_name, slurm_submit_context_t *plugin_context) @@ -196,7 +197,7 @@ extern int job_submit_plugin_init(void) int rc = SLURM_SUCCESS; char *last = NULL, *names, *one_name; - if (submit_context_cnt >= 0) + if (init_run && (submit_context_cnt >= 0)) return rc; slurm_mutex_lock(&submit_context_lock); @@ -222,6 +223,7 @@ extern int job_submit_plugin_init(void) one_name = strtok_r(NULL, ",", &last); } xfree(names); + init_run = true; fini: slurm_mutex_unlock(&submit_context_lock); return rc; @@ -240,6 +242,7 @@ extern int job_submit_plugin_fini(void) if (submit_context_cnt < 0) goto fini; + init_run = false; for (i=0; i Date: Tue, 26 Jun 2012 14:54:48 -0700 Subject: [PATCH 495/614] Added logic for a Natural Sort (via code from Martin Pool ) so we can get a correct alphanumeric sort of hostnames. --- src/common/Makefile.am | 7 +- src/common/Makefile.in | 60 ++++++------ src/common/strnatcmp.c | 178 ++++++++++++++++++++++++++++++++++++ src/common/strnatcmp.h | 31 +++++++ src/slurmctld/read_config.c | 5 +- 5 files changed, 247 insertions(+), 34 deletions(-) create mode 100644 src/common/strnatcmp.c create mode 100644 src/common/strnatcmp.h diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 8df61a75d1..0e400b7be9 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -32,14 +32,15 @@ noinst_LTLIBRARIES = \ libspank.la libcommon_la_SOURCES = \ - xcgroup_read_config.c xcgroup_read_config.h \ - xcgroup.c xcgroup.h \ - xcpuinfo.c xcpuinfo.h \ + xcgroup_read_config.c xcgroup_read_config.h \ + xcgroup.c xcgroup.h \ + xcpuinfo.c xcpuinfo.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ xstring.c xstring.h \ xsignal.c xsignal.h \ + strnatcmp.c strnatcmp.h \ forward.c forward.h \ strlcpy.c strlcpy.h \ list.c list.h \ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index e61fdec02e..f8fc223791 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -102,14 +102,14 @@ am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ xcgroup_read_config.h xcgroup.c xcgroup.h xcpuinfo.c \ xcpuinfo.h assoc_mgr.c assoc_mgr.h xmalloc.c xmalloc.h \ xassert.c xassert.h xstring.c xstring.h xsignal.c xsignal.h \ - forward.c forward.h strlcpy.c strlcpy.h list.c list.h net.c \ - net.h log.c log.h cbuf.c cbuf.h safeopen.c safeopen.h \ - bitstring.c bitstring.h mpi.c mpi.h pack.c pack.h \ - parse_config.c parse_config.h parse_spec.c parse_spec.h \ - plugin.c plugin.h plugrack.c plugrack.h print_fields.c \ - print_fields.h read_config.c read_config.h node_select.c \ - node_select.h env.c env.h fd.c fd.h slurm_cred.h slurm_cred.c \ - slurm_errno.c slurm_priority.c slurm_priority.h \ + strnatcmp.c strnatcmp.h forward.c forward.h strlcpy.c \ + strlcpy.h list.c list.h net.c net.h log.c log.h cbuf.c cbuf.h \ + safeopen.c safeopen.h bitstring.c bitstring.h mpi.c mpi.h \ + pack.c pack.h parse_config.c parse_config.h parse_spec.c \ + parse_spec.h plugin.c plugin.h plugrack.c plugrack.h \ + print_fields.c print_fields.h read_config.c read_config.h \ + node_select.c node_select.h env.c env.h fd.c fd.h slurm_cred.h \ + slurm_cred.c slurm_errno.c slurm_priority.c slurm_priority.h \ slurm_protocol_api.c slurm_protocol_api.h \ slurm_protocol_pack.c slurm_protocol_pack.h \ slurm_protocol_util.c slurm_protocol_util.h \ @@ -139,24 +139,24 @@ am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ @HAVE_UNSETENV_FALSE@am__objects_1 = unsetenv.lo am_libcommon_la_OBJECTS = xcgroup_read_config.lo xcgroup.lo \ xcpuinfo.lo assoc_mgr.lo xmalloc.lo xassert.lo xstring.lo \ - xsignal.lo forward.lo strlcpy.lo list.lo net.lo log.lo cbuf.lo \ - safeopen.lo bitstring.lo mpi.lo pack.lo parse_config.lo \ - parse_spec.lo plugin.lo plugrack.lo print_fields.lo \ - read_config.lo node_select.lo env.lo fd.lo slurm_cred.lo \ - slurm_errno.lo slurm_priority.lo slurm_protocol_api.lo \ - slurm_protocol_pack.lo slurm_protocol_util.lo \ - slurm_protocol_socket_implementation.lo slurm_protocol_defs.lo \ - slurm_rlimits_info.lo slurmdb_defs.lo slurmdb_pack.lo \ - slurmdbd_defs.lo working_cluster.lo uid.lo util-net.lo \ - slurm_auth.lo jobacct_common.lo slurm_accounting_storage.lo \ - slurm_jobacct_gather.lo slurm_jobcomp.lo slurm_topology.lo \ - switch.lo arg_desc.lo malloc.lo getopt.lo getopt1.lo \ - $(am__objects_1) slurm_selecttype_info.lo \ - slurm_resource_info.lo hostlist.lo slurm_step_layout.lo \ - checkpoint.lo job_resources.lo parse_time.lo job_options.lo \ - global_defaults.lo timers.lo stepd_api.lo \ - write_labelled_message.lo proc_args.lo slurm_strcasestr.lo \ - node_conf.lo gres.lo + xsignal.lo strnatcmp.lo forward.lo strlcpy.lo list.lo net.lo \ + log.lo cbuf.lo safeopen.lo bitstring.lo mpi.lo pack.lo \ + parse_config.lo parse_spec.lo plugin.lo plugrack.lo \ + print_fields.lo read_config.lo node_select.lo env.lo fd.lo \ + slurm_cred.lo slurm_errno.lo slurm_priority.lo \ + slurm_protocol_api.lo slurm_protocol_pack.lo \ + slurm_protocol_util.lo slurm_protocol_socket_implementation.lo \ + slurm_protocol_defs.lo slurm_rlimits_info.lo slurmdb_defs.lo \ + slurmdb_pack.lo slurmdbd_defs.lo working_cluster.lo uid.lo \ + util-net.lo slurm_auth.lo jobacct_common.lo \ + slurm_accounting_storage.lo slurm_jobacct_gather.lo \ + slurm_jobcomp.lo slurm_topology.lo switch.lo arg_desc.lo \ + malloc.lo getopt.lo getopt1.lo $(am__objects_1) \ + slurm_selecttype_info.lo slurm_resource_info.lo hostlist.lo \ + slurm_step_layout.lo checkpoint.lo job_resources.lo \ + parse_time.lo job_options.lo global_defaults.lo timers.lo \ + stepd_api.lo write_labelled_message.lo proc_args.lo \ + slurm_strcasestr.lo node_conf.lo gres.lo am__EXTRA_libcommon_la_SOURCES_DIST = unsetenv.c unsetenv.h libcommon_la_OBJECTS = $(am_libcommon_la_OBJECTS) libcommon_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ @@ -422,14 +422,15 @@ noinst_LTLIBRARIES = \ libspank.la libcommon_la_SOURCES = \ - xcgroup_read_config.c xcgroup_read_config.h \ - xcgroup.c xcgroup.h \ - xcpuinfo.c xcpuinfo.h \ + xcgroup_read_config.c xcgroup_read_config.h \ + xcgroup.c xcgroup.h \ + xcpuinfo.c xcpuinfo.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ xstring.c xstring.h \ xsignal.c xsignal.h \ + strnatcmp.c strnatcmp.h \ forward.c forward.h \ strlcpy.c strlcpy.h \ list.c list.h \ @@ -664,6 +665,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/slurmdbd_defs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stepd_api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strlcpy.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnatcmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/switch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timers.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/uid.Plo@am__quote@ diff --git a/src/common/strnatcmp.c b/src/common/strnatcmp.c new file mode 100644 index 0000000000..c91d87fc00 --- /dev/null +++ b/src/common/strnatcmp.c @@ -0,0 +1,178 @@ +/* -*- mode: c; c-file-style: "k&r" -*- + + strnatcmp.c -- Perform 'natural order' comparisons of strings in C. + Copyright (C) 2000, 2004 by Martin Pool + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + + +/* partial change history: + * + * 2004-10-10 mbp: Lift out character type dependencies into macros. + * + * Eric Sosman pointed out that ctype functions take a parameter whose + * value must be that of an unsigned int, even on platforms that have + * negative chars in their default char type. + */ + +#include +#include +#include +#include + +#include "strnatcmp.h" + + +/* These are defined as macros to make it easier to adapt this code to + * different characters types or comparison functions. */ +static inline int +nat_isdigit(nat_char a) +{ + return isdigit((unsigned char) a); +} + + +static inline int +nat_isspace(nat_char a) +{ + return isspace((unsigned char) a); +} + + +static inline nat_char +nat_toupper(nat_char a) +{ + return toupper((unsigned char) a); +} + + + +static int +compare_right(nat_char const *a, nat_char const *b) +{ + int bias = 0; + + /* The longest run of digits wins. That aside, the greatest + value wins, but we can't know that it will until we've scanned + both numbers to know that they have the same magnitude, so we + remember it in BIAS. */ + for (;; a++, b++) { + if (!nat_isdigit(*a) && !nat_isdigit(*b)) + return bias; + else if (!nat_isdigit(*a)) + return -1; + else if (!nat_isdigit(*b)) + return +1; + else if (*a < *b) { + if (!bias) + bias = -1; + } else if (*a > *b) { + if (!bias) + bias = +1; + } else if (!*a && !*b) + return bias; + } + + return 0; +} + + +static int +compare_left(nat_char const *a, nat_char const *b) +{ + /* Compare two left-aligned numbers: the first to have a + different value wins. */ + for (;; a++, b++) { + if (!nat_isdigit(*a) && !nat_isdigit(*b)) + return 0; + else if (!nat_isdigit(*a)) + return -1; + else if (!nat_isdigit(*b)) + return +1; + else if (*a < *b) + return -1; + else if (*a > *b) + return +1; + } + + return 0; +} + + +static int strnatcmp0(nat_char const *a, nat_char const *b, int fold_case) +{ + int ai, bi; + nat_char ca, cb; + int fractional, result; + + assert(a && b); + ai = bi = 0; + while (1) { + ca = a[ai]; cb = b[bi]; + + /* skip over leading spaces or zeros */ + while (nat_isspace(ca)) + ca = a[++ai]; + + while (nat_isspace(cb)) + cb = b[++bi]; + + /* process run of digits */ + if (nat_isdigit(ca) && nat_isdigit(cb)) { + fractional = (ca == '0' || cb == '0'); + + if (fractional) { + if ((result = compare_left(a+ai, b+bi)) != 0) + return result; + } else { + if ((result = compare_right(a+ai, b+bi)) != 0) + return result; + } + } + + if (!ca && !cb) { + /* The strings compare the same. Perhaps the caller + will want to call strcmp to break the tie. */ + return 0; + } + + if (fold_case) { + ca = nat_toupper(ca); + cb = nat_toupper(cb); + } + + if (ca < cb) + return -1; + else if (ca > cb) + return +1; + + ++ai; ++bi; + } +} + + + +int strnatcmp(nat_char const *a, nat_char const *b) { + return strnatcmp0(a, b, 0); +} + + +/* Compare, recognizing numeric string and ignoring case. */ +int strnatcasecmp(nat_char const *a, nat_char const *b) { + return strnatcmp0(a, b, 1); +} diff --git a/src/common/strnatcmp.h b/src/common/strnatcmp.h new file mode 100644 index 0000000000..51a3c4e8cb --- /dev/null +++ b/src/common/strnatcmp.h @@ -0,0 +1,31 @@ +/* -*- mode: c; c-file-style: "k&r" -*- + + strnatcmp.c -- Perform 'natural order' comparisons of strings in C. + Copyright (C) 2000, 2004 by Martin Pool + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. +*/ + + +/* CUSTOMIZATION SECTION + * + * You can change this typedef, but must then also change the inline + * functions in strnatcmp.c */ +typedef char nat_char; + +int strnatcmp(nat_char const *a, nat_char const *b); +int strnatcasecmp(nat_char const *a, nat_char const *b); diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 5c99d8e41c..1301b03f5e 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -71,6 +71,7 @@ #include "src/common/slurm_rlimits_info.h" #include "src/common/switch.h" #include "src/common/xstring.h" +#include "src/common/strnatcmp.h" #include "src/slurmctld/acct_policy.h" #include "src/slurmctld/front_end.h" @@ -132,8 +133,8 @@ static void _reorder_nodes_by_name(void) for (i = 0; i < node_record_count; i++) { min_inx = i; for (j = i + 1; j < node_record_count; j++) { - if (strcmp(node_record_table_ptr[j].name, - node_record_table_ptr[min_inx].name) < 0) + if (strnatcmp(node_record_table_ptr[j].name, + node_record_table_ptr[min_inx].name) < 0) min_inx = j; } -- GitLab From 8d0774dff08b96f827234203843c42bd878004fb Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 26 Jun 2012 15:23:37 -0700 Subject: [PATCH 496/614] Fix other potential race conditions that may pop up. --- src/plugins/select/bluegene/configure_api.c | 5 ++++- src/plugins/select/cray/other_select.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/plugins/select/bluegene/configure_api.c b/src/plugins/select/bluegene/configure_api.c index e9aebad3ba..22a94b78d8 100644 --- a/src/plugins/select/bluegene/configure_api.c +++ b/src/plugins/select/bluegene/configure_api.c @@ -92,12 +92,13 @@ static const char *syms[] = { static bg_configure_api_ops_t ops; static plugin_context_t *g_context = NULL; static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; extern int bg_configure_init(void) { int rc = SLURM_SUCCESS; char *plugin_type = "select", *type="select/bluegene"; - if (g_context) + if (init_run && g_context) return rc; slurm_mutex_lock(&g_context_lock); @@ -113,6 +114,7 @@ extern int bg_configure_init(void) rc = SLURM_ERROR; goto done; } + init_run = true; done: slurm_mutex_unlock(&g_context_lock); @@ -128,6 +130,7 @@ extern int bg_configure_fini(void) if (!g_context) goto fini; + init_run = false; rc = plugin_context_destroy(g_context); g_context = NULL; fini: diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index e4589c5fe2..33fd41b29d 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -116,6 +116,7 @@ const char *node_select_syms[] = { static slurm_select_ops_t ops; static plugin_context_t *g_context = NULL; static pthread_mutex_t g_context_lock = PTHREAD_MUTEX_INITIALIZER; +static bool init_run = false; /* * Initialize context for node selection plugin @@ -126,7 +127,7 @@ extern int other_select_init(void) char *plugin_type = "select"; char *type = NULL; - if (g_context) + if (init_run && g_context) return retval; slurm_mutex_lock(&g_context_lock); @@ -156,6 +157,7 @@ extern int other_select_init(void) retval = SLURM_ERROR; goto done; } + init_run = true; done: slurm_mutex_unlock(&g_context_lock); @@ -167,6 +169,7 @@ extern int other_select_fini(void) int rc = SLURM_SUCCESS; slurm_mutex_lock(&g_context_lock); + init_run = false; if (!g_context) goto fini; -- GitLab From 55f92673a493d81b16283907e511c01cdafb7238 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 26 Jun 2012 15:53:28 -0700 Subject: [PATCH 497/614] Comments added by Nathan Yee --- src/srun/libsrun/launch.h | 84 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 83 insertions(+), 1 deletion(-) diff --git a/src/srun/libsrun/launch.h b/src/srun/libsrun/launch.h index 6d67b13709..e4311424eb 100644 --- a/src/srun/libsrun/launch.h +++ b/src/srun/libsrun/launch.h @@ -50,34 +50,116 @@ #include "opt.h" #include "debugger.h" +/* + * launch_common_get_slurm_step_layout() gets the slurm job step layout. + * + * IN job - the job step layout to get. + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern slurm_step_layout_t *launch_common_get_slurm_step_layout( srun_job_t *job); +/* + * launch_common_create_job_step() creates the job step with the given info. + * + * IN job - job to be created into a job step + * IN use_all_cpus - the choice to use all the cpus. + * IN signal_function - function that handles the signals coming in. + * IN destroy_job - pointer to a global flag signifying if the job was + * canceled while allocating. + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); +/* + * launch_common_set_stdio_fds() sets the stdio_fds to given info. + * + * IN job - the job that is set. + * IN cio_fds - filling in io descriptors. + */ extern void launch_common_set_stdio_fds(srun_job_t *job, slurm_step_io_fds_t *cio_fds); - +/* + * init() is called when the plugin is loaded, before any other functions + * are called. Put global initialization here. + */ extern int launch_init(void); + +/* + * fini() is called when the plugin is removed. Clear any allocated + * storage here. + */ extern int launch_fini(void); + +/* + * launch_p_setup_srun_opt() is called when the plugin needs the srun + * operation needs to be set up. + * + * IN rest - extra parameters on the command line not processed by srun + */ extern int launch_g_setup_srun_opt(char **rest); +/* + * launch_p_create_job_step() creates the job step. + * + * IN/OUT job - the job to be created into a job step. + * IN use_all_cpus - the choice to use all the cpus. + * IN signal_function - function that handles the signals coming in. + * IN destroy_job - pointer to a global flag signifying if the job was + * canceled while allocating. + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern int launch_g_create_job_step(srun_job_t *job, bool use_all_cpus, void (*signal_function)(int), sig_atomic_t *destroy_job); + +/* + * launch_p_step_launch() is called to launch the job step that + * was created. + * + * IN/OUT job - the job needing to be launched + * IN cio_fds - filled in io descriptors. + * IN/OUT global_rc - srun global return code. + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern int launch_g_step_launch( srun_job_t *job, slurm_step_io_fds_t *cio_fds, uint32_t *global_rc); +/* + * launch_p_step_wait() is called to wait for the job step to be finished. + * + * IN/OUT job - the job waiting to finish. + * IN got_alloc - if the resource allocation was created inside srun + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern int launch_g_step_wait(srun_job_t *job, bool got_alloc); +/* + * launch_p_step_terminate() is called to end the job step. + * + * RETURN SLURM_SUCCESS on success || SLURM_ERROR else wise + */ extern int launch_g_step_terminate(void); +/* + * launch_p_print_status() displays the the status of the job step. + */ extern void launch_g_print_status(void); +/* + * launch_p_fwd_signal() send a forward signal to an underlining task. + * + * IN signal - the signal to forward to the underlying tasks. + */ extern void launch_g_fwd_signal(int signal); #endif /* _LAUNCH_H */ -- GitLab From 07407fc36267ec8c7439f22a34bb8dfb0bee5cfd Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 16:51:22 -0700 Subject: [PATCH 498/614] Fix for step arbitrary allocation with hostlist from job's env vars --- src/srun/srun_job.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/srun/srun_job.c b/src/srun/srun_job.c index d9caa723b2..3fbd3f72cc 100644 --- a/src/srun/srun_job.c +++ b/src/srun/srun_job.c @@ -151,6 +151,7 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) char *buf = NULL; int count = 0; uint32_t alloc_count = 0; + char *step_nodelist = NULL; ai->jobid = job_id; ai->stepid = NO_VAL; @@ -213,20 +214,20 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) opt.min_nodes = ai->nnodes; opt.nodes_set = true; } - if(!opt.max_nodes) + if (!opt.max_nodes) opt.max_nodes = opt.min_nodes; - if((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) ai->nnodes = opt.max_nodes; count = hostlist_count(hl); - if(!count) { + if (!count) { error("Hostlist is now nothing! Can't run job."); hostlist_destroy(hl); goto error; } - if(inc_hl) { + if (inc_hl) { count = hostlist_count(inc_hl); - if(count < ai->nnodes) { + if (count < ai->nnodes) { /* add more nodes to get correct number for allocation */ hostlist_t tmp_hl = hostlist_copy(hl); @@ -266,15 +267,15 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) * know it is less than the number of nodes * in the allocation */ - if(opt.ntasks_set && (opt.ntasks < ai->nnodes)) + if (opt.ntasks_set && (opt.ntasks < ai->nnodes)) opt.min_nodes = opt.ntasks; else opt.min_nodes = ai->nnodes; opt.nodes_set = true; } - if(!opt.max_nodes) + if (!opt.max_nodes) opt.max_nodes = opt.min_nodes; - if((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) ai->nnodes = opt.max_nodes; /* Don't reset the ai->nodelist because that is the * nodelist we want to say the allocation is under @@ -285,8 +286,12 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) } /* get the correct number of hosts to run tasks on */ - if (opt.nodelist) { - hl = hostlist_create(opt.nodelist); + if (opt.nodelist) + step_nodelist = opt.nodelist; + else if ((opt.distribution == SLURM_DIST_ARBITRARY) && (count == 0)) + step_nodelist = getenv("SLURM_ARBITRARY_NODELIST"); + if (step_nodelist) { + hl = hostlist_create(step_nodelist); if (opt.distribution != SLURM_DIST_ARBITRARY) hostlist_uniq(hl); if (!hostlist_count(hl)) { @@ -308,12 +313,11 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) opt.nodelist = buf; } - if (opt.distribution == SLURM_DIST_ARBITRARY) { - if (count != opt.ntasks) { - error("You asked for %d tasks but specified %d nodes", - opt.ntasks, count); - goto error; - } + if ((opt.distribution == SLURM_DIST_ARBITRARY) && + (count != opt.ntasks)) { + error("You asked for %d tasks but specified %d nodes", + opt.ntasks, count); + goto error; } if (ai->nnodes == 0) { -- GitLab From e18e3ee057d232158d28e8185cb978b315d2f13e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 16:51:22 -0700 Subject: [PATCH 499/614] Fix for step arbitrary allocation with hostlist from job's env vars --- src/srun/srun_job.c | 543 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 543 insertions(+) create mode 100644 src/srun/srun_job.c diff --git a/src/srun/srun_job.c b/src/srun/srun_job.c new file mode 100644 index 0000000000..3fbd3f72cc --- /dev/null +++ b/src/srun/srun_job.c @@ -0,0 +1,543 @@ +/****************************************************************************\ + * srun_job.c - job data structure creation functions + ***************************************************************************** + * Copyright (C) 2002-2007 The Regents of the University of California. + * Copyright (C) 2008 Lawrence Livermore National Security. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Mark Grondona . + * CODE-OCEC-09-009. All rights reserved. + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/common/bitstring.h" +#include "src/common/cbuf.h" +#include "src/common/hostlist.h" +#include "src/common/log.h" +#include "src/common/read_config.h" +#include "src/common/slurm_protocol_api.h" +#include "src/common/xmalloc.h" +#include "src/common/xstring.h" +#include "src/common/io_hdr.h" +#include "src/common/forward.h" +#include "src/common/fd.h" + +#include "src/srun/srun_job.h" +#include "src/srun/opt.h" +#include "src/srun/fname.h" +#include "src/srun/debugger.h" + +/* + * allocation information structure used to store general information + * about node allocation to be passed to _job_create_structure() + */ +typedef struct allocation_info { + char *alias_list; + uint16_t *cpus_per_node; + uint32_t *cpu_count_reps; + uint32_t jobid; + uint32_t nnodes; + char *nodelist; + uint32_t num_cpu_groups; + dynamic_plugin_data_t *select_jobinfo; + uint32_t stepid; +} allocation_info_t; + +/* + * Prototypes: + */ +static inline int _estimate_nports(int nclients, int cli_per_port); +static int _compute_task_count(allocation_info_t *info); +static void _set_ntasks(allocation_info_t *info); +static srun_job_t *_job_create_structure(allocation_info_t *info); +static char * _normalize_hostlist(const char *hostlist); + + +/* + * Create an srun job structure w/out an allocation response msg. + * (i.e. use the command line options) + */ +srun_job_t * +job_create_noalloc(void) +{ + srun_job_t *job = NULL; + allocation_info_t *ai = xmalloc(sizeof(allocation_info_t)); + uint16_t cpn = 1; + hostlist_t hl = hostlist_create(opt.nodelist); + + if (!hl) { + error("Invalid node list `%s' specified", opt.nodelist); + goto error; + } + srand48(getpid()); + ai->jobid = MIN_NOALLOC_JOBID + + ((uint32_t) lrand48() % + (MAX_NOALLOC_JOBID - MIN_NOALLOC_JOBID + 1)); + ai->stepid = (uint32_t) (lrand48()); + ai->nodelist = opt.nodelist; + ai->nnodes = hostlist_count(hl); + + hostlist_destroy(hl); + + cpn = (opt.ntasks + ai->nnodes - 1) / ai->nnodes; + ai->cpus_per_node = &cpn; + ai->cpu_count_reps = &ai->nnodes; + + /* + * Create job, then fill in host addresses + */ + job = _job_create_structure(ai); + + job_update_io_fnames(job); + + error: + xfree(ai); + return (job); + +} + +/* + * Create an srun job structure for a step w/out an allocation response msg. + * (i.e. inside an allocation) + */ +srun_job_t * +job_step_create_allocation(resource_allocation_response_msg_t *resp) +{ + uint32_t job_id = resp->job_id; + srun_job_t *job = NULL; + allocation_info_t *ai = xmalloc(sizeof(allocation_info_t)); + hostlist_t hl = NULL; + char *buf = NULL; + int count = 0; + uint32_t alloc_count = 0; + char *step_nodelist = NULL; + + ai->jobid = job_id; + ai->stepid = NO_VAL; + ai->alias_list = resp->alias_list; + ai->nodelist = opt.alloc_nodelist; + hl = hostlist_create(ai->nodelist); + hostlist_uniq(hl); + alloc_count = hostlist_count(hl); + ai->nnodes = alloc_count; + hostlist_destroy(hl); + + if (opt.exc_nodes) { + hostlist_t exc_hl = hostlist_create(opt.exc_nodes); + hostlist_t inc_hl = NULL; + char *node_name = NULL; + + hl = hostlist_create(ai->nodelist); + if(opt.nodelist) { + inc_hl = hostlist_create(opt.nodelist); + } + hostlist_uniq(hl); + //info("using %s or %s", opt.nodelist, ai->nodelist); + while ((node_name = hostlist_shift(exc_hl))) { + int inx = hostlist_find(hl, node_name); + if (inx >= 0) { + debug("excluding node %s", node_name); + hostlist_delete_nth(hl, inx); + ai->nnodes--; /* decrement node count */ + } + if (inc_hl) { + inx = hostlist_find(inc_hl, node_name); + if (inx >= 0) { + error("Requested node %s is also " + "in the excluded list.", + node_name); + error("Job not submitted."); + hostlist_destroy(exc_hl); + hostlist_destroy(inc_hl); + goto error; + } + } + free(node_name); + } + hostlist_destroy(exc_hl); + + /* we need to set this here so if there are more nodes + * available than we requested we can set it + * straight. If there is no exclude list then we set + * the vars then. + */ + if (!opt.nodes_set) { + /* we don't want to set the number of nodes = + * to the number of requested processes unless we + * know it is less than the number of nodes + * in the allocation + */ + if(opt.ntasks_set && (opt.ntasks < ai->nnodes)) + opt.min_nodes = opt.ntasks; + else + opt.min_nodes = ai->nnodes; + opt.nodes_set = true; + } + if (!opt.max_nodes) + opt.max_nodes = opt.min_nodes; + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + ai->nnodes = opt.max_nodes; + + count = hostlist_count(hl); + if (!count) { + error("Hostlist is now nothing! Can't run job."); + hostlist_destroy(hl); + goto error; + } + if (inc_hl) { + count = hostlist_count(inc_hl); + if (count < ai->nnodes) { + /* add more nodes to get correct number for + allocation */ + hostlist_t tmp_hl = hostlist_copy(hl); + int i=0; + int diff = ai->nnodes - count; + buf = hostlist_ranged_string_xmalloc(inc_hl); + hostlist_delete(tmp_hl, buf); + xfree(buf); + while ((node_name = hostlist_shift(tmp_hl)) && + (i < diff)) { + hostlist_push(inc_hl, node_name); + i++; + } + hostlist_destroy(tmp_hl); + } + buf = hostlist_ranged_string_xmalloc(inc_hl); + hostlist_destroy(inc_hl); + xfree(opt.nodelist); + opt.nodelist = buf; + } else { + if (count > ai->nnodes) { + /* remove more nodes than needed for + * allocation */ + int i; + for (i = count; i >= ai->nnodes; i--) + hostlist_delete_nth(hl, i); + } + xfree(opt.nodelist); + opt.nodelist = hostlist_ranged_string_xmalloc(hl); + } + + hostlist_destroy(hl); + } else { + if (!opt.nodes_set) { + /* we don't want to set the number of nodes = + * to the number of requested processes unless we + * know it is less than the number of nodes + * in the allocation + */ + if (opt.ntasks_set && (opt.ntasks < ai->nnodes)) + opt.min_nodes = opt.ntasks; + else + opt.min_nodes = ai->nnodes; + opt.nodes_set = true; + } + if (!opt.max_nodes) + opt.max_nodes = opt.min_nodes; + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + ai->nnodes = opt.max_nodes; + /* Don't reset the ai->nodelist because that is the + * nodelist we want to say the allocation is under + * opt.nodelist is what is used for the allocation. + */ + /* xfree(ai->nodelist); */ + /* ai->nodelist = xstrdup(buf); */ + } + + /* get the correct number of hosts to run tasks on */ + if (opt.nodelist) + step_nodelist = opt.nodelist; + else if ((opt.distribution == SLURM_DIST_ARBITRARY) && (count == 0)) + step_nodelist = getenv("SLURM_ARBITRARY_NODELIST"); + if (step_nodelist) { + hl = hostlist_create(step_nodelist); + if (opt.distribution != SLURM_DIST_ARBITRARY) + hostlist_uniq(hl); + if (!hostlist_count(hl)) { + error("Hostlist is now nothing! Can not run job."); + hostlist_destroy(hl); + goto error; + } + + buf = hostlist_ranged_string_xmalloc(hl); + count = hostlist_count(hl); + hostlist_destroy(hl); + /* Don't reset the ai->nodelist because that is the + * nodelist we want to say the allocation is under + * opt.nodelist is what is used for the allocation. + */ + /* xfree(ai->nodelist); */ + /* ai->nodelist = xstrdup(buf); */ + xfree(opt.nodelist); + opt.nodelist = buf; + } + + if ((opt.distribution == SLURM_DIST_ARBITRARY) && + (count != opt.ntasks)) { + error("You asked for %d tasks but specified %d nodes", + opt.ntasks, count); + goto error; + } + + if (ai->nnodes == 0) { + error("No nodes in allocation, can't run job"); + goto error; + } + + ai->num_cpu_groups = resp->num_cpu_groups; + ai->cpus_per_node = resp->cpus_per_node; + ai->cpu_count_reps = resp->cpu_count_reps; + +/* info("looking for %d nodes out of %s with a must list of %s", */ +/* ai->nnodes, ai->nodelist, opt.nodelist); */ + /* + * Create job + */ + job = _job_create_structure(ai); +error: + xfree(ai); + return (job); + +} + +/* + * Create an srun job structure from a resource allocation response msg + */ +extern srun_job_t * +job_create_allocation(resource_allocation_response_msg_t *resp) +{ + srun_job_t *job; + allocation_info_t *i = xmalloc(sizeof(allocation_info_t)); + + i->alias_list = resp->alias_list; + i->nodelist = _normalize_hostlist(resp->node_list); + i->nnodes = resp->node_cnt; + i->jobid = resp->job_id; + i->stepid = NO_VAL; + i->num_cpu_groups = resp->num_cpu_groups; + i->cpus_per_node = resp->cpus_per_node; + i->cpu_count_reps = resp->cpu_count_reps; + i->select_jobinfo = select_g_select_jobinfo_copy(resp->select_jobinfo); + + job = _job_create_structure(i); + + xfree(i->nodelist); + xfree(i); + + return (job); +} + +void +update_job_state(srun_job_t *job, srun_job_state_t state) +{ + pthread_mutex_lock(&job->state_mutex); + if (job->state < state) { + job->state = state; + pthread_cond_signal(&job->state_cond); + + } + pthread_mutex_unlock(&job->state_mutex); + return; +} + +srun_job_state_t +job_state(srun_job_t *job) +{ + srun_job_state_t state; + slurm_mutex_lock(&job->state_mutex); + state = job->state; + slurm_mutex_unlock(&job->state_mutex); + return state; +} + + +void +job_force_termination(srun_job_t *job) +{ + static int kill_sent = 0; + static time_t last_msg = 0; + + if (kill_sent == 0) { + info("forcing job termination"); + /* Sends SIGKILL to tasks directly */ + update_job_state(job, SRUN_JOB_FORCETERM); + } else { + time_t now = time(NULL); + if (last_msg != now) { + info("job abort in progress"); + last_msg = now; + } + if (kill_sent == 1) { + /* Try sending SIGKILL through slurmctld */ + slurm_kill_job_step(job->jobid, job->stepid, SIGKILL); + } + } + kill_sent++; +} + +static inline int +_estimate_nports(int nclients, int cli_per_port) +{ + div_t d; + d = div(nclients, cli_per_port); + return d.rem > 0 ? d.quot + 1 : d.quot; +} + +static int +_compute_task_count(allocation_info_t *ainfo) +{ + int i, cnt = 0; +#if defined HAVE_BGQ +//#if defined HAVE_BGQ && HAVE_BG_FILES + /* always return the ntasks here for Q */ + info("returning %d", opt.ntasks); + return opt.ntasks; +#endif + if (opt.cpus_set) { + for (i = 0; i < ainfo->num_cpu_groups; i++) + cnt += ( ainfo->cpu_count_reps[i] * + (ainfo->cpus_per_node[i]/opt.cpus_per_task)); + } + return (cnt < ainfo->nnodes) ? ainfo->nnodes : cnt; +} + +static void +_set_ntasks(allocation_info_t *ai) +{ + if (!opt.ntasks_set) { + opt.ntasks = _compute_task_count(ai); + if (opt.cpus_set) + opt.ntasks_set = true; /* implicit */ + } +} + +/* + * Create an srun job structure from a resource allocation response msg + */ +static srun_job_t * +_job_create_structure(allocation_info_t *ainfo) +{ + srun_job_t *job = xmalloc(sizeof(srun_job_t)); + int i; + + _set_ntasks(ainfo); + debug2("creating job with %d tasks", opt.ntasks); + + slurm_mutex_init(&job->state_mutex); + pthread_cond_init(&job->state_cond, NULL); + job->state = SRUN_JOB_INIT; + + job->alias_list = xstrdup(ainfo->alias_list); + job->nodelist = xstrdup(ainfo->nodelist); + job->stepid = ainfo->stepid; + +#if defined HAVE_BGQ +//#if defined HAVE_BGQ && defined HAVE_BG_FILES + job->nhosts = ainfo->nnodes; + select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, &job->nhosts); +#elif defined HAVE_FRONT_END /* Limited job step support */ + opt.overcommit = true; + job->nhosts = 1; +#else + job->nhosts = ainfo->nnodes; +#endif + +#if !defined HAVE_FRONT_END || (defined HAVE_BGQ) +//#if !defined HAVE_FRONT_END || (defined HAVE_BGQ && defined HAVE_BG_FILES) + if(opt.min_nodes > job->nhosts) { + error("Only allocated %d nodes asked for %d", + job->nhosts, opt.min_nodes); + if (opt.exc_nodes) { + /* When resources are pre-allocated and some nodes + * are explicitly excluded, this error can occur. */ + error("Are required nodes explicitly excluded?"); + } + return NULL; + } + if ((ainfo->cpus_per_node == NULL) || + (ainfo->cpu_count_reps == NULL)) { + error("cpus_per_node array is not set"); + return NULL; + } +#endif + job->select_jobinfo = ainfo->select_jobinfo; + job->jobid = ainfo->jobid; + + job->ntasks = opt.ntasks; + for (i=0; inum_cpu_groups; i++) { + job->cpu_count += ainfo->cpus_per_node[i] * + ainfo->cpu_count_reps[i]; + } + + job->rc = -1; + + job_update_io_fnames(job); + + return (job); +} + +void +job_update_io_fnames(srun_job_t *job) +{ + job->ifname = fname_create(job, opt.ifname); + job->ofname = fname_create(job, opt.ofname); + job->efname = opt.efname ? fname_create(job, opt.efname) : job->ofname; +} + +static char * +_normalize_hostlist(const char *hostlist) +{ + char *buf = NULL; + hostlist_t hl = hostlist_create(hostlist); + + if (hl) { + buf = hostlist_ranged_string_xmalloc(hl); + hostlist_destroy(hl); + } + if (!buf) + return xstrdup(hostlist); + + return buf; +} + -- GitLab From 47e259fe41543345c4e9f24dc59a304210a34c1f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 17:03:06 -0700 Subject: [PATCH 500/614] This was relocated in previous work, merge of v2.4 left vestigial file --- src/srun/srun_job.c | 543 -------------------------------------------- 1 file changed, 543 deletions(-) delete mode 100644 src/srun/srun_job.c diff --git a/src/srun/srun_job.c b/src/srun/srun_job.c deleted file mode 100644 index 3fbd3f72cc..0000000000 --- a/src/srun/srun_job.c +++ /dev/null @@ -1,543 +0,0 @@ -/****************************************************************************\ - * srun_job.c - job data structure creation functions - ***************************************************************************** - * Copyright (C) 2002-2007 The Regents of the University of California. - * Copyright (C) 2008 Lawrence Livermore National Security. - * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). - * Written by Mark Grondona . - * CODE-OCEC-09-009. All rights reserved. - * - * This file is part of SLURM, a resource management program. - * For details, see . - * Please also read the included file: DISCLAIMER. - * - * SLURM is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do - * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in - * the program, then also delete it here. - * - * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY - * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS - * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more - * details. - * - * You should have received a copy of the GNU General Public License along - * with SLURM; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -\*****************************************************************************/ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "src/common/bitstring.h" -#include "src/common/cbuf.h" -#include "src/common/hostlist.h" -#include "src/common/log.h" -#include "src/common/read_config.h" -#include "src/common/slurm_protocol_api.h" -#include "src/common/xmalloc.h" -#include "src/common/xstring.h" -#include "src/common/io_hdr.h" -#include "src/common/forward.h" -#include "src/common/fd.h" - -#include "src/srun/srun_job.h" -#include "src/srun/opt.h" -#include "src/srun/fname.h" -#include "src/srun/debugger.h" - -/* - * allocation information structure used to store general information - * about node allocation to be passed to _job_create_structure() - */ -typedef struct allocation_info { - char *alias_list; - uint16_t *cpus_per_node; - uint32_t *cpu_count_reps; - uint32_t jobid; - uint32_t nnodes; - char *nodelist; - uint32_t num_cpu_groups; - dynamic_plugin_data_t *select_jobinfo; - uint32_t stepid; -} allocation_info_t; - -/* - * Prototypes: - */ -static inline int _estimate_nports(int nclients, int cli_per_port); -static int _compute_task_count(allocation_info_t *info); -static void _set_ntasks(allocation_info_t *info); -static srun_job_t *_job_create_structure(allocation_info_t *info); -static char * _normalize_hostlist(const char *hostlist); - - -/* - * Create an srun job structure w/out an allocation response msg. - * (i.e. use the command line options) - */ -srun_job_t * -job_create_noalloc(void) -{ - srun_job_t *job = NULL; - allocation_info_t *ai = xmalloc(sizeof(allocation_info_t)); - uint16_t cpn = 1; - hostlist_t hl = hostlist_create(opt.nodelist); - - if (!hl) { - error("Invalid node list `%s' specified", opt.nodelist); - goto error; - } - srand48(getpid()); - ai->jobid = MIN_NOALLOC_JOBID + - ((uint32_t) lrand48() % - (MAX_NOALLOC_JOBID - MIN_NOALLOC_JOBID + 1)); - ai->stepid = (uint32_t) (lrand48()); - ai->nodelist = opt.nodelist; - ai->nnodes = hostlist_count(hl); - - hostlist_destroy(hl); - - cpn = (opt.ntasks + ai->nnodes - 1) / ai->nnodes; - ai->cpus_per_node = &cpn; - ai->cpu_count_reps = &ai->nnodes; - - /* - * Create job, then fill in host addresses - */ - job = _job_create_structure(ai); - - job_update_io_fnames(job); - - error: - xfree(ai); - return (job); - -} - -/* - * Create an srun job structure for a step w/out an allocation response msg. - * (i.e. inside an allocation) - */ -srun_job_t * -job_step_create_allocation(resource_allocation_response_msg_t *resp) -{ - uint32_t job_id = resp->job_id; - srun_job_t *job = NULL; - allocation_info_t *ai = xmalloc(sizeof(allocation_info_t)); - hostlist_t hl = NULL; - char *buf = NULL; - int count = 0; - uint32_t alloc_count = 0; - char *step_nodelist = NULL; - - ai->jobid = job_id; - ai->stepid = NO_VAL; - ai->alias_list = resp->alias_list; - ai->nodelist = opt.alloc_nodelist; - hl = hostlist_create(ai->nodelist); - hostlist_uniq(hl); - alloc_count = hostlist_count(hl); - ai->nnodes = alloc_count; - hostlist_destroy(hl); - - if (opt.exc_nodes) { - hostlist_t exc_hl = hostlist_create(opt.exc_nodes); - hostlist_t inc_hl = NULL; - char *node_name = NULL; - - hl = hostlist_create(ai->nodelist); - if(opt.nodelist) { - inc_hl = hostlist_create(opt.nodelist); - } - hostlist_uniq(hl); - //info("using %s or %s", opt.nodelist, ai->nodelist); - while ((node_name = hostlist_shift(exc_hl))) { - int inx = hostlist_find(hl, node_name); - if (inx >= 0) { - debug("excluding node %s", node_name); - hostlist_delete_nth(hl, inx); - ai->nnodes--; /* decrement node count */ - } - if (inc_hl) { - inx = hostlist_find(inc_hl, node_name); - if (inx >= 0) { - error("Requested node %s is also " - "in the excluded list.", - node_name); - error("Job not submitted."); - hostlist_destroy(exc_hl); - hostlist_destroy(inc_hl); - goto error; - } - } - free(node_name); - } - hostlist_destroy(exc_hl); - - /* we need to set this here so if there are more nodes - * available than we requested we can set it - * straight. If there is no exclude list then we set - * the vars then. - */ - if (!opt.nodes_set) { - /* we don't want to set the number of nodes = - * to the number of requested processes unless we - * know it is less than the number of nodes - * in the allocation - */ - if(opt.ntasks_set && (opt.ntasks < ai->nnodes)) - opt.min_nodes = opt.ntasks; - else - opt.min_nodes = ai->nnodes; - opt.nodes_set = true; - } - if (!opt.max_nodes) - opt.max_nodes = opt.min_nodes; - if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) - ai->nnodes = opt.max_nodes; - - count = hostlist_count(hl); - if (!count) { - error("Hostlist is now nothing! Can't run job."); - hostlist_destroy(hl); - goto error; - } - if (inc_hl) { - count = hostlist_count(inc_hl); - if (count < ai->nnodes) { - /* add more nodes to get correct number for - allocation */ - hostlist_t tmp_hl = hostlist_copy(hl); - int i=0; - int diff = ai->nnodes - count; - buf = hostlist_ranged_string_xmalloc(inc_hl); - hostlist_delete(tmp_hl, buf); - xfree(buf); - while ((node_name = hostlist_shift(tmp_hl)) && - (i < diff)) { - hostlist_push(inc_hl, node_name); - i++; - } - hostlist_destroy(tmp_hl); - } - buf = hostlist_ranged_string_xmalloc(inc_hl); - hostlist_destroy(inc_hl); - xfree(opt.nodelist); - opt.nodelist = buf; - } else { - if (count > ai->nnodes) { - /* remove more nodes than needed for - * allocation */ - int i; - for (i = count; i >= ai->nnodes; i--) - hostlist_delete_nth(hl, i); - } - xfree(opt.nodelist); - opt.nodelist = hostlist_ranged_string_xmalloc(hl); - } - - hostlist_destroy(hl); - } else { - if (!opt.nodes_set) { - /* we don't want to set the number of nodes = - * to the number of requested processes unless we - * know it is less than the number of nodes - * in the allocation - */ - if (opt.ntasks_set && (opt.ntasks < ai->nnodes)) - opt.min_nodes = opt.ntasks; - else - opt.min_nodes = ai->nnodes; - opt.nodes_set = true; - } - if (!opt.max_nodes) - opt.max_nodes = opt.min_nodes; - if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) - ai->nnodes = opt.max_nodes; - /* Don't reset the ai->nodelist because that is the - * nodelist we want to say the allocation is under - * opt.nodelist is what is used for the allocation. - */ - /* xfree(ai->nodelist); */ - /* ai->nodelist = xstrdup(buf); */ - } - - /* get the correct number of hosts to run tasks on */ - if (opt.nodelist) - step_nodelist = opt.nodelist; - else if ((opt.distribution == SLURM_DIST_ARBITRARY) && (count == 0)) - step_nodelist = getenv("SLURM_ARBITRARY_NODELIST"); - if (step_nodelist) { - hl = hostlist_create(step_nodelist); - if (opt.distribution != SLURM_DIST_ARBITRARY) - hostlist_uniq(hl); - if (!hostlist_count(hl)) { - error("Hostlist is now nothing! Can not run job."); - hostlist_destroy(hl); - goto error; - } - - buf = hostlist_ranged_string_xmalloc(hl); - count = hostlist_count(hl); - hostlist_destroy(hl); - /* Don't reset the ai->nodelist because that is the - * nodelist we want to say the allocation is under - * opt.nodelist is what is used for the allocation. - */ - /* xfree(ai->nodelist); */ - /* ai->nodelist = xstrdup(buf); */ - xfree(opt.nodelist); - opt.nodelist = buf; - } - - if ((opt.distribution == SLURM_DIST_ARBITRARY) && - (count != opt.ntasks)) { - error("You asked for %d tasks but specified %d nodes", - opt.ntasks, count); - goto error; - } - - if (ai->nnodes == 0) { - error("No nodes in allocation, can't run job"); - goto error; - } - - ai->num_cpu_groups = resp->num_cpu_groups; - ai->cpus_per_node = resp->cpus_per_node; - ai->cpu_count_reps = resp->cpu_count_reps; - -/* info("looking for %d nodes out of %s with a must list of %s", */ -/* ai->nnodes, ai->nodelist, opt.nodelist); */ - /* - * Create job - */ - job = _job_create_structure(ai); -error: - xfree(ai); - return (job); - -} - -/* - * Create an srun job structure from a resource allocation response msg - */ -extern srun_job_t * -job_create_allocation(resource_allocation_response_msg_t *resp) -{ - srun_job_t *job; - allocation_info_t *i = xmalloc(sizeof(allocation_info_t)); - - i->alias_list = resp->alias_list; - i->nodelist = _normalize_hostlist(resp->node_list); - i->nnodes = resp->node_cnt; - i->jobid = resp->job_id; - i->stepid = NO_VAL; - i->num_cpu_groups = resp->num_cpu_groups; - i->cpus_per_node = resp->cpus_per_node; - i->cpu_count_reps = resp->cpu_count_reps; - i->select_jobinfo = select_g_select_jobinfo_copy(resp->select_jobinfo); - - job = _job_create_structure(i); - - xfree(i->nodelist); - xfree(i); - - return (job); -} - -void -update_job_state(srun_job_t *job, srun_job_state_t state) -{ - pthread_mutex_lock(&job->state_mutex); - if (job->state < state) { - job->state = state; - pthread_cond_signal(&job->state_cond); - - } - pthread_mutex_unlock(&job->state_mutex); - return; -} - -srun_job_state_t -job_state(srun_job_t *job) -{ - srun_job_state_t state; - slurm_mutex_lock(&job->state_mutex); - state = job->state; - slurm_mutex_unlock(&job->state_mutex); - return state; -} - - -void -job_force_termination(srun_job_t *job) -{ - static int kill_sent = 0; - static time_t last_msg = 0; - - if (kill_sent == 0) { - info("forcing job termination"); - /* Sends SIGKILL to tasks directly */ - update_job_state(job, SRUN_JOB_FORCETERM); - } else { - time_t now = time(NULL); - if (last_msg != now) { - info("job abort in progress"); - last_msg = now; - } - if (kill_sent == 1) { - /* Try sending SIGKILL through slurmctld */ - slurm_kill_job_step(job->jobid, job->stepid, SIGKILL); - } - } - kill_sent++; -} - -static inline int -_estimate_nports(int nclients, int cli_per_port) -{ - div_t d; - d = div(nclients, cli_per_port); - return d.rem > 0 ? d.quot + 1 : d.quot; -} - -static int -_compute_task_count(allocation_info_t *ainfo) -{ - int i, cnt = 0; -#if defined HAVE_BGQ -//#if defined HAVE_BGQ && HAVE_BG_FILES - /* always return the ntasks here for Q */ - info("returning %d", opt.ntasks); - return opt.ntasks; -#endif - if (opt.cpus_set) { - for (i = 0; i < ainfo->num_cpu_groups; i++) - cnt += ( ainfo->cpu_count_reps[i] * - (ainfo->cpus_per_node[i]/opt.cpus_per_task)); - } - return (cnt < ainfo->nnodes) ? ainfo->nnodes : cnt; -} - -static void -_set_ntasks(allocation_info_t *ai) -{ - if (!opt.ntasks_set) { - opt.ntasks = _compute_task_count(ai); - if (opt.cpus_set) - opt.ntasks_set = true; /* implicit */ - } -} - -/* - * Create an srun job structure from a resource allocation response msg - */ -static srun_job_t * -_job_create_structure(allocation_info_t *ainfo) -{ - srun_job_t *job = xmalloc(sizeof(srun_job_t)); - int i; - - _set_ntasks(ainfo); - debug2("creating job with %d tasks", opt.ntasks); - - slurm_mutex_init(&job->state_mutex); - pthread_cond_init(&job->state_cond, NULL); - job->state = SRUN_JOB_INIT; - - job->alias_list = xstrdup(ainfo->alias_list); - job->nodelist = xstrdup(ainfo->nodelist); - job->stepid = ainfo->stepid; - -#if defined HAVE_BGQ -//#if defined HAVE_BGQ && defined HAVE_BG_FILES - job->nhosts = ainfo->nnodes; - select_g_alter_node_cnt(SELECT_APPLY_NODE_MAX_OFFSET, &job->nhosts); -#elif defined HAVE_FRONT_END /* Limited job step support */ - opt.overcommit = true; - job->nhosts = 1; -#else - job->nhosts = ainfo->nnodes; -#endif - -#if !defined HAVE_FRONT_END || (defined HAVE_BGQ) -//#if !defined HAVE_FRONT_END || (defined HAVE_BGQ && defined HAVE_BG_FILES) - if(opt.min_nodes > job->nhosts) { - error("Only allocated %d nodes asked for %d", - job->nhosts, opt.min_nodes); - if (opt.exc_nodes) { - /* When resources are pre-allocated and some nodes - * are explicitly excluded, this error can occur. */ - error("Are required nodes explicitly excluded?"); - } - return NULL; - } - if ((ainfo->cpus_per_node == NULL) || - (ainfo->cpu_count_reps == NULL)) { - error("cpus_per_node array is not set"); - return NULL; - } -#endif - job->select_jobinfo = ainfo->select_jobinfo; - job->jobid = ainfo->jobid; - - job->ntasks = opt.ntasks; - for (i=0; inum_cpu_groups; i++) { - job->cpu_count += ainfo->cpus_per_node[i] * - ainfo->cpu_count_reps[i]; - } - - job->rc = -1; - - job_update_io_fnames(job); - - return (job); -} - -void -job_update_io_fnames(srun_job_t *job) -{ - job->ifname = fname_create(job, opt.ifname); - job->ofname = fname_create(job, opt.ofname); - job->efname = opt.efname ? fname_create(job, opt.efname) : job->ofname; -} - -static char * -_normalize_hostlist(const char *hostlist) -{ - char *buf = NULL; - hostlist_t hl = hostlist_create(hostlist); - - if (hl) { - buf = hostlist_ranged_string_xmalloc(hl); - hostlist_destroy(hl); - } - if (!buf) - return xstrdup(hostlist); - - return buf; -} - -- GitLab From 779a6e0610be42d5dd4933664d6b7b40fb3734ef Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 26 Jun 2012 17:07:16 -0700 Subject: [PATCH 501/614] Correction to logging of previous merge. It was recorded as a file add since the original was removed from master. Removed in next commit, This contains the equivalent changes to the new file --- src/srun/libsrun/srun_job.c | 38 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/src/srun/libsrun/srun_job.c b/src/srun/libsrun/srun_job.c index f186bad911..4a92e26580 100644 --- a/src/srun/libsrun/srun_job.c +++ b/src/srun/libsrun/srun_job.c @@ -186,6 +186,7 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) char *buf = NULL; int count = 0; uint32_t alloc_count = 0; + char *step_nodelist = NULL; ai->jobid = job_id; ai->stepid = NO_VAL; @@ -203,7 +204,7 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) char *node_name = NULL; hl = hostlist_create(ai->nodelist); - if(opt.nodelist) { + if (opt.nodelist) { inc_hl = hostlist_create(opt.nodelist); } hostlist_uniq(hl); @@ -242,26 +243,26 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) * know it is less than the number of nodes * in the allocation */ - if(opt.ntasks_set && (opt.ntasks < ai->nnodes)) + if (opt.ntasks_set && (opt.ntasks < ai->nnodes)) opt.min_nodes = opt.ntasks; else opt.min_nodes = ai->nnodes; opt.nodes_set = true; } - if(!opt.max_nodes) + if (!opt.max_nodes) opt.max_nodes = opt.min_nodes; - if((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) ai->nnodes = opt.max_nodes; count = hostlist_count(hl); - if(!count) { + if (!count) { error("Hostlist is now nothing! Can't run job."); hostlist_destroy(hl); goto error; } - if(inc_hl) { + if (inc_hl) { count = hostlist_count(inc_hl); - if(count < ai->nnodes) { + if (count < ai->nnodes) { /* add more nodes to get correct number for allocation */ hostlist_t tmp_hl = hostlist_copy(hl); @@ -307,9 +308,9 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) opt.min_nodes = ai->nnodes; opt.nodes_set = true; } - if(!opt.max_nodes) + if (!opt.max_nodes) opt.max_nodes = opt.min_nodes; - if((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) + if ((opt.max_nodes > 0) && (opt.max_nodes < ai->nnodes)) ai->nnodes = opt.max_nodes; /* Don't reset the ai->nodelist because that is the * nodelist we want to say the allocation is under @@ -320,8 +321,12 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) } /* get the correct number of hosts to run tasks on */ - if (opt.nodelist) { - hl = hostlist_create(opt.nodelist); + if (opt.nodelist) + step_nodelist = opt.nodelist; + else if ((opt.distribution == SLURM_DIST_ARBITRARY) && (count == 0)) + step_nodelist = getenv("SLURM_ARBITRARY_NODELIST"); + if (step_nodelist) { + hl = hostlist_create(step_nodelist); if (opt.distribution != SLURM_DIST_ARBITRARY) hostlist_uniq(hl); if (!hostlist_count(hl)) { @@ -343,12 +348,11 @@ job_step_create_allocation(resource_allocation_response_msg_t *resp) opt.nodelist = buf; } - if (opt.distribution == SLURM_DIST_ARBITRARY) { - if (count != opt.ntasks) { - error("You asked for %d tasks but specified %d nodes", - opt.ntasks, count); - goto error; - } + if ((opt.distribution == SLURM_DIST_ARBITRARY) && + (count != opt.ntasks)) { + error("You asked for %d tasks but specified %d nodes", + opt.ntasks, count); + goto error; } if (ai->nnodes == 0) { -- GitLab From 24e9ee76bc836c670034a25e27d8077fe494c466 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 27 Jun 2012 07:30:58 -0700 Subject: [PATCH 502/614] Note how --distribution=arbitrary does not control task layout at job level --- doc/man/man1/salloc.1 | 7 ++++++- doc/man/man1/sbatch.1 | 7 ++++++- doc/man/man1/srun.1 | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 0beb4402fd..9a72020a66 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -567,8 +567,13 @@ Inside the hostfile must contain at minimum the number of hosts requested and be one per line or comma separated. If specifying a task count (\fB\-n\fR, \fB\-\-ntasks\fR=<\fInumber\fR>), your tasks will be laid out on the nodes in the order of the file. -.TP +.br +\fBNOTE:\fR The arbitrary distribution option on a job allocation only +controls the nodes to be allocated to the job and not the allocation of +CPUs on those nodes. This option is meant primarily to control a job step's +task layout in an existing job allocation for the srun command. +.TP Second distribution method: .TP .B block diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index c5fcafbb5f..28c3f54474 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -631,8 +631,13 @@ Inside the hostfile must contain at minimum the number of hosts requested and be one per line or comma separated. If specifying a task count (\fB\-n\fR, \fB\-\-ntasks\fR=<\fInumber\fR>), your tasks will be laid out on the nodes in the order of the file. -.TP +.br +\fBNOTE:\fR The arbitrary distribution option on a job allocation only +controls the nodes to be allocated to the job and not the allocation of +CPUs on those nodes. This option is meant primarily to control a job step's +task layout in an existing job allocation for the srun command. +.TP Second distribution method: .TP .B block diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 85b8bfab46..a69fbbd2ad 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -625,8 +625,13 @@ Inside the hostfile must contain at minimum the number of hosts requested and be one per line or comma separated. If specifying a task count (\fB\-n\fR, \fB\-\-ntasks\fR=<\fInumber\fR>), your tasks will be laid out on the nodes in the order of the file. -.TP +.br +\fBNOTE:\fR The arbitrary distribution option on a job allocation only +controls the nodes to be allocated to the job and not the allocation of +CPUs on those nodes. This option is meant primarily to control a job step's +task layout in an existing job allocation for the srun command. +.TP Second distribution method: .TP .B block -- GitLab From a5431885e841f0a933f1e47653c2cf7e4e820f10 Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Wed, 27 Jun 2012 08:15:01 -0700 Subject: [PATCH 503/614] Fix for setting reason field for user/system hold --- src/slurmctld/job_mgr.c | 2 -- src/slurmctld/node_scheduler.c | 15 ++++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 363f93b72c..2cbe0c1337 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -3822,8 +3822,6 @@ extern int job_limits_check(struct job_record **job_pptr) job_ptr->job_id); fail_reason = WAIT_QOS_THRES; } - } else if (job_ptr->priority == 0) { /* user or administrator hold */ - fail_reason = WAIT_HELD; } return (fail_reason); diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 5a49059d15..24379126e1 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -1241,18 +1241,19 @@ extern int select_nodes(struct job_record *job_ptr, bool test_only, job_ptr->job_id, job_ptr->partition); } + if (job_ptr->priority == 0) { /* user/admin hold */ + if ((job_ptr->state_reason != WAIT_HELD) && + (job_ptr->state_reason != WAIT_HELD_USER)) { + job_ptr->state_reason = WAIT_HELD; + } + return ESLURM_JOB_HELD; + } + /* Confirm that partition is up and has compatible nodes limits */ fail_reason = job_limits_check(&job_ptr); if (fail_reason != WAIT_NO_REASON) { last_job_update = now; xfree(job_ptr->state_desc); - if (job_ptr->priority == 0) { /* user/admin hold */ - if ((job_ptr->state_reason != WAIT_HELD) && - (job_ptr->state_reason != WAIT_HELD_USER)) { - job_ptr->state_reason = WAIT_HELD; - } - return ESLURM_JOB_HELD; - } job_ptr->state_reason = fail_reason; return ESLURM_REQUESTED_PART_CONFIG_UNAVAILABLE; } -- GitLab From 479e422b3cfc4e2785b0a36657ada7390eb9ac5f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 27 Jun 2012 08:49:23 -0700 Subject: [PATCH 504/614] Minor tweaks to regression tests --- testsuite/expect/test1.95.prog.upc | 2 ++ testsuite/expect/test9.9 | 12 +++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/testsuite/expect/test1.95.prog.upc b/testsuite/expect/test1.95.prog.upc index d127ae2882..49f1ec8213 100644 --- a/testsuite/expect/test1.95.prog.upc +++ b/testsuite/expect/test1.95.prog.upc @@ -37,6 +37,8 @@ int main(int argc, char * argv[]) int i, total = 0; for (i = 0; i < THREADS; i++) total += inx[i]; + /* Make sure "Total" message is last for Expect parsing*/ + sleep(1); printf("Total is %d\n", total); } return 0; diff --git a/testsuite/expect/test9.9 b/testsuite/expect/test9.9 index 687e922350..bbd2d30f69 100755 --- a/testsuite/expect/test9.9 +++ b/testsuite/expect/test9.9 @@ -37,18 +37,24 @@ set test_script "./test$test_id.bash" set job_blocks 5000 # job_cnt Number of batch jobs to be submitted -set job_cnt 5000 +set job_cnt 1000 print_header $test_id -if {[test_front_end] != 0 || $enable_memory_leak_debug != 0} { +if {[test_front_end] || $enable_memory_leak_debug != 0} { set job_cnt 2 +} elseif {[test_serial]} { + set job_cnt 5000 } +# # NOTE: test9.9.bash seems to have trouble running out of process IDs when -# more than about 5000 jobs are submitted at one time, so we execute the +# more than about 5000 jobs are submitted at one time, so we can execute the # script multiple times if necessary. A more reliable alternative would be # to catch the fork() failures and retry. +# +# NOTE: The throughput rate is highly dependent upon configuration +# proc _submit_jobs { job_name test_file } { global exit_code job_blocks job_cnt sbatch test_script -- GitLab From 4f869dd54bd214f3192f8aaf3e38023670884e54 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 27 Jun 2012 14:23:20 -0700 Subject: [PATCH 505/614] NRT - simplify code --- src/plugins/switch/nrt/libpermapi/shr_64.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 426262c52c..1cc259d5b3 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -117,8 +117,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { - srun_job_t **job_ptr = (srun_job_t **)resource_mgr; - srun_job_t *job = *job_ptr; + srun_job_t *job = *(srun_job_t **)resource_mgr; int my_argc = 1; char *my_argv[2] = { connect_param->executable, NULL }; // char *my_argv[2] = { "/bin/hostname", NULL }; @@ -126,6 +125,10 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, uint32_t global_rc = 0; int i, rc, fd_cnt; int *ctx_sockfds = NULL; + /* If the PMD calls this and it didn't launch anything we need + * to not do anything here or PMD will crap out on it. */ + if (!job) + return -1; debug("got pe_rm_connect called"); @@ -184,15 +187,10 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, extern void pe_rm_free(rmhandle_t *resource_mgr) { uint32_t rc = 0; - srun_job_t **job_ptr; - srun_job_t *job; + srun_job_t *job = *(srun_job_t **)resource_mgr; /* If the PMD calls this and it didn't launch anything we need * to not do anything here or PMD will crap out on it. */ - if (!resource_mgr || !*resource_mgr) - return; - job_ptr = (srun_job_t **)*resource_mgr; - job = *job_ptr; if (!job) return; @@ -289,6 +287,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, { job_event_t *ret_event = NULL; int *state; + debug("got pe_rm_get_event called %d %p %p", rm_timeout, job_event, *job_event); -- GitLab From 5173c388ccee0866dfb73fecb9f12686dacfe213 Mon Sep 17 00:00:00 2001 From: Janne Blomqvist Date: Thu, 28 Jun 2012 08:44:53 -0700 Subject: [PATCH 506/614] Fix typos intialize->initialize from Janne Blomqvist janne.blomqvist@aalto.fi --- slurm/slurm.h.in | 4 ++-- src/api/allocate_msg.c | 2 +- src/api/step_ctx.c | 6 +++--- src/api/step_launch.c | 4 ++-- src/common/eio.c | 2 +- src/common/eio.h | 2 +- src/common/slurm_cred.h | 2 +- src/common/slurm_protocol_defs.c | 2 +- src/common/slurm_protocol_defs.h | 2 +- src/sattach/sattach.c | 2 +- src/sbatch/sbatch.c | 2 +- src/slurmd/slurmstepd/io.c | 2 +- src/slurmd/slurmstepd/pam_ses.c | 2 +- 13 files changed, 17 insertions(+), 17 deletions(-) diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 3df3d08d27..39280aeee1 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -2371,7 +2371,7 @@ extern int slurm_terminate_job_step PARAMS((uint32_t job_id, uint32_t step_id)); * in the structure that you will pass to slurm_step_ctx_create(). * This function will NOT allocate any new memory. * IN ptr - pointer to a structure allocated by the user. The structure will - * be intialized. + * be initialized. */ extern void slurm_step_ctx_params_t_init PARAMS((slurm_step_ctx_params_t *ptr)); @@ -2440,7 +2440,7 @@ extern int slurm_step_ctx_destroy PARAMS((slurm_step_ctx_t *ctx)); * slurm_step_launch_params_t structure with default values. * default values. This function will NOT allocate any new memory. * IN ptr - pointer to a structure allocated by the use. The structure will - * be intialized. + * be initialized. */ extern void slurm_step_launch_params_t_init PARAMS((slurm_step_launch_params_t *ptr)); diff --git a/src/api/allocate_msg.c b/src/api/allocate_msg.c index a4342b3079..f01b3bb38e 100644 --- a/src/api/allocate_msg.c +++ b/src/api/allocate_msg.c @@ -122,7 +122,7 @@ extern allocation_msg_thread_t *slurm_allocation_msg_thr_create( } if (net_stream_listen(&sock, (short *)port) < 0) { - error("unable to intialize step launch listening socket: %m"); + error("unable to initialize step launch listening socket: %m"); xfree(msg_thr); return NULL; } diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index 0775543190..6b73b70e89 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -156,7 +156,7 @@ slurm_step_ctx_create (const slurm_step_ctx_params_t *step_params) */ if (net_stream_listen(&sock, &port) < 0) { errnum = errno; - error("unable to intialize step context socket: %m"); + error("unable to initialize step context socket: %m"); slurm_free_job_step_create_request_msg(step_req); goto fail; } @@ -216,7 +216,7 @@ slurm_step_ctx_create_no_alloc (const slurm_step_ctx_params_t *step_params, */ if (net_stream_listen(&sock, &port) < 0) { errnum = errno; - error("unable to intialize step context socket: %m"); + error("unable to initialize step context socket: %m"); slurm_free_job_step_create_request_msg(step_req); goto fail; } @@ -464,7 +464,7 @@ slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx) * in the structure that you will pass to slurm_step_ctx_create(). * This function will NOT allocate any new memory. * IN ptr - pointer to a structure allocated by the user. The structure will - * be intialized. + * be initialized. */ extern void slurm_step_ctx_params_t_init (slurm_step_ctx_params_t *ptr) { diff --git a/src/api/step_launch.c b/src/api/step_launch.c index 0171d962ed..5a1d929b94 100644 --- a/src/api/step_launch.c +++ b/src/api/step_launch.c @@ -125,7 +125,7 @@ static struct io_operations message_socket_ops = { * slurm_step_launch_params_t structure with default values. * This function will NOT allocate any new memory. * IN ptr - pointer to a structure allocated by the user. - * The structure will be intialized. + * The structure will be initialized. */ void slurm_step_launch_params_t_init (slurm_step_launch_params_t *ptr) { @@ -834,7 +834,7 @@ static int _msg_thr_create(struct step_launch_state *sls, int num_nodes) for (i = 0; i < sls->num_resp_port; i++) { if (net_stream_listen(&sock, &port) < 0) { - error("unable to intialize step launch listening " + error("unable to initialize step launch listening " "socket: %m"); return SLURM_ERROR; } diff --git a/src/common/eio.c b/src/common/eio.c index 2c733a9b18..481e7a1c64 100644 --- a/src/common/eio.c +++ b/src/common/eio.c @@ -481,7 +481,7 @@ void eio_obj_destroy(void *arg) /* * Add an eio_obj_t "obj" to an eio_handle_t "eio"'s internal object list. * - * This function can only be used to intialize "eio"'s list before + * This function can only be used to initialize "eio"'s list before * calling eio_handle_mainloop. If it is used after the eio engine's * mainloop has started, segfaults are likely. */ diff --git a/src/common/eio.h b/src/common/eio.h index 12bdbe9616..afee1fdc52 100644 --- a/src/common/eio.h +++ b/src/common/eio.h @@ -75,7 +75,7 @@ void eio_handle_destroy(eio_handle_t *eio); /* * Add an eio_obj_t "obj" to an eio_handle_t "eio"'s internal object list. * - * This function can only be used to intialize "eio"'s list before + * This function can only be used to initialize "eio"'s list before * calling eio_handle_mainloop. If it is used after the eio engine's * mainloop has started, segfaults are likely. */ diff --git a/src/common/slurm_cred.h b/src/common/slurm_cred.h index e3469d923d..f77caaa46b 100644 --- a/src/common/slurm_cred.h +++ b/src/common/slurm_cred.h @@ -129,7 +129,7 @@ void slurm_cred_ctx_destroy(slurm_cred_ctx_t ctx); * * On pack() ctx is packed in machine-independent format into the * buffer, on unpack() the contents of the buffer are used to - * intialize the state of the context ctx. + * initialize the state of the context ctx. */ int slurm_cred_ctx_pack(slurm_cred_ctx_t ctx, Buf buffer); int slurm_cred_ctx_unpack(slurm_cred_ctx_t ctx, Buf buffer); diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 2785453096..6deddb9466 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -117,7 +117,7 @@ extern void slurm_msg_t_init(slurm_msg_t *msg) * values from the "src" slurm_msg_t structure. * IN src - Pointer to the initialized message from which "dest" will * be initialized. - * OUT dest - Pointer to the slurm_msg_t which will be intialized. + * OUT dest - Pointer to the slurm_msg_t which will be initialized. * NOTE: the "dest" structure will contain pointers into the contents of "src". */ extern void slurm_msg_t_copy(slurm_msg_t *dest, slurm_msg_t *src) diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 15a7a92734..4e3efbd664 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -973,7 +973,7 @@ extern void slurm_msg_t_init (slurm_msg_t *msg); * values from the "src" slurm_msg_t structure. * IN src - Pointer to the initialized message from which "dest" will * be initialized. - * OUT dest - Pointer to the slurm_msg_t which will be intialized. + * OUT dest - Pointer to the slurm_msg_t which will be initialized. * NOTE: the "dest" structure will contain pointers into the contents of "src". */ extern void slurm_msg_t_copy(slurm_msg_t *dest, slurm_msg_t *src); diff --git a/src/sattach/sattach.c b/src/sattach/sattach.c index 697f424af1..3a8b45ebd6 100644 --- a/src/sattach/sattach.c +++ b/src/sattach/sattach.c @@ -456,7 +456,7 @@ static message_thread_state_t *_msg_thr_create(int num_nodes, int num_tasks) mts->resp_port = xmalloc(sizeof(uint16_t) * mts->num_resp_port); for (i = 0; i < mts->num_resp_port; i++) { if (net_stream_listen(&sock, &port) < 0) { - error("unable to intialize step launch" + error("unable to initialize step launch" " listening socket: %m"); goto fail; } diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index 964d5e4273..841fcc8f5e 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -93,7 +93,7 @@ int main(int argc, char *argv[]) _set_exit_code(); if (spank_init_allocator() < 0) { - error("Failed to intialize plugin stack"); + error("Failed to initialize plugin stack"); exit(error_exit); } diff --git a/src/slurmd/slurmstepd/io.c b/src/slurmd/slurmstepd/io.c index 8942700616..622fb40de6 100644 --- a/src/slurmd/slurmstepd/io.c +++ b/src/slurmd/slurmstepd/io.c @@ -276,7 +276,7 @@ _client_writable(eio_obj_t *obj) } /* If this is a newly attached client its msg_queue needs - * to be intialized from the outgoing_cache, and then "obj" needs + * to be initialized from the outgoing_cache, and then "obj" needs * to be added to the List of clients. */ if (client->msg_queue == NULL) { diff --git a/src/slurmd/slurmstepd/pam_ses.c b/src/slurmd/slurmstepd/pam_ses.c index 57d4f43fef..93afa8f8c5 100644 --- a/src/slurmd/slurmstepd/pam_ses.c +++ b/src/slurmd/slurmstepd/pam_ses.c @@ -90,7 +90,7 @@ pam_setup (char *user, char *host) * handling resource limits. When a PAM session is opened on behalf of * a user, the limits imposed by the sys admin are picked up. Opening * a PAM session requires a PAM handle, which is obtained when the PAM - * interface is intialized. (PAM handles are required with essentially + * interface is initialized. (PAM handles are required with essentially * all PAM calls.) It's also necessary to have the users PAM credentials * to open a user session. */ -- GitLab From 4128047b4164dfa4c4bb51f7876bba168741c7a7 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 11:03:34 -0700 Subject: [PATCH 507/614] add log function for libpermapi when loaded from PMD --- src/plugins/switch/nrt/libpermapi/shr_64.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 1cc259d5b3..6e7a0f7cb5 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -76,6 +76,14 @@ int sig_array[] = { SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 }; extern char **environ; +extern int pmdlog; +extern FILE *pmd_lfp; +#define PMD_LOG(fmt, args...) \ + if (pmdlog) { \ + const char *f_name = strrchr(__FILE__, '/'); \ + fprintf(pmd_lfp, "[%d@%s]: " fmt , __LINE__, f_name!=NULL?(f_name+1):__FILE__, ##args); \ + fflush(pmd_lfp); \ + } static nrt_job_key_t _get_nrt_job_key(srun_job_t *job) { -- GitLab From 7605909d13e3354a34d6765868f418dbbd4bb99e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 11:04:10 -0700 Subject: [PATCH 508/614] Better checking to make sure structure elements exist --- src/common/slurm_step_layout.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/slurm_step_layout.c b/src/common/slurm_step_layout.c index 8d47506c0b..ef6ab37df9 100644 --- a/src/common/slurm_step_layout.c +++ b/src/common/slurm_step_layout.c @@ -388,7 +388,7 @@ extern int slurm_step_layout_destroy(slurm_step_layout_t *step_layout) int slurm_step_layout_host_id (slurm_step_layout_t *s, int taskid) { int i, j; - if (taskid > s->task_cnt - 1) + if (!s->tasks || !s->tids || (taskid > s->task_cnt - 1)) return SLURM_ERROR; for (i=0; i < s->node_cnt; i++) for (j=0; jtasks[i]; j++) -- GitLab From ee8f2e3ef10a3dd518a5b86c3704d438006811c8 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 11:41:11 -0700 Subject: [PATCH 509/614] NRT - change linking mode to include DEEPBIND like we did with Bluegene/Q --- src/plugins/switch/nrt/libpermapi/shr_64.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 6e7a0f7cb5..f40d5280e2 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -476,11 +476,12 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, *rmapi_version = 1300; *resource_mgr = (void *)&job; #ifdef MYSELF_SO - /* Since POE opens this lib without RTLD_LAZY | RTLD_GLOBAL we - just open ourself again with those options and bada bing + /* Since POE opens this lib without + RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND + we just open ourself again with those options and bada bing bada boom we are good to go with the symbols we need. */ - my_handle = dlopen(MYSELF_SO, RTLD_LAZY | RTLD_GLOBAL); + my_handle = dlopen(MYSELF_SO, RTLD_LAZY | RTLD_GLOBAL | RTLD_DEEPBIND); if (!my_handle) { debug("%s", dlerror()); return 1; -- GitLab From 8773318ce121241802106ffdf4a81d649b406085 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 11:42:26 -0700 Subject: [PATCH 510/614] NRT - remove references to using the resource_mgr and use global "job" --- src/plugins/switch/nrt/libpermapi/shr_64.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index f40d5280e2..3885ce9b86 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -125,7 +125,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, rm_connect_param *connect_param, int *rm_sockfds, int rm_timeout, char **error_msg) { - srun_job_t *job = *(srun_job_t **)resource_mgr; +// srun_job_t *job = *(srun_job_t **)resource_mgr; int my_argc = 1; char *my_argv[2] = { connect_param->executable, NULL }; // char *my_argv[2] = { "/bin/hostname", NULL }; @@ -195,7 +195,7 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, extern void pe_rm_free(rmhandle_t *resource_mgr) { uint32_t rc = 0; - srun_job_t *job = *(srun_job_t **)resource_mgr; + //srun_job_t *job = *(srun_job_t **)*resource_mgr; /* If the PMD calls this and it didn't launch anything we need * to not do anything here or PMD will crap out on it. */ -- GitLab From d26d1fe0084541215db266c36042f136d20d5fae Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 11:46:36 -0700 Subject: [PATCH 511/614] update debugging for when libpermapi is loaded by PMD --- src/plugins/switch/nrt/libpermapi/shr_64.c | 25 ++++++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index 3885ce9b86..b73c3cf202 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -133,11 +133,15 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, uint32_t global_rc = 0; int i, rc, fd_cnt; int *ctx_sockfds = NULL; - /* If the PMD calls this and it didn't launch anything we need - * to not do anything here or PMD will crap out on it. */ - if (!job) - return -1; + if (!job) { + /* If the PMD calls this and it didn't launch anything we need + * to not do anything here or PMD will crap out on it. */ + PMD_LOG("got pe_rm_connect called from PMD, " + "we don't handle this yet\n"); + return -1; + } + PMD_LOG("got pe_rm_connect called\n"); debug("got pe_rm_connect called"); opt.argc = my_argc; @@ -199,10 +203,12 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) /* If the PMD calls this and it didn't launch anything we need * to not do anything here or PMD will crap out on it. */ - if (!job) + if (!job) { + PMD_LOG("pe_rm_free: No job\n"); return; - + } /* OK we are now really running something */ + PMD_LOG("got pe_rm_free called\n"); debug("got pe_rm_free called %p %p", job, job->step_ctx); if (launch_g_step_wait(job, got_alloc) != -1) { /* We are at the end so don't worry about freeing the @@ -225,6 +231,7 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { + PMD_LOG("pe_rm_free_event called\n"); debug("got pe_rm_free_event called"); if (job_event) { xfree(*job_event); @@ -295,7 +302,7 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, { job_event_t *ret_event = NULL; int *state; - + PMD_LOG("got pe_rm_get_event called\n"); debug("got pe_rm_get_event called %d %p %p", rm_timeout, job_event, *job_event); @@ -348,6 +355,7 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char *host; host_usage_t *host_ptr; + PMD_LOG("got pe_rm_get_job_info called\n"); debug("got pe_rm_get_job_info called %p %p", job_info, *job_info); *job_info = ret_info; @@ -470,6 +478,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, { char *srun_debug = NULL; + PMD_LOG("pe_rm_init called %p %d\n", pmd_lfp, pmdlog); /* SLURM was originally written against 1300, so we will * return that, no matter what comes in so we always work. */ @@ -534,6 +543,7 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { + PMD_LOG("got pe_rm_send_event called\n"); debug("got pe_rm_send_event called"); return 0; } @@ -561,6 +571,7 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, if (getenv("SLURM_STARTED_STEP")) slurm_started = true; + PMD_LOG("got pe_rm_submit_job called\n"); debug("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { /* We don't handle files */ -- GitLab From b601f02c2c5509789a085bf6f9579a07d44e09a4 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Thu, 28 Jun 2012 11:53:54 -0700 Subject: [PATCH 512/614] Launch plugin programmer guide added. --- doc/html/Makefile.am | 1 + doc/html/Makefile.in | 1 + doc/html/documentation.shtml | 1 + doc/html/launch_plugins.shtml | 150 ++++++++++++++++++++++++++++++++++ 4 files changed, 153 insertions(+) create mode 100644 doc/html/launch_plugins.shtml diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index 0e9f9bcaa1..9ed962a470 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -34,6 +34,7 @@ generated_html = \ job_launch.html \ job_submit_plugins.html \ jobcompplugins.html \ + launch_plugins.html \ mail.html \ man_index.html \ maui.html \ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index ae39f7bf75..88c70c1d21 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -349,6 +349,7 @@ generated_html = \ job_launch.html \ job_submit_plugins.html \ jobcompplugins.html \ + launch_plugins.html \ mail.html \ man_index.html \ maui.html \ diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml index 116333dfcd..9b4a390200 100644 --- a/doc/html/documentation.shtml +++ b/doc/html/documentation.shtml @@ -84,6 +84,7 @@ Also see Publications and Presentations.
        • Job Checkpoint Plugin Programmer Guide
        • Job Completion Logging Plugin Programmer Guide
        • Job Submission Plugin Programmer Guide
        • +
        • Launch Plugin Programmer Guide
        • MPI Plugin Programmer Guide
        • Preemption Plugin Programmer Guide
        • Priority Plugin Programmer Guide
        • diff --git a/doc/html/launch_plugins.shtml b/doc/html/launch_plugins.shtml new file mode 100644 index 0000000000..5141eeca78 --- /dev/null +++ b/doc/html/launch_plugins.shtml @@ -0,0 +1,150 @@ + + +

          SLURM Launch Plugin API

          + +

          Overview

          +

          This document describes SLURM launch plugins and the API that +defines them. It is intended as a resource to programmers wishing to write +their own SLURM launch plugins. + + +

          const char +plugin_name[]="launch SLURM plugin" +

          + +

          const char +plugin_type[]="launch/slurm"
          +

          + +

        • poe TBD +
        • runjob TBD +
        • slurm TBD
          +

          The programmer is urged to study +src/plugins/launch/slurm/launch_slurm.c +for a sample implementation of a SLURM launch plugin. +

          API Functions

          + +

          launch_common_get_slurm_step_layout(srun_job_t *job) +

          Description:
          +Gets the slurm job step layout. +

          Arguments:
          + job: the job step to get. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          launch_common_create_job_step(srun_job_t *job, + bool use_all_cpus, void (*signal_function)(int), sig_atomic_t + *destroy_job) +

          Description:
          +creates the job step with the given info. +

          Arguments:
          + job: job to be created into a job +step. + use_all_cpus: the choice to use all +the cpus. + signal_function: function that +handles the signals coming in. + destroy_job: pointer to a global +flag signifying id the job was canceled while allocating. +

          Returns:
          +SLURM_SUCCESS on success, or
          +SLURM_ERROR on failure. + +

          launch_common_set_stdio_fds(srun_job_t + *job,slurm_step_io_fds_t *cio_fds) +

          Description:
          +sets the stdio_fds to the given info. +

          Arguments:
          + job: the job that is set. + cio_fds: filling in the io descriptor. + +

          int init(void) +

          Description:
          + Called when the plugin is loaded, before any other functions are + called. Put global initialization here. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          int fini(void) +

          Description:
          + Called when the plugin is removed. Clear any allocated storage here. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          int launch_p_setup_srun_opt(char **rest) +

          Description:
          + Sets up the srun operation. +

          Arguments:
          + rest: Handles all the signals +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          int launch_p_create_job_step(srun_job_t *job, + bool use_all_cpus, void (*signal_function)(int), sig_atomic_t + *destroy_job) +

          Description:
          + Creates the job step. +

          Arguments:
          + job: the job to run.
          + use_all_cpus: choice whether to use + all cpus.
          + signal_function: function that + handles the signals coming in.
          + destroy_job: pointer to a global + flag signifying if the job was canceled while allocating. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          launch_p_step_launch(srun_job_t *job, + slurm_step_io_fds_t *cio_fds, uint32_t *global_rc) +

          Description:
          + Launches the job step. +

          Arguments:
          + job: the job to launch.
          + cio_fds: filled in io descriptors
          + global_rc: srun global return code. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          int launch_p_step_wait(srun_job_t *job, bool + got_alloc) +

          Description:
          + Waits for the job to be finished. +

          Arguments:
          + job: the job to wait for.
          + got_alloc: if the resource + allocation was created inside srun. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          int launch_p_step_terminate(void) +

          Description:
          + Terminates the job step. +

          Returns:
          + SLURM_SUCCESS on success, or
          + SLURM_ERROR on failure. + +

          void launch_p_print_status(void) +

          Description:
          + Gets the status of the job. + +

          void launch_p_fwd_signal(int signal) +

          Description:
          + Sends a forward signal to any underlyning tasks. +

          Arguments:
          + signal: the signal that needs to be sent. + +

          Last modified 22 June 2012

          + + -- GitLab From b2ed30d593f1ca98cce2565f18e7fda8783bbbe9 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 12:06:02 -0700 Subject: [PATCH 513/614] minor modifications to the launch plugin webpage --- doc/html/launch_plugins.shtml | 60 ++++++++--------------------------- 1 file changed, 14 insertions(+), 46 deletions(-) diff --git a/doc/html/launch_plugins.shtml b/doc/html/launch_plugins.shtml index 5141eeca78..c0bd944319 100644 --- a/doc/html/launch_plugins.shtml +++ b/doc/html/launch_plugins.shtml @@ -1,12 +1,12 @@ -

          SLURM Launch Plugin API

          +

          Launch Plugin API

          Overview

          -

          This document describes SLURM launch plugins and the API that -defines them. It is intended as a resource to programmers wishing to write -their own SLURM launch plugins. - +

          This document describes the launch plugin that is responsible for + launching a parallel task in SLURM and the API that defines them. It + is intended as a resource to programmers wishing to write their own + launch plugin.

          const char plugin_name[]="launch SLURM plugin" @@ -16,9 +16,11 @@ plugin_name[]="launch SLURM plugin" plugin_type[]="launch/slurm"

          -

        • poe TBD -
        • runjob TBD -
        • slurm TBD
          +
        • poe—Use IBM's poe to launch tasks - used with IBM's PE + typically when using an IBM proprietary interconnect. +
        • runjob—Use IBM's runjob to launch tasks - used on + BlueGene/Q machines. +
        • slurm—Use SLURM's default launching infrastructure

          The programmer is urged to study src/plugins/launch/slurm/launch_slurm.c for a sample implementation of a SLURM launch plugin. @@ -26,41 +28,6 @@ for a sample implementation of a SLURM launch plugin.

          API Functions

          -

          launch_common_get_slurm_step_layout(srun_job_t *job) -

          Description:
          -Gets the slurm job step layout. -

          Arguments:
          - job: the job step to get. -

          Returns:
          -SLURM_SUCCESS on success, or
          -SLURM_ERROR on failure. - -

          launch_common_create_job_step(srun_job_t *job, - bool use_all_cpus, void (*signal_function)(int), sig_atomic_t - *destroy_job) -

          Description:
          -creates the job step with the given info. -

          Arguments:
          - job: job to be created into a job -step. - use_all_cpus: the choice to use all -the cpus. - signal_function: function that -handles the signals coming in. - destroy_job: pointer to a global -flag signifying id the job was canceled while allocating. -

          Returns:
          -SLURM_SUCCESS on success, or
          -SLURM_ERROR on failure. - -

          launch_common_set_stdio_fds(srun_job_t - *job,slurm_step_io_fds_t *cio_fds) -

          Description:
          -sets the stdio_fds to the given info. -

          Arguments:
          - job: the job that is set. - cio_fds: filling in the io descriptor. -

          int init(void)

          Description:
          Called when the plugin is loaded, before any other functions are @@ -80,7 +47,8 @@ sets the stdio_fds to the given info.

          Description:
          Sets up the srun operation.

          Arguments:
          - rest: Handles all the signals + rest: extra parameters on the + command line not processed by srun

          Returns:
          SLURM_SUCCESS on success, or
          SLURM_ERROR on failure. @@ -139,12 +107,12 @@ sets the stdio_fds to the given info.

          void launch_p_fwd_signal(int signal)

          Description:
          - Sends a forward signal to any underlyning tasks. + Sends a forward signal to any underlying tasks.

          Arguments:
          signal: the signal that needs to be sent.

          Last modified 22 June 2012

          +

          Last modified 28 June 2012

          -- GitLab From 94ea2e84af84b90598b458f4832b0ab260533009 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 14:17:17 -0700 Subject: [PATCH 514/614] Changes for 2.4 tag --- META | 2 +- NEWS | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/META b/META index e240bd96c1..dbf5fba790 100644 --- a/META +++ b/META @@ -11,7 +11,7 @@ Minor: 4 Micro: 0 Version: 2.4.0 - Release: 0.rc1 + Release: 1 ## # When changing API_CURRENT update src/common/slurm_protocol_common.h diff --git a/NEWS b/NEWS index b54f7feb14..01c22b60a5 100644 --- a/NEWS +++ b/NEWS @@ -1,8 +1,8 @@ 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.4.0.rc2 -============================= +* Changes in SLURM 2.4.0 +======================== -- Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. -- BGQ - make it so srun -i works correctly. -- GitLab From a926616111837def91f92e552570cfdf63214fed Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 14:17:17 -0700 Subject: [PATCH 515/614] Changes for 2.4 tag --- NEWS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 34c5e782dc..4832115c3d 100644 --- a/NEWS +++ b/NEWS @@ -15,8 +15,8 @@ documents those changes that are of interest to users and admins. -- Restructure of srun code to allow outside programs to utilize existing logic. -* Changes in SLURM 2.4.0.rc2 -============================= +* Changes in SLURM 2.4.0 +======================== -- Cray - Improve support for zero compute note resource allocations. Partition used can now be configured with no nodes nodes. -- BGQ - make it so srun -i works correctly. -- GitLab From 176e9950fd91c70e31ffa47c1e46dfbfcd641cb6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 28 Jun 2012 14:42:09 -0700 Subject: [PATCH 516/614] Fix to make perlapi work with new hack function --- contribs/perlapi/libslurm/perl/Slurm.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contribs/perlapi/libslurm/perl/Slurm.xs b/contribs/perlapi/libslurm/perl/Slurm.xs index 652860dcf3..1cb6e5e121 100644 --- a/contribs/perlapi/libslurm/perl/Slurm.xs +++ b/contribs/perlapi/libslurm/perl/Slurm.xs @@ -785,7 +785,7 @@ slurm_step_ctx_get(slurm_step_ctx_t *ctx, int ctx_key, INOUT ...) #slurm_job_info_ctx_get(switch_jobinfo_t *jobinfo, int data_type, void *data) int -slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx) +slurm_step_ctx_daemon_per_node_hack(slurm_step_ctx_t *ctx, char **addr_array, uint32_t node_cnt) void slurm_step_ctx_DESTROY(slurm_step_ctx_t *ctx) -- GitLab From 05bc48d8b22d2de200a84653073a7c3155ecb0da Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 28 Jun 2012 15:47:08 -0700 Subject: [PATCH 517/614] Permit multiple Port specifications on one node config line of slurm.conf When running with multiple slurmd daemons per node, enable specifying a range of ports on a single line of the node configuration in slurm.conf. For example: NodeName=tux[0-999] NodeAddr=localhost Port=9000-9999 ... --- NEWS | 5 +++ doc/man/man5/slurm.conf.5 | 3 +- src/common/node_conf.c | 81 +++++++++++++++++++++++++++-------- src/common/read_config.c | 89 ++++++++++++++++++++++++++++++--------- src/common/read_config.h | 2 +- 5 files changed, 142 insertions(+), 38 deletions(-) diff --git a/NEWS b/NEWS index 4832115c3d..433780e49e 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ 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.5.0.pre2 +============================= + -- When running with multiple slurmd daemons per node, enable specifying a + range of ports on a single line of the node configuration in slurm.conf. + * Changes in SLURM 2.5.0.pre1 ============================= -- Add new output to "scontrol show configuration" of LicensesUsed. Output is diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index ee6ad16aad..546163cf82 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -2390,7 +2390,8 @@ The port number that the SLURM compute node daemon, \fBslurmd\fR, listens to for work on this particular node. By default there is a single port number for all \fBslurmd\fR daemons on all compute nodes as defined by the \fBSlurmdPort\fR configuration parameter. Use of this option is not generally -recommended except for development or testing purposes. +recommended except for development or testing purposes. If multiple +\fBslurmd\fR daemons execute on a node this can specify a range of ports .TP \fBProcs\fR diff --git a/src/common/node_conf.c b/src/common/node_conf.c index ca16593d1e..34442c4747 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -143,14 +143,17 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, { int error_code = SLURM_SUCCESS; struct node_record *node_rec = NULL; + hostlist_t address_list = NULL; hostlist_t alias_list = NULL; hostlist_t hostname_list = NULL; - hostlist_t address_list = NULL; + hostlist_t port_list = NULL; + char *address = NULL; char *alias = NULL; char *hostname = NULL; - char *address = NULL; + char *port_str = NULL; int state_val = NODE_STATE_UNKNOWN; - int address_count, alias_count, hostname_count; + int address_count, alias_count, hostname_count, port_count; + uint16_t port = 0; if (node_ptr->state != NULL) { state_val = state_str2int(node_ptr->state, node_ptr->nodenames); @@ -158,6 +161,12 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, goto cleanup; } + if ((address_list = hostlist_create(node_ptr->addresses)) == NULL) { + fatal("Unable to create NodeAddr list from %s", + node_ptr->addresses); + error_code = errno; + goto cleanup; + } if ((alias_list = hostlist_create(node_ptr->nodenames)) == NULL) { fatal("Unable to create NodeName list from %s", node_ptr->nodenames); @@ -170,9 +179,18 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, error_code = errno; goto cleanup; } - if ((address_list = hostlist_create(node_ptr->addresses)) == NULL) { - fatal("Unable to create NodeAddr list from %s", - node_ptr->addresses); + if (node_ptr->port_str[0] && (node_ptr->port_str[0] != '[') && + (strchr(node_ptr->port_str, '-') || + strchr(node_ptr->port_str, ','))) { + xstrfmtcat(port_str, "[%s]", node_ptr->port_str); + port_list = hostlist_create(port_str); + xfree(port_str); + } else { + port_list = hostlist_create(node_ptr->port_str); + } + if (port_list == NULL) { + error("Unable to create Port list from %s", + node_ptr->port_str); error_code = errno; goto cleanup; } @@ -181,6 +199,7 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, address_count = hostlist_count(address_list); alias_count = hostlist_count(alias_list); hostname_count = hostlist_count(hostname_list); + port_count = hostlist_count(port_list); #ifdef HAVE_FRONT_END if ((hostname_count != alias_count) && (hostname_count != 1)) { error("NodeHostname count must equal that of NodeName " @@ -193,30 +212,54 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, goto cleanup; } #else - if (hostname_count < alias_count) { - error("At least as many NodeHostname are required " - "as NodeName"); +#ifdef MULTIPLE_SLURMD + if ((address_count != alias_count) && (address_count != 1)) { + error("NodeAddr count must equal that of NodeName " + "records of there must be no more than one"); goto cleanup; } +#else if (address_count < alias_count) { error("At least as many NodeAddr are required as NodeName"); goto cleanup; } +#endif /* MULTIPLE_SLURMD */ + if (hostname_count < alias_count) { + error("At least as many NodeHostname are required " + "as NodeName"); + goto cleanup; + } #endif + if ((port_count != alias_count) && (port_count > 1)) { + error("Port count must equal that of NodeName " + "records or there must be no more than one"); + goto cleanup; + } /* now build the individual node structures */ while ((alias = hostlist_shift(alias_list))) { + if (address_count > 0) { + address_count--; + if (address) + free(address); + address = hostlist_shift(address_list); + } if (hostname_count > 0) { hostname_count--; if (hostname) free(hostname); hostname = hostlist_shift(hostname_list); } - if (address_count > 0) { - address_count--; - if (address) - free(address); - address = hostlist_shift(address_list); + if (port_count > 0) { + int port_int; + port_count--; + if (port_str) + free(port_str); + port_str = hostlist_shift(port_list); + port_int = atoi(port_str); + if ((port_int <= 0) || (port_int > 0xffff)) + fatal("Invalid Port %s", node_ptr->port_str); + port = port_int; } /* find_node_record locks this to get the * alias so we need to unlock */ @@ -230,7 +273,7 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, node_rec->last_response = (time_t) 0; node_rec->comm_name = xstrdup(address); node_rec->node_hostname = xstrdup(hostname); - node_rec->port = node_ptr->port; + node_rec->port = port; node_rec->weight = node_ptr->weight; node_rec->features = xstrdup(node_ptr->feature); node_rec->reason = xstrdup(node_ptr->reason); @@ -247,12 +290,16 @@ cleanup: free(address); if (hostname) free(hostname); + if (port_str) + free(port_str); + if (address_list) + hostlist_destroy(address_list); if (alias_list) hostlist_destroy(alias_list); if (hostname_list) hostlist_destroy(hostname_list); - if (address_list) - hostlist_destroy(address_list); + if (port_list) + hostlist_destroy(port_list); return error_code; } diff --git a/src/common/read_config.c b/src/common/read_config.c index 6e2a971302..2e953b376b 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -506,7 +506,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, {"Gres", S_P_STRING}, {"NodeAddr", S_P_STRING}, {"NodeHostname", S_P_STRING}, - {"Port", S_P_UINT16}, + {"Port", S_P_STRING}, {"Procs", S_P_UINT16}, {"RealMemory", S_P_UINT32}, {"Reason", S_P_STRING}, @@ -577,12 +577,11 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, if (!s_p_get_string(&n->gres, "Gres", tbl)) s_p_get_string(&n->gres, "Gres", dflt); - if (!s_p_get_uint16(&n->port, "Port", tbl) - && !s_p_get_uint16(&n->port, "Port", dflt)) { + if (!s_p_get_string(&n->port_str, "Port", tbl) && + !s_p_get_string(&n->port_str, "Port", dflt)) { /* This gets resolved in slurm_conf_get_port() * and slurm_conf_get_addr(). For now just - * leave with a value of zero */ - n->port = 0; + * leave with a value of NULL */ } if (!s_p_get_uint16(&n->cpus, "CPUs", tbl) && @@ -716,11 +715,13 @@ extern int list_find_frontend (void *front_end_entry, void *key) static void _destroy_nodename(void *ptr) { slurm_conf_node_t *n = (slurm_conf_node_t *)ptr; - xfree(n->nodenames); - xfree(n->hostnames); + xfree(n->addresses); xfree(n->feature); + xfree(n->hostnames); xfree(n->gres); + xfree(n->nodenames); + xfree(n->port_str); xfree(n->reason); xfree(n->state); xfree(ptr); @@ -1255,18 +1256,27 @@ static void _push_to_hashtbls(char *alias, char *hostname, */ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) { + hostlist_t address_list = NULL; hostlist_t alias_list = NULL; hostlist_t hostname_list = NULL; - hostlist_t address_list = NULL; + hostlist_t port_list = NULL; + char *address = NULL; char *alias = NULL; char *hostname = NULL; - char *address = NULL; + char *port_str = NULL; int error_code = SLURM_SUCCESS; - int address_count, alias_count, hostname_count; + int address_count, alias_count, hostname_count, port_count; + uint16_t port = 0; if ((node_ptr->nodenames == NULL) || (node_ptr->nodenames[0] == '\0')) return -1; + if ((address_list = hostlist_create(node_ptr->addresses)) == NULL) { + error("Unable to create NodeAddr list from %s", + node_ptr->addresses); + error_code = errno; + goto cleanup; + } if ((alias_list = hostlist_create(node_ptr->nodenames)) == NULL) { error("Unable to create NodeName list from %s", node_ptr->nodenames); @@ -1279,9 +1289,19 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) error_code = errno; goto cleanup; } - if ((address_list = hostlist_create(node_ptr->addresses)) == NULL) { - error("Unable to create NodeAddr list from %s", - node_ptr->addresses); + + if (node_ptr->port_str[0] && (node_ptr->port_str[0] != '[') && + (strchr(node_ptr->port_str, '-') || + strchr(node_ptr->port_str, ','))) { + xstrfmtcat(port_str, "[%s]", node_ptr->port_str); + port_list = hostlist_create(port_str); + xfree(port_str); + } else { + port_list = hostlist_create(node_ptr->port_str); + } + if (port_list == NULL) { + error("Unable to create Port list from %s", + node_ptr->port_str); error_code = errno; goto cleanup; } @@ -1295,28 +1315,42 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) address_count = hostlist_count(address_list); alias_count = hostlist_count(alias_list); hostname_count = hostlist_count(hostname_list); + port_count = hostlist_count(port_list); #ifdef HAVE_FRONT_END + if ((address_count != alias_count) && (address_count != 1)) { + error("NodeAddr count must equal that of NodeName " + "records of there must be no more than one"); + goto cleanup; + } if ((hostname_count != alias_count) && (hostname_count != 1)) { error("NodeHostname count must equal that of NodeName " "records of there must be no more than one"); goto cleanup; } +#else +#ifdef MULTIPLE_SLURMD if ((address_count != alias_count) && (address_count != 1)) { error("NodeAddr count must equal that of NodeName " "records of there must be no more than one"); goto cleanup; } #else + if (address_count < alias_count) { + error("At least as many NodeAddr are required as NodeName"); + goto cleanup; + } +#endif /* MULTIPLE_SLURMD */ if (hostname_count < alias_count) { error("At least as many NodeHostname are required " "as NodeName"); goto cleanup; } - if (address_count < alias_count) { - error("At least as many NodeAddr are required as NodeName"); +#endif /* HAVE_FRONT_END */ + if ((port_count != alias_count) && (port_count > 1)) { + error("Port count must equal that of NodeName " + "records or there must be no more than one"); goto cleanup; } -#endif /* now build the individual node structures */ while ((alias = hostlist_shift(alias_list))) { @@ -1324,7 +1358,15 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) address = hostlist_shift(address_list); if ((hostname_count > 1) || (hostname == NULL)) hostname = hostlist_shift(hostname_list); - _push_to_hashtbls(alias, hostname, address, node_ptr->port, + if ((port_count > 1) || (port_str == NULL)) { + int port_int; + port_str = hostlist_shift(port_list); + port_int = atoi(port_str); + if ((port_int <= 0) || (port_int > 0xffff)) + fatal("Invalid Port %s", node_ptr->port_str); + port = port_int; + } + _push_to_hashtbls(alias, hostname, address, port, node_ptr->cpus, node_ptr->sockets, node_ptr->cores, node_ptr->threads); free(alias); @@ -1338,20 +1380,29 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) free(hostname); hostname = NULL; } + if (port_count > 1) { + port_count--; + free(port_str); + port_str = NULL; + } } if (address) free(address); if (hostname) free(hostname); + if (port_str) + free(port_str); /* free allocated storage */ cleanup: + if (address_list) + hostlist_destroy(address_list); if (alias_list) hostlist_destroy(alias_list); if (hostname_list) hostlist_destroy(hostname_list); - if (address_list) - hostlist_destroy(address_list); + if (port_list) + hostlist_destroy(port_list); return error_code; } diff --git a/src/common/read_config.h b/src/common/read_config.h index 06e7af13c5..3edf23b6a6 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -176,7 +176,7 @@ typedef struct slurm_conf_node { char *addresses; char *gres; /* arbitrary list of node's generic resources */ char *feature; /* arbitrary list of node's features */ - uint16_t port; + char *port_str; uint16_t cpus; /* count of cpus running on the node */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ -- GitLab From f259fca450cc5934f0177572e703de30221f2c64 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 28 Jun 2012 16:15:24 -0700 Subject: [PATCH 518/614] fix mpi formatting problem in slurm.conf man page --- doc/man/man5/slurm.conf.5 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 6317936993..218505ecb8 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -834,7 +834,7 @@ Currently supported versions include: \fBmvapich\fR, \fBnone\fR (default, which works for many other versions of MPI) and \fBopenmpi\fR. -\fpmi2\fR, +\fBpmi2\fR, More information about MPI use is available here . -- GitLab From 8bad9a3c804a44a7e82082575cb8d5a9705ab1a9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 29 Jun 2012 08:41:49 -0700 Subject: [PATCH 519/614] Document that gang scheduled jobs all must fit into memory --- doc/html/gang_scheduling.shtml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/html/gang_scheduling.shtml b/doc/html/gang_scheduling.shtml index b52a9590b1..1838bc1529 100644 --- a/doc/html/gang_scheduling.shtml +++ b/doc/html/gang_scheduling.shtml @@ -69,6 +69,8 @@ It may also be desirable to configure MaxMemPerNode (maximum memory per allocated node) in slurm.conf. Users can use the --mem or --mem-per-cpu option at job submission time to specify their memory requirements. +Note that in order to gang schedule jobs, all jobs must be able to fit into +memory at the same time.
        • JobAcctGatherType and JobAcctGatherFrequency: @@ -525,6 +527,6 @@ For now this idea could be experimented with by disabling memory support in the selector and submitting appropriately sized jobs.

          -

          Last modified 24 June 2011

          +

          Last modified 29 June 2012

          -- GitLab From 539f95d8a460a066d048c8e4fcc975c46420ba98 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 29 Jun 2012 09:32:11 -0700 Subject: [PATCH 520/614] Fix formatting of NEWS web page --- doc/html/news.shtml | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/doc/html/news.shtml b/doc/html/news.shtml index 350b31c116..a77a0c45d6 100644 --- a/doc/html/news.shtml +++ b/doc/html/news.shtml @@ -4,34 +4,19 @@

          Index

          -

          Major Updates in SLURM Version 2.3

          -

          SLURM Version 2.2 was released in September 2011. -Major enhancements include: -

            -
          • Support for Cray XT and XE computers (integration with ALPS/BASIL).
          • -
          • Support for BlueGene/Q computers (partially implemented).
          • -
          • Support for multiple front-end nodes running slurmd daemons (for Cray and -BlueGene architectures, improves performance and fault tolerance).
          • -
          • Support for Linux cgroup job containers including integration with -generic resources.
          • -
          • Support for growing job allocations (support for shrinking jobs was added -in version 2.2).
          • -
          -

          Major Updates in SLURM Version 2.4

          SLURM Version 2.4 was release in June 2012. Major enhancements include:

          • Major improvement in job throuhgput: Up to 500 jobs per second (actual -throughput depends upon configuration, hardware, etc.).
          • -
          • Support for BlueGene/Q computers (fully implemented).
          • +throughput depends upon configuration, hardware, etc.). +
          • Support for BlueGene/Q computers.
          • Resource reservations with a node count specification will select those nodes optimized for the system topology.
          • Support for job and step constraints with resource counts (e.g. a job @@ -97,6 +82,6 @@ trojan library, then that library will be used by the SLURM daemon with unpredictable results. This was fixed in SLURM version 2.1.14.
          -

          Last modified 17 May 2012

          +

          Last modified 29 June 2012

          -- GitLab From 0c677bc35980518825b6812016ae2034f21693cb Mon Sep 17 00:00:00 2001 From: Bill Brophy Date: Fri, 29 Jun 2012 11:59:29 -0700 Subject: [PATCH 521/614] Add Part_Nodes flag to reservation request Add reservation flag of Part_Nodes to allocate all nodes in a partition to a reservation and automatically change the reservation when nodes are added to or removed from the reservation. Based upon work by Bill Brophy, Bull. --- NEWS | 4 ++ doc/man/man1/scontrol.1 | 5 ++ slurm/slurm.h.in | 2 + src/common/slurm_protocol_defs.c | 10 ++++ src/scontrol/create_res.c | 24 ++++++++- src/slurmctld/partition_mgr.c | 2 + src/slurmctld/reservation.c | 93 ++++++++++++++++++++++++++++---- src/slurmctld/reservation.h | 6 +++ src/sview/popups.c | 2 +- src/sview/resv_info.c | 11 +++- 10 files changed, 144 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index 433780e49e..1acf39c7b2 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ documents those changes that are of interest to users and admins. ============================= -- When running with multiple slurmd daemons per node, enable specifying a range of ports on a single line of the node configuration in slurm.conf. + -- Add reservation flag of Part_Nodes to allocate all nodes in a partition to + a reservation and automatically change the reservation when nodes are + added to or removed from the reservation. Based upon work by + Bill Brophy, Bull. * Changes in SLURM 2.5.0.pre1 ============================= diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 968b7f6892..7557fa74cd 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1175,6 +1175,11 @@ Ignore currently running jobs when creating the reservation. This can be especially useful when reserving all nodes in the system for maintenance. .TP +\fIPART_NODES\fR +This flag can be used to reserve all nodes within the specified +partition. PartitionName and Nodes=ALL must be specified or +this option is ignored. +.TP \fIDAILY\fR Repeat the reservation at the same time every day .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 5831f5b855..197e003dfb 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1692,6 +1692,8 @@ void slurm_init_update_block_msg PARAMS((update_block_msg_t *update_block_msg)); #define RESERVE_FLAG_NO_LIC_ONLY 0x0200 /* Clear reserve licenses only flag */ #define RESERVE_FLAG_STATIC 0x0400 /* Static node allocation */ #define RESERVE_FLAG_NO_STATIC 0x0800 /* Clear static node allocation */ +#define RESERVE_FLAG_PART_NODES 0x1000 /* Use Partition Nodes only */ +#define RESERVE_FLAG_NO_PART_NODES 0x2000 /* Clear Partition Nodes only */ #define RESERVE_FLAG_OVERLAP 0x4000 /* Permit to overlap others */ #define RESERVE_FLAG_SPEC_NODES 0x8000 /* Contains specific nodes */ diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index c70474c28d..f1641104b5 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -1392,6 +1392,16 @@ extern char *reservation_flags_string(uint16_t flags) xstrcat(flag_str, ","); xstrcat(flag_str, "NO_STATIC"); } + if (flags & RESERVE_FLAG_PART_NODES) { + if (flag_str[0]) + xstrcat(flag_str, ","); + xstrcat(flag_str, "PART_NODES"); + } + if (flags & RESERVE_FLAG_NO_PART_NODES) { + if (flag_str[0]) + xstrcat(flag_str, ","); + xstrcat(flag_str, "NO_PART_NODES"); + } return flag_str; } diff --git a/src/scontrol/create_res.c b/src/scontrol/create_res.c index ca68f1d897..6a0704f2e9 100644 --- a/src/scontrol/create_res.c +++ b/src/scontrol/create_res.c @@ -76,8 +76,8 @@ static char * _process_plus_minus(char plus_or_minus, char *src) /* * _parse_flags is used to parse the Flags= option. It handles - * daily, weekly, static_alloc, and maint, optionally preceded by + or -, - * separated by a comma but no spaces. + * daily, weekly, static_alloc, part_nodes, and maint, optionally + * preceded by + or -, separated by a comma but no spaces. */ static uint32_t _parse_flags(const char *flagstr, const char *msg) { @@ -144,6 +144,13 @@ static uint32_t _parse_flags(const char *flagstr, const char *msg) outflags |= RESERVE_FLAG_NO_STATIC; else outflags |= RESERVE_FLAG_STATIC; + } else if (strncasecmp(curr, "Part_Nodes", MAX(taglen,1)) + == 0) { + curr += taglen; + if (flip) + outflags |= RESERVE_FLAG_NO_PART_NODES; + else + outflags |= RESERVE_FLAG_PART_NODES; } else { error("Error parsing flags %s. %s", flagstr, msg); return 0xffffffff; @@ -474,6 +481,19 @@ scontrol_create_res(int argc, char *argv[]) resv_msg.node_list = NULL; } } + /* + * If "all" is specified for the nodes and RESERVE_FLAG_PART_NODES + * flag is set make sure a partition name is specified. + */ + + if ((resv_msg.partition == NULL) && (resv_msg.node_list != NULL) && + (strcasecmp(resv_msg.node_list, "ALL") == 0) && + (resv_msg.flags & RESERVE_FLAG_PART_NODES)) { + exit_code = 1; + error("Part_Nodes requires specifying a Partition. " + "No reservation created."); + goto SCONTROL_CREATE_RES_CLEANUP; + } /* * If the following parameters are null, but a partition is named, then diff --git a/src/slurmctld/partition_mgr.c b/src/slurmctld/partition_mgr.c index ff5bf112e1..e5fcb94d01 100644 --- a/src/slurmctld/partition_mgr.c +++ b/src/slurmctld/partition_mgr.c @@ -64,6 +64,7 @@ #include "src/slurmctld/groups.h" #include "src/slurmctld/locks.h" #include "src/slurmctld/proc_req.h" +#include "src/slurmctld/reservation.h" #include "src/slurmctld/sched_plugin.h" #include "src/slurmctld/slurmctld.h" #include "src/slurmctld/state_save.h" @@ -1378,6 +1379,7 @@ extern int update_part (update_part_msg_t * part_desc, bool create_flag) part_ptr->nodes, part_desc->name); xfree(backup_node_list); } + update_part_nodes_in_resv(part_ptr); } else if (part_ptr->node_bitmap == NULL) { /* Newly created partition needs a bitmap, even if empty */ part_ptr->node_bitmap = bit_alloc(node_record_count); diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 9606b88be5..397b594587 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -1239,7 +1239,8 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) RESERVE_FLAG_DAILY | RESERVE_FLAG_WEEKLY | RESERVE_FLAG_LIC_ONLY | - RESERVE_FLAG_STATIC; + RESERVE_FLAG_STATIC | + RESERVE_FLAG_PART_NODES; } if (resv_desc_ptr->partition) { part_ptr = find_part_record(resv_desc_ptr->partition); @@ -1249,6 +1250,11 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) rc = ESLURM_INVALID_PARTITION_NAME; goto bad_parse; } + } else if (resv_desc_ptr->flags & RESERVE_FLAG_PART_NODES) { + info("Reservation request with Part_Nodes flag lacks " + "partition specification"); + rc = ESLURM_INVALID_PARTITION_NAME; + goto bad_parse; } if ((resv_desc_ptr->accounts == NULL) && (resv_desc_ptr->users == NULL)) { @@ -1337,8 +1343,15 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) if (resv_desc_ptr->node_list) { resv_desc_ptr->flags |= RESERVE_FLAG_SPEC_NODES; if (strcasecmp(resv_desc_ptr->node_list, "ALL") == 0) { - node_bitmap = bit_alloc(node_record_count); - bit_nset(node_bitmap, 0, (node_record_count - 1)); + if ((resv_desc_ptr->partition) && + (resv_desc_ptr->flags & RESERVE_FLAG_PART_NODES)) { + part_ptr = find_part_record( + resv_desc_ptr->partition); + node_bitmap = bit_copy(part_ptr->node_bitmap); + } else { + node_bitmap = bit_alloc(node_record_count); + bit_nset(node_bitmap, 0,(node_record_count-1)); + } xfree(resv_desc_ptr->node_list); resv_desc_ptr->node_list = bitmap2node_name(node_bitmap); @@ -1490,6 +1503,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) int error_code = SLURM_SUCCESS, i, rc; char start_time[32], end_time[32]; char *name1, *name2, *val1, *val2; + struct part_record *part_ptr = NULL; if (!resv_list) resv_list = list_create(_del_resv_rec); @@ -1534,6 +1548,21 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) resv_ptr->flags |= RESERVE_FLAG_STATIC; if (resv_desc_ptr->flags & RESERVE_FLAG_NO_STATIC) resv_ptr->flags &= (~RESERVE_FLAG_STATIC); + if (resv_desc_ptr->flags & RESERVE_FLAG_PART_NODES) { + if ((resv_ptr->partition == NULL) && + (resv_desc_ptr->partition == NULL)) { + info("Reservation request can not set " + "Part_Nodes flag without partition"); + error_code = ESLURM_INVALID_PARTITION_NAME; + goto update_failure; + } + resv_ptr->flags |= RESERVE_FLAG_PART_NODES; + /* Explicitly set the node_list to ALL */ + xfree(resv_desc_ptr->node_list); + resv_desc_ptr->node_list = xstrdup("ALL"); + } + if (resv_desc_ptr->flags & RESERVE_FLAG_NO_PART_NODES) + resv_ptr->flags &= (~RESERVE_FLAG_PART_NODES); } if (resv_desc_ptr->partition && (resv_desc_ptr->partition[0] == '\0')){ /* Clear the partition */ @@ -1674,15 +1703,30 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) bitstr_t *node_bitmap; resv_ptr->flags |= RESERVE_FLAG_SPEC_NODES; if (strcasecmp(resv_desc_ptr->node_list, "ALL") == 0) { - node_bitmap = bit_alloc(node_record_count); - bit_nset(node_bitmap, 0, (node_record_count - 1)); - } else if (node_name2bitmap(resv_desc_ptr->node_list, + if ((resv_ptr->partition) && + (resv_ptr->flags & RESERVE_FLAG_PART_NODES)) { + part_ptr = find_part_record(resv_ptr-> + partition); + node_bitmap = bit_copy(part_ptr->node_bitmap); + xfree(resv_ptr->node_list); + resv_ptr->node_list = xstrdup(part_ptr->nodes); + } else { + node_bitmap = bit_alloc(node_record_count); + bit_nset(node_bitmap, 0,(node_record_count-1)); + resv_ptr->flags &= (~RESERVE_FLAG_PART_NODES); + xfree(resv_ptr->node_list); + resv_ptr->node_list = resv_desc_ptr->node_list; + } + } else { + resv_ptr->flags &= (~RESERVE_FLAG_PART_NODES); + if (node_name2bitmap(resv_desc_ptr->node_list, false, &node_bitmap)) { - error_code = ESLURM_INVALID_NODE_NAME; - goto update_failure; + error_code = ESLURM_INVALID_NODE_NAME; + goto update_failure; + } + xfree(resv_ptr->node_list); + resv_ptr->node_list = resv_desc_ptr->node_list; } - xfree(resv_ptr->node_list); - resv_ptr->node_list = resv_desc_ptr->node_list; resv_desc_ptr->node_list = NULL; /* Nothing left to free */ FREE_NULL_BITMAP(resv_ptr->node_bitmap); resv_ptr->node_bitmap = node_bitmap; @@ -1690,6 +1734,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) } if (resv_desc_ptr->node_cnt) { uint32_t total_node_cnt = 0; + resv_ptr->flags &= (~RESERVE_FLAG_PART_NODES); #ifdef HAVE_BG if (!cnodes_per_bp) { @@ -3349,6 +3394,34 @@ extern void update_assocs_in_resvs(void) list_iterator_destroy(iter); } +extern void update_part_nodes_in_resv(struct part_record *part_ptr) +{ + ListIterator iter = NULL; + struct part_record *parti_ptr = NULL; + slurmctld_resv_t *resv_ptr = NULL; + xassert(part_ptr); + + iter = list_iterator_create(resv_list); + if (!iter) + fatal("malloc: list_iterator_create"); + while ((resv_ptr = (slurmctld_resv_t *) list_next(iter))) { + if ((resv_ptr->flags & RESERVE_FLAG_PART_NODES) && + (resv_ptr->partition != NULL) && + (strcmp(resv_ptr->partition, part_ptr->name) == 0)) { + parti_ptr = find_part_record(resv_ptr->partition); + FREE_NULL_BITMAP(resv_ptr->node_bitmap); + resv_ptr->node_bitmap = bit_copy(parti_ptr-> + node_bitmap); + resv_ptr->node_cnt = bit_set_count(resv_ptr-> + node_bitmap); + xfree(resv_ptr->node_list); + resv_ptr->node_list = xstrdup(parti_ptr->nodes); + last_resv_update = time(NULL); + } + } + list_iterator_destroy(iter); +} + static void _set_nodes_maint(slurmctld_resv_t *resv_ptr, time_t now) { int i, i_first, i_last; diff --git a/src/slurmctld/reservation.h b/src/slurmctld/reservation.h index ab8f75e26b..311dfb8cdd 100644 --- a/src/slurmctld/reservation.h +++ b/src/slurmctld/reservation.h @@ -81,6 +81,12 @@ extern bool is_node_in_maint_reservation(int nodenum); extern void update_assocs_in_resvs(void); /* + * Update reserved nodes for all reservations using a specific partition if the + * resevation has NodeList=ALL and RESERVE_FLAGS_PART_NODES. +*/ +extern void update_part_nodes_in_resv(struct part_record *part_ptr); + +/* * Load the reservation state from file, recover on slurmctld restart. * Reset reservation pointers for all jobs. * Execute this after loading the configuration file data. diff --git a/src/sview/popups.c b/src/sview/popups.c index 4d522ab031..a7da7d0e2e 100644 --- a/src/sview/popups.c +++ b/src/sview/popups.c @@ -551,7 +551,7 @@ extern void create_create_popup(GtkAction *action, gpointer user_data) "Specify either Accounts or Users.\n\n" "Supported Flags include: Maintenance, Overlap,\n" "Ignore_Jobs, Daily and Weekly, License_Only\n" - "and Static_Alloc.\n" + "Part_Nodes and Static_Alloc.\n" "All other fields are optional."); resv_msg = xmalloc(sizeof(resv_desc_msg_t)); slurm_init_resv_desc_msg(resv_msg); diff --git a/src/sview/resv_info.c b/src/sview/resv_info.c index f476b4367c..4d0ac8ea17 100644 --- a/src/sview/resv_info.c +++ b/src/sview/resv_info.c @@ -188,8 +188,8 @@ static void _process_each_resv(GtkTreeModel *model, GtkTreePath *path, /* * _parse_flags is used to parse the Flags= option. It handles - * daily, weekly, and maint, optionally preceded by + or -, - * separated by a comma but no spaces. + * daily, weekly, maint, static_nodes and part_nodes optionally + * preceded by + or -, separated by a comma but no spaces. */ static uint32_t _parse_flags(const char *flagstr) { @@ -253,6 +253,13 @@ static uint32_t _parse_flags(const char *flagstr) outflags |= RESERVE_FLAG_NO_STATIC; else outflags |= RESERVE_FLAG_STATIC; + } else if (strncasecmp(curr, "Part_Nodes", MAX(taglen,1)) + == 0) { + curr += taglen; + if (flip) + outflags |= RESERVE_FLAG_NO_PART_NODES; + else + outflags |= RESERVE_FLAG_PART_NODES; } else { char *temp = g_strdup_printf("Error parsing flags %s.", flagstr); -- GitLab From 9410e98e24b675b17c4481dff144aeeaf245d47c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 2 Jul 2012 09:59:37 -0700 Subject: [PATCH 522/614] Note maximum gres count supported --- doc/html/gres.shtml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/html/gres.shtml b/doc/html/gres.shtml index b3c5535f92..e887954214 100644 --- a/doc/html/gres.shtml +++ b/doc/html/gres.shtml @@ -43,7 +43,8 @@ values in slurm.conf ).
        • The default value is set to the number of File values specified (if any), otherwise the default value is one. A suffix of "K", "M" or "G" may be used to mulitply the number by 1024, 1048576 or 1073741824 respectively -(e.g. "Count=10G"). +(e.g. "Count=10G"). Note that Count is a 32-bit field and the maximum value +is 4,294,967,295.
        • CPUs Specify the CPU index numbers for the specific CPUs which can use this resources. For example, it may be strongly preferable to use specific @@ -150,6 +151,6 @@ JobStep=1234.2 CUDA_VISIBLE_DEVICES=3 file and insure they are in the increasing numeric order.

          -

          Last modified 8 May 2012

          +

          Last modified 2 July 2012

          -- GitLab From f35ad166be284a92721a3e6ee060740cd03e031c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 2 Jul 2012 10:03:04 -0700 Subject: [PATCH 523/614] Note maximum gres count is 4G --- doc/man/man5/gres.conf.5 | 4 +++- doc/man/man5/slurm.conf.5 | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/man/man5/gres.conf.5 b/doc/man/man5/gres.conf.5 index 455a03d1b4..09413dc52c 100644 --- a/doc/man/man5/gres.conf.5 +++ b/doc/man/man5/gres.conf.5 @@ -1,4 +1,4 @@ -.TH "gres.conf" "5" "April 2012" "gres.conf 2.3" "Slurm configuration file" +.TH "gres.conf" "5" "July 2012" "gres.conf 2.3" "Slurm configuration file" .SH "NAME" gres.conf \- Slurm configuration file for generic resource management. @@ -28,6 +28,8 @@ Number of resources of this type available on this node. The default value is set to the number of \fBFile\fR values specified (if any), otherwise the default value is one. A suffix of "K", "M" or "G" may be used to mulitply the number by 1024, 1048576 or 1073741824 respectively. +Note that Count is a 32\-bit field and the maximum value is 4,294,967,295. + .TP \fBCPUs\fR diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 218505ecb8..023d8cdd8c 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -2371,7 +2371,8 @@ colon with a numeric value (default value is one) (e.g. "Gres=bandwidth:10000,gpu:2"). A suffix of "K", "M" or "G" may be used to mulitply the number by 1024, 1048576 or 1073741824 respectively (e.g. "Gres=bandwidth:4G,gpu:4").. -By default a node has no generic resources. +By default a node has no generic resources and its maximum count is +4,294,967,295. Also see \fBFeature\fR. .TP -- GitLab From 3bc8698840583066b5c71d4b62bb3af0a7734dcf Mon Sep 17 00:00:00 2001 From: Carles Fenoy Date: Mon, 2 Jul 2012 09:48:26 -0700 Subject: [PATCH 524/614] Fix bug for job state change from 2.3 -> 2.4 job state can now be preserved correctly when transitioning. This also applies for 2.4.0 -> 2.4.1, no state will be lost. (Thanks to Carles Fenoy) --- NEWS | 6 ++++++ src/slurmctld/job_mgr.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 01c22b60a5..2547992dc7 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,12 @@ 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.4.1 +======================== + -- Fix bug for job state change from 2.3 -> 2.4 job state can now be preserved + correctly when transitioning. This also applies for 2.4.0 -> 2.4.1, no + state will be lost. (Thanks to Carles Fenoy) + * Changes in SLURM 2.4.0 ======================== -- Cray - Improve support for zero compute note resource allocations. diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 2cbe0c1337..ee869687db 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -101,7 +101,8 @@ #define JOB_HASH_INX(_job_id) (_job_id % hash_table_size) /* Change JOB_STATE_VERSION value when changing the state save format */ -#define JOB_STATE_VERSION "VER011" +#define JOB_STATE_VERSION "VER012" +#define JOB_2_4_STATE_VERSION "VER012" /* SLURM version 2.4 */ #define JOB_2_3_STATE_VERSION "VER011" /* SLURM version 2.3 */ #define JOB_2_2_STATE_VERSION "VER010" /* SLURM version 2.2 */ #define JOB_2_1_STATE_VERSION "VER009" /* SLURM version 2.1 */ @@ -624,6 +625,8 @@ extern int load_all_job_state(void) if (ver_str) { if (!strcmp(ver_str, JOB_STATE_VERSION)) { protocol_version = SLURM_PROTOCOL_VERSION; + } else if (!strcmp(ver_str, JOB_2_3_STATE_VERSION)) { + protocol_version = SLURM_2_3_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_2_STATE_VERSION)) { protocol_version = SLURM_2_2_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_1_STATE_VERSION)) { -- GitLab From 219aa3e8d0af3a86c45969da0f0861c90bfc3ac1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 2 Jul 2012 09:49:32 -0700 Subject: [PATCH 525/614] fix to make 2.4.0 work to 2.4.1 state --- src/slurmctld/job_mgr.c | 7 +++++++ src/slurmctld/node_mgr.c | 11 +++++++++++ src/slurmctld/slurmctld.h | 1 + 3 files changed, 19 insertions(+) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index ee869687db..9335f87576 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -644,6 +644,13 @@ extern int load_all_job_state(void) } xfree(ver_str); + /* There was a bug in 2.4.0 where the job state version wasn't + * incremented correctly. Luckly the node state was. We will + * use it to set the version correctly in the job. + */ + if (load_2_4_state && protocol_version == SLURM_2_3_PROTOCOL_VERSION) + protocol_version = SLURM_2_4_PROTOCOL_VERSION; + safe_unpack_time(&buf_time, buffer); safe_unpack32( &saved_job_id, buffer); job_id_sequence = MAX(saved_job_id, job_id_sequence); diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index fbb5faf4d3..714e3cfe9f 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -94,6 +94,14 @@ bitstr_t *idle_node_bitmap = NULL; /* bitmap of idle nodes */ bitstr_t *power_node_bitmap = NULL; /* bitmap of powered down nodes */ bitstr_t *share_node_bitmap = NULL; /* bitmap of sharable nodes */ bitstr_t *up_node_bitmap = NULL; /* bitmap of non-down nodes */ +bool load_2_4_state = false; /* There was a bug in 2.4.0 + * where the job state version + * wasn't incremented + * correctly. Luckly the node + * state was. We will use it + * to set the version + * correctly in the job. + */ static void _dump_node_state (struct node_record *dump_node_ptr, Buf buffer); @@ -343,6 +351,9 @@ extern int load_all_node_state ( bool state_only ) } xfree(ver_str); + if (protocol_version == SLURM_2_4_PROTOCOL_VERSION) + load_2_4_state = true; + safe_unpack_time (&time_stamp, buffer); while (remaining_buf (buffer) > 0) { diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 1a263403d7..ae5a8d0ba8 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -212,6 +212,7 @@ extern int accounting_enforce; extern int association_based_accounting; extern uint32_t cluster_cpus; extern int with_slurmdbd; +extern bool load_2_4_state; /*****************************************************************************\ * NODE parameters and data structures, mostly in src/common/node_conf.h -- GitLab From c865187048b40acf2cb55ea419019d710788be63 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Mon, 2 Jul 2012 10:04:12 -0700 Subject: [PATCH 526/614] Update META for tag 2.4.1 --- META | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/META b/META index dbf5fba790..2bdb3ee1cb 100644 --- a/META +++ b/META @@ -9,8 +9,8 @@ Name: slurm Major: 2 Minor: 4 - Micro: 0 - Version: 2.4.0 + Micro: 1 + Version: 2.4.1 Release: 1 ## -- GitLab From 32e5a42833bfb49732940261d26da525dc3956f6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 2 Jul 2012 12:55:42 -0700 Subject: [PATCH 527/614] Fix formatting problems, remove trailing spaces and new-lines --- doc/man/man1/scontrol.1 | 10 +++++----- slurm/slurm.h.in | 4 ++-- src/common/slurm_protocol_defs.c | 20 ++++++++++---------- src/sview/popups.c | 2 +- src/sview/resv_info.c | 18 +++++++++--------- 5 files changed, 27 insertions(+), 27 deletions(-) diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 7557fa74cd..71d9b21ac6 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1175,11 +1175,11 @@ Ignore currently running jobs when creating the reservation. This can be especially useful when reserving all nodes in the system for maintenance. .TP -\fIPART_NODES\fR -This flag can be used to reserve all nodes within the specified -partition. PartitionName and Nodes=ALL must be specified or -this option is ignored. -.TP +\fIPART_NODES\fR +This flag can be used to reserve all nodes within the specified +partition. PartitionName and Nodes=ALL must be specified or +this option is ignored. +.TP \fIDAILY\fR Repeat the reservation at the same time every day .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 197e003dfb..c6d3caeb52 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1692,8 +1692,8 @@ void slurm_init_update_block_msg PARAMS((update_block_msg_t *update_block_msg)); #define RESERVE_FLAG_NO_LIC_ONLY 0x0200 /* Clear reserve licenses only flag */ #define RESERVE_FLAG_STATIC 0x0400 /* Static node allocation */ #define RESERVE_FLAG_NO_STATIC 0x0800 /* Clear static node allocation */ -#define RESERVE_FLAG_PART_NODES 0x1000 /* Use Partition Nodes only */ -#define RESERVE_FLAG_NO_PART_NODES 0x2000 /* Clear Partition Nodes only */ +#define RESERVE_FLAG_PART_NODES 0x1000 /* Use Partition Nodes only */ +#define RESERVE_FLAG_NO_PART_NODES 0x2000 /* Clear Partition Nodes only */ #define RESERVE_FLAG_OVERLAP 0x4000 /* Permit to overlap others */ #define RESERVE_FLAG_SPEC_NODES 0x8000 /* Contains specific nodes */ diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index f1641104b5..148bf7244f 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -1392,16 +1392,16 @@ extern char *reservation_flags_string(uint16_t flags) xstrcat(flag_str, ","); xstrcat(flag_str, "NO_STATIC"); } - if (flags & RESERVE_FLAG_PART_NODES) { - if (flag_str[0]) - xstrcat(flag_str, ","); - xstrcat(flag_str, "PART_NODES"); - } - if (flags & RESERVE_FLAG_NO_PART_NODES) { - if (flag_str[0]) - xstrcat(flag_str, ","); - xstrcat(flag_str, "NO_PART_NODES"); - } + if (flags & RESERVE_FLAG_PART_NODES) { + if (flag_str[0]) + xstrcat(flag_str, ","); + xstrcat(flag_str, "PART_NODES"); + } + if (flags & RESERVE_FLAG_NO_PART_NODES) { + if (flag_str[0]) + xstrcat(flag_str, ","); + xstrcat(flag_str, "NO_PART_NODES"); + } return flag_str; } diff --git a/src/sview/popups.c b/src/sview/popups.c index a7da7d0e2e..91dfc37af5 100644 --- a/src/sview/popups.c +++ b/src/sview/popups.c @@ -551,7 +551,7 @@ extern void create_create_popup(GtkAction *action, gpointer user_data) "Specify either Accounts or Users.\n\n" "Supported Flags include: Maintenance, Overlap,\n" "Ignore_Jobs, Daily and Weekly, License_Only\n" - "Part_Nodes and Static_Alloc.\n" + "Part_Nodes and Static_Alloc.\n" "All other fields are optional."); resv_msg = xmalloc(sizeof(resv_desc_msg_t)); slurm_init_resv_desc_msg(resv_msg); diff --git a/src/sview/resv_info.c b/src/sview/resv_info.c index 4d0ac8ea17..59fe372ad7 100644 --- a/src/sview/resv_info.c +++ b/src/sview/resv_info.c @@ -188,8 +188,8 @@ static void _process_each_resv(GtkTreeModel *model, GtkTreePath *path, /* * _parse_flags is used to parse the Flags= option. It handles - * daily, weekly, maint, static_nodes and part_nodes optionally - * preceded by + or -, separated by a comma but no spaces. + * daily, weekly, maint, static_nodes and part_nodes optionally + * preceded by + or -, separated by a comma but no spaces. */ static uint32_t _parse_flags(const char *flagstr) { @@ -253,13 +253,13 @@ static uint32_t _parse_flags(const char *flagstr) outflags |= RESERVE_FLAG_NO_STATIC; else outflags |= RESERVE_FLAG_STATIC; - } else if (strncasecmp(curr, "Part_Nodes", MAX(taglen,1)) - == 0) { - curr += taglen; - if (flip) - outflags |= RESERVE_FLAG_NO_PART_NODES; - else - outflags |= RESERVE_FLAG_PART_NODES; + } else if (strncasecmp(curr, "Part_Nodes", MAX(taglen,1)) + == 0) { + curr += taglen; + if (flip) + outflags |= RESERVE_FLAG_NO_PART_NODES; + else + outflags |= RESERVE_FLAG_PART_NODES; } else { char *temp = g_strdup_printf("Error parsing flags %s.", flagstr); -- GitLab From f87e3a0a976eddfaf132bd1d6d573f696e8f541a Mon Sep 17 00:00:00 2001 From: Alexjandro Lucero Palau Date: Mon, 2 Jul 2012 15:58:27 -0700 Subject: [PATCH 528/614] Add support for advanced reservations at core resolution Add support for advanced reservation for specific cores rather than whole nodes. Current limiations: homogeneous cluster, nodes idle when reservation created, and no more than one reservation per node. Code is still under development. Work by Alejandro Lucero Palau, et. al, BSC. --- NEWS | 5 + doc/man/man1/scontrol.1 | 6 + slurm/slurm.h.in | 2 + src/api/reservation_info.c | 5 +- src/common/node_select.c | 11 +- src/common/node_select.h | 14 +- src/common/slurm_protocol_pack.c | 79 +++- src/plugins/sched/backfill/backfill.c | 35 +- src/plugins/sched/builtin/builtin.c | 7 +- src/plugins/sched/wiki2/job_will_run.c | 13 +- src/plugins/select/bluegene/select_bluegene.c | 3 +- src/plugins/select/cons_res/job_test.c | 30 +- src/plugins/select/cons_res/job_test.h | 2 +- src/plugins/select/cons_res/select_cons_res.c | 247 +++++++++++- src/plugins/select/cray/other_select.c | 6 +- src/plugins/select/cray/other_select.h | 3 +- src/plugins/select/cray/select_cray.c | 5 +- src/plugins/select/linear/select_linear.c | 3 +- src/scontrol/create_res.c | 15 +- src/slurmctld/job_scheduler.c | 6 +- src/slurmctld/node_scheduler.c | 43 ++- src/slurmctld/proc_req.c | 2 +- src/slurmctld/reservation.c | 360 +++++++++++++----- src/slurmctld/reservation.h | 19 +- src/slurmctld/slurmctld.h | 1 + 25 files changed, 752 insertions(+), 170 deletions(-) diff --git a/NEWS b/NEWS index 1acf39c7b2..d15418655d 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,11 @@ documents those changes that are of interest to users and admins. a reservation and automatically change the reservation when nodes are added to or removed from the reservation. Based upon work by Bill Brophy, Bull. + -- Add support for advanced reservation for specific cores rather than whole + nodes. Current limiations: homogeneous cluster, nodes idle when reservation + created, and no more than one reservation per node. Code is still under + development. Work by Alejandro Lucero Palau, et. al, BSC. + * Changes in SLURM 2.5.0.pre1 ============================= diff --git a/doc/man/man1/scontrol.1 b/doc/man/man1/scontrol.1 index 71d9b21ac6..59178e2a12 100644 --- a/doc/man/man1/scontrol.1 +++ b/doc/man/man1/scontrol.1 @@ -1077,6 +1077,12 @@ E.g. Accounts=physcode1,physcode2. A user in any of the accounts may use the reserved nodes. A new reservation must specify Users and/or Accounts. +.TP +\fICoreCnt\fP= +Identify number of cores to be reserved. This should only be used for +reservations that are less than one node in size. Otherwise use the +\fINodeCnt\fP option described below. + .TP \fILicenses\fP= Specification of licenses (or other resources available on all diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index c6d3caeb52..24ec6b2bcf 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1705,6 +1705,7 @@ typedef struct reserve_info { char *licenses; /* names of licenses to be reserved */ char *name; /* name of reservation */ uint32_t node_cnt; /* count of nodes required */ + uint32_t core_cnt; /* count of cores required */ int *node_inx; /* list index pairs into node_table for *nodes: * start_range_1, end_range_1, * start_range_2, .., -1 */ @@ -1728,6 +1729,7 @@ typedef struct resv_desc_msg { uint16_t flags; /* see RESERVE_FLAG_* above */ char *licenses; /* names of licenses to be reserved */ char *name; /* name of reservation (optional on create) */ + uint32_t core_cnt; /* Count of cores required */ uint32_t *node_cnt; /* Count of nodes required. Specify set of job * sizes with trailing zero to optimize layout * for those jobs just specify their total size diff --git a/src/api/reservation_info.c b/src/api/reservation_info.c index d82a248d3c..12df91caf1 100644 --- a/src/api/reservation_info.c +++ b/src/api/reservation_info.c @@ -129,8 +129,9 @@ char *slurm_sprint_reservation_info ( reserve_info_t * resv_ptr, flag_str = reservation_flags_string(resv_ptr->flags); snprintf(tmp_line, sizeof(tmp_line), - "Nodes=%s NodeCnt=%u Features=%s PartitionName=%s Flags=%s", - resv_ptr->node_list, resv_ptr->node_cnt, + "Nodes=%s NodeCnt=%u CoreCnt=%u Features=%s " + "PartitionName=%s Flags=%s", + resv_ptr->node_list, resv_ptr->node_cnt, resv_ptr->core_cnt, resv_ptr->features, resv_ptr->partition, flag_str); xfree(flag_str); xstrcat(out, tmp_line); diff --git a/src/common/node_select.c b/src/common/node_select.c index 7efd0e0f02..b5e3be8e14 100644 --- a/src/common/node_select.c +++ b/src/common/node_select.c @@ -531,13 +531,15 @@ extern int select_g_block_init(List block_list) * jobs to be preempted to initiate the pending job. Not set * if mode=SELECT_MODE_TEST_ONLY or input pointer is NULL. * Existing list is appended to. + * IN exc_core_bitmap - cores used in reservations and not usable * RET zero on success, EINVAL otherwise */ extern int select_g_job_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t mode, List preemptee_candidates, - List *preemptee_job_list) + List *preemptee_job_list, + bitstr_t *exc_core_bitmap) { if (slurm_select_init(0) < 0) return SLURM_ERROR; @@ -1219,15 +1221,18 @@ extern int select_g_reconfigure (void) * OR the fewest number of consecutive node sets * IN avail_bitmap - nodes available for the reservation * IN node_cnt - count of required nodes + * IN core_cnt - count of required cores + * IN core_bitmap - cores to be excluded for this reservation * RET - nodes selected for use by the reservation */ -extern bitstr_t * select_g_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t * select_g_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap) { if (slurm_select_init(0) < 0) return NULL; return (*(ops[select_context_default].resv_test)) - (avail_bitmap, node_cnt); + (avail_bitmap, node_cnt, core_cnt, core_bitmap); } extern void select_g_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) diff --git a/src/common/node_select.h b/src/common/node_select.h index cfcae9aa13..04c9ec1a6e 100644 --- a/src/common/node_select.h +++ b/src/common/node_select.h @@ -214,7 +214,9 @@ typedef struct slurm_select_ops { void *data); int (*reconfigure) (void); bitstr_t * (*resv_test) (bitstr_t *avail_bitmap, - uint32_t node_cnt); + uint32_t node_cnt, + uint32_t core_cnt, + bitstr_t **core_bitmap); void (*ba_init) (node_info_msg_t *node_info_ptr, bool sanity_check); void (*ba_fini) (void); @@ -543,13 +545,15 @@ extern char *select_g_select_jobinfo_xstrdup(dynamic_plugin_data_t *jobinfo, * jobs to be preempted to initiate the pending job. Not set * if mode=SELECT_MODE_TEST_ONLY or input pointer is NULL. * Existing list is appended to. + * IN exc_core_bitmap - cores reserved and not usable * RET zero on success, EINVAL otherwise */ extern int select_g_job_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t mode, List preemptee_candidates, - List *preemptee_job_list); + List *preemptee_job_list, + bitstr_t *exc_core_bitmap); /* * Note initiation of job is about to begin. Called immediately @@ -658,9 +662,13 @@ extern int select_g_step_finish(struct step_record *step_ptr); * OR the fewest number of consecutive node sets * IN avail_bitmap - nodes available for the reservation * IN node_cnt - count of required nodes + * IN core_cnt - count of required cores + * IN core_bitmap - cores to exclude for this reservation * RET - nodes selected for use by the reservation */ -extern bitstr_t * select_g_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt); +extern bitstr_t * select_g_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, + bitstr_t **core_bitmap); /*****************************\ * GET INFORMATION FUNCTIONS * diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index cbc2f179ec..7db22bc7ee 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -3158,7 +3158,30 @@ _pack_update_resv_msg(resv_desc_msg_t * msg, Buf buffer, uint32_t array_len; xassert(msg != NULL); - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + packstr(msg->name, buffer); + pack_time(msg->start_time, buffer); + pack_time(msg->end_time, buffer); + pack32(msg->duration, buffer); + pack16(msg->flags, buffer); + if (msg->node_cnt) { + for (array_len = 0; msg->node_cnt[array_len]; + array_len++) { + /* determine array length */ + } + array_len++; /* Include trailing zero */ + } else + array_len = 0; + pack32_array(msg->node_cnt, array_len, buffer); + pack32(msg->core_cnt, buffer); + packstr(msg->node_list, buffer); + packstr(msg->features, buffer); + packstr(msg->licenses, buffer); + packstr(msg->partition, buffer); + + packstr(msg->users, buffer); + packstr(msg->accounts, buffer); + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { packstr(msg->name, buffer); pack_time(msg->start_time, buffer); pack_time(msg->end_time, buffer); @@ -3213,7 +3236,36 @@ _unpack_update_resv_msg(resv_desc_msg_t ** msg, Buf buffer, tmp_ptr = xmalloc(sizeof(resv_desc_msg_t)); *msg = tmp_ptr; - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc(&tmp_ptr->name, &uint32_tmp, buffer); + safe_unpack_time(&tmp_ptr->start_time, buffer); + safe_unpack_time(&tmp_ptr->end_time, buffer); + safe_unpack32(&tmp_ptr->duration, buffer); + safe_unpack16(&tmp_ptr->flags, buffer); + safe_unpack32_array(&tmp_ptr->node_cnt, &uint32_tmp, buffer); + if (uint32_tmp > 0) { + /* Must be zero terminated */ + if (tmp_ptr->node_cnt[uint32_tmp-1] != 0) + goto unpack_error; + } else { + /* This avoids a pointer to a zero length buffer */ + xfree(tmp_ptr->node_cnt); + } + safe_unpack32(&tmp_ptr->core_cnt, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->node_list, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->features, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->licenses, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->partition, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&tmp_ptr->users, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&tmp_ptr->accounts, + &uint32_tmp, buffer); + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { safe_unpackstr_xmalloc(&tmp_ptr->name, &uint32_tmp, buffer); safe_unpack_time(&tmp_ptr->start_time, buffer); safe_unpack_time(&tmp_ptr->end_time, buffer); @@ -3973,7 +4025,28 @@ _unpack_reserve_info_members(reserve_info_t * resv, Buf buffer, char *node_inx_str = NULL; uint32_t uint32_tmp; - if(protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc(&resv->accounts, &uint32_tmp, buffer); + safe_unpack_time(&resv->end_time, buffer); + safe_unpackstr_xmalloc(&resv->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv->licenses, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv->name, &uint32_tmp, buffer); + safe_unpack32(&resv->node_cnt, buffer); + safe_unpack32(&resv->core_cnt, buffer); + safe_unpackstr_xmalloc(&resv->node_list,&uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv->partition,&uint32_tmp, buffer); + safe_unpack_time(&resv->start_time, buffer); + safe_unpack16(&resv->flags, buffer); + safe_unpackstr_xmalloc(&resv->users, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + resv->node_inx = bitfmt2int(""); + else { + resv->node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + node_inx_str = NULL; + } + } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { safe_unpackstr_xmalloc(&resv->accounts, &uint32_tmp, buffer); safe_unpack_time(&resv->end_time, buffer); safe_unpackstr_xmalloc(&resv->features, &uint32_tmp, buffer); diff --git a/src/plugins/sched/backfill/backfill.c b/src/plugins/sched/backfill/backfill.c index d482df66e3..766f34f928 100644 --- a/src/plugins/sched/backfill/backfill.c +++ b/src/plugins/sched/backfill/backfill.c @@ -146,7 +146,7 @@ static bool _test_resv_overlap(node_space_map_t *node_space, uint32_t end_reserve); static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes); + uint32_t req_nodes, bitstr_t *exc_core_bitmap); /* Log resource allocate table */ static void _dump_node_space_table(node_space_map_t *node_space_ptr) @@ -240,11 +240,12 @@ static int _num_feature_count(struct job_record *job_ptr) /* Attempt to schedule a specific job on specific available nodes * IN job_ptr - job to schedule * IN/OUT avail_bitmap - nodes available/selected to use + * IN exc_core_bitmap - cores which can not be used * RET SLURM_SUCCESS on success, otherwise an error code */ static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, uint32_t min_nodes, uint32_t max_nodes, - uint32_t req_nodes) + uint32_t req_nodes, bitstr_t *exc_core_bitmap) { bitstr_t *tmp_bitmap; int rc = SLURM_SUCCESS; @@ -289,7 +290,8 @@ static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, rc = select_g_job_test(job_ptr, *avail_bitmap, high_cnt, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); } /* Restore the feature counts */ @@ -306,15 +308,26 @@ static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, * then on shared nodes (if so configured). */ uint16_t orig_shared; time_t now = time(NULL); + char str[100]; + preemptee_candidates = slurm_find_preemptable_jobs(job_ptr); orig_shared = job_ptr->details->shared; job_ptr->details->shared = 0; tmp_bitmap = bit_copy(*avail_bitmap); + + if (exc_core_bitmap){ + bit_fmt(str, (sizeof(str) - 1), exc_core_bitmap); + debug2(" _try_sched with exclude core bitmap: %s",str); + } + rc = select_g_job_test(job_ptr, *avail_bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); + job_ptr->details->shared = orig_shared; + if (((rc != SLURM_SUCCESS) || (job_ptr->start_time > now)) && (orig_shared != 0)) { FREE_NULL_BITMAP(*avail_bitmap); @@ -322,7 +335,8 @@ static int _try_sched(struct job_record *job_ptr, bitstr_t **avail_bitmap, rc = select_g_job_test(job_ptr, *avail_bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); } else FREE_NULL_BITMAP(tmp_bitmap); } @@ -506,6 +520,7 @@ static int _attempt_backfill(void) uint32_t time_limit, comp_time_limit, orig_time_limit; uint32_t min_nodes, max_nodes, req_nodes; bitstr_t *avail_bitmap = NULL, *resv_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; time_t now, sched_start, later_start, start_res; node_space_map_t *node_space; struct timeval bf_time1, bf_time2; @@ -686,7 +701,9 @@ static int _attempt_backfill(void) TRY_LATER: FREE_NULL_BITMAP(avail_bitmap); start_res = later_start; later_start = 0; - j = job_test_resv(job_ptr, &start_res, true, &avail_bitmap); + exc_core_bitmap = NULL; + j = job_test_resv(job_ptr, &start_res, true, &avail_bitmap, + &exc_core_bitmap); if (j != SLURM_SUCCESS) { job_ptr->time_limit = orig_time_limit; continue; @@ -773,10 +790,8 @@ static int _attempt_backfill(void) job_ptr->job_id); slurmctld_diag_stats.bf_last_depth_try++; - j = _try_sched(job_ptr, &avail_bitmap, - min_nodes, max_nodes, req_nodes); - debug2("backfill: finished _try_sched for job %u.", - job_ptr->job_id); + j = _try_sched(job_ptr, &avail_bitmap, min_nodes, max_nodes, + req_nodes, exc_core_bitmap); now = time(NULL); if (j != SLURM_SUCCESS) { job_ptr->time_limit = orig_time_limit; diff --git a/src/plugins/sched/builtin/builtin.c b/src/plugins/sched/builtin/builtin.c index 25481ae844..b581a0d5b3 100644 --- a/src/plugins/sched/builtin/builtin.c +++ b/src/plugins/sched/builtin/builtin.c @@ -147,6 +147,7 @@ static void _compute_start_times(void) struct job_record *job_ptr; struct part_record *part_ptr; bitstr_t *alloc_bitmap = NULL, *avail_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; uint32_t max_nodes, min_nodes, req_nodes, time_limit; time_t now = time(NULL), sched_start, last_job_alloc; @@ -193,14 +194,16 @@ static void _compute_start_times(void) continue; } - j = job_test_resv(job_ptr, &now, true, &avail_bitmap); + j = job_test_resv(job_ptr, &now, true, &avail_bitmap, + &exc_core_bitmap); if (j != SLURM_SUCCESS) continue; rc = select_g_job_test(job_ptr, avail_bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); if (rc == SLURM_SUCCESS) { last_job_update = now; if (job_ptr->time_limit == INFINITE) diff --git a/src/plugins/sched/wiki2/job_will_run.c b/src/plugins/sched/wiki2/job_will_run.c index 48e3fbf1ef..13eeeedeba 100644 --- a/src/plugins/sched/wiki2/job_will_run.c +++ b/src/plugins/sched/wiki2/job_will_run.c @@ -129,6 +129,7 @@ static char * _will_run_test(uint32_t jobid, time_t start_time, struct job_record *job_ptr = NULL; struct part_record *part_ptr; bitstr_t *avail_bitmap = NULL, *resv_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; char *hostlist, *reply_msg = NULL; uint32_t min_nodes, max_nodes, req_nodes; int rc; @@ -173,7 +174,8 @@ static char * _will_run_test(uint32_t jobid, time_t start_time, /* Enforce reservation: access control, time and nodes */ start_res = start_time; - rc = job_test_resv(job_ptr, &start_res, true, &resv_bitmap); + rc = job_test_resv(job_ptr, &start_res, true, &resv_bitmap, + &exc_core_bitmap); if (rc != SLURM_SUCCESS) { *err_code = -730; *err_msg = "Job denied access to reservation"; @@ -253,7 +255,7 @@ static char * _will_run_test(uint32_t jobid, time_t start_time, rc = select_g_job_test(job_ptr, avail_bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, NULL); + preemptee_candidates, NULL, exc_core_bitmap); if (preemptee_candidates) list_destroy(preemptee_candidates); @@ -412,6 +414,7 @@ static char * _will_run_test2(uint32_t jobid, time_t start_time, struct job_record *job_ptr = NULL, *pre_ptr; struct part_record *part_ptr; bitstr_t *avail_bitmap = NULL, *resv_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; time_t start_res; uint32_t min_nodes, max_nodes, req_nodes; List preemptee_candidates = NULL, preempted_jobs = NULL; @@ -455,7 +458,8 @@ static char * _will_run_test2(uint32_t jobid, time_t start_time, /* Enforce reservation: access control, time and nodes */ start_res = start_time; - rc = job_test_resv(job_ptr, &start_res, true, &resv_bitmap); + rc = job_test_resv(job_ptr, &start_res, true, &resv_bitmap, + &exc_core_bitmap); if (rc != SLURM_SUCCESS) { *err_code = -730; *err_msg = "Job denied access to reservation"; @@ -540,7 +544,8 @@ static char * _will_run_test2(uint32_t jobid, time_t start_time, orig_start_time = job_ptr->start_time; rc = select_g_job_test(job_ptr, avail_bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, - preemptee_candidates, &preempted_jobs); + preemptee_candidates, &preempted_jobs, + exc_core_bitmap); if (preemptee_candidates) list_destroy(preemptee_candidates); diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 652df3a717..e69dc34d98 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -3250,7 +3250,8 @@ extern int select_p_reconfigure(void) #endif } -extern bitstr_t *select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t *select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + bitstr_t **core_bitmap) { #ifdef HAVE_BG /* Reserve a block of appropriate geometry by issuing a fake job diff --git a/src/plugins/select/cons_res/job_test.c b/src/plugins/select/cons_res/job_test.c index d401fa4d68..7a3fd25844 100644 --- a/src/plugins/select/cons_res/job_test.c +++ b/src/plugins/select/cons_res/job_test.c @@ -1877,11 +1877,17 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, int rc; uint16_t *cpu_cnt, *cpus = NULL; uint32_t start, n, a; + //char str[100]; bitstr_t *req_map = job_ptr->details->req_node_bitmap; if (bit_set_count(node_map) < min_nodes) return NULL; + //bit_fmt(str, (sizeof(str) - 1), node_map); + //info("ALEJ: _select_nodes nodemap: %s", str); + //bit_fmt(str, (sizeof(str) - 1), core_map); + //info("ALEJ: _select_nodes coremap: %s", str); + /* get resource usage for this job from each available node */ _get_res_usage(job_ptr, node_map, core_map, cr_node_cnt, node_usage, cr_type, &cpu_cnt, test_only); @@ -1904,6 +1910,9 @@ static uint16_t *_select_nodes(struct job_record *job_ptr, uint32_t min_nodes, return NULL; } + //bit_fmt(str, (sizeof(str) - 1), node_map); + //info("ALEJ: _select_nodes nodemap: %s", str); + /* choose the best nodes for the job */ rc = _choose_nodes(job_ptr, node_map, min_nodes, max_nodes, req_nodes, cr_node_cnt, cpu_cnt); @@ -1955,7 +1964,8 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, uint16_t cr_type, enum node_cr_state job_node_req, uint32_t cr_node_cnt, struct part_res_record *cr_part_ptr, - struct node_use_record *node_usage) + struct node_use_record *node_usage, + bitstr_t *exc_core_bitmap) { int error_code = SLURM_SUCCESS, ll; /* ll = layout array index */ uint16_t *layout_ptr = NULL; @@ -2095,6 +2105,17 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_copybits(bitmap, orig_map); bit_copybits(free_cores, avail_cores); + if (exc_core_bitmap) { + char str[100]; + + bit_fmt(str, (sizeof(str) - 1), exc_core_bitmap); + debug2("excluding cores reserved: %s", str); + + bit_not(exc_core_bitmap); + bit_and(free_cores, exc_core_bitmap); + bit_not(exc_core_bitmap); + } + /* remove all existing allocations from free_cores */ tmpcore = bit_copy(free_cores); for (p_ptr = cr_part_ptr; p_ptr; p_ptr = p_ptr->next) { @@ -2111,6 +2132,7 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, cpu_count = _select_nodes(job_ptr, min_nodes, max_nodes, req_nodes, bitmap, cr_node_cnt, free_cores, node_usage, cr_type, test_only); + if ((cpu_count) && (job_ptr->best_switch)) { /* job fits! We're done. */ if (select_debug_flags & DEBUG_FLAG_CPU_BIND) { @@ -2141,6 +2163,12 @@ extern int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, bit_copybits(bitmap, orig_map); bit_copybits(free_cores, avail_cores); + if (exc_core_bitmap) { + bit_not(exc_core_bitmap); + bit_and(free_cores, exc_core_bitmap); + bit_not(exc_core_bitmap); + } + for (jp_ptr = cr_part_ptr; jp_ptr; jp_ptr = jp_ptr->next) { if (jp_ptr->part_ptr == job_ptr->part_ptr) break; diff --git a/src/plugins/select/cons_res/job_test.h b/src/plugins/select/cons_res/job_test.h index 38a28fe6bd..4a2ad6b5e4 100644 --- a/src/plugins/select/cons_res/job_test.h +++ b/src/plugins/select/cons_res/job_test.h @@ -66,6 +66,6 @@ int cr_job_test(struct job_record *job_ptr, bitstr_t *bitmap, int mode, uint16_t cr_type, enum node_cr_state job_node_req, uint32_t cr_node_cnt, struct part_res_record *cr_part_ptr, - struct node_use_record *node_usage); + struct node_use_record *node_usage, bitstr_t *exc_core_bitmap); #endif /* !_CR_JOB_TEST_H */ diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index 2c6f5c1cdf..c3604a9bcf 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -207,7 +207,8 @@ static int _rm_job_from_res(struct part_res_record *part_record_ptr, static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t job_node_req, - List preemptee_candidates, List *preemptee_job_list); + List preemptee_candidates, List *preemptee_job_list, + bitstr_t *exc_core_bitmap); static int _sort_usable_nodes_dec(struct job_record *job_a, struct job_record *job_b); static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, @@ -216,7 +217,8 @@ static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t job_node_req, - List preemptee_candidates, List *preemptee_job_list); + List preemptee_candidates, List *preemptee_job_list, + bitstr_t *exc_core_bitmap); static void _dump_job_res(struct job_resources *job) { char str[64]; @@ -1497,7 +1499,7 @@ static int _test_only(struct job_record *job_ptr, bitstr_t *bitmap, rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_TEST_ONLY, cr_type, job_node_req, select_node_cnt, select_part_record, - select_node_usage); + select_node_usage, NULL); return rc; } @@ -1520,7 +1522,8 @@ static int _sort_usable_nodes_dec(struct job_record *job_a, static int _run_now(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t job_node_req, - List preemptee_candidates, List *preemptee_job_list) + List preemptee_candidates, List *preemptee_job_list, + bitstr_t *exc_core_bitmap) { int rc; bitstr_t *orig_map = NULL, *save_bitmap; @@ -1540,7 +1543,7 @@ top: orig_map = bit_copy(save_bitmap); rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_RUN_NOW, cr_type, job_node_req, select_node_cnt, select_part_record, - select_node_usage); + select_node_usage, exc_core_bitmap); if ((rc != SLURM_SUCCESS) && preemptee_candidates) { /* Remove preemptable jobs from simulated environment */ @@ -1580,7 +1583,8 @@ top: orig_map = bit_copy(save_bitmap); SELECT_MODE_WILL_RUN, cr_type, job_node_req, select_node_cnt, - future_part, future_usage); + future_part, future_usage, + exc_core_bitmap); tmp_job_ptr->details->usable_nodes = 0; /* * If successful, set the last job's usable count to a @@ -1666,7 +1670,8 @@ top: orig_map = bit_copy(save_bitmap); static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t job_node_req, - List preemptee_candidates, List *preemptee_job_list) + List preemptee_candidates, List *preemptee_job_list, + bitstr_t *exc_core_bitmap) { struct part_res_record *future_part; struct node_use_record *future_usage; @@ -1685,7 +1690,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, cr_type, job_node_req, select_node_cnt, select_part_record, - select_node_usage); + select_node_usage, exc_core_bitmap); if (rc == SLURM_SUCCESS) { FREE_NULL_BITMAP(orig_map); job_ptr->start_time = time(NULL); @@ -1743,7 +1748,7 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, rc = cr_job_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, cr_type, job_node_req, select_node_cnt, future_part, - future_usage); + future_usage, exc_core_bitmap); if (rc == SLURM_SUCCESS) job_ptr->start_time = now + 1; } @@ -1769,7 +1774,8 @@ static int _will_run_test(struct job_record *job_ptr, bitstr_t *bitmap, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, cr_type, job_node_req, select_node_cnt, - future_part, future_usage); + future_part, future_usage, + exc_core_bitmap); if (rc == SLURM_SUCCESS) { if (tmp_job_ptr->end_time <= now) job_ptr->start_time = now + 1; @@ -1993,7 +1999,8 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, uint16_t mode, List preemptee_candidates, - List *preemptee_job_list) + List *preemptee_job_list, + bitstr_t *exc_core_bitmap) { int rc = EINVAL; uint16_t job_node_req; @@ -2001,6 +2008,7 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, xassert(bitmap); + debug2("select_p_job_test for job %u", job_ptr->job_id); if (!debug_check) { debug_check = true; if (slurm_get_debug_flags() & DEBUG_FLAG_CPU_BIND) @@ -2025,14 +2033,16 @@ extern int select_p_job_test(struct job_record *job_ptr, bitstr_t * bitmap, if (mode == SELECT_MODE_WILL_RUN) { rc = _will_run_test(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, job_node_req, - preemptee_candidates, preemptee_job_list); + preemptee_candidates, preemptee_job_list, + exc_core_bitmap); } else if (mode == SELECT_MODE_TEST_ONLY) { rc = _test_only(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, job_node_req); } else if (mode == SELECT_MODE_RUN_NOW) { rc = _run_now(job_ptr, bitmap, min_nodes, max_nodes, req_nodes, job_node_req, - preemptee_candidates, preemptee_job_list); + preemptee_candidates, preemptee_job_list, + exc_core_bitmap); } else fatal("select_p_job_test: Mode %d is invalid", mode); @@ -2213,7 +2223,7 @@ extern select_nodeinfo_t *select_p_select_nodeinfo_alloc(void) extern int select_p_select_nodeinfo_free(select_nodeinfo_t *nodeinfo) { - if(nodeinfo) { + if (nodeinfo) { if (nodeinfo->magic != NODEINFO_MAGIC) { error("select_p_select_nodeinfo_free: " "nodeinfo magic bad"); @@ -2524,6 +2534,122 @@ extern int select_p_reconfigure(void) return SLURM_SUCCESS; } +/* given an "avail" node_bitmap, return a corresponding "avail" core_bitmap */ +/* DUPLICATE CODE: see job_test.c */ +/* Adding a filter for setting cores based on avail bitmap */ +bitstr_t *_make_core_bitmap_filtered(bitstr_t *node_map, int filter) +{ + uint32_t n, c, nodes, size; + uint32_t coff; + + nodes = bit_size(node_map); + size = cr_get_coremap_offset(nodes); + bitstr_t *core_map = bit_alloc(size); + if (!core_map) + return NULL; + + if (!filter) + return core_map; + + nodes = bit_size(node_map); + for (n = 0, c = 0; n < nodes; n++) { + if (bit_test(node_map, n)) { + coff = cr_get_coremap_offset(n+1); + while (c < coff) { + bit_set(core_map, c++); + } + } + } + return core_map; +} + +/* Once here, avail_bitmap has nodes not used by any job or reservation */ +bitstr_t *sequential_pick(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap) +{ + bitstr_t *sp_avail_bitmap; + char str[100]; + /* Just allowing symetric requests today */ + uint32_t cores_per_node = core_cnt / MAX(node_cnt, 1); + + debug2("reserving %d cores per node in %d nodes", + cores_per_node, node_cnt); + + sp_avail_bitmap = bit_alloc(bit_size(avail_bitmap)); + if (sp_avail_bitmap == NULL) { + fatal ("memory allocation failure"); + } + + bit_fmt(str, (sizeof(str) - 1), avail_bitmap); + bit_fmt(str, (sizeof(str) - 1), sp_avail_bitmap); + + if (core_cnt) { /* Reservation is using partial nodes */ + *core_bitmap = _make_core_bitmap_filtered(avail_bitmap, 0); + + while (core_cnt) { + uint32_t inx, coff; + int i; + + inx = bit_ffs(avail_bitmap); + if (inx < 0) + break; + + coff = cr_get_coremap_offset(inx); + + for (i = 0; i < cores_per_node; i++) { + /* TODO: checking cores_per_nodes is lower + * than real cores per node */ + bit_set(*core_bitmap, coff++); + core_cnt--; + } + + /* Add this node to the final node bitmap */ + bit_set(sp_avail_bitmap, inx); + + /* Clear this node from the initial available bitmap */ + bit_clear(avail_bitmap, inx); + } + + bit_fmt(str, (sizeof(str) - 1), *core_bitmap); + + if (core_cnt) { + info("reservation request can not be satisfied"); + FREE_NULL_BITMAP(sp_avail_bitmap); + return NULL; + } + + } else { /* Reservation is using full nodes */ + + while (node_cnt) { + uint32_t inx; + + inx = bit_ffs(avail_bitmap); + if (inx < 0) + break; + + /* Add this node to the final node bitmap */ + bit_set(sp_avail_bitmap, inx); + node_cnt--; + + /* Clear this node from the initial available bitmap */ + bit_clear(avail_bitmap, inx); + } + + if (node_cnt) { + info("reservation request can not be satisfied"); + FREE_NULL_BITMAP(sp_avail_bitmap); + return NULL; + } + + } + + //bit_fmt(str, (sizeof(str) - 1), sp_avail_bitmap); + //info("sequential pick using nodemap: %s", str); + + + return sp_avail_bitmap; +} + /* * select_p_resv_test - Identify the nodes which "best" satisfy a reservation * request. "best" is defined as either single set of consecutive nodes @@ -2531,9 +2657,11 @@ extern int select_p_reconfigure(void) * OR the fewest number of consecutive node sets * IN avail_bitmap - nodes available for the reservation * IN node_cnt - count of required nodes + * IN core_bitmap - cores which can not be used for this reservation * RET - nodes selected for use by the reservation */ -extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap) { bitstr_t **switches_bitmap; /* nodes on this switch */ int *switches_cpu_cnt; /* total CPUs on switch */ @@ -2541,7 +2669,8 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) int *switches_required; /* set if has required node */ bitstr_t *avail_nodes_bitmap = NULL; /* nodes on any switch */ - int rem_nodes; /* remaining resources desired */ + bitstr_t *sp_avail_bitmap; + int rem_nodes, rem_cores; /* remaining resources desired */ int i, j; int best_fit_inx, first, last; int best_fit_nodes; @@ -2549,13 +2678,18 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) bool sufficient; xassert(avail_bitmap); - if (!switch_record_cnt || !switch_record_table) - return bit_pick_cnt(avail_bitmap, node_cnt); + + if (!switch_record_cnt || !switch_record_table) { + return sequential_pick(avail_bitmap, node_cnt, core_cnt, + core_bitmap); + } /* Use topology state information */ if (bit_set_count(avail_bitmap) < node_cnt) return avail_nodes_bitmap; + rem_nodes = node_cnt; + rem_cores = core_cnt; /* Construct a set of switch array entries, * use the same indexes as switch_record_table in slurmctld */ @@ -2563,11 +2697,27 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) switches_cpu_cnt = xmalloc(sizeof(int) * switch_record_cnt); switches_node_cnt = xmalloc(sizeof(int) * switch_record_cnt); switches_required = xmalloc(sizeof(int) * switch_record_cnt); + for (i=0; i= rem_nodes); + sufficient = (switches_node_cnt[j] >= rem_nodes) && + (switches_cpu_cnt[j] >= core_cnt); /* If first possibility OR */ /* first set large enough for request OR */ /* tightest fit (less resource waste) OR */ @@ -2655,6 +2808,8 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) } bit_set(avail_nodes_bitmap, i); + if (core_cnt) + rem_cores -= cr_node_num_cores[i]; if (--rem_nodes <= 0) break; } @@ -2665,11 +2820,61 @@ extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) fini: for (i=0; i bit_size(avail_bitmap))) + break; + + debug2("Using node inx %d cores_per_node: %d " + "core_cnt: %d", inx, cores_per_node, core_cnt); + coff = cr_get_coremap_offset(inx); + + for (i = 0; i < cores_per_node; i++){ + /* TODO: checking cores_per_nodes is lower + * than real cores per node */ + bit_set(*core_bitmap, coff++); + core_cnt--; + } + + /* Add this node to the final node bitmap */ + bit_set(sp_avail_bitmap, inx); + + /* Clear this node from the initial available bitmap */ + bit_clear(avail_bitmap, inx); + } + + //bit_fmt(str, (sizeof(str) - 1), *core_bitmap); + //info("ALEJ: sequential pick using coremap: %s", str); + + if (core_cnt) { + info("reservation request can not be satisfied"); + FREE_NULL_BITMAP(sp_avail_bitmap); + return NULL; + } + return sp_avail_bitmap; + } + return avail_nodes_bitmap; } diff --git a/src/plugins/select/cray/other_select.c b/src/plugins/select/cray/other_select.c index 33fd41b29d..cac5b2910c 100644 --- a/src/plugins/select/cray/other_select.c +++ b/src/plugins/select/cray/other_select.c @@ -741,12 +741,14 @@ extern int other_reconfigure (void) * IN node_cnt - count of required nodes * RET - nodes selected for use by the reservation */ -extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap) { if (other_select_init() < 0) return NULL; - return (*(ops.resv_test))(avail_bitmap, node_cnt); + return (*(ops.resv_test))(avail_bitmap, node_cnt, core_cnt, + core_bitmap); } extern void other_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) diff --git a/src/plugins/select/cray/other_select.h b/src/plugins/select/cray/other_select.h index 39da3a101b..2a6dc28e98 100644 --- a/src/plugins/select/cray/other_select.h +++ b/src/plugins/select/cray/other_select.h @@ -378,7 +378,8 @@ extern int other_pack_select_info(time_t last_query_time, uint16_t show_flags, /* Note reconfiguration or change in partition configuration */ extern int other_reconfigure(void); -extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt); +extern bitstr_t * other_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap); extern void other_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check); extern void other_ba_fini(void); diff --git a/src/plugins/select/cray/select_cray.c b/src/plugins/select/cray/select_cray.c index 3f06d0293f..8c7c53361e 100644 --- a/src/plugins/select/cray/select_cray.c +++ b/src/plugins/select/cray/select_cray.c @@ -816,9 +816,10 @@ extern int select_p_reconfigure(void) return other_reconfigure(); } -extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + uint32_t core_cnt, bitstr_t **core_bitmap) { - return other_resv_test(avail_bitmap, node_cnt); + return other_resv_test(avail_bitmap, node_cnt, core_cnt, core_bitmap); } extern void select_p_ba_init(node_info_msg_t *node_info_ptr, bool sanity_check) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index f875beab8e..d2e8364c2d 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -3342,7 +3342,8 @@ extern int select_p_reconfigure(void) * IN node_cnt - count of required nodes * RET - nodes selected for use by the reservation */ -extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt) +extern bitstr_t * select_p_resv_test(bitstr_t *avail_bitmap, uint32_t node_cnt, + bitstr_t **core_bitmap) { bitstr_t **switches_bitmap; /* nodes on this switch */ int *switches_cpu_cnt; /* total CPUs on switch */ diff --git a/src/scontrol/create_res.c b/src/scontrol/create_res.c index 6a0704f2e9..a4026ea158 100644 --- a/src/scontrol/create_res.c +++ b/src/scontrol/create_res.c @@ -290,6 +290,14 @@ scontrol_parse_res_options(int argc, char *argv[], const char *msg, tok = strtok_r(NULL, ",", &ptrptr); } xfree(node_cnt); + + } else if (strncasecmp(tag, "CoreCnt", MAX(taglen,5)) == 0 || + strncasecmp(tag, "CoreCount", MAX(taglen,5)) == 0 || + strncasecmp(tag, "CPUCnt", MAX(taglen,5)) == 0 || + strncasecmp(tag, "CPUCount", MAX(taglen,5)) == 0) { + char *endptr = NULL; + resv_msg_ptr->core_cnt = strtol(val, &endptr, 10); + } else if (strncasecmp(tag, "Nodes", MAX(taglen, 5)) == 0) { resv_msg_ptr->node_list = val; @@ -499,13 +507,14 @@ scontrol_create_res(int argc, char *argv[]) * If the following parameters are null, but a partition is named, then * make the reservation for the whole partition. */ - if ((resv_msg.node_cnt == NULL || resv_msg.node_cnt[0] == 0) && + if ((resv_msg.core_cnt == 0) && + (resv_msg.node_cnt == NULL || resv_msg.node_cnt[0] == 0) && (resv_msg.node_list == NULL || resv_msg.node_list[0] == '\0') && (resv_msg.licenses == NULL || resv_msg.licenses[0] == '\0')) { if (resv_msg.partition == NULL) { exit_code = 1; - error("Nodes, NodeCnt or Licenses must be specified. " - "No reservation created."); + error("CoreCnt, Nodes, NodeCnt or Licenses must be " + "specified. No reservation created."); goto SCONTROL_CREATE_RES_CLEANUP; } else if ((node_count = _partition_node_count(resv_msg.partition)) == NO_VAL) { diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index c982bfc900..06b20bc841 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -1718,6 +1718,7 @@ extern int job_start_data(job_desc_msg_t *job_desc_msg, struct job_record *job_ptr; struct part_record *part_ptr; bitstr_t *avail_bitmap = NULL, *resv_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; uint32_t min_nodes, max_nodes, req_nodes; int i, rc = SLURM_SUCCESS; time_t now = time(NULL), start_res, orig_start_time = (time_t) 0; @@ -1772,7 +1773,8 @@ extern int job_start_data(job_desc_msg_t *job_desc_msg, start_res = job_ptr->details->begin_time; else start_res = now; - i = job_test_resv(job_ptr, &start_res, false, &resv_bitmap); + i = job_test_resv(job_ptr, &start_res, false, &resv_bitmap, + &exc_core_bitmap); if (i != SLURM_SUCCESS) return i; bit_and(avail_bitmap, resv_bitmap); @@ -1809,7 +1811,7 @@ extern int job_start_data(job_desc_msg_t *job_desc_msg, min_nodes, max_nodes, req_nodes, SELECT_MODE_WILL_RUN, preemptee_candidates, - &preemptee_job_list); + &preemptee_job_list, exc_core_bitmap); } if (rc == SLURM_SUCCESS) { diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 136a8d06c4..47861b9063 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -116,7 +116,8 @@ static int _pick_best_nodes(struct node_set *node_set_ptr, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, bool test_only, List preemptee_candidates, - List *preemptee_job_list, bool has_xand); + List *preemptee_job_list, bool has_xand, + bitstr_t *exc_node_bitmap); static bool _valid_feature_counts(struct job_details *detail_ptr, bitstr_t *node_bitmap, bool *has_xor); static bitstr_t *_valid_features(struct job_details *detail_ptr, @@ -479,6 +480,7 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, int error_code = SLURM_SUCCESS, i; bitstr_t *feature_bitmap, *accumulate_bitmap = NULL; bitstr_t *save_avail_node_bitmap = NULL, *resv_bitmap = NULL; + bitstr_t *exc_core_bitmap = NULL; List preemptee_candidates = NULL; bool has_xand = false; @@ -487,7 +489,8 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, * of select_bitmap to those nodes */ if (job_ptr->resv_name == NULL) { time_t start_res = time(NULL); - rc = job_test_resv(job_ptr, &start_res, false, &resv_bitmap); + rc = job_test_resv(job_ptr, &start_res, false, &resv_bitmap, + &exc_core_bitmap); if ((rc != SLURM_SUCCESS) || (bit_set_count(resv_bitmap) < min_nodes) || (job_ptr->details->req_node_bitmap && @@ -503,6 +506,12 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, avail_node_bitmap = resv_bitmap; } else FREE_NULL_BITMAP(resv_bitmap); + } else { + time_t start_res = time(NULL); + rc = job_test_resv(job_ptr, &start_res, false, &resv_bitmap, + &exc_core_bitmap); + /* We do not care about return value. + * We are just interested in exc_core_bitmap creation */ } /* save job and request state */ @@ -575,7 +584,8 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, job_ptr, part_ptr, min_nodes, max_nodes, req_nodes, test_only, preemptee_candidates, - preemptee_job_list, false); + preemptee_job_list, false, + exc_core_bitmap); #if 0 { char *tmp_str = bitmap2node_name(feature_bitmap); @@ -667,7 +677,7 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, select_bitmap, job_ptr, part_ptr, min_nodes, max_nodes, req_nodes, test_only, preemptee_candidates, preemptee_job_list, - has_xand); + has_xand, exc_core_bitmap); } #if 0 { @@ -708,6 +718,7 @@ _get_req_features(struct node_set *node_set_ptr, int node_set_size, * IN req_nodes - requested (or desired) count of nodes * IN test_only - do not actually allocate resources * IN/OUT preemptee_job_list - list of pointers to jobs to be preempted + * IN exc_core_bitmap - cores which can not be used * NULL on first entry * IN has_xand - set of the constraint list includes XAND operators *and* * we have already satisfied them all @@ -740,7 +751,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, struct part_record *part_ptr, uint32_t min_nodes, uint32_t max_nodes, uint32_t req_nodes, bool test_only, List preemptee_candidates, - List *preemptee_job_list, bool has_xand) + List *preemptee_job_list, bool has_xand, + bitstr_t *exc_core_bitmap) { int error_code = SLURM_SUCCESS, i, j, pick_code; int total_nodes = 0, avail_nodes = 0; @@ -770,7 +782,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, 0, 0, 0, select_mode, preemptee_candidates, - preemptee_job_list); + preemptee_job_list, + exc_core_bitmap); if (pick_code == SLURM_SUCCESS) { *select_bitmap = avail_bitmap; @@ -985,7 +998,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, req_nodes, select_mode, preemptee_candidates, - preemptee_job_list); + preemptee_job_list, + exc_core_bitmap); #if 0 { char *tmp_str1 = bitmap2node_name(backup_bitmap); @@ -1032,7 +1046,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, req_nodes, select_mode, preemptee_candidates, - preemptee_job_list); + preemptee_job_list, + exc_core_bitmap); if ((pick_code == SLURM_SUCCESS) && (bit_set_count(avail_bitmap) <= max_nodes)) { FREE_NULL_BITMAP(total_bitmap); @@ -1065,7 +1080,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, max_nodes, req_nodes, SELECT_MODE_TEST_ONLY, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); if (pick_code == SLURM_SUCCESS) { runable_ever = true; if (bit_set_count(avail_bitmap) <= @@ -1083,7 +1099,8 @@ _pick_best_nodes(struct node_set *node_set_ptr, int node_set_size, max_nodes, req_nodes, SELECT_MODE_TEST_ONLY, - preemptee_candidates, NULL); + preemptee_candidates, NULL, + exc_core_bitmap); if (pick_code == SLURM_SUCCESS) { FREE_NULL_BITMAP(possible_bitmap); possible_bitmap = total_bitmap; @@ -1712,12 +1729,16 @@ static int _build_node_list(struct job_record *job_ptr, /* Limit node selection to those in selected reservation */ time_t start_res = time(NULL); rc = job_test_resv(job_ptr, &start_res, false, - &usable_node_mask); + &usable_node_mask, NULL); if (rc != SLURM_SUCCESS) { job_ptr->state_reason = WAIT_RESERVATION; xfree(job_ptr->state_desc); if (rc == ESLURM_INVALID_TIME_VALUE) return ESLURM_RESERVATION_NOT_USABLE; + + if (rc == ESLURM_NODES_BUSY) + return ESLURM_NODES_BUSY; + /* Defunct reservation or accesss denied */ return ESLURM_REQUESTED_NODE_CONFIG_UNAVAILABLE; } diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 92d7483744..69ab8c7816 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -3148,7 +3148,7 @@ static void _slurm_rpc_resv_show(slurm_msg_t * msg) slurm_send_rc_msg(msg, SLURM_NO_CHANGE_IN_DATA); } else { lock_slurmctld(node_read_lock); - show_resv(&dump, &dump_size, uid); + show_resv(&dump, &dump_size, uid, msg->protocol_version); unlock_slurmctld(node_read_lock); END_TIMER2("_slurm_rpc_resv_show"); diff --git a/src/slurmctld/reservation.c b/src/slurmctld/reservation.c index 397b594587..b42d5e5bbc 100644 --- a/src/slurmctld/reservation.c +++ b/src/slurmctld/reservation.c @@ -81,7 +81,9 @@ /* Change RESV_STATE_VERSION value when changing the state save format * Add logic to permit reading of the previous version's state in order * to avoid losing reservations between releases major SLURM updates. */ -#define RESV_STATE_VERSION "VER003" +#define RESV_STATE_VERSION "VER004" +#define RESV_2_5_STATE_VERSION "VER004" +#define RESV_2_4_STATE_VERSION "VER003" time_t last_resv_update = (time_t) 0; List resv_list = (List) NULL; @@ -112,12 +114,14 @@ static bool _job_overlap(time_t start_time, uint16_t flags, static List _list_dup(List license_list); static int _open_resv_state_file(char **state_file); static void _pack_resv(slurmctld_resv_t *resv_ptr, Buf buffer, - bool internal); + bool internal, uint16_t protocol_version); static bitstr_t *_pick_idle_nodes(bitstr_t *avail_nodes, - resv_desc_msg_t *resv_desc_ptr); + resv_desc_msg_t *resv_desc_ptr, + bitstr_t **core_bitmap); static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, resv_desc_msg_t *resv_desc_ptr, - uint32_t node_cnt); + uint32_t node_cnt, + bitstr_t **core_bitmap); static int _post_resv_create(slurmctld_resv_t *resv_ptr); static int _post_resv_delete(slurmctld_resv_t *resv_ptr); static int _post_resv_update(slurmctld_resv_t *resv_ptr, @@ -128,7 +132,7 @@ static bool _resv_overlap(time_t start_time, time_t end_time, slurmctld_resv_t *this_resv_ptr); static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, struct part_record **part_ptr, - bitstr_t **resv_bitmap); + bitstr_t **resv_bitmap, bitstr_t **core_bitmap); static int _set_assoc_list(slurmctld_resv_t *resv_ptr); static void _set_cpu_cnt(slurmctld_resv_t *resv_ptr); static void _set_nodes_maint(slurmctld_resv_t *resv_ptr, time_t now); @@ -1033,47 +1037,175 @@ static int _update_uid_list(slurmctld_resv_t *resv_ptr, char *users) * plus load_all_resv_state() below. */ static void _pack_resv(slurmctld_resv_t *resv_ptr, Buf buffer, - bool internal) + bool internal, uint16_t protocol_version) { #ifdef HAVE_BG uint32_t cnode_cnt; #endif - packstr(resv_ptr->accounts, buffer); - pack_time(resv_ptr->end_time, buffer); - packstr(resv_ptr->features, buffer); - packstr(resv_ptr->licenses, buffer); - packstr(resv_ptr->name, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + packstr(resv_ptr->accounts, buffer); + pack_time(resv_ptr->end_time, buffer); + packstr(resv_ptr->features, buffer); + packstr(resv_ptr->licenses, buffer); + packstr(resv_ptr->name, buffer); #ifdef HAVE_BG - if (!cnodes_per_bp) { - select_g_alter_node_cnt(SELECT_GET_NODE_SCALING, - &cnodes_per_bp); - } - cnode_cnt = resv_ptr->node_cnt; - if (cnodes_per_bp && !internal) - cnode_cnt *= cnodes_per_bp; - pack32(cnode_cnt, buffer); + if (!cnodes_per_bp) { + select_g_alter_node_cnt(SELECT_GET_NODE_SCALING, + &cnodes_per_bp); + } + cnode_cnt = resv_ptr->node_cnt; + if (cnodes_per_bp && !internal) + cnode_cnt *= cnodes_per_bp; + pack32(cnode_cnt, buffer); #else - pack32(resv_ptr->node_cnt, buffer); + pack32(resv_ptr->node_cnt, buffer); #endif - packstr(resv_ptr->node_list, buffer); - packstr(resv_ptr->partition, buffer); - pack_time(resv_ptr->start_time_first, buffer); - pack16(resv_ptr->flags, buffer); - packstr(resv_ptr->users, buffer); - - if (internal) { - packstr(resv_ptr->assoc_list, buffer); pack32(resv_ptr->cpu_cnt, buffer); - pack32(resv_ptr->resv_id, buffer); - pack_time(resv_ptr->start_time_prev, buffer); - pack_time(resv_ptr->start_time, buffer); - pack32(resv_ptr->duration, buffer); + packstr(resv_ptr->node_list, buffer); + packstr(resv_ptr->partition, buffer); + pack_time(resv_ptr->start_time_first, buffer); + pack16(resv_ptr->flags, buffer); + packstr(resv_ptr->users, buffer); + + if (internal) { + packstr(resv_ptr->assoc_list, buffer); + pack32(resv_ptr->resv_id, buffer); + pack_time(resv_ptr->start_time_prev, buffer); + pack_time(resv_ptr->start_time, buffer); + pack32(resv_ptr->duration, buffer); + pack_bit_fmt(resv_ptr->core_bitmap, buffer); + } else { + pack_bit_fmt(resv_ptr->node_bitmap, buffer); + } } else { - pack_bit_fmt(resv_ptr->node_bitmap, buffer); + packstr(resv_ptr->accounts, buffer); + pack_time(resv_ptr->end_time, buffer); + packstr(resv_ptr->features, buffer); + packstr(resv_ptr->licenses, buffer); + packstr(resv_ptr->name, buffer); +#ifdef HAVE_BG + if (!cnodes_per_bp) { + select_g_alter_node_cnt(SELECT_GET_NODE_SCALING, + &cnodes_per_bp); + } + cnode_cnt = resv_ptr->node_cnt; + if (cnodes_per_bp && !internal) + cnode_cnt *= cnodes_per_bp; + pack32(cnode_cnt, buffer); +#else + pack32(resv_ptr->node_cnt, buffer); +#endif + packstr(resv_ptr->node_list, buffer); + packstr(resv_ptr->partition, buffer); + pack_time(resv_ptr->start_time_first, buffer); + pack16(resv_ptr->flags, buffer); + packstr(resv_ptr->users, buffer); + + if (internal) { + packstr(resv_ptr->assoc_list, buffer); + pack32(resv_ptr->resv_id, buffer); + pack_time(resv_ptr->start_time_prev, buffer); + pack_time(resv_ptr->start_time, buffer); + pack32(resv_ptr->duration, buffer); + } else { + pack_bit_fmt(resv_ptr->node_bitmap, buffer); + } } } +slurmctld_resv_t *_load_reservation_state(Buf buffer, + uint16_t protocol_version) +{ + slurmctld_resv_t *resv_ptr; + uint32_t uint32_tmp; + char *core_inx_str = NULL; + + resv_ptr = xmalloc(sizeof(slurmctld_resv_t)); + xassert(resv_ptr->magic = RESV_MAGIC); /* Sets value */ + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc(&resv_ptr->accounts, + &uint32_tmp, buffer); + safe_unpack_time(&resv_ptr->end_time, buffer); + safe_unpackstr_xmalloc(&resv_ptr->features, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->licenses, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->name, &uint32_tmp, buffer); + + safe_unpack32(&resv_ptr->node_cnt, buffer); + safe_unpack32(&resv_ptr->cpu_cnt, buffer); + safe_unpackstr_xmalloc(&resv_ptr->node_list, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->partition, + &uint32_tmp, buffer); + safe_unpack_time(&resv_ptr->start_time_first, buffer); + safe_unpack16(&resv_ptr->flags, buffer); + safe_unpackstr_xmalloc(&resv_ptr->users,&uint32_tmp, buffer); + + /* Fields saved for internal use only (save state) */ + safe_unpackstr_xmalloc(&resv_ptr->assoc_list, + &uint32_tmp, buffer); + safe_unpack32(&resv_ptr->resv_id, buffer); + safe_unpack_time(&resv_ptr->start_time_prev, buffer); + safe_unpack_time(&resv_ptr->start_time, buffer); + safe_unpack32(&resv_ptr->duration, buffer); + safe_unpackstr_xmalloc(&core_inx_str, &uint32_tmp, buffer); + if (core_inx_str == NULL) { + debug2("Reservation %s has no core_bitmap", + resv_ptr->name); + } else { + struct node_record *node_ptr; + node_ptr = find_node_record(resv_ptr->node_list); + if (!node_ptr) { + error("could not find node %s for " + "reservation %s", resv_ptr->node_list, + resv_ptr->name); + xfree(core_inx_str); + goto unpack_error; + } + resv_ptr->core_bitmap = bit_alloc(node_ptr->cores); + bit_unfmt(resv_ptr->core_bitmap, core_inx_str); + info("Reservation %s has core_bitmap %s on node %s", + resv_ptr->name, core_inx_str, + resv_ptr->node_list); + xfree(core_inx_str); + } + } else { + safe_unpackstr_xmalloc(&resv_ptr->accounts, + &uint32_tmp, buffer); + safe_unpack_time(&resv_ptr->end_time, buffer); + safe_unpackstr_xmalloc(&resv_ptr->features, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->licenses, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->name, &uint32_tmp, buffer); + safe_unpack32(&resv_ptr->node_cnt, buffer); + safe_unpackstr_xmalloc(&resv_ptr->node_list, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&resv_ptr->partition, + &uint32_tmp, buffer); + safe_unpack_time(&resv_ptr->start_time_first, buffer); + safe_unpack16(&resv_ptr->flags, buffer); + safe_unpackstr_xmalloc(&resv_ptr->users,&uint32_tmp, buffer); + + /* Fields saved for internal use only (save state) */ + safe_unpackstr_xmalloc(&resv_ptr->assoc_list, + &uint32_tmp, buffer); + safe_unpack32(&resv_ptr->resv_id, buffer); + safe_unpack_time(&resv_ptr->start_time_prev, buffer); + safe_unpack_time(&resv_ptr->start_time, buffer); + safe_unpack32(&resv_ptr->duration, buffer); + safe_unpackstr_xmalloc(&core_inx_str, &uint32_tmp, buffer); + } + return resv_ptr; + +unpack_error: + error("Incomplete reservation state save file"); + _del_resv_rec(resv_ptr); + return NULL; +} + /* * Test if a new/updated reservation request will overlap running jobs * RET true if overlap @@ -1194,6 +1326,7 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) time_t now = time(NULL); struct part_record *part_ptr = NULL; bitstr_t *node_bitmap = NULL; + bitstr_t *core_bitmap = NULL; slurmctld_resv_t *resv_ptr; int account_cnt = 0, user_cnt = 0; char **account_list = NULL; @@ -1305,6 +1438,9 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) } } + if (resv_desc_ptr->core_cnt == NO_VAL) + resv_desc_ptr->core_cnt = 0; + #ifdef HAVE_BG if (!cnodes_per_bp) { select_g_alter_node_cnt(SELECT_GET_NODE_SCALING, @@ -1377,14 +1513,17 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) rc = ESLURM_NODES_BUSY; goto bad_parse; } + /* We do no allow to request cores with nodelist */ + resv_desc_ptr->core_cnt = 0; } else if (((resv_desc_ptr->node_cnt == NULL) || (resv_desc_ptr->node_cnt[0] == 0)) && + (resv_desc_ptr->core_cnt == 0) && ((resv_desc_ptr->flags & RESERVE_FLAG_LIC_ONLY) == 0)) { info("Reservation request lacks node specification"); rc = ESLURM_INVALID_NODE_NAME; goto bad_parse; - } else if ((rc = _select_nodes(resv_desc_ptr, &part_ptr, &node_bitmap)) - != SLURM_SUCCESS) { + } else if ((rc = _select_nodes(resv_desc_ptr, &part_ptr, &node_bitmap, + &core_bitmap)) != SLURM_SUCCESS) { goto bad_parse; } else { /* Get count of allocated nodes, on BlueGene systems, this @@ -1435,6 +1574,7 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) resv_ptr->node_list = resv_desc_ptr->node_list; resv_desc_ptr->node_list = NULL; /* Nothing left to free */ resv_ptr->node_bitmap = node_bitmap; /* May be unset */ + resv_ptr->core_bitmap = core_bitmap; /* May be unset */ resv_ptr->partition = resv_desc_ptr->partition; resv_desc_ptr->partition = NULL; /* Nothing left to free */ resv_ptr->part_ptr = part_ptr; @@ -1446,7 +1586,16 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) resv_ptr->user_cnt = user_cnt; resv_ptr->user_list = user_list; resv_desc_ptr->users = NULL; /* Nothing left to free */ - _set_cpu_cnt(resv_ptr); + + if (resv_desc_ptr->core_cnt == 0) { + debug2("reservation using full nodes"); + _set_cpu_cnt(resv_ptr); + } else { + debug2("reservation using partial nodes: core count %u", + resv_desc_ptr->core_cnt); + resv_ptr->cpu_cnt = resv_desc_ptr->core_cnt; + } + if((rc = _set_assoc_list(resv_ptr)) != SLURM_SUCCESS) goto bad_parse; @@ -1482,6 +1631,7 @@ extern int create_resv(resv_desc_msg_t *resv_desc_ptr) if (license_list) list_destroy(license_list); FREE_NULL_BITMAP(node_bitmap); + FREE_NULL_BITMAP(core_bitmap); xfree(user_list); return rc; } @@ -1503,7 +1653,6 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) int error_code = SLURM_SUCCESS, i, rc; char start_time[32], end_time[32]; char *name1, *name2, *val1, *val2; - struct part_record *part_ptr = NULL; if (!resv_list) resv_list = list_create(_del_resv_rec); @@ -1690,6 +1839,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) xfree(resv_desc_ptr->node_list); xfree(resv_ptr->node_list); FREE_NULL_BITMAP(resv_ptr->node_bitmap); + FREE_NULL_BITMAP(resv_ptr->core_bitmap); resv_ptr->node_bitmap = bit_alloc(node_record_count); if ((resv_desc_ptr->node_cnt == NULL) || (resv_desc_ptr->node_cnt[0] == 0)) { @@ -1705,6 +1855,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) if (strcasecmp(resv_desc_ptr->node_list, "ALL") == 0) { if ((resv_ptr->partition) && (resv_ptr->flags & RESERVE_FLAG_PART_NODES)) { + struct part_record *part_ptr = NULL; part_ptr = find_part_record(resv_ptr-> partition); node_bitmap = bit_copy(part_ptr->node_bitmap); @@ -1729,6 +1880,7 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr) } resv_desc_ptr->node_list = NULL; /* Nothing left to free */ FREE_NULL_BITMAP(resv_ptr->node_bitmap); + FREE_NULL_BITMAP(resv_ptr->core_bitmap); resv_ptr->node_bitmap = node_bitmap; resv_ptr->node_cnt = bit_set_count(resv_ptr->node_bitmap); } @@ -1901,7 +2053,8 @@ extern int delete_resv(reservation_name_msg_t *resv_desc_ptr) } /* Dump the reservation records to a buffer */ -extern void show_resv(char **buffer_ptr, int *buffer_size, uid_t uid) +extern void show_resv(char **buffer_ptr, int *buffer_size, uid_t uid, + uint16_t protocol_version) { ListIterator iter; slurmctld_resv_t *resv_ptr; @@ -1942,7 +2095,7 @@ extern void show_resv(char **buffer_ptr, int *buffer_size, uid_t uid) continue; } - _pack_resv(resv_ptr, buffer, false); + _pack_resv(resv_ptr, buffer, false, protocol_version); resv_packed++; } list_iterator_destroy(iter); @@ -1986,7 +2139,7 @@ extern int dump_all_resv_state(void) if (!iter) fatal("malloc: list_iterator_create"); while ((resv_ptr = (slurmctld_resv_t *) list_next(iter))) - _pack_resv(resv_ptr, buffer, true); + _pack_resv(resv_ptr, buffer, true, SLURM_PROTOCOL_VERSION); list_iterator_destroy(iter); old_file = xstrdup(slurmctld_conf.state_save_location); @@ -2026,11 +2179,11 @@ extern int dump_all_resv_state(void) (void) unlink(new_file); else { /* file shuffle */ (void) unlink(old_file); - if(link(reg_file, old_file)) + if (link(reg_file, old_file)) debug4("unable to create link for %s -> %s: %m", reg_file, old_file); (void) unlink(reg_file); - if(link(new_file, reg_file)) + if (link(new_file, reg_file)) debug4("unable to create link for %s -> %s: %m", new_file, reg_file); (void) unlink(new_file); @@ -2207,7 +2360,7 @@ static void _validate_node_choice(slurmctld_resv_t *resv_ptr) resv_desc.features = resv_ptr->features; resv_desc.node_cnt = xmalloc(sizeof(uint32_t) * 2); resv_desc.node_cnt[0]= resv_ptr->node_cnt - i; - i = _select_nodes(&resv_desc, &resv_ptr->part_ptr, &tmp_bitmap); + i = _select_nodes(&resv_desc, &resv_ptr->part_ptr, &tmp_bitmap, NULL); xfree(resv_desc.node_cnt); xfree(resv_desc.node_list); xfree(resv_desc.partition); @@ -2277,6 +2430,7 @@ extern int load_all_resv_state(int recover) int data_allocated, data_read = 0, error_code = 0, state_fd; Buf buffer; slurmctld_resv_t *resv_ptr = NULL; + uint16_t protocol_version = (uint16_t) NO_VAL; last_resv_update = time(NULL); if ((recover == 0) && resv_list) { @@ -2326,7 +2480,13 @@ extern int load_all_resv_state(int recover) safe_unpackstr_xmalloc( &ver_str, &uint32_tmp, buffer); debug3("Version string in resv_state header is %s", ver_str); - if ((!ver_str) || (strcmp(ver_str, RESV_STATE_VERSION) != 0)) { + if (ver_str) { + if (!strcmp(ver_str, RESV_STATE_VERSION)) + protocol_version = SLURM_PROTOCOL_VERSION; + else if (!strcmp(ver_str, RESV_2_4_STATE_VERSION)) + protocol_version = SLURM_2_4_PROTOCOL_VERSION; + } + if (protocol_version == (uint16_t) NO_VAL) { error("************************************************************"); error("Can not recover reservation state, data version incompatible"); error("************************************************************"); @@ -2340,33 +2500,9 @@ extern int load_all_resv_state(int recover) safe_unpack32(&top_suffix, buffer); while (remaining_buf(buffer) > 0) { - resv_ptr = xmalloc(sizeof(slurmctld_resv_t)); - xassert(resv_ptr->magic = RESV_MAGIC); /* Sets value */ - safe_unpackstr_xmalloc(&resv_ptr->accounts, - &uint32_tmp, buffer); - safe_unpack_time(&resv_ptr->end_time, buffer); - safe_unpackstr_xmalloc(&resv_ptr->features, - &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&resv_ptr->licenses, - &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&resv_ptr->name, &uint32_tmp, buffer); - safe_unpack32(&resv_ptr->node_cnt, buffer); - safe_unpackstr_xmalloc(&resv_ptr->node_list, - &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&resv_ptr->partition, - &uint32_tmp, buffer); - safe_unpack_time(&resv_ptr->start_time_first, buffer); - safe_unpack16(&resv_ptr->flags, buffer); - safe_unpackstr_xmalloc(&resv_ptr->users,&uint32_tmp, buffer); - - /* Fields saved for internal use only (save state) */ - safe_unpackstr_xmalloc(&resv_ptr->assoc_list, - &uint32_tmp, buffer); - safe_unpack32(&resv_ptr->cpu_cnt, buffer); - safe_unpack32(&resv_ptr->resv_id, buffer); - safe_unpack_time(&resv_ptr->start_time_prev, buffer); - safe_unpack_time(&resv_ptr->start_time, buffer); - safe_unpack32(&resv_ptr->duration, buffer); + resv_ptr = _load_reservation_state(buffer, protocol_version); + if (!resv_ptr) + break; list_append(resv_list, resv_ptr); info("Recovered state of reservation %s", resv_ptr->name); @@ -2488,7 +2624,7 @@ static int _resize_resv(slurmctld_resv_t *resv_ptr, uint32_t node_cnt) resv_desc.flags = resv_ptr->flags; resv_desc.node_cnt = xmalloc(sizeof(uint32_t) * 2); resv_desc.node_cnt[0]= 0 - delta_node_cnt; - i = _select_nodes(&resv_desc, &resv_ptr->part_ptr, &tmp1_bitmap); + i = _select_nodes(&resv_desc, &resv_ptr->part_ptr, &tmp1_bitmap, NULL); xfree(resv_desc.node_cnt); xfree(resv_desc.node_list); xfree(resv_desc.partition); @@ -2505,7 +2641,8 @@ static int _resize_resv(slurmctld_resv_t *resv_ptr, uint32_t node_cnt) /* Given a reservation create request, select appropriate nodes for use */ static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, struct part_record **part_ptr, - bitstr_t **resv_bitmap) + bitstr_t **resv_bitmap, + bitstr_t **core_bitmap) { slurmctld_resv_t *resv_ptr; bitstr_t *node_bitmap; @@ -2619,7 +2756,7 @@ static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, *resv_bitmap = NULL; if (rc == SLURM_SUCCESS) *resv_bitmap = _pick_idle_nodes(node_bitmap, - resv_desc_ptr); + resv_desc_ptr, core_bitmap); FREE_NULL_BITMAP(node_bitmap); if (*resv_bitmap == NULL) { if (rc == SLURM_SUCCESS) @@ -2632,7 +2769,8 @@ static int _select_nodes(resv_desc_msg_t *resv_desc_ptr, } static bitstr_t *_pick_idle_nodes(bitstr_t *avail_bitmap, - resv_desc_msg_t *resv_desc_ptr) + resv_desc_msg_t *resv_desc_ptr, + bitstr_t **core_bitmap) { int i; bitstr_t *ret_bitmap = NULL, *tmp_bitmap; @@ -2651,11 +2789,13 @@ static bitstr_t *_pick_idle_nodes(bitstr_t *avail_bitmap, #endif if (resv_desc_ptr->node_cnt == NULL) { - return _pick_idle_node_cnt(avail_bitmap, resv_desc_ptr, 0); + return _pick_idle_node_cnt(avail_bitmap, resv_desc_ptr, 0, + core_bitmap); } else if ((resv_desc_ptr->node_cnt[0] == 0) || (resv_desc_ptr->node_cnt[1] == 0)) { return _pick_idle_node_cnt(avail_bitmap, resv_desc_ptr, - resv_desc_ptr->node_cnt[0]); + resv_desc_ptr->node_cnt[0], + core_bitmap); } /* Try to create a single reservation that can contain all blocks @@ -2664,7 +2804,7 @@ static bitstr_t *_pick_idle_nodes(bitstr_t *avail_bitmap, for (i = 0; resv_desc_ptr->node_cnt[i]; i++) total_node_cnt += resv_desc_ptr->node_cnt[i]; tmp_bitmap = _pick_idle_node_cnt(avail_bitmap, resv_desc_ptr, - total_node_cnt); + total_node_cnt, core_bitmap); if (tmp_bitmap) { if (total_node_cnt == bit_set_count(tmp_bitmap)) return tmp_bitmap; @@ -2679,7 +2819,8 @@ static bitstr_t *_pick_idle_nodes(bitstr_t *avail_bitmap, resv_debug = slurm_get_debug_flags() & DEBUG_FLAG_RESERVATION; for (i = 0; resv_desc_ptr->node_cnt[i]; i++) { tmp_bitmap = _pick_idle_node_cnt(avail_bitmap, resv_desc_ptr, - resv_desc_ptr->node_cnt[i]); + resv_desc_ptr->node_cnt[i], + core_bitmap); if (tmp_bitmap == NULL) { /* allocation failure */ if (resv_debug) { info("reservation of %u nodes failed", @@ -2709,7 +2850,7 @@ static bitstr_t *_pick_idle_nodes(bitstr_t *avail_bitmap, static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, resv_desc_msg_t *resv_desc_ptr, - uint32_t node_cnt) + uint32_t node_cnt, bitstr_t **core_bitmap) { ListIterator job_iterator; struct job_record *job_ptr; @@ -2730,16 +2871,20 @@ static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, continue; if (job_ptr->end_time < resv_desc_ptr->start_time) continue; + + /* TODO: This needs to be based on cores used by job + * instead of based on nodes */ bit_not(job_ptr->node_bitmap); bit_and(avail_bitmap, job_ptr->node_bitmap); bit_not(job_ptr->node_bitmap); } list_iterator_destroy(job_iterator); - ret_bitmap = select_g_resv_test(avail_bitmap, node_cnt); + ret_bitmap = select_g_resv_test(avail_bitmap, node_cnt, + resv_desc_ptr->core_cnt, core_bitmap); if (ret_bitmap) goto fini; - /* Third: Try to reserve nodes that will be allocated to a limited + /* Next: Try to reserve nodes that will be allocated to a limited * number of running jobs. We could sort the jobs by priority, QOS, * size or other criterion if desired. Right now we just go down * the unsorted job list. */ @@ -2759,7 +2904,9 @@ static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, if (bit_set_count(tmp_bitmap) > 0) { bit_or(avail_bitmap, tmp_bitmap); ret_bitmap = select_g_resv_test(avail_bitmap, - node_cnt); + node_cnt, + resv_desc_ptr->core_cnt, + core_bitmap); } FREE_NULL_BITMAP(tmp_bitmap); if (ret_bitmap) @@ -2769,6 +2916,17 @@ static bitstr_t *_pick_idle_node_cnt(bitstr_t *avail_bitmap, } fini: FREE_NULL_BITMAP(save_bitmap); +#if 0 + if (ret_bitmap) { + bit_fmt(str, (sizeof(str) - 1), ret_bitmap); + info("pick_idle_nodes getting %s from select cons_res", str); + if (*core_bitmap) { + bit_fmt(str, (sizeof(str) - 1), *core_bitmap); + info("pick_idle_nodes getting coremap %s " + "from select/cons_res", str); + } + } +#endif return ret_bitmap; } @@ -3009,6 +3167,8 @@ extern int job_test_lic_resv(struct job_record *job_ptr, char *lic_name, * IN move_time - if true, then permit the start time to advance from * "when" as needed IF job has no reservervation * OUT node_bitmap - nodes which the job can use, caller must free unless error + * OUT exc_core_bitmap - cores which the job can NOT use, caller must free + * unless error * RET SLURM_SUCCESS if runable now * ESLURM_RESERVATION_ACCESS access to reservation denied * ESLURM_RESERVATION_INVALID reservation invalid @@ -3017,7 +3177,8 @@ extern int job_test_lic_resv(struct job_record *job_ptr, char *lic_name, * reserved */ extern int job_test_resv(struct job_record *job_ptr, time_t *when, - bool move_time, bitstr_t **node_bitmap) + bool move_time, bitstr_t **node_bitmap, + bitstr_t **exc_core_bitmap) { slurmctld_resv_t * resv_ptr, *res2_ptr; time_t job_start_time, job_end_time, lic_resv_time; @@ -3095,6 +3256,14 @@ extern int job_test_resv(struct job_record *job_ptr, time_t *when, job_ptr->job_id, nodes, job_ptr->resv_name); xfree(nodes); } + + /* if reservation is using just partial nodes, this returns + * coremap to exclude */ + if (resv_ptr->core_bitmap && exc_core_bitmap) { + *exc_core_bitmap = bit_copy(resv_ptr->core_bitmap); + bit_not(*exc_core_bitmap); + } + return SLURM_SUCCESS; } @@ -3137,9 +3306,24 @@ extern int job_test_resv(struct job_record *job_ptr, time_t *when, (lic_resv_time > resv_ptr->end_time)) lic_resv_time = resv_ptr->end_time; } - bit_not(resv_ptr->node_bitmap); - bit_and(*node_bitmap, resv_ptr->node_bitmap); - bit_not(resv_ptr->node_bitmap); + + if (resv_ptr->cpu_cnt == 0) { + /* reservation uses full nodes */ + bit_not(resv_ptr->node_bitmap); + bit_and(*node_bitmap, resv_ptr->node_bitmap); + bit_not(resv_ptr->node_bitmap); + } else { + //info("job_test_resv: %s reservation uses partial nodes ...", resv_ptr->name); + if (*exc_core_bitmap == NULL) { + *exc_core_bitmap = bit_copy(resv_ptr->core_bitmap); + } else { + //char str[100]; + bit_and(*exc_core_bitmap, + resv_ptr->core_bitmap); + //bit_fmt(str, (sizeof(str) - 1), *exc_core_bitmap); + //info("ALEJ: job_test_resv: New exclude core bitmap %s", str); + } + } } list_iterator_destroy(iter); @@ -3413,7 +3597,7 @@ extern void update_part_nodes_in_resv(struct part_record *part_ptr) resv_ptr->node_bitmap = bit_copy(parti_ptr-> node_bitmap); resv_ptr->node_cnt = bit_set_count(resv_ptr-> - node_bitmap); + node_bitmap); xfree(resv_ptr->node_list); resv_ptr->node_list = xstrdup(parti_ptr->nodes); last_resv_update = time(NULL); diff --git a/src/slurmctld/reservation.h b/src/slurmctld/reservation.h index 311dfb8cdd..7091738760 100644 --- a/src/slurmctld/reservation.h +++ b/src/slurmctld/reservation.h @@ -58,7 +58,8 @@ extern int update_resv(resv_desc_msg_t *resv_desc_ptr); extern int delete_resv(reservation_name_msg_t *resv_desc_ptr); /* Dump the reservation records to a buffer */ -extern void show_resv(char **buffer_ptr, int *buffer_size, uid_t uid); +extern void show_resv(char **buffer_ptr, int *buffer_size, uid_t uid, + uint16_t protocol_version); /* Save the state of all reservations to file */ extern int dump_all_resv_state(void); @@ -81,12 +82,12 @@ extern bool is_node_in_maint_reservation(int nodenum); extern void update_assocs_in_resvs(void); /* - * Update reserved nodes for all reservations using a specific partition if the - * resevation has NodeList=ALL and RESERVE_FLAGS_PART_NODES. -*/ -extern void update_part_nodes_in_resv(struct part_record *part_ptr); - -/* + * Update reserved nodes for all reservations using a specific partition if the + * resevation has NodeList=ALL and RESERVE_FLAGS_PART_NODES. +*/ +extern void update_part_nodes_in_resv(struct part_record *part_ptr); + +/* * Load the reservation state from file, recover on slurmctld restart. * Reset reservation pointers for all jobs. * Execute this after loading the configuration file data. @@ -127,6 +128,7 @@ extern int job_test_lic_resv(struct job_record *job_ptr, char *lic_name, * IN move_time - if true, then permit the start time to advance from * "when" as needed IF job has no reservervation * OUT node_bitmap - nodes which the job can use, caller must free + * OUT exc_core_bitmap - cores which the job can NOT use, caller must free * RET SLURM_SUCCESS if runable now * ESLURM_RESERVATION_ACCESS access to reservation denied * ESLURM_RESERVATION_INVALID reservation invalid @@ -135,7 +137,8 @@ extern int job_test_lic_resv(struct job_record *job_ptr, char *lic_name, * reserved */ extern int job_test_resv(struct job_record *job_ptr, time_t *when, - bool move_time, bitstr_t **node_bitmap); + bool move_time, bitstr_t **node_bitmap, + bitstr_t **exc_core_bitmap); /* * Determine if a job can start now based only upon its reservations diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index de8c928fb0..9f722d0b1e 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -331,6 +331,7 @@ typedef struct slurmctld_resv { char **account_list; /* list of accounts permitted to use */ char *assoc_list; /* list of associations */ uint32_t cpu_cnt; /* number of reserved CPUs */ + bitstr_t *core_bitmap; /* bitmap of reserved cores */ uint32_t duration; /* time in seconds for this * reservation to last */ time_t end_time; /* end time of reservation */ -- GitLab From 00b78dfab689530e54029e6131da9435dc58e3d1 Mon Sep 17 00:00:00 2001 From: Tim Wickberg Date: Tue, 3 Jul 2012 08:29:18 -0700 Subject: [PATCH 529/614] Fix typo in bluegene web page --- doc/html/bluegene.shtml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/html/bluegene.shtml b/doc/html/bluegene.shtml index a043317998..472cd7dca4 100644 --- a/doc/html/bluegene.shtml +++ b/doc/html/bluegene.shtml @@ -161,7 +161,7 @@ In example of this with a BGQ system of [0000x2333] but only can use [2000x2333] you could define it in your slurm.conf like this.
           ...
          -NodeName=bgq[0000x1333] sate=down
          +NodeName=bgq[0000x1333] state=down
           NodeName=bgq[2000x2333] state=unknown
           ...
           
          @@ -866,6 +866,6 @@ scheduling logic, etc.

          -

          Last modified 26 June 2012

          +

          Last modified 3 July 2012

          -- GitLab From d37cab140d701d49e2942ed983c9709b89f02c74 Mon Sep 17 00:00:00 2001 From: "Lipari, Don" Date: Tue, 3 Jul 2012 08:39:14 -0700 Subject: [PATCH 530/614] Clarify time limit handling in man page. --- doc/man/man1/salloc.1 | 4 ++-- doc/man/man1/sbatch.1 | 2 +- doc/man/man1/srun.1 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 9a72020a66..bd6ababbab 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -900,8 +900,8 @@ The default max\-time is the max_switch_wait SchedulerParameter. Set a limit on the total run time of the job allocation. If the requested time limit exceeds the partition's time limit, the job will be left in a PENDING state (possibly indefinitely). The default time -limit is the partition's time limit. When the time limit is reached, -the each task in each job step is sent SIGTERM followed by SIGKILL. The +limit is the partition's default time limit. When the time limit is reached, +each task in each job step is sent SIGTERM followed by SIGKILL. The interval between signals is specified by the SLURM configuration parameter \fBKillWait\fR. A time limit of zero requests that no time limit be imposed. Acceptable time formats include "minutes", diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 28c3f54474..441b2cdcae 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -1024,7 +1024,7 @@ The default max\-time is the max_switch_wait SchedulerParameter. Set a limit on the total run time of the job allocation. If the requested time limit exceeds the partition's time limit, the job will be left in a PENDING state (possibly indefinitely). The default time -limit is the partition's time limit. When the time limit is reached, +limit is the partition's default time limit. When the time limit is reached, each task in each job step is sent SIGTERM followed by SIGKILL. The interval between signals is specified by the SLURM configuration parameter \fBKillWait\fR. A time limit of zero requests that no time diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index a69fbbd2ad..3b8f41d8fd 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -1126,8 +1126,8 @@ requested time limit for a job exceeds the partition's time limit, the job will be left in a PENDING state (possibly indefinitely). If the requested time limit for a job step exceeds the partition's time limit, the job step will not be initiated. The default time -limit is the partition's time limit. When the time limit is reached, -the job's tasks are sent SIGTERM followed by SIGKILL. If the time +limit is the partition's default time limit. When the time limit is reached, +each task in each job step is sent SIGTERM followed by SIGKILL. The limit is for the job, all job steps are signaled. If the time limit is for a single job step within an existing job allocation, only that job step will be affected. A job time limit supercedes all job step time -- GitLab From 88ad2c6138541499133269e31ca1d129c9e37dbd Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 09:00:24 -0700 Subject: [PATCH 531/614] Add gres count value check (>0 && name); } + if ((tmp_long < 0) || (tmp_long >= NO_VAL)) { + fatal("Gres %s has invalid count value %ld", + p->name, tmp_long); + } p->count = tmp_long; xfree(tmp_str); } else if (p->count == 0) -- GitLab From 3b97121933b9f93f82d205fa25e999d902b612b9 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 10:20:05 -0700 Subject: [PATCH 532/614] Correction to logic for port range in slurm.conf node configuration --- src/common/node_conf.c | 3 ++- src/common/read_config.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 34442c4747..213cc0b174 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -179,7 +179,8 @@ static int _build_single_nodeline_info(slurm_conf_node_t *node_ptr, error_code = errno; goto cleanup; } - if (node_ptr->port_str[0] && (node_ptr->port_str[0] != '[') && + if (node_ptr->port_str && node_ptr->port_str[0] && + (node_ptr->port_str[0] != '[') && (strchr(node_ptr->port_str, '-') || strchr(node_ptr->port_str, ','))) { xstrfmtcat(port_str, "[%s]", node_ptr->port_str); diff --git a/src/common/read_config.c b/src/common/read_config.c index 2e953b376b..e14959ef37 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1290,7 +1290,8 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) goto cleanup; } - if (node_ptr->port_str[0] && (node_ptr->port_str[0] != '[') && + if (node_ptr->port_str && node_ptr->port_str[0] && + (node_ptr->port_str[0] != '[') && (strchr(node_ptr->port_str, '-') || strchr(node_ptr->port_str, ','))) { xstrfmtcat(port_str, "[%s]", node_ptr->port_str); @@ -1358,7 +1359,7 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) address = hostlist_shift(address_list); if ((hostname_count > 1) || (hostname == NULL)) hostname = hostlist_shift(hostname_list); - if ((port_count > 1) || (port_str == NULL)) { + if ((port_count > 1) && (port_str == NULL)) { int port_int; port_str = hostlist_shift(port_list); port_int = atoi(port_str); -- GitLab From 94a7fd3ff1362f4b95490dda0ae7265b91cfc636 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 10:25:00 -0700 Subject: [PATCH 533/614] Add DebugFlag of Switch to log switch plugin details --- NEWS | 1 + doc/man/man5/slurm.conf.5 | 5 +- slurm/slurm.h.in | 1 + src/common/read_config.c | 9 +- src/plugins/switch/nrt/nrt.c | 414 +++++++++++++++------------- src/plugins/switch/nrt/slurm_nrt.h | 4 +- src/plugins/switch/nrt/switch_nrt.c | 178 ++++++------ src/sview/sview.c | 15 + 8 files changed, 342 insertions(+), 285 deletions(-) diff --git a/NEWS b/NEWS index 98eba8d37c..cd9b88c069 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ documents those changes that are of interest to users and admins. nodes. Current limiations: homogeneous cluster, nodes idle when reservation created, and no more than one reservation per node. Code is still under development. Work by Alejandro Lucero Palau, et. al, BSC. + -- Add DebugFlag of Switch to log switch plugin details. * Changes in SLURM 2.5.0.pre1 diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 998b2249e9..fe844e8e3f 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1,4 +1,4 @@ -.TH "slurm.conf" "5" "April 2012" "slurm.conf 2.4" "Slurm configuration file" +.TH "slurm.conf" "5" "July 2012" "slurm.conf 2.5" "Slurm configuration file" .SH "NAME" slurm.conf \- Slurm configuration file @@ -324,6 +324,9 @@ Resource selection plugin \fBSteps\fR Slurmctld resource allocation for job steps .TP +\fBSwitch\fR +Siwtch plugin +.TP \fBTriggers\fR Slurmctld triggers .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index 24ec6b2bcf..c061309d25 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -1773,6 +1773,7 @@ typedef struct reservation_name_msg { #define DEBUG_FLAG_NO_REALTIME 0x00010000 /* get debug when the * realtime server * dies on a bluegene system */ +#define DEBUG_FLAG_SWITCH 0x00020000 /* SwitchType plugin */ #define GROUP_FORCE 0x8000 /* if set, update group membership * info even if no updates to diff --git a/src/common/read_config.c b/src/common/read_config.c index e14959ef37..b5b67346d9 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -3481,6 +3481,11 @@ extern char * debug_flags2str(uint32_t debug_flags) xstrcat(rc, ","); xstrcat(rc, "Steps"); } + if (debug_flags & DEBUG_FLAG_SWITCH) { + if (rc) + xstrcat(rc, ","); + xstrcat(rc, "Switch"); + } if (debug_flags & DEBUG_FLAG_TRIGGERS) { if (rc) xstrcat(rc, ","); @@ -3537,12 +3542,12 @@ extern uint32_t debug_str2flags(char *debug_flags) rc |= DEBUG_FLAG_PRIO; else if (strcasecmp(tok, "Reservation") == 0) rc |= DEBUG_FLAG_RESERVATION; - else if (strcasecmp(tok, "Reservations") == 0) - rc |= DEBUG_FLAG_RESERVATION; else if (strcasecmp(tok, "SelectType") == 0) rc |= DEBUG_FLAG_SELECT_TYPE; else if (strcasecmp(tok, "Steps") == 0) rc |= DEBUG_FLAG_STEPS; + else if (strcasecmp(tok, "Switch") == 0) + rc |= DEBUG_FLAG_SWITCH; else if (strcasecmp(tok, "Trigger") == 0) rc |= DEBUG_FLAG_TRIGGERS; else if (strcasecmp(tok, "Triggers") == 0) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index aeac3f5670..c0b0417c91 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -291,9 +291,9 @@ _fill_in_adapter_cache(void) nrt_cmd_query_adapter_names_t adapter_names; unsigned int max_windows, num_adapter_names; -#if NRT_DEBUG - info("_fill_in_adapter_cache: begin"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("_fill_in_adapter_cache: begin"); + adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; for (i = 0; i < 2; i++) { @@ -312,9 +312,9 @@ _fill_in_adapter_cache(void) } for (i = 0; i < num_adapter_types; i++) { -#if NRT_DEBUG - info("adapter_type[%d]: %u", i, adapter_type[i]); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("adapter_type[%d]: %u", i, adapter_type[i]); + adapter_names.adapter_type = adapter_type[i]; adapter_names.num_adapter_names = &num_adapter_names; adapter_names.max_windows = &max_windows; @@ -327,10 +327,10 @@ _fill_in_adapter_cache(void) continue; } for (j = 0; j < num_adapter_names; j++) { -#if NRT_DEBUG - info("adapter_names[%d]: %s", - j, adapter_names.adapter_names[j]); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("adapter_names[%d]: %s", + j, adapter_names.adapter_names[j]); + } lid_cache[lid_cache_size].adapter_type = adapter_names. adapter_type; strncpy(lid_cache[lid_cache_size].adapter_name, @@ -339,9 +339,9 @@ _fill_in_adapter_cache(void) lid_cache_size++; } } -#if NRT_DEBUG - info("_fill_in_adapter_cache: complete: %d", rc); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("_fill_in_adapter_cache: complete: %d", rc); + return rc; } @@ -1253,7 +1253,6 @@ _adapter_type_str(nrt_adapter_t type) return NULL; /* Never used */ } -#if NRT_DEBUG static char * _port_status_str(nrt_port_status_t status) { @@ -1606,7 +1605,6 @@ _print_load_table(nrt_cmd_load_table_t *load_table) adapter_type, table_info->is_ipv4); info("--- End load table ---"); } -#endif static slurm_nrt_libstate_t * _alloc_libstate(void) @@ -1732,9 +1730,9 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_status_t **status_array = NULL; nrt_window_id_t window_count; -#if NRT_DEBUG - info("_get_adapters: begin"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("_get_adapters: begin"); + adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; adapter_info.window_list = NULL; @@ -1752,12 +1750,12 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; } -#if NRT_DEBUG - for (i = 0; i < num_adapter_types; i++) { - info("nrt_command(adapter_types): %s", - _adapter_type_str(adapter_types.adapter_types[i])); + if (debug_flags & DEBUG_FLAG_SWITCH) { + for (i = 0; i < num_adapter_types; i++) { + info("nrt_command(adapter_types): %s", + _adapter_type_str(adapter_types.adapter_types[i])); + } } -#endif for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; @@ -1772,15 +1770,16 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) rc = SLURM_ERROR; continue; } -#if NRT_DEBUG - for (j = 0; j < num_adapter_names; j++) { - info("nrt_command(adapter_names, %s, %s) " - "max_windows: %hu", - adapter_names.adapter_names[j], - _adapter_type_str(adapter_names.adapter_type), - max_windows); + if (debug_flags & DEBUG_FLAG_SWITCH) { + for (j = 0; j < num_adapter_names; j++) { + info("nrt_command(adapter_names, %s, %s) " + "max_windows: %hu", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names. + adapter_type), + max_windows); + } } -#endif status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); for (j = 0; j < max_windows; j++) { /* @@ -1822,12 +1821,13 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) /* Reset value to avoid logging bad data */ window_count = max_windows; } -#if NRT_DEBUG - info("nrt_command(status_adapter, %s, %s)", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type)); - _print_adapter_status(&adapter_status); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_command(status_adapter, %s, %s)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type)); + _print_adapter_status(&adapter_status); + } adapter_ptr = &n->adapter_list[n->adapter_count]; strncpy(adapter_ptr->adapter_name, adapter_status.adapter_name, @@ -1869,13 +1869,13 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) rc = SLURM_ERROR; continue; } -#if NRT_DEBUG - info("nrt_command(adapter_info, %s, %s)", - query_adapter_info.adapter_name, - _adapter_type_str(query_adapter_info. - adapter_type)); - _print_adapter_info(&adapter_info); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_command(adapter_info, %s, %s)", + query_adapter_info.adapter_name, + _adapter_type_str(query_adapter_info. + adapter_type)); + _print_adapter_info(&adapter_info); + } if (adapter_info.node_number != 0) n->node_number = adapter_info.node_number; adapter_ptr->rcontext_block_count = @@ -1912,10 +1912,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } xfree(adapter_info.window_list); } -#if NRT_DEBUG - _print_nodeinfo(n); - info("_get_adapters: complete: %d", rc); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + _print_nodeinfo(n); + info("_get_adapters: complete: %d", rc); + } return rc; } @@ -1954,10 +1954,10 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) assert(n); assert(n->magic == NRT_NODEINFO_MAGIC); assert(buf); -#if NRT_DEBUG - info("nrt_pack_nodeinfo():"); - _print_nodeinfo(n); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_pack_nodeinfo():"); + _print_nodeinfo(n); + } offset = get_buf_offset(buf); pack32(n->magic, buf); packmem(n->name, NRT_HOSTLEN, buf); @@ -2000,10 +2000,12 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) assert(src); assert(dest->magic == NRT_NODEINFO_MAGIC); assert(src->magic == NRT_NODEINFO_MAGIC); -#if NRT_DEBUG - info("_copy_node():"); - _print_nodeinfo(src); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("_copy_node():"); + _print_nodeinfo(src); + } + strncpy(dest->name, src->name, NRT_HOSTLEN); dest->node_number = src->node_number; dest->adapter_count = src->adapter_count; @@ -2197,10 +2199,10 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) tmp_a->window_list = tmp_w; tmp_w = NULL; /* don't free if unpack error on next adapter */ } -#if NRT_DEBUG - info("_unpack_nodeinfo"); - _print_nodeinfo(tmp_n); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("_unpack_nodeinfo"); + _print_nodeinfo(tmp_n); + } copy_node: /* Only copy the node_info structure if the caller wants it */ @@ -2240,10 +2242,11 @@ nrt_free_nodeinfo(slurm_nrt_nodeinfo_t *n, bool ptr_into_array) assert(n->magic == NRT_NODEINFO_MAGIC); -#if NRT_DEBUGX - info("nrt_free_nodeinfo"); - _print_nodeinfo(n); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_free_nodeinfo"); + _print_nodeinfo(n); + } + if (n->adapter_list) { adapter = n->adapter_list; for (i = 0; i < n->adapter_count; i++) @@ -2319,15 +2322,19 @@ extern int nrt_job_step_allocated(slurm_nrt_jobinfo_t *jp, hostlist_t hl) { int rc; -#if NRT_DEBUG - info("nrt_job_step_allocated: resetting window state"); - _print_jobinfo(jp); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_job_step_allocated: resetting window state"); + _print_jobinfo(jp); + } + rc = _job_step_window_state(jp, hl, NRT_WIN_UNAVAILABLE); -#if NRT_DEBUG - info("nrt_job_step_allocated: window state reset complete"); - _print_libstate(nrt_state); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_job_step_allocated: window state reset complete"); + _print_libstate(nrt_state); + } + return rc; } @@ -2505,12 +2512,13 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, /* jp->tableinfo[i].table allocated with windows function */ } -#if NRT_DEBUG - info("Allocating windows: adapter_name:%s adapter_type:%s", - adapter_name, _adapter_type_str(adapter_type)); -#else - debug("Allocating windows"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("Allocating windows: adapter_name:%s adapter_type:%s", + adapter_name, _adapter_type_str(adapter_type)); + } else { + debug("Allocating windows"); + } + _lock(); for (i = 0; i < nnodes; i++) { host = hostlist_next(hi); @@ -2545,10 +2553,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, _unlock(); -#if NRT_DEBUG - info("nrt_build_jobinfo"); - _print_jobinfo(jp); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_build_jobinfo"); + _print_jobinfo(jp); + } hostlist_iterator_destroy(hi); xfree(protocol_table); @@ -2656,10 +2664,11 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) assert(j->magic == NRT_JOBINFO_MAGIC); assert(buf); -#if NRT_DEBUG - info("nrt_pack_jobinfo:"); - _print_jobinfo(j); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_pack_jobinfo:"); + _print_jobinfo(j); + } + pack32(j->magic, buf); pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); @@ -2818,10 +2827,11 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) goto unpack_error; } -#if NRT_DEBUG - info("nrt_unpack_jobinfo:"); - _print_jobinfo(j); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_unpack_jobinfo:"); + _print_jobinfo(j); + } + return SLURM_SUCCESS; unpack_error: @@ -2988,10 +2998,10 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, nrt_err_str(err)); break; } -#if NRT_DEBUG - info("_wait_for_window_unloaded"); - _print_adapter_status(&status_adapter); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("_wait_for_window_unloaded"); + _print_adapter_status(&status_adapter); + } for (j = 0; j < window_count; j++) { if ((*status_array)[j].window_id == window_id) break; @@ -3132,21 +3142,23 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); -#if NRT_DEBUG - info("nrt_load_table"); - _print_jobinfo(jp); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_load_table"); + _print_jobinfo(jp); + } + for (i = 0; i < jp->tables_per_task; i++) { -#if NRT_DEBUG - nrt_adapter_t adapter_type; - if (jp->user_space) - adapter_type = jp->tableinfo[i].adapter_type; - else - adapter_type = NRT_IPONLY; - _print_table(jp->tableinfo[i].table, - jp->tableinfo[i].table_length, adapter_type, - jp->ip_v4); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + nrt_adapter_t adapter_type; + if (jp->user_space) + adapter_type = jp->tableinfo[i].adapter_type; + else + adapter_type = NRT_IPONLY; + _print_table(jp->tableinfo[i].table, + jp->tableinfo[i].table_length, + adapter_type, jp->ip_v4); + } + adapter_name = jp->tableinfo[i].adapter_name; if (jp->user_space) { rc = _wait_for_all_windows(&jp->tableinfo[i]); @@ -3200,9 +3212,10 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) table_info.num_cau_indexes = 0; load_table.table_info = &table_info; load_table.per_task_input = jp->tableinfo[i].table; -#if NRT_DEBUG - _print_load_table(&load_table); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) + _print_load_table(&load_table); + err = nrt_command(NRT_VERSION, NRT_CMD_LOAD_TABLE, &load_table); if (err != NRT_SUCCESS) { @@ -3212,9 +3225,9 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) } umask(nrt_umask); -#if NRT_DEBUG - info("nrt_load_table complete"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("nrt_load_table complete"); + return SLURM_SUCCESS; } @@ -3238,11 +3251,12 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, unload_window.job_key = job_key; unload_window.window_id = window_id; } -#if NRT_DEBUG - info("nrt_command(unload_window, %s, %s, %u, %hu)", - adapter_name, _adapter_type_str(adapter_type), - job_key, window_id); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_command(unload_window, %s, %s, %u, %hu)", + adapter_name, _adapter_type_str(adapter_type), + job_key, window_id); + } + err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_WINDOW, &unload_window); if (err == NRT_SUCCESS) @@ -3287,10 +3301,12 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); -#if NRT_DEBUG - info("nrt_unload_table"); - _print_jobinfo(jp); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_unload_table"); + _print_jobinfo(jp); + } + if (!jp->user_space) return rc; for (i = 0; i < jp->tables_per_task; i++) { @@ -3363,10 +3379,11 @@ _pack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) assert(lp); assert(lp->magic == NRT_LIBSTATE_MAGIC); -#if NRT_DEBUG - info("_pack_libstate"); - _print_libstate(lp); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("_pack_libstate"); + _print_libstate(lp); + } + offset = get_buf_offset(buffer); packstr(NRT_STATE_VERSION, buffer); pack32(lp->magic, buffer); @@ -3436,10 +3453,12 @@ _unpack_libstate(slurm_nrt_libstate_t *lp, Buf buffer) return SLURM_ERROR; } safe_unpack32(&lp->key_index, buffer); -#if NRT_DEBUG - info("_unpack_libstate"); - _print_libstate(lp); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("_unpack_libstate"); + _print_libstate(lp); + } + return SLURM_SUCCESS; unpack_error: @@ -3478,11 +3497,11 @@ nrt_libstate_clear(void) slurm_nrt_window_t *window; -#if NRT_DEBUG - info("Clearing state on all windows in global NRT state"); -#else - debug3("Clearing state on all windows in global NRT state"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("Clearing state on all windows in global NRT state"); + else + debug3("Clearing state on all windows in global NRT state"); + _lock(); if (!nrt_state || !nrt_state->node_list) { error("nrt_state or node_list not initialized!"); @@ -3524,12 +3543,12 @@ nrt_clear_node_state(void) nrt_window_id_t window_count; nrt_status_t **status_array = NULL; nrt_cmd_clean_window_t clean_window; -#if NRT_DEBUG char window_str[128]; - hostset_t hs; + hostset_t hs = NULL; + + if (debug_flags & DEBUG_FLAG_SWITCH) + info("nrt_clear_node_state: begin"); - info("nrt_clear_node_state: begin"); -#endif adapter_types.num_adapter_types = &num_adapter_types; adapter_types.adapter_types = adapter_type; for (i = 0; i < 2; i++) { @@ -3546,12 +3565,12 @@ nrt_clear_node_state(void) error("nrt_command(adapter_types): %s", nrt_err_str(err)); return SLURM_ERROR; } -#if NRT_DEBUG - for (i = 0; i < num_adapter_types; i++) { - info("nrt_command(adapter_types): %s", - _adapter_type_str(adapter_types.adapter_types[i])); + if (debug_flags & DEBUG_FLAG_SWITCH) { + for (i = 0; i < num_adapter_types; i++) { + info("nrt_command(adapter_types): %s", + _adapter_type_str(adapter_types.adapter_types[i])); + } } -#endif for (i = 0; i < num_adapter_types; i++) { adapter_names.adapter_type = adapter_type[i]; @@ -3566,15 +3585,17 @@ nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } -#if NRT_DEBUG - for (j = 0; j < num_adapter_names; j++) { - info("nrt_command(adapter_names, %s, %s) " - "max_windows: %hu", - adapter_names.adapter_names[j], - _adapter_type_str(adapter_names.adapter_type), - max_windows); + if (debug_flags & DEBUG_FLAG_SWITCH) { + for (j = 0; j < num_adapter_names; j++) { + info("nrt_command(adapter_names, %s, %s) " + "max_windows: %hu", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names. + adapter_type), + max_windows); + } } -#endif + status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); for (j = 0; j < max_windows; j++) { /* @@ -3609,7 +3630,6 @@ nrt_clear_node_state(void) /* FIXME: Investigate this error on eth0? */ /* FIXME: Check for memory leaks */ /* FIXME: Investigate slow throughput reported by test9.9 */ -/* FIXME: Replace NRT_DEBUG with DebugFlag */ /* FIXME: Add tests for new network options */ /* FIXME: Review and test Torrent logic */ error("nrt_command(status_adapter, %s, %s): " @@ -3621,28 +3641,31 @@ nrt_clear_node_state(void) /* Reset value to avoid logging bad data */ window_count = max_windows; } -#if NRT_DEBUG - info("nrt_command(status_adapter, %s, %s) " - "window_count: %hu", - adapter_status.adapter_name, - _adapter_type_str(adapter_status.adapter_type), - window_count); - for (k = 0; k < window_count; k++) { - win_state_t state = (*status_array)[k].state; - if ((state == NRT_WIN_AVAILABLE) && - (k >= NRT_DEBUG_CNT)) - continue; - info("window_id:%d uid:%d pid:%d state:%s", - (*status_array)[k].window_id, - (*status_array)[k].uid, - (*status_array)[k].client_pid, - _win_state_str(state)); - } + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_command(status_adapter, %s, %s) " + "window_count: %hu", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count); + for (k = 0; k < window_count; k++) { + win_state_t state = (*status_array) + [k].state; + if ((state == NRT_WIN_AVAILABLE) && + (k >= NRT_DEBUG_CNT)) + continue; + info("window_id:%d uid:%d pid:%d " + "state:%s", + (*status_array)[k].window_id, + (*status_array)[k].uid, + (*status_array)[k].client_pid, + _win_state_str(state)); + } - hs = hostset_create(""); - if (hs == NULL) - fatal("hostset_create malloc failure"); -#endif + hs = hostset_create(""); + if (hs == NULL) + fatal("hostset_create malloc failure"); + } for (k = 0; k < window_count; k++) { clean_window.adapter_name = adapter_names. adapter_names[j]; @@ -3665,33 +3688,36 @@ nrt_clear_node_state(void) rc = SLURM_ERROR; continue; } -#if NRT_DEBUG - snprintf(window_str, sizeof(window_str), "%d", - clean_window.window_id); - hostset_insert(hs, window_str); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + snprintf(window_str, + sizeof(window_str), "%d", + clean_window.window_id); + hostset_insert(hs, window_str); + } } -#if NRT_DEBUG - if (hostset_count(hs) > 0) { - hostset_ranged_string(hs, sizeof(window_str), - window_str); - info("nrt_command(clean_window, %s, %s, %s)", - adapter_names.adapter_names[j], - _adapter_type_str(adapter_names. - adapter_type), - window_str); + if (debug_flags & DEBUG_FLAG_SWITCH) { + if (hostset_count(hs) > 0) { + hostset_ranged_string(hs, + sizeof(window_str), + window_str); + info("nrt_command(clean_window, " + "%s, %s, %s)", + adapter_names.adapter_names[j], + _adapter_type_str(adapter_names. + adapter_type), + window_str); + } + hostset_destroy(hs); } - hostset_destroy(hs); -#endif } for (j = 0; j < max_windows; j++) { free(status_array[j]); } xfree(status_array); } -#if NRT_DEBUG - info("nrt_clear_node_state: complete:%d", rc); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("nrt_clear_node_state: complete:%d", rc); + return rc; } diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index b817e9a699..e47d6c1722 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -76,13 +76,13 @@ enum { EUNLOAD }; -/* FIXME: Need to look at performances. Test9.9 running slow on NRT */ -#define NRT_DEBUG 0 /* Enable extra logging. 0=off, 1=on, 2=verbose */ #define NRT_DEBUG_CNT 0 /* Count of windows, adapters, etc to log * use this to limit volume of logging */ #define NRT_MAXADAPTERS 2 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) +extern uint32_t debug_flags; + extern bool nrt_adapter_name_check(char *token, hostlist_t hl); extern int nrt_clear_node_state(void); extern char *nrt_err_str(int rc); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index cad1720dd2..82c8267678 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -131,6 +131,8 @@ const char plugin_name[] = "switch NRT plugin"; const char plugin_type[] = "switch/nrt"; const uint32_t plugin_version = 100; +uint32_t debug_flags = 0; + /* * init() is called when the plugin is loaded, before any other functions * are called. Put global initialization here. @@ -138,6 +140,7 @@ const uint32_t plugin_version = 100; extern int init ( void ) { verbose("%s loaded", plugin_name); + debug_flags = slurm_get_debug_flags(); return SLURM_SUCCESS; } @@ -149,25 +152,25 @@ extern int fini ( void ) extern int switch_p_slurmctld_init( void ) { -#if NRT_DEBUG - info("switch_p_slurmctld_init()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_slurmctld_init()"); + return nrt_slurmctld_init(); } extern int switch_p_slurmd_init( void ) { -#if NRT_DEBUG - info("switch_p_slurmd_init()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_slurmd_init()"); + return nrt_slurmd_init(); } extern int switch_p_slurmd_step_init( void ) { -#if NRT_DEBUG - info("switch_p_slurmd_step_init()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_slurmd_step_init()"); + return nrt_slurmd_step_init(); } @@ -178,9 +181,9 @@ extern int switch_p_slurmd_step_init( void ) */ extern int switch_p_libstate_save ( char * dir_name ) { -#if NRT_DEBUG - info("switch_p_libstate_save()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_libstate_save()"); + return _switch_p_libstate_save(dir_name, true); } @@ -246,9 +249,9 @@ extern int switch_p_libstate_restore ( char * dir_name, bool recover ) xassert(dir_name != NULL); -#if NRT_DEBUG - info("switch_p_libstate_restore()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_libstate_restore()"); + _spawn_state_save_thread(xstrdup(dir_name)); if (!recover) /* clean start, no recovery */ return nrt_init(); @@ -299,9 +302,9 @@ extern int switch_p_libstate_restore ( char * dir_name, bool recover ) extern int switch_p_libstate_clear(void) { -#if NRT_DEBUG - info("switch_p_libstate_clear()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_libstate_clear()"); + return nrt_libstate_clear(); } @@ -314,17 +317,17 @@ extern int switch_p_libstate_clear(void) */ extern int switch_p_clear_node_state(void) { -#if NRT_DEBUG - info("switch_p_clear_node_state()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_clear_node_state()"); + return nrt_clear_node_state(); } extern int switch_p_alloc_node_info(switch_node_info_t **switch_node) { -#if NRT_DEBUG - info("switch_p_alloc_node_info()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_alloc_node_info()"); + return nrt_alloc_nodeinfo((slurm_nrt_nodeinfo_t **)switch_node); } @@ -333,9 +336,9 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) char hostname[256]; char *tmp; -#if NRT_DEBUG - info("switch_p_build_node_info()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_build_node_info()"); + if (gethostname(hostname, 256) < 0) slurm_seterrno_ret(EHOSTNAME); /* remove the domain portion, if necessary */ @@ -348,26 +351,26 @@ extern int switch_p_build_node_info(switch_node_info_t *switch_node) extern int switch_p_pack_node_info(switch_node_info_t *switch_node, Buf buffer) { -#if NRT_DEBUG - info("switch_p_pack_node_info()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_pack_node_info()"); + return nrt_pack_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, buffer); } extern int switch_p_unpack_node_info(switch_node_info_t *switch_node, Buf buffer) { -#if NRT_DEBUG - info("switch_p_unpack_node_info()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_unpack_node_info()"); + return nrt_unpack_nodeinfo((slurm_nrt_nodeinfo_t *)switch_node, buffer); } extern void switch_p_free_node_info(switch_node_info_t **switch_node) { -#if NRT_DEBUG - info("switch_p_free_node_info()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_free_node_info()"); + if (switch_node) nrt_free_nodeinfo((slurm_nrt_nodeinfo_t *)*switch_node, false); } @@ -383,9 +386,9 @@ extern char * switch_p_sprintf_node_info(switch_node_info_t *switch_node, */ extern int switch_p_alloc_jobinfo(switch_jobinfo_t **switch_job) { -#if NRT_DEBUG - info("switch_p_alloc_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_alloc_jobinfo()"); + return nrt_alloc_jobinfo((slurm_nrt_jobinfo_t **)switch_job); } @@ -404,12 +407,12 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, char *protocol = NULL; char *network_str = NULL, *token = NULL, *save_ptr = NULL; -#if NRT_DEBUG - info("switch_p_build_jobinfo(): nodelist:%s network:%s", - nodelist, network); -#else - debug3("network = \"%s\"", network); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("switch_p_build_jobinfo(): nodelist:%s network:%s", + nodelist, network); + } else { + debug3("network = \"%s\"", network); + } list = hostlist_create(nodelist); if (!list) @@ -538,9 +541,9 @@ extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) { switch_jobinfo_t *j; -#if NRT_DEBUG - info("switch_p_copy_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_copy_jobinfo()"); + j = (switch_jobinfo_t *)nrt_copy_jobinfo((slurm_nrt_jobinfo_t *)switch_job); if (!j) error("nrt_copy_jobinfo failed"); @@ -550,34 +553,34 @@ extern switch_jobinfo_t *switch_p_copy_jobinfo(switch_jobinfo_t *switch_job) extern void switch_p_free_jobinfo(switch_jobinfo_t *switch_job) { -#if NRT_DEBUG - info("switch_p_free_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_free_jobinfo()"); + return nrt_free_jobinfo((slurm_nrt_jobinfo_t *)switch_job); } extern int switch_p_pack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) { -#if NRT_DEBUG - info("switch_p_pack_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_pack_jobinfo()"); + return nrt_pack_jobinfo((slurm_nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_unpack_jobinfo(switch_jobinfo_t *switch_job, Buf buffer) { -#if NRT_DEBUG - info("switch_p_unpack_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_unpack_jobinfo()"); + return nrt_unpack_jobinfo((slurm_nrt_jobinfo_t *)switch_job, buffer); } extern int switch_p_get_jobinfo(switch_jobinfo_t *switch_job, int key, void *resulting_data) { -#if NRT_DEBUG - info("switch_p_get_jobinfo()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_get_jobinfo()"); + return nrt_get_jobinfo((slurm_nrt_jobinfo_t *)switch_job, key, resulting_data); } @@ -598,9 +601,10 @@ extern int switch_p_job_step_complete(switch_jobinfo_t *jobinfo, char *nodelist) { int rc; -#if NRT_DEBUG - info("switch_p_job_step_complete()"); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_job_step_complete()"); + rc = _make_step_comp(jobinfo, nodelist); nrt_need_state_save = true; return rc; @@ -610,9 +614,10 @@ extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, char *nodelist) { int rc; -#if NRT_DEBUG - info("switch_p_job_step_part_comp()"); -#endif + + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_job_step_part_comp()"); + rc = _make_step_comp(jobinfo, nodelist); nrt_need_state_save = true; return rc; @@ -620,9 +625,9 @@ extern int switch_p_job_step_part_comp(switch_jobinfo_t *jobinfo, extern bool switch_p_part_comp(void) { -#if NRT_DEBUG - info("switch_p_part_comp()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_part_comp()"); + return true; } @@ -632,9 +637,9 @@ extern int switch_p_job_step_allocated(switch_jobinfo_t *jobinfo, hostlist_t list = NULL; int rc; -#if NRT_DEBUG - info("switch_p_job_step_allocated()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_job_step_allocated()"); + list = hostlist_create(nodelist); rc = nrt_job_step_allocated((slurm_nrt_jobinfo_t *)jobinfo, list); hostlist_destroy(list); @@ -688,9 +693,9 @@ extern int switch_p_job_init (switch_jobinfo_t *jobinfo, uid_t uid, { pid_t pid; -#if NRT_DEBUG - info("switch_p_job_init()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_job_init()"); + pid = getpid(); return nrt_load_table((slurm_nrt_jobinfo_t *)jobinfo, uid, pid, job_name); @@ -706,9 +711,9 @@ extern int switch_p_job_postfini(switch_jobinfo_t *jobinfo, uid_t pgid, { int err; -#if NRT_DEBUG - info("switch_p_job_postfini()"); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) + info("switch_p_job_postfini()"); + /* * Kill all processes in the job's session */ @@ -730,14 +735,15 @@ extern int switch_p_job_attach(switch_jobinfo_t *jobinfo, char ***env, uint32_t nodeid, uint32_t procid, uint32_t nnodes, uint32_t nprocs, uint32_t rank) { -#if NRT_DEBUG - info("switch_p_job_attach()"); - info("nodeid = %u", nodeid); - info("procid = %u", procid); - info("nnodes = %u", nnodes); - info("nprocs = %u", nprocs); - info("rank = %u", rank); -#endif + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("switch_p_job_attach()"); + info("nodeid = %u", nodeid); + info("procid = %u", procid); + info("nnodes = %u", nnodes); + info("nprocs = %u", nprocs); + info("rank = %u", rank); + } + return SLURM_SUCCESS; } diff --git a/src/sview/sview.c b/src/sview/sview.c index 07ad51e85b..8bbbdf74de 100644 --- a/src/sview/sview.c +++ b/src/sview/sview.c @@ -631,6 +631,14 @@ static void _get_current_debug_flags(GtkToggleAction *action) if (orig_state != new_state) gtk_toggle_action_set_active(toggle_action, new_state); + debug_action = gtk_action_group_get_action(menu_action_group, + "flags_switch"); + toggle_action = GTK_TOGGLE_ACTION(debug_action); + orig_state = gtk_toggle_action_get_active(toggle_action); + new_state = debug_flags & DEBUG_FLAG_SWITCH; + if (orig_state != new_state) + gtk_toggle_action_set_active(toggle_action, new_state); + debug_action = gtk_action_group_get_action(menu_action_group, "flags_triggers"); toggle_action = GTK_TOGGLE_ACTION(debug_action); @@ -751,6 +759,10 @@ static void _set_flags_steps(GtkToggleAction *action) { _set_flags(action, DEBUG_FLAG_STEPS); } +static void _set_flags_switch(GtkToggleAction *action) +{ + _set_flags(action, DEBUG_FLAG_SWITCH); +} static void _set_flags_triggers(GtkToggleAction *action) { _set_flags(action, DEBUG_FLAG_TRIGGERS); @@ -891,6 +903,7 @@ static char *_get_ui_description() " " " " " " + " " " " " " " " @@ -1134,6 +1147,8 @@ static GtkWidget *_get_menubar_menu(GtkWidget *window, GtkWidget *notebook) "SelectType", G_CALLBACK(_set_flags_select_type), FALSE}, {"flags_steps", NULL, "Steps", NULL, "Steps", G_CALLBACK(_set_flags_steps), FALSE}, + {"flags_switch", NULL, "Switch", NULL, + "Switch", G_CALLBACK(_set_flags_switch), FALSE}, {"flags_triggers", NULL, "Triggers", NULL, "Triggers", G_CALLBACK(_set_flags_triggers), FALSE}, {"flags_wiki", NULL, "Wiki", NULL, -- GitLab From eb66713a3aec9944c2c2a79b007ecf33dedda172 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 10:43:43 -0700 Subject: [PATCH 534/614] Support change of DebugFlag=Switch on reconfig or manual reset --- src/common/switch.c | 12 +++++++++++- src/common/switch.h | 2 ++ src/plugins/switch/none/switch_none.c | 5 +++++ src/plugins/switch/nrt/switch_nrt.c | 6 ++++++ src/slurmctld/proc_req.c | 1 + src/slurmctld/read_config.c | 2 ++ src/slurmd/slurmd/slurmd.c | 1 + 7 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/common/switch.c b/src/common/switch.c index 488ce1b679..b0e129e811 100644 --- a/src/common/switch.c +++ b/src/common/switch.c @@ -115,6 +115,7 @@ typedef struct slurm_switch_ops { int (*slurmctld_init) ( void ); int (*slurmd_init) ( void ); int (*slurmd_step_init) ( void ); + int (*reconfig) ( void ); } slurm_switch_ops_t; /* @@ -156,7 +157,8 @@ static const char *syms[] = { "switch_p_libstate_clear", "switch_p_slurmctld_init", "switch_p_slurmd_init", - "switch_p_slurmd_step_init" + "switch_p_slurmd_step_init", + "switch_p_reconfig" }; static slurm_switch_ops_t ops; @@ -207,6 +209,14 @@ extern int switch_fini(void) return rc; } +extern int switch_g_reconfig(void) +{ + if ( switch_init() < 0 ) + return SLURM_ERROR; + + return (*(ops.reconfig))( ); +} + extern int switch_save(char *dir_name) { if ( switch_init() < 0 ) diff --git a/src/common/switch.h b/src/common/switch.h index 6ea4ff9694..0629934d17 100644 --- a/src/common/switch.h +++ b/src/common/switch.h @@ -69,6 +69,8 @@ typedef struct slurm_switch_context slurm_switch_context_t; /* initialize the switch plugin */ extern int switch_init (void); +extern int switch_g_reconfig(void); + extern int switch_g_slurmd_init(void); /* terminate the switch plugin and free all memory */ diff --git a/src/plugins/switch/none/switch_none.c b/src/plugins/switch/none/switch_none.c index 389d90d8e3..ff05534158 100644 --- a/src/plugins/switch/none/switch_none.c +++ b/src/plugins/switch/none/switch_none.c @@ -93,6 +93,11 @@ int fini ( void ) return SLURM_SUCCESS; } +extern int switch_p_reconfig ( void ) +{ + return SLURM_SUCCESS; +} + /* * switch functions for global state save/restore */ diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 82c8267678..a1e6764f2d 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -150,6 +150,12 @@ extern int fini ( void ) return nrt_fini(); } +extern int switch_p_reconfig ( void ) +{ + debug_flags = slurm_get_debug_flags(); + return SLURM_SUCCESS; +} + extern int switch_p_slurmctld_init( void ) { if (debug_flags & DEBUG_FLAG_SWITCH) diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 69ab8c7816..21ed54020a 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -3941,6 +3941,7 @@ inline static void _slurm_rpc_set_debug_flags(slurm_msg_t *msg) priority_g_reconfig(); select_g_reconfigure(); (void) slurm_sched_reconfig(); + (void) switch_g_reconfig(); unlock_slurmctld (config_write_lock); flag_string = debug_flags2str(debug_flags); diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 74489436c4..266dd06936 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -930,6 +930,8 @@ int read_slurm_conf(int recover, bool reconfig) /* Update plugin parameters as possible */ rc = job_submit_plugin_reconfig(); error_code = MAX(error_code, rc); /* not fatal */ + rc = switch_g_reconfig(); + error_code = MAX(error_code, rc); /* not fatal */ rc = _preserve_select_type_param(&slurmctld_conf, old_select_type_p); error_code = MAX(error_code, rc); /* not fatal */ diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 6fc5fbb52e..663e8006b4 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -1068,6 +1068,7 @@ _reconfigure(void) list_destroy(steps); gres_plugin_reconfig(&did_change); + (void) switch_g_reconfig(); if (did_change) { uint32_t cpu_cnt = MAX(conf->conf_cpus, conf->block_map_size); (void) gres_plugin_node_config_load(cpu_cnt); -- GitLab From 77e072e0b2439bcf09c94b09f0558601ed173ee3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 12:00:21 -0700 Subject: [PATCH 535/614] Tweaks to license agreement --- COPYING | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/COPYING b/COPYING index 0712e040f1..617ea1d780 100644 --- a/COPYING +++ b/COPYING @@ -1,3 +1,5 @@ + SLURM LICENSE AGREEMENT + All SLURM code and documentation is available under the GNU General Public License. Some tools in the "contribs" directory have other licenses. See the documentation for individual contributed tools for details. @@ -13,14 +15,18 @@ wish to do so, delete this exception statement from your version. If you delete this exception statement from all source files in the program, then also delete it here. +NO WARRANTY: Because the program is licensed free of charge, there is no +warranty for the program. See section 11 below for full details. + ============================================================================= OUR NOTICE AND TERMS OF AND CONDITIONS OF THE GNU GENERAL PUBLIC LICENSE Auspices -This work performed under the auspices of the U.S. Department of Energy by -Lawrence Livermore National Laboratory under Contract DE-AC52-07NA27344. +Portions of this work were performed under the auspices of the U.S. Department +of Energy by Lawrence Livermore National Laboratory under Contract +DE-AC52-07NA27344. Disclaimer @@ -98,7 +104,7 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION @@ -153,7 +159,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in -- GitLab From f0949d9173177c6cb2dc48ae8cb735b3383794b1 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 3 Jul 2012 12:26:01 -0700 Subject: [PATCH 536/614] BLUEGENE - Correct potential deadlock issue when hardware goes bad and there are jobs running on that hardware. --- NEWS | 5 ++ .../select/bluegene/bg_record_functions.c | 65 +++++++++---------- 2 files changed, 35 insertions(+), 35 deletions(-) diff --git a/NEWS b/NEWS index 2547992dc7..0c19dc3674 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,11 @@ 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.4.2 +======================== + -- BLUEGENE - Correct potential deadlock issue when hardware goes bad and + there are jobs running on that hardware. + * Changes in SLURM 2.4.1 ======================== -- Fix bug for job state change from 2.3 -> 2.4 job state can now be preserved diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index a5a97ddd23..acbb149185 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -956,7 +956,8 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, List requests = NULL; List delete_list = NULL; ListIterator itr = NULL; - bg_record_t *bg_record = NULL, *found_record = NULL, tmp_record; + bg_record_t *bg_record = NULL, *found_record = NULL, + tmp_record, *error_bg_record = NULL; bg_record_t *smallest_bg_record = NULL; struct node_record *node_ptr = NULL; int mp_bit = 0; @@ -1076,9 +1077,10 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, if (bg_conf->layout_mode != LAYOUT_DYNAMIC) { debug3("running non-dynamic mode"); /* This should never happen, but just in case... */ - if (delete_list) + if (delete_list) { list_destroy(delete_list); - + delete_list = NULL; + } /* If we found a block that is smaller or equal to a midplane we will just mark it in an error state as opposed to draining the node. @@ -1092,8 +1094,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, } slurm_mutex_unlock(&block_state_mutex); - rc = put_block_in_error_state( - smallest_bg_record, reason); + error_bg_record = smallest_bg_record; goto cleanup; } @@ -1117,24 +1118,18 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, if (delete_list) { int cnt_set = 0; bitstr_t *iobitmap = bit_alloc(bg_conf->ionodes_per_mp); - /* don't lock here since it is handled inside - the put_block_in_error_state - */ itr = list_iterator_create(delete_list); while ((bg_record = list_next(itr))) { debug2("combining smaller than nodecard " "dynamic block %s", bg_record->bg_block_id); - while ((bg_record->job_running > NO_JOB_RUNNING) - || (bg_record->job_list - && list_count(bg_record->job_list))) - sleep(1); - bit_or(iobitmap, bg_record->ionode_bitmap); cnt_set++; } list_iterator_destroy(itr); list_destroy(delete_list); + delete_list = NULL; + if (!cnt_set) { FREE_NULL_BITMAP(iobitmap); rc = SLURM_ERROR; @@ -1166,15 +1161,9 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, goto cleanup; } - while ((smallest_bg_record->job_running > NO_JOB_RUNNING) - || (smallest_bg_record->job_list - && list_count(smallest_bg_record->job_list))) - sleep(1); - if (smallest_bg_record->cnode_cnt == create_size) { slurm_mutex_unlock(&block_state_mutex); - rc = put_block_in_error_state( - smallest_bg_record, reason); + error_bg_record = smallest_bg_record; goto cleanup; } @@ -1184,8 +1173,7 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, * block that is already made. */ slurm_mutex_unlock(&block_state_mutex); - rc = put_block_in_error_state( - smallest_bg_record, reason); + error_bg_record = smallest_bg_record; goto cleanup; } debug3("node count is %d", smallest_bg_record->cnode_cnt); @@ -1337,31 +1325,38 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, tmp_record.ionode_bitmap)) { /* here we know the error block doesn't exist so just set the state here */ - slurm_mutex_unlock(&block_state_mutex); - rc = put_block_in_error_state(bg_record, reason); - slurm_mutex_lock(&block_state_mutex); + error_bg_record = bg_record; } } list_destroy(requests); - if (delete_list) { - bool delete_it = 0; - if (bg_conf->layout_mode == LAYOUT_DYNAMIC) - delete_it = 1; - slurm_mutex_unlock(&block_state_mutex); - free_block_list(NO_VAL, delete_list, delete_it, 0); - list_destroy(delete_list); - slurm_mutex_lock(&block_state_mutex); - } sort_bg_record_inc_size(bg_lists->main); - slurm_mutex_unlock(&block_state_mutex); last_bg_update = time(NULL); + slurm_mutex_unlock(&block_state_mutex); cleanup: if (!slurmctld_locked) unlock_slurmctld(job_write_lock); FREE_NULL_BITMAP(tmp_record.mp_bitmap); FREE_NULL_BITMAP(tmp_record.ionode_bitmap); + if (error_bg_record) { + /* all locks must be released before going into + * put_block_in_error_state. + */ + if (slurmctld_locked) + unlock_slurmctld(job_write_lock); + rc = put_block_in_error_state(error_bg_record, reason); + if (slurmctld_locked) + lock_slurmctld(job_write_lock); + } + if (delete_list) { + bool delete_it = 0; + if (bg_conf->layout_mode == LAYOUT_DYNAMIC) + delete_it = 1; + free_block_list(NO_VAL, delete_list, delete_it, 0); + list_destroy(delete_list); + delete_list = NULL; + } return rc; -- GitLab From 0496ba811cdeac97998a230641c1ad7c80858bd0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 13:00:43 -0700 Subject: [PATCH 537/614] Add regression test for switch/nrt --- testsuite/expect/globals | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/testsuite/expect/globals b/testsuite/expect/globals index 18e262c6ca..6497e0a9ad 100755 --- a/testsuite/expect/globals +++ b/testsuite/expect/globals @@ -1311,6 +1311,35 @@ proc test_serial { } { return $serial } +################################################################ +# +# Proc: test_switch_nrt +# +# Purpose: Determine if the system is using switch/nrt. +# +# Returns 1 if the system is running swtich/nrt, 0 otherwise +# +################################################################ + +proc test_switch_nrt { } { + global scontrol bin_bash bin_grep + + log_user 0 + set switch_nrt 0 + spawn -noecho $bin_bash -c "exec $scontrol show config | $bin_grep SwitchType" + expect { + "switch/nrt" { + set switch_nrt 1 + exp_continue + } + eof { + wait + } + } + log_user 1 + + return $switch_nrt +} ################################################################ # # Proc: test_emulated -- GitLab From 336ae96e1f0667885be4288d5e188191154abc21 Mon Sep 17 00:00:00 2001 From: Nathan Yee Date: Tue, 3 Jul 2012 13:51:40 -0700 Subject: [PATCH 538/614] Add test for switch/nrt network options --- testsuite/expect/Makefile.am | 1 + testsuite/expect/Makefile.in | 1 + testsuite/expect/README | 1 + testsuite/expect/test13.2 | 176 +++++++++++++++++++++++++++++++++++ 4 files changed, 179 insertions(+) create mode 100755 testsuite/expect/test13.2 diff --git a/testsuite/expect/Makefile.am b/testsuite/expect/Makefile.am index 50967bddb2..80378c9792 100644 --- a/testsuite/expect/Makefile.am +++ b/testsuite/expect/Makefile.am @@ -263,6 +263,7 @@ EXTRA_DIST = \ test12.4 \ test12.5 \ test13.1 \ + test13.2 \ test14.1 \ test14.2 \ test14.3 \ diff --git a/testsuite/expect/Makefile.in b/testsuite/expect/Makefile.in index b363651b3f..aa44e3c677 100644 --- a/testsuite/expect/Makefile.in +++ b/testsuite/expect/Makefile.in @@ -547,6 +547,7 @@ EXTRA_DIST = \ test12.4 \ test12.5 \ test13.1 \ + test13.2 \ test14.1 \ test14.2 \ test14.3 \ diff --git a/testsuite/expect/README b/testsuite/expect/README index d7ef9d2961..718703a2a8 100644 --- a/testsuite/expect/README +++ b/testsuite/expect/README @@ -400,6 +400,7 @@ test12.5 Test sacct --helpformat option. test13.# Testing of switch plugins ==================================== test13.1 Test that we avoid re-using active switch contexts. +test13.2 Test for switch/nrt's --network options. test14.# Testing of sbcast options. diff --git a/testsuite/expect/test13.2 b/testsuite/expect/test13.2 new file mode 100755 index 0000000000..b0dbfb5449 --- /dev/null +++ b/testsuite/expect/test13.2 @@ -0,0 +1,176 @@ +#!/usr/bin/expect +############################################################################ +# Purpose: Test of NRT functionality +# Test of switch/nrt options (--network option). +# +# Output: "TEST: #.#" followed by "SUCCESS" if test was successful, OR +# "FAILURE: ..." otherwise with an explanation of the failure, OR +# anything else indicates a failure mode that must be investigated. +############################################################################ +# Copyright (C) 2012 SchedMD LLC +# +# This file is part of SLURM, a resource management program. +# For details, see . +# Please also read the included file: DISCLAIMER. +# +# SLURM is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 2 of the License, or (at your option) +# any later version. +# +# SLURM is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS +# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more +# details. +# +# You should have received a copy of the GNU General Public License along +# with SLURM; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +############################################################################ +source ./globals + +set exit_code 0 +set test_code 0 +set fail 0 + +if {[test_switch_nrt] == 0} { + send_user "\nWARNING: This test is only compatable with switch/nrt systems\n" + exit 0 +} + + +# +# This tests a few options that should and should not work for NRT +# +proc create_nrtparams {nrt_params} { + + global bin_id srun fail + + set fail 0 + eval spawn $srun -N1-2 -n2 -O --network=$nrt_params $bin_id + expect { + -re "error" { + set fail 1 + exp_continue + } + timeout { + send_user "\nFAILUR0E: srun not responding\n" + set exit_code 1 + exp_continue + } + eof { + wait + } + } + +} + +proc create_nrtparams_4tasks {nrt_params} { + + global bin_id srun fail + + set fail 0 + eval spawn $srun -N1-2 -n4 -O --network=$nrt_params $bin_id + expect { + -re "error" { + set fail 1 + exp_continue + } + timeout { + send_user "\nFAILURE: srun not responding\n" + set exit_code 1 + exp_continue + } + eof { + wait + } + } +} + + +# +# This makes a list of all the bad test to be tested. +# +send_user "\n===============Bad Tests===================\n" + +set badtest " +{sn_all,devtype=hfi} +{sn_single,devtype=hfi} +{sn_single,devtype=iponly,us} +" + +foreach test $badtest { + set test_code [create_nrtparams $test] + if {$fail == 1} { + send_user "Error expected here, don't worry :)\n" + send_user "fail_code = $fail\n\n" + } else { + send_user "FAILURE: This test should have failed but did not.\n" + send_user "fail_code = $fail\n\n" + set exit_code 1 + } + +} + +# +# This test a list of all the good tests that should succeed. +# +send_user "\n===============Good Tests================\n" +set goodtest " +{sn_all,devtype=ib} +{sn_all,devtype=iponly} +{sn_single,devtype=ib} +{sn_single,devtype=ib,us} +{sn_single,devtype=iponly,ipv4} +{sn_single,devtype=iponly,ipv6} +{sn_all,ipv6} +{mlx4_0} +{eth0} +{mlx4_0,mpi,lapi} +{mlx4_0,mpi,lapi,us} +{mlx4_0,mpi,lapi,instances=3} +{sn_all} +{sn_all,mpi,lapi} +{sn_all,mpi,lapi} +{mlx4_0,bulk_xfer,us} +" + +foreach test $goodtest { + set test_code [create_nrtparams $test] + if {$fail == 0} { + send_user "This test should work :)\n" + send_user "fail_code = $fail\n\n" + } else { + send_user "FAILURE: This test should not have failed\n" + send_user "fail_code = $fail\n\n" + set exit_code 1 + } +} + +# +# This test a list of all the good test with 4 tasks +# +send_user "\n============Good Tests With 4 Tasks============\n" +set good4task " +{mlx4_0,mpi,lapi,us,instances=3} +{sn_all,mpi,lapi,instances=2} +{sn_all,mpi,lapi,instances=3,us} +" + +foreach test $good4task { + set test_code [create_nrtparams_4tasks $test] + if {$fail == 0} { + send_user "This test should work :)\n" + send_user "fail_code = $fail\n\n" + } else { + send_user "FAILURE: This test should not have failed\n" + send_user "fail_code = $fail\n\n" + set exit_code 1 + } +} + +if {$exit_code != 0} { + send_user "\nFAILURE\n" +} else { + send_user "\nSUCCESS\n" +} -- GitLab From ee71e2a4859e6bba06f83719239638cb9d36a235 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 14:06:42 -0700 Subject: [PATCH 539/614] Fix typo in test --- testsuite/expect/test13.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/expect/test13.2 b/testsuite/expect/test13.2 index b0dbfb5449..972b04328a 100755 --- a/testsuite/expect/test13.2 +++ b/testsuite/expect/test13.2 @@ -54,7 +54,7 @@ proc create_nrtparams {nrt_params} { exp_continue } timeout { - send_user "\nFAILUR0E: srun not responding\n" + send_user "\nFAILURE: srun not responding\n" set exit_code 1 exp_continue } -- GitLab From 4dc4fe90660ac86df6fa2f22a6e1add11b7424f8 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 3 Jul 2012 15:31:31 -0700 Subject: [PATCH 540/614] Tweak test for down node --- testsuite/expect/test1.87 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/testsuite/expect/test1.87 b/testsuite/expect/test1.87 index 457ff29be0..0a63c106e8 100755 --- a/testsuite/expect/test1.87 +++ b/testsuite/expect/test1.87 @@ -76,6 +76,11 @@ expect { slow_kill $srun_pid exit 0 } + -re "Required node not available" { + send_user "\nWARNING: can't test srun task distribution\n" + exec $bin_rm -f $file_in + exit $exit_code + } -re "Unable to contact" { send_user "\nFAILURE: slurm appears to be down\n" exit 1 -- GitLab From 59631af33238f41634e8c80597b4bf7cc4043f0c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 10:48:50 -0700 Subject: [PATCH 541/614] switch/nrt: Add missing unload_table logic --- src/plugins/switch/nrt/nrt.c | 98 ++++++++++++++++++++++++++---------- 1 file changed, 71 insertions(+), 27 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index c0b0417c91..072049c377 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -3286,29 +3286,12 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, return SLURM_FAILURE; } - -/* Assumes that, on error, new switch state information will be - * read from node. - * - * Used by: slurmd - */ -extern int -nrt_unload_table(slurm_nrt_jobinfo_t *jp) +static int _unload_job_windows(slurm_nrt_jobinfo_t *jp) { nrt_window_id_t window_id = 0; int err, i, j, rc = SLURM_SUCCESS; int retry = 15; - assert(jp); - assert(jp->magic == NRT_JOBINFO_MAGIC); - - if (debug_flags & DEBUG_FLAG_SWITCH) { - info("nrt_unload_table"); - _print_jobinfo(jp); - } - - if (!jp->user_space) - return rc; for (i = 0; i < jp->tables_per_task; i++) { for (j = 0; j < jp->tableinfo[i].table_length; j++) { if (jp->tableinfo[i].adapter_type == NRT_IB) { @@ -3347,6 +3330,55 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) return rc; } +/* Assumes that, on error, new switch state information will be + * read from node. + * + * Used by: slurmd + */ +extern int +nrt_unload_table(slurm_nrt_jobinfo_t *jp) +{ + int err, i, j, rc = SLURM_SUCCESS; + nrt_cmd_unload_table_t unload_table; + + assert(jp); + assert(jp->magic == NRT_JOBINFO_MAGIC); + + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("nrt_unload_table"); + _print_jobinfo(jp); + } + + if (jp->user_space) + rc = _unload_job_windows(jp); + unload_table.job_key = jp->job_key; + for (i = 0; i < jp->tables_per_task; i++) { + for (j = 0; j < jp->tableinfo[i].table_length; j++) { + unload_table.context_id = jp->tableinfo[i].context_id; + unload_table.table_id = jp->tableinfo[i].table_id; + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("Unload table for job_key:%u " + "context_id:%u table_id:%u", + unload_table.job_key, + unload_table.context_id, + unload_table.table_id); + } + err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_TABLE, + &unload_table); + if (err != NRT_SUCCESS) { + error("Unable to unload table for job_key:%u " + "context_id:%u table_id:%u error:%s", + unload_table.job_key, + unload_table.context_id, + unload_table.table_id, + nrt_err_str(err)); + rc = SLURM_ERROR; + } + } + } + return rc; +} + extern int nrt_fini(void) { @@ -3533,6 +3565,7 @@ nrt_libstate_clear(void) extern int nrt_clear_node_state(void) { + static bool first_use = true; int err, i, j, k, rc = SLURM_SUCCESS; nrt_cmd_query_adapter_types_t adapter_types; unsigned int num_adapter_types; @@ -3627,17 +3660,28 @@ nrt_clear_node_state(void) continue; } if (window_count > max_windows) { -/* FIXME: Investigate this error on eth0? */ + /* This error seems to happen on IP_ONLY + * adapters if the unload_table does not + * occur */ /* FIXME: Check for memory leaks */ -/* FIXME: Investigate slow throughput reported by test9.9 */ -/* FIXME: Add tests for new network options */ /* FIXME: Review and test Torrent logic */ - error("nrt_command(status_adapter, %s, %s): " - "window_count > max_windows (%u > %hu)", - adapter_status.adapter_name, - _adapter_type_str(adapter_status. - adapter_type), - window_count, max_windows); + if (first_use) { + error("nrt_command(status_adapter, " + "%s, %s): window_count > " + "max_windows (%u > %hu)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count, max_windows); + } else { + debug("nrt_command(status_adapter, " + "%s, %s): window_count > " + "max_windows (%u > %hu)", + adapter_status.adapter_name, + _adapter_type_str(adapter_status. + adapter_type), + window_count, max_windows); + } /* Reset value to avoid logging bad data */ window_count = max_windows; } -- GitLab From d757077c97c55c6e7d520713e149933c190e7f6c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 11:51:16 -0700 Subject: [PATCH 542/614] switch/nrt: Fix memory leaks --- src/plugins/switch/nrt/nrt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 072049c377..081d2ae509 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2450,6 +2450,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, host = hostlist_next(hi); _lock(); node = _find_node(nrt_state, host); + if (host != NULL) + free(host); if (node && node->adapter_list) { for (i = 0; i < node->adapter_count; i++) { nrt_adapter_t ad_type; @@ -2481,8 +2483,6 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, info("switch/nrt: no adapter found for job"); } _unlock(); - if (host != NULL) - free(host); hostlist_iterator_reset(hi); if (jp->tables_per_task == 0) return SLURM_FAILURE; @@ -3858,6 +3858,8 @@ extern bool nrt_adapter_name_check(char *token, hostlist_t hl) hostlist_iterator_destroy(hi); _lock(); node = _find_node(nrt_state, host); + if (host) + free(host); if (node && node->adapter_list) { for (i = 0; i < node->adapter_count; i++) { if (strcmp(token,node->adapter_list[i].adapter_name)) -- GitLab From f56323de2c50676f51bc2f10c137d0be8ca3308d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 11:51:50 -0700 Subject: [PATCH 543/614] switch/nrt: fix unload table logic --- src/plugins/switch/nrt/nrt.c | 61 +++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 28 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 081d2ae509..296587a226 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -3286,6 +3286,34 @@ _unload_window(char *adapter_name, nrt_adapter_t adapter_type, return SLURM_FAILURE; } +static int _unload_job_table(slurm_nrt_jobinfo_t *jp) +{ + int err, i, rc = SLURM_SUCCESS; + nrt_cmd_unload_table_t unload_table; + + unload_table.job_key = jp->job_key; + for (i = 0; i < jp->tables_per_task; i++) { + unload_table.context_id = jp->tableinfo[i].context_id; + unload_table.table_id = jp->tableinfo[i].table_id; + if (debug_flags & DEBUG_FLAG_SWITCH) { + info("Unload table for job_key:%u " + "context_id:%u table_id:%u", + unload_table.job_key, unload_table.context_id, + unload_table.table_id); + } + err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_TABLE, + &unload_table); + if (err != NRT_SUCCESS) { + error("Unable to unload table for job_key:%u " + "context_id:%u table_id:%u error:%s", + unload_table.job_key, unload_table.context_id, + unload_table.table_id, nrt_err_str(err)); + rc = SLURM_ERROR; + } + } + return rc; +} + static int _unload_job_windows(slurm_nrt_jobinfo_t *jp) { nrt_window_id_t window_id = 0; @@ -3314,7 +3342,7 @@ static int _unload_job_windows(slurm_nrt_jobinfo_t *jp) hpce_tbl_ptr += j; window_id = hpce_tbl_ptr->win_id; } else { - fatal("nrt_unload_table: invalid adapter " + fatal("nrt_unload_window: invalid adapter " "type: %s", _adapter_type_str(jp->tableinfo[i]. adapter_type)); @@ -3338,8 +3366,7 @@ static int _unload_job_windows(slurm_nrt_jobinfo_t *jp) extern int nrt_unload_table(slurm_nrt_jobinfo_t *jp) { - int err, i, j, rc = SLURM_SUCCESS; - nrt_cmd_unload_table_t unload_table; + int rc = SLURM_SUCCESS; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -3351,31 +3378,9 @@ nrt_unload_table(slurm_nrt_jobinfo_t *jp) if (jp->user_space) rc = _unload_job_windows(jp); - unload_table.job_key = jp->job_key; - for (i = 0; i < jp->tables_per_task; i++) { - for (j = 0; j < jp->tableinfo[i].table_length; j++) { - unload_table.context_id = jp->tableinfo[i].context_id; - unload_table.table_id = jp->tableinfo[i].table_id; - if (debug_flags & DEBUG_FLAG_SWITCH) { - info("Unload table for job_key:%u " - "context_id:%u table_id:%u", - unload_table.job_key, - unload_table.context_id, - unload_table.table_id); - } - err = nrt_command(NRT_VERSION, NRT_CMD_UNLOAD_TABLE, - &unload_table); - if (err != NRT_SUCCESS) { - error("Unable to unload table for job_key:%u " - "context_id:%u table_id:%u error:%s", - unload_table.job_key, - unload_table.context_id, - unload_table.table_id, - nrt_err_str(err)); - rc = SLURM_ERROR; - } - } - } + else + rc = _unload_job_table(jp); + return rc; } -- GitLab From d7f384e4c2190a10f23ce9094f5a9dfb921917b3 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 12:25:05 -0700 Subject: [PATCH 544/614] switch/nrt: major memory leak fix --- src/common/slurm_protocol_defs.c | 2 +- src/plugins/switch/nrt/nrt.c | 84 +++++++------------------------- 2 files changed, 18 insertions(+), 68 deletions(-) diff --git a/src/common/slurm_protocol_defs.c b/src/common/slurm_protocol_defs.c index 148bf7244f..083070976f 100644 --- a/src/common/slurm_protocol_defs.c +++ b/src/common/slurm_protocol_defs.c @@ -504,7 +504,7 @@ extern void slurm_free_node_registration_status_msg( xfree(msg->node_name); xfree(msg->os); xfree(msg->step_id); - if (msg->startup) + if (msg->switch_nodeinfo) switch_g_free_node_info(&msg->switch_nodeinfo); xfree(msg); } diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 296587a226..1d0c44c529 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1727,7 +1727,7 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) nrt_cmd_status_adapter_t adapter_status; nrt_cmd_query_adapter_info_t query_adapter_info; nrt_adapter_info_t adapter_info; - nrt_status_t **status_array = NULL; + nrt_status_t *status_array = NULL; nrt_window_id_t window_count; if (debug_flags & DEBUG_FLAG_SWITCH) @@ -1780,25 +1780,13 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) max_windows); } } - status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); - for (j = 0; j < max_windows; j++) { - /* - * WARNING: DO NOT USE xmalloc here! - * - * The nrt_command(NRT_CMD_STATUS_ADAPTER) function - * changes pointer values and returns memory that is - * allocated with malloc() and deallocated with free() - */ - status_array[j] = malloc(sizeof(nrt_status_t) * - max_windows); - } for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; - adapter_status.status_array = status_array; + adapter_status.status_array = &status_array; adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); @@ -1843,9 +1831,9 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) for (k = 0; k < window_count; k++) { slurm_nrt_window_t *window_ptr; window_ptr = adapter_ptr->window_list + k; - window_ptr->window_id = (*status_array)[k]. + window_ptr->window_id = status_array[k]. window_id; - window_ptr->state = (*status_array)[k].state; + window_ptr->state = status_array[k].state; /* window_ptr->job_key = Not_Available */ } @@ -1904,12 +1892,6 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) ipv6_addr; } } - if (status_array) { - for (j = 0; j < max_windows; j++) { - free(status_array[j]); - } - xfree(status_array); - } xfree(adapter_info.window_list); } if (debug_flags & DEBUG_FLAG_SWITCH) { @@ -2967,23 +2949,12 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, int err, i, j; int rc = SLURM_ERROR; nrt_cmd_status_adapter_t status_adapter; - nrt_status_t **status_array = NULL; + nrt_status_t *status_array = NULL; nrt_window_id_t window_count; - status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); - for (j = 0; j < max_windows; j++) { - /* - * WARNING: DO NOT USE xmalloc here! - * - * The nrt_command(NRT_CMD_STATUS_ADAPTER) function - * changes pointer values and returns memory that is - * allocated with malloc() and deallocated with free() - */ - status_array[j] = malloc(sizeof(nrt_status_t) * max_windows); - } status_adapter.adapter_name = adapter_name; status_adapter.adapter_type = adapter_type; - status_adapter.status_array = status_array; + status_adapter.status_array = &status_array; status_adapter.window_count = &window_count; for (i = 0; i < retry; i++) { @@ -3003,7 +2974,7 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, _print_adapter_status(&status_adapter); } for (j = 0; j < window_count; j++) { - if ((*status_array)[j].window_id == window_id) + if (status_array[j].window_id == window_id) break; } if (j >= window_count) { @@ -3013,21 +2984,16 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, window_id); break; } - if ((*status_array)[j].state == NRT_WIN_AVAILABLE) { + if (status_array[j].state == NRT_WIN_AVAILABLE) { rc = SLURM_SUCCESS; break; } debug2("nrt_status_adapter(%s, %s), window %u state %s", adapter_name, _adapter_type_str(adapter_type), window_id, - _win_state_str((*status_array)[j].state)); + _win_state_str(status_array[j].state)); } - for (j = 0; j < max_windows; j++) { - free(status_array[j]); - } - xfree(status_array); - return rc; } @@ -3579,7 +3545,7 @@ nrt_clear_node_state(void) unsigned int max_windows, num_adapter_names; nrt_cmd_status_adapter_t adapter_status; nrt_window_id_t window_count; - nrt_status_t **status_array = NULL; + nrt_status_t *status_array = NULL; nrt_cmd_clean_window_t clean_window; char window_str[128]; hostset_t hs = NULL; @@ -3634,24 +3600,12 @@ nrt_clear_node_state(void) } } - status_array = xmalloc(sizeof(nrt_status_t *) * max_windows); - for (j = 0; j < max_windows; j++) { - /* - * WARNING: DO NOT USE xmalloc here! - * - * The nrt_command(NRT_CMD_STATUS_ADAPTER) function - * changes pointer values and returns memory that is - * allocated with malloc() and deallocated with free() - */ - status_array[j] = malloc(sizeof(nrt_status_t) * - max_windows); - } for (j = 0; j < num_adapter_names; j++) { adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. adapter_type; - adapter_status.status_array = status_array; + adapter_status.status_array = &status_array; adapter_status.window_count = &window_count; err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &adapter_status); @@ -3698,16 +3652,16 @@ nrt_clear_node_state(void) adapter_type), window_count); for (k = 0; k < window_count; k++) { - win_state_t state = (*status_array) - [k].state; + win_state_t state = status_array[k]. + state; if ((state == NRT_WIN_AVAILABLE) && (k >= NRT_DEBUG_CNT)) continue; info("window_id:%d uid:%d pid:%d " "state:%s", - (*status_array)[k].window_id, - (*status_array)[k].uid, - (*status_array)[k].client_pid, + status_array[k].window_id, + status_array[k].uid, + status_array[k].client_pid, _win_state_str(state)); } @@ -3721,7 +3675,7 @@ nrt_clear_node_state(void) clean_window.adapter_type = adapter_names. adapter_type; clean_window.leave_inuse_or_kill = KILL; - clean_window.window_id = (*status_array)[k]. + clean_window.window_id = status_array[k]. window_id; err = nrt_command(NRT_VERSION, NRT_CMD_CLEAN_WINDOW, @@ -3759,10 +3713,6 @@ nrt_clear_node_state(void) hostset_destroy(hs); } } - for (j = 0; j < max_windows; j++) { - free(status_array[j]); - } - xfree(status_array); } if (debug_flags & DEBUG_FLAG_SWITCH) info("nrt_clear_node_state: complete:%d", rc); -- GitLab From 7a140c938706c17ee2fcb59fd555388df31bba23 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 13:22:02 -0700 Subject: [PATCH 545/614] switch/nrt: memory leak fix. This code change is completely different from IBM's example code, but eliminates memory leaks that exist in iBM's sample code. --- src/plugins/switch/nrt/nrt.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 1d0c44c529..4e1c923ed8 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1782,6 +1782,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } for (j = 0; j < num_adapter_names; j++) { slurm_nrt_adapter_t *adapter_ptr; + if (status_array) { + free(status_array); + status_array = NULL; + } adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. @@ -1894,6 +1898,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } xfree(adapter_info.window_list); } + if (status_array) + free(status_array); if (debug_flags & DEBUG_FLAG_SWITCH) { _print_nodeinfo(n); info("_get_adapters: complete: %d", rc); @@ -2961,6 +2967,10 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, if (i > 0) sleep(1); + if (status_array) { + free(status_array); + status_array = NULL; + } err = nrt_command(NRT_VERSION, NRT_CMD_STATUS_ADAPTER, &status_adapter); if (err != NRT_SUCCESS) { @@ -2993,6 +3003,8 @@ _wait_for_window_unloaded(char *adapter_name, nrt_adapter_t adapter_type, _adapter_type_str(adapter_type), window_id, _win_state_str(status_array[j].state)); } + if (status_array) + free(status_array); return rc; } @@ -3601,6 +3613,10 @@ nrt_clear_node_state(void) } for (j = 0; j < num_adapter_names; j++) { + if (status_array) { + free(status_array); + status_array = NULL; + } adapter_status.adapter_name = adapter_names. adapter_names[j]; adapter_status.adapter_type = adapter_names. @@ -3714,6 +3730,8 @@ nrt_clear_node_state(void) } } } + if (status_array) + free(status_array); if (debug_flags & DEBUG_FLAG_SWITCH) info("nrt_clear_node_state: complete:%d", rc); -- GitLab From 832fe7e802ee613996f690ab1faab95158d54215 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 5 Jul 2012 13:54:12 -0700 Subject: [PATCH 546/614] switch/nrt: elimnates all known memory leaks in the code --- src/plugins/switch/nrt/nrt.c | 3 ++- src/plugins/switch/nrt/switch_nrt.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4e1c923ed8..6a028a013b 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2902,6 +2902,8 @@ nrt_free_jobinfo(slurm_nrt_jobinfo_t *jp) } xfree(jp->tableinfo); } + if (jp->nodenames) + hostlist_destroy(jp->nodenames); xfree(jp); jp = NULL; @@ -3638,7 +3640,6 @@ nrt_clear_node_state(void) /* This error seems to happen on IP_ONLY * adapters if the unload_table does not * occur */ -/* FIXME: Check for memory leaks */ /* FIXME: Review and test Torrent logic */ if (first_use) { error("nrt_command(status_adapter, " diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index a1e6764f2d..fb5517ab89 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -57,6 +57,7 @@ #define NRT_BUF_SIZE 4096 +char local_dir_path[1024]; bool nrt_need_state_save = false; static void _spawn_state_save_thread(char *dir); @@ -796,6 +797,9 @@ static void *_state_save_thread(void *arg) { char *dir_name = (char *)arg; + strncpy(local_dir_path, dir_name, sizeof(local_dir_path)); + xfree(dir_name); + while (1) { sleep(10); if (nrt_need_state_save) { @@ -803,6 +807,7 @@ static void *_state_save_thread(void *arg) _switch_p_libstate_save(dir_name, false); } } + return NULL; } -- GitLab From dd1d573f844727f43fcd2ad4d95226bf23452b03 Mon Sep 17 00:00:00 2001 From: Carles Fenoy Date: Thu, 5 Jul 2012 15:39:11 -0700 Subject: [PATCH 547/614] Fix for incorrect partition point for job If job is submitted to more than one partition, it's partition pointer can be set to an invalid value. This can result in the count of CPUs allocated on a node being bad, resulting in over- or under-allocation of its CPUs. Patch by Carles Fenoy, BSC. Hi all, After a tough day I've finally found the problem and a solution for 2.4.1 I was able to reproduce the explained behavior by submitting jobs to 2 partitions. This makes the job to be allocated in one partition but in the schedule function the partition of the job is changed to the NON allocated one. This makes that the resources can not be free at the end of the job. I've solved this by changing the IS_PENDING test some lines above in the schedule function in (job_scheduler.c) This is the code from the git HEAD (Line 801). As this file has changed a lot from 2.4.x I have not done a patch but I'm commenting the solution here. I've moved the if(!IS_JOB_PENDING) after the 2nd line (part_ptr...). This prevents the partition of the job to be changed if it is already starting in another partition. job_ptr = job_queue_rec->job_ptr; part_ptr = job_queue_rec->part_ptr; job_ptr->part_ptr = part_ptr; xfree(job_queue_rec); if (!IS_JOB_PENDING(job_ptr)) continue; /* started in other partition */ Hope this is enough information to solve it. I've just realized (while writing this mail) that my solution has a memory leak as job_queue_rec is not freed. Regards, Carles Fenoy --- NEWS | 4 ++++ src/slurmctld/job_scheduler.c | 6 ++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 0c19dc3674..68bde229c4 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,10 @@ documents those changes that are of interest to users and admins. ======================== -- BLUEGENE - Correct potential deadlock issue when hardware goes bad and there are jobs running on that hardware. + -- If job is submitted to more than one partition, it's partition pointer can + be set to an invalid value. This can result in the count of CPUs allocated + on a node being bad, resulting in over- or under-allocation of its CPUs. + Patch by Carles Fenoy, BSC. * Changes in SLURM 2.4.1 ======================== diff --git a/src/slurmctld/job_scheduler.c b/src/slurmctld/job_scheduler.c index 5e97a20544..e33bdbb57e 100644 --- a/src/slurmctld/job_scheduler.c +++ b/src/slurmctld/job_scheduler.c @@ -491,8 +491,6 @@ extern int schedule(uint32_t job_limit) while ((job_queue_rec = list_pop_bottom(job_queue, sort_job_queue2))) { job_ptr = job_queue_rec->job_ptr; part_ptr = job_queue_rec->part_ptr; - /* Cycle through partitions usable for this job */ - job_ptr->part_ptr = part_ptr; xfree(job_queue_rec); if ((time(NULL) - sched_start) >= sched_timeout) { debug("sched: loop taking too long, breaking out"); @@ -508,6 +506,10 @@ extern int schedule(uint32_t job_limit) if (!IS_JOB_PENDING(job_ptr)) continue; /* started in other partition */ + + /* Cycle through partitions usable for this job */ + job_ptr->part_ptr = part_ptr; + if (job_ptr->priority == 0) { /* held */ debug3("sched: JobId=%u. State=%s. Reason=%s. " "Priority=%u.", -- GitLab From 1b2ff838cec084bedd53b8630811102d37bd27e0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 6 Jul 2012 09:16:33 -0700 Subject: [PATCH 548/614] Move srun loading of plugins earlier in the logic This move reduces the risk of srun failing horribly due to code that is inconsistent with the plugins if srun is running during a SLURM upgrade, especially a major upgrade in which the plugin function arguments can change --- src/srun/libsrun/opt.c | 6 ++++++ src/srun/srun.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/srun/libsrun/opt.c b/src/srun/libsrun/opt.c index d052d6e44c..ffe82930ba 100644 --- a/src/srun/libsrun/opt.c +++ b/src/srun/libsrun/opt.c @@ -196,6 +196,7 @@ int error_exit = 1; int immediate_exit = 1; /*---- forward declarations of static functions ----*/ +static bool mpi_initialized = false; typedef struct env_vars env_vars_t; @@ -679,6 +680,7 @@ _process_env_var(env_vars_t *e, const char *val) e->var, val); exit(error_exit); } + mpi_initialized = true; break; case OPT_SIGNAL: @@ -1168,6 +1170,7 @@ static void set_options(const int argc, char **argv) optarg); exit(error_exit); } + mpi_initialized = true; break; case LONG_OPT_RESV_PORTS: if (optarg) @@ -2115,6 +2118,9 @@ static bool _opt_verify(void) &opt.cpu_bind_type)) exit(error_exit); + if (!mpi_initialized) + (void) mpi_hook_client_init(NULL); + return verified; } diff --git a/src/srun/srun.c b/src/srun/srun.c index 0783feca81..eeca6ca072 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -74,7 +74,6 @@ #include "src/common/fd.h" #include "src/common/hostlist.h" #include "src/common/log.h" -#include "src/common/mpi.h" #include "src/common/net.h" #include "src/common/plugstack.h" #include "src/common/read_config.h" @@ -183,6 +182,9 @@ int srun(int ac, char **av) if (slurm_select_init(1) != SLURM_SUCCESS ) fatal( "failed to initialize node selection plugin" ); + if (switch_init() != SLURM_SUCCESS ) + fatal("failed to initialize switch plugin"); + #ifndef HAVE_CRAY_EMULATION if (is_cray_system() || is_cray_select_type()) { error("operation not supported on Cray systems - use aprun(1)"); -- GitLab From 5a68d9ab50be45cc789515af50cdb4ea8be1e2e6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 6 Jul 2012 14:53:21 -0700 Subject: [PATCH 549/614] Add web page with information about SLURM/POE interface The document still needs work, but is a decent start --- doc/html/Makefile.am | 1 + doc/html/Makefile.in | 1 + doc/html/documentation.shtml | 4 +- doc/html/news.shtml | 7 +- doc/html/poe.shtml | 168 +++++++++++++++++++++++++++++++++++ 5 files changed, 177 insertions(+), 4 deletions(-) create mode 100644 doc/html/poe.shtml diff --git a/doc/html/Makefile.am b/doc/html/Makefile.am index 9ed962a470..a8b5a26032 100644 --- a/doc/html/Makefile.am +++ b/doc/html/Makefile.am @@ -46,6 +46,7 @@ generated_html = \ multi_cluster.html \ news.html \ overview.html \ + poe.html \ platforms.html \ plugins.html \ power_save.html \ diff --git a/doc/html/Makefile.in b/doc/html/Makefile.in index 88c70c1d21..380302c2be 100644 --- a/doc/html/Makefile.in +++ b/doc/html/Makefile.in @@ -361,6 +361,7 @@ generated_html = \ multi_cluster.html \ news.html \ overview.html \ + poe.html \ platforms.html \ plugins.html \ power_save.html \ diff --git a/doc/html/documentation.shtml b/doc/html/documentation.shtml index 9b4a390200..746127f4b7 100644 --- a/doc/html/documentation.shtml +++ b/doc/html/documentation.shtml @@ -19,6 +19,7 @@ Also see Publications and Presentations.
        • Blue Gene User and Administrator Guide
        • Cray User and Administrator Guide
        • IBM AIX User and Administrator Guide
        • +
        • IBM Parallel Environment User and Administrator Guide
      @@ -59,6 +60,7 @@ Also see Publications and Presentations.
    • Blue Gene User and Administrator Guide
    • Cray User and Administrator Guide
    • IBM AIX User and Administrator Guide
    • +
    • IBM Parallel Environment User and Administrator Guide
    • Sun Constellation Aministrator Guide
    @@ -97,6 +99,6 @@ Also see Publications and Presentations. -

    Last modified 15 May 2012

    +

    Last modified 6 July 2012

    diff --git a/doc/html/news.shtml b/doc/html/news.shtml index a77a0c45d6..29d30d20ad 100644 --- a/doc/html/news.shtml +++ b/doc/html/news.shtml @@ -35,8 +35,9 @@ Major enhancements planned include:
  • Job specification of desired CPU frequency, which will effect it's power usage and possibly its execution cost.
  • Integration with FlexLM license management.
  • -
  • Integration with IBM's Parallel Environment including POE (Parallel -Operating Environment) and NRT (Network Resource Table) API.
  • +
  • Integration with IBM's +Parallel Environment +including POE (Parallel Operating Environment) and NRT (Network Resource Table) API.
  • Highly optimized thoughput for serial jobs in a new "select/serial" plugin.
  • @@ -82,6 +83,6 @@ trojan library, then that library will be used by the SLURM daemon with unpredictable results. This was fixed in SLURM version 2.1.14. -

    Last modified 29 June 2012

    +

    Last modified 6 July 2012

    diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml new file mode 100644 index 0000000000..e0ab7c0285 --- /dev/null +++ b/doc/html/poe.shtml @@ -0,0 +1,168 @@ + + +

    IBM Parallel Environment User and Administrator Guide

    + +

    Overview

    + +

    This document describes the unique features of SLURM on the +IBM computers with the +Parallel Environment (PE) +software. You should be familiar with the SLURM's mode of operation on Linux +clusters before studying the relatively few differences in operation on systems +with PE, which are described in this document.

    + +

    User Tools

    + +

    The normal set of SLURM user tools: srun, scancel, sinfo, smap, squeue and +scontrol provide all of the expected services. Job steps are launched using the +srun command, which translates its options and invokes IBM's poe command. The +poe command actually launches the tasks. The poe command may also be invoked +directly if desired. The actual task launch process is as follows:

    +
      +
    1. Invoke srun command with desired options.
    2. +
    3. The srun command creates a job allocation (if necessary).
    4. +
    5. The srun command translates its options and invokes the poe command.
    6. +
    7. The poe command loads a SLURM library that provides various resource +management functionality.
    8. +
    9. The poe command, through the SLURM library, launches a process named +"pmdv12" on the appropriate compute nodes. Note that the "v12" on the end of +the process name represents the version number of the "pmd" process and is +subject to change.
    10. +
    11. The poe command interacts with the pmdv12 process to launch the application +tasks, handle their I/O, etc. Since the task launch procedure occurs outside of +SLURM's control, none of the normal task-level SLURM support is available.
    12. +
    13. The poe command, through the SLURM library, notes the completion of the +job step.
    14. +
    + +

    Network Options

    +

    Each job step can specify it's desired network options. +For example, one job step may use IP mode communications and the next use +User Space (US) mode communications. +Network specifications may be specified using srun's --network option or the +SLURM_NETWORK environment variable. Supported network options include:

    +
      +
    • Network protocol
    • +
        +
      • ipv4 Internet protocol, version 4 (default)
      • +
      • ipv6 Internet protocol, version 6
      • +
      • us User Space protocol, may be combined with ibv4 or ipv6
      • +
      +
    • Task communication interface
    • +
        +
      • lapi Low-level Application Programming Interface
      • +
      • mpi Message Passing Interface (default)
      • +
      • pami Parallel Active Message Interface
      • +
      • upc Unified Parallel C Interface
      • +
      +
    • Other options
    • +
        +
      • bulk_xfer [=resources] + Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). + The optional resources specification is a numeric value which can have + a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or + gigabytes.
      • +
      • devname=name + Specify the name of an network adapter to use. + For example: "eth0" or "mlx4_0".
      • +
      • devtype=type + Specify the device type to use for communications. + The supported values of type are: + "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), + "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and + "KMUX" (Kernel Emulation of HPCE).
      • +
      • instances=count + Specify number of network connections for each task on each network connection. + The default instance count is 1.
      • +
      • sn_all Use all available switch networks (default). + This option can not be combined with sn_single.
      • +
      • sn_single Use only one switch network. + This option can not be combined with sn_all. + If multiple networks of different types exist, the devname or + devtype option can be used to select one of them.
      • +
      +
    + +

    + +

    Debugging

    + +

    Most debuggers require detailed information about launched tasks such as +host name, process ID, etc. Since that information is only available from +poe (which launches those tasks), the srun command wrapper can not be used +for most debugging purposes. You or the debugging tool must invoke the poe +command directly. In order to facilitate use of poe, srun's +
    FIXME: We need to add this functionality +option may be used with the options +normally used in order to generate the equivalent poe command line, which +can subsequently be used with the debugger.

    + +

    Checkpoint

    + +

    FIXME: We need to validate all of this +SLURM supports checkpoint via poe. +In order to enable checkpoint, the shell executing the poe command must +itself be initiated with the environment variable CHECKPOINT=yes. +One file is written for each node on which the job is executing, plus +another for the script executing poe.a +By default, the checkpoint files will be written to the current working +directory of the job. +Names and locations of these files can be controlled using the +environment variables MP_CKPTFILE and MP_CKPTDIR. +Use the squeue command to identify the job and job step of interest. +To initiate a checkpoint in which the job step will continue execution, +use the command:
    +scontrol check create job_id.step_id
    +To initiate a checkpoint in which the job step will terminate afterwards, +use the command:
    +scontrol check vacate job_id.step_id

    + +

    Unsupported Options

    + +

    Some SLURM options can not be supported by PE and the following srun options +are silently ignored:

    +
      +
    • -K, --kill-on-bad-exit (terminate step if any task has a non-zero exit code)
    • +
    • -k, --no-kill (set to not kill job upon node failure)
    • +
    • --ntasks-per-core (number of tasks to invoke per code)
    • +
    • --ntasks-per-socket (number of tasks to invoke per socket)
    • +
    • -O, --overcommit (over subscribe resources)
    • +
    • --resv-ports (communication ports reserved for OpenMPI)
    • +
    • --runjob-opts (used only on IBM BlueGene/Q systems)
    • +
    • --signal (signal to send when near time limit and the remaining time required)
    • +
    • --sockets-per-node (number of sockets per node required)
    • +
    • -u, --unbuffered (avoid line buffering)
    • +
    • -W, --wait (specify job swait time after first task exit)
    • +
    • -Z, --no-allocate (launch tasks without creating job allocation>
    • +
    + +

    System Administration

    + +

    There are two critical SLURM configuration parameters for use with PE. +These configuration parameters should be set in your slurm.conf file. +SwitchType defines the mechanism used to manage the network switch and +it must be set to switch/nrt and use IBM's Network Resource Table (NRT) +interface. In order for the switch/nrt plugin to be built, the NRT header file +and library must be found at the time the SLURM is built. SLURM searches for +the nrt.h file in the /usr/include directory by default. If the file is not +installed there, you can specify a different location using the +--with-nrth=PATH option to the configure program, where "PATH" is the +fully qualified pathname of the parent directory of the nrt.h file. +SLURM searches for the libnrt.so file in the /usr/lib and /usr/lib64 directories +by default. If the file is not installed there, you can specify a different +location using the --with-nrtlib=PATH option to the configure program, +where "PATH" is the fully qualified pathname of the parent directory of the +libnrt.so file. +Alternately these values may be specified in your ~/.rpmmacros file. +For example:

    +
    +%_with_nrth      "/opt/ibmhpc/pecurrent/base/include"
    +%_with_libnrt    "/opt/ibmhpc/pecurrent/base/intel/lib64"
    +
    + + + + +

    Last modified 6 July 2012

    + + -- GitLab From 76322e710a1a334396c6a883f0d9e497a3f39037 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 6 Jul 2012 15:43:59 -0700 Subject: [PATCH 550/614] switch/nrt: change how a specific adapter name is identified Change the --network option. Rather than just putting the adapter name as an token in the option, specify it with the keyword "devname=". --- doc/html/poe.shtml | 22 ++++++++++++++++++++++ doc/man/man1/salloc.1 | 12 ++++++------ doc/man/man1/sbatch.1 | 12 ++++++------ doc/man/man1/srun.1 | 12 ++++++------ src/plugins/switch/nrt/switch_nrt.c | 18 ++++++++++++++---- testsuite/expect/test13.2 | 14 +++++++------- 6 files changed, 61 insertions(+), 29 deletions(-) diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml index e0ab7c0285..e3c3cbb1e2 100644 --- a/doc/html/poe.shtml +++ b/doc/html/poe.shtml @@ -83,6 +83,28 @@ SLURM_NETWORK environment variable. Supported network options include:

    +

    Examples of network option use: +

    +--network=sn_all,mpi
    +Allocate one switch window per task on each node and every network supporting +MPI. +

    +--network=sn_all,mpi,bulk_xfer=100m,us
    +Allocate one switch window per task on each node and every network supporting +MPI and user space communications. Reserve 100 MB for RDMA. +

    +--network=sn_all,instances=3,mpi
    +Allocate three switch window per task on each node and every network supporting +MPI. +

    +--network=sn_all,mpi,pami
    +Allocate one switch window per task on each node and every network supporting +MPI and a second window supporting PAMI. +

    +--network=devtype=ib,instances=2,lapi,mpi
    +On every Infiniband network connection, allocate two switch windows each for +both lapi and mpi interfaces. If each node has one Infinband network connection, +this would result in four switch windows per task.

    Debugging

    diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index c6315a6465..5da59bf273 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -753,14 +753,17 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVTYPE\fR [=<\fItype\fR>] +\fBDEVNAME\fR =<\fIname\fR> +Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). +.TP +\fBDEVTYPE\fR =<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP -\fBINSTANCES\fR [=<\fIcount\fR>] +\fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP @@ -792,9 +795,6 @@ Use the UPC protocol. \fBUS\fR Use User Space communications. .TP -Specific adapter name -One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). -.TP Some examples of network specifications: .TP @@ -802,7 +802,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI,Instances=3,IB\fR +\fBUS,MPI,Instances=3,Devtype=IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 0afe7d8648..fc5f795a80 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -817,14 +817,17 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVTYPE\fR [=<\fItype\fR>] +\fBDEVNAME\fR =<\fIname\fR> +Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). +.TP +\fBDEVTYPE\fR =<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP -\fBINSTANCES\fR [=<\fIcount\fR>] +\fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP @@ -856,9 +859,6 @@ Use the UPC protocol. \fBUS\fR Use User Space communications. .TP -Specific adapter name -One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). -.TP Some examples of network specifications: .TP @@ -866,7 +866,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI,Instances=3,IB\fR +\fBUS,MPI,Instances=3,Devtype=IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index ba28dc9286..aaf4a9faee 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -855,14 +855,17 @@ The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVTYPE\fR [=<\fItype\fR>] +\fBDEVNAME\fR =<\fIname\fR> +Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). +.TP +\fBDEVTYPE\fR =<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP -\fBINSTANCES\fR [=<\fIcount\fR>] +\fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP @@ -894,9 +897,6 @@ Use the UPC protocol. \fBUS\fR Use User Space communications. .TP -Specific adapter name -One specific adapter name may be specified (e.g. "eth0" or "mlx4_0"). -.TP Some examples of network specifications: .TP @@ -904,7 +904,7 @@ Some examples of network specifications: Create two user space connections for MPI communications on every switch network for each task. .TP -\fBUS,MPI,Instances=3,IB\fR +\fBUS,MPI,Instances=3,Devtype=IB\fR Create three user space connections for MPI communications on every InfiniBand network for each task. .TP diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index fb5517ab89..aa562d12c5 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -451,6 +451,20 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } else if (!strcasecmp(token, "bulk_xfer")) { bulk_xfer = true; + /* device name options */ + } else if (!strncasecmp(token, "devname=", 8)) { + char *name_ptr = token + 8; + if (nrt_adapter_name_check(name_ptr, list)) { + debug("switch/nrt: Found adapter %s in " + "network string", token); + adapter_name = xstrdup(name_ptr); + sn_all = false; + } else { + info("switch/nrt: invalid devname: %s", + name_ptr); + err = SLURM_ERROR; + } + /* device type options */ } else if (!strncasecmp(token, "devtype=", 8)) { char *type_ptr = token + 8; @@ -505,10 +519,6 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, sn_all = true; } else if (!strcasecmp(token, "sn_single")) { sn_all = false; - } else if (nrt_adapter_name_check(token, list)) { - debug("Found adapter %s in network string", token); - adapter_name = xstrdup(token); - sn_all = false; /* other */ } else { diff --git a/testsuite/expect/test13.2 b/testsuite/expect/test13.2 index 972b04328a..5492940d06 100755 --- a/testsuite/expect/test13.2 +++ b/testsuite/expect/test13.2 @@ -124,15 +124,15 @@ set goodtest " {sn_single,devtype=iponly,ipv4} {sn_single,devtype=iponly,ipv6} {sn_all,ipv6} -{mlx4_0} -{eth0} -{mlx4_0,mpi,lapi} -{mlx4_0,mpi,lapi,us} -{mlx4_0,mpi,lapi,instances=3} +{devname=mlx4_0} +{devname=eth0} +{devname=mlx4_0,mpi,lapi} +{devname=mlx4_0,mpi,lapi,us} +{devname=mlx4_0,mpi,lapi,instances=3} {sn_all} {sn_all,mpi,lapi} {sn_all,mpi,lapi} -{mlx4_0,bulk_xfer,us} +{devname=mlx4_0,bulk_xfer,us} " foreach test $goodtest { @@ -152,7 +152,7 @@ foreach test $goodtest { # send_user "\n============Good Tests With 4 Tasks============\n" set good4task " -{mlx4_0,mpi,lapi,us,instances=3} +{devname=mlx4_0,mpi,lapi,us,instances=3} {sn_all,mpi,lapi,instances=2} {sn_all,mpi,lapi,instances=3,us} " -- GitLab From f9f087f25075e2b8b3af17b9f3054cd03f7c0f44 Mon Sep 17 00:00:00 2001 From: Martin Perry Date: Mon, 9 Jul 2012 12:35:59 -0700 Subject: [PATCH 551/614] Fix bug in task layout with select/cons_res plugin and --ntasks-per-node See Bugzilla #73 for more complete description of the problem. Patch by Martin Perry, Bull. --- NEWS | 2 ++ src/plugins/select/cons_res/job_test.c | 22 ++++------------------ 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/NEWS b/NEWS index 68bde229c4..c41e2124d4 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ documents those changes that are of interest to users and admins. be set to an invalid value. This can result in the count of CPUs allocated on a node being bad, resulting in over- or under-allocation of its CPUs. Patch by Carles Fenoy, BSC. + -- Fix bug in task layout with select/cons_res plugin and --ntasks-per-node + option. Patch by Martin Perry, Bull. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/cons_res/job_test.c b/src/plugins/select/cons_res/job_test.c index d401fa4d68..5549ef5b0b 100644 --- a/src/plugins/select/cons_res/job_test.c +++ b/src/plugins/select/cons_res/job_test.c @@ -383,7 +383,7 @@ fini: uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, const uint32_t node_i, bool cpu_type) { - uint16_t cpu_count = 0, avail_cpus = 0, num_tasks = 0; + uint16_t avail_cpus = 0, num_tasks = 0; uint32_t core_begin = cr_get_coremap_offset(node_i); uint32_t core_end = cr_get_coremap_offset(node_i+1); uint32_t c; @@ -522,8 +522,6 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, } else { j = avail_cpus / cpus_per_task; num_tasks = MIN(num_tasks, j); - if (job_ptr->details->ntasks_per_node) - avail_cpus = num_tasks * cpus_per_task; } if ((job_ptr->details->ntasks_per_node && @@ -545,21 +543,10 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, bit_clear(core_map, c); else { free_cores[i]--; - /* we have to ensure that cpu_count - * is not bigger than avail_cpus due to - * hyperthreading or this would break - * the selection logic providing more - * cpus than allowed after task-related data - * processing of stage 3 - */ - if (avail_cpus >= threads_per_core) { + if (avail_cpus >= threads_per_core) avail_cpus -= threads_per_core; - cpu_count += threads_per_core; - } - else { - cpu_count += avail_cpus; + else avail_cpus = 0; - } } } @@ -570,10 +557,9 @@ uint16_t _allocate_cores(struct job_record *job_ptr, bitstr_t *core_map, fini: if (!num_tasks) { bit_nclear(core_map, core_begin, core_end-1); - cpu_count = 0; } xfree(free_cores); - return cpu_count; + return num_tasks * cpus_per_task; } -- GitLab From f995a5b88a9898f629876fe06ad83ac89df5e2cb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Jul 2012 09:50:00 -0700 Subject: [PATCH 552/614] Purely cosmetic mods --- src/slurmctld/job_mgr.c | 9 ++++----- src/slurmctld/node_scheduler.c | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 3da8f8e051..05fc683289 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -9033,9 +9033,8 @@ extern void job_completion_logger(struct job_record *job_ptr, bool requeue) #ifdef HAVE_BG /* If on a bluegene system we want to remove the job_resrcs so - we don't get an error message about them already existing - when the job goes to run again. - */ + * we don't get an error message about them already existing + * when the job goes to run again. */ if (requeue) free_job_resources(&job_ptr->job_resrcs); #endif @@ -9068,7 +9067,7 @@ extern void job_completion_logger(struct job_record *job_ptr, bool requeue) g_slurm_jobcomp_write(job_ptr); /* When starting the resized job everything is taken care of - there, so don't call it here. */ + * elsewhere, so don't call it here. */ if (IS_JOB_RESIZING(job_ptr)) return; @@ -9092,7 +9091,7 @@ extern void job_completion_logger(struct job_record *job_ptr, bool requeue) } } - if(!with_slurmdbd && !job_ptr->db_index) + if (!with_slurmdbd && !job_ptr->db_index) jobacct_storage_g_job_start(acct_db_conn, job_ptr); jobacct_storage_g_job_complete(acct_db_conn, job_ptr); diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 47861b9063..9ebf8dbeb7 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -204,7 +204,7 @@ extern void set_job_alias_list(struct job_record *job_ptr) * IN preempted - true if job is being preempted */ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, - bool suspended, bool preempted) + bool suspended, bool preempted) { static int select_serial = -1; int i; -- GitLab From 97ce2e192d2289a703d79e5388ed33e0edc03b5c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Jul 2012 09:57:32 -0700 Subject: [PATCH 553/614] Correct job node_cnt value for job completion plugin When using the jobcomp/script interface, we have noticed the NODECNT environment variable is off-by-one when logging completed jobs in the NODE_FAIL state (though the NODELIST is correct). This appears to be because in many places in job_completion_logger() is called after deallocate_nodes(), which appears to decrement job->node_cnt for DOWN nodes. If job_completion_logger() only called the job completion plugin, then I would guess that it might be safe to move this call ahead of deallocate_nodes(). However, it seems like job_completion_logger() also does a bunch of accounting stuff (?), so perhaps that would need to be split out first? Also, there is the possibility that this is working as designed, though if so a well placed comment in the code might be appreciated. If the decreased nodecount is intended, though, should the DOWN nodes also be removed from the job's NODELIST? - Mark Grondona --- NEWS | 2 ++ src/slurmctld/job_mgr.c | 20 ++++++++++---------- src/slurmctld/node_scheduler.c | 5 +++++ 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 54a813b097..5f1a337928 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ documents those changes that are of interest to users and admins. created, and no more than one reservation per node. Code is still under development. Work by Alejandro Lucero Palau, et. al, BSC. -- Add DebugFlag of Switch to log switch plugin details. + -- Correct job node_cnt value in job completion plugin when job fails due to + down node. Previously was too low by one. * Changes in SLURM 2.5.0.pre1 diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 05fc683289..5a16bd3245 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -2221,10 +2221,10 @@ extern int kill_job_by_part_name(char *part_name) difftime(now, job_ptr->suspend_time); } else job_ptr->end_time = now; + job_completion_logger(job_ptr, false); if (!pending) deallocate_nodes(job_ptr, false, suspended, false); - job_completion_logger(job_ptr, false); } else if (pending) { job_count++; info("Killing job_id %u on defunct partition %s", @@ -2343,9 +2343,9 @@ extern int kill_job_by_front_end_name(char *node_name) * job looks like a new job. */ job_ptr->job_state = JOB_NODE_FAIL; build_cg_bitmap(job_ptr); + job_completion_logger(job_ptr, true); deallocate_nodes(job_ptr, false, suspended, false); - job_completion_logger(job_ptr, true); job_ptr->db_index = 0; job_ptr->job_state = JOB_PENDING; if (job_ptr->node_cnt) @@ -2387,9 +2387,9 @@ extern int kill_job_by_front_end_name(char *node_name) job_ptr->suspend_time); } else job_ptr->end_time = now; + job_completion_logger(job_ptr, false); deallocate_nodes(job_ptr, false, suspended, false); - job_completion_logger(job_ptr, false); } } } @@ -2576,9 +2576,9 @@ extern int kill_running_job_by_node_name(char *node_name) * job looks like a new job. */ job_ptr->job_state = JOB_NODE_FAIL; build_cg_bitmap(job_ptr); + job_completion_logger(job_ptr, true); deallocate_nodes(job_ptr, false, suspended, false); - job_completion_logger(job_ptr, true); job_ptr->db_index = 0; job_ptr->job_state = JOB_PENDING; if (job_ptr->node_cnt) @@ -2620,9 +2620,9 @@ extern int kill_running_job_by_node_name(char *node_name) job_ptr->suspend_time); } else job_ptr->end_time = now; + job_completion_logger(job_ptr, false); deallocate_nodes(job_ptr, false, suspended, false); - job_completion_logger(job_ptr, false); } } @@ -3130,11 +3130,11 @@ extern int job_fail(uint32_t job_id) job_ptr->exit_code = 1; job_ptr->state_reason = FAIL_LAUNCH; xfree(job_ptr->state_desc); + job_completion_logger(job_ptr, false); if (job_ptr->node_bitmap) { build_cg_bitmap(job_ptr); deallocate_nodes(job_ptr, false, suspended, false); } - job_completion_logger(job_ptr, false); return SLURM_SUCCESS; } /* All other states */ @@ -3237,8 +3237,8 @@ extern int job_signal(uint32_t job_id, uint16_t signal, uint16_t batch_flag, job_ptr->job_state = job_term_state | JOB_COMPLETING; build_cg_bitmap(job_ptr); jobacct_storage_g_job_suspend(acct_db_conn, job_ptr); - deallocate_nodes(job_ptr, false, true, preempt); job_completion_logger(job_ptr, false); + deallocate_nodes(job_ptr, false, true, preempt); verbose("job_signal %u of suspended job %u successful", signal, job_id); return SLURM_SUCCESS; @@ -3252,8 +3252,8 @@ extern int job_signal(uint32_t job_id, uint16_t signal, uint16_t batch_flag, last_job_update = now; job_ptr->job_state = job_term_state | JOB_COMPLETING; build_cg_bitmap(job_ptr); - deallocate_nodes(job_ptr, false, false, preempt); job_completion_logger(job_ptr, false); + deallocate_nodes(job_ptr, false, false, preempt); } else if (batch_flag) { if (job_ptr->batch_flag) _signal_batch_job(job_ptr, signal); @@ -5308,8 +5308,8 @@ static void _job_timed_out(struct job_record *job_ptr) job_ptr->job_state = JOB_TIMEOUT | JOB_COMPLETING; build_cg_bitmap(job_ptr); job_ptr->exit_code = MAX(job_ptr->exit_code, 1); - deallocate_nodes(job_ptr, true, false, false); job_completion_logger(job_ptr, false); + deallocate_nodes(job_ptr, true, false, false); } else job_signal(job_ptr->job_id, SIGKILL, 0, 0, false); return; @@ -9620,9 +9620,9 @@ extern int job_requeue (uid_t uid, uint32_t job_id, slurm_fd_t conn_fd, * job looks like a new job. */ job_ptr->job_state = JOB_CANCELLED; build_cg_bitmap(job_ptr); + job_completion_logger(job_ptr, true); deallocate_nodes(job_ptr, false, suspended, preempt); xfree(job_ptr->details->req_node_layout); - job_completion_logger(job_ptr, true); job_ptr->db_index = 0; job_ptr->job_state = JOB_PENDING; if (job_ptr->node_cnt) diff --git a/src/slurmctld/node_scheduler.c b/src/slurmctld/node_scheduler.c index 9ebf8dbeb7..0f3143c3ac 100644 --- a/src/slurmctld/node_scheduler.c +++ b/src/slurmctld/node_scheduler.c @@ -327,6 +327,11 @@ extern void deallocate_nodes(struct job_record *job_ptr, bool timeout, } bit_clear(job_ptr->node_bitmap_cg, i); job_update_cpu_cnt(job_ptr, i); + /* node_cnt indicates how many nodes we are waiting + * to get epilog complete messages from, so do not + * count down nodes. NOTE: The job's node_cnt will not + * match the number of entries in the node string + * during its completion. */ job_ptr->node_cnt--; } make_node_comp(node_ptr, job_ptr, suspended); -- GitLab From ccd24a9e2d056ce598ed4d16cc192dce3e77d55b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Tue, 10 Jul 2012 14:33:38 -0700 Subject: [PATCH 554/614] NRT - Add information about if PMD is calling the libpermapi plugin or not --- src/plugins/switch/nrt/libpermapi/shr_64.c | 89 +++++++++++++++++++--- 1 file changed, 77 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/libpermapi/shr_64.c b/src/plugins/switch/nrt/libpermapi/shr_64.c index b73c3cf202..5103934d05 100644 --- a/src/plugins/switch/nrt/libpermapi/shr_64.c +++ b/src/plugins/switch/nrt/libpermapi/shr_64.c @@ -76,14 +76,23 @@ int sig_array[] = { SIGALRM, SIGUSR1, SIGUSR2, SIGPIPE, 0 }; extern char **environ; + +/* IBM internal definitions to get information on how and who is + * calling us. + */ +#define PM_POE 0 +#define PM_PMD 1 +extern int pm_type; extern int pmdlog; extern FILE *pmd_lfp; + #define PMD_LOG(fmt, args...) \ if (pmdlog) { \ const char *f_name = strrchr(__FILE__, '/'); \ fprintf(pmd_lfp, "[%d@%s]: " fmt , __LINE__, f_name!=NULL?(f_name+1):__FILE__, ##args); \ fflush(pmd_lfp); \ } +/************************************/ static nrt_job_key_t _get_nrt_job_key(srun_job_t *job) { @@ -134,14 +143,19 @@ extern int pe_rm_connect(rmhandle_t resource_mgr, int i, rc, fd_cnt; int *ctx_sockfds = NULL; - if (!job) { + if (pm_type == PM_PMD) { /* If the PMD calls this and it didn't launch anything we need * to not do anything here or PMD will crap out on it. */ PMD_LOG("got pe_rm_connect called from PMD, " "we don't handle this yet\n"); return -1; + } else if (pm_type != PM_POE) { + error("pe_rm_connect: unknown caller"); + return -1; } - PMD_LOG("got pe_rm_connect called\n"); + + xassert(job); + debug("got pe_rm_connect called"); opt.argc = my_argc; @@ -201,12 +215,21 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) uint32_t rc = 0; //srun_job_t *job = *(srun_job_t **)*resource_mgr; - /* If the PMD calls this and it didn't launch anything we need - * to not do anything here or PMD will crap out on it. */ - if (!job) { - PMD_LOG("pe_rm_free: No job\n"); + if (pm_type == PM_PMD) { + /* If the PMD calls this and it didn't launch anything we need + * to not do anything here or PMD will crap out on it. */ + PMD_LOG("got pe_rm_connect called from PMD, " + "we don't handle this yet\n"); + return; + } else if (pm_type != PM_POE) { + error("pe_rm_connect: unknown caller"); return; } + + /* If the PMD calls this and it didn't launch anything we need + * to not do anything here or PMD will crap out on it. */ + xassert(job); + /* OK we are now really running something */ PMD_LOG("got pe_rm_free called\n"); debug("got pe_rm_free called %p %p", job, job->step_ctx); @@ -231,7 +254,14 @@ extern void pe_rm_free(rmhandle_t *resource_mgr) */ extern int pe_rm_free_event(rmhandle_t resource_mgr, job_event_t ** job_event) { - PMD_LOG("pe_rm_free_event called\n"); + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_free_event called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_free_event: unknown caller"); + return -1; + } + debug("got pe_rm_free_event called"); if (job_event) { xfree(*job_event); @@ -302,7 +332,14 @@ extern int pe_rm_get_event(rmhandle_t resource_mgr, job_event_t **job_event, { job_event_t *ret_event = NULL; int *state; - PMD_LOG("got pe_rm_get_event called\n"); + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_get_event called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_get_event: unknown caller"); + return -1; + } + debug("got pe_rm_get_event called %d %p %p", rm_timeout, job_event, *job_event); @@ -355,7 +392,14 @@ extern int pe_rm_get_job_info(rmhandle_t resource_mgr, job_info_t **job_info, char *host; host_usage_t *host_ptr; - PMD_LOG("got pe_rm_get_job_info called\n"); + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_get_job_info called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_get_job_info: unknown caller"); + return -1; + } + debug("got pe_rm_get_job_info called %p %p", job_info, *job_info); *job_info = ret_info; @@ -478,7 +522,6 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, { char *srun_debug = NULL; - PMD_LOG("pe_rm_init called %p %d\n", pmd_lfp, pmdlog); /* SLURM was originally written against 1300, so we will * return that, no matter what comes in so we always work. */ @@ -498,6 +541,14 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, #else fatal("I haven't been told where I am. This should never happen."); #endif + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_init called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_init: unknown caller"); + return -1; + } + debug("got pe_rm_init called %s", rm_id); if (slurm_select_init(1) != SLURM_SUCCESS ) @@ -543,7 +594,14 @@ extern int pe_rm_init(int *rmapi_version, rmhandle_t *resource_mgr, char *rm_id, extern int pe_rm_send_event(rmhandle_t resource_mgr, job_event_t *job_event, char ** error_msg) { - PMD_LOG("got pe_rm_send_event called\n"); + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_send_event called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_send_event: unknown caller"); + return -1; + } + debug("got pe_rm_send_event called"); return 0; } @@ -571,7 +629,14 @@ int pe_rm_submit_job(rmhandle_t resource_mgr, job_command_t job_cmd, if (getenv("SLURM_STARTED_STEP")) slurm_started = true; - PMD_LOG("got pe_rm_submit_job called\n"); + if (pm_type == PM_PMD) { + PMD_LOG("pe_rm_submit_job called\n"); + return 0; + } else if (pm_type != PM_POE) { + error("pe_rm_submit_job: unknown caller"); + return -1; + } + debug("got pe_rm_submit_job called %d", job_cmd.job_format); if (job_cmd.job_format != 1) { /* We don't handle files */ -- GitLab From 9938facdbbd14e14d636361606e5bbdd43290b2e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Jul 2012 15:03:20 -0700 Subject: [PATCH 555/614] switch/nrt Changes for latest CentOS --- src/plugins/switch/nrt/nrt.c | 30 ++++++++++++++--------------- src/plugins/switch/nrt/switch_nrt.c | 7 +++++-- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6a028a013b..01462a680f 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -129,14 +129,14 @@ typedef struct slurm_nrt_adapter { slurm_nrt_window_t *window_list; } slurm_nrt_adapter_t; -typedef struct slurm_nrt_nodeinfo { +struct slurm_nrt_nodeinfo { uint32_t magic; char name[NRT_HOSTLEN]; uint32_t adapter_count; slurm_nrt_adapter_t *adapter_list; struct slurm_nrt_nodeinfo *next; nrt_node_number_t node_number; -} slurm_nrt_nodeinfo_t; +}; struct slurm_nrt_libstate { uint32_t magic; @@ -148,7 +148,7 @@ struct slurm_nrt_libstate { nrt_job_key_t key_index; }; -typedef struct slurm_nrt_jobinfo { +struct slurm_nrt_jobinfo { uint32_t magic; /* version from nrt_version() */ /* adapter from lid in table */ @@ -164,7 +164,7 @@ typedef struct slurm_nrt_jobinfo { hostlist_t nodenames; uint32_t num_tasks; -} slurm_nrt_jobinfo_t; +}; typedef struct { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; @@ -1957,8 +1957,9 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) dummy16 = a->adapter_type; pack16(dummy16, buf); /* adapter_type is an int */ pack32(a->ipv4_addr, buf); - for (j = 0; j < 4; j++) - pack32(a->ipv6_addr.in6_u.u6_addr32[j], buf); + for (j = 0; j < 16; j++) + pack32(a->ipv6_addr.s6_addr[j], buf); +// pack32(a->ipv6_addr.in6_u.u6_addr32[j], buf); pack32(a->lid, buf); pack64(a->network_id, buf); pack8(a->port_id, buf); @@ -2162,9 +2163,8 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) safe_unpack16(&dummy16, buf); tmp_a->adapter_type = dummy16; /* adapter_type is an int */ safe_unpack32(&tmp_a->ipv4_addr, buf); - for (j = 0; j < 4; j++) { - safe_unpack32(&tmp_a->ipv6_addr.in6_u.u6_addr32[j], - buf); + for (j = 0; j < 16; j++) { + safe_unpack8(&tmp_a->ipv6_addr.s6_addr[j], buf); } safe_unpack32(&tmp_a->lid, buf); safe_unpack64(&tmp_a->network_id, buf); @@ -2603,9 +2603,9 @@ _pack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) packmem((char *) &ip_tbl_ptr->ip.ipv4_addr, sizeof(in_addr_t), buf); } else { - for (j = 0; j < 4; j++) { - pack32(ip_tbl_ptr->ip.ipv6_addr. - in6_u.u6_addr32[j], buf); + for (j = 0; j < 16; j++) { + pack8(ip_tbl_ptr->ip.ipv6_addr. + s6_addr[j], buf); } } pack32(ip_tbl_ptr->node_number, buf); @@ -2737,9 +2737,9 @@ _unpack_tableinfo(nrt_tableinfo_t *tableinfo, Buf buf, slurm_nrt_jobinfo_t *jp) if (tmp_32 != sizeof(in_addr_t)) goto unpack_error; } else { - for (j = 0; j < 4; j++) { - safe_unpack32(&ip_tbl_ptr->ip.ipv6_addr. - in6_u.u6_addr32[j], buf); + for (j = 0; j < 16; j++) { + safe_unpack8(&ip_tbl_ptr->ip.ipv6_addr. + s6_addr[j], buf); } } safe_unpack32(&ip_tbl_ptr->node_number, buf); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index aa562d12c5..d2c2d73d2c 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -678,9 +678,12 @@ extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, /* * switch functions for job initiation */ -static int _nrt_version_ok(void) +static bool _nrt_version_ok(void) { - return ((NRT_VERSION == 1100) ? 1 : 0); + if (NRT_VERSION == 1200) + return true; + error("switch/nrt: Incompatable NRT version"); + return false; } int switch_p_node_init(void) -- GitLab From ffa3d713200dd4b85301ca3c6e80a42b209aef0c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 10 Jul 2012 16:31:26 -0700 Subject: [PATCH 556/614] switch/nrt: fix several problems related to new CentOS and PE software --- src/plugins/switch/nrt/nrt.c | 13 +++++++++---- src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 01462a680f..ee04b6a369 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1958,8 +1958,7 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) pack16(dummy16, buf); /* adapter_type is an int */ pack32(a->ipv4_addr, buf); for (j = 0; j < 16; j++) - pack32(a->ipv6_addr.s6_addr[j], buf); -// pack32(a->ipv6_addr.in6_u.u6_addr32[j], buf); + pack8(a->ipv6_addr.s6_addr[j], buf); pack32(a->lid, buf); pack64(a->network_id, buf); pack8(a->port_id, buf); @@ -2051,8 +2050,8 @@ _fake_unpack_adapters(Buf buf) goto unpack_error; safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); /* ipv4_addr */ - for (j = 0; j < 4; j++) - safe_unpack32(&dummy32, buf); /* ipv6_addr */ + for (j = 0; j < 16; j++) + safe_unpack8(&dummy8, buf); /* ipv6_addr */ safe_unpack32(&dummy32, buf); /* lid */ safe_unpack64(&dummy64, buf); /* network_id */ safe_unpack8 (&dummy8, buf); /* port_id */ @@ -2154,6 +2153,12 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) tmp_n->magic = magic; tmp_n->node_number = node_number; safe_unpack32(&tmp_n->adapter_count, buf); + if (tmp_n->adapter_count > NRT_MAXADAPTERS) { + error("switch/nrt: More adapters found on node %s than " + "supported. Increase NRT_MAXADAPTERS and rebuild slurm", + name); + tmp_n->adapter_count = NRT_MAXADAPTERS; + } for (i = 0; i < tmp_n->adapter_count; i++) { tmp_a = tmp_n->adapter_list + i; safe_unpackmem_ptr(&name_ptr, &size, buf); diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index e47d6c1722..662ba5f413 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -78,7 +78,7 @@ enum { #define NRT_DEBUG_CNT 0 /* Count of windows, adapters, etc to log * use this to limit volume of logging */ -#define NRT_MAXADAPTERS 2 +#define NRT_MAXADAPTERS 8 #define NRT_LIBSTATE_LEN (1024 * 1024 * 1) extern uint32_t debug_flags; diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index d2c2d73d2c..31f7b562d1 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -817,7 +817,7 @@ static void *_state_save_thread(void *arg) sleep(10); if (nrt_need_state_save) { nrt_need_state_save = false; - _switch_p_libstate_save(dir_name, false); + _switch_p_libstate_save(local_dir_path, false); } } -- GitLab From cdb3973cbe965f9615b66c4eaf0c6276d2e6f650 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 09:12:13 -0700 Subject: [PATCH 557/614] switch/nrt: fix logic for sn_single if multple adapters of same same type and network ID. Add logic to match adapter name also. This is needed due to the additional IP_ONLY adapter named virbr0 as used for virtualization. --- src/plugins/switch/nrt/nrt.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index ee04b6a369..830d28cada 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -946,7 +946,7 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, table_id++; table_inx++; if (table_inx >= jp->tables_per_task) { - error("switch/nrt table count bad"); + error("switch/nrt: table count bad"); return SLURM_ERROR; } if (user_space) { @@ -2463,6 +2463,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, continue; adapter_type_count++; if (!sn_all) { + if (!adapter_name) { + adapter_name = node->adapter_list[i]. + adapter_name; + } adapter_type = ad_type; network_id = node->adapter_list[i].network_id; break; -- GitLab From 447ecb7ec2258823856fb03c1345fe5503e24595 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 09:20:08 -0700 Subject: [PATCH 558/614] switch/nrt: Note known bug in NRT API --- src/plugins/switch/nrt/nrt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 830d28cada..4d68772256 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1805,7 +1805,8 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } if (window_count > max_windows) { error("nrt_command(status_adapter, %s, %s): " - "window_count > max_windows (%u > %hu)", + "window_count > max_windows (%u > %hu): " + "Known bug in IBM's NRT API", adapter_status.adapter_name, _adapter_type_str(adapter_status. adapter_type), -- GitLab From 087862f2f0f6165d390f4ecce7efa665d7051783 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 09:46:42 -0700 Subject: [PATCH 559/614] launch/poe: document poe configuration file --- doc/html/poe.shtml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml index e3c3cbb1e2..bc6cee24e1 100644 --- a/doc/html/poe.shtml +++ b/doc/html/poe.shtml @@ -182,9 +182,25 @@ For example:

    %_with_libnrt "/opt/ibmhpc/pecurrent/base/intel/lib64" +

    The poe command interacts with SLURM by loading a SLURM library providing +a variety of functions for its use. You must specify the location of that +library and note that SLURM is the resource manager in the file named +"/etc/poe.limits". +The library name is "libpermapi.so" and it is in installed with the other SLURM +libraries in the subdirectory "lib/slurm". A sample "/etc/poe.limits" file is +shown below. You will need to modify the value of MP_PE_RMLIB to match SLURM's +installation location on your system. +

    +#
    +# Sample /etc/poe.limits
    +# Modify the path below as appropriate
    +#
    +MP_PE_RMLIB=/usr/local/lib/slurm/libpermapi.so
    +MP_POOL=slurm
    +
    -

    Last modified 6 July 2012

    +

    Last modified 11 July 2012

    -- GitLab From 11e2759f5c390e6d8c0448d6916104c28b4c3344 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 11 Jul 2012 11:15:00 -0700 Subject: [PATCH 560/614] BLUEGENE - remove race condition where if a block is removed while waiting for a job to finish on it the number of unused cpus wasn't updated correctly. --- NEWS | 3 +++ src/plugins/select/bluegene/bg_core.c | 9 +++++++++ 2 files changed, 12 insertions(+) diff --git a/NEWS b/NEWS index c41e2124d4..b292abf00c 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ documents those changes that are of interest to users and admins. Patch by Carles Fenoy, BSC. -- Fix bug in task layout with select/cons_res plugin and --ntasks-per-node option. Patch by Martin Perry, Bull. + -- BLUEGENE - remove race condition where if a block is removed while waiting + for a job to finish on it the number of unused cpus wasn't updated + correctly. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/bg_core.c b/src/plugins/select/bluegene/bg_core.c index f8c84dacb4..5a8f18bb36 100644 --- a/src/plugins/select/bluegene/bg_core.c +++ b/src/plugins/select/bluegene/bg_core.c @@ -122,6 +122,15 @@ static int _post_block_free(bg_record_t *bg_record, bool restore) removed out of all the lists. */ remove_from_bg_list(bg_lists->booted, bg_record); + if (remove_from_bg_list(bg_lists->job_running, bg_record) + == SLURM_SUCCESS) { + debug2("_post_block_free: we are freeing block %s and " + "it was in the job_running list. This can happen if a " + "block is removed while waiting for mmcs to finish " + "removing the job from the block.", + bg_record->bg_block_id); + num_unused_cpus += bg_record->cpu_cnt; + } /* If we don't have any mp_counts force block removal */ if (restore && bg_record->mp_count) -- GitLab From 74b7096322864bad7dfdf3e4c18bf35e72183e93 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 11 Jul 2012 11:15:27 -0700 Subject: [PATCH 561/614] BLUEGENE - Sanity check just to make sure BLOCK_MAGIC is correct --- src/plugins/select/bluegene/bg_job_place.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/bg_job_place.c b/src/plugins/select/bluegene/bg_job_place.c index 0e03200ca3..5654dcf25c 100644 --- a/src/plugins/select/bluegene/bg_job_place.c +++ b/src/plugins/select/bluegene/bg_job_place.c @@ -1480,7 +1480,8 @@ static int _sync_block_lists(List full_list, List incomp_list) then we don't need to add either, (since it is already in the list). */ - if (!new_record->bg_block_id || new_record->original) + if ((new_record->magic != BLOCK_MAGIC) + || !new_record->bg_block_id || new_record->original) continue; list_remove(itr); if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) -- GitLab From 4731a11b6ba665d8910743a374bda9ddd7c1910e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 11 Jul 2012 14:31:23 -0700 Subject: [PATCH 562/614] BGQ - make sure we have a valid block when creating or finishing a step allocation. --- NEWS | 2 + src/plugins/select/bluegene/select_bluegene.c | 47 ++++++++++++++++++- 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index b292abf00c..2b23bda83b 100644 --- a/NEWS +++ b/NEWS @@ -14,6 +14,8 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - remove race condition where if a block is removed while waiting for a job to finish on it the number of unused cpus wasn't updated correctly. + -- BGQ - make sure we have a valid block when creating or finishing a step + allocation. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 2fc520fbca..45d09f575b 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -1917,7 +1917,32 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, "assigned to it, but for some reason we are " "trying to start a step on it?", job_ptr->job_id); - + else if (bg_record->magic != BLOCK_MAGIC) { + bg_record = find_bg_record_in_list( + bg_lists->main, jobinfo->bg_block_id); + if (!bg_record || (bg_record->magic != BLOCK_MAGIC)) { + int rc; + error("select_p_step_pick_nodes: " + "Whoa, some how we got a bad block for job %u, " + "it should be %s but we couldn't find " + "it on the system, no step for you, " + "and ending job.", + job_ptr->job_id, jobinfo->bg_block_id); + slurm_mutex_unlock(&block_state_mutex); + if ((rc = job_requeue(0, job_ptr->job_id, + -1, (uint16_t)NO_VAL, false))) { + error("Couldn't requeue job %u, failing it: %s", + job_ptr->job_id, slurm_strerror(rc)); + job_fail(job_ptr->job_id); + } + return NULL; + } + error("select_p_step_pick_nodes: Whoa, some how we got a " + "bad block for job %u, it should be %s " + "(we found it so no big deal, but strange)", + job_ptr->job_id, jobinfo->bg_block_id); + jobinfo->bg_record = bg_record; + } xassert(!step_jobinfo->units_used); xfree(step_jobinfo->bg_block_id); @@ -2094,6 +2119,26 @@ extern int select_p_step_finish(struct step_record *step_ptr) "assigned to it, but for some reason we are " "trying to end the step?", step_ptr->job_ptr->job_id, step_ptr->step_id); + else if (bg_record->magic != BLOCK_MAGIC) { + bg_record = find_bg_record_in_list( + bg_lists->main, jobinfo->bg_block_id); + if (!bg_record || (bg_record->magic != BLOCK_MAGIC)) { + error("select_p_step_finish: " + "Whoa, some how we got a bad block " + "for job %u, it should be %s but " + "we couldn't find it on the system, " + "so no real need to clear it up.", + step_ptr->job_ptr->job_id, + jobinfo->bg_block_id); + slurm_mutex_unlock(&block_state_mutex); + return SLURM_ERROR; + } + error("select_p_step_finish: Whoa, some how we " + "got a bad block for job %u, it should be %s " + "(we found it so no big deal, but strange)", + step_ptr->job_ptr->job_id, jobinfo->bg_block_id); + jobinfo->bg_record = bg_record; + } rc = ba_sub_block_in_record_clear(bg_record, step_ptr); slurm_mutex_unlock(&block_state_mutex); } -- GitLab From 3797d6e7feb5980f48f50dd2bc8b2e0e7b913d45 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 14:35:38 -0700 Subject: [PATCH 563/614] switch/nrt: Support wider range of NRT versions --- src/plugins/switch/nrt/switch_nrt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index 31f7b562d1..a80e4d2789 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -680,7 +680,7 @@ extern char *switch_p_sprint_jobinfo(switch_jobinfo_t *switch_jobinfo, */ static bool _nrt_version_ok(void) { - if (NRT_VERSION == 1200) + if ((NRT_VERSION >= 1100) && (NRT_VERSION <= 1200)) return true; error("switch/nrt: Incompatable NRT version"); return false; -- GitLab From 0c371d3617d0e2ac44a1d98661b4c480f548c6ac Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Wed, 11 Jul 2012 14:52:25 -0700 Subject: [PATCH 564/614] BLUEGENE - If a large block (> 1 midplane) is in error and underlying hardware is marked bad remove the larger block and create a block over just the bad hardware making the other hardware available to run on. --- NEWS | 3 +++ src/plugins/select/bluegene/bg_record_functions.c | 11 ++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index 2b23bda83b..eb375f622c 100644 --- a/NEWS +++ b/NEWS @@ -16,6 +16,9 @@ documents those changes that are of interest to users and admins. correctly. -- BGQ - make sure we have a valid block when creating or finishing a step allocation. + -- BLUEGENE - If a large block (> 1 midplane) is in error and underlying + hardware is marked bad remove the larger block and create a block over + just the bad hardware making the other hardware available to run on. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/bg_record_functions.c b/src/plugins/select/bluegene/bg_record_functions.c index acbb149185..7d35a9bcbb 100644 --- a/src/plugins/select/bluegene/bg_record_functions.c +++ b/src/plugins/select/bluegene/bg_record_functions.c @@ -1155,11 +1155,6 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, } else if (smallest_bg_record) { debug2("smallest dynamic block is %s", smallest_bg_record->bg_block_id); - if (smallest_bg_record->state & BG_BLOCK_ERROR_FLAG) { - rc = SLURM_NO_CHANGE_IN_DATA; - slurm_mutex_unlock(&block_state_mutex); - goto cleanup; - } if (smallest_bg_record->cnode_cnt == create_size) { slurm_mutex_unlock(&block_state_mutex); @@ -1167,6 +1162,12 @@ extern int down_nodecard(char *mp_name, bitoff_t io_start, goto cleanup; } + /* If the block is bigger than the asked for error we + need to resume it to keep accounting correct. + */ + if (smallest_bg_record->state & BG_BLOCK_ERROR_FLAG) + resume_block(smallest_bg_record); + if (create_size > smallest_bg_record->cnode_cnt) { /* we should never get here. This means we * have a create_size that is bigger than a -- GitLab From c9506decd6345b59d190cf983fb522f62dbba7dd Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 14:48:56 -0700 Subject: [PATCH 565/614] switch/nrt: treat --network=ip the same as --network=ipv4 --- doc/html/poe.shtml | 1 + src/plugins/switch/nrt/switch_nrt.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml index bc6cee24e1..b6053aeb82 100644 --- a/doc/html/poe.shtml +++ b/doc/html/poe.shtml @@ -44,6 +44,7 @@ SLURM_NETWORK environment variable. Supported network options include:

    • Network protocol
      • +
      • ip Internet protocol, version 4
      • ipv4 Internet protocol, version 4 (default)
      • ipv6 Internet protocol, version 6
      • us User Space protocol, may be combined with ibv4 or ipv6
      • diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index a80e4d2789..c717f99ce9 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -498,6 +498,8 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } /* network options */ + } else if (!strcasecmp(token, "ip")) { + ip_v4 = true; } else if (!strcasecmp(token, "ipv4")) { ip_v4 = true; } else if (!strcasecmp(token, "ipv6")) { -- GitLab From 85f232112c6ed41547adfa14170834d1e05ca01d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 15:48:15 -0700 Subject: [PATCH 566/614] switch/nrt: Fix mem leaks and don't allocate tables for IP_ONLY devices --- src/plugins/switch/nrt/nrt.c | 81 +++++++++++++++++++++--------------- 1 file changed, 48 insertions(+), 33 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 4d68772256..8610bb98da 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1804,9 +1804,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) continue; } if (window_count > max_windows) { + /* This happens if IP_ONLY devices are + * allocated with tables_per_task > 0 */ error("nrt_command(status_adapter, %s, %s): " - "window_count > max_windows (%u > %hu): " - "Known bug in IBM's NRT API", + "window_count > max_windows (%u > %hu)", adapter_status.adapter_name, _adapter_type_str(adapter_status. adapter_type), @@ -2481,13 +2482,23 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, info("switch/nrt: no adapter found for job"); } _unlock(); - hostlist_iterator_reset(hi); - if (jp->tables_per_task == 0) + if (jp->tables_per_task == 0) { + hostlist_iterator_destroy(hi); return SLURM_FAILURE; + } + hostlist_iterator_reset(hi); + + if (adapter_type == NRT_IPONLY) { + /* Without setting tables_per_task == 0, non-existant switch + * windows are allocated resulting in some inconstencies in + * NRT's records. */ + jp->tables_per_task = 0; + } if (instances <= 0) { info("switch/nrt: invalid instances specification (%d)", instances); + hostlist_iterator_destroy(hi); return SLURM_FAILURE; } jp->tables_per_task *= instances; @@ -2498,6 +2509,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, info("switch/nrt: invalid protcol specification (%s)", protocol); xfree(protocol_table); + hostlist_iterator_destroy(hi); return SLURM_FAILURE; } jp->tables_per_task *= protocol_table->protocol_table_cnt; @@ -2517,38 +2529,41 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, debug("Allocating windows"); } - _lock(); - for (i = 0; i < nnodes; i++) { - host = hostlist_next(hi); - if (!host) - error("Failed to get next host"); - - for (j = 0; j < tasks_per_node[i]; j++) { - - if (adapter_name == NULL) { - rc = _allocate_windows_all(jp, host, i, - tids[i][j], - adapter_type, - network_id, - protocol_table, - instances); - } else { - rc = _allocate_window_single(adapter_name, - jp, host, i, - tids[i][j], - adapter_type, - network_id, - protocol_table, - instances); - } - if (rc != SLURM_SUCCESS) { - _unlock(); - goto fail; + if (jp->tables_per_task) { + _lock(); + for (i = 0; i < nnodes; i++) { + host = hostlist_next(hi); + if (!host) + error("Failed to get next host"); + + for (j = 0; j < tasks_per_node[i]; j++) { + + if (adapter_name == NULL) { + rc = _allocate_windows_all(jp, host, i, + tids[i][j], + adapter_type, + network_id, + protocol_table, + instances); + } else { + rc = _allocate_window_single( + adapter_name, + jp, host, i, + tids[i][j], + adapter_type, + network_id, + protocol_table, + instances); + } + if (rc != SLURM_SUCCESS) { + _unlock(); + goto fail; + } } + free(host); } - free(host); + _unlock(); } - _unlock(); if (debug_flags & DEBUG_FLAG_SWITCH) { -- GitLab From 38aa37086c553de31146d41110856371677076ca Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Wed, 11 Jul 2012 16:03:56 -0700 Subject: [PATCH 567/614] Fix for bad merge from v2.4, change in node data structure port field from number to string --- src/common/read_config.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/read_config.c b/src/common/read_config.c index b5b67346d9..e6cf62ae9b 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -761,7 +761,10 @@ int slurm_conf_frontend_array(slurm_conf_frontend_t **ptr_array[]) sizeof(hostnames)); local_front_end.addresses = addresses; local_front_end.frontends = hostnames; - local_front_end.port = node_ptr[0]->port; + if (node_ptr[0]->port_str) { + local_front_end.port = atoi(node_ptr[0]-> + port_str); + } local_front_end.reason = NULL; local_front_end.node_state = NODE_STATE_UNKNOWN; local_front_end_array[0] = &local_front_end; -- GitLab From aedc5be989cdf64b34a3c7c2320e1b00f1460f1e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 09:43:06 -0700 Subject: [PATCH 568/614] Minor format change to sbatch man page --- doc/man/man1/sbatch.1 | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 441b2cdcae..106b846c38 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -510,12 +510,11 @@ The filename pattern may contain one or more replacement symbols, which are a percent sign "%" followed by a letter (e.g. %j). Supported replacement symbols are: -.PD 0 -.RS 10 +.PD +.RS .TP \fB%j\fR Job allocation number. -.PD 0 .TP \fB%N\fR Node name. Only one file is created, so %N will be replaced by the name of the -- GitLab From a61cc1b91650aba2760b6850917f1f5fc35089dd Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 10:17:26 -0700 Subject: [PATCH 569/614] switch/nrt: Add some hooks for CAU and Immediate_slots support --- doc/man/man1/salloc.1 | 16 ++++++++++++--- doc/man/man1/sbatch.1 | 18 ++++++++++++---- doc/man/man1/srun.1 | 18 ++++++++++++---- src/plugins/switch/nrt/nrt.c | 5 +++-- src/plugins/switch/nrt/slurm_nrt.h | 2 +- src/plugins/switch/nrt/switch_nrt.c | 32 +++++++++++++++++++++++++++-- 6 files changed, 75 insertions(+), 16 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 5da59bf273..8f42152966 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -747,22 +747,32 @@ All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR>] +\fBBULK_XFER\fR[=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVNAME\fR =<\fIname\fR> +\fBCAU\fR=<\fIcount\fR> +Number of Collecitve Accelleration Units (CAU) required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP +\fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). .TP -\fBDEVTYPE\fR =<\fItype\fR> +\fBDEVTYPE\fR=<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP +\fBIMMED\fR =<\fIcount\fR> +Number of immediate send slots per window required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP \fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 639584a426..6cb363827e 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -810,23 +810,33 @@ All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR>] +\fBBULK_XFER\fR[=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVNAME\fR =<\fIname\fR> +\fBCAU\fR=<\fIcount\fR> +Number of Collecitve Accelleration Units (CAU) required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP +\fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). .TP -\fBDEVTYPE\fR =<\fItype\fR> +\fBDEVTYPE\fR=<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP -\fBINSTANCES\fR =<\fIcount\fR> +\fBIMMED\fR=<\fIcount\fR> +Number of immediate send slots per window required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP +\fBINSTANCES\fR=<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index aaf4a9faee..59fa01e89b 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -849,23 +849,33 @@ All options are case in\-sensitive. Supported values include: .RS .TP 12 -\fBBULK_XFER\fR [=<\fIresources\fR>] +\fBBULK_XFER\fR[=<\fIresources\fR>] Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. .TP -\fBDEVNAME\fR =<\fIname\fR> +\fBCAU\fR=<\fIcount\fR> +Number of Collecitve Accelleration Units (CAU) required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP +\fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). .TP -\fBDEVTYPE\fR =<\fItype\fR> +\fBDEVTYPE\fR=<\fItype\fR> Specify the device type to use for communications. The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). .TP -\fBINSTANCES\fR =<\fIcount\fR> +\fBIMMED\fR=<\fIcount\fR> +Number of immediate send slots per window required. +Applies only to IBM Power7 processors. +Default value is zero. +.TP +\fBINSTANCES\fR=<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 8610bb98da..43dbfaf3e4 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2400,7 +2400,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, uint16_t *tasks_per_node, uint32_t **tids, bool sn_all, char *adapter_name, nrt_adapter_t dev_type, bool bulk_xfer, uint32_t bulk_xfer_resources, - bool ip_v4, bool user_space, char *protocol, int instances) + bool ip_v4, bool user_space, char *protocol, int instances, + int cau, int immed) { int nnodes, nprocs = 0; hostlist_iterator_t hi; @@ -2412,7 +2413,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int network_id = -1; int adapter_type_count = 0; nrt_protocol_table_t *protocol_table = NULL; - +error("cau=%d immed=%d", cau, immed); assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); assert(tasks_per_node); diff --git a/src/plugins/switch/nrt/slurm_nrt.h b/src/plugins/switch/nrt/slurm_nrt.h index 662ba5f413..e507953980 100644 --- a/src/plugins/switch/nrt/slurm_nrt.h +++ b/src/plugins/switch/nrt/slurm_nrt.h @@ -102,7 +102,7 @@ extern int nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, char *adapter_name, nrt_adapter_t dev_type, bool bulk_xfer, uint32_t bulk_xfer_resources, bool ip_v4, bool user_space, char *protocol, - int instances); + int instances, int cau, int immed); extern int nrt_pack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern int nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *jp, Buf buf); extern slurm_nrt_jobinfo_t *nrt_copy_jobinfo(slurm_nrt_jobinfo_t *jp); diff --git a/src/plugins/switch/nrt/switch_nrt.c b/src/plugins/switch/nrt/switch_nrt.c index c717f99ce9..21d1271f60 100644 --- a/src/plugins/switch/nrt/switch_nrt.c +++ b/src/plugins/switch/nrt/switch_nrt.c @@ -407,7 +407,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, bool bulk_xfer = false, ip_v4 = true, user_space = false; uint32_t bulk_xfer_resources = 0; bool sn_all = true; /* default to sn_all */ - int instances = 1; + int cau = 0, immed = 0, instances = 1; int dev_type = NRT_MAX_ADAPTER_TYPES; int err = SLURM_SUCCESS; char *adapter_name = NULL; @@ -522,6 +522,34 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, } else if (!strcasecmp(token, "sn_single")) { sn_all = false; + /* Collective Acceleration Units (CAU) */ + } else if (!strncasecmp(token, "cau=", 4)) { + long int count; + char *end_ptr = NULL; + count = strtol(token+4, &end_ptr, 10); + if ((end_ptr[0] == 'k') || (end_ptr[0] == 'K')) + count *= 1024; + if (count >= 0) + cau = count; + else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; + } + + /* Immediate Send Slots Per Window */ + } else if (!strncasecmp(token, "immed=", 6)) { + long int count; + char *end_ptr = NULL; + count = strtol(token+6, &end_ptr, 10); + if ((end_ptr[0] == 'k') || (end_ptr[0] == 'K')) + count *= 1024; + if (count >= 0) + immed = count; + else { + info("switch/nrt: invalid option: %s", token); + err = SLURM_ERROR; + } + /* other */ } else { info("switch/nrt: invalid option: %s", token); @@ -544,7 +572,7 @@ extern int switch_p_build_jobinfo(switch_jobinfo_t *switch_job, char *nodelist, adapter_name, dev_type, bulk_xfer, bulk_xfer_resources, ip_v4, user_space, protocol, - instances); + instances, cau, immed); } nrt_need_state_save = true; -- GitLab From 5430c095a696fcaeb35401c2d86d43f5bc66c681 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 09:41:44 -0700 Subject: [PATCH 570/614] BLUEGENE - Handle job completion correctly if an admin removes a block where other blocks on an overlapping midplane are running jobs. --- NEWS | 2 ++ src/plugins/select/bluegene/select_bluegene.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index eb375f622c..7c8b745ec4 100644 --- a/NEWS +++ b/NEWS @@ -19,6 +19,8 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - If a large block (> 1 midplane) is in error and underlying hardware is marked bad remove the larger block and create a block over just the bad hardware making the other hardware available to run on. + -- BLUEGENE - Handle job completion correctly if an admin removes a block + where other blocks on an overlapping midplane are running jobs. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 45d09f575b..1233699fe4 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -2548,7 +2548,7 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr) struct job_record *job_ptr = NULL; ListIterator job_itr = list_iterator_create( found_record->job_list); - while ((job_ptr = list_next(itr))) { + while ((job_ptr = list_next(job_itr))) { if (job_ptr->magic != JOB_MAGIC) { error("select_p_update_block: " "bad magic found when " -- GitLab From eeb31e78b0b26cc2af380788ee40e3dcc7124931 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 09:42:19 -0700 Subject: [PATCH 571/614] BLUEGENE - better debug messages --- src/plugins/select/bluegene/select_bluegene.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 1233699fe4..53d03a1d2c 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -2528,14 +2528,15 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr) info("Pending job %u on block %s " "will try to be requeued " "because overlapping block %s " - "is in an error state.", + "is being removed.", found_record->job_running, found_record->bg_block_id, bg_record->bg_block_id); else - info("Failing job %u on block %s " + info("Running job %u on block %s " + "will try to be requeued " "because overlapping block %s " - "is in an error state.", + "is being removed.", found_record->job_running, found_record->bg_block_id, bg_record->bg_block_id); @@ -2562,18 +2563,17 @@ extern int select_p_update_block(update_block_msg_t *block_desc_ptr) info("Pending job %u on " "block %s " "will try to be requeued " - "because overlapping " - "block %s " + "because related block %s " "is in an error state.", job_ptr->job_id, found_record->bg_block_id, bg_record->bg_block_id); else - info("Failing job %u on " - "block %s " - "because overlapping " + info("Running job %u on " "block %s " - "is in an error state.", + "will try to be requeued " + "because related block %s " + "is being removed.", job_ptr->job_id, found_record->bg_block_id, bg_record->bg_block_id); -- GitLab From 5fa2a17d85ccbc5cf5b5475d5aa0dbec5a84197b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 10:47:40 -0700 Subject: [PATCH 572/614] update slurm spec file to correctly build on a cray --- slurm.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/slurm.spec b/slurm.spec index af6c25e9b1..3ce97f0c35 100644 --- a/slurm.spec +++ b/slurm.spec @@ -10,7 +10,7 @@ # --with auth_none %_with_auth_none 1 build auth-none RPM # --with blcr %_with_blcr 1 require blcr support # --with bluegene %_with_bluegene 1 build bluegene RPM -# --with cray_xt %_with_cray_xt 1 build for Cray XT system +# --with cray %_with_cray 1 build for a Cray system # --with debug %_with_debug 1 enable extra debugging within SLURM # --with elan %_with_elan 1 build switch-elan RPM # --with lua %_with_lua 1 build SLURM lua bindings (proctrack only for now) @@ -146,6 +146,11 @@ BuildRequires: mysql-devel >= 5.0.0 BuildRequires: postgresql-devel >= 8.0.0 %endif +%if %{slurm_with cray} +BuildRequires: cray-MySQL-devel-enterprise +Requires: cray-MySQL-devel-enterprise +%endif + %ifnos aix5.3 # FIXME: AIX can't seem to find this even though this is in existance there. # We should probably figure out a better way of doing this, but for now we @@ -383,7 +388,6 @@ Gives the ability for SLURM to use Berkeley Lab Checkpoint/Restart %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ - %{?slurm_with_cray_xt:--enable-cray-xt} \ %{?slurm_with_debug:--enable-debug} \ %{?slurm_with_partial_attach:--enable-partial-attach} \ %{?slurm_with_sun_const:--enable-sun-const} \ -- GitLab From a1f9b6a7bdd708f05479dc929cb6648beb56dba9 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 10:58:00 -0700 Subject: [PATCH 573/614] BGQ - correctly remove running jobs when freeing a shared block. --- NEWS | 1 + src/plugins/select/bluegene/bg_core.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 7c8b745ec4..36e9b7425e 100644 --- a/NEWS +++ b/NEWS @@ -21,6 +21,7 @@ documents those changes that are of interest to users and admins. just the bad hardware making the other hardware available to run on. -- BLUEGENE - Handle job completion correctly if an admin removes a block where other blocks on an overlapping midplane are running jobs. + -- BLUEGENE - correctly remove running jobs when freeing a block. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/bg_core.c b/src/plugins/select/bluegene/bg_core.c index 5a8f18bb36..cf7886624a 100644 --- a/src/plugins/select/bluegene/bg_core.c +++ b/src/plugins/select/bluegene/bg_core.c @@ -534,7 +534,7 @@ extern int free_block_list(uint32_t job_id, List track_list, itr = list_iterator_create(bg_record->job_list); while ((job_ptr = list_next(itr))) { if ((job_ptr->magic != JOB_MAGIC) - || !IS_JOB_FINISHED(job_ptr)) + || IS_JOB_FINISHED(job_ptr)) continue; freeit = xmalloc(sizeof(kill_job_struct_t)); freeit->jobid = job_ptr->job_id; -- GitLab From c5704adc78d923a7ab096ace85fa24014500c87e Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 11:28:43 -0700 Subject: [PATCH 574/614] switch/nrt: add adapter cau & immed_send counts to adapter data structures --- src/plugins/switch/nrt/nrt.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 43dbfaf3e4..b0597794c3 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -115,6 +115,10 @@ typedef struct slurm_nrt_block { typedef struct slurm_nrt_adapter { char adapter_name[NRT_MAX_ADAPTER_NAME_LEN]; nrt_adapter_t adapter_type; + nrt_cau_index_t cau_indexes_avail; + nrt_cau_index_t cau_indexes_used; + nrt_imm_send_slot_t immed_slots_avail; + nrt_imm_send_slot_t immed_slots_used; in_addr_t ipv4_addr; struct in6_addr ipv6_addr; nrt_logical_id_t lid; @@ -1393,6 +1397,8 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_name: %s", a->adapter_name); info(" adapter_type: %s", _adapter_type_str(a->adapter_type)); + info(" cau_indexes_avail: %hu", a->cau_indexes_avail); + info(" immed_slots_avail: %hu", a->immed_slots_avail); inet_ntop(AF_INET, &a->ipv4_addr, addr_str, sizeof(addr_str)); info(" ipv4_addr: %s", addr_str); inet_ntop(AF_INET6, &a->ipv6_addr, addr_str, sizeof(addr_str)); @@ -1872,6 +1878,10 @@ _get_adapters(slurm_nrt_nodeinfo_t *n) } if (adapter_info.node_number != 0) n->node_number = adapter_info.node_number; + adapter_ptr->cau_indexes_avail = + adapter_info.cau_indexes_avail; + adapter_ptr->immed_slots_avail = + adapter_info.immed_slots_avail; adapter_ptr->rcontext_block_count = adapter_info.rcontext_block_count; for (k = 0; k < adapter_info.num_ports; k++) { @@ -1958,6 +1968,8 @@ nrt_pack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf) packmem(a->adapter_name, NRT_MAX_ADAPTER_NAME_LEN, buf); dummy16 = a->adapter_type; pack16(dummy16, buf); /* adapter_type is an int */ + pack16(a->cau_indexes_avail, buf); + pack16(a->immed_slots_avail, buf); pack32(a->ipv4_addr, buf); for (j = 0; j < 16; j++) pack8(a->ipv6_addr.s6_addr[j], buf); @@ -2005,6 +2017,8 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) strncpy(da->adapter_name, sa->adapter_name, NRT_MAX_ADAPTER_NAME_LEN); da->adapter_type = sa->adapter_type; + da->cau_indexes_avail = sa->cau_indexes_avail; + da->immed_slots_avail = sa->immed_slots_avail; da->ipv4_addr = sa->ipv4_addr; da->ipv6_addr = sa->ipv6_addr; da->lid = sa->lid; @@ -2050,7 +2064,9 @@ _fake_unpack_adapters(Buf buf) safe_unpackmem_ptr(&dummyptr, &dummy32, buf); if (dummy32 != NRT_MAX_ADAPTER_NAME_LEN) goto unpack_error; - safe_unpack16(&dummy16, buf); + safe_unpack16(&dummy16, buf); /* adapter_type */ + safe_unpack16(&dummy16, buf); /* cau_indexes_avail */ + safe_unpack16(&dummy16, buf); /* immed_slots_avail */ safe_unpack32(&dummy32, buf); /* ipv4_addr */ for (j = 0; j < 16; j++) safe_unpack8(&dummy8, buf); /* ipv6_addr */ @@ -2169,6 +2185,8 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) memcpy(tmp_a->adapter_name, name_ptr, size); safe_unpack16(&dummy16, buf); tmp_a->adapter_type = dummy16; /* adapter_type is an int */ + safe_unpack16(&tmp_a->cau_indexes_avail, buf); + safe_unpack16(&tmp_a->immed_slots_avail, buf); safe_unpack32(&tmp_a->ipv4_addr, buf); for (j = 0; j < 16; j++) { safe_unpack8(&tmp_a->ipv6_addr.s6_addr[j], buf); @@ -2413,7 +2431,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int network_id = -1; int adapter_type_count = 0; nrt_protocol_table_t *protocol_table = NULL; -error("cau=%d immed=%d", cau, immed); + assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); assert(tasks_per_node); -- GitLab From 134a4aa9d5fbc110b0cce458a3863541c8682cf5 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 12:02:45 -0700 Subject: [PATCH 575/614] switch/nrt: add cau_indexes & immed_slots to job record --- src/plugins/switch/nrt/nrt.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index b0597794c3..f7a63b64ae 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -161,6 +161,8 @@ struct slurm_nrt_jobinfo { nrt_job_key_t job_key; uint8_t bulk_xfer; /* flag */ uint32_t bulk_xfer_resources; + uint16_t cau_indexes; + uint16_t immed_slots; uint8_t ip_v4; /* flag */ uint8_t user_space; /* flag */ uint16_t tables_per_task; @@ -1549,6 +1551,8 @@ _print_jobinfo(slurm_nrt_jobinfo_t *j) info(" job_key: %u", j->job_key); info(" bulk_xfer: %hu", j->bulk_xfer); info(" bulk_xfer_resources: %u", j->bulk_xfer_resources); + info(" cau_indexes: %hu", j->cau_indexes); + info(" immed_slots: %hu", j->immed_slots); info(" ip_v4: %hu", j->ip_v4); info(" user_space: %hu", j->user_space); info(" tables_per_task: %hu", j->tables_per_task); @@ -1693,8 +1697,6 @@ nrt_alloc_jobinfo(slurm_nrt_jobinfo_t **j) new = (slurm_nrt_jobinfo_t *) xmalloc(sizeof(slurm_nrt_jobinfo_t)); new->magic = NRT_JOBINFO_MAGIC; new->job_key = (nrt_job_key_t) -1; - new->tables_per_task = 0; - new->tableinfo = NULL; *j = new; return 0; @@ -2446,13 +2448,15 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if ((nnodes <= 0) || (nprocs <= 0)) slurm_seterrno_ret(EINVAL); - jp->bulk_xfer = (uint8_t) bulk_xfer; + jp->bulk_xfer = (uint8_t) bulk_xfer; jp->bulk_xfer_resources = bulk_xfer_resources; - jp->ip_v4 = (uint8_t) ip_v4; - jp->job_key = _next_key(); - jp->nodenames = hostlist_copy(hl); - jp->num_tasks = nprocs; - jp->user_space = (uint8_t) user_space; + jp->cau_indexes = (uint16_t) cau; + jp->immed_slots = (uint16_t) immed; + jp->ip_v4 = (uint8_t) ip_v4; + jp->job_key = _next_key(); + jp->nodenames = hostlist_copy(hl); + jp->num_tasks = nprocs; + jp->user_space = (uint8_t) user_space; /* * Peek at the first host to figure out tables_per_task and adapter @@ -2705,6 +2709,8 @@ nrt_pack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) pack32(j->job_key, buf); pack8(j->bulk_xfer, buf); pack32(j->bulk_xfer_resources, buf); + pack16(j->cau_indexes, buf); + pack16(j->immed_slots, buf); pack8(j->ip_v4, buf); pack8(j->user_space, buf); pack16(j->tables_per_task, buf); @@ -2847,6 +2853,8 @@ nrt_unpack_jobinfo(slurm_nrt_jobinfo_t *j, Buf buf) safe_unpack32(&j->job_key, buf); safe_unpack8(&j->bulk_xfer, buf); safe_unpack32(&j->bulk_xfer_resources, buf); + safe_unpack16(&j->cau_indexes, buf); + safe_unpack16(&j->immed_slots, buf); safe_unpack8(&j->ip_v4, buf); safe_unpack8(&j->user_space, buf); safe_unpack16(&j->tables_per_task, buf); @@ -3232,8 +3240,8 @@ nrt_load_table(slurm_nrt_jobinfo_t *jp, int uid, int pid, char *job_name) * and have no effect on x86 processors: * immed_send_slots_per_win * num_cau_indexes */ - table_info.immed_send_slots_per_win = 0; - table_info.num_cau_indexes = 0; + table_info.num_cau_indexes = jp->cau_indexes; + table_info.immed_send_slots_per_win = jp->immed_slots; load_table.table_info = &table_info; load_table.per_task_input = jp->tableinfo[i].table; -- GitLab From e89646962e8a49668901ccaed55b35d145a9ee70 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 12:53:46 -0700 Subject: [PATCH 576/614] switch/nrt: add tracking of immed_send_slots --- src/plugins/switch/nrt/nrt.c | 76 ++++++++++++++++++++++++++++-------- 1 file changed, 59 insertions(+), 17 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index f7a63b64ae..678de82e85 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -480,14 +480,14 @@ _free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) return; if (node->adapter_list == NULL) { - error("_free_resources_by_job, " + error("switch/nrt: _free_resources_by_job, " "adapter_list NULL for node %s", node_name); return; } for (i = 0; i < node->adapter_count; i++) { adapter = &node->adapter_list[i]; if (adapter->window_list == NULL) { - error("_free_resources_by_job, " + error("switch/nrt: _free_resources_by_job, " "window_list NULL for node %s adapter %s", node->name, adapter->adapter_name); continue; @@ -508,6 +508,15 @@ _free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) adapter->name, window->id); */ window->state = NRT_WIN_AVAILABLE; window->job_key = 0; + if (jp->immed_slots > + adapter->immed_slots_used) { + error("switch/nrt: immed_slots_used " + "underflow"); + adapter->immed_slots_used = 0; + } else { + adapter->immed_slots_used -= + jp->immed_slots; + } } } } @@ -696,9 +705,11 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) window = _find_window(adapter, win_id); if (window) { window->state = state; - if (state == NRT_WIN_UNAVAILABLE) + if (state == NRT_WIN_UNAVAILABLE) { window->job_key = job_key; - else + adapter->immed_slots_used += + jp->immed_slots; + } else window->job_key = 0; } } /* for each task */ @@ -958,10 +969,24 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (user_space) { window = _find_free_window(adapter); if (window == NULL) { - error("No free windows on " - "node %s adapter %s", - node->name, - adapter->adapter_name); + info("switch/nrt: " + "No free windows on " + "node %s adapter %s", + node->name, + adapter->adapter_name); + return SLURM_ERROR; + } + adapter->immed_slots_used += + jp->immed_slots; + if (adapter->immed_slots_used > + adapter->immed_slots_avail) { + info("switch/nrt: " + "No free immediate slots " + "on node %s adapter %s", + node->name, + adapter->adapter_name); + adapter->immed_slots_used -= + jp->immed_slots; return SLURM_ERROR; } window->state = NRT_WIN_UNAVAILABLE; @@ -1022,8 +1047,8 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, hpce_table->task_id = task_id; hpce_table->win_id = window->window_id; } else { - error("Missing support for adapter " - "type %s", + error("switch/nrt: Missing support " + "for adapter type %s", _adapter_type_str(adapter-> adapter_type)); return SLURM_ERROR; @@ -1082,7 +1107,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, node = _find_node(nrt_state, hostname); if (node == NULL) { - error("Failed to find node in node_list: %s", hostname); + error("switch/nrt: Failed to find node in node_list: %s", + hostname); return SLURM_ERROR; } @@ -1112,7 +1138,8 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, } } if (adapter == NULL) { - info("Failed to find adapter %s of type %s on node %s", + info("switch/nrt: Failed to find adapter %s of type %s on " + "node %s", adapter_name, _adapter_type_str(adapter_type), hostname); return SLURM_ERROR; } @@ -1128,10 +1155,23 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, /* Reserve a window on the adapter for task */ window = _find_free_window(adapter); if (window == NULL) { - error("No free windows on node %s " - "adapter %s", - node->name, - adapter->adapter_name); + info("switch/nrt: No free windows " + "on node %s adapter %s", + node->name, + adapter->adapter_name); + /* FIXME: Should we retry job step? */ + return SLURM_ERROR; + } + adapter->immed_slots_used += jp->immed_slots; + if (adapter->immed_slots_used > + adapter->immed_slots_avail) { + info("switch/nrt: No free immediate " + "slots on node %s adapter %s", + node->name, + adapter->adapter_name); + adapter->immed_slots_used -= + jp->immed_slots; + /* FIXME: Should we retry job step? */ return SLURM_ERROR; } window->state = NRT_WIN_UNAVAILABLE; @@ -1400,7 +1440,9 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" adapter_type: %s", _adapter_type_str(a->adapter_type)); info(" cau_indexes_avail: %hu", a->cau_indexes_avail); + info(" cau_indexes_used: %hu", a->cau_indexes_used); info(" immed_slots_avail: %hu", a->immed_slots_avail); + info(" immed_slots_used: %hu", a->immed_slots_used); inet_ntop(AF_INET, &a->ipv4_addr, addr_str, sizeof(addr_str)); info(" ipv4_addr: %s", addr_str); inet_ntop(AF_INET6, &a->ipv6_addr, addr_str, sizeof(addr_str)); @@ -2515,7 +2557,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, /* Without setting tables_per_task == 0, non-existant switch * windows are allocated resulting in some inconstencies in * NRT's records. */ - jp->tables_per_task = 0; +/* FIXME jp->tables_per_task = 0; */ } if (instances <= 0) { -- GitLab From 5ed860881a06ddee200b5ce216c32c52bca6406e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 13:44:58 -0700 Subject: [PATCH 577/614] BGQ - correct logic to place multiple (< 1 midplane) steps inside a multi midplane block allocation. --- NEWS | 2 ++ src/plugins/select/bluegene/ba_bgq/block_allocator.c | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 36e9b7425e..6844f0a2da 100644 --- a/NEWS +++ b/NEWS @@ -22,6 +22,8 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - Handle job completion correctly if an admin removes a block where other blocks on an overlapping midplane are running jobs. -- BLUEGENE - correctly remove running jobs when freeing a block. + -- BGQ - correct logic to place multiple (< 1 midplane) steps inside a + multi midplane block allocation. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index 61a6a74b65..d4e742bada 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -1154,17 +1154,8 @@ try_again: break; clear_cnt = bit_clear_count(total_bitmap); + FREE_NULL_BITMAP(total_bitmap); - /* User asked for a bad CPU count or we can't place it - here in this small allocation. */ - if (jobinfo->cnode_cnt < bg_conf->mp_cnode_cnt) { - list_iterator_destroy(itr); - if (ba_debug_flags & DEBUG_FLAG_BG_ALGO) - info("We couldn't place a sub block of %d", - *node_count); - (*node_count)++; - goto try_again; - } /* Grab the most empty midplane to be used later if we can't find a spot. -- GitLab From 010570f44395258f8ceced60d5a0e92a77c31238 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 14:06:33 -0700 Subject: [PATCH 578/614] BGQ - Make it possible for a multi midplane allocation to run on more than 1 midplane but not the entire allocation. --- NEWS | 2 + src/plugins/select/bluegene/select_bluegene.c | 40 +++++++++++++++---- src/slurmctld/step_mgr.c | 7 ---- 3 files changed, 34 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index 6844f0a2da..9c54ab898a 100644 --- a/NEWS +++ b/NEWS @@ -24,6 +24,8 @@ documents those changes that are of interest to users and admins. -- BLUEGENE - correctly remove running jobs when freeing a block. -- BGQ - correct logic to place multiple (< 1 midplane) steps inside a multi midplane block allocation. + -- BGQ - Make it possible for a multi midplane allocation to run on more + than 1 midplane but not the entire allocation. * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 53d03a1d2c..e69786d0b7 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -1951,8 +1951,10 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, if (((cluster_flags & CLUSTER_FLAG_BGL) || (cluster_flags & CLUSTER_FLAG_BGP)) - || (node_count == bg_record->cnode_cnt)) { - /* If we are using the whole block we need to verify + || ((node_count == bg_record->cnode_cnt) + || (node_count > bg_conf->mp_cnode_cnt))) { + /* If we are using the whole block (or more than 1 + midplane of it) we need to verify if anything else is used. If anything else is used return NULL, else return that we can use the entire thing. @@ -1963,7 +1965,8 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, if (list_count(job_ptr->step_list)) { if (bg_conf->slurm_debug_flags & DEBUG_FLAG_BG_PICK) info("select_p_step_pick_nodes: Looking " - "for the entire block %s for job %u, " + "for more than one midplane of " + "block %s for job %u, " "but some of it is used.", bg_record->bg_block_id, job_ptr->job_id); goto end_it; @@ -1971,9 +1974,22 @@ extern bitstr_t *select_p_step_pick_nodes(struct job_record *job_ptr, if (!(picked_mps = bit_copy(job_ptr->node_bitmap))) fatal("bit_copy malloc failure"); - if (cluster_flags & CLUSTER_FLAG_BGQ - && (bg_record->mp_count == 1)) { + if (cluster_flags & CLUSTER_FLAG_BGQ) { bitstr_t *used_bitmap; + if (node_count > bg_conf->mp_cnode_cnt) { + /* Here we have to make sure nothing + else is able to run on this block + since we are using more than 1 + midplane but potentially not the + entire allocation. + */ + FREE_NULL_BITMAP(jobinfo->units_avail); + FREE_NULL_BITMAP(jobinfo->units_used); + jobinfo->units_avail = + ba_create_ba_mp_cnode_bitmap(bg_record); + jobinfo->units_used = + bit_copy(jobinfo->units_avail); + } if (jobinfo->units_avail) used_bitmap = jobinfo->units_used; @@ -2091,7 +2107,7 @@ end_it: extern int select_p_step_finish(struct step_record *step_ptr) { bg_record_t *bg_record = NULL; - select_jobinfo_t *jobinfo = NULL; + select_jobinfo_t *jobinfo = NULL, *step_jobinfo = NULL; int rc = SLURM_SUCCESS; char *tmp_char = NULL; @@ -2106,10 +2122,18 @@ extern int select_p_step_finish(struct step_record *step_ptr) } jobinfo = step_ptr->job_ptr->select_jobinfo->data; + step_jobinfo = step_ptr->select_jobinfo->data; - if (jobinfo->units_avail) + if (step_jobinfo->cnode_cnt > bg_conf->mp_cnode_cnt) { + /* This means we were using units_avail and units_used + as midplanes not cnodes for either the whole job + allocation or a portion of it. + */ + FREE_NULL_BITMAP(jobinfo->units_avail); + FREE_NULL_BITMAP(jobinfo->units_used); + } else if (jobinfo->units_avail) rc = ba_sub_block_in_bitmap_clear( - step_ptr->select_jobinfo->data, jobinfo->units_used); + step_jobinfo, jobinfo->units_used); else { slurm_mutex_lock(&block_state_mutex); bg_record = jobinfo->bg_record; diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 41a2f9d741..210cff6a37 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -1792,13 +1792,6 @@ step_create(job_step_create_request_msg_t *step_specs, #if defined HAVE_BGQ if (step_specs->min_nodes < node_count) { - if (step_specs->min_nodes > 512) { - error("step asked for more than 512 nodes but " - "less than the allocation, on a " - "bluegene/Q system that isn't allowed."); - return ESLURM_INVALID_NODE_COUNT; - } - /* We are asking for less than we have. */ node_count = step_specs->min_nodes; step_specs->min_nodes = 1; -- GitLab From 8640832b5710c76ea78b521ec5f801d9aa133ba6 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 14:27:24 -0700 Subject: [PATCH 579/614] BGQ - add creation of bitmap if it does not already exist --- src/plugins/select/bluegene/select_bluegene.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index e69786d0b7..89270341f2 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -2881,6 +2881,10 @@ extern int select_p_fail_cnode(struct step_record *step_ptr) ba_mp = ba_inx2ba_mp(i); xassert(ba_mp); + if (!ba_mp->cnode_err_bitmap) + ba_mp->cnode_err_bitmap = + bit_alloc(bg_conf->mp_cnode_cnt); + if (jobinfo->units_avail) { bit_or(ba_mp->cnode_err_bitmap, step_jobinfo->units_used); -- GitLab From 9a60113a5f94678d4ef90c311cd52e8d39a94b64 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 14:28:05 -0700 Subject: [PATCH 580/614] switch/nrt: Track actual CAU resource allocations --- src/plugins/switch/nrt/nrt.c | 75 +++++++++++++++++++++++------------- 1 file changed, 49 insertions(+), 26 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 678de82e85..78a7d9a638 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -215,7 +215,7 @@ static slurm_nrt_window_t * _find_window(slurm_nrt_adapter_t *adapter, uint16_t window_id); static slurm_nrt_window_t *_find_free_window(slurm_nrt_adapter_t *adapter); static slurm_nrt_nodeinfo_t *_find_node(slurm_nrt_libstate_t *lp, char *name); -static void _free_block_use(slurm_nrt_jobinfo_t *jp, +static bool _free_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter); static void _free_libstate(slurm_nrt_libstate_t *lp); static int _get_adapters(slurm_nrt_nodeinfo_t *n); @@ -486,13 +486,23 @@ _free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) } for (i = 0; i < node->adapter_count; i++) { adapter = &node->adapter_list[i]; + + if (!_free_block_use(jp, adapter)) { +error("NO FREE"); ; /* No RDMA or CAU for this job no on this adapter */ + } else if (jp->cau_indexes > adapter->cau_indexes_used) { + error("switch/nrt: cau_indexes_used underflow"); + adapter->cau_indexes_used = 0; + } else { +error("DECR CAU"); + adapter->cau_indexes_used -= jp->cau_indexes; + } + if (adapter->window_list == NULL) { error("switch/nrt: _free_resources_by_job, " "window_list NULL for node %s adapter %s", node->name, adapter->adapter_name); continue; } - _free_block_use(jp, adapter); /* We could check here to see if this adapter's name * is in the nrt_jobinfo tablinfo list to avoid the next * loop if the adapter isn't in use by the job step. @@ -713,9 +723,12 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) window->job_key = 0; } } /* for each task */ - if (!adapter_found) { - error("Did not find adapter %s of type %s " - "with lid %hu ", + if (adapter_found) { + _add_block_use(jp, adapter); + adapter->cau_indexes_used += jp->cau_indexes; + } else { + error("switch/nrt: Did not find adapter %s of " + "type %s with lid %hu ", adapter->adapter_name, _adapter_type_str(adapter->adapter_type), adapter->lid); @@ -827,7 +840,7 @@ static void _table_alloc(nrt_tableinfo_t *tableinfo, int table_inx, return; } -/* Track RDMA blocks allocated to a job on each adapter */ +/* Track RDMA or CAU resources allocated to a job on each adapter */ static int _add_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) { @@ -835,12 +848,12 @@ _add_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) uint64_t blocks_free; slurm_nrt_block_t *block_ptr, *free_block; - if (jp->bulk_xfer && jp->bulk_xfer_resources) { + if ((jp->bulk_xfer && jp->bulk_xfer_resources) || jp->cau_indexes) { blocks_free = adapter->rcontext_block_count - adapter->rcontext_block_used; if (blocks_free < jp->bulk_xfer_resources) { - info("Insufficient bulk_xfer resources on adapter %s " - "(%"PRIu64" < %u)", + info("switch/nrt: Insufficient bulk_xfer resources on " + "adapter %s (%"PRIu64" < %u)", adapter->adapter_name, blocks_free, jp->bulk_xfer_resources); return SLURM_ERROR; @@ -881,24 +894,28 @@ _add_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) } return SLURM_SUCCESS; } -static void +static bool _free_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) { - int i; slurm_nrt_block_t *block_ptr; + bool found_job = false; + int i; - if ((jp->bulk_xfer == 0) || (jp->bulk_xfer_resources == 0)) - return; - - block_ptr = adapter->block_list; - for (i = 0; i < adapter->block_count; i++, block_ptr++) { - if (block_ptr->job_key != jp->job_key) - continue; - adapter->rcontext_block_used -= block_ptr->rcontext_block_use; - block_ptr->job_key = 0; - block_ptr->rcontext_block_use = 0; - break; + if ((jp->bulk_xfer && jp->bulk_xfer_resources) || jp->cau_indexes) { + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key != jp->job_key) + continue; + adapter->rcontext_block_used -= block_ptr-> + rcontext_block_use; + block_ptr->job_key = 0; + block_ptr->rcontext_block_use = 0; + found_job = true; + break; + } } + + return found_job; } /* For a given process, fill out an nrt_creator_per_task_input_t @@ -957,8 +974,11 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (user_space && (adapter->adapter_type == NRT_IPONLY)) continue; - if (_add_block_use(jp, adapter)) - return SLURM_ERROR; + if (context_id == 0) { + if (_add_block_use(jp, adapter)) + return SLURM_ERROR; + adapter->cau_indexes_used += jp->cau_indexes; + } for (j = 0; j < instances; j++) { table_id++; table_inx++; @@ -1143,12 +1163,15 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, adapter_name, _adapter_type_str(adapter_type), hostname); return SLURM_ERROR; } - if (_add_block_use(jp, adapter)) - return SLURM_ERROR; table_inx = -1; for (context_id = 0; context_id < protocol_table->protocol_table_cnt; context_id++) { + if (context_id == 0) { + if (_add_block_use(jp, adapter)) + return SLURM_ERROR; + adapter->cau_indexes_used += jp->cau_indexes; + } for (table_id = 0; table_id < instances; table_id++) { table_inx++; if (user_space) { -- GitLab From 7432016ed76b5ce6d7ae4dd6b3b8a5698d0c1742 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 14:28:11 -0700 Subject: [PATCH 581/614] BGQ - add correct locking to ensure protected structures --- src/plugins/select/bluegene/ba_bgq/block_allocator.c | 1 + src/plugins/select/bluegene/select_bluegene.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/ba_bgq/block_allocator.c b/src/plugins/select/bluegene/ba_bgq/block_allocator.c index d4e742bada..ee4c5712a7 100644 --- a/src/plugins/select/bluegene/ba_bgq/block_allocator.c +++ b/src/plugins/select/bluegene/ba_bgq/block_allocator.c @@ -1712,6 +1712,7 @@ extern int ba_translate_coord2nc(uint16_t *cnode_coords) return nc_loc; } +/* ba_system_mutex needs to be locked before calling this. */ extern ba_mp_t *ba_inx2ba_mp(int inx) { return ba_main_grid_array[inx]; diff --git a/src/plugins/select/bluegene/select_bluegene.c b/src/plugins/select/bluegene/select_bluegene.c index 89270341f2..a35c4ff8cc 100644 --- a/src/plugins/select/bluegene/select_bluegene.c +++ b/src/plugins/select/bluegene/select_bluegene.c @@ -2875,6 +2875,9 @@ extern int select_p_fail_cnode(struct step_record *step_ptr) jobinfo = step_ptr->job_ptr->select_jobinfo->data; step_jobinfo = step_ptr->select_jobinfo->data; + /* block_state must be locked before ba_system */ + slurm_mutex_lock(&block_state_mutex); + slurm_mutex_lock(&ba_system_mutex); for (i=0; istep_node_bitmap); i++) { if (!bit_test(step_ptr->step_node_bitmap, i)) continue; @@ -2904,10 +2907,11 @@ extern int select_p_fail_cnode(struct step_record *step_ptr) if (!ba_mp) { error("select_p_fail_cnode: no ba_mp? " "This should never happen"); + slurm_mutex_unlock(&ba_system_mutex); + slurm_mutex_unlock(&block_state_mutex); return SLURM_ERROR; } - slurm_mutex_lock(&block_state_mutex); itr = list_iterator_create(bg_lists->main); while ((bg_record = (bg_record_t *)list_next(itr))) { if (!bit_overlap(step_ptr->step_node_bitmap, @@ -2957,6 +2961,7 @@ extern int select_p_fail_cnode(struct step_record *step_ptr) list_iterator_destroy(itr2); } list_iterator_destroy(itr); + slurm_mutex_unlock(&ba_system_mutex); slurm_mutex_unlock(&block_state_mutex); #endif return SLURM_SUCCESS; -- GitLab From 2d3c09aeb11003cff2480efea3da6bd5bbc28433 Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Thu, 12 Jul 2012 14:48:30 -0700 Subject: [PATCH 582/614] move an info message to be debug --- src/slurmd/slurmd/req.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 470153f3fe..b81fbcfc74 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3836,7 +3836,7 @@ run_spank_job_script (const char *mode, char **env) fd_set_close_on_exec (pfds[1]); - info ("Calling %s spank %s", conf->stepd_loc, mode); + debug ("Calling %s spank %s", conf->stepd_loc, mode); if ((cpid = fork ()) < 0) { error ("executing spank %s: %m", mode); return (-1); -- GitLab From eca2dcd776dcb4bb7103eaaee7377b269a5de7e0 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 15:19:33 -0700 Subject: [PATCH 583/614] swtich/nrt: support dynamic changes to adapter port_id, network_id, cau values etc. Without this change the values known to slurmctld do not change without a cold-start. --- src/plugins/switch/nrt/nrt.c | 125 ++++++++++++++++++++++++++++------- 1 file changed, 102 insertions(+), 23 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 78a7d9a638..068755c85d 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -207,7 +207,7 @@ static slurm_nrt_libstate_t *_alloc_libstate(void); static slurm_nrt_nodeinfo_t *_alloc_node(slurm_nrt_libstate_t *lp, char *name); static int _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src); -static int _fake_unpack_adapters(Buf buf); +static int _fake_unpack_adapters(Buf buf, slurm_nrt_nodeinfo_t *n); static int _fill_in_adapter_cache(void); static slurm_nrt_nodeinfo_t * _find_node(slurm_nrt_libstate_t *lp, char *name); @@ -2109,45 +2109,123 @@ _copy_node(slurm_nrt_nodeinfo_t *dest, slurm_nrt_nodeinfo_t *src) return SLURM_SUCCESS; } -/* Throw away adapter portion of the nodeinfo. +static int +_cmp_ipv6(struct in6_addr *addr1, struct in6_addr *addr2) +{ + int i; + + for (i = 0; i < 16; i++) { + if (addr1->s6_addr[i] != addr2->s6_addr[i]) + return 1; + } + + return 0; +} + +/* Throw away adapter window portion of the nodeinfo. * * Used by: _unpack_nodeinfo */ static int -_fake_unpack_adapters(Buf buf) +_fake_unpack_adapters(Buf buf, slurm_nrt_nodeinfo_t *n) { - uint32_t adapter_count; - uint16_t window_count; - uint8_t dummy8; + slurm_nrt_adapter_t *tmp_a = NULL; uint16_t dummy16; uint32_t dummy32; - uint64_t dummy64; - char *dummyptr; - int i, j; + char *name_ptr; + uint8_t port_id; + uint16_t adapter_type, cau_indexes_avail, immed_slots_avail; + uint16_t window_count; + uint32_t adapter_count, ipv4_addr, lid; + uint64_t network_id, rcontext_block_count, special; + struct in6_addr ipv6_addr; + int i, j, k; safe_unpack32(&adapter_count, buf); for (i = 0; i < adapter_count; i++) { - /* no copy, just advances buf counters */ - safe_unpackmem_ptr(&dummyptr, &dummy32, buf); + safe_unpackmem_ptr(&name_ptr, &dummy32, buf); if (dummy32 != NRT_MAX_ADAPTER_NAME_LEN) goto unpack_error; - safe_unpack16(&dummy16, buf); /* adapter_type */ - safe_unpack16(&dummy16, buf); /* cau_indexes_avail */ - safe_unpack16(&dummy16, buf); /* immed_slots_avail */ - safe_unpack32(&dummy32, buf); /* ipv4_addr */ + safe_unpack16(&adapter_type, buf); + safe_unpack16(&cau_indexes_avail, buf); + safe_unpack16(&immed_slots_avail, buf); + safe_unpack32(&ipv4_addr, buf); for (j = 0; j < 16; j++) - safe_unpack8(&dummy8, buf); /* ipv6_addr */ - safe_unpack32(&dummy32, buf); /* lid */ - safe_unpack64(&dummy64, buf); /* network_id */ - safe_unpack8 (&dummy8, buf); /* port_id */ - safe_unpack64(&dummy64, buf); /* rcontext_block_count */ - safe_unpack64(&dummy64, buf); /* special */ + safe_unpack8(&ipv6_addr.s6_addr[j], buf); + safe_unpack32(&lid, buf); + safe_unpack64(&network_id, buf); + safe_unpack8 (&port_id, buf); + safe_unpack64(&rcontext_block_count, buf); + safe_unpack64(&special, buf); safe_unpack16(&window_count, buf); + + /* no copy, just advances buf counters */ for (j = 0; j < window_count; j++) { safe_unpack16(&dummy16, buf); safe_unpack32(&dummy32, buf); safe_unpack32(&dummy32, buf); } + + for (j = 0; j < n->adapter_count; j++) { + tmp_a = n->adapter_list + j; + if (strcmp(tmp_a->adapter_name, name_ptr)) + continue; + if (tmp_a->cau_indexes_avail != cau_indexes_avail) { + info("switch/nrt: resetting cau_indexes_avail " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->cau_indexes_avail = cau_indexes_avail; + } + if (tmp_a->immed_slots_avail != immed_slots_avail) { + info("switch/nrt: resetting immed_slots_avail " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->immed_slots_avail = immed_slots_avail; + } + if (tmp_a->ipv4_addr != ipv4_addr) { + info("switch/nrt: resetting ipv4_addr " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->ipv4_addr = ipv4_addr; + } + if (_cmp_ipv6(&tmp_a->ipv6_addr, &ipv6_addr) != 0) { + info("switch/nrt: resetting ipv6_addr " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + for (k = 0; k < 16; k++) { + tmp_a->ipv6_addr.s6_addr[k] = + ipv6_addr.s6_addr[k]; + } + } + if (tmp_a->lid != lid) { + info("switch/nrt: resetting lid " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->lid = lid; + } + if (tmp_a->network_id != network_id) { + info("switch/nrt: resetting network_id " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->network_id = network_id; + } + if (tmp_a->port_id != port_id) { + info("switch/nrt: resetting port_id " + "on node %s adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->port_id = port_id; + } + if (tmp_a->rcontext_block_count != + rcontext_block_count) { + info("switch/nrt: resetting " + "rcontext_block_count on node %s " + "adapter %s", + n->name, tmp_a->adapter_name); + tmp_a->rcontext_block_count = + rcontext_block_count; + } + break; + } } return SLURM_SUCCESS; @@ -2205,7 +2283,7 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) * So, here we just do a fake unpack to advance the buffer pointer. */ if (nrt_state == NULL) { - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + if (_fake_unpack_adapters(buf, NULL) != SLURM_SUCCESS) { slurm_seterrno_ret(EUNPACK); } else { return SLURM_SUCCESS; @@ -2221,7 +2299,8 @@ _unpack_nodeinfo(slurm_nrt_nodeinfo_t *n, Buf buf, bool believe_window_status) tmp_n = _find_node(nrt_state, name); if (tmp_n != NULL) { tmp_n->node_number = node_number; - if (_fake_unpack_adapters(buf) != SLURM_SUCCESS) { + if (_fake_unpack_adapters(buf, tmp_n) != + SLURM_SUCCESS) { slurm_seterrno_ret(EUNPACK); } else { goto copy_node; -- GitLab From 1e5631651bd171a55a751ba98a5ee6a7e7f62e1b Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 15:45:20 -0700 Subject: [PATCH 584/614] POE web page: describe new Power7 options --- doc/html/poe.shtml | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml index b6053aeb82..a45752af50 100644 --- a/doc/html/poe.shtml +++ b/doc/html/poe.shtml @@ -63,6 +63,10 @@ SLURM_NETWORK environment variable. Supported network options include:

        The optional resources specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. +
      • cau=count + Specify the count of Collective Acceleration Units (CAU) required per adapter. + Default value is zero. + Applies only to IBM Power7 processors.
      • devname=name Specify the name of an network adapter to use. For example: "eth0" or "mlx4_0".
      • @@ -72,15 +76,19 @@ SLURM_NETWORK environment variable. Supported network options include:

        "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). +
      • immed=count + Specify the count of immediate send slots per adapter window. + Default value is zero. + Applies only to IBM Power7 processors.
      • instances=count Specify number of network connections for each task on each network connection. The default instance count is 1.
      • -
      • sn_all Use all available switch networks (default). - This option can not be combined with sn_single.
      • -
      • sn_single Use only one switch network. - This option can not be combined with sn_all. - If multiple networks of different types exist, the devname or - devtype option can be used to select one of them.
      • +
      • sn_all Use all available switch adapters (default). + This option can not be combined with sn_single.
      • +
      • sn_single Use only one switch adapters. + This option can not be combined withsn_all. + If multiple adapters of different types exist, the devname and/or + devtype option can also be used to select one of them.
    @@ -202,6 +210,6 @@ MP_POOL=slurm -

    Last modified 11 July 2012

    +

    Last modified 12 July 2012

    -- GitLab From 46a3767e1d550e3d440dcb8a39a0de94a36d0d69 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Thu, 12 Jul 2012 16:01:40 -0700 Subject: [PATCH 585/614] Update to high throughput computing web page with more option descriptions --- doc/html/high_throughput.shtml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/html/high_throughput.shtml b/doc/html/high_throughput.shtml index 8f2d89d01a..b384866413 100644 --- a/doc/html/high_throughput.shtml +++ b/doc/html/high_throughput.shtml @@ -52,6 +52,9 @@ be set quite high for memory size, open file count and stack size.

    SLURM Configuration

    +

    NOTE: Substantial changes were made in SLURM version 2.4 to support higher +throughput rates. Version 2.5 includes more enhancements.

    +

    Several SLURM configuration parameters should be adjusted to reflect the needs of high throughput computing.

    @@ -71,6 +74,9 @@ Controls how soon the record of a completed job can be purged from the The record of jobs run will be preserved in accounting records and logs. The default value is 300 seconds. The value should be reduced to a few seconds if possible. +
  • PriorityType: +The priority/builtin is considerably faster than other options, but +schedules jobs only on a First In First Out (FIFO) basis.
  • SchedulerParameters: Several scheduling parameters are available.
      @@ -91,16 +97,29 @@ jobs or less) and interval to 30 seconds or more will limit the overhead of backfill scheduling (NOTE: the default values are fine for both of these parameters).
  • +
  • SelectType: +The select/serial plugin is highly optimized if executing only serial +(single CPU) jobs.
  • SlurmctldPort: It is desirable to configure the slurmctld daemon to accept incoming messages on more than one port in order to avoid having incoming messages discarded by the operating system due to exceeding the SOMAXCONN limit described above. Using between two and ten ports is suggested when large numbers of simultaneous requests are to be supported.
  • +
  • SlurmctldDebug: +More detailed logging will decrease system throughput. Set to 2 (log errors +only) or 3 (general information logging). Each increment in the logging level +will increase the number of message by a factor of about 3.
  • +
  • SlurmdDebug: +More detailed logging will decrease system throughput. Set to 2 (log errors +only) or 3 (general information logging). Each increment in the logging level +will increase the number of message by a factor of about 3.
  • +
  • SlurmdLogFile: +Writing to local storage is recommended.
  • Other: Configure logging, accounting and other overhead to a minimum appropriate for your environment.
  • -

    Last modified 30 August 2010

    +

    Last modified 12 July 2012

    -- GitLab From 2ddc6e709a90df3d785ceb284009b5a8aa8a8ec6 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Wed, 11 Jul 2012 16:17:32 -0700 Subject: [PATCH 586/614] squeue: report number of nodes in completing for completing jobs For some reason squeue was treating completing jobs the same as pending jobs, and reported the number of nodes as the maximum of requested nodelist, requested node count or CPUs (divided into nodes?) This is in contrast to the squeue manpage which explicitly states that the number of nodes reported for completing jobs should be only the nodes that are still allocated to the job. This patch removes the special handling of completing jobs in src/squeue/print.c:_get_node_cnt(), so that the squeue output for completing jobs matches documentation. A comment is also added so that developers looking at the code understand what is going on. --- src/squeue/print.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/squeue/print.c b/src/squeue/print.c index e020fbcbd2..bc4332ae34 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -751,10 +751,19 @@ int _print_job_num_nodes(job_info_t * job, int width, bool right_justify, static int _get_node_cnt(job_info_t * job) { int node_cnt = 0, round; - bool completing = job->job_state & JOB_COMPLETING; uint16_t base_job_state = job->job_state & (~JOB_COMPLETING); - if (base_job_state == JOB_PENDING || completing) { + /* For PENDING jobs, return the maximum of the requested nodelist, + * requested maximum number of nodes, or requested CPUs rounded + * to nearest node. + * + * For COMPLETING jobs, the job->nodes nodelist has already been + * altered to list only the nodes still in the comp state, and + * thus we count only those nodes toward the total nodes still + * allocated to this job. + */ + + if (base_job_state == JOB_PENDING) { node_cnt = _nodes_in_list(job->req_nodes); node_cnt = MAX(node_cnt, job->num_nodes); round = job->num_cpus + params.max_cpus - 1; -- GitLab From eca089e3d3767ab7834cbbc75ad2c841148a8935 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Sat, 19 May 2012 06:55:11 -0700 Subject: [PATCH 587/614] slurmstepd: Close childfd of exec_wait_info in parent Close the read end of the pipe slurmstepd uses to notify children it is time to call exec(2) in order to save one file descriptor per task. (Previously, the read side of the pipe wasn't closed until exec_wait_info was destroyed) --- src/slurmd/slurmstepd/mgr.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index dc8fdb19a7..359818221b 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1148,8 +1148,10 @@ static void exec_wait_info_destroy (struct exec_wait_info *e) if (e == NULL) return; - close (e->parentfd); - close (e->childfd); + if (e->parentfd >= 0) + close (e->parentfd); + if (e->childfd >= 0) + close (e->childfd); e->id = -1; e->pid = -1; } @@ -1172,9 +1174,17 @@ static struct exec_wait_info * fork_child_with_wait_info (int id) exec_wait_info_destroy (e); return (NULL); } - else if (e->pid == 0) /* In child, close parent fd */ + /* + * Close parentfd in child, and childfd in parent: + */ + if (e->pid == 0) { close (e->parentfd); - + e->parentfd = -1; + } + else { + close (e->childfd); + e->childfd = -1; + } return (e); } -- GitLab From 5b8dba9eece59a684b4c0b276ec8dd9146032b2f Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Sat, 19 May 2012 07:24:10 -0700 Subject: [PATCH 588/614] slurmstepd: Kill remaining children if fork fails On a failure of fork(2), slurmstepd would print an error and exit, possibly leaving previously forked children waiting. Ensure a better cleanup by killing all active children on fork failure before exiting slurmstepd. --- src/slurmd/slurmstepd/mgr.c | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 359818221b..5717cc9022 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1216,6 +1216,47 @@ static int exec_wait_signal (struct exec_wait_info *e, slurmd_job_t *job) return (0); } +/* + * Send SIGKILL to child in exec_wait_info 'e' + * Returns 0 for success, -1 for failure. + */ +static int exec_wait_kill_child (struct exec_wait_info *e) +{ + if (e->pid < 0) + return (-1); + if (kill (e->pid, SIGKILL) < 0) + return (-1); + e->pid = -1; + return (0); +} + +/* + * Send all children in exec_wait_list SIGKILL. + * Returns 0 for success or < 0 on failure. + */ +static int exec_wait_kill_children (List exec_wait_list) +{ + int rc = 0; + int count; + struct exec_wait_info *e; + ListIterator i; + + if ((count = list_count (exec_wait_list)) == 0) + return (0); + + verbose ("Killing %d remaining child%s", + count, (count > 1 ? "ren" : "")); + + i = list_iterator_create (exec_wait_list); + if (i == NULL) + return error ("exec_wait_kill_children: iterator_create: %m"); + + while ((e = list_next (i))) + rc += exec_wait_kill_child (e); + list_iterator_destroy (i); + return (rc); +} + static void prepare_stdio (slurmd_job_t *job, slurmd_task_info_t *task) { #ifdef HAVE_PTY_H @@ -1347,6 +1388,7 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) if ((ei = fork_child_with_wait_info (i)) == NULL) { error("child fork: %m"); + exec_wait_kill_children (exec_wait_list); rc = SLURM_ERROR; goto fail4; } else if ((pid = exec_wait_get_pid (ei)) == 0) { /* child */ -- GitLab From 9006dda469946944f3747a4aa9299e77a0b8d241 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Sat, 19 May 2012 14:46:08 -0700 Subject: [PATCH 589/614] slurmstepd: don't call exec if task fails to get notification from parent If exec_wait_child_wait_for_parent() fails for any reason, it is safer to abort immediately rather than proceed to execute the user's job. --- src/slurmd/slurmstepd/mgr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 5717cc9022..6e4b268f90 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -1440,7 +1440,8 @@ _fork_all_tasks(slurmd_job_t *job, bool *io_initialized) * children in any process groups or containers * before they make a call to exec(2). */ - exec_wait_child_wait_for_parent (ei); + if (exec_wait_child_wait_for_parent (ei) < 0) + exit (1); exec_task(job, i); } -- GitLab From b2b5b908efaf09111c707e9ea596019d72070fc4 Mon Sep 17 00:00:00 2001 From: "Mark A. Grondona" Date: Wed, 11 Jul 2012 10:01:37 -0700 Subject: [PATCH 590/614] slurmd: set SLURM_CONF in prolog/epilog environment Set SLURM_CONF in default prolog/epilog environment instead of only in spank prolog/epilog environment. This change fixes a potential hang during spank prolog/epilog execution due to the possibility of memory allocation after fork(2) and before exec(2) when invoking slurmstepd spank prolog|epilog. This also has the benefit that SLURM commands used in prolog and epilog scripts will use the correct slurm.conf file. --- src/slurmd/slurmd/req.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index b81fbcfc74..5d4f92acac 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -3781,6 +3781,7 @@ _build_env(uint32_t jobid, uid_t uid, char *resv_id, if (spank_job_env_size) env_array_merge(&env, (const char **) spank_job_env); + setenvf(&env, "SLURM_CONF", conf->conffile); setenvf(&env, "SLURM_JOB_ID", "%u", jobid); setenvf(&env, "SLURM_JOB_UID", "%u", uid); name = uid_to_string(uid); @@ -3849,9 +3850,6 @@ run_spank_job_script (const char *mode, char **env) (char *) mode, NULL }; - /* Set the correct slurm.conf location */ - setenvf (&env, "SLURM_CONF", conf->conffile); - if (dup2 (pfds[0], STDIN_FILENO) < 0) fatal ("dup2: %m"); #ifdef SETPGRP_TWO_ARGS -- GitLab From 865bec2aed477182d01123db3853eda7d7f0c2f8 Mon Sep 17 00:00:00 2001 From: Tim Wickberg Date: Fri, 13 Jul 2012 09:10:57 -0700 Subject: [PATCH 591/614] BGL - Fix for syncing users on block from Tim Wickberg --- NEWS | 1 + .../select/bluegene/bl/bridge_linker.c | 34 +++++++++++++------ 2 files changed, 24 insertions(+), 11 deletions(-) diff --git a/NEWS b/NEWS index 9c54ab898a..ea606ab79f 100644 --- a/NEWS +++ b/NEWS @@ -26,6 +26,7 @@ documents those changes that are of interest to users and admins. multi midplane block allocation. -- BGQ - Make it possible for a multi midplane allocation to run on more than 1 midplane but not the entire allocation. + -- BGL - Fix for syncing users on block from Tim Wickberg * Changes in SLURM 2.4.1 ======================== diff --git a/src/plugins/select/bluegene/bl/bridge_linker.c b/src/plugins/select/bluegene/bl/bridge_linker.c index d4caf23798..27c90400af 100644 --- a/src/plugins/select/bluegene/bl/bridge_linker.c +++ b/src/plugins/select/bluegene/bl/bridge_linker.c @@ -1687,7 +1687,7 @@ extern int bridge_block_sync_users(bg_record_t *bg_record) #ifdef HAVE_BG_FILES char *user; rm_partition_t *block_ptr = NULL; - int rc, i, user_count; + int rc, i, user_count, found=0; char *user_name = NULL; /* We can't use bridge_get_block_info here because users are @@ -1753,18 +1753,19 @@ extern int bridge_block_sync_users(bg_record_t *bg_record) continue; } - if (!strcmp(user, bg_conf->slurm_user_name)) { - free(user); - continue; - } + /* It has been found on L the block owner is not + needed as a regular user so we are now removing + it. It is unknown if this is the case for P but we + believe it is. If a problem does arise on P please + report and just uncomment this check. + */ + /* if (!strcmp(user, bg_conf->slurm_user_name)) { */ + /* free(user); */ + /* continue; */ + /* } */ if (user_name && !strcmp(user, user_name)) { - returnc = REMOVE_USER_FOUND; - if ((rc = bridge_block_add_user(bg_record, user)) - != SLURM_SUCCESS) { - debug("couldn't add user %s to block %s", - user, bg_record->bg_block_id); - } + found=1; free(user); continue; } @@ -1779,6 +1780,17 @@ extern int bridge_block_sync_users(bg_record_t *bg_record) } free(user); } + + // no users currently, or we didn't find outselves in the lookup + if (!found && user_name) { + returnc = REMOVE_USER_FOUND; + if ((rc = bridge_block_add_user(bg_record, user_name)) + != SLURM_SUCCESS) { + debug("couldn't add user %s to block %s", + user, bg_record->bg_block_id); + } + } + if ((rc = bridge_free_block(block_ptr)) != SLURM_SUCCESS) { error("bridge_free_block(): %s", bg_err_str(rc)); } -- GitLab From b34e5c287f61be83793a8024c3c8e49cae3cb42e Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 13 Jul 2012 12:48:35 -0700 Subject: [PATCH 592/614] Fix initialization of protocol_version for some messages to make sure it is always set when sending or receiving a message. --- NEWS | 2 ++ src/common/slurm_protocol_api.c | 2 ++ src/common/slurm_protocol_pack.c | 11 +++++++++++ src/common/slurm_protocol_util.c | 8 +++++--- src/slurmd/slurmd/req.c | 1 + src/slurmd/slurmstepd/slurmstepd.c | 1 + 6 files changed, 22 insertions(+), 3 deletions(-) diff --git a/NEWS b/NEWS index ea606ab79f..05ebb7e9f3 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,8 @@ documents those changes that are of interest to users and admins. -- BGQ - Make it possible for a multi midplane allocation to run on more than 1 midplane but not the entire allocation. -- BGL - Fix for syncing users on block from Tim Wickberg + -- Fix initialization of protocol_version for some messages to make sure it + is always set when sending or receiving a message. * Changes in SLURM 2.4.1 ======================== diff --git a/src/common/slurm_protocol_api.c b/src/common/slurm_protocol_api.c index a3fdd58ee1..17ea6df050 100644 --- a/src/common/slurm_protocol_api.c +++ b/src/common/slurm_protocol_api.c @@ -2374,6 +2374,7 @@ List slurm_receive_msgs(slurm_fd_t fd, int steps, int timeout) /* * Unpack message body */ + msg.protocol_version = header.version; msg.msg_type = header.msg_type; msg.flags = header.flags; @@ -2604,6 +2605,7 @@ int slurm_receive_msg_and_forward(slurm_fd_t fd, slurm_addr_t *orig_addr, /* * Unpack message body */ + msg->protocol_version = header.version; msg->msg_type = header.msg_type; msg->flags = header.flags; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index e4b80ac1e4..84bfab8c49 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -1220,6 +1220,17 @@ unpack_msg(slurm_msg_t * msg, Buf buffer) int rc = SLURM_SUCCESS; msg->data = NULL; /* Initialize to no data for now */ + /* In older versions of SLURM some RPC's were not initialized + correctly and NO_VAL was sent along as the + protocol_version. This was fixed in 2.4.2 and was noticed + when upgrading from 2.3 -> 2.5 when REQUEST_STEP_COMPLETE + was called. It hadn't changed for a while so + SLURM_2_4_PROTOCOL_VERSION should fix the issue when this + happens. + */ + if (msg->protocol_version == (uint16_t)NO_VAL) + msg->protocol_version = SLURM_2_4_PROTOCOL_VERSION; + switch (msg->msg_type) { case REQUEST_NODE_INFO: rc = _unpack_node_info_request_msg((node_info_request_msg_t **) diff --git a/src/common/slurm_protocol_util.c b/src/common/slurm_protocol_util.c index b513bbec23..6846db9a49 100644 --- a/src/common/slurm_protocol_util.c +++ b/src/common/slurm_protocol_util.c @@ -176,15 +176,17 @@ void init_header(header_t *header, slurm_msg_t *msg, uint16_t flags) if (msg->protocol_version != (uint16_t)NO_VAL) header->version = msg->protocol_version; else if (working_cluster_rec) - header->version = _get_slurm_version( + msg->protocol_version = header->version = _get_slurm_version( working_cluster_rec->rpc_version); else if ((msg->msg_type == ACCOUNTING_UPDATE_MSG) || (msg->msg_type == ACCOUNTING_FIRST_REG)) { uint32_t rpc_version = ((accounting_update_msg_t *)msg->data)->rpc_version; - header->version = _get_slurm_version(rpc_version); + msg->protocol_version = header->version = + _get_slurm_version(rpc_version); } else - header->version = SLURM_PROTOCOL_VERSION; + msg->protocol_version = header->version = + SLURM_PROTOCOL_VERSION; header->flags = flags; header->msg_type = msg->msg_type; diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index b81fbcfc74..22c375b181 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -538,6 +538,7 @@ _send_slurmstepd_init(int fd, slurmd_step_type_t type, void *req, } buffer = init_buf(0); msg.data = req; + msg.protocol_version = SLURM_PROTOCOL_VERSION; pack_msg(&msg, buffer); len = get_buf_offset(buffer); safe_write(fd, &len, sizeof(int)); diff --git a/src/slurmd/slurmstepd/slurmstepd.c b/src/slurmd/slurmstepd/slurmstepd.c index 1ffaa34bc3..cc32244932 100644 --- a/src/slurmd/slurmstepd/slurmstepd.c +++ b/src/slurmd/slurmstepd/slurmstepd.c @@ -436,6 +436,7 @@ _init_from_slurmd(int sock, char **argv, msg = xmalloc(sizeof(slurm_msg_t)); slurm_msg_t_init(msg); + msg->protocol_version = SLURM_PROTOCOL_VERSION; switch(step_type) { case LAUNCH_BATCH_JOB: -- GitLab From 9b2df9908640cdaed39b60f79689eb21c622a219 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 13 Jul 2012 12:54:57 -0700 Subject: [PATCH 593/614] switch/nrt: merge CAU and RDMA de/alloc to same functions --- src/plugins/switch/nrt/nrt.c | 129 +++++++++++++++++++++-------------- 1 file changed, 78 insertions(+), 51 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 068755c85d..a614c612fb 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -487,16 +487,7 @@ _free_resources_by_job(slurm_nrt_jobinfo_t *jp, char *node_name) for (i = 0; i < node->adapter_count; i++) { adapter = &node->adapter_list[i]; - if (!_free_block_use(jp, adapter)) { -error("NO FREE"); ; /* No RDMA or CAU for this job no on this adapter */ - } else if (jp->cau_indexes > adapter->cau_indexes_used) { - error("switch/nrt: cau_indexes_used underflow"); - adapter->cau_indexes_used = 0; - } else { -error("DECR CAU"); - adapter->cau_indexes_used -= jp->cau_indexes; - } - + (void) _free_block_use(jp, adapter); if (adapter->window_list == NULL) { error("switch/nrt: _free_resources_by_job, " "window_list NULL for node %s adapter %s", @@ -725,7 +716,6 @@ _window_state_set(slurm_nrt_jobinfo_t *jp, char *hostname, win_state_t state) } /* for each task */ if (adapter_found) { _add_block_use(jp, adapter); - adapter->cau_indexes_used += jp->cau_indexes; } else { error("switch/nrt: Did not find adapter %s of " "type %s with lid %hu ", @@ -845,53 +835,77 @@ static int _add_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) { int i; - uint64_t blocks_free; slurm_nrt_block_t *block_ptr, *free_block; + nrt_cau_index_t new_cau_count = 0; + uint64_t new_rcontext_blocks = 0; + + /* Validate sufficient CAU resources */ + if (jp->cau_indexes) { + new_cau_count = adapter->cau_indexes_used + jp->cau_indexes; + if (adapter->cau_indexes_avail < new_cau_count) { + info("switch/nrt: Insufficient cau_indexes resources " + "on adapter %s (%hu < %hu)", + adapter->adapter_name, adapter->cau_indexes_avail, + new_cau_count); + return SLURM_ERROR; + } + } - if ((jp->bulk_xfer && jp->bulk_xfer_resources) || jp->cau_indexes) { - blocks_free = adapter->rcontext_block_count - - adapter->rcontext_block_used; - if (blocks_free < jp->bulk_xfer_resources) { + /* Validate sufficient RDMA resources */ + if (jp->bulk_xfer && jp->bulk_xfer_resources) { + new_rcontext_blocks = adapter->rcontext_block_used + + jp->bulk_xfer_resources; + if (adapter->rcontext_block_count < new_rcontext_blocks) { info("switch/nrt: Insufficient bulk_xfer resources on " - "adapter %s (%"PRIu64" < %u)", - adapter->adapter_name, blocks_free, - jp->bulk_xfer_resources); + "adapter %s (%"PRIu64" < %"PRIu64")", + adapter->adapter_name, + adapter->rcontext_block_count, + new_rcontext_blocks); return SLURM_ERROR; } + } else { + jp->bulk_xfer_resources = 0; /* match jp->bulk_xfer */ + } - free_block = NULL; - block_ptr = adapter->block_list; - for (i = 0; i < adapter->block_count; i++, block_ptr++) { - if (block_ptr->job_key == jp->job_key) { - free_block = block_ptr; - break; - } else if ((block_ptr->job_key == 0) && - (free_block == 0)) { - free_block = block_ptr; - } + if ((new_cau_count == 0) && (new_rcontext_blocks == 0)) + return SLURM_SUCCESS; /* No work */ + + /* Add job_key to our table and update the resource used information */ + free_block = NULL; + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key == jp->job_key) { + free_block = block_ptr; + break; + } else if ((block_ptr->job_key == 0) && (free_block == 0)) { + free_block = block_ptr; } - if (free_block == NULL) { - xrealloc(adapter->block_list, - sizeof(slurm_nrt_block_t) * + } + if (free_block == NULL) { + xrealloc(adapter->block_list, + sizeof(slurm_nrt_block_t) * (adapter->block_count + 8)); - free_block = adapter->block_list + adapter->block_count; - adapter->block_count += 8; - } - free_block->job_key = jp->job_key; - free_block->rcontext_block_use = jp->bulk_xfer_resources; - adapter->rcontext_block_used += jp->bulk_xfer_resources; + free_block = adapter->block_list + adapter->block_count; + adapter->block_count += 8; + } + + free_block->job_key = jp->job_key; + free_block->rcontext_block_use = jp->bulk_xfer_resources; + if (new_cau_count) + adapter->cau_indexes_used = new_cau_count; + if (new_rcontext_blocks) + adapter->rcontext_block_used = new_rcontext_blocks; + #if 0 - block_ptr = adapter->block_list; - for (i = 0; i < adapter->block_count; i++, block_ptr++) { - if (block_ptr->job_key) { - info("adapter:%s block:%d job_key:%u blocks:%u", - adapter->adapter_name, i, - block_ptr->job_key, - free_block->rcontext_block_use); - } + block_ptr = adapter->block_list; + for (i = 0; i < adapter->block_count; i++, block_ptr++) { + if (block_ptr->job_key) { + info("adapter:%s block:%d job_key:%u blocks:%u", + adapter->adapter_name, i, block_ptr->job_key, + free_block->rcontext_block_use); } -#endif } +#endif return SLURM_SUCCESS; } static bool @@ -906,8 +920,23 @@ _free_block_use(slurm_nrt_jobinfo_t *jp, slurm_nrt_adapter_t *adapter) for (i = 0; i < adapter->block_count; i++, block_ptr++) { if (block_ptr->job_key != jp->job_key) continue; - adapter->rcontext_block_used -= block_ptr-> - rcontext_block_use; + + if (jp->cau_indexes > adapter->cau_indexes_used) { + error("switch/nrt: cau_indexes_used underflow"); + adapter->cau_indexes_used = 0; + } else { + adapter->cau_indexes_used -= jp->cau_indexes; + } + + if (block_ptr->rcontext_block_use > + adapter->rcontext_block_used) { + error("switch/nrt: rcontext_block_used " + "underflow"); + adapter->rcontext_block_used = 0; + } else { + adapter->rcontext_block_used -= + block_ptr->rcontext_block_use; + } block_ptr->job_key = 0; block_ptr->rcontext_block_use = 0; found_job = true; @@ -977,7 +1006,6 @@ _allocate_windows_all(slurm_nrt_jobinfo_t *jp, char *hostname, if (context_id == 0) { if (_add_block_use(jp, adapter)) return SLURM_ERROR; - adapter->cau_indexes_used += jp->cau_indexes; } for (j = 0; j < instances; j++) { table_id++; @@ -1170,7 +1198,6 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, if (context_id == 0) { if (_add_block_use(jp, adapter)) return SLURM_ERROR; - adapter->cau_indexes_used += jp->cau_indexes; } for (table_id = 0; table_id < instances; table_id++) { table_inx++; -- GitLab From bb5d2e814064b6b4170bf71f2b63d439088edadc Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 13 Jul 2012 13:25:11 -0700 Subject: [PATCH 594/614] switch/nrt: Improve logging --- src/plugins/switch/nrt/nrt.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index a614c612fb..80ba18d9f4 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1503,7 +1503,10 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" port_id: %hu", a->port_id); info(" rcontext_block_count: %"PRIu64"", a->rcontext_block_count); + info(" rcontext_block_used: %"PRIu64"", + a->rcontext_block_used); info(" special: %lu", a->special); + info(" window_count: %hu", a->window_count); hs = hostset_create(""); if (hs == NULL) @@ -1530,6 +1533,14 @@ _print_nodeinfo(slurm_nrt_nodeinfo_t *n) info(" -------- "); } hostset_destroy(hs); + + info(" block_count: %hu", a->block_count); + for (j = 0; j < a->block_count; j++) { + if (a->block_list[j].job_key) { + info(" job_key[%d]: %u", + j, a->block_list[j].job_key); + } + } } info("--End Node Info--"); } -- GitLab From 922df01a04474847a1be8c3c29698764cfccca7f Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Fri, 13 Jul 2012 13:56:58 -0700 Subject: [PATCH 595/614] switch/nrt: release resources from failed allocate --- src/plugins/switch/nrt/nrt.c | 6 +++--- src/slurmctld/step_mgr.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 80ba18d9f4..9c34edf03c 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -1209,7 +1209,6 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, "on node %s adapter %s", node->name, adapter->adapter_name); - /* FIXME: Should we retry job step? */ return SLURM_ERROR; } adapter->immed_slots_used += jp->immed_slots; @@ -1221,7 +1220,6 @@ _allocate_window_single(char *adapter_name, slurm_nrt_jobinfo_t *jp, adapter->adapter_name); adapter->immed_slots_used -= jp->immed_slots; - /* FIXME: Should we retry job step? */ return SLURM_ERROR; } window->state = NRT_WIN_UNAVAILABLE; @@ -2784,7 +2782,9 @@ fail: free(host); hostlist_iterator_destroy(hi); xfree(protocol_table); - /* slurmctld will call nrt_free_jobinfo on jp */ + (void) nrt_job_step_complete(jp, hl); /* Release resources already + * allocated */ + /* slurmctld will call nrt_free_jobinfo(jp) to free memory */ return SLURM_FAILURE; } diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 52d3641894..27582c928a 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -2054,7 +2054,6 @@ step_create(job_step_create_request_msg_t *step_specs, step_ptr->step_layout->tasks, step_ptr->step_layout->tids, step_ptr->network) < 0) { - error("switch_build_jobinfo: %m"); delete_step_record (job_ptr, step_ptr->step_id); return ESLURM_INTERCONNECT_FAILURE; } -- GitLab From 3f38dbd6d85f413079db6ad20de66279c3e47c8b Mon Sep 17 00:00:00 2001 From: Danny Auble Date: Fri, 13 Jul 2012 14:13:29 -0700 Subject: [PATCH 596/614] BGQ - fix to handle sub block but larger than 1 midplane step in the runjob_mux --- src/plugins/select/bluegene/runjob_plugin.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/select/bluegene/runjob_plugin.cc b/src/plugins/select/bluegene/runjob_plugin.cc index 0830ecd3b2..995efb4e93 100644 --- a/src/plugins/select/bluegene/runjob_plugin.cc +++ b/src/plugins/select/bluegene/runjob_plugin.cc @@ -265,7 +265,8 @@ void Plugin::execute(bgsched::runjob::Verify& verify) + " block=" + boost::lexical_cast(block_cnode_cnt); goto deny_job; - } else if (step_cnode_cnt < block_cnode_cnt) { + } else if ((step_cnode_cnt < block_cnode_cnt) + && (step_cnode_cnt <= 512)) { uint16_t dim; uint16_t tmp_uint16[HIGHEST_DIMENSIONS]; -- GitLab From 13fd64848950da8e8055170a043ad61d33d48e41 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 09:00:24 -0700 Subject: [PATCH 597/614] switch/nrt: Minor updates to documentation --- doc/html/poe.shtml | 22 +++++++++++++++------- doc/man/man1/salloc.1 | 22 +++++++++++++++------- doc/man/man1/sbatch.1 | 26 +++++++++++++++++--------- doc/man/man1/srun.1 | 30 +++++++++++++++++++++--------- 4 files changed, 68 insertions(+), 32 deletions(-) diff --git a/doc/html/poe.shtml b/doc/html/poe.shtml index a45752af50..c232eeaffd 100644 --- a/doc/html/poe.shtml +++ b/doc/html/poe.shtml @@ -49,7 +49,7 @@ SLURM_NETWORK environment variable. Supported network options include:

  • ipv6 Internet protocol, version 6
  • us User Space protocol, may be combined with ibv4 or ipv6
  • -
  • Task communication interface
  • +
  • Programming interface
    • lapi Low-level Application Programming Interface
    • mpi Message Passing Interface (default)
    • @@ -62,11 +62,15 @@ SLURM_NETWORK environment variable. Supported network options include:

      Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional resources specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or - gigabytes. + gigabytes. + NOTE: The resources specification is not supported by the + underlying IBM infrastructure as of Parallel Environment version 2.2 and no + value should be specified at this time.
    • cau=count - Specify the count of Collective Acceleration Units (CAU) required per adapter. + Specify the count of Collective Acceleration Units (CAU) required per + programming interface. Default value is zero. - Applies only to IBM Power7 processors. + Applies only to IBM Power7-IH processors.
    • devname=name Specify the name of an network adapter to use. For example: "eth0" or "mlx4_0".
    • @@ -75,11 +79,15 @@ SLURM_NETWORK environment variable. Supported network options include:

      The supported values of type are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and - "KMUX" (Kernel Emulation of HPCE). + "KMUX" (Kernel Emulation of HPCE). + The devices allocated to a job must all be of the same type. + The default value depends upon depends upon what hardware is available and in + order of preferences is IPONLY (which is not considered in User Space mode), + HFI, IB, HPCE, and KMUX.
    • immed=count Specify the count of immediate send slots per adapter window. Default value is zero. - Applies only to IBM Power7 processors. + Applies only to IBM Power7-IH processors.
    • instances=count Specify number of network connections for each task on each network connection. The default instance count is 1.
    • @@ -210,6 +218,6 @@ MP_POOL=slurm -

      Last modified 12 July 2012

      +

      Last modified 16 July 2012

      diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index 8f42152966..f8eb63fdba 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -752,11 +752,15 @@ Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. +NOTE: The \fIresources\fR specification is not supported by the underlying +IBM infrastructure as of Parallel Environment version 2.2 and no value should +be specified at this time. .TP \fBCAU\fR=<\fIcount\fR> Number of Collecitve Accelleration Units (CAU) required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. +Independent CAU will be allocated for each programming interface (MPI, LAPI, etc.) .TP \fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). @@ -767,10 +771,14 @@ The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). +The devices allocated to a job must all be of the same type. +The default value depends upon depends upon what hardware is available and in +order of preferences is IPONLY (which is not considered in User Space mode), +HFI, IB, HPCE, and KMUX. .TP \fBIMMED\fR =<\fIcount\fR> Number of immediate send slots per window required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. .TP \fBINSTANCES\fR =<\fIcount\fR> @@ -784,14 +792,14 @@ Use Internet Protocol (IP) version 4 communications (default). Use Internet Protocol (IP) version 6 communications. .TP \fBLAPI\fR -Use the LAPI protocol. +Use the LAPI programming interface. .TP \fBMPI\fR -Use the MPI protocol. -MPI is the default protocol. +Use the MPI programming interface. +MPI is the default interface. .TP \fBPAMI\fR -Use the PAMI protocol. +Use the PAMI programming interface. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -800,7 +808,7 @@ Use all available switch networks (default). Use one available switch network. .TP \fBUPC\fR -Use the UPC protocol. +Use the UPC programming interface. .TP \fBUS\fR Use User Space communications. diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 6cb363827e..1c7c8ad527 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -815,11 +815,15 @@ Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. +NOTE: The \fIresources\fR specification is not supported by the underlying +IBM infrastructure as of Parallel Environment version 2.2 and no value should +be specified at this time. .TP \fBCAU\fR=<\fIcount\fR> Number of Collecitve Accelleration Units (CAU) required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. +Independent CAU will be allocated for each programming interface (MPI, LAPI, etc.) .TP \fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). @@ -830,13 +834,17 @@ The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). +The devices allocated to a job must all be of the same type. +The default value depends upon depends upon what hardware is available and in +order of preferences is IPONLY (which is not considered in User Space mode), +HFI, IB, HPCE, and KMUX. .TP -\fBIMMED\fR=<\fIcount\fR> +\fBIMMED\fR =<\fIcount\fR> Number of immediate send slots per window required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. .TP -\fBINSTANCES\fR=<\fIcount\fR> +\fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP @@ -847,14 +855,14 @@ Use Internet Protocol (IP) version 4 communications (default). Use Internet Protocol (IP) version 6 communications. .TP \fBLAPI\fR -Use the LAPI protocol. +Use the LAPI programming interface. .TP \fBMPI\fR -Use the MPI protocol. -MPI is the default protocol. +Use the MPI programming interface. +MPI is the default interface. .TP \fBPAMI\fR -Use the PAMI protocol. +Use the PAMI programming interface. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -863,7 +871,7 @@ Use all available switch networks (default). Use one available switch network. .TP \fBUPC\fR -Use the UPC protocol. +Use the UPC programming interface. .TP \fBUS\fR Use User Space communications. diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 59fa01e89b..2053013432 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -854,11 +854,19 @@ Enable bulk transfer of data using Remote Direct-Memory Access (RDMA). The optional \fIresources\fR specification is a numeric value which can have a suffix of "k", "K", "m", "M", "g" or "G" for kilobytes, megabytes or gigabytes. +NOTE: The \fIresources\fR specification is not supported by the underlying +IBM infrastructure as of Parallel Environment version 2.2 and no value should +be specified at this time. +The devices allocated to a job must all be of the same type. +The default value depends upon depends upon what hardware is available and in +order of preferences is IPONLY (which is not considered in User Space mode), +HFI, IB, HPCE, and KMUX. .TP \fBCAU\fR=<\fIcount\fR> Number of Collecitve Accelleration Units (CAU) required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. +Independent CAU will be allocated for each programming interface (MPI, LAPI, etc.) .TP \fBDEVNAME\fR=<\fIname\fR> Specify the device name to use for communications (e.g. "eth0" or "mlx4_0"). @@ -869,13 +877,17 @@ The supported values of \fItype\fR are: "IB" (InfiniBand), "HFI" (P7 Host Fabric Interface), "IPONLY" (IP-Only interfaces), "HPCE" (HPC Ethernet), and "KMUX" (Kernel Emulation of HPCE). +The devices allocated to a job must all be of the same type. +The default value depends upon depends upon what hardware is available and in +order of preferences is IPONLY (which is not considered in User Space mode), +HFI, IB, HPCE, and KMUX. .TP -\fBIMMED\fR=<\fIcount\fR> +\fBIMMED\fR =<\fIcount\fR> Number of immediate send slots per window required. -Applies only to IBM Power7 processors. +Applies only to IBM Power7-IH processors. Default value is zero. .TP -\fBINSTANCES\fR=<\fIcount\fR> +\fBINSTANCES\fR =<\fIcount\fR> Specify number of network connections for each task on each network connection. The default instance count is 1. .TP @@ -886,14 +898,14 @@ Use Internet Protocol (IP) version 4 communications (default). Use Internet Protocol (IP) version 6 communications. .TP \fBLAPI\fR -Use the LAPI protocol. +Use the LAPI programming interface. .TP \fBMPI\fR -Use the MPI protocol. -MPI is the default protocol. +Use the MPI programming interface. +MPI is the default interface. .TP \fBPAMI\fR -Use the PAMI protocol. +Use the PAMI programming interface. .TP \fBSN_ALL\fR Use all available switch networks (default). @@ -902,7 +914,7 @@ Use all available switch networks (default). Use one available switch network. .TP \fBUPC\fR -Use the UPC protocol. +Use the UPC programming interface. .TP \fBUS\fR Use User Space communications. -- GitLab From c5f79aa826fa6f5f24bd08416f080ff98c79e301 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 09:36:56 -0700 Subject: [PATCH 598/614] switch/nrt: change to only load one adapter_type per job --- src/plugins/switch/nrt/nrt.c | 56 ++++++++++++++++++++++++++++-------- 1 file changed, 44 insertions(+), 12 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 9c34edf03c..6a316a3984 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2589,6 +2589,23 @@ static nrt_protocol_table_t *_get_protocol_table(char *protocol) return protocol_table; } +/* For an adapter type, return it's relative priority to use as a default */ +static inline int +_adapter_type_pref(nrt_adapter_t adapter_type) +{ + if (adapter_type == NRT_IPONLY) + return 9; + if (adapter_type == NRT_HFI) + return 8; + if (adapter_type == NRT_IB) + return 7; + if (adapter_type == NRT_HPCE) + return 6; + if (adapter_type == NRT_KMUX) + return 5; + return 0; +} + /* Setup everything for the job. Assign tasks across * nodes based on the hostlist given and create the network table used * on all nodes of the job. @@ -2611,8 +2628,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, int rc; nrt_adapter_t adapter_type = NRT_MAX_ADAPTER_TYPES; int network_id = -1; - int adapter_type_count = 0; nrt_protocol_table_t *protocol_table = NULL; + nrt_adapter_t def_adapter_type = NRT_ADAP_UNSUPPORTED; + int def_adapter_count = 0; + int def_adapter_inx = -1; assert(jp); assert(jp->magic == NRT_JOBINFO_MAGIC); @@ -2666,20 +2685,33 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, continue; if (jp->user_space && (ad_type == NRT_IPONLY)) continue; - adapter_type_count++; - if (!sn_all) { - if (!adapter_name) { - adapter_name = node->adapter_list[i]. - adapter_name; - } - adapter_type = ad_type; - network_id = node->adapter_list[i].network_id; - break; + + /* Identify highest-priority adapter type */ + if (_adapter_type_pref(def_adapter_type) < + _adapter_type_pref(ad_type)) { + def_adapter_type = ad_type; + def_adapter_count = 1; + def_adapter_inx = i; + } else if (_adapter_type_pref(def_adapter_type) == + _adapter_type_pref(ad_type)) { + def_adapter_count++; + } + } + if (!sn_all) { + if (!adapter_name) { + adapter_name = node-> + adapter_list[def_adapter_inx]. + adapter_name; } + network_id = node->adapter_list[def_adapter_inx]. + network_id; + def_adapter_count = 1; } + if (adapter_type == NRT_MAX_ADAPTER_TYPES) + adapter_type = def_adapter_type; } - if (adapter_type_count >= 1) { - jp->tables_per_task = adapter_type_count; + if (def_adapter_count >= 1) { + jp->tables_per_task = def_adapter_count; } else { jp->tables_per_task = 0; info("switch/nrt: no adapter found for job"); -- GitLab From 7a4621fd0995d138bad2eb199054347d3e24e71a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 09:48:41 -0700 Subject: [PATCH 599/614] switch/nrt: fix an anomaly in sn_single support --- src/plugins/switch/nrt/nrt.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/plugins/switch/nrt/nrt.c b/src/plugins/switch/nrt/nrt.c index 6a316a3984..f8b3026660 100644 --- a/src/plugins/switch/nrt/nrt.c +++ b/src/plugins/switch/nrt/nrt.c @@ -2697,7 +2697,7 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, def_adapter_count++; } } - if (!sn_all) { + if (!sn_all && (def_adapter_count > 0)) { if (!adapter_name) { adapter_name = node-> adapter_list[def_adapter_inx]. @@ -2707,7 +2707,8 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, network_id; def_adapter_count = 1; } - if (adapter_type == NRT_MAX_ADAPTER_TYPES) + if ((adapter_type == NRT_MAX_ADAPTER_TYPES) && + (def_adapter_count > 0)) adapter_type = def_adapter_type; } if (def_adapter_count >= 1) { @@ -2726,8 +2727,10 @@ nrt_build_jobinfo(slurm_nrt_jobinfo_t *jp, hostlist_t hl, if (adapter_type == NRT_IPONLY) { /* Without setting tables_per_task == 0, non-existant switch * windows are allocated resulting in some inconstencies in - * NRT's records. */ -/* FIXME jp->tables_per_task = 0; */ + * NRT's records. Specifically the IPONLY devices report their + * maximum window count is 0, but then report a non-zero + * current window count. */ + jp->tables_per_task = 0; } if (instances <= 0) { -- GitLab From ac3fb2bf32c52449d21a2aeb4ae91eefffe0cb8d Mon Sep 17 00:00:00 2001 From: Don Albert Date: Mon, 16 Jul 2012 12:16:24 -0700 Subject: [PATCH 600/614] Add support for user setting of cpu frequency for a job step --- contribs/perlapi/libslurm/perl/step_ctx.c | 1 + doc/man/man1/srun.1 | 55 ++ slurm/slurm.h.in | 10 + src/api/job_step_info.c | 35 +- src/api/step_ctx.c | 1 + src/api/step_launch.c | 2 + src/common/Makefile.am | 1 + src/common/Makefile.in | 37 +- src/common/cpu_frequency.c | 641 +++++++++++++++++++ src/common/cpu_frequency.h | 101 +++ src/common/env.c | 31 + src/common/env.h | 1 + src/common/slurm_protocol_defs.h | 3 + src/common/slurm_protocol_pack.c | 272 +++++++- src/plugins/launch/slurm/launch_slurm.c | 1 + src/plugins/task/affinity/affinity.h | 1 + src/plugins/task/affinity/task_affinity.c | 10 +- src/plugins/task/cgroup/task_cgroup_cpuset.c | 6 + src/slurmctld/slurmctld.h | 1 + src/slurmctld/step_mgr.c | 40 +- src/slurmd/slurmd/req.c | 4 + src/slurmd/slurmd/slurmd.c | 12 + src/slurmd/slurmstepd/mgr.c | 9 + src/slurmd/slurmstepd/req.c | 9 + src/slurmd/slurmstepd/slurmstepd.c | 4 + src/slurmd/slurmstepd/slurmstepd_job.c | 1 + src/slurmd/slurmstepd/slurmstepd_job.h | 1 + src/slurmd/slurmstepd/task.c | 1 + src/srun/libsrun/launch.c | 1 + src/srun/libsrun/opt.c | 17 + src/srun/libsrun/opt.h | 1 + src/srun/srun.c | 1 + 32 files changed, 1283 insertions(+), 28 deletions(-) create mode 100644 src/common/cpu_frequency.c create mode 100644 src/common/cpu_frequency.h diff --git a/contribs/perlapi/libslurm/perl/step_ctx.c b/contribs/perlapi/libslurm/perl/step_ctx.c index 9f50a9ccf2..5f693096ab 100644 --- a/contribs/perlapi/libslurm/perl/step_ctx.c +++ b/contribs/perlapi/libslurm/perl/step_ctx.c @@ -186,6 +186,7 @@ hv_to_slurm_step_launch_params(HV *hv, slurm_step_launch_params_t *params) FETCH_FIELD(hv, params, task_epilog, charp, FALSE); FETCH_FIELD(hv, params, cpu_bind_type, uint16_t, FALSE); FETCH_FIELD(hv, params, cpu_bind, charp, FALSE); + FETCH_FIELD(hv, params, cpu_freq, uint32_t, FALSE); FETCH_FIELD(hv, params, mem_bind_type, uint16_t, FALSE); FETCH_FIELD(hv, params, mem_bind, charp, FALSE); diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 2053013432..19c37ea2b1 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -315,6 +315,43 @@ this can result in sub\-optimal binding. Show help message for cpu_bind .RE +.TP +\fB\-\-cpu\-freq\fR =<\fIrequested frequency in kilohertz\fR> + +Request that the job step initiated by this srun be run at the +requested frequency if possible, on the cpus selected for the step on +the compute node(s). In addition to specifying a numerical frequency in +kilohertz, the request can specify \fIlow\fR, \fImedium\fR, or +\fIhigh\fR for the value. "Low" will select the lowest available +frequency, "high" will select the highest available frequency, while +"medium" attempts to set a frequency in the middle of the available +range. If the numeric value specified does not exactly match a legal +available frequency, SLURM will attempt to pick a legal frequency +close to the request. + +The following informational environment variable is set in the job +step when \fB\-\-cpu\-freq\fR option is requested. +.nf + SLURM_CPU_FREQ_REQ +.fi + +This environment variable can also be used to supply the value for the +cpu frequency request if it is set when the 'srun' command is issued. +The \fB\-\-cpu\-freq\fR on the command line will override the +environment variable value. See the \fBENVIRONMENT VARIABLES\fR +section for a description of the SLURM_CPU_FREQ_REQ variable. + +\fBNOTE\fR: This parameter is treated as a request, not a requirement. +If the job step's node does not support setting the cpu frequency, or +the requested value is outside the bounds of the legal frequencies, an +error is logged, but the job step is allowed to continue. + +\fBNOTE\fR: Setting the frequency for just the cpus of the job step +implies that the tasks are confined to those cpus. If task +confinement (i.e., TaskPlugin=task/affinity or +TaskPlugin=task/cgroup with the "ConstrainCores" option) is not +configured, this parameter is ignored. + .TP \fB\-c\fR, \fB\-\-cpus\-per\-task\fR=<\fIncpus\fR> Request that \fIncpus\fR be allocated \fBper process\fR. This may be @@ -341,6 +378,7 @@ threads per CPU for a total of two tasks. \fBWARNING\fR: When srun is executed from within salloc or sbatch, there are configurations and options which can result in inconsistent allocations when \-c has a value greater than \-c on salloc or sbatch. + .TP \fB\-d\fR, \fB\-\-dependency\fR=<\fIdependency_list\fR> Defer the start of this job until the specified dependencies have been @@ -1633,6 +1671,16 @@ Same as \fB\-\-conn\-type\fR \fBSLURM_CPU_BIND\fR Same as \fB\-\-cpu_bind\fR .TP +\fBSLURM_CPU_FREQ_REQ\fR +Same as \fB\-\-cpu\-freq\fR. Can specify a numerical frequency in +kilohertz, or the request can specify \fIlow\fR, \fImedium\fR, or +\fIhigh\fR for the value. "Low" will select the lowest available +frequency, "high" will select the highest available frequency, while +"medium" attempts to set a frequency in the middle of the available +range. If the numeric value specified does not exactly match a legal +available frequency, SLURM will attempt to pick a legal frequency +close to the request. +.TP \fBSLURM_CPUS_PER_TASK\fR Same as \fB\-c, \-\-cpus\-per\-task\fR .TP @@ -1811,6 +1859,13 @@ if specified on the execute line. \fBSLURM_CPU_BIND_LIST\fR \-\-cpu_bind map or mask list () +.TP +\fBSLURM_CPU_FREQ_REQ\fR +Contains the value requested for cpu frequency on the srun command as +a numerical frequency in kilohertz, or a coded value for a request of +\fIlow\fR, \fImedium\fR, or \fIhigh\fR for the frequency. See the +description of the \fB\-\-cpu\-freq\fR option or the +\fBSLURM_CPU_FREQ_REQ\fR input environment variable. .TP \fBSLURM_CPUS_ON_NODE\fR Count of processors available to the job on this node. diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index c061309d25..de2756be37 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -473,6 +473,13 @@ typedef enum cpu_bind_type { /* cpu binding type from --cpu_bind=... */ CPU_BIND_CPUSETS = 0x8000 } cpu_bind_type_t; +/* Flag to indicate that cpu_freq is a range: low,medium,high + * instead of an integer value in kilohertz */ +#define CPU_FREQ_RANGE_FLAG 0x80000000 +#define CPU_FREQ_LOW 0x80000001 +#define CPU_FREQ_MEDIUM 0x80000002 +#define CPU_FREQ_HIGH 0x80000003 + typedef enum mem_bind_type { /* memory binding type from --mem_bind=... */ /* verbose can be set with any other flag */ MEM_BIND_VERBOSE= 0x01, /* =v, */ @@ -1241,6 +1248,7 @@ typedef struct suspend_msg { typedef struct { uint16_t ckpt_interval; /* checkpoint interval in minutes */ uint32_t cpu_count; /* number of required processors */ + uint32_t cpu_freq; /* requested cpu frequency */ uint16_t exclusive; /* 1 if CPUs not shared with other steps */ char *features; /* required node features, default NONE */ uint16_t immediate; /* 1 if allocate to run or fail immediately, @@ -1302,6 +1310,7 @@ typedef struct { char *task_epilog; uint16_t cpu_bind_type; /* use cpu_bind_type_t */ char *cpu_bind; + uint32_t cpu_freq; /* requested cpu frequency */ uint16_t mem_bind_type; /* use mem_bind_type_t */ char *mem_bind; @@ -1357,6 +1366,7 @@ typedef struct { * start_range_1, end_range_1, * start_range_2, .., -1 */ uint32_t num_cpus; /* how many cpus are being used by step */ + uint32_t cpu_freq; /* requested cpu frequency */ uint32_t num_tasks; /* number of tasks */ char *partition; /* name of assigned partition */ char *resv_ports; /* ports allocated for MPI */ diff --git a/src/api/job_step_info.c b/src/api/job_step_info.c index b7483a67cb..4cf5a4a2ee 100644 --- a/src/api/job_step_info.c +++ b/src/api/job_step_info.c @@ -195,10 +195,43 @@ slurm_sprint_job_step_info ( job_step_info_t * job_step_ptr, /****** Line 4 ******/ snprintf(tmp_line, sizeof(tmp_line), - "ResvPorts=%s Checkpoint=%u CheckpointDir=%s\n\n", + "ResvPorts=%s Checkpoint=%u CheckpointDir=%s", job_step_ptr->resv_ports, job_step_ptr->ckpt_interval, job_step_ptr->ckpt_dir); xstrcat(out, tmp_line); + if (one_liner) + xstrcat(out, " "); + else + xstrcat(out, "\n "); + + /****** Line 5 ******/ + if (job_step_ptr->cpu_freq == NO_VAL) + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=Default\n\n"); + else if (job_step_ptr->cpu_freq & CPU_FREQ_RANGE_FLAG) { + switch (job_step_ptr->cpu_freq) + { + case CPU_FREQ_LOW : + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=Low\n\n"); + break; + case CPU_FREQ_MEDIUM : + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=Medium\n\n"); + break; + case CPU_FREQ_HIGH : + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=High\n\n"); + break; + default : + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=Unknown\n\n"); + } + } + else + snprintf(tmp_line, sizeof(tmp_line), + "CPUFreqReq=%u\n\n", job_step_ptr->cpu_freq); + xstrcat(out, tmp_line); return out; } diff --git a/src/api/step_ctx.c b/src/api/step_ctx.c index eee2d6383a..a26fafd8b2 100644 --- a/src/api/step_ctx.c +++ b/src/api/step_ctx.c @@ -109,6 +109,7 @@ static job_step_create_request_msg_t *_create_step_request( step_req->min_nodes = step_params->min_nodes; step_req->max_nodes = step_params->max_nodes; step_req->cpu_count = step_params->cpu_count; + step_req->cpu_freq = step_params->cpu_freq; step_req->num_tasks = step_params->task_count; step_req->relative = step_params->relative; step_req->resv_port_cnt = step_params->resv_port_cnt; diff --git a/src/api/step_launch.c b/src/api/step_launch.c index 5a1d929b94..b35c093303 100644 --- a/src/api/step_launch.c +++ b/src/api/step_launch.c @@ -138,6 +138,7 @@ void slurm_step_launch_params_t_init (slurm_step_launch_params_t *ptr) memcpy(&ptr->local_fds, &fds, sizeof(fds)); ptr->gid = getgid(); ptr->acctg_freq = (uint16_t) NO_VAL; + ptr->cpu_freq = NO_VAL; } /* @@ -250,6 +251,7 @@ int slurm_step_launch (slurm_step_ctx_t *ctx, launch.task_epilog = params->task_epilog; launch.cpu_bind_type = params->cpu_bind_type; launch.cpu_bind = params->cpu_bind; + launch.cpu_freq = params->cpu_freq; launch.mem_bind_type = params->mem_bind_type; launch.mem_bind = params->mem_bind; launch.multi_prog = params->multi_prog ? 1 : 0; diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 5dcbfd2ca4..3cdcdd0e0d 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -35,6 +35,7 @@ libcommon_la_SOURCES = \ xcgroup_read_config.c xcgroup_read_config.h \ xcgroup.c xcgroup.h \ xcpuinfo.c xcpuinfo.h \ + cpu_frequency.c cpu_frequency.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ diff --git a/src/common/Makefile.in b/src/common/Makefile.in index a38f0233ab..0029c86aa1 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -99,16 +99,17 @@ am__DEPENDENCIES_1 = libcommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ xcgroup_read_config.h xcgroup.c xcgroup.h xcpuinfo.c \ - xcpuinfo.h assoc_mgr.c assoc_mgr.h xmalloc.c xmalloc.h \ - xassert.c xassert.h xstring.c xstring.h xsignal.c xsignal.h \ - strnatcmp.c strnatcmp.h forward.c forward.h strlcpy.c \ - strlcpy.h list.c list.h net.c net.h log.c log.h cbuf.c cbuf.h \ - safeopen.c safeopen.h bitstring.c bitstring.h mpi.c mpi.h \ - pack.c pack.h parse_config.c parse_config.h parse_spec.c \ - parse_spec.h plugin.c plugin.h plugrack.c plugrack.h \ - print_fields.c print_fields.h read_config.c read_config.h \ - node_select.c node_select.h env.c env.h fd.c fd.h slurm_cred.h \ - slurm_cred.c slurm_errno.c slurm_priority.c slurm_priority.h \ + xcpuinfo.h cpu_frequency.c cpu_frequency.h assoc_mgr.c \ + assoc_mgr.h xmalloc.c xmalloc.h xassert.c xassert.h xstring.c \ + xstring.h xsignal.c xsignal.h strnatcmp.c strnatcmp.h \ + forward.c forward.h strlcpy.c strlcpy.h list.c list.h net.c \ + net.h log.c log.h cbuf.c cbuf.h safeopen.c safeopen.h \ + bitstring.c bitstring.h mpi.c mpi.h pack.c pack.h \ + parse_config.c parse_config.h parse_spec.c parse_spec.h \ + plugin.c plugin.h plugrack.c plugrack.h print_fields.c \ + print_fields.h read_config.c read_config.h node_select.c \ + node_select.h env.c env.h fd.c fd.h slurm_cred.h slurm_cred.c \ + slurm_errno.c slurm_priority.c slurm_priority.h \ slurm_protocol_api.c slurm_protocol_api.h \ slurm_protocol_pack.c slurm_protocol_pack.h \ slurm_protocol_util.c slurm_protocol_util.h \ @@ -136,13 +137,13 @@ am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ node_conf.h node_conf.c gres.h gres.c @HAVE_UNSETENV_FALSE@am__objects_1 = unsetenv.lo am_libcommon_la_OBJECTS = xcgroup_read_config.lo xcgroup.lo \ - xcpuinfo.lo assoc_mgr.lo xmalloc.lo xassert.lo xstring.lo \ - xsignal.lo strnatcmp.lo forward.lo strlcpy.lo list.lo net.lo \ - log.lo cbuf.lo safeopen.lo bitstring.lo mpi.lo pack.lo \ - parse_config.lo parse_spec.lo plugin.lo plugrack.lo \ - print_fields.lo read_config.lo node_select.lo env.lo fd.lo \ - slurm_cred.lo slurm_errno.lo slurm_priority.lo \ - slurm_protocol_api.lo slurm_protocol_pack.lo \ + xcpuinfo.lo cpu_frequency.lo assoc_mgr.lo xmalloc.lo \ + xassert.lo xstring.lo xsignal.lo strnatcmp.lo forward.lo \ + strlcpy.lo list.lo net.lo log.lo cbuf.lo safeopen.lo \ + bitstring.lo mpi.lo pack.lo parse_config.lo parse_spec.lo \ + plugin.lo plugrack.lo print_fields.lo read_config.lo \ + node_select.lo env.lo fd.lo slurm_cred.lo slurm_errno.lo \ + slurm_priority.lo slurm_protocol_api.lo slurm_protocol_pack.lo \ slurm_protocol_util.lo slurm_protocol_socket_implementation.lo \ slurm_protocol_defs.lo slurm_rlimits_info.lo slurmdb_defs.lo \ slurmdb_pack.lo slurmdbd_defs.lo working_cluster.lo uid.lo \ @@ -423,6 +424,7 @@ libcommon_la_SOURCES = \ xcgroup_read_config.c xcgroup_read_config.h \ xcgroup.c xcgroup.h \ xcpuinfo.c xcpuinfo.h \ + cpu_frequency.c cpu_frequency.h \ assoc_mgr.c assoc_mgr.h \ xmalloc.c xmalloc.h \ xassert.c xassert.h \ @@ -606,6 +608,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bitstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/checkpoint.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpu_frequency.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daemonize.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/env.Plo@am__quote@ diff --git a/src/common/cpu_frequency.c b/src/common/cpu_frequency.c new file mode 100644 index 0000000000..df3bb96817 --- /dev/null +++ b/src/common/cpu_frequency.c @@ -0,0 +1,641 @@ +/*****************************************************************************\ + * cpu_frequency.c - support for srun option --cpu-freq= + ***************************************************************************** + * Copyright (C) 2012 Bull + * Written by Don Albert, + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#if HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include + +#include "slurm/slurm.h" +#include "src/common/xcpuinfo.h" +#include "src/common/slurm_protocol_defs.h" +#include "src/common/xmalloc.h" +#include "src/common/xstring.h" +#include "src/common/cpu_frequency.h" + + + +#define PATH_TO_CPU "/sys/devices/system/cpu/" +#define LINE_LEN 100 +#define SYSFS_PATH_MAX 255 +#define FREQ_LIST_MAX 16 +#define GOV_NAME_LEN 24 + +static uint16_t cpu_freq_count = 0; +static struct cpu_freq_data { + uint32_t frequency_to_set; + uint32_t reset_frequency; + char reset_governor[GOV_NAME_LEN]; +} * cpufreq = NULL; + +static void _cpu_freq_find_valid(uint32_t cpu_freq, int cpuidx); +static uint16_t _cpu_freq_next_cpu(char **core_range, uint16_t *cpuidx, + uint16_t *start, uint16_t *end); + + + +/* + * called to check if the node supports setting cpu frequency + * if so, initialize fields in cpu_freq_data structure + */ +void +cpu_freq_init(slurmd_conf_t *conf) +{ + char path[SYSFS_PATH_MAX]; + struct stat statbuf; + FILE *fp; + char value[LINE_LEN]; + unsigned int i; + + /* check for cpufreq support */ + if ( stat(PATH_TO_CPU "cpu0/cpufreq", &statbuf) != 0 ) { + info("CPU frequency setting not configured for this node"); + return; + } + + if (!S_ISDIR(statbuf.st_mode)) { + error(PATH_TO_CPU "cpu0/cpufreq not a directory"); + return; + } + + /* get the cpu frequency info into the cpu_freq_data structure */ + cpu_freq_count = conf->block_map_size; + cpufreq = (struct cpu_freq_data *) xmalloc(cpu_freq_count * + sizeof(struct cpu_freq_data)); + + info("Gathering cpu frequency information for %u cpus", cpu_freq_count); + for (i = 0; i < cpu_freq_count; i++) { + + cpufreq[i].frequency_to_set = 0; + cpufreq[i].reset_frequency = 0; + + snprintf(path, sizeof(path), + PATH_TO_CPU + "cpu%u/cpufreq/scaling_available_governors", i); + if ( ( fp = fopen(path, "r") ) == NULL ) + continue; + if (fgets(value, LINE_LEN, fp) == NULL){ + fclose(fp); + continue; + } + if (strstr(value, "userspace") == NULL){ + fclose(fp); + continue; + } + fclose(fp); + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_governor", i); + if ( ( fp = fopen(path, "r") ) == NULL ) + continue; + if (fgets(value, LINE_LEN, fp) == NULL) { + fclose(fp); + continue; + } + if (strlen(value) >= GOV_NAME_LEN) { + fclose(fp); + continue; + } + strcpy(cpufreq[i].reset_governor, value); + fclose(fp); + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_min_freq", i); + if ( ( fp = fopen(path, "r") ) == NULL ) + continue; + if (fscanf (fp, "%u", &cpufreq[i].reset_frequency) < 0) { + error("cpu_freq_cgroup_valid: Could not read " + "scaling_min_freq"); + } + fclose(fp); + + debug("cpu_freq_init: cpu %u, reset freq: %u, " + "reset governor: %s", + i,cpufreq[i].reset_frequency,cpufreq[i].reset_governor); + } + return; +} + + +/* + * Send the cpu_frequency table info to slurmstepd + */ +void +cpu_freq_send_info(int fd) { + + if (cpu_freq_count) { + safe_write(fd, &cpu_freq_count, sizeof(uint16_t)); + safe_write(fd, cpufreq, + (cpu_freq_count * sizeof(struct cpu_freq_data))); + } else { + safe_write(fd, &cpu_freq_count, sizeof(uint16_t)); + } + return; +rwfail: + error("Unable to send cpu frequency information for %u cpus", + cpu_freq_count); + return; +} + + +/* + * Receive the cpu_frequency table info from slurmd + */ +void +cpu_freq_recv_info(int fd) { + + safe_read(fd, &cpu_freq_count, sizeof(uint16_t)); + + if (cpu_freq_count) { + cpufreq = (struct cpu_freq_data *) + xmalloc(cpu_freq_count * sizeof(struct cpu_freq_data)); + safe_read(fd, cpufreq, + (cpu_freq_count * sizeof(struct cpu_freq_data))); + info("Received cpu frequency information for %u cpus", + cpu_freq_count); + } + return; +rwfail: + error("Unable to recv cpu frequency information for %u cpus", + cpu_freq_count); + cpu_freq_count = 0; + return; +} + + +/* + * Validate the cpus and select the frequency to set + * Called from task cpuset code with task launch request containing + * a pointer to a hex map string of the cpus to be used by this step + */ +void +cpu_freq_cpuset_validate(slurmd_job_t *job) { + + int cpuidx; + bitstr_t *cpus_to_set; + bitstr_t *cpu_map; + char *cpu_bind; + char *cpu_str; + char *savestr = NULL; + + debug2("cpu_freq_cpuset_validate: request = %12d %8x", + job->cpu_freq, job->cpu_freq); + debug2(" jobid=%u, stepid=%u, tasks=%u cpu/task=%u, cpus=%u", + job->jobid,job->stepid,job->node_tasks, + job->cpus_per_task,job->cpus); + debug2(" cpu_bind_type=%4x, cpu_bind map=%s", + job->cpu_bind_type,job->cpu_bind); + + if (!cpu_freq_count) + return; + + if (job->cpu_bind == NULL) { + error("cpu_freq_cpuset_validate: cpu_bind string is null"); + return; + } + cpu_bind = xstrdup(job->cpu_bind); + + if ( (cpu_str = strtok_r(cpu_bind, ",", &savestr) ) == NULL) { + error("cpu_freq_cpuset_validate: cpu_bind string invalid"); + xfree(cpu_bind); + return; + } + + cpu_map = (bitstr_t *) bit_alloc(cpu_freq_count); + cpus_to_set = (bitstr_t *) bit_alloc(cpu_freq_count); + + do { + debug3(" cpu_str = %s", cpu_str); + + if (bit_unfmt_hexmask(cpu_map, cpu_str) == -1) { + error("cpu_freq_cpuset_validate: invalid cpu mask %s", + cpu_bind); + bit_free(cpu_map); + bit_free(cpus_to_set); + xfree(cpu_bind); + return; + } + bit_or(cpus_to_set, cpu_map); + } while ( (cpu_str = strtok_r(NULL, ",", &savestr) ) != NULL); + + for (cpuidx=0; cpuidx < cpu_freq_count; cpuidx++) { + + if (bit_test(cpus_to_set, cpuidx)) { + _cpu_freq_find_valid(job->cpu_freq, cpuidx); + } + } + cpu_freq_set(job); + + bit_free(cpu_map); + bit_free(cpus_to_set); + xfree(cpu_bind); + return; +} + + +/* + * Validate the cpus and select the frequency to set + * Called from task cgroup cpuset code with string containing + * the list of cpus to be used by this step + */ +void +cpu_freq_cgroup_validate(slurmd_job_t *job, char *step_alloc_cores) { + + uint16_t start = USHRT_MAX; + uint16_t end = USHRT_MAX; + uint16_t cpuidx = 0; + char *core_range; + + debug2("cpu_freq_cgroup_validate: request value = %12d %8x", + job->cpu_freq, job->cpu_freq); + debug2(" jobid=%u, stepid=%u, tasks=%u cpu/task=%u, cpus=%u", + job->jobid,job->stepid,job->node_tasks, + job->cpus_per_task,job->cpus); + debug2(" cpu_bind_type=%4x, cpu_bind map=%s", + job->cpu_bind_type, job->cpu_bind); + debug2(" step logical cores = %s, step physical cores = %s", + job->step_alloc_cores, step_alloc_cores); + + if (!cpu_freq_count) + return; + + /* set entries in cpu frequency table for this step's cpus */ + core_range = step_alloc_cores; + while ( (cpuidx = _cpu_freq_next_cpu(&core_range, &cpuidx, + &start, &end)) != USHRT_MAX) { + if (cpuidx >= cpu_freq_count) { + error("cpu_freq_validate: index %u exceeds cpu count %u", + cpuidx, cpu_freq_count); + return; + } + _cpu_freq_find_valid(job->cpu_freq, cpuidx); + } + cpu_freq_set(job); + return; +} + + +/* + * get the next number in a range + * assumes range is well-formed, i.e., monotonically increasing, + * no leading/trailing punctuation, either comma separated or dash + * separated: e.g., "4-6,8,10,13-15" + */ +uint16_t +_cpu_freq_next_cpu(char **core_range, uint16_t *cpuidx, + uint16_t *start, uint16_t *end) { + + int i; + char *p; + + p = *core_range; + + if (*start == USHRT_MAX) { + if (*p == '\0') + return USHRT_MAX; + if (*p == ',') + p++; + + i = 0; + while ( isdigit(*p) ) { + i = i*10 + (*p - '0'); + p++; + } + *core_range = p; + *start = i; + return i; + } + + if (*end == USHRT_MAX) { + switch (*p) + { + case '-' : + p++; + i = 0; + while ( isdigit(*p) ) { + i = i*10 + (*p - '0'); + p++; + } + *core_range = p; + *end = i; + break; + + case ',': + p++; + i = 0; + while ( isdigit(*p) ) { + i = i*10 + (*p - '0'); + p++; + } + *start = i; + *end = USHRT_MAX; + *core_range = p; + return i; + + case '\0' : + return USHRT_MAX; + } + } + + i = *cpuidx; + if ( i < *end ) { + i++; + if ( i == *end) { + *start = USHRT_MAX; + *end = USHRT_MAX; + } + } + return i; +} + +/* + * Compute the right frequency value to set, based on request + * + * input: job record containing cpu frequency parameter + * input: index to current cpu entry in cpu_freq_data table + * + * sets "frequency_to_set" table entry if valid value found + */ +void +_cpu_freq_find_valid(uint32_t cpu_freq, int cpuidx) { + + unsigned int j, freq_med = 0; + uint32_t freq_list[FREQ_LIST_MAX]; + char path[SYSFS_PATH_MAX]; + FILE *fp; + + /* see if user requested "high" "medium" or "low" */ + if (cpu_freq & CPU_FREQ_RANGE_FLAG) { + + switch(cpu_freq) + { + case CPU_FREQ_LOW : + /* get the value from scale min freq */ + snprintf(path, sizeof(path), + PATH_TO_CPU + "cpu%u/cpufreq/scaling_min_freq", cpuidx); + if ( ( fp = fopen(path, "r") ) == NULL ) { + error("cpu_freq_cgroup_valid: Could not open " + "scaling_min_freq"); + return; + } + if (fscanf (fp, "%u", + &cpufreq[cpuidx].frequency_to_set) < 1) { + error("cpu_freq_cgroup_valid: Could not read " + "scaling_min_freq"); + } + break; + + + case CPU_FREQ_MEDIUM : + snprintf(path, sizeof(path), + PATH_TO_CPU + "cpu%u/cpufreq/scaling_available_frequencies", + cpuidx); + if ( ( fp = fopen(path, "r") ) == NULL ) { + error("cpu_freq_cgroup_valid: Could not open " + "scaling_available_frequencies"); + return; + } + for (j = 0; j < FREQ_LIST_MAX; j++) { + if ( fscanf(fp, "%u", &freq_list[j]) == EOF) + break; + freq_med = (j + 1) / 2; + } + cpufreq[cpuidx].frequency_to_set = freq_list[freq_med]; + break; + + + case CPU_FREQ_HIGH : + /* get the value from scale max freq */ + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_max_freq", + cpuidx); + if ( ( fp = fopen(path, "r") ) == NULL ) { + error("cpu_freq_cgroup_valid: Could not open " + "scaling_max_freq"); + return; + } + if (fscanf (fp, "%u", + &cpufreq[cpuidx].frequency_to_set) < 1) { + error("cpu_freq_cgroup_valid: Could not read " + "scaling_max_freq"); + } + break; + + default : + error("cpu_freq_cgroup_valid: " + "invalid cpu_freq value %u", cpu_freq); + return; + } + fclose(fp); + + } else { + /* find legal value close to requested value */ + snprintf(path, sizeof(path), + PATH_TO_CPU + "cpu%u/cpufreq/scaling_available_frequencies", cpuidx); + if ( ( fp = fopen(path, "r") ) == NULL ) + return; + for (j = 0; j < FREQ_LIST_MAX; j++) { + + if ( fscanf(fp, "%u", &freq_list[j]) == EOF) + break; + if (cpu_freq == freq_list[j]) { + cpufreq[cpuidx].frequency_to_set = freq_list[j]; + break; + } + if (j > 0) { + if (freq_list[j] > freq_list[j-1] ) { + /* ascending order */ + if ((cpu_freq > freq_list[j-1]) && + (cpu_freq < freq_list[j])) { + cpufreq[cpuidx].frequency_to_set = + freq_list[j]; + break; + } + } else { + /* descending order */ + if ((cpu_freq > freq_list[j]) && + (cpu_freq < freq_list[j-1])) { + cpufreq[cpuidx].frequency_to_set = + freq_list[j]; + break; + } + } + } + } + fclose(fp); + } + + debug3("cpu_freq_cgroup_validate: cpu %u, frequency to set: %u", + cpuidx, cpufreq[cpuidx].frequency_to_set); + + return; +} + + +/* + * verify cpu_freq parameter + * + * in addition to a numeric frequency value, we allow the user + * to specify "low", "medium", or "high" frequency + * + * returns -1 on error, 0 otherwise + */ +int +cpu_freq_verify_param(const char *arg, uint32_t *cpu_freq) { + + char *end; + uint32_t frequency; + + if (arg == NULL) { + return 0; + } + + if ( (frequency = strtoul(arg, &end, 10) )) { + *cpu_freq = frequency; + return 0; + } + + if (strncasecmp(arg, "lo", 2) == 0) { + *cpu_freq = CPU_FREQ_LOW; + return 0; + } else if (strncasecmp(arg, "hi", 2) == 0) { + *cpu_freq = CPU_FREQ_HIGH; + return 0; + } else if (strncasecmp(arg, "med", 3) == 0) { + *cpu_freq = CPU_FREQ_MEDIUM; + return 0; + } + + error("unrecognized --cpu-freq argument \"%s\"", arg); + return -1; +} + + +/* + * set cpu frequency if possible for each cpu of the job step + */ +void +cpu_freq_set(slurmd_job_t *job) +{ + char path[SYSFS_PATH_MAX]; + FILE *fp; + char value[LINE_LEN]; + unsigned int i,j; + + if ((!cpu_freq_count) || (!cpufreq)) + return; + + j = 0; + for (i = 0; i < cpu_freq_count; i++) { + + if (cpufreq[i].frequency_to_set == 0) + continue; + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_governor", i); + if ( ( fp = fopen(path, "w") ) == NULL ) + continue; + fputs("userspace\n", fp); + fclose(fp); + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_setspeed", i); + snprintf(value, LINE_LEN, "%u", cpufreq[i].frequency_to_set); + + if ( ( fp = fopen(path, "w") ) == NULL ) + continue; + fputs(value, fp); + fclose(fp); + + j++; + debug2("cpu_freq_set: cpu %u, frequency: %u", + i,cpufreq[i].frequency_to_set); + } + debug("cpu_freq_set: #cpus set = %u", j); +} + +/* + * reset the cpus used by the process to their + * default frequency and governor type + */ +void +cpu_freq_reset(slurmd_job_t *job) +{ + char path[SYSFS_PATH_MAX]; + FILE *fp; + char value[LINE_LEN]; + unsigned int i,j; + + if ((!cpu_freq_count) || (!cpufreq)) + return; + + j = 0; + for (i = 0; i < cpu_freq_count; i++) { + + if (cpufreq[i].frequency_to_set == 0) + continue; + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_setspeed", i); + snprintf(value, LINE_LEN, "%u", cpufreq[i].reset_frequency); + + if ( ( fp = fopen(path, "w") ) == NULL ) + continue; + fputs(value, fp); + fclose(fp); + + snprintf(path, sizeof(path), + PATH_TO_CPU "cpu%u/cpufreq/scaling_governor", i); + if ( ( fp = fopen(path, "w") ) == NULL ) + continue; + fputs(cpufreq[i].reset_governor, fp); + fclose(fp); + + j++; + debug3("cpu_freq_reset: " + "cpu %u, frequency reset: %u, governor reset: %s", + i,cpufreq[i].reset_frequency,cpufreq[i].reset_governor); + } + debug("cpu_freq_reset: #cpus reset = %u", j); +} diff --git a/src/common/cpu_frequency.h b/src/common/cpu_frequency.h new file mode 100644 index 0000000000..6b74777ea9 --- /dev/null +++ b/src/common/cpu_frequency.h @@ -0,0 +1,101 @@ +/*****************************************************************************\ + * cpu_frequency.h - Define cpu frequency control functions + ***************************************************************************** + * Copyright (C) 2012 Bull + * Written by Don Albert, + * + * This file is part of SLURM, a resource management program. + * For details, see . + * Please also read the included file: DISCLAIMER. + * + * SLURM is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2 of the License, or (at your option) + * any later version. + * + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do + * so. If you do not wish to do so, delete this exception statement from your + * version. If you delete this exception statement from all source files in + * the program, then also delete it here. + * + * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY + * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License along + * with SLURM; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +\*****************************************************************************/ + +#ifndef _CPU_FREQUENCY_H_ +#define _CPU_FREQUENCY_H_ + +#include "src/slurmd/slurmd/slurmd.h" +#include "src/slurmd/slurmstepd/slurmstepd_job.h" + +/* + * check if cpu frequency setting is allowed on this node + * if so, create and initialize the cpu frequency table entry for each cpu + */ +void +cpu_freq_init(slurmd_conf_t *conf); + +/* + * Send the cpu_frequency table info to slurmstepd + */ +void +cpu_freq_send_info(int fd); + +/* + * Receive the cpu_frequency table info from slurmd + */ +void +cpu_freq_recv_info(int fd); + +/* + * Validate the cpus and select the frequency to set + * Called from task cpuset code with job record containing + * a pointer to a hex map of the cpus to be used by this step + */ +void +cpu_freq_cpuset_validate(slurmd_job_t *job); + +/* + * Validate the cpus and select the frequency to set + * Called from task cgroup cpuset code with string containing + * the list of cpus to be used by this step + */ +void +cpu_freq_cgroup_validate(slurmd_job_t *job, char *step_alloc_cores); + +/* + * verify cpu_freq parameter + * + * in addition to a numeric frequency value, we allow the user + * to specify "low", "medium", or "high" frequency + * + * returns -1 on error, 0 otherwise + */ +int +cpu_freq_verify_param(const char *arg, uint32_t *cpu_freq); + +/* + * set the userspace governor and the new frequency value + */ +void +cpu_freq_set(slurmd_job_t *job); + +/* + * reset the governor and cpu frequency to the configured values + */ +void +cpu_freq_reset(slurmd_job_t *job); + +#endif /* _CPU_FREQUENCY_H_ */ diff --git a/src/common/env.c b/src/common/env.c index eddf3dad24..de9099fe39 100644 --- a/src/common/env.c +++ b/src/common/env.c @@ -655,6 +655,37 @@ int setup_env(env_t *env, bool preserve_env) } } + if (env->cpu_freq != NO_VAL) { + int sts; + char *str; + + if (env->cpu_freq & CPU_FREQ_RANGE_FLAG) { + switch (env->cpu_freq) + { + case CPU_FREQ_LOW : + str="low"; + break; + case CPU_FREQ_MEDIUM : + str="medium"; + break; + case CPU_FREQ_HIGH : + str="high"; + break; + default : + str="unknown"; + break; + } + sts = setenvf(&env->env, "SLURM_CPU_FREQ_REQ", str); + } else { + sts = setenvf(&env->env, "SLURM_CPU_FREQ_REQ", "%d", + env->cpu_freq); + } + if (sts) { + error("Unable to set SLURM_CPU_FREQ_REQ"); + rc = SLURM_FAILURE; + } + } + if (env->overcommit && (setenvf(&env->env, "SLURM_OVERCOMMIT", "1"))) { error("Unable to set SLURM_OVERCOMMIT environment variable"); diff --git a/src/common/env.h b/src/common/env.h index 53531f7fbd..eeb1f8a3b0 100644 --- a/src/common/env.h +++ b/src/common/env.h @@ -45,6 +45,7 @@ typedef struct env_options { cpu_bind_type_t cpu_bind_type; /* --cpu_bind= */ char *cpu_bind; /* binding map for map/mask_cpu */ + uint32_t cpu_freq; /* cpu_frequency requested */ mem_bind_type_t mem_bind_type; /* --mem_bind= */ char *mem_bind; /* binding map for tasks to memory */ diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index 1d2f2b6276..a993f11deb 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -597,6 +597,7 @@ typedef struct job_step_specs { uint16_t ckpt_interval; /* checkpoint creation interval (minutes) */ char *ckpt_dir; /* path to store checkpoint image files */ uint32_t cpu_count; /* count of required processors */ + uint32_t cpu_freq; /* requested cpu frequency */ uint16_t exclusive; /* 1 if CPUs not shared with other steps */ char *features; /* required node features, default NONE */ char *gres; /* generic resources required */ @@ -676,6 +677,7 @@ typedef struct launch_tasks_request_msg { uint8_t open_mode; /* stdout/err append or truncate */ uint8_t pty; /* use pseudo tty */ uint16_t acctg_freq; /* accounting polling interval */ + uint32_t cpu_freq; /* requested cpu frequency */ /********** START "normal" IO only options **********/ /* These options are ignored if user_managed_io is 1 */ @@ -808,6 +810,7 @@ typedef struct batch_job_launch_msg { * real memory per CPU | MEM_PER_CPU, * default=0 (no limit) */ uint16_t acctg_freq; /* accounting polling interval */ + uint32_t cpu_freq; /* requested cpu frequency */ uint32_t job_mem; /* memory limit for job */ uint16_t restart_cnt; /* batch job restart count */ char **spank_job_env; /* SPANK job environment variables */ diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index 7db22bc7ee..d4780d5322 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -3405,7 +3405,37 @@ _pack_job_step_create_request_msg(job_step_create_request_msg_t { xassert(msg != NULL); - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack32(msg->job_id, buffer); + pack32(msg->user_id, buffer); + pack32(msg->min_nodes, buffer); + pack32(msg->max_nodes, buffer); + pack32(msg->cpu_count, buffer); + pack32(msg->cpu_freq, buffer); + pack32(msg->num_tasks, buffer); + pack32(msg->mem_per_cpu, buffer); + pack32(msg->time_limit, buffer); + + pack16(msg->relative, buffer); + pack16(msg->task_dist, buffer); + pack16(msg->plane_size, buffer); + pack16(msg->port, buffer); + pack16(msg->ckpt_interval, buffer); + pack16(msg->exclusive, buffer); + pack16(msg->immediate, buffer); + pack16(msg->resv_port_cnt, buffer); + + packstr(msg->host, buffer); + packstr(msg->name, buffer); + packstr(msg->network, buffer); + packstr(msg->node_list, buffer); + packstr(msg->ckpt_dir, buffer); + packstr(msg->features, buffer); + packstr(msg->gres, buffer); + + pack8(msg->no_kill, buffer); + pack8(msg->overcommit, buffer); + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { pack32(msg->job_id, buffer); pack32(msg->user_id, buffer); pack32(msg->min_nodes, buffer); @@ -3477,7 +3507,41 @@ _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg, tmp_ptr = xmalloc(sizeof(job_step_create_request_msg_t)); *msg = tmp_ptr; - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack32(&(tmp_ptr->job_id), buffer); + safe_unpack32(&(tmp_ptr->user_id), buffer); + safe_unpack32(&(tmp_ptr->min_nodes), buffer); + safe_unpack32(&(tmp_ptr->max_nodes), buffer); + safe_unpack32(&(tmp_ptr->cpu_count), buffer); + safe_unpack32(&(tmp_ptr->cpu_freq), buffer); + safe_unpack32(&(tmp_ptr->num_tasks), buffer); + safe_unpack32(&(tmp_ptr->mem_per_cpu), buffer); + safe_unpack32(&(tmp_ptr->time_limit), buffer); + + safe_unpack16(&(tmp_ptr->relative), buffer); + safe_unpack16(&(tmp_ptr->task_dist), buffer); + safe_unpack16(&(tmp_ptr->plane_size), buffer); + safe_unpack16(&(tmp_ptr->port), buffer); + safe_unpack16(&(tmp_ptr->ckpt_interval), buffer); + safe_unpack16(&(tmp_ptr->exclusive), buffer); + safe_unpack16(&(tmp_ptr->immediate), buffer); + safe_unpack16(&(tmp_ptr->resv_port_cnt), buffer); + + safe_unpackstr_xmalloc(&(tmp_ptr->host), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->name), &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->network), &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->node_list), &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->ckpt_dir), &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->features), &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&(tmp_ptr->gres), &uint32_tmp, buffer); + + safe_unpack8(&(tmp_ptr->no_kill), buffer); + safe_unpack8(&(tmp_ptr->overcommit), buffer); + } else if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { safe_unpack32(&(tmp_ptr->job_id), buffer); safe_unpack32(&(tmp_ptr->user_id), buffer); safe_unpack32(&(tmp_ptr->min_nodes), buffer); @@ -4088,7 +4152,37 @@ _unpack_job_step_info_members(job_step_info_t * step, Buf buffer, uint32_t uint32_tmp = 0; char *node_inx_str; - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack32(&step->job_id, buffer); + safe_unpack32(&step->step_id, buffer); + safe_unpack16(&step->ckpt_interval, buffer); + safe_unpack32(&step->user_id, buffer); + safe_unpack32(&step->num_cpus, buffer); + safe_unpack32(&step->cpu_freq, buffer); + safe_unpack32(&step->num_tasks, buffer); + safe_unpack32(&step->time_limit, buffer); + + safe_unpack_time(&step->start_time, buffer); + safe_unpack_time(&step->run_time, buffer); + + safe_unpackstr_xmalloc(&step->partition, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->resv_ports, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->network, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->ckpt_dir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&step->gres, &uint32_tmp, buffer); + if (node_inx_str == NULL) + step->node_inx = bitfmt2int(""); + else { + step->node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + if (select_g_select_jobinfo_unpack(&step->select_jobinfo, + buffer, protocol_version)) + goto unpack_error; + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpack32(&step->job_id, buffer); safe_unpack32(&step->step_id, buffer); safe_unpack16(&step->ckpt_interval, buffer); @@ -8115,7 +8209,79 @@ _pack_launch_tasks_request_msg(launch_tasks_request_msg_t * msg, Buf buffer, int i = 0; xassert(msg != NULL); - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack32(msg->job_id, buffer); + pack32(msg->job_step_id, buffer); + pack32(msg->ntasks, buffer); + pack32(msg->uid, buffer); + pack32(msg->gid, buffer); + pack32(msg->job_mem_lim, buffer); + pack32(msg->step_mem_lim, buffer); + + pack32(msg->nnodes, buffer); + pack16(msg->cpus_per_task, buffer); + pack16(msg->task_dist, buffer); + + slurm_cred_pack(msg->cred, buffer); + for (i = 0; i < msg->nnodes; i++) { + pack16(msg->tasks_to_launch[i], buffer); + pack16(msg->cpus_allocated[i], buffer); + pack32_array(msg->global_task_ids[i], + (uint32_t) msg->tasks_to_launch[i], + buffer); + } + pack16(msg->num_resp_port, buffer); + for (i = 0; i < msg->num_resp_port; i++) + pack16(msg->resp_port[i], buffer); + slurm_pack_slurm_addr(&msg->orig_addr, buffer); + packstr_array(msg->env, msg->envc, buffer); + packstr_array(msg->spank_job_env, msg->spank_job_env_size, + buffer); + packstr(msg->cwd, buffer); + pack16(msg->cpu_bind_type, buffer); + packstr(msg->cpu_bind, buffer); + pack16(msg->mem_bind_type, buffer); + packstr(msg->mem_bind, buffer); + packstr_array(msg->argv, msg->argc, buffer); + pack16(msg->task_flags, buffer); + pack16(msg->multi_prog, buffer); + pack16(msg->user_managed_io, buffer); + if (msg->user_managed_io == 0) { + packstr(msg->ofname, buffer); + packstr(msg->efname, buffer); + packstr(msg->ifname, buffer); + pack8(msg->buffered_stdio, buffer); + pack8(msg->labelio, buffer); + pack16(msg->num_io_port, buffer); + for (i = 0; i < msg->num_io_port; i++) + pack16(msg->io_port[i], buffer); + } + packstr(msg->task_prolog, buffer); + packstr(msg->task_epilog, buffer); + pack16(msg->slurmd_debug, buffer); + switch_pack_jobinfo(msg->switch_job, buffer); + job_options_pack(msg->options, buffer); + packstr(msg->alias_list, buffer); + packstr(msg->complete_nodelist, buffer); + + pack8(msg->open_mode, buffer); + pack8(msg->pty, buffer); + pack16(msg->acctg_freq, buffer); + pack32(msg->cpu_freq, buffer); + packstr(msg->ckpt_dir, buffer); + packstr(msg->restart_dir, buffer); + if (!(cluster_flags & CLUSTER_FLAG_BG)) { + /* If on a Blue Gene cluster do not send this to the + * slurmstepd, it will overwrite the environment that + * ia already set up correctly for both the job and the + * step. The slurmstep treats this select_jobinfo as if + * were for the job instead of for the step. + */ + select_g_select_jobinfo_pack(msg->select_jobinfo, + buffer, + protocol_version); + } + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { pack32(msg->job_id, buffer); pack32(msg->job_step_id, buffer); pack32(msg->ntasks, buffer); @@ -8391,7 +8557,103 @@ _unpack_launch_tasks_request_msg(launch_tasks_request_msg_t ** msg = xmalloc(sizeof(launch_tasks_request_msg_t)); *msg_ptr = msg; - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack32(&msg->job_id, buffer); + safe_unpack32(&msg->job_step_id, buffer); + safe_unpack32(&msg->ntasks, buffer); + safe_unpack32(&msg->uid, buffer); + safe_unpack32(&msg->gid, buffer); + safe_unpack32(&msg->job_mem_lim, buffer); + safe_unpack32(&msg->step_mem_lim, buffer); + + safe_unpack32(&msg->nnodes, buffer); + safe_unpack16(&msg->cpus_per_task, buffer); + safe_unpack16(&msg->task_dist, buffer); + + if (!(msg->cred = slurm_cred_unpack(buffer, protocol_version))) + goto unpack_error; + msg->tasks_to_launch = xmalloc(sizeof(uint16_t) * msg->nnodes); + msg->cpus_allocated = xmalloc(sizeof(uint16_t) * msg->nnodes); + msg->global_task_ids = xmalloc(sizeof(uint32_t *) * + msg->nnodes); + for (i = 0; i < msg->nnodes; i++) { + safe_unpack16(&msg->tasks_to_launch[i], buffer); + safe_unpack16(&msg->cpus_allocated[i], buffer); + safe_unpack32_array(&msg->global_task_ids[i], + &uint32_tmp, + buffer); + if (msg->tasks_to_launch[i] != (uint16_t) uint32_tmp) + goto unpack_error; + } + safe_unpack16(&msg->num_resp_port, buffer); + if (msg->num_resp_port > 0) { + msg->resp_port = xmalloc(sizeof(uint16_t) * + msg->num_resp_port); + for (i = 0; i < msg->num_resp_port; i++) + safe_unpack16(&msg->resp_port[i], buffer); + } + slurm_unpack_slurm_addr_no_alloc(&msg->orig_addr, buffer); + safe_unpackstr_array(&msg->env, &msg->envc, buffer); + safe_unpackstr_array(&msg->spank_job_env, + &msg->spank_job_env_size, buffer); + safe_unpackstr_xmalloc(&msg->cwd, &uint32_tmp, buffer); + safe_unpack16(&msg->cpu_bind_type, buffer); + safe_unpackstr_xmalloc(&msg->cpu_bind, &uint32_tmp, buffer); + safe_unpack16(&msg->mem_bind_type, buffer); + safe_unpackstr_xmalloc(&msg->mem_bind, &uint32_tmp, buffer); + safe_unpackstr_array(&msg->argv, &msg->argc, buffer); + safe_unpack16(&msg->task_flags, buffer); + safe_unpack16(&msg->multi_prog, buffer); + safe_unpack16(&msg->user_managed_io, buffer); + if (msg->user_managed_io == 0) { + safe_unpackstr_xmalloc(&msg->ofname, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&msg->efname, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&msg->ifname, &uint32_tmp, + buffer); + safe_unpack8(&msg->buffered_stdio, buffer); + safe_unpack8(&msg->labelio, buffer); + safe_unpack16(&msg->num_io_port, buffer); + if (msg->num_io_port > 0) { + msg->io_port = xmalloc(sizeof(uint16_t) * + msg->num_io_port); + for (i = 0; i < msg->num_io_port; i++) + safe_unpack16(&msg->io_port[i], + buffer); + } + } + safe_unpackstr_xmalloc(&msg->task_prolog, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->task_epilog, &uint32_tmp, buffer); + safe_unpack16(&msg->slurmd_debug, buffer); + + switch_alloc_jobinfo(&msg->switch_job); + if (switch_unpack_jobinfo(msg->switch_job, buffer) < 0) { + error("switch_unpack_jobinfo: %m"); + switch_free_jobinfo(msg->switch_job); + goto unpack_error; + } + msg->options = job_options_create(); + if (job_options_unpack(msg->options, buffer) < 0) { + error("Unable to unpack extra job options: %m"); + goto unpack_error; + } + safe_unpackstr_xmalloc(&msg->alias_list, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->complete_nodelist, &uint32_tmp, + buffer); + + safe_unpack8(&msg->open_mode, buffer); + safe_unpack8(&msg->pty, buffer); + safe_unpack16(&msg->acctg_freq, buffer); + safe_unpack32(&msg->cpu_freq, buffer); + safe_unpackstr_xmalloc(&msg->ckpt_dir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->restart_dir, &uint32_tmp, buffer); + if (!(cluster_flags & CLUSTER_FLAG_BG)) { + select_g_select_jobinfo_unpack(&msg->select_jobinfo, + buffer, + protocol_version); + } + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { safe_unpack32(&msg->job_id, buffer); safe_unpack32(&msg->job_step_id, buffer); safe_unpack32(&msg->ntasks, buffer); diff --git a/src/plugins/launch/slurm/launch_slurm.c b/src/plugins/launch/slurm/launch_slurm.c index 218ef81e87..597da9843e 100644 --- a/src/plugins/launch/slurm/launch_slurm.c +++ b/src/plugins/launch/slurm/launch_slurm.c @@ -429,6 +429,7 @@ extern int launch_p_step_launch( launch_params.cpus_per_task = opt.cpus_per_task; else launch_params.cpus_per_task = 1; + launch_params.cpu_freq = opt.cpu_freq; launch_params.task_dist = opt.distribution; launch_params.ckpt_dir = opt.ckpt_dir; launch_params.restart_dir = opt.restart_dir; diff --git a/src/plugins/task/affinity/affinity.h b/src/plugins/task/affinity/affinity.h index 74a62df8c8..0a4ac46a4d 100644 --- a/src/plugins/task/affinity/affinity.h +++ b/src/plugins/task/affinity/affinity.h @@ -81,6 +81,7 @@ #include "src/slurmd/slurmstepd/slurmstepd_job.h" #include "src/common/cbuf.h" +#include "src/common/cpu_frequency.h" #include "src/common/hostlist.h" #include "src/common/log.h" #include "src/common/node_select.h" diff --git a/src/plugins/task/affinity/task_affinity.c b/src/plugins/task/affinity/task_affinity.c index 1e4ad92344..ee90ec14ed 100644 --- a/src/plugins/task/affinity/task_affinity.c +++ b/src/plugins/task/affinity/task_affinity.c @@ -300,6 +300,7 @@ extern int task_slurmd_release_resources (uint32_t job_id) extern int task_pre_setuid (slurmd_job_t *job) { char path[PATH_MAX]; + int rc; if (!(conf->task_plugin_param & CPU_BIND_CPUSETS)) return SLURM_SUCCESS; @@ -319,7 +320,14 @@ extern int task_pre_setuid (slurmd_job_t *job) return SLURM_ERROR; } #endif - return slurm_build_cpuset(CPUSET_DIR, path, job->uid, job->gid); + + rc = slurm_build_cpuset(CPUSET_DIR, path, job->uid, job->gid); + + /* if cpuset was built ok, check for cpu frequency setting */ + if ( !(rc) && (job->cpu_freq != NO_VAL)) + cpu_freq_cpuset_validate(job); + + return rc; } /* diff --git a/src/plugins/task/cgroup/task_cgroup_cpuset.c b/src/plugins/task/cgroup/task_cgroup_cpuset.c index 8779a7f97a..75ff2e8211 100644 --- a/src/plugins/task/cgroup/task_cgroup_cpuset.c +++ b/src/plugins/task/cgroup/task_cgroup_cpuset.c @@ -48,6 +48,7 @@ #include "slurm/slurm.h" #include "src/slurmd/slurmstepd/slurmstepd_job.h" #include "src/slurmd/slurmd/slurmd.h" +#include "src/common/cpu_frequency.h" #include "src/common/bitstring.h" #include "src/common/xstring.h" @@ -685,6 +686,11 @@ extern int task_cgroup_cpuset_create(slurmd_job_t *job) } else fstatus = SLURM_SUCCESS; + /* validate the requested cpu frequency and set it */ + if (job->cpu_freq != NO_VAL) { + cpu_freq_cgroup_validate(job, step_alloc_cores); + } + error: xcgroup_unlock(&cpuset_cg); xcgroup_destroy(&cpuset_cg); diff --git a/src/slurmctld/slurmctld.h b/src/slurmctld/slurmctld.h index 68f91b52fd..a03673cca8 100644 --- a/src/slurmctld/slurmctld.h +++ b/src/slurmctld/slurmctld.h @@ -633,6 +633,7 @@ struct step_record { * step relative to job's nodes, * see src/common/job_resources.h */ uint32_t cpu_count; /* count of step's CPUs */ + uint32_t cpu_freq; /* requested cpu frequency */ uint16_t cpus_per_task; /* cpus per task initiated */ uint16_t cyclic_alloc; /* set for cyclic task allocation * across nodes */ diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index 27582c928a..d0e71f0261 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -279,12 +279,12 @@ delete_step_record (struct job_record *job_ptr, uint32_t step_id) void dump_step_desc(job_step_create_request_msg_t *step_spec) { - debug3("StepDesc: user_id=%u job_id=%u node_count=%u-%u cpu_count=%u", + debug3("StepDesc: user_id=%u job_id=%u node_count=%u-%u, cpu_count=%u", step_spec->user_id, step_spec->job_id, step_spec->min_nodes, step_spec->max_nodes, step_spec->cpu_count); - debug3(" num_tasks=%u relative=%u task_dist=%u node_list=%s", - step_spec->num_tasks, step_spec->relative, + debug3(" cpu_freq=%u num_tasks=%u relative=%u task_dist=%u node_list=%s", + step_spec->cpu_freq, step_spec->num_tasks, step_spec->relative, step_spec->task_dist, step_spec->node_list); debug3(" host=%s port=%u name=%s network=%s exclusive=%u", step_spec->host, step_spec->port, step_spec->name, @@ -1965,6 +1965,7 @@ step_create(job_step_create_request_msg_t *step_specs, step_ptr->port = step_specs->port; step_ptr->host = xstrdup(step_specs->host); step_ptr->batch_step = batch_step; + step_ptr->cpu_freq = step_specs->cpu_freq; step_ptr->cpus_per_task = (uint16_t)cpus_per_task; step_ptr->mem_per_cpu = step_specs->mem_per_cpu; step_ptr->ckpt_interval = step_specs->ckpt_interval; @@ -2248,7 +2249,38 @@ static void _pack_ctld_job_step_info(struct step_record *step_ptr, Buf buffer, cpu_cnt = step_ptr->cpu_count; #endif - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + pack32(step_ptr->job_ptr->job_id, buffer); + pack32(step_ptr->step_id, buffer); + pack16(step_ptr->ckpt_interval, buffer); + pack32(step_ptr->job_ptr->user_id, buffer); + pack32(cpu_cnt, buffer); + pack32(step_ptr->cpu_freq, buffer); + pack32(task_cnt, buffer); + pack32(step_ptr->time_limit, buffer); + + pack_time(step_ptr->start_time, buffer); + if (IS_JOB_SUSPENDED(step_ptr->job_ptr)) { + run_time = step_ptr->pre_sus_time; + } else { + begin_time = MAX(step_ptr->start_time, + step_ptr->job_ptr->suspend_time); + run_time = step_ptr->pre_sus_time + + difftime(time(NULL), begin_time); + } + pack_time(run_time, buffer); + + packstr(step_ptr->job_ptr->partition, buffer); + packstr(step_ptr->resv_ports, buffer); + packstr(node_list, buffer); + packstr(step_ptr->name, buffer); + packstr(step_ptr->network, buffer); + pack_bit_fmt(pack_bitstr, buffer); + packstr(step_ptr->ckpt_dir, buffer); + packstr(step_ptr->gres, buffer); + select_g_select_jobinfo_pack(step_ptr->select_jobinfo, buffer, + protocol_version); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { pack32(step_ptr->job_ptr->job_id, buffer); pack32(step_ptr->step_id, buffer); pack16(step_ptr->ckpt_interval, buffer); diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index 3d2aa1ac68..a4b2426e22 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -57,6 +57,7 @@ #include #include +#include "src/common/cpu_frequency.h" #include "src/common/env.h" #include "src/common/fd.h" #include "src/common/forward.h" @@ -540,6 +541,9 @@ _send_slurmstepd_init(int fd, slurmd_step_type_t type, void *req, /* Send GRES information to slurmstepd */ gres_plugin_send_stepd(fd); + /* send cpu_frequency info to slurmstepd */ + cpu_freq_send_info(fd); + /* send req over to slurmstepd */ switch(type) { case LAUNCH_BATCH_JOB: diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 663e8006b4..669907a6ae 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -63,6 +63,7 @@ #endif #include "src/common/bitstring.h" +#include "src/common/cpu_frequency.h" #include "src/common/daemonize.h" #include "src/common/fd.h" #include "src/common/forward.h" @@ -1030,6 +1031,12 @@ _reconfigure(void) slurm_topo_build_config(); _set_topo_info(); + /* + * In case the administrator changed the cpu frequency set capabilities + * on this node, rebuild the cpu frequency table information + */ + cpu_freq_init(conf); + _print_conf(); /* @@ -1418,6 +1425,11 @@ _slurmd_init(void) slurm_topo_build_config(); _set_topo_info(); + /* + * Check for cpu frequency set capabilities on this node + */ + cpu_freq_init(conf); + _print_conf(); if (jobacct_gather_init() != SLURM_SUCCESS) return SLURM_FAILURE; diff --git a/src/slurmd/slurmstepd/mgr.c b/src/slurmd/slurmstepd/mgr.c index 7a4065c72a..2c70d45052 100644 --- a/src/slurmd/slurmstepd/mgr.c +++ b/src/slurmd/slurmstepd/mgr.c @@ -85,6 +85,7 @@ #include "slurm/slurm_errno.h" #include "src/common/cbuf.h" +#include "src/common/cpu_frequency.h" #include "src/common/env.h" #include "src/common/fd.h" #include "src/common/forward.h" @@ -1062,9 +1063,17 @@ fail2: if (!job->batch && !job->user_managed_io && io_initialized) _wait_for_io(job); + /* + * Reset cpu frequency if it was changed + */ + + if (job->cpu_freq != NO_VAL) + cpu_freq_reset(job); + /* * Warn task plugin that the user's step have terminated */ + post_step(job); /* diff --git a/src/slurmd/slurmstepd/req.c b/src/slurmd/slurmstepd/req.c index a65ba9ee70..407659cb67 100644 --- a/src/slurmd/slurmstepd/req.c +++ b/src/slurmd/slurmstepd/req.c @@ -49,6 +49,7 @@ #include #include +#include "src/common/cpu_frequency.h" #include "src/common/fd.h" #include "src/common/eio.h" #include "src/common/parse_time.h" @@ -1211,6 +1212,10 @@ _handle_suspend(int fd, slurmd_job_t *job, uid_t uid) } suspended = true; } + /* reset the cpu frequencies if cpu_freq option used */ + if (job->cpu_freq != NO_VAL) + cpu_freq_reset(job); + pthread_mutex_unlock(&suspend_mutex); done: @@ -1267,6 +1272,10 @@ _handle_resume(int fd, slurmd_job_t *job, uid_t uid) } suspended = false; } + /* set the cpu frequencies if cpu_freq option used */ + if (job->cpu_freq != NO_VAL) + cpu_freq_set(job); + pthread_mutex_unlock(&suspend_mutex); done: diff --git a/src/slurmd/slurmstepd/slurmstepd.c b/src/slurmd/slurmstepd/slurmstepd.c index 6287cea27f..1fadd6626e 100644 --- a/src/slurmd/slurmstepd/slurmstepd.c +++ b/src/slurmd/slurmstepd/slurmstepd.c @@ -47,6 +47,7 @@ #include #include +#include "src/common/cpu_frequency.h" #include "src/common/gres.h" #include "src/common/slurm_jobacct_gather.h" #include "src/common/slurm_rlimits_info.h" @@ -429,6 +430,9 @@ _init_from_slurmd(int sock, char **argv, /* Receive GRES information from slurmd */ gres_plugin_recv_stepd(sock); + /* Receive cpu_frequency info from slurmd */ + cpu_freq_recv_info(sock); + /* receive req from slurmd */ safe_read(sock, &len, sizeof(int)); incoming_buffer = xmalloc(sizeof(char) * len); diff --git a/src/slurmd/slurmstepd/slurmstepd_job.c b/src/slurmd/slurmstepd/slurmstepd_job.c index a7f1eecf04..0ece10d9ca 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.c +++ b/src/slurmd/slurmstepd/slurmstepd_job.c @@ -220,6 +220,7 @@ job_create(launch_tasks_request_msg_t *msg) job->cpu_bind = xstrdup(msg->cpu_bind); job->mem_bind_type = msg->mem_bind_type; job->mem_bind = xstrdup(msg->mem_bind); + job->cpu_freq = msg->cpu_freq; job->ckpt_dir = xstrdup(msg->ckpt_dir); job->restart_dir = xstrdup(msg->restart_dir); job->cpus_per_task = msg->cpus_per_task; diff --git a/src/slurmd/slurmstepd/slurmstepd_job.h b/src/slurmd/slurmstepd/slurmstepd_job.h index 32690d2188..a13e18239b 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.h +++ b/src/slurmd/slurmstepd/slurmstepd_job.h @@ -134,6 +134,7 @@ typedef struct slurmd_job { char *cpu_bind; /* binding map for map/mask_cpu */ mem_bind_type_t mem_bind_type; /* --mem_bind= */ char *mem_bind; /* binding map for tasks to memory */ + uint32_t cpu_freq; /* requested cpu frequency */ switch_jobinfo_t *switch_job; /* switch-specific job information */ uid_t uid; /* user id for job */ gid_t gid; /* group ID for job */ diff --git a/src/slurmd/slurmstepd/task.c b/src/slurmd/slurmstepd/task.c index 0137fdc7ed..9b371e75af 100644 --- a/src/slurmd/slurmstepd/task.c +++ b/src/slurmd/slurmstepd/task.c @@ -354,6 +354,7 @@ exec_task(slurmd_job_t *job, int i) job->envtp->distribution = job->task_dist; job->envtp->cpu_bind = xstrdup(job->cpu_bind); job->envtp->cpu_bind_type = job->cpu_bind_type; + job->envtp->cpu_freq = job->cpu_freq; job->envtp->mem_bind = xstrdup(job->mem_bind); job->envtp->mem_bind_type = job->mem_bind_type; job->envtp->distribution = -1; diff --git a/src/srun/libsrun/launch.c b/src/srun/libsrun/launch.c index d79cba9fde..b4abc1478a 100644 --- a/src/srun/libsrun/launch.c +++ b/src/srun/libsrun/launch.c @@ -209,6 +209,7 @@ extern int launch_common_create_job_step(srun_job_t *job, bool use_all_cpus, else job->ctx_params.cpu_count = opt.ntasks; + job->ctx_params.cpu_freq = opt.cpu_freq; job->ctx_params.relative = (uint16_t)opt.relative; job->ctx_params.ckpt_interval = (uint16_t)opt.ckpt_interval; job->ctx_params.ckpt_dir = opt.ckpt_dir; diff --git a/src/srun/libsrun/opt.c b/src/srun/libsrun/opt.c index ffe82930ba..589eb36ce9 100644 --- a/src/srun/libsrun/opt.c +++ b/src/srun/libsrun/opt.c @@ -72,6 +72,7 @@ #include #include +#include "src/common/cpu_frequency.h" #include "src/common/list.h" #include "src/common/log.h" #include "src/common/mpi.h" @@ -119,6 +120,7 @@ #define OPT_WCKEY 0x16 #define OPT_SIGNAL 0x17 #define OPT_TIME_VAL 0x18 +#define OPT_CPU_FREQ 0x19 /* generic getopt_long flags, integers and *not* valid characters */ #define LONG_OPT_HELP 0x100 @@ -186,6 +188,7 @@ #define LONG_OPT_ALPS 0x152 #define LONG_OPT_REQ_SWITCH 0x153 #define LONG_OPT_RUNJOB_OPTS 0x154 +#define LONG_OPT_CPU_FREQ 0x155 extern char **environ; @@ -452,6 +455,7 @@ static void _opt_default() opt.pty = false; opt.open_mode = 0; opt.acctg_freq = -1; + opt.cpu_freq = NO_VAL; opt.reservation = NULL; opt.wckey = NULL; opt.req_switch = -1; @@ -488,6 +492,7 @@ env_vars_t env_vars[] = { {"SLURM_CONN_TYPE", OPT_CONN_TYPE, NULL, NULL }, {"SLURM_CPUS_PER_TASK", OPT_INT, &opt.cpus_per_task, &opt.cpus_set }, {"SLURM_CPU_BIND", OPT_CPU_BIND, NULL, NULL }, +{"SLURM_CPU_FREQ_REQ", OPT_CPU_FREQ, NULL, NULL }, {"SLURM_DEPENDENCY", OPT_STRING, &opt.dependency, NULL }, {"SLURM_DISABLE_STATUS",OPT_INT, &opt.disable_status,NULL }, {"SLURM_DISTRIBUTION", OPT_DISTRIB, NULL, NULL }, @@ -608,6 +613,11 @@ _process_env_var(env_vars_t *e, const char *val) exit(error_exit); break; + case OPT_CPU_FREQ: + if (cpu_freq_verify_param(val, &opt.cpu_freq)) + error("Invalid --cpu-freq argument: %s. Ignored", val); + break; + case OPT_MEM_BIND: if (slurm_verify_mem_bind(val, &opt.mem_bind, &opt.mem_bind_type)) @@ -785,6 +795,7 @@ static void set_options(const int argc, char **argv) {"contiguous", no_argument, 0, LONG_OPT_CONT}, {"cores-per-socket", required_argument, 0, LONG_OPT_CORESPERSOCKET}, {"cpu_bind", required_argument, 0, LONG_OPT_CPU_BIND}, + {"cpu-freq", required_argument, 0, LONG_OPT_CPU_FREQ}, {"debugger-test", no_argument, 0, LONG_OPT_DEBUG_TS}, {"epilog", required_argument, 0, LONG_OPT_EPILOG}, {"exclusive", no_argument, 0, LONG_OPT_EXCLUSIVE}, @@ -1439,6 +1450,11 @@ static void set_options(const int argc, char **argv) opt.acctg_freq = _get_int(optarg, "acctg-freq", false); break; + case LONG_OPT_CPU_FREQ: + if (cpu_freq_verify_param(optarg, &opt.cpu_freq)) + error("Invalid --cpu-freq argument: %s. Ignored", + optarg); + break; case LONG_OPT_WCKEY: xfree(opt.wckey); opt.wckey = xstrdup(optarg); @@ -2318,6 +2334,7 @@ static void _opt_list(void) opt.cpu_bind == NULL ? "default" : opt.cpu_bind); info("mem_bind : %s", opt.mem_bind == NULL ? "default" : opt.mem_bind); + info("cpu_freq : %u", opt.cpu_freq); info("verbose : %d", _verbose); info("slurmd_debug : %d", opt.slurmd_debug); if (opt.immediate <= 1) diff --git a/src/srun/libsrun/opt.h b/src/srun/libsrun/opt.h index 5cb469f1a8..030828b690 100644 --- a/src/srun/libsrun/opt.h +++ b/src/srun/libsrun/opt.h @@ -215,6 +215,7 @@ typedef struct srun_options { char *mail_user; /* --mail-user */ uint8_t open_mode; /* --open-mode=append|truncate */ int acctg_freq; /* --acctg-freq=secs */ + uint32_t cpu_freq; /* --cpu_freq=kilohertz */ bool pty; /* --pty */ char *restart_dir; /* --restart */ int argc; /* length of argv array */ diff --git a/src/srun/srun.c b/src/srun/srun.c index eeca6ca072..1d23f201cc 100644 --- a/src/srun/srun.c +++ b/src/srun/srun.c @@ -211,6 +211,7 @@ int srun(int ac, char **av) env->plane_size = opt.plane_size; env->cpu_bind_type = opt.cpu_bind_type; env->cpu_bind = opt.cpu_bind; + env->cpu_freq = opt.cpu_freq; env->mem_bind_type = opt.mem_bind_type; env->mem_bind = opt.mem_bind; env->overcommit = opt.overcommit; -- GitLab From d8567c6d4aa3ba951f89505a8185518fc5e4f47d Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 12:53:34 -0700 Subject: [PATCH 601/614] cpu_freq support: cosmetic modifications --- NEWS | 5 ++++- src/common/cpu_frequency.c | 10 +++++----- src/common/env.h | 2 +- src/common/slurm_protocol_pack.c | 2 +- src/slurmctld/step_mgr.c | 2 +- src/slurmd/slurmstepd/slurmstepd_job.h | 2 +- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/NEWS b/NEWS index 49fee380be..294dca893d 100644 --- a/NEWS +++ b/NEWS @@ -16,7 +16,10 @@ documents those changes that are of interest to users and admins. -- Add DebugFlag of Switch to log switch plugin details. -- Correct job node_cnt value in job completion plugin when job fails due to down node. Previously was too low by one. - + -- Add new srun option --cpu-freq to enable user control over the job's CPU + frequency and thus it's power consumption. NOTE: cpu frequency is not + currently preserved for jobs being suspended and later resumed. Work by + Don Albert, Bull. * Changes in SLURM 2.5.0.pre1 ============================= diff --git a/src/common/cpu_frequency.c b/src/common/cpu_frequency.c index df3bb96817..f0ebbd6f5f 100644 --- a/src/common/cpu_frequency.c +++ b/src/common/cpu_frequency.c @@ -112,11 +112,11 @@ cpu_freq_init(slurmd_conf_t *conf) "cpu%u/cpufreq/scaling_available_governors", i); if ( ( fp = fopen(path, "r") ) == NULL ) continue; - if (fgets(value, LINE_LEN, fp) == NULL){ + if (fgets(value, LINE_LEN, fp) == NULL) { fclose(fp); continue; } - if (strstr(value, "userspace") == NULL){ + if (strstr(value, "userspace") == NULL) { fclose(fp); continue; } @@ -398,7 +398,7 @@ void _cpu_freq_find_valid(uint32_t cpu_freq, int cpuidx) { unsigned int j, freq_med = 0; - uint32_t freq_list[FREQ_LIST_MAX]; + uint32_t freq_list[FREQ_LIST_MAX] = { 0 }; char path[SYSFS_PATH_MAX]; FILE *fp; @@ -532,8 +532,8 @@ cpu_freq_verify_param(const char *arg, uint32_t *cpu_freq) { } if ( (frequency = strtoul(arg, &end, 10) )) { - *cpu_freq = frequency; - return 0; + *cpu_freq = frequency; + return 0; } if (strncasecmp(arg, "lo", 2) == 0) { diff --git a/src/common/env.h b/src/common/env.h index eeb1f8a3b0..149cf62d41 100644 --- a/src/common/env.h +++ b/src/common/env.h @@ -45,7 +45,7 @@ typedef struct env_options { cpu_bind_type_t cpu_bind_type; /* --cpu_bind= */ char *cpu_bind; /* binding map for map/mask_cpu */ - uint32_t cpu_freq; /* cpu_frequency requested */ + uint32_t cpu_freq; /* cpu_frequency requested */ mem_bind_type_t mem_bind_type; /* --mem_bind= */ char *mem_bind; /* binding map for tasks to memory */ diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index d4780d5322..1a56d1a36e 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -3541,7 +3541,7 @@ _unpack_job_step_create_request_msg(job_step_create_request_msg_t ** msg, safe_unpack8(&(tmp_ptr->no_kill), buffer); safe_unpack8(&(tmp_ptr->overcommit), buffer); - } else if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { safe_unpack32(&(tmp_ptr->job_id), buffer); safe_unpack32(&(tmp_ptr->user_id), buffer); safe_unpack32(&(tmp_ptr->min_nodes), buffer); diff --git a/src/slurmctld/step_mgr.c b/src/slurmctld/step_mgr.c index d0e71f0261..f87d4673cf 100644 --- a/src/slurmctld/step_mgr.c +++ b/src/slurmctld/step_mgr.c @@ -279,7 +279,7 @@ delete_step_record (struct job_record *job_ptr, uint32_t step_id) void dump_step_desc(job_step_create_request_msg_t *step_spec) { - debug3("StepDesc: user_id=%u job_id=%u node_count=%u-%u, cpu_count=%u", + debug3("StepDesc: user_id=%u job_id=%u node_count=%u-%u cpu_count=%u", step_spec->user_id, step_spec->job_id, step_spec->min_nodes, step_spec->max_nodes, step_spec->cpu_count); diff --git a/src/slurmd/slurmstepd/slurmstepd_job.h b/src/slurmd/slurmstepd/slurmstepd_job.h index a13e18239b..8204690041 100644 --- a/src/slurmd/slurmstepd/slurmstepd_job.h +++ b/src/slurmd/slurmstepd/slurmstepd_job.h @@ -134,7 +134,7 @@ typedef struct slurmd_job { char *cpu_bind; /* binding map for map/mask_cpu */ mem_bind_type_t mem_bind_type; /* --mem_bind= */ char *mem_bind; /* binding map for tasks to memory */ - uint32_t cpu_freq; /* requested cpu frequency */ + uint32_t cpu_freq; /* requested cpu frequency */ switch_jobinfo_t *switch_job; /* switch-specific job information */ uid_t uid; /* user id for job */ gid_t gid; /* group ID for job */ -- GitLab From e063642d555d938b07a2c4ac9fcde9a4c66dd1fb Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 14:18:00 -0700 Subject: [PATCH 602/614] Note limited sbatch support for --immediate option This addresses trouble ticket 85 --- doc/man/man1/sbatch.1 | 1 + doc/man/man3/slurm_allocate_resources.3 | 2 ++ slurm/slurm_errno.h | 1 + src/common/slurm_errno.c | 2 ++ src/slurmctld/proc_req.c | 2 ++ 5 files changed, 8 insertions(+) diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 106b846c38..38385f47f6 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -495,6 +495,7 @@ The batch script will only be submitted to the controller if the resources necessary to grant its job allocation are immediately available. If the job allocation will have to wait in a queue of pending jobs, the batch script will not be submitted. +NOTE: There is limitted support for this option with batch jobs. .TP \fB\-i\fR, \fB\-\-input\fR=<\fIfilename pattern\fR> diff --git a/doc/man/man3/slurm_allocate_resources.3 b/doc/man/man3/slurm_allocate_resources.3 index 886b8beaf3..e646152e74 100644 --- a/doc/man/man3/slurm_allocate_resources.3 +++ b/doc/man/man3/slurm_allocate_resources.3 @@ -213,6 +213,8 @@ On success, zero is returned. On error, \-1 is returned, and Slurm error code is .LP \fBSLURM_PROTOCOL_VERSION_ERROR\fR Protocol version has changed, re\-link your code. .LP +\fBESLURM_CAN_NOT_START_IMMEDIATELY\fR the job can not be started immeidately as requested. +.LP \fBESLURM_DEFAULT_PARTITION_NOT_SET\fR the system lacks a valid default partition. .LP \fBESLURM_JOB_MISSING_PARTITION_KEY\fR use of this partition is restricted through a credential provided only to user root. This job lacks such a valid credential. diff --git a/slurm/slurm_errno.h b/slurm/slurm_errno.h index e26b5a933d..6cc5042932 100644 --- a/slurm/slurm_errno.h +++ b/slurm/slurm_errno.h @@ -189,6 +189,7 @@ enum { ESLURM_PARTITION_IN_USE, ESLURM_STEP_LIMIT, ESLURM_JOB_SUSPENDED, + ESLURM_CAN_NOT_START_IMMEDIATELY, /* switch specific error codes, specific values defined in plugin module */ ESLURM_SWITCH_MIN = 3000, diff --git a/src/common/slurm_errno.c b/src/common/slurm_errno.c index 2e71607ced..e6cd4d84a4 100644 --- a/src/common/slurm_errno.c +++ b/src/common/slurm_errno.c @@ -280,6 +280,8 @@ static slurm_errtab_t slurm_errtab[] = { "Step limit reached for this job" }, { ESLURM_JOB_SUSPENDED, "Job is current suspended, requested operation disabled" }, + { ESLURM_CAN_NOT_START_IMMEDIATELY, + "Job can not start immediately" }, /* slurmd error codes */ diff --git a/src/slurmctld/proc_req.c b/src/slurmctld/proc_req.c index 9b9ccee11d..a847106877 100644 --- a/src/slurmctld/proc_req.c +++ b/src/slurmctld/proc_req.c @@ -2639,6 +2639,8 @@ static void _slurm_rpc_submit_batch_job(slurm_msg_t * msg) false, NULL, 0, uid, &job_ptr); unlock_slurmctld(job_write_lock); END_TIMER2("_slurm_rpc_submit_batch_job"); + if (job_desc_msg->immediate && (error_code != SLURM_SUCCESS)) + error_code = ESLURM_CAN_NOT_START_IMMEDIATELY; } /* return result */ -- GitLab From c0542a8ee43d5377ae3f784e430ce49ab23ffbc3 Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Mon, 16 Jul 2012 16:12:27 -0700 Subject: [PATCH 603/614] Batch to support node board configuration specification --- contribs/perlapi/libslurm/perl/node.c | 2 + doc/html/cpu_management.shtml | 10 +- doc/man/man5/slurm.conf.5 | 23 +- slurm/slurm.h.in | 33 +- src/api/config_info.c | 2 + src/api/node_info.c | 5 +- src/common/node_conf.c | 2 + src/common/node_conf.h | 2 + src/common/read_config.c | 139 +++- src/common/read_config.h | 13 +- src/common/slurm_protocol_defs.h | 4 + src/common/slurm_protocol_pack.c | 703 ++++++++++++++++-- src/common/xcpuinfo.c | 131 +++- src/common/xcpuinfo.h | 2 +- src/plugins/select/cons_res/dist_tasks.c | 266 ++++++- src/plugins/select/cons_res/select_cons_res.c | 2 + src/plugins/select/cons_res/select_cons_res.h | 1 + src/plugins/select/linear/select_linear.c | 8 +- src/sacct/Makefile.am | 3 +- src/sacct/Makefile.in | 4 +- src/sacctmgr/Makefile.am | 3 +- src/sacctmgr/Makefile.in | 4 +- src/salloc/Makefile.am | 3 +- src/salloc/Makefile.in | 4 +- src/sattach/Makefile.am | 3 +- src/sattach/Makefile.in | 4 +- src/sbatch/Makefile.am | 3 +- src/sbatch/Makefile.in | 4 +- src/sbcast/Makefile.am | 3 +- src/sbcast/Makefile.in | 4 +- src/scancel/Makefile.am | 3 +- src/scancel/Makefile.in | 4 +- src/scontrol/Makefile.am | 3 +- src/scontrol/Makefile.in | 4 +- src/sdiag/Makefile.am | 3 +- src/sdiag/Makefile.in | 4 +- src/sinfo/Makefile.am | 3 +- src/sinfo/Makefile.in | 4 +- src/slurmctld/Makefile.am | 3 +- src/slurmctld/Makefile.in | 4 +- src/slurmctld/job_mgr.c | 6 +- src/slurmctld/node_mgr.c | 98 ++- src/slurmctld/read_config.c | 1 + src/slurmd/common/slurmstepd_init.c | 28 +- src/slurmd/slurmd/Makefile.am | 6 +- src/slurmd/slurmd/Makefile.in | 8 +- src/slurmd/slurmd/req.c | 2 + src/slurmd/slurmd/slurmd.c | 32 +- src/slurmd/slurmd/slurmd.h | 10 +- src/slurmd/slurmstepd/Makefile.am | 6 +- src/slurmd/slurmstepd/Makefile.in | 8 +- src/slurmdbd/Makefile.am | 3 +- src/slurmdbd/Makefile.in | 4 +- src/smap/Makefile.am | 3 +- src/smap/Makefile.in | 4 +- src/sprio/Makefile.am | 3 +- src/sprio/Makefile.in | 4 +- src/squeue/Makefile.am | 3 +- src/squeue/Makefile.in | 4 +- src/sreport/Makefile.am | 3 +- src/sreport/Makefile.in | 4 +- src/srun/Makefile.am | 3 +- src/srun/Makefile.in | 3 +- src/srun_cr/Makefile.am | 3 +- src/srun_cr/Makefile.in | 4 +- src/sshare/Makefile.am | 3 +- src/sshare/Makefile.in | 4 +- src/sstat/Makefile.am | 3 +- src/sstat/Makefile.in | 4 +- src/strigger/Makefile.am | 3 +- src/strigger/Makefile.in | 4 +- src/sview/Makefile.am | 3 +- src/sview/Makefile.in | 4 +- src/sview/node_info.c | 18 +- 74 files changed, 1506 insertions(+), 218 deletions(-) diff --git a/contribs/perlapi/libslurm/perl/node.c b/contribs/perlapi/libslurm/perl/node.c index 1b25255e07..e59694f893 100644 --- a/contribs/perlapi/libslurm/perl/node.c +++ b/contribs/perlapi/libslurm/perl/node.c @@ -57,6 +57,7 @@ node_info_to_hv(node_info_t *node_info, uint16_t node_scaling, HV *hv) STORE_FIELD(hv, node_info, reason_time, time_t); STORE_FIELD(hv, node_info, reason_uid, uint32_t); STORE_FIELD(hv, node_info, slurmd_start_time, time_t); + STORE_FIELD(hv, node_info, boards, uint16_t); STORE_FIELD(hv, node_info, sockets, uint16_t); STORE_FIELD(hv, node_info, threads, uint16_t); STORE_FIELD(hv, node_info, tmp_disk, uint32_t); @@ -112,6 +113,7 @@ hv_to_node_info(HV *hv, node_info_t *node_info) FETCH_FIELD(hv, node_info, reason_time, time_t, TRUE); FETCH_FIELD(hv, node_info, reason_uid, uint32_t, TRUE); FETCH_FIELD(hv, node_info, slurmd_start_time, time_t, TRUE); + FETCH_FIELD(hv, node_info, boards, uint16_t, TRUE); FETCH_FIELD(hv, node_info, sockets, uint16_t, TRUE); FETCH_FIELD(hv, node_info, threads, uint16_t, TRUE); FETCH_FIELD(hv, node_info, tmp_disk, uint32_t, TRUE); diff --git a/doc/html/cpu_management.shtml b/doc/html/cpu_management.shtml index 7d57f1148c..7ef79ca61d 100644 --- a/doc/html/cpu_management.shtml +++ b/doc/html/cpu_management.shtml @@ -18,7 +18,7 @@ is divided into the following sections:

      chosen by the SLURM administrator. The interactions between different CPU management options are complex and often difficult to predict. Some experimentation may be required to discover the exact combination of options needed to produce a desired outcome. Users and administrators should refer to the man pages -for slurm.conf, cgroup.conf +for slurm.conf, cgroup.conf, salloc, sbatch and srun for detailed explanations of each option. The following html documents may also be useful:

      @@ -32,7 +32,7 @@ Architectures

      This document describes SLURM CPU management for conventional Linux clusters only. For information on Cray and IBM BlueGene systems, please refer to the appropriate documents.

      -

      The information and examples in this document have been verified on SLURM version 2.3.0. Some +

      The information and examples in this document have been verified on SLURM version 2.4.0. Some information may not be valid for previous SLURM versions.


      CPU Management Steps performed by SLURM

      @@ -88,7 +88,7 @@ Step 1 is performed by slurmctld and the select plugin.

      Defines - a node. This includes the number and layout of sockets, cores, + a node. This includes the number and layout of boards, sockets, cores, threads and processors (logical CPUs) on the node.

      @@ -525,7 +525,7 @@ Step 2 is performed by slurmctld and the select plugin.

      Defines - a node. This includes the number and layout of sockets, cores, + a node. This includes the number and layout of boards, sockets, cores, threads and processors (logical CPUs) on the node.

      @@ -3538,6 +3538,6 @@ and binding for this job. For example, task id 2 is bound to CPU id 2. -

      Last modified 26 September 2011

      +

      Last modified 7 February 2012

      diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index fe844e8e3f..a14829e4e4 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1624,7 +1624,10 @@ Without this option, by default one task will be allocated per thread on nodes with more than one \fBThreadsPerCore\fR configured. .TP \fBCR_CORE_DEFAULT_DIST_BLOCK\fR -Allocate cores using block distribution by default. +Allocate cores within a node using block distribution by default. +This is a pseudo-best-fit algorithm that minimizes the number of +boards and minimizes the number of sockets (within minimum boards) +used for the allocation. This default behavior can be overridden specifying a particular "\-m" parameter with srun/salloc/sbatch. Without this option, cores will be allocated cyclicly across the sockets. @@ -2349,6 +2352,14 @@ they must exactly match the entries in the \fBNodeName\fR By default, the \fBNodeAddr\fR will be identical in value to \fBNodeHostname\fR. +.TP +\fBBoards\fR +Number of Baseboards in nodes with a baseboard controller. +Note that when Boards is specified, SocketsPerBoard, +CoresPerSocket, and ThreadsPerCore should be specified. +Boards and CPUs are mutully exclusive. +The default value is 1. + .TP \fBCoresPerSocket\fR Number of cores in a single physical processor socket (e.g. "2"). @@ -2363,6 +2374,7 @@ The default value is 1. Number of logical processors on the node (e.g. "2"). If \fBCPUs\fR is omitted, it will set equal to the product of \fBSockets\fR, \fBCoresPerSocket\fR, and \fBThreadsPerCore\fR. +CPUs and Boards are mutually exclusive. The default value is 1. .TP @@ -2419,6 +2431,15 @@ If Sockets is omitted, it will be inferred from \fBCPUs\fR, \fBCoresPerSocket\fR, and \fBThreadsPerCore\fR. \fBNOTE\fR: If you have multi\-core processors, you will likely need to specify these parameters. +Sockets and SocketsPerBoard are mutually exclusive. +If Sockets is specified when Boards is also used, +Sockets is interpreted as SocketsPerBoard rather than total sockets. +The default value is 1. + +.TP +\fBSocketsPerBoard\fR +Number of physical processor sockets/chips on a baseboard. +Sockets and SocketsPerBoard are mutually exclusive. The default value is 1. .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index de2756be37..0392c48fd5 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -422,7 +422,8 @@ enum jobacct_data_type { JOBACCT_DATA_TOT_PAGES, /* data-> uint32_t psize */ JOBACCT_DATA_MIN_CPU, /* data-> uint32_t psize */ JOBACCT_DATA_MIN_CPU_ID, /* data-> jobacct_id_t psize */ - JOBACCT_DATA_TOT_CPU /* data-> uint32_t psize */ + JOBACCT_DATA_TOT_CPU, /* data-> uint32_t psize */ + JOBACCT_DATA_CPU_CYCLES /* data-> uint32_t psize */ }; /* Possible task distributions across the nodes */ @@ -458,6 +459,7 @@ typedef enum cpu_bind_type { /* cpu binding type from --cpu_bind=... */ CPU_BIND_TO_CORES = 0x04, /* =cores */ CPU_BIND_TO_SOCKETS= 0x08, /* =sockets */ CPU_BIND_TO_LDOMS = 0x10, /* locality domains */ + CPU_BIND_TO_BOARDS = 0x1000, /* =boards */ /* the following manual binding flags are mutually exclusive */ /* CPU_BIND_NONE needs to be the lowest value among manual bindings */ CPU_BIND_NONE = 0x20, /* =no */ @@ -561,6 +563,9 @@ enum ctx_keys { #define CR_CORE 0x0004 /* Resources are shared down to the core level. * Jobs will not be co-allocated within a * core. */ +#define CR_BOARD 0x0008 /* Resources are shared down to the board + * level. Jobs will not be co-allocated + * within a board. */ #define CR_MEMORY 0x0010 /* Memory as consumable resources. Memory is * not over-commited when selected as a CR. */ @@ -1004,6 +1009,8 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ * default=0 */ uint32_t max_nodes; /* maximum number of nodes usable by job, * default=0 */ + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board;/* sockets per board required by job */ uint16_t sockets_per_node;/* sockets per node required by job */ uint16_t cores_per_socket;/* cores per socket required by job */ uint16_t threads_per_core;/* threads per core required by job */ @@ -1011,6 +1018,7 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ uint16_t ntasks_per_socket;/* number of tasks to invoke on * each socket */ uint16_t ntasks_per_core;/* number of tasks to invoke on each core */ + uint16_t ntasks_per_board;/* number of tasks to invoke on each board */ uint16_t pn_min_cpus; /* minimum # CPUs per node, default=0 */ uint32_t pn_min_memory; /* minimum real memory per node OR * real memory per CPU | MEM_PER_CPU, @@ -1075,9 +1083,11 @@ typedef struct job_info { char *licenses; /* licenses required by the job */ uint32_t max_cpus; /* maximum number of cpus usable by job */ uint32_t max_nodes; /* maximum number of nodes usable by job */ - uint16_t sockets_per_node;/* sockets per node required by job */ - uint16_t cores_per_socket;/* cores per socket required by job */ - uint16_t threads_per_core;/* threads per core required by job */ + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board;/* sockets per board required by job */ + uint16_t sockets_per_node; /* sockets per node required by job */ + uint16_t cores_per_socket; /* cores per socket required by job */ + uint16_t threads_per_core; /* threads per core required by job */ char *name; /* name of the job */ char *network; /* network specification */ char *nodes; /* list of nodes allocated to job */ @@ -1087,7 +1097,8 @@ typedef struct job_info { * start_range_2, .., -1 */ uint16_t ntasks_per_core;/* number of tasks to invoke on each core */ uint16_t ntasks_per_node;/* number of tasks to invoke on each node */ - uint16_t ntasks_per_socket;/* number of tasks to invoke on each socket */ + uint16_t ntasks_per_socket;/* number of tasks to invoke on each socket*/ + uint16_t ntasks_per_board; /* number of tasks to invoke on each board */ uint32_t num_nodes; /* minimum number of nodes required by job */ uint32_t num_cpus; /* minimum number of cpus required by job */ @@ -1414,8 +1425,9 @@ typedef struct { typedef struct node_info { char *arch; /* computer architecture */ + uint16_t boards; /* total number of boards per node */ time_t boot_time; /* time of node boot */ - uint16_t cores; /* number of cores per CPU */ + uint16_t cores; /* number of cores per socket */ uint16_t cpus; /* configured count of cpus running on * the node */ char *features; /* list of a node's features */ @@ -1432,7 +1444,7 @@ typedef struct node_info { uint32_t reason_uid; /* User that set the reason, ignore if * no reason is set. */ time_t slurmd_start_time;/* time of slurmd startup */ - uint16_t sockets; /* number of sockets per node */ + uint16_t sockets; /* total number of sockets per node */ uint16_t threads; /* number of threads per core */ uint32_t tmp_disk; /* configured MB of total disk in TMP_FS */ uint32_t weight; /* arbitrary priority of node for scheduling */ @@ -1852,6 +1864,8 @@ typedef struct slurm_ctl_conf { * inactive resource allocation is released */ uint16_t job_acct_gather_freq; /* poll frequency for job accounting * gather plugins */ + uint16_t xres_access_freq; /* poll frequency for + * external-resource-access thread */ char *job_acct_gather_type; /* job accounting gather type */ char *job_ckpt_dir; /* directory saving job record checkpoint */ char *job_comp_host; /* job completion logging host */ @@ -2003,8 +2017,9 @@ typedef struct slurmd_status_msg { time_t last_slurmctld_msg; /* time of last slurmctld message */ uint16_t slurmd_debug; /* logging level */ uint16_t actual_cpus; /* actual logical processor count */ - uint16_t actual_sockets; /* actual sockets count */ - uint16_t actual_cores; /* actual core count */ + uint16_t actual_boards; /* actual total boards count */ + uint16_t actual_sockets; /* actual total sockets count */ + uint16_t actual_cores; /* actual core per socket count */ uint16_t actual_threads; /* actual thread per core count */ uint32_t actual_real_mem; /* actual real memory in MB */ uint32_t actual_tmp_disk; /* actual temp disk space in MB */ diff --git a/src/api/config_info.c b/src/api/config_info.c index 34ecb8429e..1f93ca5357 100644 --- a/src/api/config_info.c +++ b/src/api/config_info.c @@ -1243,6 +1243,8 @@ void slurm_print_slurmd_status (FILE* out, fprintf(out, "Actual CPUs = %u\n", slurmd_status_ptr->actual_cpus); + fprintf(out, "Actual Boards = %u\n", + slurmd_status_ptr->actual_boards); fprintf(out, "Actual sockets = %u\n", slurmd_status_ptr->actual_sockets); fprintf(out, "Actual cores = %u\n", diff --git a/src/api/node_info.c b/src/api/node_info.c index bf25e8e04c..d044820386 100644 --- a/src/api/node_info.c +++ b/src/api/node_info.c @@ -239,8 +239,9 @@ slurm_sprint_node_table (node_info_t * node_ptr, snprintf(tmp_line, sizeof(tmp_line), "OS=%s ", node_ptr->os); xstrcat(out, tmp_line); } - snprintf(tmp_line, sizeof(tmp_line), "RealMemory=%u Sockets=%u", - node_ptr->real_memory, node_ptr->sockets); + snprintf(tmp_line, sizeof(tmp_line), + "RealMemory=%u Sockets=%u Boards=%u", + node_ptr->real_memory, node_ptr->sockets,node_ptr->boards); xstrcat(out, tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 213cc0b174..397598b4c8 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -644,6 +644,7 @@ extern int build_all_nodeline_info (bool set_bitmap) config_ptr = create_config_record(); config_ptr->nodes = xstrdup(node->nodenames); config_ptr->cpus = node->cpus; + config_ptr->boards = node->boards; config_ptr->sockets = node->sockets; config_ptr->cores = node->cores; config_ptr->threads = node->threads; @@ -778,6 +779,7 @@ extern struct node_record *create_node_record ( node_ptr->config_ptr = config_ptr; /* these values will be overwritten when the node actually registers */ node_ptr->cpus = config_ptr->cpus; + node_ptr->boards = config_ptr->boards; node_ptr->sockets = config_ptr->sockets; node_ptr->cores = config_ptr->cores; node_ptr->threads = config_ptr->threads; diff --git a/src/common/node_conf.h b/src/common/node_conf.h index 8eb96d5d3f..49107f9cef 100644 --- a/src/common/node_conf.h +++ b/src/common/node_conf.h @@ -66,6 +66,7 @@ struct config_record { uint32_t magic; /* magic cookie to test data integrity */ uint16_t cpus; /* count of processors running on the node */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ @@ -105,6 +106,7 @@ struct node_record { time_t last_response; /* last response from the node */ time_t last_idle; /* time node last become idle */ uint16_t cpus; /* count of processors on the node */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ diff --git a/src/common/read_config.c b/src/common/read_config.c index e6cf62ae9b..256fdf874a 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -5,6 +5,7 @@ * Copyright (C) 2008-2010 Lawrence Livermore National Security. * Portions Copyright (C) 2008 Vijay Ramasubramanian. * Portions Copyright (C) 2010 SchedMD . + * Portions (boards) copyright (C) 2012 Bull, * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Morris Jette . * CODE-OCEC-09-009. All rights reserved. @@ -113,6 +114,7 @@ typedef struct names_ll_s { char *address; /* NodeAddr */ uint16_t port; uint16_t cpus; + uint16_t boards; uint16_t sockets; uint16_t cores; uint16_t threads; @@ -500,6 +502,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, slurm_conf_node_t *n; int computed_procs; static s_p_options_t _nodename_options[] = { + {"Boards", S_P_UINT16}, {"CoresPerSocket", S_P_UINT16}, {"CPUs", S_P_UINT16}, {"Feature", S_P_STRING}, @@ -511,6 +514,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, {"RealMemory", S_P_UINT32}, {"Reason", S_P_STRING}, {"Sockets", S_P_UINT16}, + {"SocketsPerBoard", S_P_UINT16}, {"State", S_P_STRING}, {"ThreadsPerCore", S_P_UINT16}, {"TmpDisk", S_P_UINT32}, @@ -547,9 +551,12 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, return 0; } else { bool no_cpus = false; + bool no_boards = false; bool no_sockets = false; bool no_cores = false; bool no_threads = false; + bool no_sockets_per_board = false; + uint16_t sockets_per_board = 0; n = xmalloc(sizeof(slurm_conf_node_t)); dflt = default_nodename_tbl; @@ -565,6 +572,12 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, if (!s_p_get_string(&n->addresses, "NodeAddr", tbl)) n->addresses = xstrdup(n->hostnames); + if (!s_p_get_uint16(&n->boards, "Boards", tbl) + && !s_p_get_uint16(&n->boards, "Boards", dflt)) { + n->boards = 1; + no_boards = true; + } + if (!s_p_get_uint16(&n->cores, "CoresPerSocket", tbl) && !s_p_get_uint16(&n->cores, "CoresPerSocket", dflt)) { n->cores = 1; @@ -605,6 +618,13 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, no_sockets = true; } + if (!s_p_get_uint16(&sockets_per_board, "SocketsPerBoard", tbl) + && !s_p_get_uint16(&sockets_per_board, "SocketsPerBoard", + dflt)) { + sockets_per_board = 1; + no_sockets_per_board = true; + } + if (!s_p_get_string(&n->state, "State", tbl) && !s_p_get_string(&n->state, "State", dflt)) n->state = NULL; @@ -636,44 +656,107 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, n->threads = 1; } + if (!no_sockets_per_board && sockets_per_board==0) { + /* make sure sockets_per_boards is non-zero */ + error("NodeNames=%s SocketsPerBoards=0 is invalid, " + "reset to 1", n->nodenames); + sockets_per_board = 1; + } + + if (no_boards) { + /* This case is exactly like if was without boards, + * Except SocketsPerBoard=# can be used, + * But it can't be used with Sockets=# */ + n->boards = 1; + if (!no_sockets && !no_sockets_per_board) { + error("NodeNames=%s Sockets=# and " + "SocketsPerBoard=# is invalid" + ", using SocketsPerBoard", + n->nodenames); + n->sockets = sockets_per_board; + } + if (!no_sockets_per_board) { + n->sockets = sockets_per_board; + } if (!no_cpus && /* infer missing Sockets= */ no_sockets) { n->sockets = n->cpus / (n->cores * n->threads); } - - if (n->sockets == 0) { /* make sure sockets is non-zero */ + if (n->sockets == 0) { + /* make sure sockets is non-zero */ error("NodeNames=%s Sockets=0 is invalid, " "reset to 1", n->nodenames); n->sockets = 1; } - if (no_cpus) { /* infer missing CPUs= */ n->cpus = n->sockets * n->cores * n->threads; } - - /* if only CPUs= and Sockets= specified check for match */ + /* if only CPUs= and Sockets= + * specified check for match */ if (!no_cpus && !no_sockets && no_cores && no_threads) { if (n->cpus != n->sockets) { n->sockets = n->cpus; - error("NodeNames=%s CPUs doesn't match " - "Sockets, setting Sockets to %d", + error("NodeNames=%s CPUs " + "doesn't match Sockets, " + "setting Sockets to %d", n->nodenames, n->sockets); } } - computed_procs = n->sockets * n->cores * n->threads; if ((n->cpus != n->sockets) && (n->cpus != n->sockets * n->cores) && (n->cpus != computed_procs)) { error("NodeNames=%s CPUs=%d doesn't match " - "Sockets*CoresPerSocket*ThreadsPerCore (%d), " - "resetting CPUs", + "Sockets*CoresPerSocket*ThreadsPerCore " + "(%d), resetting CPUs", n->nodenames, n->cpus, computed_procs); n->cpus = computed_procs; } + } else { + /* In this case Boards=# is used. + * CPUs=# or Procs=# are ignored. + */ + if (!no_cpus) { + error("NodeNames=%s CPUs=# or Procs=# " + "with Boards=# is invalid and " + "is ignored.", n->nodenames); + } + if (n->boards == 0) { + /* make sure boards is non-zero */ + error("NodeNames=%s Boards=0 is " + "invalid, reset to 1", + n->nodenames); + n->boards = 1; + } + if (!no_sockets && !no_sockets_per_board) { + error("NodeNames=%s Sockets=# and " + "SocketsPerBoard=# is invalid, " + "using SocketsPerBoard", n->nodenames); + n->sockets = n->boards * sockets_per_board; + } else if (!no_sockets_per_board) { + n->sockets = n->boards * sockets_per_board; + } else if (!no_sockets) { + error("NodeNames=%s Sockets=# with Boards=# is" + " not recommended, assume " + "SocketsPerBoard was meant", + n->nodenames); + if (n->sockets == 0) { + /* make sure sockets is non-zero */ + error("NodeNames=%s Sockets=0 is " + "invalid, reset to 1", + n->nodenames); + n->sockets = 1; + } + n->sockets = n->boards * n->sockets; + } else { + n->sockets = n->boards; + } + // Node boards factored into sockets + n->cpus = n->sockets * n->cores * n->threads; + } *dest = (void *)n; @@ -1186,8 +1269,9 @@ static int _get_hash_idx(const char *name) static void _push_to_hashtbls(char *alias, char *hostname, char *address, uint16_t port, - uint16_t cpus, uint16_t sockets, - uint16_t cores, uint16_t threads) + uint16_t cpus, uint16_t boards, + uint16_t sockets, uint16_t cores, + uint16_t threads) { int hostname_idx, alias_idx; names_ll_t *p, *new; @@ -1225,6 +1309,7 @@ static void _push_to_hashtbls(char *alias, char *hostname, new->address = xstrdup(address); new->port = port; new->cpus = cpus; + new->boards = boards; new->sockets = sockets; new->cores = cores; new->threads = threads; @@ -1371,8 +1456,9 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) port = port_int; } _push_to_hashtbls(alias, hostname, address, port, - node_ptr->cpus, node_ptr->sockets, - node_ptr->cores, node_ptr->threads); + node_ptr->cpus, node_ptr->boards, + node_ptr->sockets, node_ptr->cores, + node_ptr->threads); free(alias); if (address_count > 1) { address_count--; @@ -1446,7 +1532,7 @@ static int _register_front_ends(slurm_conf_frontend_t *front_end_ptr) address = hostlist_shift(address_list); _push_to_hashtbls(hostname, hostname, address, - front_end_ptr->port, 1, 1, 1, 1); + front_end_ptr->port, 1, 1, 1, 1, 1); free(hostname); free(address); } @@ -1822,13 +1908,15 @@ extern int slurm_conf_get_addr(const char *node_name, slurm_addr_t *address) } /* - * slurm_conf_get_cpus_sct - - * Return the cpus, sockets, cores, and threads for a given NodeName + * slurm_conf_get_cpus_bsct - + * Return the cpus, boards, sockets, cores, and threads configured for a + * given NodeName * Returns SLURM_SUCCESS on success, SLURM_FAILURE on failure. */ -extern int slurm_conf_get_cpus_sct(const char *node_name, - uint16_t *cpus, uint16_t *sockets, - uint16_t *cores, uint16_t *threads) +extern int slurm_conf_get_cpus_bsct(const char *node_name, + uint16_t *cpus, uint16_t *boards, + uint16_t *sockets, uint16_t *cores, + uint16_t *threads) { int idx; names_ll_t *p; @@ -1842,6 +1930,8 @@ extern int slurm_conf_get_cpus_sct(const char *node_name, if (strcmp(p->alias, node_name) == 0) { if (cpus) *cpus = p->cpus; + if (boards) + *boards = p->boards; if (sockets) *sockets = p->sockets; if (cores) @@ -2201,7 +2291,7 @@ static void _init_slurm_conf(const char *file_name) if (name == NULL) name = default_slurm_config_file; } - if (conf_initialized) { + if(conf_initialized) { error("the conf_hashtbl is already inited"); } conf_hashtbl = s_p_hashtbl_create(slurm_conf_options); @@ -2426,7 +2516,7 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) * the cluster name is lower case since sacctmgr makes sure * this is the case as well. */ - if (conf->cluster_name) { + if(conf->cluster_name) { int i; for (i = 0; conf->cluster_name[i] != '\0'; i++) conf->cluster_name[i] = @@ -3296,6 +3386,11 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) fatal("Bad TaskPluginParam: %s", tok); set_unit = true; conf->task_plugin_param |= CPU_BIND_NONE; + } else if (strcasecmp(tok, "boards") == 0) { + if (set_unit) + fatal("Bad TaskPluginParam: %s", tok); + set_unit = true; + conf->task_plugin_param |= CPU_BIND_TO_BOARDS; } else if (strcasecmp(tok, "sockets") == 0) { if (set_unit) fatal("Bad TaskPluginParam: %s", tok); diff --git a/src/common/read_config.h b/src/common/read_config.h index 3edf23b6a6..38367ffb90 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -178,6 +178,7 @@ typedef struct slurm_conf_node { char *feature; /* arbitrary list of node's features */ char *port_str; uint16_t cpus; /* count of cpus running on the node */ + uint16_t boards; /* number of boards per node */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ @@ -402,15 +403,17 @@ extern uint16_t slurm_conf_get_port(const char *node_name); extern int slurm_conf_get_addr(const char *node_name, slurm_addr_t *address); /* - * slurm_conf_get_cpus_sct - - * Return the cpus, sockets, cores, and threads configured for a given NodeName + * slurm_conf_get_cpus_bsct - + * Return the cpus, boards, sockets, cores, and threads configured for a + * given NodeName * Returns SLURM_SUCCESS on success, SLURM_FAILURE on failure. * * NOTE: Caller must NOT be holding slurm_conf_lock(). */ -extern int slurm_conf_get_cpus_sct(const char *node_name, - uint16_t *procs, uint16_t *sockets, - uint16_t *cores, uint16_t *threads); +extern int slurm_conf_get_cpus_bsct(const char *node_name, + uint16_t *cpus, uint16_t *boards, + uint16_t *sockets, uint16_t *cores, + uint16_t *threads); /* * init_slurm_conf - initialize or re-initialize the slurm configuration diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index a993f11deb..27134488d9 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -888,10 +888,13 @@ typedef struct file_bcast_msg { } file_bcast_msg_t; typedef struct multi_core_data { + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board; /* sockets per board required by job */ uint16_t sockets_per_node; /* sockets per node required by job */ uint16_t cores_per_socket; /* cores per cpu required by job */ uint16_t threads_per_core; /* threads per core required by job */ + uint16_t ntasks_per_board; /* number of tasks to invoke on each board*/ uint16_t ntasks_per_socket; /* number of tasks to invoke on each socket */ uint16_t ntasks_per_core; /* number of tasks to invoke on each core */ uint16_t plane_size; /* plane size when task_dist = SLURM_DIST_PLANE */ @@ -929,6 +932,7 @@ typedef struct slurm_node_registration_status_msg { uint32_t job_count; /* number of associate job_id's */ uint32_t *job_id; /* IDs of running job (if any) */ char *node_name; + uint16_t boards; char *os; uint32_t real_memory; time_t slurmd_start_time; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index b42035fec7..c37401f715 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2394,7 +2394,41 @@ _pack_node_registration_status_msg(slurm_node_registration_status_msg_t * uint32_t gres_info_size = 0; xassert(msg != NULL); - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack_time(msg->timestamp, buffer); + pack_time(msg->slurmd_start_time, buffer); + pack32(msg->status, buffer); + packstr(msg->node_name, buffer); + packstr(msg->arch, buffer); + packstr(msg->os, buffer); + pack16(msg->cpus, buffer); + pack16(msg->boards, buffer); + pack16(msg->sockets, buffer); + pack16(msg->cores, buffer); + pack16(msg->threads, buffer); + pack32(msg->real_memory, buffer); + pack32(msg->tmp_disk, buffer); + pack32(msg->up_time, buffer); + pack32(msg->hash_val, buffer); + + pack32(msg->job_count, buffer); + for (i = 0; i < msg->job_count; i++) { + pack32(msg->job_id[i], buffer); + } + for (i = 0; i < msg->job_count; i++) { + pack32(msg->step_id[i], buffer); + } + pack16(msg->startup, buffer); + if (msg->startup) + switch_g_pack_node_info(msg->switch_nodeinfo, buffer); + if (msg->gres_info) + gres_info_size = get_buf_offset(msg->gres_info); + pack32(gres_info_size, buffer); + if (gres_info_size) { + packmem(get_buf_data(msg->gres_info), gres_info_size, + buffer); + } + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { pack_time(msg->timestamp, buffer); pack_time(msg->slurmd_start_time, buffer); pack32(msg->status, buffer); @@ -2469,7 +2503,56 @@ _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t node_reg_ptr = xmalloc(sizeof(slurm_node_registration_status_msg_t)); *msg = node_reg_ptr; - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + /* unpack timestamp of snapshot */ + safe_unpack_time(&node_reg_ptr->timestamp, buffer); + safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); + /* load the data values */ + safe_unpack32(&node_reg_ptr->status, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->node_name, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->arch, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->os, &uint32_tmp, buffer); + safe_unpack16(&node_reg_ptr->cpus, buffer); + safe_unpack16(&node_reg_ptr->boards, buffer); + safe_unpack16(&node_reg_ptr->sockets, buffer); + safe_unpack16(&node_reg_ptr->cores, buffer); + safe_unpack16(&node_reg_ptr->threads, buffer); + safe_unpack32(&node_reg_ptr->real_memory, buffer); + safe_unpack32(&node_reg_ptr->tmp_disk, buffer); + safe_unpack32(&node_reg_ptr->up_time, buffer); + safe_unpack32(&node_reg_ptr->hash_val, buffer); + + safe_unpack32(&node_reg_ptr->job_count, buffer); + node_reg_ptr->job_id = + xmalloc(sizeof(uint32_t) * node_reg_ptr->job_count); + for (i = 0; i < node_reg_ptr->job_count; i++) { + safe_unpack32(&node_reg_ptr->job_id[i], buffer); + } + node_reg_ptr->step_id = + xmalloc(sizeof(uint32_t) * node_reg_ptr->job_count); + for (i = 0; i < node_reg_ptr->job_count; i++) { + safe_unpack32(&node_reg_ptr->step_id[i], buffer); + } + + safe_unpack16(&node_reg_ptr->startup, buffer); + if (node_reg_ptr->startup + && (switch_g_alloc_node_info( + &node_reg_ptr->switch_nodeinfo) + || switch_g_unpack_node_info( + node_reg_ptr->switch_nodeinfo, buffer))) + goto unpack_error; + + safe_unpack32(&gres_info_size, buffer); + if (gres_info_size) { + safe_unpackmem_xmalloc(&gres_info, &uint32_tmp, buffer); + if (gres_info_size != uint32_tmp) + goto unpack_error; + node_reg_ptr->gres_info = create_buf(gres_info, + gres_info_size); + } + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { /* unpack timestamp of snapshot */ safe_unpack_time(&node_reg_ptr->timestamp, buffer); safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); @@ -2889,7 +2972,36 @@ _unpack_node_info_members(node_info_t * node, Buf buffer, xassert(node != NULL); - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc(&node->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->node_hostname, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&node->node_addr, &uint32_tmp, buffer); + safe_unpack16(&node->node_state, buffer); + safe_unpack16(&node->cpus, buffer); + safe_unpack16(&node->boards, buffer); + safe_unpack16(&node->sockets, buffer); + safe_unpack16(&node->cores, buffer); + safe_unpack16(&node->threads, buffer); + + safe_unpack32(&node->real_memory, buffer); + safe_unpack32(&node->tmp_disk, buffer); + safe_unpack32(&node->weight, buffer); + safe_unpack32(&node->reason_uid, buffer); + + safe_unpack_time(&node->boot_time, buffer); + safe_unpack_time(&node->reason_time, buffer); + safe_unpack_time(&node->slurmd_start_time, buffer); + + select_g_select_nodeinfo_unpack(&node->select_nodeinfo, buffer, + protocol_version); + + safe_unpackstr_xmalloc(&node->arch, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->gres, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->os, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->reason, &uint32_tmp, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpackstr_xmalloc(&node->name, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&node->node_hostname, &uint32_tmp, buffer); @@ -4369,7 +4481,122 @@ _unpack_job_info_members(job_info_t * job, Buf buffer, char *node_inx_str; multi_core_data_t *mc_ptr; - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack32(&job->assoc_id, buffer); + safe_unpack32(&job->job_id, buffer); + safe_unpack32(&job->user_id, buffer); + safe_unpack32(&job->group_id, buffer); + + safe_unpack16(&job->job_state, buffer); + safe_unpack16(&job->batch_flag, buffer); + safe_unpack16(&job->state_reason, buffer); + safe_unpack16(&job->restart_cnt, buffer); + safe_unpack16(&job->show_flags, buffer); + + safe_unpack32(&job->alloc_sid, buffer); + safe_unpack32(&job->time_limit, buffer); + safe_unpack32(&job->time_min, buffer); + + safe_unpack16(&job->nice, buffer); + + safe_unpack_time(&job->submit_time, buffer); + safe_unpack_time(&job->eligible_time, buffer); + safe_unpack_time(&job->start_time, buffer); + safe_unpack_time(&job->end_time, buffer); + safe_unpack_time(&job->suspend_time, buffer); + safe_unpack_time(&job->pre_sus_time, buffer); + safe_unpack_time(&job->resize_time, buffer); + safe_unpack_time(&job->preempt_time, buffer); + safe_unpack32(&job->priority, buffer); + safe_unpackstr_xmalloc(&job->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->partition, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->account, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->network, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->comment, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->gres, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->batch_host, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->batch_script, &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&job->qos, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->licenses, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->state_desc, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->resv_name, &uint32_tmp, buffer); + + safe_unpack32(&job->exit_code, buffer); + safe_unpack32(&job->derived_ec, buffer); + unpack_job_resources(&job->job_resrcs, buffer, + protocol_version); + + safe_unpackstr_xmalloc(&job->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->wckey, &uint32_tmp, buffer); + safe_unpack32(&job->req_switch, buffer); + safe_unpack32(&job->wait4switch, buffer); + + safe_unpackstr_xmalloc(&job->alloc_node, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->node_inx = bitfmt2int(""); + else { + job->node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + + if (select_g_select_jobinfo_unpack(&job->select_jobinfo, + buffer, protocol_version)) + goto unpack_error; + + /*** unpack default job details ***/ + safe_unpackstr_xmalloc(&job->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->work_dir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->dependency, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->command, &uint32_tmp, buffer); + + safe_unpack32(&job->num_cpus, buffer); + safe_unpack32(&job->max_cpus, buffer); + safe_unpack32(&job->num_nodes, buffer); + safe_unpack32(&job->max_nodes, buffer); + safe_unpack16(&job->requeue, buffer); + + /*** unpack pending job details ***/ + safe_unpack16(&job->shared, buffer); + safe_unpack16(&job->contiguous, buffer); + safe_unpack16(&job->cpus_per_task, buffer); + safe_unpack16(&job->pn_min_cpus, buffer); + + safe_unpack32(&job->pn_min_memory, buffer); + safe_unpack32(&job->pn_min_tmp_disk, buffer); + + safe_unpackstr_xmalloc(&job->req_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->req_node_inx = bitfmt2int(""); + else { + job->req_node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + safe_unpackstr_xmalloc(&job->exc_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->exc_node_inx = bitfmt2int(""); + else { + job->exc_node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + + if (unpack_multi_core_data(&mc_ptr, buffer, protocol_version)) + goto unpack_error; + if (mc_ptr) { + job->boards_per_node = mc_ptr->boards_per_node; + job->sockets_per_board = mc_ptr->sockets_per_board; + job->sockets_per_node = mc_ptr->sockets_per_node; + job->cores_per_socket = mc_ptr->cores_per_socket; + job->threads_per_core = mc_ptr->threads_per_core; + job->ntasks_per_board = mc_ptr->ntasks_per_board; + job->ntasks_per_socket = mc_ptr->ntasks_per_socket; + job->ntasks_per_core = mc_ptr->ntasks_per_core; + xfree(mc_ptr); + } + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpack32(&job->assoc_id, buffer); safe_unpack32(&job->job_id, buffer); safe_unpack32(&job->user_id, buffer); @@ -7095,7 +7322,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, uint16_t protocol_version) { /* load the data values */ - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); @@ -7144,6 +7371,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->shared, buffer); pack16(job_desc_ptr->cpus_per_task, buffer); pack16(job_desc_ptr->ntasks_per_node, buffer); + pack16(job_desc_ptr->ntasks_per_board, buffer); pack16(job_desc_ptr->ntasks_per_socket, buffer); pack16(job_desc_ptr->ntasks_per_core, buffer); @@ -7159,6 +7387,8 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack32(job_desc_ptr->max_cpus, buffer); pack32(job_desc_ptr->min_nodes, buffer); pack32(job_desc_ptr->max_nodes, buffer); + pack16(job_desc_ptr->boards_per_node, buffer); + pack16(job_desc_ptr->sockets_per_board, buffer); pack16(job_desc_ptr->sockets_per_node, buffer); pack16(job_desc_ptr->cores_per_socket, buffer); pack16(job_desc_ptr->threads_per_core, buffer); @@ -7238,7 +7468,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo = NULL; } pack16(job_desc_ptr->wait_all_nodes, buffer); - } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); @@ -7321,6 +7551,8 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->warn_signal, buffer); pack16(job_desc_ptr->warn_time, buffer); packstr(job_desc_ptr->wckey, buffer); + pack32(job_desc_ptr->req_switch, buffer); + pack32(job_desc_ptr->wait4switch, buffer); if (job_desc_ptr->select_jobinfo) { select_g_select_jobinfo_pack( @@ -7379,11 +7611,12 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo = NULL; } pack16(job_desc_ptr->wait_all_nodes, buffer); - } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); packstr(job_desc_ptr->features, buffer); + packstr(job_desc_ptr->gres, buffer); pack32(job_desc_ptr->job_id, buffer); packstr(job_desc_ptr->name, buffer); @@ -7437,7 +7670,9 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, packstr(job_desc_ptr->mem_bind, buffer); pack32(job_desc_ptr->time_limit, buffer); + pack32(job_desc_ptr->time_min, buffer); pack32(job_desc_ptr->min_cpus, buffer); + pack32(job_desc_ptr->max_cpus, buffer); pack32(job_desc_ptr->min_nodes, buffer); pack32(job_desc_ptr->max_nodes, buffer); pack16(job_desc_ptr->sockets_per_node, buffer); @@ -7460,14 +7695,13 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->warn_time, buffer); packstr(job_desc_ptr->wckey, buffer); - if(job_desc_ptr->select_jobinfo) { + if (job_desc_ptr->select_jobinfo) { select_g_select_jobinfo_pack( job_desc_ptr->select_jobinfo, buffer, protocol_version); } else { job_desc_ptr->select_jobinfo = select_g_select_jobinfo_alloc(); - if(job_desc_ptr->geometry[0] != (uint16_t) NO_VAL) select_g_select_jobinfo_set( job_desc_ptr->select_jobinfo, @@ -7517,16 +7751,155 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo); job_desc_ptr->select_jobinfo = NULL; } - } -} + pack16(job_desc_ptr->wait_all_nodes, buffer); + } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { + pack16(job_desc_ptr->contiguous, buffer); + pack16(job_desc_ptr->task_dist, buffer); + pack16(job_desc_ptr->kill_on_node_fail, buffer); + packstr(job_desc_ptr->features, buffer); + pack32(job_desc_ptr->job_id, buffer); + packstr(job_desc_ptr->name, buffer); -/* _unpack_job_desc_msg - * unpacks a job_desc struct - * OUT job_desc_buffer_ptr - place to put pointer to allocated job desc struct - * IN/OUT buffer - source of the unpack, contains pointers that are - * automatically updated - */ -static int + packstr(job_desc_ptr->alloc_node, buffer); + pack32(job_desc_ptr->alloc_sid, buffer); + pack16(job_desc_ptr->pn_min_cpus, buffer); + pack32(job_desc_ptr->pn_min_memory, buffer); + pack32(job_desc_ptr->pn_min_tmp_disk, buffer); + + packstr(job_desc_ptr->partition, buffer); + pack32(job_desc_ptr->priority, buffer); + packstr(job_desc_ptr->dependency, buffer); + packstr(job_desc_ptr->account, buffer); + packstr(job_desc_ptr->comment, buffer); + pack16(job_desc_ptr->nice, buffer); + packstr(job_desc_ptr->qos, buffer); + + pack8(job_desc_ptr->open_mode, buffer); + pack8(job_desc_ptr->overcommit, buffer); + pack16(job_desc_ptr->acctg_freq, buffer); + pack32(job_desc_ptr->num_tasks, buffer); + pack16(job_desc_ptr->ckpt_interval, buffer); + + packstr(job_desc_ptr->req_nodes, buffer); + packstr(job_desc_ptr->exc_nodes, buffer); + packstr_array(job_desc_ptr->environment, + job_desc_ptr->env_size, buffer); + packstr_array(job_desc_ptr->spank_job_env, + job_desc_ptr->spank_job_env_size, buffer); + packstr(job_desc_ptr->script, buffer); + packstr_array(job_desc_ptr->argv, job_desc_ptr->argc, buffer); + + packstr(job_desc_ptr->std_err, buffer); + packstr(job_desc_ptr->std_in, buffer); + packstr(job_desc_ptr->std_out, buffer); + packstr(job_desc_ptr->work_dir, buffer); + packstr(job_desc_ptr->ckpt_dir, buffer); + + pack16(job_desc_ptr->immediate, buffer); + pack16(job_desc_ptr->requeue, buffer); + pack16(job_desc_ptr->shared, buffer); + pack16(job_desc_ptr->cpus_per_task, buffer); + pack16(job_desc_ptr->ntasks_per_node, buffer); + pack16(job_desc_ptr->ntasks_per_socket, buffer); + pack16(job_desc_ptr->ntasks_per_core, buffer); + + pack16(job_desc_ptr->plane_size, buffer); + pack16(job_desc_ptr->cpu_bind_type, buffer); + pack16(job_desc_ptr->mem_bind_type, buffer); + packstr(job_desc_ptr->cpu_bind, buffer); + packstr(job_desc_ptr->mem_bind, buffer); + + pack32(job_desc_ptr->time_limit, buffer); + pack32(job_desc_ptr->min_cpus, buffer); + pack32(job_desc_ptr->min_nodes, buffer); + pack32(job_desc_ptr->max_nodes, buffer); + pack16(job_desc_ptr->sockets_per_node, buffer); + pack16(job_desc_ptr->cores_per_socket, buffer); + pack16(job_desc_ptr->threads_per_core, buffer); + pack32(job_desc_ptr->user_id, buffer); + pack32(job_desc_ptr->group_id, buffer); + + pack16(job_desc_ptr->alloc_resp_port, buffer); + pack16(job_desc_ptr->other_port, buffer); + packstr(job_desc_ptr->network, buffer); + pack_time(job_desc_ptr->begin_time, buffer); + pack_time(job_desc_ptr->end_time, buffer); + + packstr(job_desc_ptr->licenses, buffer); + pack16(job_desc_ptr->mail_type, buffer); + packstr(job_desc_ptr->mail_user, buffer); + packstr(job_desc_ptr->reservation, buffer); + pack16(job_desc_ptr->warn_signal, buffer); + pack16(job_desc_ptr->warn_time, buffer); + packstr(job_desc_ptr->wckey, buffer); + + if(job_desc_ptr->select_jobinfo) { + select_g_select_jobinfo_pack( + job_desc_ptr->select_jobinfo, + buffer, protocol_version); + } else { + job_desc_ptr->select_jobinfo = + select_g_select_jobinfo_alloc(); + + if(job_desc_ptr->geometry[0] != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_GEOMETRY, + job_desc_ptr->geometry); + + if (job_desc_ptr->conn_type[0] != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_CONN_TYPE, + &(job_desc_ptr->conn_type)); + if (job_desc_ptr->reboot != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_REBOOT, + &(job_desc_ptr->reboot)); + if (job_desc_ptr->rotate != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_ROTATE, + &(job_desc_ptr->rotate)); + if (job_desc_ptr->blrtsimage) { + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_BLRTS_IMAGE, + job_desc_ptr->blrtsimage); + } + if (job_desc_ptr->linuximage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_LINUX_IMAGE, + job_desc_ptr->linuximage); + if (job_desc_ptr->mloaderimage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_MLOADER_IMAGE, + job_desc_ptr->mloaderimage); + if (job_desc_ptr->ramdiskimage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_RAMDISK_IMAGE, + job_desc_ptr->ramdiskimage); + select_g_select_jobinfo_pack( + job_desc_ptr->select_jobinfo, + buffer, protocol_version); + select_g_select_jobinfo_free( + job_desc_ptr->select_jobinfo); + job_desc_ptr->select_jobinfo = NULL; + } + } +} + +/* _unpack_job_desc_msg + * unpacks a job_desc struct + * OUT job_desc_buffer_ptr - place to put pointer to allocated job desc struct + * IN/OUT buffer - source of the unpack, contains pointers that are + * automatically updated + */ +static int _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer, uint16_t protocol_version) { @@ -7534,7 +7907,142 @@ _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer, job_desc_msg_t *job_desc_ptr; /* alloc memory for structure */ - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + job_desc_ptr = xmalloc(sizeof(job_desc_msg_t)); + *job_desc_buffer_ptr = job_desc_ptr; + + /* load the data values */ + safe_unpack16(&job_desc_ptr->contiguous, buffer); + safe_unpack16(&job_desc_ptr->task_dist, buffer); + safe_unpack16(&job_desc_ptr->kill_on_node_fail, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->features, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->gres, &uint32_tmp,buffer); + safe_unpack32(&job_desc_ptr->job_id, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->name, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->alloc_node, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->alloc_sid, buffer); + safe_unpack16(&job_desc_ptr->pn_min_cpus, buffer); + safe_unpack32(&job_desc_ptr->pn_min_memory, buffer); + safe_unpack32(&job_desc_ptr->pn_min_tmp_disk, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->partition, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->priority, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->dependency, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->account, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->comment, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->nice, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->qos, &uint32_tmp, + buffer); + + safe_unpack8(&job_desc_ptr->open_mode, buffer); + safe_unpack8(&job_desc_ptr->overcommit, buffer); + safe_unpack16(&job_desc_ptr->acctg_freq, buffer); + safe_unpack32(&job_desc_ptr->num_tasks, buffer); + safe_unpack16(&job_desc_ptr->ckpt_interval, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->req_nodes, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->exc_nodes, + &uint32_tmp, buffer); + safe_unpackstr_array(&job_desc_ptr->environment, + &job_desc_ptr->env_size, buffer); + safe_unpackstr_array(&job_desc_ptr->spank_job_env, + &job_desc_ptr->spank_job_env_size, + buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->script, + &uint32_tmp, buffer); + safe_unpackstr_array(&job_desc_ptr->argv, + &job_desc_ptr->argc, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->std_err, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->std_in, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->std_out, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->work_dir, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->ckpt_dir, + &uint32_tmp, buffer); + + safe_unpack16(&job_desc_ptr->immediate, buffer); + safe_unpack16(&job_desc_ptr->requeue, buffer); + safe_unpack16(&job_desc_ptr->shared, buffer); + safe_unpack16(&job_desc_ptr->cpus_per_task, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_node, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_board, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_socket, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_core, buffer); + + safe_unpack16(&job_desc_ptr->plane_size, buffer); + safe_unpack16(&job_desc_ptr->cpu_bind_type, buffer); + safe_unpack16(&job_desc_ptr->mem_bind_type, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->cpu_bind, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->mem_bind, + &uint32_tmp, buffer); + + safe_unpack32(&job_desc_ptr->time_limit, buffer); + safe_unpack32(&job_desc_ptr->time_min, buffer); + safe_unpack32(&job_desc_ptr->min_cpus, buffer); + safe_unpack32(&job_desc_ptr->max_cpus, buffer); + safe_unpack32(&job_desc_ptr->min_nodes, buffer); + safe_unpack32(&job_desc_ptr->max_nodes, buffer); + safe_unpack16(&job_desc_ptr->boards_per_node, buffer); + safe_unpack16(&job_desc_ptr->sockets_per_board, buffer); + safe_unpack16(&job_desc_ptr->sockets_per_node, buffer); + safe_unpack16(&job_desc_ptr->cores_per_socket, buffer); + safe_unpack16(&job_desc_ptr->threads_per_core, buffer); + safe_unpack32(&job_desc_ptr->user_id, buffer); + safe_unpack32(&job_desc_ptr->group_id, buffer); + + safe_unpack16(&job_desc_ptr->alloc_resp_port, buffer); + safe_unpack16(&job_desc_ptr->other_port, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->network, + &uint32_tmp, buffer); + safe_unpack_time(&job_desc_ptr->begin_time, buffer); + safe_unpack_time(&job_desc_ptr->end_time, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->licenses, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->mail_type, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->mail_user, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->reservation, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->warn_signal, buffer); + safe_unpack16(&job_desc_ptr->warn_time, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->wckey, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->req_switch, buffer); + safe_unpack32(&job_desc_ptr->wait4switch, buffer); + + if (select_g_select_jobinfo_unpack( + &job_desc_ptr->select_jobinfo, + buffer, protocol_version)) + goto unpack_error; + + /* These are set so we don't confuse them later for what is + * set in the select_jobinfo structure. + */ + job_desc_ptr->geometry[0] = (uint16_t)NO_VAL; + job_desc_ptr->conn_type[0] = (uint16_t)NO_VAL; + job_desc_ptr->reboot = (uint16_t)NO_VAL; + job_desc_ptr->rotate = (uint16_t)NO_VAL; + job_desc_ptr->blrtsimage = NULL; + job_desc_ptr->linuximage = NULL; + job_desc_ptr->mloaderimage = NULL; + job_desc_ptr->ramdiskimage = NULL; + safe_unpack16(&job_desc_ptr->wait_all_nodes, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { job_desc_ptr = xmalloc(sizeof(job_desc_msg_t)); *job_desc_buffer_ptr = job_desc_ptr; @@ -11598,13 +12106,26 @@ pack_multi_core_data (multi_core_data_t *multi_core, Buf buffer, pack8((uint8_t) 0xff, buffer); /* flag as Full */ - pack16(multi_core->sockets_per_node, buffer); - pack16(multi_core->cores_per_socket, buffer); - pack16(multi_core->threads_per_core, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack16(multi_core->boards_per_node, buffer); + pack16(multi_core->sockets_per_board, buffer); + pack16(multi_core->sockets_per_node, buffer); + pack16(multi_core->cores_per_socket, buffer); + pack16(multi_core->threads_per_core, buffer); + + pack16(multi_core->ntasks_per_board, buffer); + pack16(multi_core->ntasks_per_socket, buffer); + pack16(multi_core->ntasks_per_core, buffer); + pack16(multi_core->plane_size, buffer); + } else { + pack16(multi_core->sockets_per_node, buffer); + pack16(multi_core->cores_per_socket, buffer); + pack16(multi_core->threads_per_core, buffer); - pack16(multi_core->ntasks_per_socket, buffer); - pack16(multi_core->ntasks_per_core, buffer); - pack16(multi_core->plane_size, buffer); + pack16(multi_core->ntasks_per_socket, buffer); + pack16(multi_core->ntasks_per_core, buffer); + pack16(multi_core->plane_size, buffer); + } } extern int @@ -11623,14 +12144,24 @@ unpack_multi_core_data (multi_core_data_t **mc_ptr, Buf buffer, multi_core = xmalloc(sizeof(multi_core_data_t)); - safe_unpack16(&multi_core->sockets_per_node, buffer); - safe_unpack16(&multi_core->cores_per_socket, buffer); - safe_unpack16(&multi_core->threads_per_core, buffer); - - safe_unpack16(&multi_core->ntasks_per_socket, buffer); - safe_unpack16(&multi_core->ntasks_per_core, buffer); - safe_unpack16(&multi_core->plane_size, buffer); - + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack16(&multi_core->boards_per_node, buffer); + safe_unpack16(&multi_core->sockets_per_board, buffer); + safe_unpack16(&multi_core->sockets_per_node, buffer); + safe_unpack16(&multi_core->cores_per_socket, buffer); + safe_unpack16(&multi_core->threads_per_core, buffer); + safe_unpack16(&multi_core->ntasks_per_board, buffer); + safe_unpack16(&multi_core->ntasks_per_socket, buffer); + safe_unpack16(&multi_core->ntasks_per_core, buffer); + safe_unpack16(&multi_core->plane_size, buffer); + } else { + safe_unpack16(&multi_core->sockets_per_node, buffer); + safe_unpack16(&multi_core->cores_per_socket, buffer); + safe_unpack16(&multi_core->threads_per_core, buffer); + safe_unpack16(&multi_core->ntasks_per_socket, buffer); + safe_unpack16(&multi_core->ntasks_per_core, buffer); + safe_unpack16(&multi_core->plane_size, buffer); + } *mc_ptr = multi_core; return SLURM_SUCCESS; @@ -11644,23 +12175,44 @@ static void _pack_slurmd_status(slurmd_status_t *msg, Buf buffer, { xassert(msg); - pack_time(msg->booted, buffer); - pack_time(msg->last_slurmctld_msg, buffer); - - pack16(msg->slurmd_debug, buffer); - pack16(msg->actual_cpus, buffer); - pack16(msg->actual_sockets, buffer); - pack16(msg->actual_cores, buffer); - pack16(msg->actual_threads, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack_time(msg->booted, buffer); + pack_time(msg->last_slurmctld_msg, buffer); - pack32(msg->actual_real_mem, buffer); - pack32(msg->actual_tmp_disk, buffer); - pack32(msg->pid, buffer); + pack16(msg->slurmd_debug, buffer); + pack16(msg->actual_cpus, buffer); + pack16(msg->actual_boards, buffer); + pack16(msg->actual_sockets, buffer); + pack16(msg->actual_cores, buffer); + pack16(msg->actual_threads, buffer); + + pack32(msg->actual_real_mem, buffer); + pack32(msg->actual_tmp_disk, buffer); + pack32(msg->pid, buffer); + + packstr(msg->hostname, buffer); + packstr(msg->slurmd_logfile, buffer); + packstr(msg->step_list, buffer); + packstr(msg->version, buffer); + } else { + pack_time(msg->booted, buffer); + pack_time(msg->last_slurmctld_msg, buffer); - packstr(msg->hostname, buffer); - packstr(msg->slurmd_logfile, buffer); - packstr(msg->step_list, buffer); - packstr(msg->version, buffer); + pack16(msg->slurmd_debug, buffer); + pack16(msg->actual_cpus, buffer); + pack16(msg->actual_sockets, buffer); + pack16(msg->actual_cores, buffer); + pack16(msg->actual_threads, buffer); + + pack32(msg->actual_real_mem, buffer); + pack32(msg->actual_tmp_disk, buffer); + pack32(msg->pid, buffer); + + packstr(msg->hostname, buffer); + packstr(msg->slurmd_logfile, buffer); + packstr(msg->step_list, buffer); + packstr(msg->version, buffer); + } } static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer, @@ -11673,23 +12225,48 @@ static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer, msg = xmalloc(sizeof(slurmd_status_t)); - safe_unpack_time(&msg->booted, buffer); - safe_unpack_time(&msg->last_slurmctld_msg, buffer); - - safe_unpack16(&msg->slurmd_debug, buffer); - safe_unpack16(&msg->actual_cpus, buffer); - safe_unpack16(&msg->actual_sockets, buffer); - safe_unpack16(&msg->actual_cores, buffer); - safe_unpack16(&msg->actual_threads, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack_time(&msg->booted, buffer); + safe_unpack_time(&msg->last_slurmctld_msg, buffer); - safe_unpack32(&msg->actual_real_mem, buffer); - safe_unpack32(&msg->actual_tmp_disk, buffer); - safe_unpack32(&msg->pid, buffer); + safe_unpack16(&msg->slurmd_debug, buffer); + safe_unpack16(&msg->actual_cpus, buffer); + safe_unpack16(&msg->actual_boards, buffer); + safe_unpack16(&msg->actual_sockets, buffer); + safe_unpack16(&msg->actual_cores, buffer); + safe_unpack16(&msg->actual_threads, buffer); + + safe_unpack32(&msg->actual_real_mem, buffer); + safe_unpack32(&msg->actual_tmp_disk, buffer); + safe_unpack32(&msg->pid, buffer); + + safe_unpackstr_xmalloc(&msg->hostname, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->slurmd_logfile, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->step_list, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->version, + &uint32_tmp, buffer); + } else { + safe_unpack_time(&msg->booted, buffer); + safe_unpack_time(&msg->last_slurmctld_msg, buffer); - safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->step_list, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->version, &uint32_tmp, buffer); + safe_unpack16(&msg->slurmd_debug, buffer); + safe_unpack16(&msg->actual_cpus, buffer); + safe_unpack16(&msg->actual_sockets, buffer); + safe_unpack16(&msg->actual_cores, buffer); + safe_unpack16(&msg->actual_threads, buffer); + + safe_unpack32(&msg->actual_real_mem, buffer); + safe_unpack32(&msg->actual_tmp_disk, buffer); + safe_unpack32(&msg->pid, buffer); + + safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->step_list, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->version, &uint32_tmp, buffer); + } *msg_ptr = msg; return SLURM_SUCCESS; diff --git a/src/common/xcpuinfo.c b/src/common/xcpuinfo.c index fc27ac967a..c1fe1ccb80 100644 --- a/src/common/xcpuinfo.c +++ b/src/common/xcpuinfo.c @@ -2,6 +2,7 @@ * xcpuinfo.c - cpuinfo related primitives ***************************************************************************** * Copyright (C) 2009 CEA/DAM/DIF + * Portions (hwloc) copyright (C) 2012 Bull, * Written by Matthieu Hautreux * * This file is part of SLURM, a resource management program. @@ -60,6 +61,10 @@ #include "src/common/xstring.h" #include "src/slurmd/slurmd/get_mach_stat.h" +#ifdef HAVE_HWLOC +#include +#endif + #include "xcpuinfo.h" static char* _cpuinfo_path = "/proc/cpuinfo"; @@ -75,7 +80,7 @@ static int _range_to_map(char* range, uint16_t *map, uint16_t map_size, static int _map_to_range(uint16_t *map, uint16_t map_size, char** prange); bool initialized = false; -uint16_t procs, sockets, cores, threads=1; +uint16_t procs, boards, sockets, cores, threads=1; uint16_t block_map_size; uint16_t *block_map, *block_map_inv; @@ -135,7 +140,8 @@ get_procs(uint16_t *procs) /* * get_cpuinfo - Return detailed cpuinfo on this system * Input: numproc - number of processors on the system - * Output: p_sockets - number of physical processor sockets + * Output: p_boards - number of baseboards (containing sockets) + * p_sockets - number of physical processor sockets * p_cores - total number of physical CPU cores * p_threads - total number of hardware execution threads * block_map - asbtract->physical block distribution map @@ -143,6 +149,117 @@ get_procs(uint16_t *procs) * return code - 0 if no error, otherwise errno * NOTE: User must xfree block_map and block_map_inv */ +#ifdef HAVE_HWLOC +#if DEBUG_DETAIL +static void hwloc_children(hwloc_topology_t topology, hwloc_obj_t obj, + int depth) +{ + char string[128]; + unsigned i; + + hwloc_obj_snprintf(string, sizeof(string), topology, obj, "#", 0); + debug3("%*s%s", 2*depth, "", string); + for (i = 0; i < obj->arity; i++) { + hwloc_children(topology, obj->children[i], depth + 1); + } +} +#endif + +extern int +get_cpuinfo(uint16_t numproc, uint16_t *p_boards, + uint16_t *p_sockets, uint16_t *p_cores, uint16_t *p_threads, + uint16_t *block_map_size, + uint16_t **block_map, uint16_t **block_map_inv) +{ + hwloc_topology_t topology; + hwloc_obj_t obj; + int depth; + /* Allocate and initialize topology object. */ + hwloc_topology_init(&topology); + /* Perform the topology detection. */ + hwloc_topology_load(topology); + + int boards = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + boards = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_boards = boards; + + int nsockets = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_SOCKET); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + nsockets = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_sockets = nsockets; + + int ncores = 1; + *p_cores = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_CORE); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + ncores = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_cores = ncores / nsockets; + + int npu = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + npu = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_threads = npu / ncores; + + *block_map_size = npu; + /* See notes on _compute_block_map for details + * retval = _compute_block_map(*block_map_size, + * block_map, block_map_inv); */ + + uint16_t i; + /* Compute abstract->machine block mapping (and inverse) */ + if (block_map) { + *block_map = xmalloc(npu * sizeof(uint16_t)); + for (i=0; ios_index; + } + if (block_map_inv) { + *block_map_inv = xmalloc(npu * sizeof(uint16_t)); + for (i = 0; i < npu; i++) { + uint16_t idx = (*block_map)[i]; + (*block_map_inv)[idx] = i; + } + } + } + +#if DEBUG_DETAIL + /*** Display raw data ***/ + debug3(" "); + debug3("Boards: %u", *p_sockets); + debug3("Sockets: %u", *p_sockets); + debug3("Cores per socket: %u", *p_cores); + debug3("Threads per core: %u", *p_threads); + debug3(" "); + hwloc_children(topology, hwloc_get_root_obj(topology), 0); + + /* Display the mapping tables */ + if (block_map && block_map_inv) { + debug3(""); + debug3("Abstract -> Machine logical CPU ID block mapping:"); + debug3("(AbstractId PhysicalId Inverse"); + for (i = 0; i < numproc; i++) { + debug3(" %4d %4u %4u", + i, (*block_map)[i], (*block_map_inv)[i]); + } + debug3(""); + } + debug3(""); +#endif + hwloc_topology_destroy(topology); + return 0; + +} +#else + typedef struct cpuinfo { uint16_t seen; uint32_t cpuid; @@ -156,12 +273,15 @@ typedef struct cpuinfo { static cpuinfo_t *cpuinfo = NULL; /* array of CPU information for get_cpuinfo */ /* Note: file static for qsort/_compare_cpus*/ extern int -get_cpuinfo(uint16_t numproc, +get_cpuinfo(uint16_t numproc, uint16_t *p_boards, uint16_t *p_sockets, uint16_t *p_cores, uint16_t *p_threads, uint16_t *block_map_size, uint16_t **block_map, uint16_t **block_map_inv) { int retval; + + *p_boards = 1; /* Boards not identified from /proc/cpuinfo */ + uint16_t numcpu = 0; /* number of cpus seen */ uint16_t numphys = 0; /* number of unique "physical id"s */ uint16_t numcores = 0; /* number of unique "cores id"s */ @@ -458,7 +578,6 @@ get_cpuinfo(uint16_t numproc, return retval; } - /* _chk_cpuinfo_str * check a line of cpuinfo data (buffer) for a keyword. If it * exists, return the string value for that keyword in *valptr. @@ -601,7 +720,6 @@ static int _compute_block_map(uint16_t numproc, (*block_map_inv)[idx] = i; } } - #if DEBUG_DETAIL /* Display the mapping tables */ @@ -659,6 +777,7 @@ static int _compute_block_map(uint16_t numproc, #endif return 0; } +#endif int _ranges_conv(char* lrange,char** prange,int mode); @@ -679,7 +798,7 @@ xcpuinfo_init(void) if ( get_procs(&procs) ) return XCPUINFO_ERROR; - if ( get_cpuinfo(procs,&sockets,&cores,&threads, + if ( get_cpuinfo(procs,&boards,&sockets,&cores,&threads, &block_map_size,&block_map,&block_map_inv) ) return XCPUINFO_ERROR; diff --git a/src/common/xcpuinfo.h b/src/common/xcpuinfo.h index 0c93b84ebd..416298a288 100644 --- a/src/common/xcpuinfo.h +++ b/src/common/xcpuinfo.h @@ -45,7 +45,7 @@ #define XCPUINFO_SUCCESS 0 extern int get_procs(uint16_t *procs); -extern int get_cpuinfo(uint16_t numproc, +extern int get_cpuinfo(uint16_t numproc, uint16_t *boards, uint16_t *sockets, uint16_t *cores, uint16_t *threads, uint16_t *block_map_size, uint16_t **block_map, uint16_t **block_map_inv); diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 3feafe8501..730bc6fe87 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -5,6 +5,8 @@ * Copyright (C) 2006-2008 Hewlett-Packard Development Company, L.P. * Written by Susanne M. Balle, * CODE-OCEC-09-009. All rights reserved. + * Portions copyright (C) 2012 Bull + * Written by Martin Perry * * This file is part of SLURM, a resource management program. * For details, see . @@ -48,6 +50,68 @@ #define ALLOCATE_FULL_SOCKET 1 #endif +/* Max boards supported for best-fit across boards */ +/* Larger board configurations may require new algorithm */ +/* for acceptable performance */ +#define MAX_BOARDS 8 + +/* Combination counts + * comb_counts[n-1][k-1] = number of combinations of + * k items from a set of n items + * + * Formula is n!/k!(n-k)! + */ +uint32_t comb_counts[MAX_BOARDS][MAX_BOARDS] = + {{1,0,0,0,0,0,0,0}, + {2,1,0,0,0,0,0,0}, + {3,3,1,0,0,0,0,0}, + {4,6,4,1,0,0,0,0}, + {5,10,10,5,1,0,0,0}, + {6,15,20,15,6,1,0,0}, + {7,21,35,35,21,7,1,0}, + {8,28,56,70,56,28,8,1}}; + +/* Generate all combinations of k integers from the + * set of integers 0 to n-1. + * Return combinations in comb_list. + * + * Example: For k = 2 and n = 4, there are six + * combinations: + * {0,1},{0,2},{0,3},{1,2},{1,3},{2,3} + * + */ +void _gen_combs(int *comb_list, int n, int k) +{ + int *comb = xmalloc(k * sizeof(int)); + + /* Setup comb for the initial combination */ + int i, b; + for (i = 0; i < k; ++i) + comb[i] = i; + b = 0; + + /* Generate all the other combinations */ + while (1) { + for (i=0; i < k; i++) { + comb_list[b+i] = comb[i]; + } + b+=k; + i = k - 1; + ++comb[i]; + while ((i >= 0) && (comb[i] >= n - k + 1 + i)) { + --i; + ++comb[i]; + } + + if (comb[0] > n - k) + break; /* No more combinations */ + + for (i = i + 1; i < k; ++i) + comb[i] = comb[i - 1] + 1; + } + xfree(comb); +} + /* _compute_task_c_b_task_dist - compute the number of tasks on each * of the node for the cyclic and block distribution. We need to do * this in the case of consumable resources so that we have an exact @@ -95,7 +159,6 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) "setting to 1"); maxtasks = 1; } - if (job_ptr->details->cpus_per_task == 0) job_ptr->details->cpus_per_task = 1; for (tid = 0, i = job_ptr->details->cpus_per_task ; (tid < maxtasks); @@ -194,7 +257,16 @@ static int _compute_plane_dist(struct job_record *job_ptr) } /* sync up core bitmap with new CPU count using a best-fit approach - * on the available sockets + * on the available resources on each node + * + * "Best-fit" means: + * 1st priority: Use smallest number of boards with sufficient + * available CPUs + * 2nd priority: Use smallest number of sockets with sufficient + * available CPUs + * 3rd priority: Use board combination with the smallest number + * of available CPUs + * 4th priority: Use higher-numbered boards/sockets/cores first * * The CPU array contains the distribution of CPUs, which can include * virtual CPUs (hyperthreads) @@ -202,20 +274,53 @@ static int _compute_plane_dist(struct job_record *job_ptr) static void _block_sync_core_bitmap(struct job_record *job_ptr, const uint16_t cr_type) { - uint32_t c, s, i, j, n, size, csize, core_cnt; + uint32_t c, s, i, j, n, b, z, size, csize, core_cnt; uint16_t cpus, num_bits, vpus = 1; job_resources_t *job_res = job_ptr->job_resrcs; bool alloc_cores = false, alloc_sockets = false; uint16_t ntasks_per_core = 0xffff; + int count, cpu_min, b_min, elig, s_min, comb_idx, sock_idx; + int elig_idx, comb_brd_idx, sock_list_idx, comb_min, board_num; + int* boards_cpu_cnt; + int* sort_brds_cpu_cnt; int* sockets_cpu_cnt; + int* board_combs; + int* socket_list; + int* elig_brd_combs; + int* elig_cpu_cnt; bool* sockets_used; + uint16_t boards_nb; + uint16_t nboards_nb; uint16_t sockets_nb; uint16_t ncores_nb; uint16_t nsockets_nb; + uint16_t sock_per_brd; + uint16_t sock_per_comb; uint16_t req_cpus,best_fit_cpus = 0; uint32_t best_fit_location = 0; + uint64_t ncomb_brd; bool sufficient,best_fit_sufficient; + /* qsort compare function for ascending int list */ + int _cmp_int_ascend (const void *a, const void *b) + { + return (*(int*)a - *(int*)b); + } + + /* qsort compare function for descending int list */ + int _cmp_int_descend (const void *a, const void *b) + { + return (*(int*)b - *(int*)a); + } + + /* qsort compare function for board combination socket + * list */ + int _cmp_sock (const void *a, const void *b) + { + return (sockets_cpu_cnt[*(int*)b] - + sockets_cpu_cnt[*(int*)a]); + } + if (!job_res) return; @@ -246,6 +351,9 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, sockets_nb = select_node_record[0].sockets; sockets_cpu_cnt = xmalloc(sockets_nb * sizeof(int)); sockets_used = xmalloc(sockets_nb * sizeof(bool)); + boards_nb = select_node_record[0].boards; + boards_cpu_cnt = xmalloc(boards_nb * sizeof(int)); + sort_brds_cpu_cnt = xmalloc(boards_nb * sizeof(int)); for (c = 0, i = 0, n = 0; n < size; n++) { @@ -255,33 +363,163 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, core_cnt = 0; ncores_nb = select_node_record[n].cores; nsockets_nb = select_node_record[n].sockets; + nboards_nb = select_node_record[n].boards; num_bits = nsockets_nb * ncores_nb; if ((c + num_bits) > csize) - fatal ("cons_res: _block_sync_core_bitmap index error"); + fatal("cons_res: _block_sync_core_bitmap index error"); cpus = job_res->cpus[i]; vpus = MIN(select_node_record[n].vpus, ntasks_per_core); + if (nboards_nb > MAX_BOARDS) { + debug3("cons_res: node[%u]: exceeds max boards; " + "doing best-fit across sockets only", n); + nboards_nb = 1; + } + if ( nsockets_nb > sockets_nb) { sockets_nb = nsockets_nb; xrealloc(sockets_cpu_cnt, sockets_nb * sizeof(int)); xrealloc(sockets_used,sockets_nb * sizeof(bool)); } - /* count cores provided by each socket */ + if ( nboards_nb > boards_nb) { + boards_nb = nboards_nb; + xrealloc(boards_cpu_cnt, boards_nb * sizeof(int)); + xrealloc(sort_brds_cpu_cnt, boards_nb * sizeof(int)); + } + + /* Count available cores on each socket and board */ + sock_per_brd = nsockets_nb / nboards_nb; + for (b = 0; b < nboards_nb; b++) { + boards_cpu_cnt[b] = 0; + sort_brds_cpu_cnt[b] = 0; + } for (s = 0; s < nsockets_nb; s++) { sockets_cpu_cnt[s]=0; sockets_used[s]=false; + b = s/sock_per_brd; for ( j = c + (s * ncores_nb) ; j < c + ((s+1) * ncores_nb) ; j++ ) { - if ( bit_test(job_res->core_bitmap,j) ) + if ( bit_test(job_res->core_bitmap,j) ) { sockets_cpu_cnt[s]++; + boards_cpu_cnt[b]++; + sort_brds_cpu_cnt[b]++; + } } } - /* select cores in the sockets using a best-fit approach */ + /* Sort boards in descending order of available core count */ + qsort(sort_brds_cpu_cnt, nboards_nb, sizeof (int), + _cmp_int_descend); + /* Determine minimum number of boards required for the + * allocation (b_min) */ + count = 0; + for (b = 0; b < nboards_nb; b++) { + count+=sort_brds_cpu_cnt[b]; + if (count >= cpus) + break; + } + b_min = b+1; + sock_per_comb = b_min * sock_per_brd; + + /* Allocate space for list of board combinations */ + ncomb_brd = comb_counts[nboards_nb-1][b_min-1]; + board_combs = xmalloc(ncomb_brd * b_min * sizeof(int)); + /* Generate all combinations of b_min boards on the node */ + _gen_combs(board_combs, nboards_nb, b_min); + + /* Determine which combinations have enough available cores + * for the allocation (eligible board combinations) + */ + elig_brd_combs = xmalloc(ncomb_brd * sizeof(int)); + elig_cpu_cnt = xmalloc(ncomb_brd * sizeof(int)); + elig = 0; + for (comb_idx = 0; comb_idx < ncomb_brd; comb_idx++) { + count = 0; + for (comb_brd_idx = 0; comb_brd_idx < b_min; + comb_brd_idx++) { + board_num = board_combs[(comb_idx * b_min) + + comb_brd_idx]; + count += boards_cpu_cnt[board_num]; + } + if (count >= cpus) { + elig_brd_combs[elig] = comb_idx; + elig_cpu_cnt[elig] = count; + elig++; + } + } + + /* Allocate space for list of sockets for each eligible board + * combination */ + socket_list = xmalloc(elig * sock_per_comb * sizeof(int)); + + /* Generate sorted list of sockets for each eligible board + * combination, and find combination with minimum number + * of sockets and minimum number of cpus required for the + * allocation + */ + s_min = sock_per_comb; + comb_min = 0; + cpu_min = sock_per_comb * ncores_nb; + for (elig_idx = 0; elig_idx < elig; elig_idx++) { + comb_idx = elig_brd_combs[elig_idx]; + for (comb_brd_idx = 0; comb_brd_idx < b_min; + comb_brd_idx++) { + board_num = board_combs[(comb_idx * b_min) + + comb_brd_idx]; + sock_list_idx = (elig_idx * sock_per_comb) + + (comb_brd_idx * sock_per_brd); + for (sock_idx = 0; sock_idx < sock_per_brd; + sock_idx++) { + socket_list[sock_list_idx + sock_idx] + = (board_num * sock_per_brd) + + sock_idx; + } + } + /* Sort this socket list in descending order of + * available core count */ + qsort(&socket_list[elig_idx*sock_per_comb], + sock_per_comb, sizeof (int), _cmp_sock); + /* Determine minimum number of sockets required for + * the allocation from this socket list */ + count = 0; + for (b = 0; b < sock_per_comb; b++) { + sock_idx = + socket_list[(int)((elig_idx*sock_per_comb)+b)]; + count+=sockets_cpu_cnt[sock_idx]; + if (count >= cpus) + break; + } + b++; + /* Use board combination with minimum number + * of required sockets and minimum number of CPUs + */ + if ((b < s_min) || + (b == s_min && elig_cpu_cnt[elig_idx] + <= cpu_min)) { + s_min = b; + comb_min = elig_idx; + cpu_min = elig_cpu_cnt[elig_idx]; + } + } + debug3("cons_res: best_fit: node[%u]: required cpus: %u, " + "min req boards: %u,", n, cpus, b_min); + debug3("cons_res: best_fit: node[%u]: min req sockets: %u, " + "min avail cpus: %u", n, s_min, cpu_min); + /* Re-sort socket list for best-fit board combination in + * ascending order of socket number */ + qsort(&socket_list[comb_min * sock_per_comb], sock_per_comb, + sizeof (int), _cmp_int_ascend); + + xfree(board_combs); + xfree(elig_brd_combs); + xfree(elig_cpu_cnt); + + /* select cores from the sockets of the best-fit board + * combination using a best-fit approach */ while( cpus > 0 ) { best_fit_cpus = 0; @@ -295,7 +533,8 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, /* search for the best socket, */ /* starting from the last one to let more room */ /* in the first one for system usage */ - for ( s = nsockets_nb - 1 ; (int) s >= (int) 0 ; s-- ) { + for ( z = sock_per_comb-1; (int) z >= (int) 0; z-- ) { + s = socket_list[(comb_min*sock_per_comb)+z]; sufficient = sockets_cpu_cnt[s] >= req_cpus ; if ( (best_fit_cpus == 0) || (sufficient && !best_fit_sufficient ) || @@ -313,9 +552,10 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, if ( best_fit_cpus == 0 ) break; - debug3("dist_task: best_fit : using node[%u]:" - "socket[%u] : %u cores available", - n, best_fit_location, + debug3("cons_res: best_fit: using node[%u]: " + "board[%u]: socket[%u]: %u cores available", + n, best_fit_location/sock_per_brd, + best_fit_location, sockets_cpu_cnt[best_fit_location]); /* select socket cores from last to first */ @@ -373,6 +613,7 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, } + xfree(socket_list); if (cpus > 0) { /* cpu count should NEVER be greater than the number * of set bits in the core bitmap for a given node */ @@ -392,11 +633,12 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, } + xfree(boards_cpu_cnt); + xfree(sort_brds_cpu_cnt); xfree(sockets_cpu_cnt); xfree(sockets_used); } - /* Sync up the core_bitmap with the CPU array using cyclic distribution * * The CPU array contains the distribution of CPUs, which can include diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index c3604a9bcf..e9cffa42f2 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -1933,6 +1933,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) struct config_record *config_ptr; config_ptr = node_ptr[i].config_ptr; select_node_record[i].cpus = config_ptr->cpus; + select_node_record[i].boards = config_ptr->boards; select_node_record[i].sockets = config_ptr->sockets; select_node_record[i].cores = config_ptr->cores; select_node_record[i].vpus = config_ptr->threads; @@ -1940,6 +1941,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) real_memory; } else { select_node_record[i].cpus = node_ptr[i].cpus; + select_node_record[i].boards = node_ptr[i].boards; select_node_record[i].sockets = node_ptr[i].sockets; select_node_record[i].cores = node_ptr[i].cores; select_node_record[i].vpus = node_ptr[i].threads; diff --git a/src/plugins/select/cons_res/select_cons_res.h b/src/plugins/select/cons_res/select_cons_res.h index 4cd80f0672..8fa6bb33a2 100644 --- a/src/plugins/select/cons_res/select_cons_res.h +++ b/src/plugins/select/cons_res/select_cons_res.h @@ -104,6 +104,7 @@ struct part_res_record { struct node_res_record { struct node_record *node_ptr; /* ptr to the actual node */ uint16_t cpus; /* count of processors configured */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* count of sockets configured */ uint16_t cores; /* count of cores configured */ uint16_t vpus; /* count of virtual cpus (hyperthreads) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index d2e8364c2d..7bc1922b05 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -452,7 +452,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) { struct node_record *node_ptr; uint16_t avail_cpus; - uint16_t cpus, sockets, cores, threads; + uint16_t cpus, boards, sockets, cores, threads; uint16_t cpus_per_task = 1; uint16_t ntasks_per_node = 0, ntasks_per_socket, ntasks_per_core; uint16_t min_sockets, min_cores, min_threads; @@ -482,19 +482,21 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) node_ptr = select_node_ptr + index; if (select_fast_schedule) { /* don't bother checking each node */ cpus = node_ptr->config_ptr->cpus; + boards = node_ptr->config_ptr->boards; sockets = node_ptr->config_ptr->sockets; cores = node_ptr->config_ptr->cores; threads = node_ptr->config_ptr->threads; } else { cpus = node_ptr->cpus; + boards = node_ptr->boards; sockets = node_ptr->sockets; cores = node_ptr->cores; threads = node_ptr->threads; } #if SELECT_DEBUG - info("host %s HW_ cpus %u sockets %u cores %u threads %u ", - node_ptr->name, cpus, sockets, cores, threads); + info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/sacct/Makefile.am b/src/sacct/Makefile.am index d203aaf3d8..7acfcb8670 100644 --- a/src/sacct/Makefile.am +++ b/src/sacct/Makefile.am @@ -9,7 +9,8 @@ bin_PROGRAMS = sacct sacct_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) -sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) noinst_HEADERS = sacct.c sacct_SOURCES = \ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index 49a681156d..75b11a1df1 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -321,7 +321,9 @@ AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* INCLUDES = -I$(top_srcdir) sacct_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) -sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + noinst_HEADERS = sacct.c sacct_SOURCES = \ options.c \ diff --git a/src/sacctmgr/Makefile.am b/src/sacctmgr/Makefile.am index 584b4b5856..9a887d4e6f 100644 --- a/src/sacctmgr/Makefile.am +++ b/src/sacctmgr/Makefile.am @@ -27,7 +27,8 @@ sacctmgr_SOURCES = \ wckey_functions.c \ problem_functions.c -sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sacctmgr_LDADD) : force diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index b8c78fd02f..3d0aab24b5 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -343,7 +343,9 @@ sacctmgr_SOURCES = \ wckey_functions.c \ problem_functions.c -sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/salloc/Makefile.am b/src/salloc/Makefile.am index 4ef6a74a51..885818538a 100644 --- a/src/salloc/Makefile.am +++ b/src/salloc/Makefile.am @@ -18,7 +18,8 @@ if HAVE_REAL_CRAY salloc_LDADD += -ljob endif -salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index a5a8c5ef09..cf83a3adbc 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) salloc_SOURCES = salloc.c salloc.h opt.c opt.h convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) salloc_LDADD = $(convenience_libs) $(am__append_1) -salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sattach/Makefile.am b/src/sattach/Makefile.am index 1f6b88518f..4ca5a0b3f3 100644 --- a/src/sattach/Makefile.am +++ b/src/sattach/Makefile.am @@ -17,7 +17,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sattach_LDADD = \ $(convenience_libs) -sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index b37d95d9da..c6a4ad49eb 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -327,7 +327,9 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sattach_LDADD = \ $(convenience_libs) -sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sbatch/Makefile.am b/src/sbatch/Makefile.am index 9b88be83fe..929c22bb3c 100644 --- a/src/sbatch/Makefile.am +++ b/src/sbatch/Makefile.am @@ -13,7 +13,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sbatch_LDADD = $(convenience_libs) -sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 88fa9e2897..80127584c0 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) sbatch_SOURCES = sbatch.c mult_cluster.c mult_cluster.h opt.c opt.h convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sbatch_LDADD = $(convenience_libs) -sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sbcast/Makefile.am b/src/sbcast/Makefile.am index 6ec2083e5e..166f66f80e 100644 --- a/src/sbcast/Makefile.am +++ b/src/sbcast/Makefile.am @@ -15,5 +15,6 @@ force: $(sbcast_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 271955d3a6..1e3e5dba44 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sbcast_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm noinst_HEADERS = sbcast.h sbcast_SOURCES = agent.c sbcast.c opts.c -sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/scancel/Makefile.am b/src/scancel/Makefile.am index f8aa1d75bd..7bd9beef04 100644 --- a/src/scancel/Makefile.am +++ b/src/scancel/Makefile.am @@ -11,7 +11,8 @@ scancel_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = scancel.h scancel_SOURCES = scancel.c opt.c -scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(scancel_LDADD) : force diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 75843922ab..131a7c944d 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) scancel_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = scancel.h scancel_SOURCES = scancel.c opt.c -scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/scontrol/Makefile.am b/src/scontrol/Makefile.am index af1c41183a..316506270a 100644 --- a/src/scontrol/Makefile.am +++ b/src/scontrol/Makefile.am @@ -27,7 +27,8 @@ scontrol_LDADD = \ $(convenience_libs) \ $(READLINE_LIBS) -scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 34ced407f7..3091c3a888 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -339,7 +339,9 @@ scontrol_LDADD = \ $(convenience_libs) \ $(READLINE_LIBS) -scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sdiag/Makefile.am b/src/sdiag/Makefile.am index 2f111e8a62..4b1a92c796 100644 --- a/src/sdiag/Makefile.am +++ b/src/sdiag/Makefile.am @@ -14,5 +14,6 @@ force: $(sdiag_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sdiag/Makefile.in b/src/sdiag/Makefile.in index bb3185235c..5128c731a7 100644 --- a/src/sdiag/Makefile.in +++ b/src/sdiag/Makefile.in @@ -318,7 +318,9 @@ AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sdiag_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sdiag_SOURCES = sdiag.c opts.c -sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sinfo/Makefile.am b/src/sinfo/Makefile.am index 96e06a97cb..aef1c160ef 100644 --- a/src/sinfo/Makefile.am +++ b/src/sinfo/Makefile.am @@ -15,5 +15,6 @@ force: $(sinfo_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 58d61f6a58..63f70c9950 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -323,7 +323,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sinfo_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = sinfo.h print.h sinfo_SOURCES = sinfo.c opts.c print.c sort.c -sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/slurmctld/Makefile.am b/src/slurmctld/Makefile.am index 67b463114d..db271915bd 100644 --- a/src/slurmctld/Makefile.am +++ b/src/slurmctld/Makefile.am @@ -66,7 +66,8 @@ sbin_PROGRAMS = slurmctld slurmctld_LDADD = \ $(top_builddir)/src/common/libdaemonize.la \ $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(slurmctld_LDADD) : force diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 6ec439aeab..2c08a1cac2 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -386,7 +386,9 @@ slurmctld_LDADD = \ $(top_builddir)/src/common/libdaemonize.la \ $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 5a16bd3245..6bd8656db5 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -101,7 +101,8 @@ #define JOB_HASH_INX(_job_id) (_job_id % hash_table_size) /* Change JOB_STATE_VERSION value when changing the state save format */ -#define JOB_STATE_VERSION "VER012" +#define JOB_STATE_VERSION "VER013" +#define JOB_2_5_STATE_VERSION "VER013" /* SLURM version 2.5 */ #define JOB_2_4_STATE_VERSION "VER012" /* SLURM version 2.4 */ #define JOB_2_3_STATE_VERSION "VER011" /* SLURM version 2.3 */ #define JOB_2_2_STATE_VERSION "VER010" /* SLURM version 2.2 */ @@ -624,6 +625,8 @@ extern int load_all_job_state(void) if (ver_str) { if (!strcmp(ver_str, JOB_STATE_VERSION)) { protocol_version = SLURM_PROTOCOL_VERSION; + } else if (!strcmp(ver_str, JOB_2_4_STATE_VERSION)) { + protocol_version = SLURM_2_4_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_3_STATE_VERSION)) { protocol_version = SLURM_2_3_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_2_STATE_VERSION)) { @@ -3491,6 +3494,7 @@ static int _part_access_check(struct part_record *part_ptr, { uint32_t total_nodes; + if ((part_ptr->flags & PART_FLAG_REQ_RESV) && (!job_desc->reservation || !strlen(job_desc->reservation))) { info("_part_access_check: uid %u access to partition %s " diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 714e3cfe9f..2595de55a3 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -82,7 +82,8 @@ #define MAX_RETRIES 10 /* Change NODE_STATE_VERSION value when changing the state save format */ -#define NODE_STATE_VERSION "VER005" +#define NODE_STATE_VERSION "VER006" +#define NODE_2_5_STATE_VERSION "VER006" /* SLURM version 2.5 */ #define NODE_2_4_STATE_VERSION "VER005" /* SLURM version 2.4 */ #define NODE_2_2_STATE_VERSION "VER004" /* SLURM version 2.2 & 2.3 */ #define NODE_2_1_STATE_VERSION "VER003" /* SLURM version 2.1 */ @@ -222,6 +223,7 @@ _dump_node_state (struct node_record *dump_node_ptr, Buf buffer) packstr (dump_node_ptr->gres, buffer); pack16 (dump_node_ptr->node_state, buffer); pack16 (dump_node_ptr->cpus, buffer); + pack16 (dump_node_ptr->boards, buffer); pack16 (dump_node_ptr->sockets, buffer); pack16 (dump_node_ptr->cores, buffer); pack16 (dump_node_ptr->threads, buffer); @@ -279,7 +281,7 @@ extern int load_all_node_state ( bool state_only ) char *features = NULL, *gres = NULL; int data_allocated, data_read = 0, error_code = 0, node_cnt = 0; uint16_t node_state; - uint16_t cpus = 1, sockets = 1, cores = 1, threads = 1; + uint16_t cpus = 1, boards = 1, sockets = 1, cores = 1, threads = 1; uint32_t real_memory, tmp_disk, data_size = 0, name_len; uint32_t reason_uid = NO_VAL; time_t reason_time = 0; @@ -334,6 +336,8 @@ extern int load_all_node_state ( bool state_only ) if (ver_str) { if (!strcmp(ver_str, NODE_STATE_VERSION)) { protocol_version = SLURM_PROTOCOL_VERSION; + } else if (!strcmp(ver_str, NODE_2_4_STATE_VERSION)) { + protocol_version = SLURM_2_4_PROTOCOL_VERSION; } else if (!strcmp(ver_str, NODE_2_2_STATE_VERSION)) { protocol_version = SLURM_2_2_PROTOCOL_VERSION; } else if (!strcmp(ver_str, NODE_2_1_STATE_VERSION)) { @@ -358,7 +362,30 @@ extern int load_all_node_state ( bool state_only ) while (remaining_buf (buffer) > 0) { uint16_t base_state; - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc (&comm_name, &name_len, buffer); + safe_unpackstr_xmalloc (&node_name, &name_len, buffer); + safe_unpackstr_xmalloc (&node_hostname, + &name_len, buffer); + safe_unpackstr_xmalloc (&reason, &name_len, buffer); + safe_unpackstr_xmalloc (&features, &name_len, buffer); + safe_unpackstr_xmalloc (&gres, &name_len, buffer); + safe_unpack16 (&node_state, buffer); + safe_unpack16 (&cpus, buffer); + safe_unpack16 (&boards, buffer); + safe_unpack16 (&sockets, buffer); + safe_unpack16 (&cores, buffer); + safe_unpack16 (&threads, buffer); + safe_unpack32 (&real_memory, buffer); + safe_unpack32 (&tmp_disk, buffer); + safe_unpack32 (&reason_uid, buffer); + safe_unpack_time (&reason_time, buffer); + if (gres_plugin_node_state_unpack( + &gres_list, buffer, node_name, + protocol_version) != SLURM_SUCCESS) + goto unpack_error; + base_state = node_state & NODE_STATE_BASE; + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { safe_unpackstr_xmalloc (&comm_name, &name_len, buffer); safe_unpackstr_xmalloc (&node_name, &name_len, buffer); safe_unpackstr_xmalloc (&node_hostname, @@ -418,13 +445,14 @@ extern int load_all_node_state ( bool state_only ) /* validity test as possible */ if ((cpus == 0) || + (boards == 0) || (sockets == 0) || (cores == 0) || (threads == 0) || (base_state >= NODE_STATE_END)) { - error ("Invalid data for node %s: procs=%u, " - "sockets=%u, cores=%u, threads=%u, state=%u", - node_name, cpus, + error ("Invalid data for node %s: procs=%u, boards=%u," + " sockets=%u, cores=%u, threads=%u, state=%u", + node_name, cpus, boards, sockets, cores, threads, node_state); error ("No more node data will be processed from the " "checkpoint file"); @@ -497,6 +525,7 @@ extern int load_all_node_state ( bool state_only ) /* Recover hardware state for powered * down nodes */ node_ptr->cpus = cpus; + node_ptr->boards = boards; node_ptr->sockets = sockets; node_ptr->cores = cores; node_ptr->threads = threads; @@ -743,7 +772,56 @@ extern void pack_all_node (char **buffer_ptr, int *buffer_size, static void _pack_node (struct node_record *dump_node_ptr, Buf buffer, uint16_t protocol_version) { - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + packstr (dump_node_ptr->name, buffer); + packstr (dump_node_ptr->node_hostname, buffer); + packstr (dump_node_ptr->comm_name, buffer); + pack16 (dump_node_ptr->node_state, buffer); + /* On a bluegene system always use the regular node + * infomation not what is in the config_ptr. + */ +#ifndef HAVE_BG + if (slurmctld_conf.fast_schedule) { + /* Only data from config_record used for scheduling */ + pack16(dump_node_ptr->config_ptr->cpus, buffer); + pack16(dump_node_ptr->config_ptr->boards, buffer); + pack16(dump_node_ptr->config_ptr->sockets, buffer); + pack16(dump_node_ptr->config_ptr->cores, buffer); + pack16(dump_node_ptr->config_ptr->threads, buffer); + pack32(dump_node_ptr->config_ptr->real_memory, buffer); + pack32(dump_node_ptr->config_ptr->tmp_disk, buffer); + } else { +#endif + /* Individual node data used for scheduling */ + pack16(dump_node_ptr->cpus, buffer); + pack16(dump_node_ptr->boards, buffer); + pack16(dump_node_ptr->sockets, buffer); + pack16(dump_node_ptr->cores, buffer); + pack16(dump_node_ptr->threads, buffer); + pack32(dump_node_ptr->real_memory, buffer); + pack32(dump_node_ptr->tmp_disk, buffer); +#ifndef HAVE_BG + } +#endif + pack32(dump_node_ptr->config_ptr->weight, buffer); + pack32(dump_node_ptr->reason_uid, buffer); + + pack_time(dump_node_ptr->boot_time, buffer); + pack_time(dump_node_ptr->reason_time, buffer); + pack_time(dump_node_ptr->slurmd_start_time, buffer); + + select_g_select_nodeinfo_pack(dump_node_ptr->select_nodeinfo, + buffer, protocol_version); + + packstr(dump_node_ptr->arch, buffer); + packstr(dump_node_ptr->features, buffer); + if (dump_node_ptr->gres) + packstr(dump_node_ptr->gres, buffer); + else + packstr(dump_node_ptr->config_ptr->gres, buffer); + packstr(dump_node_ptr->os, buffer); + packstr(dump_node_ptr->reason, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { packstr (dump_node_ptr->name, buffer); packstr (dump_node_ptr->node_hostname, buffer); packstr (dump_node_ptr->comm_name, buffer); @@ -1288,6 +1366,7 @@ struct config_record * _dup_config(struct config_record *config_ptr) new_config_ptr = create_config_record(); new_config_ptr->magic = config_ptr->magic; new_config_ptr->cpus = config_ptr->cpus; + new_config_ptr->boards = config_ptr->boards; new_config_ptr->sockets = config_ptr->sockets; new_config_ptr->cores = config_ptr->cores; new_config_ptr->threads = config_ptr->threads; @@ -1717,13 +1796,16 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) gres_plugin_node_state_log(node_ptr->gres_list, node_ptr->name); if (slurmctld_conf.fast_schedule != 2) { + int boards1, boards2; /* total boards on node */ int sockets1, sockets2; /* total sockets on node */ int cores1, cores2; /* total cores on node */ int threads1, threads2; /* total threads on node */ + boards1 = reg_msg->boards; sockets1 = reg_msg->sockets; cores1 = sockets1 * reg_msg->cores; threads1 = cores1 * reg_msg->threads; + boards2 = config_ptr->boards; sockets2 = config_ptr->sockets; cores2 = sockets2 * config_ptr->cores; threads2 = cores2 * config_ptr->threads; @@ -1780,6 +1862,7 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) } } if (error_code == SLURM_SUCCESS) { + node_ptr->boards = reg_msg->boards; node_ptr->sockets = reg_msg->sockets; node_ptr->cores = reg_msg->cores; node_ptr->threads = reg_msg->threads; @@ -2101,6 +2184,7 @@ extern int validate_nodes_via_front_end( } } + /* purge orphan batch jobs */ job_iterator = list_iterator_create(job_list); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 266dd06936..3cd547ac07 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1053,6 +1053,7 @@ static int _restore_node_state(int recover, node_ptr->cpus = old_node_ptr->cpus; node_ptr->cores = old_node_ptr->cores; node_ptr->last_idle = old_node_ptr->last_idle; + node_ptr->boards = old_node_ptr->boards; node_ptr->sockets = old_node_ptr->sockets; node_ptr->threads = old_node_ptr->threads; node_ptr->real_memory = old_node_ptr->real_memory; diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index a9d5982cb8..3264db053c 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -5,32 +5,32 @@ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Danny Auble * CODE-OCEC-09-009. All rights reserved. - * + * * This file is part of SLURM, a resource management program. * For details, see . * Please also read the included file: DISCLAIMER. - * + * * SLURM is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in + * version. If you delete this exception statement from all source files in * the program, then also delete it here. - * + * * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along * with SLURM; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -42,6 +42,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) { xassert(conf != NULL); packstr(conf->hostname, buffer); + pack16(conf->boards, buffer); pack16(conf->sockets, buffer); pack16(conf->cores, buffer); pack16(conf->threads, buffer); @@ -55,6 +56,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) packstr(conf->task_prolog, buffer); packstr(conf->task_epilog, buffer); pack16(conf->job_acct_gather_freq, buffer); + packstr(conf->job_acct_gather_type, buffer); pack16(conf->propagate_prio, buffer); pack32(conf->debug_flags, buffer); pack32(conf->debug_level, buffer); @@ -72,6 +74,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) uint32_t uint32_tmp; safe_unpackstr_xmalloc(&conf->hostname, &uint32_tmp, buffer); + safe_unpack16(&conf->boards, buffer); safe_unpack16(&conf->sockets, buffer); safe_unpack16(&conf->cores, buffer); safe_unpack16(&conf->threads, buffer); @@ -85,6 +88,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpackstr_xmalloc(&conf->task_prolog, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->task_epilog, &uint32_tmp, buffer); safe_unpack16(&conf->job_acct_gather_freq, buffer); + safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, buffer); safe_unpack16(&conf->propagate_prio, buffer); safe_unpack32(&conf->debug_flags, buffer); safe_unpack32(&uint32_tmp, buffer); diff --git a/src/slurmd/slurmd/Makefile.am b/src/slurmd/slurmd/Makefile.am index 7d81740c4f..a9f6ff2d0c 100644 --- a/src/slurmd/slurmd/Makefile.am +++ b/src/slurmd/slurmd/Makefile.am @@ -27,9 +27,11 @@ slurmd_SOURCES = $(SLURMD_SOURCES) if HAVE_AIX # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 else -slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) endif force: diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index c76d154ab0..43158aa140 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -336,11 +336,15 @@ SLURMD_SOURCES = \ xcpu.c xcpu.h slurmd_SOURCES = $(SLURMD_SOURCES) -@HAVE_AIX_FALSE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@HAVE_AIX_FALSE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_FALSE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -@HAVE_AIX_TRUE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +@HAVE_AIX_TRUE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 + all: all-am .SUFFIXES: diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index bbf066249d..0220d127cf 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -838,6 +838,7 @@ _check_job_credential(launch_tasks_request_msg_t *req, uid_t uid, } host_index = hostset_find(j_hset, conf->node_name); hostset_destroy(j_hset); + if ((host_index < 0) || (host_index >= arg.job_nhosts)) { error("job cr credential invalid host_index %d for " "job %u", host_index, arg.jobid); @@ -2208,6 +2209,7 @@ _rpc_daemon_status(slurm_msg_t *msg) resp = xmalloc(sizeof(slurmd_status_t)); resp->actual_cpus = conf->actual_cpus; + resp->actual_boards = conf->actual_boards; resp->actual_sockets = conf->actual_sockets; resp->actual_cores = conf->actual_cores; resp->actual_threads = conf->actual_threads; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 669907a6ae..64e4028b97 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -579,6 +579,7 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) msg->node_name = xstrdup (conf->node_name); msg->cpus = conf->cpus; + msg->boards = conf->boards; msg->sockets = conf->sockets; msg->cores = conf->cores; msg->threads = conf->threads; @@ -600,15 +601,17 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) if (first_msg) { first_msg = false; - info("CPUs=%u Sockets=%u Cores=%u Threads=%u " + info("Procs=%u Boards=%u Sockets=%u Cores=%u Threads=%u " "Memory=%u TmpDisk=%u Uptime=%u", - msg->cpus, msg->sockets, msg->cores, msg->threads, - msg->real_memory, msg->tmp_disk, msg->up_time); + msg->cpus, msg->boards, msg->sockets, msg->cores, + msg->threads, msg->real_memory, msg->tmp_disk, + msg->up_time); } else { - debug3("CPUs=%u Sockets=%u Cores=%u Threads=%u " + debug3("Procs=%u Boards=%u Sockets=%u Cores=%u Threads=%u " "Memory=%u TmpDisk=%u Uptime=%u", - msg->cpus, msg->sockets, msg->cores, msg->threads, - msg->real_memory, msg->tmp_disk, msg->up_time); + msg->cpus, msg->boards, msg->sockets, msg->cores, + msg->threads, msg->real_memory, msg->tmp_disk, + msg->up_time); } uname(&buf); if ((arch = getenv("SLURM_ARCH"))) @@ -662,7 +665,6 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) } list_iterator_destroy(i); list_destroy(steps); - msg->timestamp = time(NULL); return; @@ -881,9 +883,10 @@ _read_config(void) } conf->port = slurm_conf_get_port(conf->node_name); - slurm_conf_get_cpus_sct(conf->node_name, - &conf->conf_cpus, &conf->conf_sockets, - &conf->conf_cores, &conf->conf_threads); + slurm_conf_get_cpus_bsct(conf->node_name, + &conf->conf_cpus, &conf->conf_boards, + &conf->conf_sockets, &conf->conf_cores, + &conf->conf_threads); /* store hardware properties in slurmd_config */ xfree(conf->block_map); @@ -904,6 +907,7 @@ _read_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, @@ -918,6 +922,7 @@ _read_config(void) * Report actual hardware configuration, irrespective of FastSchedule. */ conf->cpus = conf->actual_cpus; + conf->boards = conf->actual_boards; conf->sockets = conf->actual_sockets; conf->cores = conf->actual_cores; conf->threads = conf->actual_threads; @@ -932,11 +937,13 @@ _read_config(void) ((cf->fast_schedule == 1) && (conf->actual_cpus < conf->conf_cpus))) { conf->cpus = conf->actual_cpus; + conf->boards = conf->actual_boards; conf->sockets = conf->actual_sockets; conf->cores = conf->actual_cores; conf->threads = conf->actual_threads; } else { conf->cpus = conf->conf_cpus; + conf->boards = conf->conf_boards; conf->sockets = conf->conf_sockets; conf->cores = conf->conf_cores; conf->threads = conf->conf_threads; @@ -1109,6 +1116,10 @@ _print_conf(void) conf->cpus, conf->conf_cpus, conf->actual_cpus); + debug3("Boards = %-2u (CF: %2u, HW: %2u)", + conf->boards, + conf->conf_boards, + conf->actual_boards); debug3("Sockets = %-2u (CF: %2u, HW: %2u)", conf->sockets, conf->conf_sockets, @@ -1251,6 +1262,7 @@ _print_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h index b255430060..124f97bf4f 100644 --- a/src/slurmd/slurmd/slurmd.h +++ b/src/slurmd/slurmd/slurmd.h @@ -77,14 +77,17 @@ typedef struct slurmd_config { int *argc; /* pointer to argument count */ char *hostname; /* local hostname */ uint16_t cpus; /* lowest-level logical processors */ - uint16_t sockets; /* sockets count */ - uint16_t cores; /* core count */ + uint16_t boards; /* total boards count */ + uint16_t sockets; /* total sockets count */ + uint16_t cores; /* core per socket count */ uint16_t threads; /* thread per core count */ uint16_t conf_cpus; /* conf file logical processors */ + uint16_t conf_boards; /* conf file boards count */ uint16_t conf_sockets; /* conf file sockets count */ uint16_t conf_cores; /* conf file core count */ uint16_t conf_threads; /* conf file thread per core count */ uint16_t actual_cpus; /* actual logical processors */ + uint16_t actual_boards; /* actual boards count */ uint16_t actual_sockets; /* actual sockets count */ uint16_t actual_cores; /* actual core count */ uint16_t actual_threads; /* actual thread per core count */ @@ -120,7 +123,7 @@ typedef struct slurmd_config { pid_t pid; /* server pid */ log_options_t log_opts; /* current logging options */ int debug_level; /* logging detail level */ - uint32_t debug_flags; /* DebugFlags configured */ + uint32_t debug_flags; /* DebugFlags configured */ int daemonize:1; /* daemonize flag */ int cleanstart:1; /* clean start requested (-c) */ int mlock_pages:1; /* mlock() slurmd */ @@ -131,6 +134,7 @@ typedef struct slurmd_config { uid_t slurm_user_id; /* UID that slurmctld runs as */ pthread_mutex_t config_mutex; /* lock for slurmd_config access */ uint16_t job_acct_gather_freq; + char *job_acct_gather_type; /* job accounting gather type */ uint16_t use_pam; uint16_t task_plugin_param; /* TaskPluginParams, expressed * using cpu_bind_type_t flags */ diff --git a/src/slurmd/slurmstepd/Makefile.am b/src/slurmd/slurmstepd/Makefile.am index 31d7b1ae53..38794ef49c 100644 --- a/src/slurmd/slurmstepd/Makefile.am +++ b/src/slurmd/slurmstepd/Makefile.am @@ -30,9 +30,11 @@ slurmstepd_SOURCES = \ if HAVE_AIX # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 else -slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) endif force: diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index 2bed7c4ab0..9126d0a77d 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -342,11 +342,15 @@ slurmstepd_SOURCES = \ multi_prog.c multi_prog.h \ step_terminate_monitor.c step_terminate_monitor.h -@HAVE_AIX_FALSE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@HAVE_AIX_FALSE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_FALSE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -@HAVE_AIX_TRUE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +@HAVE_AIX_TRUE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 + all: all-am .SUFFIXES: diff --git a/src/slurmdbd/Makefile.am b/src/slurmdbd/Makefile.am index 15a91a5727..caac3a1e10 100644 --- a/src/slurmdbd/Makefile.am +++ b/src/slurmdbd/Makefile.am @@ -27,7 +27,8 @@ slurmdbd_SOURCES = \ slurmdbd.c \ slurmdbd.h -slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(slurmdbd_LDADD) : force diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 2824dee0a9..2c090e71ed 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -337,7 +337,9 @@ slurmdbd_SOURCES = \ slurmdbd.c \ slurmdbd.h -slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/smap/Makefile.am b/src/smap/Makefile.am index 67438cfbc9..4b8ff3c653 100644 --- a/src/smap/Makefile.am +++ b/src/smap/Makefile.am @@ -33,7 +33,8 @@ force: $(smap_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) else diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index bf332c58e4..3c836f7f7f 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -346,7 +346,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) @BUILD_SMAP_TRUE@smap_LDADD = $(top_builddir)/src/api/libslurm.o \ @BUILD_SMAP_TRUE@ $(DL_LIBS) $(am__append_1) @BLUEGENE_LOADED_TRUE@@BUILD_SMAP_TRUE@bg_dir = $(top_builddir)/src/plugins/select/bluegene -@BUILD_SMAP_TRUE@smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@BUILD_SMAP_TRUE@smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@BUILD_SMAP_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + @BUILD_SMAP_FALSE@EXTRA_smap_SOURCES = smap.h smap.c \ @BUILD_SMAP_FALSE@ job_functions.c partition_functions.c \ @BUILD_SMAP_FALSE@ configure_functions.c grid_functions.c \ diff --git a/src/sprio/Makefile.am b/src/sprio/Makefile.am index a2d2abe194..c7d76bd214 100644 --- a/src/sprio/Makefile.am +++ b/src/sprio/Makefile.am @@ -16,5 +16,6 @@ force: $(sprio_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index dd51693a8e..1da78935b4 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) sprio_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = sprio.h print.h sprio_SOURCES = sprio.c print.c opts.c -sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/squeue/Makefile.am b/src/squeue/Makefile.am index ee56435c11..9ce4fbcf6d 100644 --- a/src/squeue/Makefile.am +++ b/src/squeue/Makefile.am @@ -16,5 +16,6 @@ force: $(squeue_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index c52b9254bc..6bbbccc521 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -323,7 +323,9 @@ INCLUDES = -I$(top_srcdir) squeue_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = squeue.h print.h squeue_SOURCES = squeue.c print.c opts.c sort.c -squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sreport/Makefile.am b/src/sreport/Makefile.am index cfec9b4cae..d648f745e9 100644 --- a/src/sreport/Makefile.am +++ b/src/sreport/Makefile.am @@ -20,7 +20,8 @@ sreport_LDADD = \ $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) \ $(READLINE_LIBS) -sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sreport_LDADD) : force diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 7e05ef0171..46de7be61d 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -331,7 +331,9 @@ sreport_LDADD = \ $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) \ $(READLINE_LIBS) -sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 2098245a26..6cf3e306f7 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -18,7 +18,8 @@ srun_SOURCES = \ srun.wrapper.c srun_LDADD = $(convenience_libs) $(DL_LIBS) -srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) if BGQ_LOADED # because totalview needs the libraries on load we link in srun diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 65f0fd6cc1..53c17081c1 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -368,7 +368,8 @@ srun_SOURCES = \ srun.wrapper.c srun_LDADD = $(convenience_libs) $(DL_LIBS) -srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(am__append_1) +srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(HWLOC_LDFLAGS) \ + $(HWLOC_LIBS) $(am__append_1) all: all-recursive .SUFFIXES: diff --git a/src/srun_cr/Makefile.am b/src/srun_cr/Makefile.am index f4f3ec9038..baffd46287 100644 --- a/src/srun_cr/Makefile.am +++ b/src/srun_cr/Makefile.am @@ -13,7 +13,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) srun_cr_LDADD = $(convenience_libs) $(BLCR_LIBS) -srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) +srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index b49e9095d3..c4305d467b 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -320,7 +320,9 @@ INCLUDES = -I$(top_srcdir) $(BLCR_CPPFLAGS) srun_cr_SOURCES = srun_cr.c convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) srun_cr_LDADD = $(convenience_libs) $(BLCR_LIBS) -srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) +srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sshare/Makefile.am b/src/sshare/Makefile.am index 805f758484..59c3d566e7 100644 --- a/src/sshare/Makefile.am +++ b/src/sshare/Makefile.am @@ -15,7 +15,8 @@ sshare_SOURCES = \ process.c \ sshare.c sshare.h -sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sshare_LDADD) : force diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 2e7b0b7b8d..f825a82588 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -324,7 +324,9 @@ sshare_SOURCES = \ process.c \ sshare.c sshare.h -sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sstat/Makefile.am b/src/sstat/Makefile.am index b01ba0b0b7..e84a6aeaef 100644 --- a/src/sstat/Makefile.am +++ b/src/sstat/Makefile.am @@ -19,5 +19,6 @@ force: $(sstat_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 5c6c2908af..fcdd90b2ab 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -324,7 +324,9 @@ sstat_SOURCES = \ sstat.c \ sstat.h -sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/strigger/Makefile.am b/src/strigger/Makefile.am index 90ddadcddb..d8816ac5fc 100644 --- a/src/strigger/Makefile.am +++ b/src/strigger/Makefile.am @@ -15,5 +15,6 @@ force: $(strigger_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 8e20bba94e..4346da8df8 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) strigger_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = strigger.h strigger_SOURCES = strigger.c opts.c -strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sview/Makefile.am b/src/sview/Makefile.am index 2896382706..3e767db2b2 100644 --- a/src/sview/Makefile.am +++ b/src/sview/Makefile.am @@ -21,7 +21,8 @@ force: $(sview_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) +sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) sview_CFLAGS = $(GTK_CFLAGS) else diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index e76217f209..3651b257ff 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -350,7 +350,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) @BUILD_SVIEW_TRUE@ submit_info.c admin_info.c common.c \ @BUILD_SVIEW_TRUE@ config_info.c defaults.c -@BUILD_SVIEW_TRUE@sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) +@BUILD_SVIEW_TRUE@sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) \ +@BUILD_SVIEW_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + @BUILD_SVIEW_TRUE@sview_CFLAGS = $(GTK_CFLAGS) @BUILD_SVIEW_FALSE@EXTRA_sview_SOURCES = sview.h sview.c popups.c grid.c part_info.c job_info.c \ @BUILD_SVIEW_FALSE@ block_info.c front_end_info.c node_info.c resv_info.c \ diff --git a/src/sview/node_info.c b/src/sview/node_info.c index cbaa3347bc..b5ed2d7728 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -42,6 +42,7 @@ int g_node_scaling = 1; enum { SORTID_POS = POS_LOC, SORTID_ARCH, + SORTID_BOARDS, SORTID_BOOT_TIME, SORTID_COLOR, SORTID_CPUS, @@ -108,10 +109,12 @@ static display_data_t display_data_node[] = { EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_STRING, SORTID_ERR_CPUS, "Error CPU Count", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, - {G_TYPE_INT, SORTID_CORES, "CoresPerSocket", FALSE, + {G_TYPE_INT, SORTID_BOARDS, "Boards", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_INT, SORTID_SOCKETS, "Sockets", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, + {G_TYPE_INT, SORTID_CORES, "CoresPerSocket", FALSE, + EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_INT, SORTID_THREADS, "ThreadsPerCore", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_STRING, SORTID_MEMORY, "Real Memory", FALSE, @@ -256,12 +259,11 @@ static void _layout_node_record(GtkTreeView *treeview, lower); xfree(lower); - - convert_num_unit((float)node_ptr->cores, tmp_cnt, sizeof(tmp_cnt), + convert_num_unit((float)node_ptr->boards, tmp_cnt, sizeof(tmp_cnt), UNIT_NONE); add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_node, - SORTID_CORES), + SORTID_BOARDS), tmp_cnt); convert_num_unit((float)node_ptr->sockets, tmp_cnt, sizeof(tmp_cnt), @@ -271,6 +273,13 @@ static void _layout_node_record(GtkTreeView *treeview, SORTID_SOCKETS), tmp_cnt); + convert_num_unit((float)node_ptr->cores, tmp_cnt, sizeof(tmp_cnt), + UNIT_NONE); + add_display_treestore_line(update, treestore, &iter, + find_col_name(display_data_node, + SORTID_CORES), + tmp_cnt); + convert_num_unit((float)node_ptr->threads, tmp_cnt, sizeof(tmp_cnt), UNIT_NONE); add_display_treestore_line(update, treestore, &iter, @@ -382,6 +391,7 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr, /* Combining these records provides a slight performance improvement */ gtk_tree_store_set(treestore, &sview_node_info_ptr->iter_ptr, SORTID_ARCH, node_ptr->arch, + SORTID_BOARDS, node_ptr->boards, SORTID_BOOT_TIME, sview_node_info_ptr->boot_time, SORTID_COLOR, sview_colors[sview_node_info_ptr->pos -- GitLab From 54de9b9dd8c100d06ae2a62f9568b9caf0e31fe7 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 16:58:36 -0700 Subject: [PATCH 604/614] Fix various compiler warnings and formatting issues in the boards code --- doc/man/man5/slurm.conf.5 | 2 +- src/api/node_info.c | 2 +- src/common/read_config.c | 61 +++++++++---------- src/common/slurm_protocol_pack.c | 4 +- src/common/xcpuinfo.c | 18 +++--- src/plugins/select/cons_res/select_cons_res.c | 4 +- src/plugins/select/linear/select_linear.c | 4 +- src/slurmctld/node_mgr.c | 3 - src/slurmd/common/slurmstepd_init.c | 6 +- 9 files changed, 51 insertions(+), 53 deletions(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index a14829e4e4..76d755ea8d 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1625,7 +1625,7 @@ thread on nodes with more than one \fBThreadsPerCore\fR configured. .TP \fBCR_CORE_DEFAULT_DIST_BLOCK\fR Allocate cores within a node using block distribution by default. -This is a pseudo-best-fit algorithm that minimizes the number of +This is a pseudo\-best\-fit algorithm that minimizes the number of boards and minimizes the number of sockets (within minimum boards) used for the allocation. This default behavior can be overridden specifying a particular diff --git a/src/api/node_info.c b/src/api/node_info.c index d044820386..185cebf1c2 100644 --- a/src/api/node_info.c +++ b/src/api/node_info.c @@ -241,7 +241,7 @@ slurm_sprint_node_table (node_info_t * node_ptr, } snprintf(tmp_line, sizeof(tmp_line), "RealMemory=%u Sockets=%u Boards=%u", - node_ptr->real_memory, node_ptr->sockets,node_ptr->boards); + node_ptr->real_memory, node_ptr->sockets, node_ptr->boards); xstrcat(out, tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/common/read_config.c b/src/common/read_config.c index 256fdf874a..0d63521688 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -678,43 +678,38 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, if (!no_sockets_per_board) { n->sockets = sockets_per_board; } - if (!no_cpus && /* infer missing Sockets= */ - no_sockets) { - n->sockets = n->cpus / (n->cores * n->threads); - } - if (n->sockets == 0) { - /* make sure sockets is non-zero */ - error("NodeNames=%s Sockets=0 is invalid, " - "reset to 1", n->nodenames); - n->sockets = 1; - } - if (no_cpus) { /* infer missing CPUs= */ - n->cpus = n->sockets * n->cores * n->threads; - } + if (!no_cpus && /* infer missing Sockets= */ + no_sockets) { + n->sockets = n->cpus / (n->cores * n->threads); + } + if (n->sockets == 0) { /* make sure sockets != 0 */ + error("NodeNames=%s Sockets=0 is invalid, " + "reset to 1", n->nodenames); + n->sockets = 1; + } + if (no_cpus) { /* infer missing CPUs= */ + n->cpus = n->sockets * n->cores * n->threads; + } /* if only CPUs= and Sockets= * specified check for match */ - if (!no_cpus && - !no_sockets && - no_cores && - no_threads) { - if (n->cpus != n->sockets) { + if (!no_cpus && !no_sockets && + no_cores && no_threads && + (n->cpus != n->sockets)) { n->sockets = n->cpus; - error("NodeNames=%s CPUs " - "doesn't match Sockets, " - "setting Sockets to %d", + error("NodeNames=%s CPUs doesn't match " + "Sockets, setting Sockets to %d", n->nodenames, n->sockets); } - } - computed_procs = n->sockets * n->cores * n->threads; - if ((n->cpus != n->sockets) && - (n->cpus != n->sockets * n->cores) && - (n->cpus != computed_procs)) { - error("NodeNames=%s CPUs=%d doesn't match " + computed_procs = n->sockets * n->cores * n->threads; + if ((n->cpus != n->sockets) && + (n->cpus != n->sockets * n->cores) && + (n->cpus != computed_procs)) { + error("NodeNames=%s CPUs=%d doesn't match " "Sockets*CoresPerSocket*ThreadsPerCore " "(%d), resetting CPUs", - n->nodenames, n->cpus, computed_procs); - n->cpus = computed_procs; - } + n->nodenames, n->cpus, computed_procs); + n->cpus = computed_procs; + } } else { /* In this case Boards=# is used. * CPUs=# or Procs=# are ignored. @@ -754,7 +749,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, } else { n->sockets = n->boards; } - // Node boards factored into sockets + /* Node boards factored into sockets */ n->cpus = n->sockets * n->cores * n->threads; } @@ -2291,7 +2286,7 @@ static void _init_slurm_conf(const char *file_name) if (name == NULL) name = default_slurm_config_file; } - if(conf_initialized) { + if (conf_initialized) { error("the conf_hashtbl is already inited"); } conf_hashtbl = s_p_hashtbl_create(slurm_conf_options); @@ -2516,7 +2511,7 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) * the cluster name is lower case since sacctmgr makes sure * this is the case as well. */ - if(conf->cluster_name) { + if (conf->cluster_name) { int i; for (i = 0; conf->cluster_name[i] != '\0'; i++) conf->cluster_name[i] = diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index c37401f715..0d932f4998 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2394,7 +2394,7 @@ _pack_node_registration_status_msg(slurm_node_registration_status_msg_t * uint32_t gres_info_size = 0; xassert(msg != NULL); - if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { pack_time(msg->timestamp, buffer); pack_time(msg->slurmd_start_time, buffer); pack32(msg->status, buffer); @@ -2503,7 +2503,7 @@ _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t node_reg_ptr = xmalloc(sizeof(slurm_node_registration_status_msg_t)); *msg = node_reg_ptr; - if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { /* unpack timestamp of snapshot */ safe_unpack_time(&node_reg_ptr->timestamp, buffer); safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); diff --git a/src/common/xcpuinfo.c b/src/common/xcpuinfo.c index c1fe1ccb80..ff42289e4d 100644 --- a/src/common/xcpuinfo.c +++ b/src/common/xcpuinfo.c @@ -67,12 +67,14 @@ #include "xcpuinfo.h" +#if !defined(HAVE_HWLOC) static char* _cpuinfo_path = "/proc/cpuinfo"; static int _compute_block_map(uint16_t numproc, uint16_t **block_map, uint16_t **block_map_inv); static int _chk_cpuinfo_str(char *buffer, char *keyword, char **valptr); static int _chk_cpuinfo_uint32(char *buffer, char *keyword, uint32_t *val); +#endif static int _ranges_conv(char* lrange, char** prange, int mode); static int _range_to_map(char* range, uint16_t *map, uint16_t map_size, @@ -173,27 +175,29 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, { hwloc_topology_t topology; hwloc_obj_t obj; - int depth; + int depth, i; + int boards, ncores, npu, nsockets; + /* Allocate and initialize topology object. */ hwloc_topology_init(&topology); /* Perform the topology detection. */ hwloc_topology_load(topology); - int boards = 1; + boards = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { boards = hwloc_get_nbobjs_by_depth(topology, depth); } *p_boards = boards; - int nsockets = 1; + nsockets = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_SOCKET); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { nsockets = hwloc_get_nbobjs_by_depth(topology, depth); } *p_sockets = nsockets; - int ncores = 1; + ncores = 1; *p_cores = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_CORE); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { @@ -201,7 +205,7 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, } *p_cores = ncores / nsockets; - int npu = 1; + npu = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { npu = hwloc_get_nbobjs_by_depth(topology, depth); @@ -213,12 +217,10 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, * retval = _compute_block_map(*block_map_size, * block_map, block_map_inv); */ - uint16_t i; /* Compute abstract->machine block mapping (and inverse) */ if (block_map) { *block_map = xmalloc(npu * sizeof(uint16_t)); - for (i=0; ios_index; } diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index e9cffa42f2..5d05269575 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -1933,7 +1933,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) struct config_record *config_ptr; config_ptr = node_ptr[i].config_ptr; select_node_record[i].cpus = config_ptr->cpus; - select_node_record[i].boards = config_ptr->boards; + select_node_record[i].boards = config_ptr->boards; select_node_record[i].sockets = config_ptr->sockets; select_node_record[i].cores = config_ptr->cores; select_node_record[i].vpus = config_ptr->threads; @@ -1941,7 +1941,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) real_memory; } else { select_node_record[i].cpus = node_ptr[i].cpus; - select_node_record[i].boards = node_ptr[i].boards; + select_node_record[i].boards = node_ptr[i].boards; select_node_record[i].sockets = node_ptr[i].sockets; select_node_record[i].cores = node_ptr[i].cores; select_node_record[i].vpus = node_ptr[i].threads; diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 7bc1922b05..622e8da60c 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -488,7 +488,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) threads = node_ptr->config_ptr->threads; } else { cpus = node_ptr->cpus; - boards = node_ptr->boards; + boards = node_ptr->boards; sockets = node_ptr->sockets; cores = node_ptr->cores; threads = node_ptr->threads; @@ -496,7 +496,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) #if SELECT_DEBUG info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", - node_ptr->name, cpus, boards, sockets, cores, threads); + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 2595de55a3..f1f4b7928d 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -1796,16 +1796,13 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) gres_plugin_node_state_log(node_ptr->gres_list, node_ptr->name); if (slurmctld_conf.fast_schedule != 2) { - int boards1, boards2; /* total boards on node */ int sockets1, sockets2; /* total sockets on node */ int cores1, cores2; /* total cores on node */ int threads1, threads2; /* total threads on node */ - boards1 = reg_msg->boards; sockets1 = reg_msg->sockets; cores1 = sockets1 * reg_msg->cores; threads1 = cores1 * reg_msg->threads; - boards2 = config_ptr->boards; sockets2 = config_ptr->sockets; cores2 = sockets2 * config_ptr->cores; threads2 = cores2 * config_ptr->threads; diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 3264db053c..708e3c6d80 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -38,6 +38,9 @@ #include "src/slurmd/common/slurmstepd_init.h" +/* Assume that the slurmd and slurmstepd are the same version level when slurmd + * starts slurmstepd, so we do not need to support different protocol versions + * for the different message formats. */ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) { xassert(conf != NULL); @@ -88,7 +91,8 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpackstr_xmalloc(&conf->task_prolog, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->task_epilog, &uint32_tmp, buffer); safe_unpack16(&conf->job_acct_gather_freq, buffer); - safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, + buffer); safe_unpack16(&conf->propagate_prio, buffer); safe_unpack32(&conf->debug_flags, buffer); safe_unpack32(&uint32_tmp, buffer); -- GitLab From b5e4cba31a70355d61b32608f8a4fe18b70d20f6 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 09:41:01 -0700 Subject: [PATCH 605/614] Boards logic, mostly cosmetic mods --- src/plugins/select/cons_res/dist_tasks.c | 4 ++-- src/plugins/select/linear/select_linear.c | 3 +++ src/slurmctld/read_config.c | 2 +- src/slurmd/slurmd/slurmd.c | 2 +- src/sview/node_info.c | 2 +- testsuite/expect/test4.12 | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 730bc6fe87..3ae3af650d 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -57,7 +57,7 @@ /* Combination counts * comb_counts[n-1][k-1] = number of combinations of - * k items from a set of n items + * k items from a set of n items * * Formula is n!/k!(n-k)! */ @@ -87,7 +87,7 @@ void _gen_combs(int *comb_list, int n, int k) /* Setup comb for the initial combination */ int i, b; for (i = 0; i < k; ++i) - comb[i] = i; + comb[i] = i; b = 0; /* Generate all the other combinations */ diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 622e8da60c..e2304d0986 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -497,6 +497,9 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) #if SELECT_DEBUG info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", node_ptr->name, cpus, boards, sockets, cores, threads); +#else + debug("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 3cd547ac07..563e2e47ec 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1053,7 +1053,7 @@ static int _restore_node_state(int recover, node_ptr->cpus = old_node_ptr->cpus; node_ptr->cores = old_node_ptr->cores; node_ptr->last_idle = old_node_ptr->last_idle; - node_ptr->boards = old_node_ptr->boards; + node_ptr->boards = old_node_ptr->boards; node_ptr->sockets = old_node_ptr->sockets; node_ptr->threads = old_node_ptr->threads; node_ptr->real_memory = old_node_ptr->real_memory; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 64e4028b97..df339cdaab 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -907,7 +907,7 @@ _read_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, - &conf->actual_boards, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, diff --git a/src/sview/node_info.c b/src/sview/node_info.c index b5ed2d7728..c9749f5916 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -391,7 +391,7 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr, /* Combining these records provides a slight performance improvement */ gtk_tree_store_set(treestore, &sview_node_info_ptr->iter_ptr, SORTID_ARCH, node_ptr->arch, - SORTID_BOARDS, node_ptr->boards, + SORTID_BOARDS, node_ptr->boards, SORTID_BOOT_TIME, sview_node_info_ptr->boot_time, SORTID_COLOR, sview_colors[sview_node_info_ptr->pos diff --git a/testsuite/expect/test4.12 b/testsuite/expect/test4.12 index 7832b683c5..e7a4d6a9c0 100755 --- a/testsuite/expect/test4.12 +++ b/testsuite/expect/test4.12 @@ -348,10 +348,10 @@ set inode_threads_per_core 0 set fd [open "|$scontrol --oneliner show node $def_hostlist"] exp_internal 1 while {[gets $fd line] != -1} { - if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+) State=IDLE ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { + if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+).*Boards=(\d+) State=IDLE ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { break } - if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+) State=IDLE.CLOUD ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { + if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+).*Boards=(\d+) State=IDLE.CLOUD ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { break } } -- GitLab From e94d37cf616b6f879d857c0b5dbc9352789c69fd Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 10:48:26 -0700 Subject: [PATCH 606/614] Fix to hostname/addr lookup infrastructure used by test7.3 with some configurations --- src/common/read_config.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/common/read_config.c b/src/common/read_config.c index e6cf62ae9b..cc56b4ff97 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -1656,15 +1656,20 @@ extern char *slurm_conf_get_nodename_from_addr(const char *node_addr) return NULL; } - start_name = xstrdup(hptr->h_name); - dot_ptr = strchr(start_name, '.'); - if (dot_ptr == NULL) - dot_ptr = start_name + strlen(start_name); - else - dot_ptr[0] = '\0'; + if (!strcmp(hptr->h_name, "localhost")) { + start_name = xshort_hostname(); + } else { + start_name = xstrdup(hptr->h_name); + dot_ptr = strchr(start_name, '.'); + if (dot_ptr == NULL) + dot_ptr = start_name + strlen(start_name); + else + dot_ptr[0] = '\0'; + } ret_name = slurm_conf_get_aliases(start_name); xfree(start_name); + return ret_name; } -- GitLab From ea94cf26ff48fa97d5ced7f96da0f3fb2ebb686c Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 11:02:39 -0700 Subject: [PATCH 607/614] cpu_freq set bug fix. Batch job will have environment variable set: "SLURM_CPU_FREQ_REQ=0" and this will be loaded and reported as an invalid value by srun. --- src/common/env.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/env.c b/src/common/env.c index de9099fe39..ab97a9c4e4 100644 --- a/src/common/env.c +++ b/src/common/env.c @@ -655,7 +655,9 @@ int setup_env(env_t *env, bool preserve_env) } } - if (env->cpu_freq != NO_VAL) { + if ((env->cpu_freq != NO_VAL) && /* Default value from srun */ + (env->cpu_freq != 0)) { /* Default value from slurmstepd + * for batch jobs */ int sts; char *str; -- GitLab From f846d54b37cc736b398142f440e19a644e692a23 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 12:45:29 -0700 Subject: [PATCH 608/614] Note how optional arguments to the commands are parsed in man pages --- doc/man/man1/salloc.1 | 48 +++++++++++++++------------ doc/man/man1/sprio.1 | 6 +++- doc/man/man1/squeue.1 | 11 +++++-- doc/man/man1/srun.1 | 72 ++++++++++++++++++++++------------------- doc/man/man1/strigger.1 | 5 ++- 5 files changed, 84 insertions(+), 58 deletions(-) diff --git a/doc/man/man1/salloc.1 b/doc/man/man1/salloc.1 index bd6ababbab..947c967065 100644 --- a/doc/man/man1/salloc.1 +++ b/doc/man/man1/salloc.1 @@ -21,8 +21,8 @@ section). If no command is specified, then the value of \fBSallocDefaultCommand\fR is not set, then \fBsalloc\fR runs the user's default shell. -The following document describes the the influence of various options on the -allocation of cpus to jobs and tasks. +The following document describes the the influence of various options on the +allocation of cpus to jobs and tasks. .br http://www.schedmd.com/slurmdocs/cpu_management.html @@ -141,7 +141,7 @@ Users can specify which of these \fBfeatures\fR are required by their job using the constraint option. Only nodes having features matching the job constraints will be used to satisfy the request. -Multiple constraints may be specified with AND, OR, exclusive OR, +Multiple constraints may be specified with AND, OR, exclusive OR, resource counts, etc. Supported \fbconstraint\fR options include: .PD 1 @@ -180,7 +180,7 @@ Specific counts of multiple resources may be specified by using the AND operator and enclosing the options within square brackets. For example: "\fB\-\-constraint=[rack1*2&rack2*4]"\fR might be used to specify that two nodes must be allocated from nodes with the feature -of "rack1" and four nodes must be allocated from nodes with the feature +of "rack1" and four nodes must be allocated from nodes with the feature "rack2". .RE @@ -209,9 +209,9 @@ the SLURM_CPU_BIND environment variable value to "verbose". The following informational environment variables are set when \fB\-\-cpu_bind\fR is in use: .nf - SLURM_CPU_BIND_VERBOSE - SLURM_CPU_BIND_TYPE - SLURM_CPU_BIND_LIST + SLURM_CPU_BIND_VERBOSE + SLURM_CPU_BIND_TYPE + SLURM_CPU_BIND_LIST .fi See the \fBENVIRONMENT VARIABLE\fR section for a more detailed description @@ -453,7 +453,10 @@ time period specified. If no argument is given, resources must be available immediately for the request to succeed. By default, \fB\-\-immediate\fR is off, and the command -will block until resources become available. +will block until resources become available. Since this option's +argument is optional, for proper parsing the single letter option must +be followed immediately with the value and not include a space between +them. For example "\-I60" and not "\-I 60". .TP \fB\-J\fR, \fB\-\-job\-name\fR=<\fIjobname\fR> @@ -476,8 +479,11 @@ allocation has been revoked. The job allocation can be revoked for a couple of reasons: someone used \fBscancel\fR to revoke the allocation, or the allocation reached its time limit. If you do not specify a signal name or number and SLURM is configured to signal the spawned command at job -termination, the default signal is SIGHUP for interactive and SIGTERM for -non\-interactive sessions. +termination, the default signal is SIGHUP for interactive and SIGTERM for +non\-interactive sessions. Since this option's argument is optional, +for proper parsing the single letter option must be followed +immediately with the value and not include a space between them. For +example "\-K1" and not "\-K 1". .TP \fB\-k\fR, \fB\-\-no\-kill\fR @@ -610,7 +616,7 @@ Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. NOTE: Enforcement of memory limits currently requires enabling of accounting, which samples memory use on a periodic basis (data need -not be stored, just collected). A task may exceed the memory limit +not be stored, just collected). A task may exceed the memory limit until the next periodic accounting sample. .TP @@ -622,7 +628,7 @@ seen using the \fBscontrol show config\fR command. Note that if the job's \fB\-\-mem\-per\-cpu\fR value exceeds the configured \fBMaxMemPerCPU\fR, then the user's limit will be treated as a memory limit per task; \fB\-\-mem\-per\-cpu\fR will be reduced to a value no larger than -\fBMaxMemPerCPU\fR; \fB\-\-cpus\-per\-task\fR will be set and value of +\fBMaxMemPerCPU\fR; \fB\-\-cpus\-per\-task\fR will be set and value of \fB\-\-cpus\-per\-task\fR multiplied by the new \fB\-\-mem\-per\-cpu\fR value will equal the original \fB\-\-mem\-per\-cpu\fR value specified by the user. @@ -653,9 +659,9 @@ The following informational environment variables are set when \fB\-\-mem_bind\fR is in use: .nf - SLURM_MEM_BIND_VERBOSE - SLURM_MEM_BIND_TYPE - SLURM_MEM_BIND_LIST + SLURM_MEM_BIND_VERBOSE + SLURM_MEM_BIND_TYPE + SLURM_MEM_BIND_LIST .fi See the \fBENVIRONMENT VARIABLES\fR section for a more detailed description @@ -817,7 +823,7 @@ other jobs cannot use them for some period of time. (Note that the SLURM job is subject to the normal constraints on jobs, including time limits, so that eventually the job will terminate and the resources will be freed, or you can terminate the job manually using the -\fBscancel\fR command.) +\fBscancel\fR command.) .TP \fB\-O\fR, \fB\-\-overcommit\fR @@ -885,7 +891,7 @@ When a tree topology is used, this defines the maximum count of switches desired for the job allocation and optionally the maximum time to wait for that number of switches. If SLURM finds an allocation containing more switches than the count specified, the job remains pending until it either finds -an allocation with desired switch count or the time limit expires. +an allocation with desired switch count or the time limit expires. It there is no switch count limit, there is no delay in starting the job. Acceptable time formats include "minutes", "minutes:seconds", "hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and @@ -919,12 +925,12 @@ above when task/affinity plugin is enabled. Set a minimum time limit on the job allocation. If specified, the job may have it's \fB\-\-time\fR limit lowered to a value no lower than \fB\-\-time\-min\fR if doing so permits the job to begin -execution earlier than otherwise possible. +execution earlier than otherwise possible. The job's time limit will not be changed after the job is allocated resources. -This is performed by a backfill scheduling algorithm to allocate resources +This is performed by a backfill scheduling algorithm to allocate resources otherwise reserved for higher priority jobs. -Acceptable time formats include "minutes", "minutes:seconds", -"hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and +Acceptable time formats include "minutes", "minutes:seconds", +"hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and "days\-hours:minutes:seconds". .TP diff --git a/doc/man/man1/sprio.1 b/doc/man/man1/sprio.1 index a0d8532faf..1e4941fd31 100644 --- a/doc/man/man1/sprio.1 +++ b/doc/man/man1/sprio.1 @@ -26,7 +26,11 @@ Print a help message describing all options \fBsprio\fR. .TP \fB\-j \fR, \fB\-\-jobs=\fR -Requests a comma separated list of job ids to display. Defaults to all jobs. +Requests a comma separated list of job ids to display. Defaults to +all jobs. Since this option's argument is optional, for proper parsing +the single letter option must be followed immediately with the value +and not include a space between them. For example "\-j1008,1009" and +not "\-j 1008,1009". .TP \fB\-l\fR, \fB\-\-long\fR diff --git a/doc/man/man1/squeue.1 b/doc/man/man1/squeue.1 index 20dfd05c3c..e03ee1bb9b 100644 --- a/doc/man/man1/squeue.1 +++ b/doc/man/man1/squeue.1 @@ -49,7 +49,10 @@ Requests a comma separated list of job ids to display. Defaults to all jobs. The \fB\-\-jobs=\fR option may be used in conjunction with the \fB\-\-steps\fR option to print step information about specific jobs. Note: If a list of job ids is provided, the jobs are displayed even if -they are on hidden partitions. +they are on hidden partitions. Since this option's argument is optional, +for proper parsing the single letter option must be followed immediately +with the value and not include a space between them. For example "\-j1008" +and not "\-j 1008". .TP \fB\-l\fR, \fB\-\-long\fR @@ -354,7 +357,11 @@ Specify the reservation of the jobs to view. \fB\-s\fR, \fB\-\-steps\fR Specify the job steps to view. This flag indicates that a comma separated list of job steps to view follows without an equal sign (see examples). -The job step format is "job_id.step_id". Defaults to all job steps. +The job step format is "job_id.step_id". Defaults to all job +steps. Since this option's argument is optional, for proper parsing +the single letter option must be followed immediately with the value +and not include a space between them. For example "\-s1008.0" and not +"\-s 1008.0". .TP \fB\-S \fR, \fB\-\-sort=\fR diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 3b8f41d8fd..fcc86de988 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -10,8 +10,8 @@ srun \- Run parallel jobs Run a parallel job on cluster managed by SLURM. If necessary, srun will first create a resource allocation in which to run the parallel job. -The following document describes the the influence of various options on the -allocation of cpus to jobs and tasks. +The following document describes the the influence of various options on the +allocation of cpus to jobs and tasks. .br http://www.schedmd.com/slurmdocs/cpu_management.html @@ -132,7 +132,7 @@ Users can specify which of these \fBfeatures\fR are required by their job using the constraint option. Only nodes having features matching the job constraints will be used to satisfy the request. -Multiple constraints may be specified with AND, OR, exclusive OR, +Multiple constraints may be specified with AND, OR, exclusive OR, resource counts, etc. Supported \fbconstraint\fR options include: .PD 1 @@ -171,7 +171,7 @@ Specific counts of multiple resources may be specified by using the AND operator and enclosing the options within square brackets. For example: "\fB\-\-constraint=[rack1*2&rack2*4]"\fR might be used to specify that two nodes must be allocated from nodes with the feature -of "rack1" and four nodes must be allocated from nodes with the feature +of "rack1" and four nodes must be allocated from nodes with the feature "rack2". .RE @@ -205,9 +205,9 @@ the SLURM_CPU_BIND environment variable value to "verbose". The following informational environment variables are set when \fB\-\-cpu_bind\fR is in use: .nf - SLURM_CPU_BIND_VERBOSE - SLURM_CPU_BIND_TYPE - SLURM_CPU_BIND_LIST + SLURM_CPU_BIND_VERBOSE + SLURM_CPU_BIND_TYPE + SLURM_CPU_BIND_LIST .fi See the \fBENVIRONMENT VARIABLES\fR section for a more detailed description @@ -339,7 +339,7 @@ allocation will include four CPUs. The job step allocation will then launch two threads per CPU for a total of two tasks. \fBWARNING\fR: When srun is executed from within salloc or sbatch, -there are configurations and options which can result in inconsistent +there are configurations and options which can result in inconsistent allocations when \-c has a value greater than \-c on salloc or sbatch. .TP \fB\-d\fR, \fB\-\-dependency\fR=<\fIdependency_list\fR> @@ -493,7 +493,10 @@ time period specified. If no argument is given, resources must be available immediately for the request to succeed. By default, \fB\-\-immediate\fR is off, and the command -will block until resources become available. +will block until resources become available. Since this option's +argument is optional, for proper parsing the single letter option +must be followed immediately with the value and not include a +space between them. For example "\-I60" and not "\-I 60". .TP \fB\-i\fR, \fB\-\-input\fR=<\fImode\fR> @@ -508,10 +511,10 @@ a terminal is not possible. \fB\-J\fR, \fB\-\-job\-name\fR=<\fIjobname\fR> Specify a name for the job. The specified name will appear along with the job id number when querying running jobs on the system. The default -is the supplied \fBexecutable\fR program's name. NOTE: This information +is the supplied \fBexecutable\fR program's name. NOTE: This information may be written to the slurm_jobacct.log file. This file is space delimited -so if a space is used in the \fIjobname\fR name it will cause problems in -properly displaying the contents of the slurm_jobacct.log file when the +so if a space is used in the \fIjobname\fR name it will cause problems in +properly displaying the contents of the slurm_jobacct.log file when the \fBsacct\fR command is used. .TP @@ -530,18 +533,21 @@ argument of zero will not terminate the job. A non\-zero argument or no argument will terminate the job. Note: This option takes precedence over the \fB\-W\fR, \fB\-\-wait\fR option to terminate the job immediately if a task exits with a non\-zero exit code. +Since this option's argument is optional, for proper parsing the +single letter option must be followed immediately with the value and +not include a space between them. For example "\-K1" and not "\-K 1". .TP \fB\-k\fR, \fB\-\-no\-kill\fR Do not automatically terminate a job of one of the nodes it has been allocated fails. This option is only recognized on a job allocation, not for the submission of individual job steps. -The job will assume all responsibilities for fault\-tolerance. +The job will assume all responsibilities for fault\-tolerance. Tasks launch using this option will not be considered terminated (e.g. \fB\-K\fR, \fB\-\-kill\-on\-bad\-exit\fR and \fB\-W\fR, \fB\-\-wait\fR options will have no effect upon the job step). The active job step (MPI job) will likely suffer a fatal error, -but subsequent job steps may be run if this option is specified. +but subsequent job steps may be run if this option is specified. The default action is to terminate the job upon node failure. .TP @@ -668,7 +674,7 @@ Also see \fB\-\-mem\-per\-cpu\fR. \fB\-\-mem\fR and \fB\-\-mem\-per\-cpu\fR are mutually exclusive. NOTE: Enforcement of memory limits currently requires enabling of accounting, which samples memory use on a periodic basis (data need -not be stored, just collected). A task may exceed the memory limit +not be stored, just collected). A task may exceed the memory limit until the next periodic accounting sample. .TP @@ -680,7 +686,7 @@ seen using the \fBscontrol show config\fR command. Note that if the job's \fB\-\-mem\-per\-cpu\fR value exceeds the configured \fBMaxMemPerCPU\fR, then the user's limit will be treated as a memory limit per task; \fB\-\-mem\-per\-cpu\fR will be reduced to a value no larger than -\fBMaxMemPerCPU\fR; \fB\-\-cpus\-per\-task\fR will be set and value of +\fBMaxMemPerCPU\fR; \fB\-\-cpus\-per\-task\fR will be set and value of \fB\-\-cpus\-per\-task\fR multiplied by the new \fB\-\-mem\-per\-cpu\fR value will equal the original \fB\-\-mem\-per\-cpu\fR value specified by the user. @@ -711,9 +717,9 @@ The following informational environment variables are set when \fB\-\-mem_bind\fR is in use: .nf - SLURM_MEM_BIND_VERBOSE - SLURM_MEM_BIND_TYPE - SLURM_MEM_BIND_LIST + SLURM_MEM_BIND_VERBOSE + SLURM_MEM_BIND_TYPE + SLURM_MEM_BIND_LIST .fi See the \fBENVIRONMENT VARIABLES\fR section for a more detailed description @@ -907,9 +913,9 @@ NOTE: This option is not supported unless Overcommit resources. Normally, \fBsrun\fR will not allocate more than one process per CPU. By specifying \fB\-\-overcommit\fR you are explicitly allowing more than one process -per CPU. However no more than \fBMAX_TASKS_PER_NODE\fR tasks are -permitted to execute per node. NOTE: \fBMAX_TASKS_PER_NODE\fR is -defined in the file \fIslurm.h\fR and is not a variable, it is set at +per CPU. However no more than \fBMAX_TASKS_PER_NODE\fR tasks are +permitted to execute per node. NOTE: \fBMAX_TASKS_PER_NODE\fR is +defined in the file \fIslurm.h\fR and is not a variable, it is set at SLURM build time. .TP @@ -975,7 +981,7 @@ The maximum size of a process's data segment .TP \fBFSIZE\fR The maximum size of files created. Note that if the user sets FSIZE to less -than the current size of the slurmd.log, job launches will fail with +than the current size of the slurmd.log, job launches will fail with a 'File size limit exceeded' error. .TP \fBMEMLOCK\fR @@ -999,7 +1005,7 @@ The maximum stack size Execute task zero in pseudo terminal mode. Implicitly sets \fB\-\-unbuffered\fR. Implicitly sets \fB\-\-error\fR and \fB\-\-output\fR to /dev/null -for all tasks except task zero, which may cause those tasks to +for all tasks except task zero, which may cause those tasks to exit immediately (e.g. shells will typically exit immediately in that situation). Not currently supported on AIX platforms. @@ -1030,7 +1036,7 @@ This option may be used to spread several job steps out among the nodes of the current job. If \fB\-r\fR is used, the current job step will begin at node \fIn\fR of the allocated nodelist, where the first node is considered node 0. The \fB\-r\fR option is not -permitted with \fB\-w\fR or \fB\-x\fR option and will result in a +permitted with \fB\-w\fR or \fB\-x\fR option and will result in a fatal error when not running within a prior allocation (i.e. when SLURM_JOB_ID is not set). The default for \fIn\fR is 0. If the value of \fB\-\-nodes\fR exceeds the number of nodes identified @@ -1098,7 +1104,7 @@ When a tree topology is used, this defines the maximum count of switches desired for the job allocation and optionally the maximum time to wait for that number of switches. If SLURM finds an allocation containing more switches than the count specified, the job remains pending until it either finds -an allocation with desired switch count or the time limit expires. +an allocation with desired switch count or the time limit expires. It there is no switch count limit, there is no delay in starting the job. Acceptable time formats include "minutes", "minutes:seconds", "hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and @@ -1177,12 +1183,12 @@ above when task/affinity plugin is enabled. Set a minimum time limit on the job allocation. If specified, the job may have it's \fB\-\-time\fR limit lowered to a value no lower than \fB\-\-time\-min\fR if doing so permits the job to begin -execution earlier than otherwise possible. +execution earlier than otherwise possible. The job's time limit will not be changed after the job is allocated resources. -This is performed by a backfill scheduling algorithm to allocate resources +This is performed by a backfill scheduling algorithm to allocate resources otherwise reserved for higher priority jobs. -Acceptable time formats include "minutes", "minutes:seconds", -"hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and +Acceptable time formats include "minutes", "minutes:seconds", +"hours:minutes:seconds", "days\-hours", "days\-hours:minutes" and "days\-hours:minutes:seconds". .TP @@ -1227,7 +1233,7 @@ parameter in the slurm configuration file (see \fBslurm.conf(5)\fR). This option can be useful to insure that a job is terminated in a timely fashion in the event that one or more tasks terminate prematurely. Note: The \fB\-K\fR, \fB\-\-kill\-on\-bad\-exit\fR option takes precedence -over \fB\-W\fR, \fB\-\-wait\fR to terminate the job immediately if a task +over \fB\-W\fR, \fB\-\-wait\fR to terminate the job immediately if a task exits with a non\-zero exit code. .TP @@ -1263,8 +1269,8 @@ if it contains a "/"character. \fB\-Z\fR, \fB\-\-no\-allocate\fR Run the specified tasks on a set of nodes without creating a SLURM "job" in the SLURM queue structure, bypassing the normal resource -allocation step. The list of nodes must be specified with the -\fB\-w\fR, \fB\-\-nodelist\fR option. This is a privileged option +allocation step. The list of nodes must be specified with the +\fB\-w\fR, \fB\-\-nodelist\fR option. This is a privileged option only available for the users "SlurmUser" and "root". .PP diff --git a/doc/man/man1/strigger.1 b/doc/man/man1/strigger.1 index 437f1985a3..33019382db 100644 --- a/doc/man/man1/strigger.1 +++ b/doc/man/man1/strigger.1 @@ -168,7 +168,10 @@ with the \fB\-\-jobid\fR option. When the \fB\-\-jobid\fR option is used in conjunction with the \fB\-\-up\fR, \fB\-\-down\fR or \fB\-\-drained\fR option, all nodes allocated to that job will considered the nodes used as a -trigger event. +trigger event.Since this option's argument is optional, for proper +parsing the single letter option must be followed immediately with +the value and not include a space between them. For example "\-ntux" +and not "\-n tux". .TP \fB\-M\fR, \fB\-\-clusters\fR=<\fIstring\fR> -- GitLab From ab0ac27780f5e5a82a0d4f5dfdbc9f5e4162fe70 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 13:07:37 -0700 Subject: [PATCH 609/614] Boards logic, minor fixes for test suite and linking with libslurm --- src/common/Makefile.am | 4 ++-- src/common/Makefile.in | 7 ++++--- testsuite/expect/test24.1 | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 3cdcdd0e0d..6332b39a6d 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -133,9 +133,9 @@ libspank_la_SOURCES = \ plugstack.c plugstack.h \ optz.c optz.h -libcommon_la_LIBADD = $(DL_LIBS) +libcommon_la_LIBADD = $(DL_LIBS) $(HWLOC_LIBS) -libcommon_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic +libcommon_la_LDFLAGS = $(HWLOC_LDFLAGS) $(LIB_LDFLAGS) -module --export-dynamic # This was made so we could export all symbols from libcommon # on multiple platforms diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 0029c86aa1..0abaf70dd1 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -96,7 +96,8 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -libcommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libcommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ xcgroup_read_config.h xcgroup.c xcgroup.h xcpuinfo.c \ xcpuinfo.h cpu_frequency.c cpu_frequency.h assoc_mgr.c \ @@ -522,8 +523,8 @@ libspank_la_SOURCES = \ plugstack.c plugstack.h \ optz.c optz.h -libcommon_la_LIBADD = $(DL_LIBS) -libcommon_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic +libcommon_la_LIBADD = $(DL_LIBS) $(HWLOC_LIBS) +libcommon_la_LDFLAGS = $(HWLOC_LDFLAGS) $(LIB_LDFLAGS) -module --export-dynamic # This was made so we could export all symbols from libcommon # on multiple platforms diff --git a/testsuite/expect/test24.1 b/testsuite/expect/test24.1 index f101411a58..f1dcc7bf67 100755 --- a/testsuite/expect/test24.1 +++ b/testsuite/expect/test24.1 @@ -48,11 +48,11 @@ file delete $test_prog send_user "build_dir is $build_dir\n" if {[test_aix]} { - send_user "$bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o\n" - exec $bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o + send_user "$bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-bhwloc -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o\n" + exec $bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-bhwloc -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o } else { - send_user "$bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -export-dynamic \n" - exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -export-dynamic + send_user "$bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -lhwloc-export-dynamic \n" + exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -lhwloc -export-dynamic } exec $bin_chmod 700 $test_prog -- GitLab From 1a1e4ab78a815cfbc91d740af749a6b94703d442 Mon Sep 17 00:00:00 2001 From: Rod Schultz Date: Mon, 16 Jul 2012 16:12:27 -0700 Subject: [PATCH 610/614] Batch to support node board configuration specification --- contribs/perlapi/libslurm/perl/node.c | 2 + doc/html/cpu_management.shtml | 10 +- doc/man/man5/slurm.conf.5 | 23 +- slurm/slurm.h.in | 33 +- src/api/config_info.c | 2 + src/api/node_info.c | 5 +- src/common/node_conf.c | 2 + src/common/node_conf.h | 2 + src/common/read_config.c | 139 +++- src/common/read_config.h | 13 +- src/common/slurm_protocol_defs.h | 4 + src/common/slurm_protocol_pack.c | 703 ++++++++++++++++-- src/common/xcpuinfo.c | 131 +++- src/common/xcpuinfo.h | 2 +- src/plugins/select/cons_res/dist_tasks.c | 266 ++++++- src/plugins/select/cons_res/select_cons_res.c | 2 + src/plugins/select/cons_res/select_cons_res.h | 1 + src/plugins/select/linear/select_linear.c | 8 +- src/sacct/Makefile.am | 3 +- src/sacct/Makefile.in | 4 +- src/sacctmgr/Makefile.am | 3 +- src/sacctmgr/Makefile.in | 4 +- src/salloc/Makefile.am | 3 +- src/salloc/Makefile.in | 4 +- src/sattach/Makefile.am | 3 +- src/sattach/Makefile.in | 4 +- src/sbatch/Makefile.am | 3 +- src/sbatch/Makefile.in | 4 +- src/sbcast/Makefile.am | 3 +- src/sbcast/Makefile.in | 4 +- src/scancel/Makefile.am | 3 +- src/scancel/Makefile.in | 4 +- src/scontrol/Makefile.am | 3 +- src/scontrol/Makefile.in | 4 +- src/sdiag/Makefile.am | 3 +- src/sdiag/Makefile.in | 4 +- src/sinfo/Makefile.am | 3 +- src/sinfo/Makefile.in | 4 +- src/slurmctld/Makefile.am | 3 +- src/slurmctld/Makefile.in | 4 +- src/slurmctld/job_mgr.c | 6 +- src/slurmctld/node_mgr.c | 98 ++- src/slurmctld/read_config.c | 1 + src/slurmd/common/slurmstepd_init.c | 28 +- src/slurmd/slurmd/Makefile.am | 6 +- src/slurmd/slurmd/Makefile.in | 8 +- src/slurmd/slurmd/req.c | 2 + src/slurmd/slurmd/slurmd.c | 32 +- src/slurmd/slurmd/slurmd.h | 10 +- src/slurmd/slurmstepd/Makefile.am | 6 +- src/slurmd/slurmstepd/Makefile.in | 8 +- src/slurmdbd/Makefile.am | 3 +- src/slurmdbd/Makefile.in | 4 +- src/smap/Makefile.am | 3 +- src/smap/Makefile.in | 4 +- src/sprio/Makefile.am | 3 +- src/sprio/Makefile.in | 4 +- src/squeue/Makefile.am | 3 +- src/squeue/Makefile.in | 4 +- src/sreport/Makefile.am | 3 +- src/sreport/Makefile.in | 4 +- src/srun/Makefile.am | 3 +- src/srun/Makefile.in | 3 +- src/srun_cr/Makefile.am | 3 +- src/srun_cr/Makefile.in | 4 +- src/sshare/Makefile.am | 3 +- src/sshare/Makefile.in | 4 +- src/sstat/Makefile.am | 3 +- src/sstat/Makefile.in | 4 +- src/strigger/Makefile.am | 3 +- src/strigger/Makefile.in | 4 +- src/sview/Makefile.am | 3 +- src/sview/Makefile.in | 4 +- src/sview/node_info.c | 18 +- 74 files changed, 1506 insertions(+), 218 deletions(-) diff --git a/contribs/perlapi/libslurm/perl/node.c b/contribs/perlapi/libslurm/perl/node.c index 1b25255e07..e59694f893 100644 --- a/contribs/perlapi/libslurm/perl/node.c +++ b/contribs/perlapi/libslurm/perl/node.c @@ -57,6 +57,7 @@ node_info_to_hv(node_info_t *node_info, uint16_t node_scaling, HV *hv) STORE_FIELD(hv, node_info, reason_time, time_t); STORE_FIELD(hv, node_info, reason_uid, uint32_t); STORE_FIELD(hv, node_info, slurmd_start_time, time_t); + STORE_FIELD(hv, node_info, boards, uint16_t); STORE_FIELD(hv, node_info, sockets, uint16_t); STORE_FIELD(hv, node_info, threads, uint16_t); STORE_FIELD(hv, node_info, tmp_disk, uint32_t); @@ -112,6 +113,7 @@ hv_to_node_info(HV *hv, node_info_t *node_info) FETCH_FIELD(hv, node_info, reason_time, time_t, TRUE); FETCH_FIELD(hv, node_info, reason_uid, uint32_t, TRUE); FETCH_FIELD(hv, node_info, slurmd_start_time, time_t, TRUE); + FETCH_FIELD(hv, node_info, boards, uint16_t, TRUE); FETCH_FIELD(hv, node_info, sockets, uint16_t, TRUE); FETCH_FIELD(hv, node_info, threads, uint16_t, TRUE); FETCH_FIELD(hv, node_info, tmp_disk, uint32_t, TRUE); diff --git a/doc/html/cpu_management.shtml b/doc/html/cpu_management.shtml index 7d57f1148c..7ef79ca61d 100644 --- a/doc/html/cpu_management.shtml +++ b/doc/html/cpu_management.shtml @@ -18,7 +18,7 @@ is divided into the following sections:

      chosen by the SLURM administrator. The interactions between different CPU management options are complex and often difficult to predict. Some experimentation may be required to discover the exact combination of options needed to produce a desired outcome. Users and administrators should refer to the man pages -for slurm.conf, cgroup.conf +for slurm.conf, cgroup.conf, salloc, sbatch and srun for detailed explanations of each option. The following html documents may also be useful:

      @@ -32,7 +32,7 @@ Architectures

      This document describes SLURM CPU management for conventional Linux clusters only. For information on Cray and IBM BlueGene systems, please refer to the appropriate documents.

      -

      The information and examples in this document have been verified on SLURM version 2.3.0. Some +

      The information and examples in this document have been verified on SLURM version 2.4.0. Some information may not be valid for previous SLURM versions.


      CPU Management Steps performed by SLURM

      @@ -88,7 +88,7 @@ Step 1 is performed by slurmctld and the select plugin.

      Defines - a node. This includes the number and layout of sockets, cores, + a node. This includes the number and layout of boards, sockets, cores, threads and processors (logical CPUs) on the node.

      @@ -525,7 +525,7 @@ Step 2 is performed by slurmctld and the select plugin.

      Defines - a node. This includes the number and layout of sockets, cores, + a node. This includes the number and layout of boards, sockets, cores, threads and processors (logical CPUs) on the node.

      @@ -3538,6 +3538,6 @@ and binding for this job. For example, task id 2 is bound to CPU id 2. -

      Last modified 26 September 2011

      +

      Last modified 7 February 2012

      diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index fe844e8e3f..a14829e4e4 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1624,7 +1624,10 @@ Without this option, by default one task will be allocated per thread on nodes with more than one \fBThreadsPerCore\fR configured. .TP \fBCR_CORE_DEFAULT_DIST_BLOCK\fR -Allocate cores using block distribution by default. +Allocate cores within a node using block distribution by default. +This is a pseudo-best-fit algorithm that minimizes the number of +boards and minimizes the number of sockets (within minimum boards) +used for the allocation. This default behavior can be overridden specifying a particular "\-m" parameter with srun/salloc/sbatch. Without this option, cores will be allocated cyclicly across the sockets. @@ -2349,6 +2352,14 @@ they must exactly match the entries in the \fBNodeName\fR By default, the \fBNodeAddr\fR will be identical in value to \fBNodeHostname\fR. +.TP +\fBBoards\fR +Number of Baseboards in nodes with a baseboard controller. +Note that when Boards is specified, SocketsPerBoard, +CoresPerSocket, and ThreadsPerCore should be specified. +Boards and CPUs are mutully exclusive. +The default value is 1. + .TP \fBCoresPerSocket\fR Number of cores in a single physical processor socket (e.g. "2"). @@ -2363,6 +2374,7 @@ The default value is 1. Number of logical processors on the node (e.g. "2"). If \fBCPUs\fR is omitted, it will set equal to the product of \fBSockets\fR, \fBCoresPerSocket\fR, and \fBThreadsPerCore\fR. +CPUs and Boards are mutually exclusive. The default value is 1. .TP @@ -2419,6 +2431,15 @@ If Sockets is omitted, it will be inferred from \fBCPUs\fR, \fBCoresPerSocket\fR, and \fBThreadsPerCore\fR. \fBNOTE\fR: If you have multi\-core processors, you will likely need to specify these parameters. +Sockets and SocketsPerBoard are mutually exclusive. +If Sockets is specified when Boards is also used, +Sockets is interpreted as SocketsPerBoard rather than total sockets. +The default value is 1. + +.TP +\fBSocketsPerBoard\fR +Number of physical processor sockets/chips on a baseboard. +Sockets and SocketsPerBoard are mutually exclusive. The default value is 1. .TP diff --git a/slurm/slurm.h.in b/slurm/slurm.h.in index de2756be37..0392c48fd5 100644 --- a/slurm/slurm.h.in +++ b/slurm/slurm.h.in @@ -422,7 +422,8 @@ enum jobacct_data_type { JOBACCT_DATA_TOT_PAGES, /* data-> uint32_t psize */ JOBACCT_DATA_MIN_CPU, /* data-> uint32_t psize */ JOBACCT_DATA_MIN_CPU_ID, /* data-> jobacct_id_t psize */ - JOBACCT_DATA_TOT_CPU /* data-> uint32_t psize */ + JOBACCT_DATA_TOT_CPU, /* data-> uint32_t psize */ + JOBACCT_DATA_CPU_CYCLES /* data-> uint32_t psize */ }; /* Possible task distributions across the nodes */ @@ -458,6 +459,7 @@ typedef enum cpu_bind_type { /* cpu binding type from --cpu_bind=... */ CPU_BIND_TO_CORES = 0x04, /* =cores */ CPU_BIND_TO_SOCKETS= 0x08, /* =sockets */ CPU_BIND_TO_LDOMS = 0x10, /* locality domains */ + CPU_BIND_TO_BOARDS = 0x1000, /* =boards */ /* the following manual binding flags are mutually exclusive */ /* CPU_BIND_NONE needs to be the lowest value among manual bindings */ CPU_BIND_NONE = 0x20, /* =no */ @@ -561,6 +563,9 @@ enum ctx_keys { #define CR_CORE 0x0004 /* Resources are shared down to the core level. * Jobs will not be co-allocated within a * core. */ +#define CR_BOARD 0x0008 /* Resources are shared down to the board + * level. Jobs will not be co-allocated + * within a board. */ #define CR_MEMORY 0x0010 /* Memory as consumable resources. Memory is * not over-commited when selected as a CR. */ @@ -1004,6 +1009,8 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ * default=0 */ uint32_t max_nodes; /* maximum number of nodes usable by job, * default=0 */ + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board;/* sockets per board required by job */ uint16_t sockets_per_node;/* sockets per node required by job */ uint16_t cores_per_socket;/* cores per socket required by job */ uint16_t threads_per_core;/* threads per core required by job */ @@ -1011,6 +1018,7 @@ typedef struct job_descriptor { /* For submit, allocate, and update requests */ uint16_t ntasks_per_socket;/* number of tasks to invoke on * each socket */ uint16_t ntasks_per_core;/* number of tasks to invoke on each core */ + uint16_t ntasks_per_board;/* number of tasks to invoke on each board */ uint16_t pn_min_cpus; /* minimum # CPUs per node, default=0 */ uint32_t pn_min_memory; /* minimum real memory per node OR * real memory per CPU | MEM_PER_CPU, @@ -1075,9 +1083,11 @@ typedef struct job_info { char *licenses; /* licenses required by the job */ uint32_t max_cpus; /* maximum number of cpus usable by job */ uint32_t max_nodes; /* maximum number of nodes usable by job */ - uint16_t sockets_per_node;/* sockets per node required by job */ - uint16_t cores_per_socket;/* cores per socket required by job */ - uint16_t threads_per_core;/* threads per core required by job */ + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board;/* sockets per board required by job */ + uint16_t sockets_per_node; /* sockets per node required by job */ + uint16_t cores_per_socket; /* cores per socket required by job */ + uint16_t threads_per_core; /* threads per core required by job */ char *name; /* name of the job */ char *network; /* network specification */ char *nodes; /* list of nodes allocated to job */ @@ -1087,7 +1097,8 @@ typedef struct job_info { * start_range_2, .., -1 */ uint16_t ntasks_per_core;/* number of tasks to invoke on each core */ uint16_t ntasks_per_node;/* number of tasks to invoke on each node */ - uint16_t ntasks_per_socket;/* number of tasks to invoke on each socket */ + uint16_t ntasks_per_socket;/* number of tasks to invoke on each socket*/ + uint16_t ntasks_per_board; /* number of tasks to invoke on each board */ uint32_t num_nodes; /* minimum number of nodes required by job */ uint32_t num_cpus; /* minimum number of cpus required by job */ @@ -1414,8 +1425,9 @@ typedef struct { typedef struct node_info { char *arch; /* computer architecture */ + uint16_t boards; /* total number of boards per node */ time_t boot_time; /* time of node boot */ - uint16_t cores; /* number of cores per CPU */ + uint16_t cores; /* number of cores per socket */ uint16_t cpus; /* configured count of cpus running on * the node */ char *features; /* list of a node's features */ @@ -1432,7 +1444,7 @@ typedef struct node_info { uint32_t reason_uid; /* User that set the reason, ignore if * no reason is set. */ time_t slurmd_start_time;/* time of slurmd startup */ - uint16_t sockets; /* number of sockets per node */ + uint16_t sockets; /* total number of sockets per node */ uint16_t threads; /* number of threads per core */ uint32_t tmp_disk; /* configured MB of total disk in TMP_FS */ uint32_t weight; /* arbitrary priority of node for scheduling */ @@ -1852,6 +1864,8 @@ typedef struct slurm_ctl_conf { * inactive resource allocation is released */ uint16_t job_acct_gather_freq; /* poll frequency for job accounting * gather plugins */ + uint16_t xres_access_freq; /* poll frequency for + * external-resource-access thread */ char *job_acct_gather_type; /* job accounting gather type */ char *job_ckpt_dir; /* directory saving job record checkpoint */ char *job_comp_host; /* job completion logging host */ @@ -2003,8 +2017,9 @@ typedef struct slurmd_status_msg { time_t last_slurmctld_msg; /* time of last slurmctld message */ uint16_t slurmd_debug; /* logging level */ uint16_t actual_cpus; /* actual logical processor count */ - uint16_t actual_sockets; /* actual sockets count */ - uint16_t actual_cores; /* actual core count */ + uint16_t actual_boards; /* actual total boards count */ + uint16_t actual_sockets; /* actual total sockets count */ + uint16_t actual_cores; /* actual core per socket count */ uint16_t actual_threads; /* actual thread per core count */ uint32_t actual_real_mem; /* actual real memory in MB */ uint32_t actual_tmp_disk; /* actual temp disk space in MB */ diff --git a/src/api/config_info.c b/src/api/config_info.c index 34ecb8429e..1f93ca5357 100644 --- a/src/api/config_info.c +++ b/src/api/config_info.c @@ -1243,6 +1243,8 @@ void slurm_print_slurmd_status (FILE* out, fprintf(out, "Actual CPUs = %u\n", slurmd_status_ptr->actual_cpus); + fprintf(out, "Actual Boards = %u\n", + slurmd_status_ptr->actual_boards); fprintf(out, "Actual sockets = %u\n", slurmd_status_ptr->actual_sockets); fprintf(out, "Actual cores = %u\n", diff --git a/src/api/node_info.c b/src/api/node_info.c index bf25e8e04c..d044820386 100644 --- a/src/api/node_info.c +++ b/src/api/node_info.c @@ -239,8 +239,9 @@ slurm_sprint_node_table (node_info_t * node_ptr, snprintf(tmp_line, sizeof(tmp_line), "OS=%s ", node_ptr->os); xstrcat(out, tmp_line); } - snprintf(tmp_line, sizeof(tmp_line), "RealMemory=%u Sockets=%u", - node_ptr->real_memory, node_ptr->sockets); + snprintf(tmp_line, sizeof(tmp_line), + "RealMemory=%u Sockets=%u Boards=%u", + node_ptr->real_memory, node_ptr->sockets,node_ptr->boards); xstrcat(out, tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/common/node_conf.c b/src/common/node_conf.c index 213cc0b174..397598b4c8 100644 --- a/src/common/node_conf.c +++ b/src/common/node_conf.c @@ -644,6 +644,7 @@ extern int build_all_nodeline_info (bool set_bitmap) config_ptr = create_config_record(); config_ptr->nodes = xstrdup(node->nodenames); config_ptr->cpus = node->cpus; + config_ptr->boards = node->boards; config_ptr->sockets = node->sockets; config_ptr->cores = node->cores; config_ptr->threads = node->threads; @@ -778,6 +779,7 @@ extern struct node_record *create_node_record ( node_ptr->config_ptr = config_ptr; /* these values will be overwritten when the node actually registers */ node_ptr->cpus = config_ptr->cpus; + node_ptr->boards = config_ptr->boards; node_ptr->sockets = config_ptr->sockets; node_ptr->cores = config_ptr->cores; node_ptr->threads = config_ptr->threads; diff --git a/src/common/node_conf.h b/src/common/node_conf.h index 8eb96d5d3f..49107f9cef 100644 --- a/src/common/node_conf.h +++ b/src/common/node_conf.h @@ -66,6 +66,7 @@ struct config_record { uint32_t magic; /* magic cookie to test data integrity */ uint16_t cpus; /* count of processors running on the node */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ @@ -105,6 +106,7 @@ struct node_record { time_t last_response; /* last response from the node */ time_t last_idle; /* time node last become idle */ uint16_t cpus; /* count of processors on the node */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ diff --git a/src/common/read_config.c b/src/common/read_config.c index cc56b4ff97..204d89274a 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -5,6 +5,7 @@ * Copyright (C) 2008-2010 Lawrence Livermore National Security. * Portions Copyright (C) 2008 Vijay Ramasubramanian. * Portions Copyright (C) 2010 SchedMD . + * Portions (boards) copyright (C) 2012 Bull, * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Morris Jette . * CODE-OCEC-09-009. All rights reserved. @@ -113,6 +114,7 @@ typedef struct names_ll_s { char *address; /* NodeAddr */ uint16_t port; uint16_t cpus; + uint16_t boards; uint16_t sockets; uint16_t cores; uint16_t threads; @@ -500,6 +502,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, slurm_conf_node_t *n; int computed_procs; static s_p_options_t _nodename_options[] = { + {"Boards", S_P_UINT16}, {"CoresPerSocket", S_P_UINT16}, {"CPUs", S_P_UINT16}, {"Feature", S_P_STRING}, @@ -511,6 +514,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, {"RealMemory", S_P_UINT32}, {"Reason", S_P_STRING}, {"Sockets", S_P_UINT16}, + {"SocketsPerBoard", S_P_UINT16}, {"State", S_P_STRING}, {"ThreadsPerCore", S_P_UINT16}, {"TmpDisk", S_P_UINT32}, @@ -547,9 +551,12 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, return 0; } else { bool no_cpus = false; + bool no_boards = false; bool no_sockets = false; bool no_cores = false; bool no_threads = false; + bool no_sockets_per_board = false; + uint16_t sockets_per_board = 0; n = xmalloc(sizeof(slurm_conf_node_t)); dflt = default_nodename_tbl; @@ -565,6 +572,12 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, if (!s_p_get_string(&n->addresses, "NodeAddr", tbl)) n->addresses = xstrdup(n->hostnames); + if (!s_p_get_uint16(&n->boards, "Boards", tbl) + && !s_p_get_uint16(&n->boards, "Boards", dflt)) { + n->boards = 1; + no_boards = true; + } + if (!s_p_get_uint16(&n->cores, "CoresPerSocket", tbl) && !s_p_get_uint16(&n->cores, "CoresPerSocket", dflt)) { n->cores = 1; @@ -605,6 +618,13 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, no_sockets = true; } + if (!s_p_get_uint16(&sockets_per_board, "SocketsPerBoard", tbl) + && !s_p_get_uint16(&sockets_per_board, "SocketsPerBoard", + dflt)) { + sockets_per_board = 1; + no_sockets_per_board = true; + } + if (!s_p_get_string(&n->state, "State", tbl) && !s_p_get_string(&n->state, "State", dflt)) n->state = NULL; @@ -636,44 +656,107 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, n->threads = 1; } + if (!no_sockets_per_board && sockets_per_board==0) { + /* make sure sockets_per_boards is non-zero */ + error("NodeNames=%s SocketsPerBoards=0 is invalid, " + "reset to 1", n->nodenames); + sockets_per_board = 1; + } + + if (no_boards) { + /* This case is exactly like if was without boards, + * Except SocketsPerBoard=# can be used, + * But it can't be used with Sockets=# */ + n->boards = 1; + if (!no_sockets && !no_sockets_per_board) { + error("NodeNames=%s Sockets=# and " + "SocketsPerBoard=# is invalid" + ", using SocketsPerBoard", + n->nodenames); + n->sockets = sockets_per_board; + } + if (!no_sockets_per_board) { + n->sockets = sockets_per_board; + } if (!no_cpus && /* infer missing Sockets= */ no_sockets) { n->sockets = n->cpus / (n->cores * n->threads); } - - if (n->sockets == 0) { /* make sure sockets is non-zero */ + if (n->sockets == 0) { + /* make sure sockets is non-zero */ error("NodeNames=%s Sockets=0 is invalid, " "reset to 1", n->nodenames); n->sockets = 1; } - if (no_cpus) { /* infer missing CPUs= */ n->cpus = n->sockets * n->cores * n->threads; } - - /* if only CPUs= and Sockets= specified check for match */ + /* if only CPUs= and Sockets= + * specified check for match */ if (!no_cpus && !no_sockets && no_cores && no_threads) { if (n->cpus != n->sockets) { n->sockets = n->cpus; - error("NodeNames=%s CPUs doesn't match " - "Sockets, setting Sockets to %d", + error("NodeNames=%s CPUs " + "doesn't match Sockets, " + "setting Sockets to %d", n->nodenames, n->sockets); } } - computed_procs = n->sockets * n->cores * n->threads; if ((n->cpus != n->sockets) && (n->cpus != n->sockets * n->cores) && (n->cpus != computed_procs)) { error("NodeNames=%s CPUs=%d doesn't match " - "Sockets*CoresPerSocket*ThreadsPerCore (%d), " - "resetting CPUs", + "Sockets*CoresPerSocket*ThreadsPerCore " + "(%d), resetting CPUs", n->nodenames, n->cpus, computed_procs); n->cpus = computed_procs; } + } else { + /* In this case Boards=# is used. + * CPUs=# or Procs=# are ignored. + */ + if (!no_cpus) { + error("NodeNames=%s CPUs=# or Procs=# " + "with Boards=# is invalid and " + "is ignored.", n->nodenames); + } + if (n->boards == 0) { + /* make sure boards is non-zero */ + error("NodeNames=%s Boards=0 is " + "invalid, reset to 1", + n->nodenames); + n->boards = 1; + } + if (!no_sockets && !no_sockets_per_board) { + error("NodeNames=%s Sockets=# and " + "SocketsPerBoard=# is invalid, " + "using SocketsPerBoard", n->nodenames); + n->sockets = n->boards * sockets_per_board; + } else if (!no_sockets_per_board) { + n->sockets = n->boards * sockets_per_board; + } else if (!no_sockets) { + error("NodeNames=%s Sockets=# with Boards=# is" + " not recommended, assume " + "SocketsPerBoard was meant", + n->nodenames); + if (n->sockets == 0) { + /* make sure sockets is non-zero */ + error("NodeNames=%s Sockets=0 is " + "invalid, reset to 1", + n->nodenames); + n->sockets = 1; + } + n->sockets = n->boards * n->sockets; + } else { + n->sockets = n->boards; + } + // Node boards factored into sockets + n->cpus = n->sockets * n->cores * n->threads; + } *dest = (void *)n; @@ -1186,8 +1269,9 @@ static int _get_hash_idx(const char *name) static void _push_to_hashtbls(char *alias, char *hostname, char *address, uint16_t port, - uint16_t cpus, uint16_t sockets, - uint16_t cores, uint16_t threads) + uint16_t cpus, uint16_t boards, + uint16_t sockets, uint16_t cores, + uint16_t threads) { int hostname_idx, alias_idx; names_ll_t *p, *new; @@ -1225,6 +1309,7 @@ static void _push_to_hashtbls(char *alias, char *hostname, new->address = xstrdup(address); new->port = port; new->cpus = cpus; + new->boards = boards; new->sockets = sockets; new->cores = cores; new->threads = threads; @@ -1371,8 +1456,9 @@ static int _register_conf_node_aliases(slurm_conf_node_t *node_ptr) port = port_int; } _push_to_hashtbls(alias, hostname, address, port, - node_ptr->cpus, node_ptr->sockets, - node_ptr->cores, node_ptr->threads); + node_ptr->cpus, node_ptr->boards, + node_ptr->sockets, node_ptr->cores, + node_ptr->threads); free(alias); if (address_count > 1) { address_count--; @@ -1446,7 +1532,7 @@ static int _register_front_ends(slurm_conf_frontend_t *front_end_ptr) address = hostlist_shift(address_list); _push_to_hashtbls(hostname, hostname, address, - front_end_ptr->port, 1, 1, 1, 1); + front_end_ptr->port, 1, 1, 1, 1, 1); free(hostname); free(address); } @@ -1827,13 +1913,15 @@ extern int slurm_conf_get_addr(const char *node_name, slurm_addr_t *address) } /* - * slurm_conf_get_cpus_sct - - * Return the cpus, sockets, cores, and threads for a given NodeName + * slurm_conf_get_cpus_bsct - + * Return the cpus, boards, sockets, cores, and threads configured for a + * given NodeName * Returns SLURM_SUCCESS on success, SLURM_FAILURE on failure. */ -extern int slurm_conf_get_cpus_sct(const char *node_name, - uint16_t *cpus, uint16_t *sockets, - uint16_t *cores, uint16_t *threads) +extern int slurm_conf_get_cpus_bsct(const char *node_name, + uint16_t *cpus, uint16_t *boards, + uint16_t *sockets, uint16_t *cores, + uint16_t *threads) { int idx; names_ll_t *p; @@ -1847,6 +1935,8 @@ extern int slurm_conf_get_cpus_sct(const char *node_name, if (strcmp(p->alias, node_name) == 0) { if (cpus) *cpus = p->cpus; + if (boards) + *boards = p->boards; if (sockets) *sockets = p->sockets; if (cores) @@ -2206,7 +2296,7 @@ static void _init_slurm_conf(const char *file_name) if (name == NULL) name = default_slurm_config_file; } - if (conf_initialized) { + if(conf_initialized) { error("the conf_hashtbl is already inited"); } conf_hashtbl = s_p_hashtbl_create(slurm_conf_options); @@ -2431,7 +2521,7 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) * the cluster name is lower case since sacctmgr makes sure * this is the case as well. */ - if (conf->cluster_name) { + if(conf->cluster_name) { int i; for (i = 0; conf->cluster_name[i] != '\0'; i++) conf->cluster_name[i] = @@ -3301,6 +3391,11 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) fatal("Bad TaskPluginParam: %s", tok); set_unit = true; conf->task_plugin_param |= CPU_BIND_NONE; + } else if (strcasecmp(tok, "boards") == 0) { + if (set_unit) + fatal("Bad TaskPluginParam: %s", tok); + set_unit = true; + conf->task_plugin_param |= CPU_BIND_TO_BOARDS; } else if (strcasecmp(tok, "sockets") == 0) { if (set_unit) fatal("Bad TaskPluginParam: %s", tok); diff --git a/src/common/read_config.h b/src/common/read_config.h index 3edf23b6a6..38367ffb90 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -178,6 +178,7 @@ typedef struct slurm_conf_node { char *feature; /* arbitrary list of node's features */ char *port_str; uint16_t cpus; /* count of cpus running on the node */ + uint16_t boards; /* number of boards per node */ uint16_t sockets; /* number of sockets per node */ uint16_t cores; /* number of cores per CPU */ uint16_t threads; /* number of threads per core */ @@ -402,15 +403,17 @@ extern uint16_t slurm_conf_get_port(const char *node_name); extern int slurm_conf_get_addr(const char *node_name, slurm_addr_t *address); /* - * slurm_conf_get_cpus_sct - - * Return the cpus, sockets, cores, and threads configured for a given NodeName + * slurm_conf_get_cpus_bsct - + * Return the cpus, boards, sockets, cores, and threads configured for a + * given NodeName * Returns SLURM_SUCCESS on success, SLURM_FAILURE on failure. * * NOTE: Caller must NOT be holding slurm_conf_lock(). */ -extern int slurm_conf_get_cpus_sct(const char *node_name, - uint16_t *procs, uint16_t *sockets, - uint16_t *cores, uint16_t *threads); +extern int slurm_conf_get_cpus_bsct(const char *node_name, + uint16_t *cpus, uint16_t *boards, + uint16_t *sockets, uint16_t *cores, + uint16_t *threads); /* * init_slurm_conf - initialize or re-initialize the slurm configuration diff --git a/src/common/slurm_protocol_defs.h b/src/common/slurm_protocol_defs.h index a993f11deb..27134488d9 100644 --- a/src/common/slurm_protocol_defs.h +++ b/src/common/slurm_protocol_defs.h @@ -888,10 +888,13 @@ typedef struct file_bcast_msg { } file_bcast_msg_t; typedef struct multi_core_data { + uint16_t boards_per_node; /* boards per node required by job */ + uint16_t sockets_per_board; /* sockets per board required by job */ uint16_t sockets_per_node; /* sockets per node required by job */ uint16_t cores_per_socket; /* cores per cpu required by job */ uint16_t threads_per_core; /* threads per core required by job */ + uint16_t ntasks_per_board; /* number of tasks to invoke on each board*/ uint16_t ntasks_per_socket; /* number of tasks to invoke on each socket */ uint16_t ntasks_per_core; /* number of tasks to invoke on each core */ uint16_t plane_size; /* plane size when task_dist = SLURM_DIST_PLANE */ @@ -929,6 +932,7 @@ typedef struct slurm_node_registration_status_msg { uint32_t job_count; /* number of associate job_id's */ uint32_t *job_id; /* IDs of running job (if any) */ char *node_name; + uint16_t boards; char *os; uint32_t real_memory; time_t slurmd_start_time; diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index b42035fec7..c37401f715 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2394,7 +2394,41 @@ _pack_node_registration_status_msg(slurm_node_registration_status_msg_t * uint32_t gres_info_size = 0; xassert(msg != NULL); - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack_time(msg->timestamp, buffer); + pack_time(msg->slurmd_start_time, buffer); + pack32(msg->status, buffer); + packstr(msg->node_name, buffer); + packstr(msg->arch, buffer); + packstr(msg->os, buffer); + pack16(msg->cpus, buffer); + pack16(msg->boards, buffer); + pack16(msg->sockets, buffer); + pack16(msg->cores, buffer); + pack16(msg->threads, buffer); + pack32(msg->real_memory, buffer); + pack32(msg->tmp_disk, buffer); + pack32(msg->up_time, buffer); + pack32(msg->hash_val, buffer); + + pack32(msg->job_count, buffer); + for (i = 0; i < msg->job_count; i++) { + pack32(msg->job_id[i], buffer); + } + for (i = 0; i < msg->job_count; i++) { + pack32(msg->step_id[i], buffer); + } + pack16(msg->startup, buffer); + if (msg->startup) + switch_g_pack_node_info(msg->switch_nodeinfo, buffer); + if (msg->gres_info) + gres_info_size = get_buf_offset(msg->gres_info); + pack32(gres_info_size, buffer); + if (gres_info_size) { + packmem(get_buf_data(msg->gres_info), gres_info_size, + buffer); + } + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { pack_time(msg->timestamp, buffer); pack_time(msg->slurmd_start_time, buffer); pack32(msg->status, buffer); @@ -2469,7 +2503,56 @@ _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t node_reg_ptr = xmalloc(sizeof(slurm_node_registration_status_msg_t)); *msg = node_reg_ptr; - if(protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + /* unpack timestamp of snapshot */ + safe_unpack_time(&node_reg_ptr->timestamp, buffer); + safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); + /* load the data values */ + safe_unpack32(&node_reg_ptr->status, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->node_name, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->arch, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_reg_ptr->os, &uint32_tmp, buffer); + safe_unpack16(&node_reg_ptr->cpus, buffer); + safe_unpack16(&node_reg_ptr->boards, buffer); + safe_unpack16(&node_reg_ptr->sockets, buffer); + safe_unpack16(&node_reg_ptr->cores, buffer); + safe_unpack16(&node_reg_ptr->threads, buffer); + safe_unpack32(&node_reg_ptr->real_memory, buffer); + safe_unpack32(&node_reg_ptr->tmp_disk, buffer); + safe_unpack32(&node_reg_ptr->up_time, buffer); + safe_unpack32(&node_reg_ptr->hash_val, buffer); + + safe_unpack32(&node_reg_ptr->job_count, buffer); + node_reg_ptr->job_id = + xmalloc(sizeof(uint32_t) * node_reg_ptr->job_count); + for (i = 0; i < node_reg_ptr->job_count; i++) { + safe_unpack32(&node_reg_ptr->job_id[i], buffer); + } + node_reg_ptr->step_id = + xmalloc(sizeof(uint32_t) * node_reg_ptr->job_count); + for (i = 0; i < node_reg_ptr->job_count; i++) { + safe_unpack32(&node_reg_ptr->step_id[i], buffer); + } + + safe_unpack16(&node_reg_ptr->startup, buffer); + if (node_reg_ptr->startup + && (switch_g_alloc_node_info( + &node_reg_ptr->switch_nodeinfo) + || switch_g_unpack_node_info( + node_reg_ptr->switch_nodeinfo, buffer))) + goto unpack_error; + + safe_unpack32(&gres_info_size, buffer); + if (gres_info_size) { + safe_unpackmem_xmalloc(&gres_info, &uint32_tmp, buffer); + if (gres_info_size != uint32_tmp) + goto unpack_error; + node_reg_ptr->gres_info = create_buf(gres_info, + gres_info_size); + } + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { /* unpack timestamp of snapshot */ safe_unpack_time(&node_reg_ptr->timestamp, buffer); safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); @@ -2889,7 +2972,36 @@ _unpack_node_info_members(node_info_t * node, Buf buffer, xassert(node != NULL); - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc(&node->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->node_hostname, &uint32_tmp, + buffer); + safe_unpackstr_xmalloc(&node->node_addr, &uint32_tmp, buffer); + safe_unpack16(&node->node_state, buffer); + safe_unpack16(&node->cpus, buffer); + safe_unpack16(&node->boards, buffer); + safe_unpack16(&node->sockets, buffer); + safe_unpack16(&node->cores, buffer); + safe_unpack16(&node->threads, buffer); + + safe_unpack32(&node->real_memory, buffer); + safe_unpack32(&node->tmp_disk, buffer); + safe_unpack32(&node->weight, buffer); + safe_unpack32(&node->reason_uid, buffer); + + safe_unpack_time(&node->boot_time, buffer); + safe_unpack_time(&node->reason_time, buffer); + safe_unpack_time(&node->slurmd_start_time, buffer); + + select_g_select_nodeinfo_unpack(&node->select_nodeinfo, buffer, + protocol_version); + + safe_unpackstr_xmalloc(&node->arch, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->gres, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->os, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node->reason, &uint32_tmp, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpackstr_xmalloc(&node->name, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&node->node_hostname, &uint32_tmp, buffer); @@ -4369,7 +4481,122 @@ _unpack_job_info_members(job_info_t * job, Buf buffer, char *node_inx_str; multi_core_data_t *mc_ptr; - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack32(&job->assoc_id, buffer); + safe_unpack32(&job->job_id, buffer); + safe_unpack32(&job->user_id, buffer); + safe_unpack32(&job->group_id, buffer); + + safe_unpack16(&job->job_state, buffer); + safe_unpack16(&job->batch_flag, buffer); + safe_unpack16(&job->state_reason, buffer); + safe_unpack16(&job->restart_cnt, buffer); + safe_unpack16(&job->show_flags, buffer); + + safe_unpack32(&job->alloc_sid, buffer); + safe_unpack32(&job->time_limit, buffer); + safe_unpack32(&job->time_min, buffer); + + safe_unpack16(&job->nice, buffer); + + safe_unpack_time(&job->submit_time, buffer); + safe_unpack_time(&job->eligible_time, buffer); + safe_unpack_time(&job->start_time, buffer); + safe_unpack_time(&job->end_time, buffer); + safe_unpack_time(&job->suspend_time, buffer); + safe_unpack_time(&job->pre_sus_time, buffer); + safe_unpack_time(&job->resize_time, buffer); + safe_unpack_time(&job->preempt_time, buffer); + safe_unpack32(&job->priority, buffer); + safe_unpackstr_xmalloc(&job->nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->partition, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->account, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->network, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->comment, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->gres, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->batch_host, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->batch_script, &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&job->qos, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->licenses, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->state_desc, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->resv_name, &uint32_tmp, buffer); + + safe_unpack32(&job->exit_code, buffer); + safe_unpack32(&job->derived_ec, buffer); + unpack_job_resources(&job->job_resrcs, buffer, + protocol_version); + + safe_unpackstr_xmalloc(&job->name, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->wckey, &uint32_tmp, buffer); + safe_unpack32(&job->req_switch, buffer); + safe_unpack32(&job->wait4switch, buffer); + + safe_unpackstr_xmalloc(&job->alloc_node, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->node_inx = bitfmt2int(""); + else { + job->node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + + if (select_g_select_jobinfo_unpack(&job->select_jobinfo, + buffer, protocol_version)) + goto unpack_error; + + /*** unpack default job details ***/ + safe_unpackstr_xmalloc(&job->features, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->work_dir, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->dependency, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job->command, &uint32_tmp, buffer); + + safe_unpack32(&job->num_cpus, buffer); + safe_unpack32(&job->max_cpus, buffer); + safe_unpack32(&job->num_nodes, buffer); + safe_unpack32(&job->max_nodes, buffer); + safe_unpack16(&job->requeue, buffer); + + /*** unpack pending job details ***/ + safe_unpack16(&job->shared, buffer); + safe_unpack16(&job->contiguous, buffer); + safe_unpack16(&job->cpus_per_task, buffer); + safe_unpack16(&job->pn_min_cpus, buffer); + + safe_unpack32(&job->pn_min_memory, buffer); + safe_unpack32(&job->pn_min_tmp_disk, buffer); + + safe_unpackstr_xmalloc(&job->req_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->req_node_inx = bitfmt2int(""); + else { + job->req_node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + safe_unpackstr_xmalloc(&job->exc_nodes, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&node_inx_str, &uint32_tmp, buffer); + if (node_inx_str == NULL) + job->exc_node_inx = bitfmt2int(""); + else { + job->exc_node_inx = bitfmt2int(node_inx_str); + xfree(node_inx_str); + } + + if (unpack_multi_core_data(&mc_ptr, buffer, protocol_version)) + goto unpack_error; + if (mc_ptr) { + job->boards_per_node = mc_ptr->boards_per_node; + job->sockets_per_board = mc_ptr->sockets_per_board; + job->sockets_per_node = mc_ptr->sockets_per_node; + job->cores_per_socket = mc_ptr->cores_per_socket; + job->threads_per_core = mc_ptr->threads_per_core; + job->ntasks_per_board = mc_ptr->ntasks_per_board; + job->ntasks_per_socket = mc_ptr->ntasks_per_socket; + job->ntasks_per_core = mc_ptr->ntasks_per_core; + xfree(mc_ptr); + } + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { safe_unpack32(&job->assoc_id, buffer); safe_unpack32(&job->job_id, buffer); safe_unpack32(&job->user_id, buffer); @@ -7095,7 +7322,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, uint16_t protocol_version) { /* load the data values */ - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); @@ -7144,6 +7371,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->shared, buffer); pack16(job_desc_ptr->cpus_per_task, buffer); pack16(job_desc_ptr->ntasks_per_node, buffer); + pack16(job_desc_ptr->ntasks_per_board, buffer); pack16(job_desc_ptr->ntasks_per_socket, buffer); pack16(job_desc_ptr->ntasks_per_core, buffer); @@ -7159,6 +7387,8 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack32(job_desc_ptr->max_cpus, buffer); pack32(job_desc_ptr->min_nodes, buffer); pack32(job_desc_ptr->max_nodes, buffer); + pack16(job_desc_ptr->boards_per_node, buffer); + pack16(job_desc_ptr->sockets_per_board, buffer); pack16(job_desc_ptr->sockets_per_node, buffer); pack16(job_desc_ptr->cores_per_socket, buffer); pack16(job_desc_ptr->threads_per_core, buffer); @@ -7238,7 +7468,7 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo = NULL; } pack16(job_desc_ptr->wait_all_nodes, buffer); - } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); @@ -7321,6 +7551,8 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->warn_signal, buffer); pack16(job_desc_ptr->warn_time, buffer); packstr(job_desc_ptr->wckey, buffer); + pack32(job_desc_ptr->req_switch, buffer); + pack32(job_desc_ptr->wait4switch, buffer); if (job_desc_ptr->select_jobinfo) { select_g_select_jobinfo_pack( @@ -7379,11 +7611,12 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo = NULL; } pack16(job_desc_ptr->wait_all_nodes, buffer); - } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { + } else if (protocol_version >= SLURM_2_2_PROTOCOL_VERSION) { pack16(job_desc_ptr->contiguous, buffer); pack16(job_desc_ptr->task_dist, buffer); pack16(job_desc_ptr->kill_on_node_fail, buffer); packstr(job_desc_ptr->features, buffer); + packstr(job_desc_ptr->gres, buffer); pack32(job_desc_ptr->job_id, buffer); packstr(job_desc_ptr->name, buffer); @@ -7437,7 +7670,9 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, packstr(job_desc_ptr->mem_bind, buffer); pack32(job_desc_ptr->time_limit, buffer); + pack32(job_desc_ptr->time_min, buffer); pack32(job_desc_ptr->min_cpus, buffer); + pack32(job_desc_ptr->max_cpus, buffer); pack32(job_desc_ptr->min_nodes, buffer); pack32(job_desc_ptr->max_nodes, buffer); pack16(job_desc_ptr->sockets_per_node, buffer); @@ -7460,14 +7695,13 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, pack16(job_desc_ptr->warn_time, buffer); packstr(job_desc_ptr->wckey, buffer); - if(job_desc_ptr->select_jobinfo) { + if (job_desc_ptr->select_jobinfo) { select_g_select_jobinfo_pack( job_desc_ptr->select_jobinfo, buffer, protocol_version); } else { job_desc_ptr->select_jobinfo = select_g_select_jobinfo_alloc(); - if(job_desc_ptr->geometry[0] != (uint16_t) NO_VAL) select_g_select_jobinfo_set( job_desc_ptr->select_jobinfo, @@ -7517,16 +7751,155 @@ _pack_job_desc_msg(job_desc_msg_t * job_desc_ptr, Buf buffer, job_desc_ptr->select_jobinfo); job_desc_ptr->select_jobinfo = NULL; } - } -} + pack16(job_desc_ptr->wait_all_nodes, buffer); + } else if (protocol_version >= SLURM_2_1_PROTOCOL_VERSION) { + pack16(job_desc_ptr->contiguous, buffer); + pack16(job_desc_ptr->task_dist, buffer); + pack16(job_desc_ptr->kill_on_node_fail, buffer); + packstr(job_desc_ptr->features, buffer); + pack32(job_desc_ptr->job_id, buffer); + packstr(job_desc_ptr->name, buffer); -/* _unpack_job_desc_msg - * unpacks a job_desc struct - * OUT job_desc_buffer_ptr - place to put pointer to allocated job desc struct - * IN/OUT buffer - source of the unpack, contains pointers that are - * automatically updated - */ -static int + packstr(job_desc_ptr->alloc_node, buffer); + pack32(job_desc_ptr->alloc_sid, buffer); + pack16(job_desc_ptr->pn_min_cpus, buffer); + pack32(job_desc_ptr->pn_min_memory, buffer); + pack32(job_desc_ptr->pn_min_tmp_disk, buffer); + + packstr(job_desc_ptr->partition, buffer); + pack32(job_desc_ptr->priority, buffer); + packstr(job_desc_ptr->dependency, buffer); + packstr(job_desc_ptr->account, buffer); + packstr(job_desc_ptr->comment, buffer); + pack16(job_desc_ptr->nice, buffer); + packstr(job_desc_ptr->qos, buffer); + + pack8(job_desc_ptr->open_mode, buffer); + pack8(job_desc_ptr->overcommit, buffer); + pack16(job_desc_ptr->acctg_freq, buffer); + pack32(job_desc_ptr->num_tasks, buffer); + pack16(job_desc_ptr->ckpt_interval, buffer); + + packstr(job_desc_ptr->req_nodes, buffer); + packstr(job_desc_ptr->exc_nodes, buffer); + packstr_array(job_desc_ptr->environment, + job_desc_ptr->env_size, buffer); + packstr_array(job_desc_ptr->spank_job_env, + job_desc_ptr->spank_job_env_size, buffer); + packstr(job_desc_ptr->script, buffer); + packstr_array(job_desc_ptr->argv, job_desc_ptr->argc, buffer); + + packstr(job_desc_ptr->std_err, buffer); + packstr(job_desc_ptr->std_in, buffer); + packstr(job_desc_ptr->std_out, buffer); + packstr(job_desc_ptr->work_dir, buffer); + packstr(job_desc_ptr->ckpt_dir, buffer); + + pack16(job_desc_ptr->immediate, buffer); + pack16(job_desc_ptr->requeue, buffer); + pack16(job_desc_ptr->shared, buffer); + pack16(job_desc_ptr->cpus_per_task, buffer); + pack16(job_desc_ptr->ntasks_per_node, buffer); + pack16(job_desc_ptr->ntasks_per_socket, buffer); + pack16(job_desc_ptr->ntasks_per_core, buffer); + + pack16(job_desc_ptr->plane_size, buffer); + pack16(job_desc_ptr->cpu_bind_type, buffer); + pack16(job_desc_ptr->mem_bind_type, buffer); + packstr(job_desc_ptr->cpu_bind, buffer); + packstr(job_desc_ptr->mem_bind, buffer); + + pack32(job_desc_ptr->time_limit, buffer); + pack32(job_desc_ptr->min_cpus, buffer); + pack32(job_desc_ptr->min_nodes, buffer); + pack32(job_desc_ptr->max_nodes, buffer); + pack16(job_desc_ptr->sockets_per_node, buffer); + pack16(job_desc_ptr->cores_per_socket, buffer); + pack16(job_desc_ptr->threads_per_core, buffer); + pack32(job_desc_ptr->user_id, buffer); + pack32(job_desc_ptr->group_id, buffer); + + pack16(job_desc_ptr->alloc_resp_port, buffer); + pack16(job_desc_ptr->other_port, buffer); + packstr(job_desc_ptr->network, buffer); + pack_time(job_desc_ptr->begin_time, buffer); + pack_time(job_desc_ptr->end_time, buffer); + + packstr(job_desc_ptr->licenses, buffer); + pack16(job_desc_ptr->mail_type, buffer); + packstr(job_desc_ptr->mail_user, buffer); + packstr(job_desc_ptr->reservation, buffer); + pack16(job_desc_ptr->warn_signal, buffer); + pack16(job_desc_ptr->warn_time, buffer); + packstr(job_desc_ptr->wckey, buffer); + + if(job_desc_ptr->select_jobinfo) { + select_g_select_jobinfo_pack( + job_desc_ptr->select_jobinfo, + buffer, protocol_version); + } else { + job_desc_ptr->select_jobinfo = + select_g_select_jobinfo_alloc(); + + if(job_desc_ptr->geometry[0] != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_GEOMETRY, + job_desc_ptr->geometry); + + if (job_desc_ptr->conn_type[0] != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_CONN_TYPE, + &(job_desc_ptr->conn_type)); + if (job_desc_ptr->reboot != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_REBOOT, + &(job_desc_ptr->reboot)); + if (job_desc_ptr->rotate != (uint16_t) NO_VAL) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_ROTATE, + &(job_desc_ptr->rotate)); + if (job_desc_ptr->blrtsimage) { + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_BLRTS_IMAGE, + job_desc_ptr->blrtsimage); + } + if (job_desc_ptr->linuximage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_LINUX_IMAGE, + job_desc_ptr->linuximage); + if (job_desc_ptr->mloaderimage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_MLOADER_IMAGE, + job_desc_ptr->mloaderimage); + if (job_desc_ptr->ramdiskimage) + select_g_select_jobinfo_set( + job_desc_ptr->select_jobinfo, + SELECT_JOBDATA_RAMDISK_IMAGE, + job_desc_ptr->ramdiskimage); + select_g_select_jobinfo_pack( + job_desc_ptr->select_jobinfo, + buffer, protocol_version); + select_g_select_jobinfo_free( + job_desc_ptr->select_jobinfo); + job_desc_ptr->select_jobinfo = NULL; + } + } +} + +/* _unpack_job_desc_msg + * unpacks a job_desc struct + * OUT job_desc_buffer_ptr - place to put pointer to allocated job desc struct + * IN/OUT buffer - source of the unpack, contains pointers that are + * automatically updated + */ +static int _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer, uint16_t protocol_version) { @@ -7534,7 +7907,142 @@ _unpack_job_desc_msg(job_desc_msg_t ** job_desc_buffer_ptr, Buf buffer, job_desc_msg_t *job_desc_ptr; /* alloc memory for structure */ - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + job_desc_ptr = xmalloc(sizeof(job_desc_msg_t)); + *job_desc_buffer_ptr = job_desc_ptr; + + /* load the data values */ + safe_unpack16(&job_desc_ptr->contiguous, buffer); + safe_unpack16(&job_desc_ptr->task_dist, buffer); + safe_unpack16(&job_desc_ptr->kill_on_node_fail, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->features, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->gres, &uint32_tmp,buffer); + safe_unpack32(&job_desc_ptr->job_id, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->name, + &uint32_tmp, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->alloc_node, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->alloc_sid, buffer); + safe_unpack16(&job_desc_ptr->pn_min_cpus, buffer); + safe_unpack32(&job_desc_ptr->pn_min_memory, buffer); + safe_unpack32(&job_desc_ptr->pn_min_tmp_disk, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->partition, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->priority, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->dependency, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->account, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->comment, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->nice, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->qos, &uint32_tmp, + buffer); + + safe_unpack8(&job_desc_ptr->open_mode, buffer); + safe_unpack8(&job_desc_ptr->overcommit, buffer); + safe_unpack16(&job_desc_ptr->acctg_freq, buffer); + safe_unpack32(&job_desc_ptr->num_tasks, buffer); + safe_unpack16(&job_desc_ptr->ckpt_interval, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->req_nodes, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->exc_nodes, + &uint32_tmp, buffer); + safe_unpackstr_array(&job_desc_ptr->environment, + &job_desc_ptr->env_size, buffer); + safe_unpackstr_array(&job_desc_ptr->spank_job_env, + &job_desc_ptr->spank_job_env_size, + buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->script, + &uint32_tmp, buffer); + safe_unpackstr_array(&job_desc_ptr->argv, + &job_desc_ptr->argc, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->std_err, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->std_in, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->std_out, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->work_dir, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->ckpt_dir, + &uint32_tmp, buffer); + + safe_unpack16(&job_desc_ptr->immediate, buffer); + safe_unpack16(&job_desc_ptr->requeue, buffer); + safe_unpack16(&job_desc_ptr->shared, buffer); + safe_unpack16(&job_desc_ptr->cpus_per_task, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_node, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_board, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_socket, buffer); + safe_unpack16(&job_desc_ptr->ntasks_per_core, buffer); + + safe_unpack16(&job_desc_ptr->plane_size, buffer); + safe_unpack16(&job_desc_ptr->cpu_bind_type, buffer); + safe_unpack16(&job_desc_ptr->mem_bind_type, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->cpu_bind, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->mem_bind, + &uint32_tmp, buffer); + + safe_unpack32(&job_desc_ptr->time_limit, buffer); + safe_unpack32(&job_desc_ptr->time_min, buffer); + safe_unpack32(&job_desc_ptr->min_cpus, buffer); + safe_unpack32(&job_desc_ptr->max_cpus, buffer); + safe_unpack32(&job_desc_ptr->min_nodes, buffer); + safe_unpack32(&job_desc_ptr->max_nodes, buffer); + safe_unpack16(&job_desc_ptr->boards_per_node, buffer); + safe_unpack16(&job_desc_ptr->sockets_per_board, buffer); + safe_unpack16(&job_desc_ptr->sockets_per_node, buffer); + safe_unpack16(&job_desc_ptr->cores_per_socket, buffer); + safe_unpack16(&job_desc_ptr->threads_per_core, buffer); + safe_unpack32(&job_desc_ptr->user_id, buffer); + safe_unpack32(&job_desc_ptr->group_id, buffer); + + safe_unpack16(&job_desc_ptr->alloc_resp_port, buffer); + safe_unpack16(&job_desc_ptr->other_port, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->network, + &uint32_tmp, buffer); + safe_unpack_time(&job_desc_ptr->begin_time, buffer); + safe_unpack_time(&job_desc_ptr->end_time, buffer); + + safe_unpackstr_xmalloc(&job_desc_ptr->licenses, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->mail_type, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->mail_user, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->reservation, + &uint32_tmp, buffer); + safe_unpack16(&job_desc_ptr->warn_signal, buffer); + safe_unpack16(&job_desc_ptr->warn_time, buffer); + safe_unpackstr_xmalloc(&job_desc_ptr->wckey, + &uint32_tmp, buffer); + safe_unpack32(&job_desc_ptr->req_switch, buffer); + safe_unpack32(&job_desc_ptr->wait4switch, buffer); + + if (select_g_select_jobinfo_unpack( + &job_desc_ptr->select_jobinfo, + buffer, protocol_version)) + goto unpack_error; + + /* These are set so we don't confuse them later for what is + * set in the select_jobinfo structure. + */ + job_desc_ptr->geometry[0] = (uint16_t)NO_VAL; + job_desc_ptr->conn_type[0] = (uint16_t)NO_VAL; + job_desc_ptr->reboot = (uint16_t)NO_VAL; + job_desc_ptr->rotate = (uint16_t)NO_VAL; + job_desc_ptr->blrtsimage = NULL; + job_desc_ptr->linuximage = NULL; + job_desc_ptr->mloaderimage = NULL; + job_desc_ptr->ramdiskimage = NULL; + safe_unpack16(&job_desc_ptr->wait_all_nodes, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { job_desc_ptr = xmalloc(sizeof(job_desc_msg_t)); *job_desc_buffer_ptr = job_desc_ptr; @@ -11598,13 +12106,26 @@ pack_multi_core_data (multi_core_data_t *multi_core, Buf buffer, pack8((uint8_t) 0xff, buffer); /* flag as Full */ - pack16(multi_core->sockets_per_node, buffer); - pack16(multi_core->cores_per_socket, buffer); - pack16(multi_core->threads_per_core, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack16(multi_core->boards_per_node, buffer); + pack16(multi_core->sockets_per_board, buffer); + pack16(multi_core->sockets_per_node, buffer); + pack16(multi_core->cores_per_socket, buffer); + pack16(multi_core->threads_per_core, buffer); + + pack16(multi_core->ntasks_per_board, buffer); + pack16(multi_core->ntasks_per_socket, buffer); + pack16(multi_core->ntasks_per_core, buffer); + pack16(multi_core->plane_size, buffer); + } else { + pack16(multi_core->sockets_per_node, buffer); + pack16(multi_core->cores_per_socket, buffer); + pack16(multi_core->threads_per_core, buffer); - pack16(multi_core->ntasks_per_socket, buffer); - pack16(multi_core->ntasks_per_core, buffer); - pack16(multi_core->plane_size, buffer); + pack16(multi_core->ntasks_per_socket, buffer); + pack16(multi_core->ntasks_per_core, buffer); + pack16(multi_core->plane_size, buffer); + } } extern int @@ -11623,14 +12144,24 @@ unpack_multi_core_data (multi_core_data_t **mc_ptr, Buf buffer, multi_core = xmalloc(sizeof(multi_core_data_t)); - safe_unpack16(&multi_core->sockets_per_node, buffer); - safe_unpack16(&multi_core->cores_per_socket, buffer); - safe_unpack16(&multi_core->threads_per_core, buffer); - - safe_unpack16(&multi_core->ntasks_per_socket, buffer); - safe_unpack16(&multi_core->ntasks_per_core, buffer); - safe_unpack16(&multi_core->plane_size, buffer); - + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack16(&multi_core->boards_per_node, buffer); + safe_unpack16(&multi_core->sockets_per_board, buffer); + safe_unpack16(&multi_core->sockets_per_node, buffer); + safe_unpack16(&multi_core->cores_per_socket, buffer); + safe_unpack16(&multi_core->threads_per_core, buffer); + safe_unpack16(&multi_core->ntasks_per_board, buffer); + safe_unpack16(&multi_core->ntasks_per_socket, buffer); + safe_unpack16(&multi_core->ntasks_per_core, buffer); + safe_unpack16(&multi_core->plane_size, buffer); + } else { + safe_unpack16(&multi_core->sockets_per_node, buffer); + safe_unpack16(&multi_core->cores_per_socket, buffer); + safe_unpack16(&multi_core->threads_per_core, buffer); + safe_unpack16(&multi_core->ntasks_per_socket, buffer); + safe_unpack16(&multi_core->ntasks_per_core, buffer); + safe_unpack16(&multi_core->plane_size, buffer); + } *mc_ptr = multi_core; return SLURM_SUCCESS; @@ -11644,23 +12175,44 @@ static void _pack_slurmd_status(slurmd_status_t *msg, Buf buffer, { xassert(msg); - pack_time(msg->booted, buffer); - pack_time(msg->last_slurmctld_msg, buffer); - - pack16(msg->slurmd_debug, buffer); - pack16(msg->actual_cpus, buffer); - pack16(msg->actual_sockets, buffer); - pack16(msg->actual_cores, buffer); - pack16(msg->actual_threads, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + pack_time(msg->booted, buffer); + pack_time(msg->last_slurmctld_msg, buffer); - pack32(msg->actual_real_mem, buffer); - pack32(msg->actual_tmp_disk, buffer); - pack32(msg->pid, buffer); + pack16(msg->slurmd_debug, buffer); + pack16(msg->actual_cpus, buffer); + pack16(msg->actual_boards, buffer); + pack16(msg->actual_sockets, buffer); + pack16(msg->actual_cores, buffer); + pack16(msg->actual_threads, buffer); + + pack32(msg->actual_real_mem, buffer); + pack32(msg->actual_tmp_disk, buffer); + pack32(msg->pid, buffer); + + packstr(msg->hostname, buffer); + packstr(msg->slurmd_logfile, buffer); + packstr(msg->step_list, buffer); + packstr(msg->version, buffer); + } else { + pack_time(msg->booted, buffer); + pack_time(msg->last_slurmctld_msg, buffer); - packstr(msg->hostname, buffer); - packstr(msg->slurmd_logfile, buffer); - packstr(msg->step_list, buffer); - packstr(msg->version, buffer); + pack16(msg->slurmd_debug, buffer); + pack16(msg->actual_cpus, buffer); + pack16(msg->actual_sockets, buffer); + pack16(msg->actual_cores, buffer); + pack16(msg->actual_threads, buffer); + + pack32(msg->actual_real_mem, buffer); + pack32(msg->actual_tmp_disk, buffer); + pack32(msg->pid, buffer); + + packstr(msg->hostname, buffer); + packstr(msg->slurmd_logfile, buffer); + packstr(msg->step_list, buffer); + packstr(msg->version, buffer); + } } static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer, @@ -11673,23 +12225,48 @@ static int _unpack_slurmd_status(slurmd_status_t **msg_ptr, Buf buffer, msg = xmalloc(sizeof(slurmd_status_t)); - safe_unpack_time(&msg->booted, buffer); - safe_unpack_time(&msg->last_slurmctld_msg, buffer); - - safe_unpack16(&msg->slurmd_debug, buffer); - safe_unpack16(&msg->actual_cpus, buffer); - safe_unpack16(&msg->actual_sockets, buffer); - safe_unpack16(&msg->actual_cores, buffer); - safe_unpack16(&msg->actual_threads, buffer); + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpack_time(&msg->booted, buffer); + safe_unpack_time(&msg->last_slurmctld_msg, buffer); - safe_unpack32(&msg->actual_real_mem, buffer); - safe_unpack32(&msg->actual_tmp_disk, buffer); - safe_unpack32(&msg->pid, buffer); + safe_unpack16(&msg->slurmd_debug, buffer); + safe_unpack16(&msg->actual_cpus, buffer); + safe_unpack16(&msg->actual_boards, buffer); + safe_unpack16(&msg->actual_sockets, buffer); + safe_unpack16(&msg->actual_cores, buffer); + safe_unpack16(&msg->actual_threads, buffer); + + safe_unpack32(&msg->actual_real_mem, buffer); + safe_unpack32(&msg->actual_tmp_disk, buffer); + safe_unpack32(&msg->pid, buffer); + + safe_unpackstr_xmalloc(&msg->hostname, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->slurmd_logfile, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->step_list, + &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->version, + &uint32_tmp, buffer); + } else { + safe_unpack_time(&msg->booted, buffer); + safe_unpack_time(&msg->last_slurmctld_msg, buffer); - safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->step_list, &uint32_tmp, buffer); - safe_unpackstr_xmalloc(&msg->version, &uint32_tmp, buffer); + safe_unpack16(&msg->slurmd_debug, buffer); + safe_unpack16(&msg->actual_cpus, buffer); + safe_unpack16(&msg->actual_sockets, buffer); + safe_unpack16(&msg->actual_cores, buffer); + safe_unpack16(&msg->actual_threads, buffer); + + safe_unpack32(&msg->actual_real_mem, buffer); + safe_unpack32(&msg->actual_tmp_disk, buffer); + safe_unpack32(&msg->pid, buffer); + + safe_unpackstr_xmalloc(&msg->hostname, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->slurmd_logfile, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->step_list, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&msg->version, &uint32_tmp, buffer); + } *msg_ptr = msg; return SLURM_SUCCESS; diff --git a/src/common/xcpuinfo.c b/src/common/xcpuinfo.c index fc27ac967a..c1fe1ccb80 100644 --- a/src/common/xcpuinfo.c +++ b/src/common/xcpuinfo.c @@ -2,6 +2,7 @@ * xcpuinfo.c - cpuinfo related primitives ***************************************************************************** * Copyright (C) 2009 CEA/DAM/DIF + * Portions (hwloc) copyright (C) 2012 Bull, * Written by Matthieu Hautreux * * This file is part of SLURM, a resource management program. @@ -60,6 +61,10 @@ #include "src/common/xstring.h" #include "src/slurmd/slurmd/get_mach_stat.h" +#ifdef HAVE_HWLOC +#include +#endif + #include "xcpuinfo.h" static char* _cpuinfo_path = "/proc/cpuinfo"; @@ -75,7 +80,7 @@ static int _range_to_map(char* range, uint16_t *map, uint16_t map_size, static int _map_to_range(uint16_t *map, uint16_t map_size, char** prange); bool initialized = false; -uint16_t procs, sockets, cores, threads=1; +uint16_t procs, boards, sockets, cores, threads=1; uint16_t block_map_size; uint16_t *block_map, *block_map_inv; @@ -135,7 +140,8 @@ get_procs(uint16_t *procs) /* * get_cpuinfo - Return detailed cpuinfo on this system * Input: numproc - number of processors on the system - * Output: p_sockets - number of physical processor sockets + * Output: p_boards - number of baseboards (containing sockets) + * p_sockets - number of physical processor sockets * p_cores - total number of physical CPU cores * p_threads - total number of hardware execution threads * block_map - asbtract->physical block distribution map @@ -143,6 +149,117 @@ get_procs(uint16_t *procs) * return code - 0 if no error, otherwise errno * NOTE: User must xfree block_map and block_map_inv */ +#ifdef HAVE_HWLOC +#if DEBUG_DETAIL +static void hwloc_children(hwloc_topology_t topology, hwloc_obj_t obj, + int depth) +{ + char string[128]; + unsigned i; + + hwloc_obj_snprintf(string, sizeof(string), topology, obj, "#", 0); + debug3("%*s%s", 2*depth, "", string); + for (i = 0; i < obj->arity; i++) { + hwloc_children(topology, obj->children[i], depth + 1); + } +} +#endif + +extern int +get_cpuinfo(uint16_t numproc, uint16_t *p_boards, + uint16_t *p_sockets, uint16_t *p_cores, uint16_t *p_threads, + uint16_t *block_map_size, + uint16_t **block_map, uint16_t **block_map_inv) +{ + hwloc_topology_t topology; + hwloc_obj_t obj; + int depth; + /* Allocate and initialize topology object. */ + hwloc_topology_init(&topology); + /* Perform the topology detection. */ + hwloc_topology_load(topology); + + int boards = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + boards = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_boards = boards; + + int nsockets = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_SOCKET); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + nsockets = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_sockets = nsockets; + + int ncores = 1; + *p_cores = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_CORE); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + ncores = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_cores = ncores / nsockets; + + int npu = 1; + depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU); + if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { + npu = hwloc_get_nbobjs_by_depth(topology, depth); + } + *p_threads = npu / ncores; + + *block_map_size = npu; + /* See notes on _compute_block_map for details + * retval = _compute_block_map(*block_map_size, + * block_map, block_map_inv); */ + + uint16_t i; + /* Compute abstract->machine block mapping (and inverse) */ + if (block_map) { + *block_map = xmalloc(npu * sizeof(uint16_t)); + for (i=0; ios_index; + } + if (block_map_inv) { + *block_map_inv = xmalloc(npu * sizeof(uint16_t)); + for (i = 0; i < npu; i++) { + uint16_t idx = (*block_map)[i]; + (*block_map_inv)[idx] = i; + } + } + } + +#if DEBUG_DETAIL + /*** Display raw data ***/ + debug3(" "); + debug3("Boards: %u", *p_sockets); + debug3("Sockets: %u", *p_sockets); + debug3("Cores per socket: %u", *p_cores); + debug3("Threads per core: %u", *p_threads); + debug3(" "); + hwloc_children(topology, hwloc_get_root_obj(topology), 0); + + /* Display the mapping tables */ + if (block_map && block_map_inv) { + debug3(""); + debug3("Abstract -> Machine logical CPU ID block mapping:"); + debug3("(AbstractId PhysicalId Inverse"); + for (i = 0; i < numproc; i++) { + debug3(" %4d %4u %4u", + i, (*block_map)[i], (*block_map_inv)[i]); + } + debug3(""); + } + debug3(""); +#endif + hwloc_topology_destroy(topology); + return 0; + +} +#else + typedef struct cpuinfo { uint16_t seen; uint32_t cpuid; @@ -156,12 +273,15 @@ typedef struct cpuinfo { static cpuinfo_t *cpuinfo = NULL; /* array of CPU information for get_cpuinfo */ /* Note: file static for qsort/_compare_cpus*/ extern int -get_cpuinfo(uint16_t numproc, +get_cpuinfo(uint16_t numproc, uint16_t *p_boards, uint16_t *p_sockets, uint16_t *p_cores, uint16_t *p_threads, uint16_t *block_map_size, uint16_t **block_map, uint16_t **block_map_inv) { int retval; + + *p_boards = 1; /* Boards not identified from /proc/cpuinfo */ + uint16_t numcpu = 0; /* number of cpus seen */ uint16_t numphys = 0; /* number of unique "physical id"s */ uint16_t numcores = 0; /* number of unique "cores id"s */ @@ -458,7 +578,6 @@ get_cpuinfo(uint16_t numproc, return retval; } - /* _chk_cpuinfo_str * check a line of cpuinfo data (buffer) for a keyword. If it * exists, return the string value for that keyword in *valptr. @@ -601,7 +720,6 @@ static int _compute_block_map(uint16_t numproc, (*block_map_inv)[idx] = i; } } - #if DEBUG_DETAIL /* Display the mapping tables */ @@ -659,6 +777,7 @@ static int _compute_block_map(uint16_t numproc, #endif return 0; } +#endif int _ranges_conv(char* lrange,char** prange,int mode); @@ -679,7 +798,7 @@ xcpuinfo_init(void) if ( get_procs(&procs) ) return XCPUINFO_ERROR; - if ( get_cpuinfo(procs,&sockets,&cores,&threads, + if ( get_cpuinfo(procs,&boards,&sockets,&cores,&threads, &block_map_size,&block_map,&block_map_inv) ) return XCPUINFO_ERROR; diff --git a/src/common/xcpuinfo.h b/src/common/xcpuinfo.h index 0c93b84ebd..416298a288 100644 --- a/src/common/xcpuinfo.h +++ b/src/common/xcpuinfo.h @@ -45,7 +45,7 @@ #define XCPUINFO_SUCCESS 0 extern int get_procs(uint16_t *procs); -extern int get_cpuinfo(uint16_t numproc, +extern int get_cpuinfo(uint16_t numproc, uint16_t *boards, uint16_t *sockets, uint16_t *cores, uint16_t *threads, uint16_t *block_map_size, uint16_t **block_map, uint16_t **block_map_inv); diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 3feafe8501..730bc6fe87 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -5,6 +5,8 @@ * Copyright (C) 2006-2008 Hewlett-Packard Development Company, L.P. * Written by Susanne M. Balle, * CODE-OCEC-09-009. All rights reserved. + * Portions copyright (C) 2012 Bull + * Written by Martin Perry * * This file is part of SLURM, a resource management program. * For details, see . @@ -48,6 +50,68 @@ #define ALLOCATE_FULL_SOCKET 1 #endif +/* Max boards supported for best-fit across boards */ +/* Larger board configurations may require new algorithm */ +/* for acceptable performance */ +#define MAX_BOARDS 8 + +/* Combination counts + * comb_counts[n-1][k-1] = number of combinations of + * k items from a set of n items + * + * Formula is n!/k!(n-k)! + */ +uint32_t comb_counts[MAX_BOARDS][MAX_BOARDS] = + {{1,0,0,0,0,0,0,0}, + {2,1,0,0,0,0,0,0}, + {3,3,1,0,0,0,0,0}, + {4,6,4,1,0,0,0,0}, + {5,10,10,5,1,0,0,0}, + {6,15,20,15,6,1,0,0}, + {7,21,35,35,21,7,1,0}, + {8,28,56,70,56,28,8,1}}; + +/* Generate all combinations of k integers from the + * set of integers 0 to n-1. + * Return combinations in comb_list. + * + * Example: For k = 2 and n = 4, there are six + * combinations: + * {0,1},{0,2},{0,3},{1,2},{1,3},{2,3} + * + */ +void _gen_combs(int *comb_list, int n, int k) +{ + int *comb = xmalloc(k * sizeof(int)); + + /* Setup comb for the initial combination */ + int i, b; + for (i = 0; i < k; ++i) + comb[i] = i; + b = 0; + + /* Generate all the other combinations */ + while (1) { + for (i=0; i < k; i++) { + comb_list[b+i] = comb[i]; + } + b+=k; + i = k - 1; + ++comb[i]; + while ((i >= 0) && (comb[i] >= n - k + 1 + i)) { + --i; + ++comb[i]; + } + + if (comb[0] > n - k) + break; /* No more combinations */ + + for (i = i + 1; i < k; ++i) + comb[i] = comb[i - 1] + 1; + } + xfree(comb); +} + /* _compute_task_c_b_task_dist - compute the number of tasks on each * of the node for the cyclic and block distribution. We need to do * this in the case of consumable resources so that we have an exact @@ -95,7 +159,6 @@ static int _compute_c_b_task_dist(struct job_record *job_ptr) "setting to 1"); maxtasks = 1; } - if (job_ptr->details->cpus_per_task == 0) job_ptr->details->cpus_per_task = 1; for (tid = 0, i = job_ptr->details->cpus_per_task ; (tid < maxtasks); @@ -194,7 +257,16 @@ static int _compute_plane_dist(struct job_record *job_ptr) } /* sync up core bitmap with new CPU count using a best-fit approach - * on the available sockets + * on the available resources on each node + * + * "Best-fit" means: + * 1st priority: Use smallest number of boards with sufficient + * available CPUs + * 2nd priority: Use smallest number of sockets with sufficient + * available CPUs + * 3rd priority: Use board combination with the smallest number + * of available CPUs + * 4th priority: Use higher-numbered boards/sockets/cores first * * The CPU array contains the distribution of CPUs, which can include * virtual CPUs (hyperthreads) @@ -202,20 +274,53 @@ static int _compute_plane_dist(struct job_record *job_ptr) static void _block_sync_core_bitmap(struct job_record *job_ptr, const uint16_t cr_type) { - uint32_t c, s, i, j, n, size, csize, core_cnt; + uint32_t c, s, i, j, n, b, z, size, csize, core_cnt; uint16_t cpus, num_bits, vpus = 1; job_resources_t *job_res = job_ptr->job_resrcs; bool alloc_cores = false, alloc_sockets = false; uint16_t ntasks_per_core = 0xffff; + int count, cpu_min, b_min, elig, s_min, comb_idx, sock_idx; + int elig_idx, comb_brd_idx, sock_list_idx, comb_min, board_num; + int* boards_cpu_cnt; + int* sort_brds_cpu_cnt; int* sockets_cpu_cnt; + int* board_combs; + int* socket_list; + int* elig_brd_combs; + int* elig_cpu_cnt; bool* sockets_used; + uint16_t boards_nb; + uint16_t nboards_nb; uint16_t sockets_nb; uint16_t ncores_nb; uint16_t nsockets_nb; + uint16_t sock_per_brd; + uint16_t sock_per_comb; uint16_t req_cpus,best_fit_cpus = 0; uint32_t best_fit_location = 0; + uint64_t ncomb_brd; bool sufficient,best_fit_sufficient; + /* qsort compare function for ascending int list */ + int _cmp_int_ascend (const void *a, const void *b) + { + return (*(int*)a - *(int*)b); + } + + /* qsort compare function for descending int list */ + int _cmp_int_descend (const void *a, const void *b) + { + return (*(int*)b - *(int*)a); + } + + /* qsort compare function for board combination socket + * list */ + int _cmp_sock (const void *a, const void *b) + { + return (sockets_cpu_cnt[*(int*)b] - + sockets_cpu_cnt[*(int*)a]); + } + if (!job_res) return; @@ -246,6 +351,9 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, sockets_nb = select_node_record[0].sockets; sockets_cpu_cnt = xmalloc(sockets_nb * sizeof(int)); sockets_used = xmalloc(sockets_nb * sizeof(bool)); + boards_nb = select_node_record[0].boards; + boards_cpu_cnt = xmalloc(boards_nb * sizeof(int)); + sort_brds_cpu_cnt = xmalloc(boards_nb * sizeof(int)); for (c = 0, i = 0, n = 0; n < size; n++) { @@ -255,33 +363,163 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, core_cnt = 0; ncores_nb = select_node_record[n].cores; nsockets_nb = select_node_record[n].sockets; + nboards_nb = select_node_record[n].boards; num_bits = nsockets_nb * ncores_nb; if ((c + num_bits) > csize) - fatal ("cons_res: _block_sync_core_bitmap index error"); + fatal("cons_res: _block_sync_core_bitmap index error"); cpus = job_res->cpus[i]; vpus = MIN(select_node_record[n].vpus, ntasks_per_core); + if (nboards_nb > MAX_BOARDS) { + debug3("cons_res: node[%u]: exceeds max boards; " + "doing best-fit across sockets only", n); + nboards_nb = 1; + } + if ( nsockets_nb > sockets_nb) { sockets_nb = nsockets_nb; xrealloc(sockets_cpu_cnt, sockets_nb * sizeof(int)); xrealloc(sockets_used,sockets_nb * sizeof(bool)); } - /* count cores provided by each socket */ + if ( nboards_nb > boards_nb) { + boards_nb = nboards_nb; + xrealloc(boards_cpu_cnt, boards_nb * sizeof(int)); + xrealloc(sort_brds_cpu_cnt, boards_nb * sizeof(int)); + } + + /* Count available cores on each socket and board */ + sock_per_brd = nsockets_nb / nboards_nb; + for (b = 0; b < nboards_nb; b++) { + boards_cpu_cnt[b] = 0; + sort_brds_cpu_cnt[b] = 0; + } for (s = 0; s < nsockets_nb; s++) { sockets_cpu_cnt[s]=0; sockets_used[s]=false; + b = s/sock_per_brd; for ( j = c + (s * ncores_nb) ; j < c + ((s+1) * ncores_nb) ; j++ ) { - if ( bit_test(job_res->core_bitmap,j) ) + if ( bit_test(job_res->core_bitmap,j) ) { sockets_cpu_cnt[s]++; + boards_cpu_cnt[b]++; + sort_brds_cpu_cnt[b]++; + } } } - /* select cores in the sockets using a best-fit approach */ + /* Sort boards in descending order of available core count */ + qsort(sort_brds_cpu_cnt, nboards_nb, sizeof (int), + _cmp_int_descend); + /* Determine minimum number of boards required for the + * allocation (b_min) */ + count = 0; + for (b = 0; b < nboards_nb; b++) { + count+=sort_brds_cpu_cnt[b]; + if (count >= cpus) + break; + } + b_min = b+1; + sock_per_comb = b_min * sock_per_brd; + + /* Allocate space for list of board combinations */ + ncomb_brd = comb_counts[nboards_nb-1][b_min-1]; + board_combs = xmalloc(ncomb_brd * b_min * sizeof(int)); + /* Generate all combinations of b_min boards on the node */ + _gen_combs(board_combs, nboards_nb, b_min); + + /* Determine which combinations have enough available cores + * for the allocation (eligible board combinations) + */ + elig_brd_combs = xmalloc(ncomb_brd * sizeof(int)); + elig_cpu_cnt = xmalloc(ncomb_brd * sizeof(int)); + elig = 0; + for (comb_idx = 0; comb_idx < ncomb_brd; comb_idx++) { + count = 0; + for (comb_brd_idx = 0; comb_brd_idx < b_min; + comb_brd_idx++) { + board_num = board_combs[(comb_idx * b_min) + + comb_brd_idx]; + count += boards_cpu_cnt[board_num]; + } + if (count >= cpus) { + elig_brd_combs[elig] = comb_idx; + elig_cpu_cnt[elig] = count; + elig++; + } + } + + /* Allocate space for list of sockets for each eligible board + * combination */ + socket_list = xmalloc(elig * sock_per_comb * sizeof(int)); + + /* Generate sorted list of sockets for each eligible board + * combination, and find combination with minimum number + * of sockets and minimum number of cpus required for the + * allocation + */ + s_min = sock_per_comb; + comb_min = 0; + cpu_min = sock_per_comb * ncores_nb; + for (elig_idx = 0; elig_idx < elig; elig_idx++) { + comb_idx = elig_brd_combs[elig_idx]; + for (comb_brd_idx = 0; comb_brd_idx < b_min; + comb_brd_idx++) { + board_num = board_combs[(comb_idx * b_min) + + comb_brd_idx]; + sock_list_idx = (elig_idx * sock_per_comb) + + (comb_brd_idx * sock_per_brd); + for (sock_idx = 0; sock_idx < sock_per_brd; + sock_idx++) { + socket_list[sock_list_idx + sock_idx] + = (board_num * sock_per_brd) + + sock_idx; + } + } + /* Sort this socket list in descending order of + * available core count */ + qsort(&socket_list[elig_idx*sock_per_comb], + sock_per_comb, sizeof (int), _cmp_sock); + /* Determine minimum number of sockets required for + * the allocation from this socket list */ + count = 0; + for (b = 0; b < sock_per_comb; b++) { + sock_idx = + socket_list[(int)((elig_idx*sock_per_comb)+b)]; + count+=sockets_cpu_cnt[sock_idx]; + if (count >= cpus) + break; + } + b++; + /* Use board combination with minimum number + * of required sockets and minimum number of CPUs + */ + if ((b < s_min) || + (b == s_min && elig_cpu_cnt[elig_idx] + <= cpu_min)) { + s_min = b; + comb_min = elig_idx; + cpu_min = elig_cpu_cnt[elig_idx]; + } + } + debug3("cons_res: best_fit: node[%u]: required cpus: %u, " + "min req boards: %u,", n, cpus, b_min); + debug3("cons_res: best_fit: node[%u]: min req sockets: %u, " + "min avail cpus: %u", n, s_min, cpu_min); + /* Re-sort socket list for best-fit board combination in + * ascending order of socket number */ + qsort(&socket_list[comb_min * sock_per_comb], sock_per_comb, + sizeof (int), _cmp_int_ascend); + + xfree(board_combs); + xfree(elig_brd_combs); + xfree(elig_cpu_cnt); + + /* select cores from the sockets of the best-fit board + * combination using a best-fit approach */ while( cpus > 0 ) { best_fit_cpus = 0; @@ -295,7 +533,8 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, /* search for the best socket, */ /* starting from the last one to let more room */ /* in the first one for system usage */ - for ( s = nsockets_nb - 1 ; (int) s >= (int) 0 ; s-- ) { + for ( z = sock_per_comb-1; (int) z >= (int) 0; z-- ) { + s = socket_list[(comb_min*sock_per_comb)+z]; sufficient = sockets_cpu_cnt[s] >= req_cpus ; if ( (best_fit_cpus == 0) || (sufficient && !best_fit_sufficient ) || @@ -313,9 +552,10 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, if ( best_fit_cpus == 0 ) break; - debug3("dist_task: best_fit : using node[%u]:" - "socket[%u] : %u cores available", - n, best_fit_location, + debug3("cons_res: best_fit: using node[%u]: " + "board[%u]: socket[%u]: %u cores available", + n, best_fit_location/sock_per_brd, + best_fit_location, sockets_cpu_cnt[best_fit_location]); /* select socket cores from last to first */ @@ -373,6 +613,7 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, } + xfree(socket_list); if (cpus > 0) { /* cpu count should NEVER be greater than the number * of set bits in the core bitmap for a given node */ @@ -392,11 +633,12 @@ static void _block_sync_core_bitmap(struct job_record *job_ptr, } + xfree(boards_cpu_cnt); + xfree(sort_brds_cpu_cnt); xfree(sockets_cpu_cnt); xfree(sockets_used); } - /* Sync up the core_bitmap with the CPU array using cyclic distribution * * The CPU array contains the distribution of CPUs, which can include diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index c3604a9bcf..e9cffa42f2 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -1933,6 +1933,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) struct config_record *config_ptr; config_ptr = node_ptr[i].config_ptr; select_node_record[i].cpus = config_ptr->cpus; + select_node_record[i].boards = config_ptr->boards; select_node_record[i].sockets = config_ptr->sockets; select_node_record[i].cores = config_ptr->cores; select_node_record[i].vpus = config_ptr->threads; @@ -1940,6 +1941,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) real_memory; } else { select_node_record[i].cpus = node_ptr[i].cpus; + select_node_record[i].boards = node_ptr[i].boards; select_node_record[i].sockets = node_ptr[i].sockets; select_node_record[i].cores = node_ptr[i].cores; select_node_record[i].vpus = node_ptr[i].threads; diff --git a/src/plugins/select/cons_res/select_cons_res.h b/src/plugins/select/cons_res/select_cons_res.h index 4cd80f0672..8fa6bb33a2 100644 --- a/src/plugins/select/cons_res/select_cons_res.h +++ b/src/plugins/select/cons_res/select_cons_res.h @@ -104,6 +104,7 @@ struct part_res_record { struct node_res_record { struct node_record *node_ptr; /* ptr to the actual node */ uint16_t cpus; /* count of processors configured */ + uint16_t boards; /* count of boards configured */ uint16_t sockets; /* count of sockets configured */ uint16_t cores; /* count of cores configured */ uint16_t vpus; /* count of virtual cpus (hyperthreads) diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index d2e8364c2d..7bc1922b05 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -452,7 +452,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) { struct node_record *node_ptr; uint16_t avail_cpus; - uint16_t cpus, sockets, cores, threads; + uint16_t cpus, boards, sockets, cores, threads; uint16_t cpus_per_task = 1; uint16_t ntasks_per_node = 0, ntasks_per_socket, ntasks_per_core; uint16_t min_sockets, min_cores, min_threads; @@ -482,19 +482,21 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) node_ptr = select_node_ptr + index; if (select_fast_schedule) { /* don't bother checking each node */ cpus = node_ptr->config_ptr->cpus; + boards = node_ptr->config_ptr->boards; sockets = node_ptr->config_ptr->sockets; cores = node_ptr->config_ptr->cores; threads = node_ptr->config_ptr->threads; } else { cpus = node_ptr->cpus; + boards = node_ptr->boards; sockets = node_ptr->sockets; cores = node_ptr->cores; threads = node_ptr->threads; } #if SELECT_DEBUG - info("host %s HW_ cpus %u sockets %u cores %u threads %u ", - node_ptr->name, cpus, sockets, cores, threads); + info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/sacct/Makefile.am b/src/sacct/Makefile.am index d203aaf3d8..7acfcb8670 100644 --- a/src/sacct/Makefile.am +++ b/src/sacct/Makefile.am @@ -9,7 +9,8 @@ bin_PROGRAMS = sacct sacct_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) -sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) noinst_HEADERS = sacct.c sacct_SOURCES = \ diff --git a/src/sacct/Makefile.in b/src/sacct/Makefile.in index 49a681156d..75b11a1df1 100644 --- a/src/sacct/Makefile.in +++ b/src/sacct/Makefile.in @@ -321,7 +321,9 @@ AUTOMAKE_OPTIONS = foreign CLEANFILES = core.* INCLUDES = -I$(top_srcdir) sacct_LDADD = $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) -sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacct_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + noinst_HEADERS = sacct.c sacct_SOURCES = \ options.c \ diff --git a/src/sacctmgr/Makefile.am b/src/sacctmgr/Makefile.am index 584b4b5856..9a887d4e6f 100644 --- a/src/sacctmgr/Makefile.am +++ b/src/sacctmgr/Makefile.am @@ -27,7 +27,8 @@ sacctmgr_SOURCES = \ wckey_functions.c \ problem_functions.c -sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sacctmgr_LDADD) : force diff --git a/src/sacctmgr/Makefile.in b/src/sacctmgr/Makefile.in index b8c78fd02f..3d0aab24b5 100644 --- a/src/sacctmgr/Makefile.in +++ b/src/sacctmgr/Makefile.in @@ -343,7 +343,9 @@ sacctmgr_SOURCES = \ wckey_functions.c \ problem_functions.c -sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sacctmgr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/salloc/Makefile.am b/src/salloc/Makefile.am index 4ef6a74a51..885818538a 100644 --- a/src/salloc/Makefile.am +++ b/src/salloc/Makefile.am @@ -18,7 +18,8 @@ if HAVE_REAL_CRAY salloc_LDADD += -ljob endif -salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/salloc/Makefile.in b/src/salloc/Makefile.in index a5a8c5ef09..cf83a3adbc 100644 --- a/src/salloc/Makefile.in +++ b/src/salloc/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) salloc_SOURCES = salloc.c salloc.h opt.c opt.h convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) salloc_LDADD = $(convenience_libs) $(am__append_1) -salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +salloc_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sattach/Makefile.am b/src/sattach/Makefile.am index 1f6b88518f..4ca5a0b3f3 100644 --- a/src/sattach/Makefile.am +++ b/src/sattach/Makefile.am @@ -17,7 +17,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sattach_LDADD = \ $(convenience_libs) -sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/sattach/Makefile.in b/src/sattach/Makefile.in index b37d95d9da..c6a4ad49eb 100644 --- a/src/sattach/Makefile.in +++ b/src/sattach/Makefile.in @@ -327,7 +327,9 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sattach_LDADD = \ $(convenience_libs) -sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sattach_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sbatch/Makefile.am b/src/sbatch/Makefile.am index 9b88be83fe..929c22bb3c 100644 --- a/src/sbatch/Makefile.am +++ b/src/sbatch/Makefile.am @@ -13,7 +13,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sbatch_LDADD = $(convenience_libs) -sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/sbatch/Makefile.in b/src/sbatch/Makefile.in index 88fa9e2897..80127584c0 100644 --- a/src/sbatch/Makefile.in +++ b/src/sbatch/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) sbatch_SOURCES = sbatch.c mult_cluster.c mult_cluster.h opt.c opt.h convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sbatch_LDADD = $(convenience_libs) -sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbatch_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sbcast/Makefile.am b/src/sbcast/Makefile.am index 6ec2083e5e..166f66f80e 100644 --- a/src/sbcast/Makefile.am +++ b/src/sbcast/Makefile.am @@ -15,5 +15,6 @@ force: $(sbcast_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sbcast/Makefile.in b/src/sbcast/Makefile.in index 271955d3a6..1e3e5dba44 100644 --- a/src/sbcast/Makefile.in +++ b/src/sbcast/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sbcast_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -lm noinst_HEADERS = sbcast.h sbcast_SOURCES = agent.c sbcast.c opts.c -sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sbcast_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/scancel/Makefile.am b/src/scancel/Makefile.am index f8aa1d75bd..7bd9beef04 100644 --- a/src/scancel/Makefile.am +++ b/src/scancel/Makefile.am @@ -11,7 +11,8 @@ scancel_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = scancel.h scancel_SOURCES = scancel.c opt.c -scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(scancel_LDADD) : force diff --git a/src/scancel/Makefile.in b/src/scancel/Makefile.in index 75843922ab..131a7c944d 100644 --- a/src/scancel/Makefile.in +++ b/src/scancel/Makefile.in @@ -321,7 +321,9 @@ INCLUDES = -I$(top_srcdir) scancel_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = scancel.h scancel_SOURCES = scancel.c opt.c -scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scancel_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/scontrol/Makefile.am b/src/scontrol/Makefile.am index af1c41183a..316506270a 100644 --- a/src/scontrol/Makefile.am +++ b/src/scontrol/Makefile.am @@ -27,7 +27,8 @@ scontrol_LDADD = \ $(convenience_libs) \ $(READLINE_LIBS) -scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/scontrol/Makefile.in b/src/scontrol/Makefile.in index 34ced407f7..3091c3a888 100644 --- a/src/scontrol/Makefile.in +++ b/src/scontrol/Makefile.in @@ -339,7 +339,9 @@ scontrol_LDADD = \ $(convenience_libs) \ $(READLINE_LIBS) -scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +scontrol_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sdiag/Makefile.am b/src/sdiag/Makefile.am index 2f111e8a62..4b1a92c796 100644 --- a/src/sdiag/Makefile.am +++ b/src/sdiag/Makefile.am @@ -14,5 +14,6 @@ force: $(sdiag_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sdiag/Makefile.in b/src/sdiag/Makefile.in index bb3185235c..5128c731a7 100644 --- a/src/sdiag/Makefile.in +++ b/src/sdiag/Makefile.in @@ -318,7 +318,9 @@ AUTOMAKE_OPTIONS = foreign INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sdiag_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) sdiag_SOURCES = sdiag.c opts.c -sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sdiag_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sinfo/Makefile.am b/src/sinfo/Makefile.am index 96e06a97cb..aef1c160ef 100644 --- a/src/sinfo/Makefile.am +++ b/src/sinfo/Makefile.am @@ -15,5 +15,6 @@ force: $(sinfo_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sinfo/Makefile.in b/src/sinfo/Makefile.in index 58d61f6a58..63f70c9950 100644 --- a/src/sinfo/Makefile.in +++ b/src/sinfo/Makefile.in @@ -323,7 +323,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) sinfo_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = sinfo.h print.h sinfo_SOURCES = sinfo.c opts.c print.c sort.c -sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sinfo_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/slurmctld/Makefile.am b/src/slurmctld/Makefile.am index 67b463114d..db271915bd 100644 --- a/src/slurmctld/Makefile.am +++ b/src/slurmctld/Makefile.am @@ -66,7 +66,8 @@ sbin_PROGRAMS = slurmctld slurmctld_LDADD = \ $(top_builddir)/src/common/libdaemonize.la \ $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(slurmctld_LDADD) : force diff --git a/src/slurmctld/Makefile.in b/src/slurmctld/Makefile.in index 6ec439aeab..2c08a1cac2 100644 --- a/src/slurmctld/Makefile.in +++ b/src/slurmctld/Makefile.in @@ -386,7 +386,9 @@ slurmctld_LDADD = \ $(top_builddir)/src/common/libdaemonize.la \ $(top_builddir)/src/api/libslurm.o $(DL_LIBS) -slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmctld_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/slurmctld/job_mgr.c b/src/slurmctld/job_mgr.c index 5a16bd3245..6bd8656db5 100644 --- a/src/slurmctld/job_mgr.c +++ b/src/slurmctld/job_mgr.c @@ -101,7 +101,8 @@ #define JOB_HASH_INX(_job_id) (_job_id % hash_table_size) /* Change JOB_STATE_VERSION value when changing the state save format */ -#define JOB_STATE_VERSION "VER012" +#define JOB_STATE_VERSION "VER013" +#define JOB_2_5_STATE_VERSION "VER013" /* SLURM version 2.5 */ #define JOB_2_4_STATE_VERSION "VER012" /* SLURM version 2.4 */ #define JOB_2_3_STATE_VERSION "VER011" /* SLURM version 2.3 */ #define JOB_2_2_STATE_VERSION "VER010" /* SLURM version 2.2 */ @@ -624,6 +625,8 @@ extern int load_all_job_state(void) if (ver_str) { if (!strcmp(ver_str, JOB_STATE_VERSION)) { protocol_version = SLURM_PROTOCOL_VERSION; + } else if (!strcmp(ver_str, JOB_2_4_STATE_VERSION)) { + protocol_version = SLURM_2_4_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_3_STATE_VERSION)) { protocol_version = SLURM_2_3_PROTOCOL_VERSION; } else if (!strcmp(ver_str, JOB_2_2_STATE_VERSION)) { @@ -3491,6 +3494,7 @@ static int _part_access_check(struct part_record *part_ptr, { uint32_t total_nodes; + if ((part_ptr->flags & PART_FLAG_REQ_RESV) && (!job_desc->reservation || !strlen(job_desc->reservation))) { info("_part_access_check: uid %u access to partition %s " diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 714e3cfe9f..2595de55a3 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -82,7 +82,8 @@ #define MAX_RETRIES 10 /* Change NODE_STATE_VERSION value when changing the state save format */ -#define NODE_STATE_VERSION "VER005" +#define NODE_STATE_VERSION "VER006" +#define NODE_2_5_STATE_VERSION "VER006" /* SLURM version 2.5 */ #define NODE_2_4_STATE_VERSION "VER005" /* SLURM version 2.4 */ #define NODE_2_2_STATE_VERSION "VER004" /* SLURM version 2.2 & 2.3 */ #define NODE_2_1_STATE_VERSION "VER003" /* SLURM version 2.1 */ @@ -222,6 +223,7 @@ _dump_node_state (struct node_record *dump_node_ptr, Buf buffer) packstr (dump_node_ptr->gres, buffer); pack16 (dump_node_ptr->node_state, buffer); pack16 (dump_node_ptr->cpus, buffer); + pack16 (dump_node_ptr->boards, buffer); pack16 (dump_node_ptr->sockets, buffer); pack16 (dump_node_ptr->cores, buffer); pack16 (dump_node_ptr->threads, buffer); @@ -279,7 +281,7 @@ extern int load_all_node_state ( bool state_only ) char *features = NULL, *gres = NULL; int data_allocated, data_read = 0, error_code = 0, node_cnt = 0; uint16_t node_state; - uint16_t cpus = 1, sockets = 1, cores = 1, threads = 1; + uint16_t cpus = 1, boards = 1, sockets = 1, cores = 1, threads = 1; uint32_t real_memory, tmp_disk, data_size = 0, name_len; uint32_t reason_uid = NO_VAL; time_t reason_time = 0; @@ -334,6 +336,8 @@ extern int load_all_node_state ( bool state_only ) if (ver_str) { if (!strcmp(ver_str, NODE_STATE_VERSION)) { protocol_version = SLURM_PROTOCOL_VERSION; + } else if (!strcmp(ver_str, NODE_2_4_STATE_VERSION)) { + protocol_version = SLURM_2_4_PROTOCOL_VERSION; } else if (!strcmp(ver_str, NODE_2_2_STATE_VERSION)) { protocol_version = SLURM_2_2_PROTOCOL_VERSION; } else if (!strcmp(ver_str, NODE_2_1_STATE_VERSION)) { @@ -358,7 +362,30 @@ extern int load_all_node_state ( bool state_only ) while (remaining_buf (buffer) > 0) { uint16_t base_state; - if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + safe_unpackstr_xmalloc (&comm_name, &name_len, buffer); + safe_unpackstr_xmalloc (&node_name, &name_len, buffer); + safe_unpackstr_xmalloc (&node_hostname, + &name_len, buffer); + safe_unpackstr_xmalloc (&reason, &name_len, buffer); + safe_unpackstr_xmalloc (&features, &name_len, buffer); + safe_unpackstr_xmalloc (&gres, &name_len, buffer); + safe_unpack16 (&node_state, buffer); + safe_unpack16 (&cpus, buffer); + safe_unpack16 (&boards, buffer); + safe_unpack16 (&sockets, buffer); + safe_unpack16 (&cores, buffer); + safe_unpack16 (&threads, buffer); + safe_unpack32 (&real_memory, buffer); + safe_unpack32 (&tmp_disk, buffer); + safe_unpack32 (&reason_uid, buffer); + safe_unpack_time (&reason_time, buffer); + if (gres_plugin_node_state_unpack( + &gres_list, buffer, node_name, + protocol_version) != SLURM_SUCCESS) + goto unpack_error; + base_state = node_state & NODE_STATE_BASE; + } else if (protocol_version >= SLURM_2_4_PROTOCOL_VERSION) { safe_unpackstr_xmalloc (&comm_name, &name_len, buffer); safe_unpackstr_xmalloc (&node_name, &name_len, buffer); safe_unpackstr_xmalloc (&node_hostname, @@ -418,13 +445,14 @@ extern int load_all_node_state ( bool state_only ) /* validity test as possible */ if ((cpus == 0) || + (boards == 0) || (sockets == 0) || (cores == 0) || (threads == 0) || (base_state >= NODE_STATE_END)) { - error ("Invalid data for node %s: procs=%u, " - "sockets=%u, cores=%u, threads=%u, state=%u", - node_name, cpus, + error ("Invalid data for node %s: procs=%u, boards=%u," + " sockets=%u, cores=%u, threads=%u, state=%u", + node_name, cpus, boards, sockets, cores, threads, node_state); error ("No more node data will be processed from the " "checkpoint file"); @@ -497,6 +525,7 @@ extern int load_all_node_state ( bool state_only ) /* Recover hardware state for powered * down nodes */ node_ptr->cpus = cpus; + node_ptr->boards = boards; node_ptr->sockets = sockets; node_ptr->cores = cores; node_ptr->threads = threads; @@ -743,7 +772,56 @@ extern void pack_all_node (char **buffer_ptr, int *buffer_size, static void _pack_node (struct node_record *dump_node_ptr, Buf buffer, uint16_t protocol_version) { - if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + packstr (dump_node_ptr->name, buffer); + packstr (dump_node_ptr->node_hostname, buffer); + packstr (dump_node_ptr->comm_name, buffer); + pack16 (dump_node_ptr->node_state, buffer); + /* On a bluegene system always use the regular node + * infomation not what is in the config_ptr. + */ +#ifndef HAVE_BG + if (slurmctld_conf.fast_schedule) { + /* Only data from config_record used for scheduling */ + pack16(dump_node_ptr->config_ptr->cpus, buffer); + pack16(dump_node_ptr->config_ptr->boards, buffer); + pack16(dump_node_ptr->config_ptr->sockets, buffer); + pack16(dump_node_ptr->config_ptr->cores, buffer); + pack16(dump_node_ptr->config_ptr->threads, buffer); + pack32(dump_node_ptr->config_ptr->real_memory, buffer); + pack32(dump_node_ptr->config_ptr->tmp_disk, buffer); + } else { +#endif + /* Individual node data used for scheduling */ + pack16(dump_node_ptr->cpus, buffer); + pack16(dump_node_ptr->boards, buffer); + pack16(dump_node_ptr->sockets, buffer); + pack16(dump_node_ptr->cores, buffer); + pack16(dump_node_ptr->threads, buffer); + pack32(dump_node_ptr->real_memory, buffer); + pack32(dump_node_ptr->tmp_disk, buffer); +#ifndef HAVE_BG + } +#endif + pack32(dump_node_ptr->config_ptr->weight, buffer); + pack32(dump_node_ptr->reason_uid, buffer); + + pack_time(dump_node_ptr->boot_time, buffer); + pack_time(dump_node_ptr->reason_time, buffer); + pack_time(dump_node_ptr->slurmd_start_time, buffer); + + select_g_select_nodeinfo_pack(dump_node_ptr->select_nodeinfo, + buffer, protocol_version); + + packstr(dump_node_ptr->arch, buffer); + packstr(dump_node_ptr->features, buffer); + if (dump_node_ptr->gres) + packstr(dump_node_ptr->gres, buffer); + else + packstr(dump_node_ptr->config_ptr->gres, buffer); + packstr(dump_node_ptr->os, buffer); + packstr(dump_node_ptr->reason, buffer); + } else if (protocol_version >= SLURM_2_3_PROTOCOL_VERSION) { packstr (dump_node_ptr->name, buffer); packstr (dump_node_ptr->node_hostname, buffer); packstr (dump_node_ptr->comm_name, buffer); @@ -1288,6 +1366,7 @@ struct config_record * _dup_config(struct config_record *config_ptr) new_config_ptr = create_config_record(); new_config_ptr->magic = config_ptr->magic; new_config_ptr->cpus = config_ptr->cpus; + new_config_ptr->boards = config_ptr->boards; new_config_ptr->sockets = config_ptr->sockets; new_config_ptr->cores = config_ptr->cores; new_config_ptr->threads = config_ptr->threads; @@ -1717,13 +1796,16 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) gres_plugin_node_state_log(node_ptr->gres_list, node_ptr->name); if (slurmctld_conf.fast_schedule != 2) { + int boards1, boards2; /* total boards on node */ int sockets1, sockets2; /* total sockets on node */ int cores1, cores2; /* total cores on node */ int threads1, threads2; /* total threads on node */ + boards1 = reg_msg->boards; sockets1 = reg_msg->sockets; cores1 = sockets1 * reg_msg->cores; threads1 = cores1 * reg_msg->threads; + boards2 = config_ptr->boards; sockets2 = config_ptr->sockets; cores2 = sockets2 * config_ptr->cores; threads2 = cores2 * config_ptr->threads; @@ -1780,6 +1862,7 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) } } if (error_code == SLURM_SUCCESS) { + node_ptr->boards = reg_msg->boards; node_ptr->sockets = reg_msg->sockets; node_ptr->cores = reg_msg->cores; node_ptr->threads = reg_msg->threads; @@ -2101,6 +2184,7 @@ extern int validate_nodes_via_front_end( } } + /* purge orphan batch jobs */ job_iterator = list_iterator_create(job_list); while ((job_ptr = (struct job_record *) list_next(job_iterator))) { diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 266dd06936..3cd547ac07 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1053,6 +1053,7 @@ static int _restore_node_state(int recover, node_ptr->cpus = old_node_ptr->cpus; node_ptr->cores = old_node_ptr->cores; node_ptr->last_idle = old_node_ptr->last_idle; + node_ptr->boards = old_node_ptr->boards; node_ptr->sockets = old_node_ptr->sockets; node_ptr->threads = old_node_ptr->threads; node_ptr->real_memory = old_node_ptr->real_memory; diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index a9d5982cb8..3264db053c 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -5,32 +5,32 @@ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Danny Auble * CODE-OCEC-09-009. All rights reserved. - * + * * This file is part of SLURM, a resource management program. * For details, see . * Please also read the included file: DISCLAIMER. - * + * * SLURM is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * - * In addition, as a special exception, the copyright holders give permission - * to link the code of portions of this program with the OpenSSL library under - * certain conditions as described in each individual source file, and - * distribute linked combinations including the two. You must obey the GNU - * General Public License in all respects for all of the code used other than - * OpenSSL. If you modify file(s) with this exception, you may extend this - * exception to your version of the file(s), but you are not obligated to do + * In addition, as a special exception, the copyright holders give permission + * to link the code of portions of this program with the OpenSSL library under + * certain conditions as described in each individual source file, and + * distribute linked combinations including the two. You must obey the GNU + * General Public License in all respects for all of the code used other than + * OpenSSL. If you modify file(s) with this exception, you may extend this + * exception to your version of the file(s), but you are not obligated to do * so. If you do not wish to do so, delete this exception statement from your - * version. If you delete this exception statement from all source files in + * version. If you delete this exception statement from all source files in * the program, then also delete it here. - * + * * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. - * + * * You should have received a copy of the GNU General Public License along * with SLURM; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. @@ -42,6 +42,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) { xassert(conf != NULL); packstr(conf->hostname, buffer); + pack16(conf->boards, buffer); pack16(conf->sockets, buffer); pack16(conf->cores, buffer); pack16(conf->threads, buffer); @@ -55,6 +56,7 @@ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) packstr(conf->task_prolog, buffer); packstr(conf->task_epilog, buffer); pack16(conf->job_acct_gather_freq, buffer); + packstr(conf->job_acct_gather_type, buffer); pack16(conf->propagate_prio, buffer); pack32(conf->debug_flags, buffer); pack32(conf->debug_level, buffer); @@ -72,6 +74,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) uint32_t uint32_tmp; safe_unpackstr_xmalloc(&conf->hostname, &uint32_tmp, buffer); + safe_unpack16(&conf->boards, buffer); safe_unpack16(&conf->sockets, buffer); safe_unpack16(&conf->cores, buffer); safe_unpack16(&conf->threads, buffer); @@ -85,6 +88,7 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpackstr_xmalloc(&conf->task_prolog, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->task_epilog, &uint32_tmp, buffer); safe_unpack16(&conf->job_acct_gather_freq, buffer); + safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, buffer); safe_unpack16(&conf->propagate_prio, buffer); safe_unpack32(&conf->debug_flags, buffer); safe_unpack32(&uint32_tmp, buffer); diff --git a/src/slurmd/slurmd/Makefile.am b/src/slurmd/slurmd/Makefile.am index 7d81740c4f..a9f6ff2d0c 100644 --- a/src/slurmd/slurmd/Makefile.am +++ b/src/slurmd/slurmd/Makefile.am @@ -27,9 +27,11 @@ slurmd_SOURCES = $(SLURMD_SOURCES) if HAVE_AIX # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 else -slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) endif force: diff --git a/src/slurmd/slurmd/Makefile.in b/src/slurmd/slurmd/Makefile.in index c76d154ab0..43158aa140 100644 --- a/src/slurmd/slurmd/Makefile.in +++ b/src/slurmd/slurmd/Makefile.in @@ -336,11 +336,15 @@ SLURMD_SOURCES = \ xcpu.c xcpu.h slurmd_SOURCES = $(SLURMD_SOURCES) -@HAVE_AIX_FALSE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@HAVE_AIX_FALSE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_FALSE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -@HAVE_AIX_TRUE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +@HAVE_AIX_TRUE@slurmd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 + all: all-am .SUFFIXES: diff --git a/src/slurmd/slurmd/req.c b/src/slurmd/slurmd/req.c index bbf066249d..0220d127cf 100644 --- a/src/slurmd/slurmd/req.c +++ b/src/slurmd/slurmd/req.c @@ -838,6 +838,7 @@ _check_job_credential(launch_tasks_request_msg_t *req, uid_t uid, } host_index = hostset_find(j_hset, conf->node_name); hostset_destroy(j_hset); + if ((host_index < 0) || (host_index >= arg.job_nhosts)) { error("job cr credential invalid host_index %d for " "job %u", host_index, arg.jobid); @@ -2208,6 +2209,7 @@ _rpc_daemon_status(slurm_msg_t *msg) resp = xmalloc(sizeof(slurmd_status_t)); resp->actual_cpus = conf->actual_cpus; + resp->actual_boards = conf->actual_boards; resp->actual_sockets = conf->actual_sockets; resp->actual_cores = conf->actual_cores; resp->actual_threads = conf->actual_threads; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 669907a6ae..64e4028b97 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -579,6 +579,7 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) msg->node_name = xstrdup (conf->node_name); msg->cpus = conf->cpus; + msg->boards = conf->boards; msg->sockets = conf->sockets; msg->cores = conf->cores; msg->threads = conf->threads; @@ -600,15 +601,17 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) if (first_msg) { first_msg = false; - info("CPUs=%u Sockets=%u Cores=%u Threads=%u " + info("Procs=%u Boards=%u Sockets=%u Cores=%u Threads=%u " "Memory=%u TmpDisk=%u Uptime=%u", - msg->cpus, msg->sockets, msg->cores, msg->threads, - msg->real_memory, msg->tmp_disk, msg->up_time); + msg->cpus, msg->boards, msg->sockets, msg->cores, + msg->threads, msg->real_memory, msg->tmp_disk, + msg->up_time); } else { - debug3("CPUs=%u Sockets=%u Cores=%u Threads=%u " + debug3("Procs=%u Boards=%u Sockets=%u Cores=%u Threads=%u " "Memory=%u TmpDisk=%u Uptime=%u", - msg->cpus, msg->sockets, msg->cores, msg->threads, - msg->real_memory, msg->tmp_disk, msg->up_time); + msg->cpus, msg->boards, msg->sockets, msg->cores, + msg->threads, msg->real_memory, msg->tmp_disk, + msg->up_time); } uname(&buf); if ((arch = getenv("SLURM_ARCH"))) @@ -662,7 +665,6 @@ _fill_registration_msg(slurm_node_registration_status_msg_t *msg) } list_iterator_destroy(i); list_destroy(steps); - msg->timestamp = time(NULL); return; @@ -881,9 +883,10 @@ _read_config(void) } conf->port = slurm_conf_get_port(conf->node_name); - slurm_conf_get_cpus_sct(conf->node_name, - &conf->conf_cpus, &conf->conf_sockets, - &conf->conf_cores, &conf->conf_threads); + slurm_conf_get_cpus_bsct(conf->node_name, + &conf->conf_cpus, &conf->conf_boards, + &conf->conf_sockets, &conf->conf_cores, + &conf->conf_threads); /* store hardware properties in slurmd_config */ xfree(conf->block_map); @@ -904,6 +907,7 @@ _read_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, @@ -918,6 +922,7 @@ _read_config(void) * Report actual hardware configuration, irrespective of FastSchedule. */ conf->cpus = conf->actual_cpus; + conf->boards = conf->actual_boards; conf->sockets = conf->actual_sockets; conf->cores = conf->actual_cores; conf->threads = conf->actual_threads; @@ -932,11 +937,13 @@ _read_config(void) ((cf->fast_schedule == 1) && (conf->actual_cpus < conf->conf_cpus))) { conf->cpus = conf->actual_cpus; + conf->boards = conf->actual_boards; conf->sockets = conf->actual_sockets; conf->cores = conf->actual_cores; conf->threads = conf->actual_threads; } else { conf->cpus = conf->conf_cpus; + conf->boards = conf->conf_boards; conf->sockets = conf->conf_sockets; conf->cores = conf->conf_cores; conf->threads = conf->conf_threads; @@ -1109,6 +1116,10 @@ _print_conf(void) conf->cpus, conf->conf_cpus, conf->actual_cpus); + debug3("Boards = %-2u (CF: %2u, HW: %2u)", + conf->boards, + conf->conf_boards, + conf->actual_boards); debug3("Sockets = %-2u (CF: %2u, HW: %2u)", conf->sockets, conf->conf_sockets, @@ -1251,6 +1262,7 @@ _print_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, diff --git a/src/slurmd/slurmd/slurmd.h b/src/slurmd/slurmd/slurmd.h index b255430060..124f97bf4f 100644 --- a/src/slurmd/slurmd/slurmd.h +++ b/src/slurmd/slurmd/slurmd.h @@ -77,14 +77,17 @@ typedef struct slurmd_config { int *argc; /* pointer to argument count */ char *hostname; /* local hostname */ uint16_t cpus; /* lowest-level logical processors */ - uint16_t sockets; /* sockets count */ - uint16_t cores; /* core count */ + uint16_t boards; /* total boards count */ + uint16_t sockets; /* total sockets count */ + uint16_t cores; /* core per socket count */ uint16_t threads; /* thread per core count */ uint16_t conf_cpus; /* conf file logical processors */ + uint16_t conf_boards; /* conf file boards count */ uint16_t conf_sockets; /* conf file sockets count */ uint16_t conf_cores; /* conf file core count */ uint16_t conf_threads; /* conf file thread per core count */ uint16_t actual_cpus; /* actual logical processors */ + uint16_t actual_boards; /* actual boards count */ uint16_t actual_sockets; /* actual sockets count */ uint16_t actual_cores; /* actual core count */ uint16_t actual_threads; /* actual thread per core count */ @@ -120,7 +123,7 @@ typedef struct slurmd_config { pid_t pid; /* server pid */ log_options_t log_opts; /* current logging options */ int debug_level; /* logging detail level */ - uint32_t debug_flags; /* DebugFlags configured */ + uint32_t debug_flags; /* DebugFlags configured */ int daemonize:1; /* daemonize flag */ int cleanstart:1; /* clean start requested (-c) */ int mlock_pages:1; /* mlock() slurmd */ @@ -131,6 +134,7 @@ typedef struct slurmd_config { uid_t slurm_user_id; /* UID that slurmctld runs as */ pthread_mutex_t config_mutex; /* lock for slurmd_config access */ uint16_t job_acct_gather_freq; + char *job_acct_gather_type; /* job accounting gather type */ uint16_t use_pam; uint16_t task_plugin_param; /* TaskPluginParams, expressed * using cpu_bind_type_t flags */ diff --git a/src/slurmd/slurmstepd/Makefile.am b/src/slurmd/slurmstepd/Makefile.am index 31d7b1ae53..38794ef49c 100644 --- a/src/slurmd/slurmstepd/Makefile.am +++ b/src/slurmd/slurmstepd/Makefile.am @@ -30,9 +30,11 @@ slurmstepd_SOURCES = \ if HAVE_AIX # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 else -slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) endif force: diff --git a/src/slurmd/slurmstepd/Makefile.in b/src/slurmd/slurmstepd/Makefile.in index 2bed7c4ab0..9126d0a77d 100644 --- a/src/slurmd/slurmstepd/Makefile.in +++ b/src/slurmd/slurmstepd/Makefile.in @@ -342,11 +342,15 @@ slurmstepd_SOURCES = \ multi_prog.c multi_prog.h \ step_terminate_monitor.c step_terminate_monitor.h -@HAVE_AIX_FALSE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@HAVE_AIX_FALSE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_FALSE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + # We need to set maxdata back to 0 because this effects the "max memory size" # ulimit, and the ulimit is inherited by child processes. -@HAVE_AIX_TRUE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) -Wl,-bmaxdata:0x0 +@HAVE_AIX_TRUE@slurmstepd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@HAVE_AIX_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) -Wl,-bmaxdata:0x0 + all: all-am .SUFFIXES: diff --git a/src/slurmdbd/Makefile.am b/src/slurmdbd/Makefile.am index 15a91a5727..caac3a1e10 100644 --- a/src/slurmdbd/Makefile.am +++ b/src/slurmdbd/Makefile.am @@ -27,7 +27,8 @@ slurmdbd_SOURCES = \ slurmdbd.c \ slurmdbd.h -slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(slurmdbd_LDADD) : force diff --git a/src/slurmdbd/Makefile.in b/src/slurmdbd/Makefile.in index 2824dee0a9..2c090e71ed 100644 --- a/src/slurmdbd/Makefile.in +++ b/src/slurmdbd/Makefile.in @@ -337,7 +337,9 @@ slurmdbd_SOURCES = \ slurmdbd.c \ slurmdbd.h -slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +slurmdbd_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/smap/Makefile.am b/src/smap/Makefile.am index 67438cfbc9..4b8ff3c653 100644 --- a/src/smap/Makefile.am +++ b/src/smap/Makefile.am @@ -33,7 +33,8 @@ force: $(smap_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) else diff --git a/src/smap/Makefile.in b/src/smap/Makefile.in index bf332c58e4..3c836f7f7f 100644 --- a/src/smap/Makefile.in +++ b/src/smap/Makefile.in @@ -346,7 +346,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) @BUILD_SMAP_TRUE@smap_LDADD = $(top_builddir)/src/api/libslurm.o \ @BUILD_SMAP_TRUE@ $(DL_LIBS) $(am__append_1) @BLUEGENE_LOADED_TRUE@@BUILD_SMAP_TRUE@bg_dir = $(top_builddir)/src/plugins/select/bluegene -@BUILD_SMAP_TRUE@smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +@BUILD_SMAP_TRUE@smap_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ +@BUILD_SMAP_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + @BUILD_SMAP_FALSE@EXTRA_smap_SOURCES = smap.h smap.c \ @BUILD_SMAP_FALSE@ job_functions.c partition_functions.c \ @BUILD_SMAP_FALSE@ configure_functions.c grid_functions.c \ diff --git a/src/sprio/Makefile.am b/src/sprio/Makefile.am index a2d2abe194..c7d76bd214 100644 --- a/src/sprio/Makefile.am +++ b/src/sprio/Makefile.am @@ -16,5 +16,6 @@ force: $(sprio_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sprio/Makefile.in b/src/sprio/Makefile.in index dd51693a8e..1da78935b4 100644 --- a/src/sprio/Makefile.in +++ b/src/sprio/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) sprio_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = sprio.h print.h sprio_SOURCES = sprio.c print.c opts.c -sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sprio_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/squeue/Makefile.am b/src/squeue/Makefile.am index ee56435c11..9ce4fbcf6d 100644 --- a/src/squeue/Makefile.am +++ b/src/squeue/Makefile.am @@ -16,5 +16,6 @@ force: $(squeue_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/squeue/Makefile.in b/src/squeue/Makefile.in index c52b9254bc..6bbbccc521 100644 --- a/src/squeue/Makefile.in +++ b/src/squeue/Makefile.in @@ -323,7 +323,9 @@ INCLUDES = -I$(top_srcdir) squeue_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = squeue.h print.h squeue_SOURCES = squeue.c print.c opts.c sort.c -squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +squeue_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sreport/Makefile.am b/src/sreport/Makefile.am index cfec9b4cae..d648f745e9 100644 --- a/src/sreport/Makefile.am +++ b/src/sreport/Makefile.am @@ -20,7 +20,8 @@ sreport_LDADD = \ $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) \ $(READLINE_LIBS) -sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sreport_LDADD) : force diff --git a/src/sreport/Makefile.in b/src/sreport/Makefile.in index 7e05ef0171..46de7be61d 100644 --- a/src/sreport/Makefile.in +++ b/src/sreport/Makefile.in @@ -331,7 +331,9 @@ sreport_LDADD = \ $(top_builddir)/src/db_api/libslurmdb.o $(DL_LIBS) \ $(READLINE_LIBS) -sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sreport_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/srun/Makefile.am b/src/srun/Makefile.am index 2098245a26..6cf3e306f7 100644 --- a/src/srun/Makefile.am +++ b/src/srun/Makefile.am @@ -18,7 +18,8 @@ srun_SOURCES = \ srun.wrapper.c srun_LDADD = $(convenience_libs) $(DL_LIBS) -srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) if BGQ_LOADED # because totalview needs the libraries on load we link in srun diff --git a/src/srun/Makefile.in b/src/srun/Makefile.in index 65f0fd6cc1..53c17081c1 100644 --- a/src/srun/Makefile.in +++ b/src/srun/Makefile.in @@ -368,7 +368,8 @@ srun_SOURCES = \ srun.wrapper.c srun_LDADD = $(convenience_libs) $(DL_LIBS) -srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(am__append_1) +srun_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(HWLOC_LDFLAGS) \ + $(HWLOC_LIBS) $(am__append_1) all: all-recursive .SUFFIXES: diff --git a/src/srun_cr/Makefile.am b/src/srun_cr/Makefile.am index f4f3ec9038..baffd46287 100644 --- a/src/srun_cr/Makefile.am +++ b/src/srun_cr/Makefile.am @@ -13,7 +13,8 @@ convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) srun_cr_LDADD = $(convenience_libs) $(BLCR_LIBS) -srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) +srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(convenience_libs) : force diff --git a/src/srun_cr/Makefile.in b/src/srun_cr/Makefile.in index b49e9095d3..c4305d467b 100644 --- a/src/srun_cr/Makefile.in +++ b/src/srun_cr/Makefile.in @@ -320,7 +320,9 @@ INCLUDES = -I$(top_srcdir) $(BLCR_CPPFLAGS) srun_cr_SOURCES = srun_cr.c convenience_libs = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) srun_cr_LDADD = $(convenience_libs) $(BLCR_LIBS) -srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) +srun_cr_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BLCR_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sshare/Makefile.am b/src/sshare/Makefile.am index 805f758484..59c3d566e7 100644 --- a/src/sshare/Makefile.am +++ b/src/sshare/Makefile.am @@ -15,7 +15,8 @@ sshare_SOURCES = \ process.c \ sshare.c sshare.h -sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) force: $(sshare_LDADD) : force diff --git a/src/sshare/Makefile.in b/src/sshare/Makefile.in index 2e7b0b7b8d..f825a82588 100644 --- a/src/sshare/Makefile.in +++ b/src/sshare/Makefile.in @@ -324,7 +324,9 @@ sshare_SOURCES = \ process.c \ sshare.c sshare.h -sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sshare_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sstat/Makefile.am b/src/sstat/Makefile.am index b01ba0b0b7..e84a6aeaef 100644 --- a/src/sstat/Makefile.am +++ b/src/sstat/Makefile.am @@ -19,5 +19,6 @@ force: $(sstat_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/sstat/Makefile.in b/src/sstat/Makefile.in index 5c6c2908af..fcdd90b2ab 100644 --- a/src/sstat/Makefile.in +++ b/src/sstat/Makefile.in @@ -324,7 +324,9 @@ sstat_SOURCES = \ sstat.c \ sstat.h -sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +sstat_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/strigger/Makefile.am b/src/strigger/Makefile.am index 90ddadcddb..d8816ac5fc 100644 --- a/src/strigger/Makefile.am +++ b/src/strigger/Makefile.am @@ -15,5 +15,6 @@ force: $(strigger_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) diff --git a/src/strigger/Makefile.in b/src/strigger/Makefile.in index 8e20bba94e..4346da8df8 100644 --- a/src/strigger/Makefile.in +++ b/src/strigger/Makefile.in @@ -322,7 +322,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) strigger_LDADD = $(top_builddir)/src/api/libslurm.o $(DL_LIBS) noinst_HEADERS = strigger.h strigger_SOURCES = strigger.c opts.c -strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) +strigger_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + all: all-am .SUFFIXES: diff --git a/src/sview/Makefile.am b/src/sview/Makefile.am index 2896382706..3e767db2b2 100644 --- a/src/sview/Makefile.am +++ b/src/sview/Makefile.am @@ -21,7 +21,8 @@ force: $(sview_LDADD) : force @cd `dirname $@` && $(MAKE) `basename $@` -sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) +sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) \ + $(HWLOC_LDFLAGS) $(HWLOC_LIBS) sview_CFLAGS = $(GTK_CFLAGS) else diff --git a/src/sview/Makefile.in b/src/sview/Makefile.in index e76217f209..3651b257ff 100644 --- a/src/sview/Makefile.in +++ b/src/sview/Makefile.in @@ -350,7 +350,9 @@ INCLUDES = -I$(top_srcdir) $(BG_INCLUDES) @BUILD_SVIEW_TRUE@ submit_info.c admin_info.c common.c \ @BUILD_SVIEW_TRUE@ config_info.c defaults.c -@BUILD_SVIEW_TRUE@sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) +@BUILD_SVIEW_TRUE@sview_LDFLAGS = -export-dynamic $(CMD_LDFLAGS) $(BG_LDFLAGS) $(GTK_LIBS) \ +@BUILD_SVIEW_TRUE@ $(HWLOC_LDFLAGS) $(HWLOC_LIBS) + @BUILD_SVIEW_TRUE@sview_CFLAGS = $(GTK_CFLAGS) @BUILD_SVIEW_FALSE@EXTRA_sview_SOURCES = sview.h sview.c popups.c grid.c part_info.c job_info.c \ @BUILD_SVIEW_FALSE@ block_info.c front_end_info.c node_info.c resv_info.c \ diff --git a/src/sview/node_info.c b/src/sview/node_info.c index cbaa3347bc..b5ed2d7728 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -42,6 +42,7 @@ int g_node_scaling = 1; enum { SORTID_POS = POS_LOC, SORTID_ARCH, + SORTID_BOARDS, SORTID_BOOT_TIME, SORTID_COLOR, SORTID_CPUS, @@ -108,10 +109,12 @@ static display_data_t display_data_node[] = { EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_STRING, SORTID_ERR_CPUS, "Error CPU Count", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, - {G_TYPE_INT, SORTID_CORES, "CoresPerSocket", FALSE, + {G_TYPE_INT, SORTID_BOARDS, "Boards", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_INT, SORTID_SOCKETS, "Sockets", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, + {G_TYPE_INT, SORTID_CORES, "CoresPerSocket", FALSE, + EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_INT, SORTID_THREADS, "ThreadsPerCore", FALSE, EDIT_NONE, refresh_node, create_model_node, admin_edit_node}, {G_TYPE_STRING, SORTID_MEMORY, "Real Memory", FALSE, @@ -256,12 +259,11 @@ static void _layout_node_record(GtkTreeView *treeview, lower); xfree(lower); - - convert_num_unit((float)node_ptr->cores, tmp_cnt, sizeof(tmp_cnt), + convert_num_unit((float)node_ptr->boards, tmp_cnt, sizeof(tmp_cnt), UNIT_NONE); add_display_treestore_line(update, treestore, &iter, find_col_name(display_data_node, - SORTID_CORES), + SORTID_BOARDS), tmp_cnt); convert_num_unit((float)node_ptr->sockets, tmp_cnt, sizeof(tmp_cnt), @@ -271,6 +273,13 @@ static void _layout_node_record(GtkTreeView *treeview, SORTID_SOCKETS), tmp_cnt); + convert_num_unit((float)node_ptr->cores, tmp_cnt, sizeof(tmp_cnt), + UNIT_NONE); + add_display_treestore_line(update, treestore, &iter, + find_col_name(display_data_node, + SORTID_CORES), + tmp_cnt); + convert_num_unit((float)node_ptr->threads, tmp_cnt, sizeof(tmp_cnt), UNIT_NONE); add_display_treestore_line(update, treestore, &iter, @@ -382,6 +391,7 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr, /* Combining these records provides a slight performance improvement */ gtk_tree_store_set(treestore, &sview_node_info_ptr->iter_ptr, SORTID_ARCH, node_ptr->arch, + SORTID_BOARDS, node_ptr->boards, SORTID_BOOT_TIME, sview_node_info_ptr->boot_time, SORTID_COLOR, sview_colors[sview_node_info_ptr->pos -- GitLab From 1d90c8c5e834c274925408b034f7e5574deecc43 Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Mon, 16 Jul 2012 16:58:36 -0700 Subject: [PATCH 611/614] Fix various compiler warnings and formatting issues in the boards code --- doc/man/man5/slurm.conf.5 | 2 +- src/api/node_info.c | 2 +- src/common/read_config.c | 61 +++++++++---------- src/common/slurm_protocol_pack.c | 4 +- src/common/xcpuinfo.c | 18 +++--- src/plugins/select/cons_res/select_cons_res.c | 4 +- src/plugins/select/linear/select_linear.c | 4 +- src/slurmctld/node_mgr.c | 3 - src/slurmd/common/slurmstepd_init.c | 6 +- 9 files changed, 51 insertions(+), 53 deletions(-) diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index a14829e4e4..76d755ea8d 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -1625,7 +1625,7 @@ thread on nodes with more than one \fBThreadsPerCore\fR configured. .TP \fBCR_CORE_DEFAULT_DIST_BLOCK\fR Allocate cores within a node using block distribution by default. -This is a pseudo-best-fit algorithm that minimizes the number of +This is a pseudo\-best\-fit algorithm that minimizes the number of boards and minimizes the number of sockets (within minimum boards) used for the allocation. This default behavior can be overridden specifying a particular diff --git a/src/api/node_info.c b/src/api/node_info.c index d044820386..185cebf1c2 100644 --- a/src/api/node_info.c +++ b/src/api/node_info.c @@ -241,7 +241,7 @@ slurm_sprint_node_table (node_info_t * node_ptr, } snprintf(tmp_line, sizeof(tmp_line), "RealMemory=%u Sockets=%u Boards=%u", - node_ptr->real_memory, node_ptr->sockets,node_ptr->boards); + node_ptr->real_memory, node_ptr->sockets, node_ptr->boards); xstrcat(out, tmp_line); if (one_liner) xstrcat(out, " "); diff --git a/src/common/read_config.c b/src/common/read_config.c index 204d89274a..5dfe5202d0 100644 --- a/src/common/read_config.c +++ b/src/common/read_config.c @@ -678,43 +678,38 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, if (!no_sockets_per_board) { n->sockets = sockets_per_board; } - if (!no_cpus && /* infer missing Sockets= */ - no_sockets) { - n->sockets = n->cpus / (n->cores * n->threads); - } - if (n->sockets == 0) { - /* make sure sockets is non-zero */ - error("NodeNames=%s Sockets=0 is invalid, " - "reset to 1", n->nodenames); - n->sockets = 1; - } - if (no_cpus) { /* infer missing CPUs= */ - n->cpus = n->sockets * n->cores * n->threads; - } + if (!no_cpus && /* infer missing Sockets= */ + no_sockets) { + n->sockets = n->cpus / (n->cores * n->threads); + } + if (n->sockets == 0) { /* make sure sockets != 0 */ + error("NodeNames=%s Sockets=0 is invalid, " + "reset to 1", n->nodenames); + n->sockets = 1; + } + if (no_cpus) { /* infer missing CPUs= */ + n->cpus = n->sockets * n->cores * n->threads; + } /* if only CPUs= and Sockets= * specified check for match */ - if (!no_cpus && - !no_sockets && - no_cores && - no_threads) { - if (n->cpus != n->sockets) { + if (!no_cpus && !no_sockets && + no_cores && no_threads && + (n->cpus != n->sockets)) { n->sockets = n->cpus; - error("NodeNames=%s CPUs " - "doesn't match Sockets, " - "setting Sockets to %d", + error("NodeNames=%s CPUs doesn't match " + "Sockets, setting Sockets to %d", n->nodenames, n->sockets); } - } - computed_procs = n->sockets * n->cores * n->threads; - if ((n->cpus != n->sockets) && - (n->cpus != n->sockets * n->cores) && - (n->cpus != computed_procs)) { - error("NodeNames=%s CPUs=%d doesn't match " + computed_procs = n->sockets * n->cores * n->threads; + if ((n->cpus != n->sockets) && + (n->cpus != n->sockets * n->cores) && + (n->cpus != computed_procs)) { + error("NodeNames=%s CPUs=%d doesn't match " "Sockets*CoresPerSocket*ThreadsPerCore " "(%d), resetting CPUs", - n->nodenames, n->cpus, computed_procs); - n->cpus = computed_procs; - } + n->nodenames, n->cpus, computed_procs); + n->cpus = computed_procs; + } } else { /* In this case Boards=# is used. * CPUs=# or Procs=# are ignored. @@ -754,7 +749,7 @@ static int _parse_nodename(void **dest, slurm_parser_enum_t type, } else { n->sockets = n->boards; } - // Node boards factored into sockets + /* Node boards factored into sockets */ n->cpus = n->sockets * n->cores * n->threads; } @@ -2296,7 +2291,7 @@ static void _init_slurm_conf(const char *file_name) if (name == NULL) name = default_slurm_config_file; } - if(conf_initialized) { + if (conf_initialized) { error("the conf_hashtbl is already inited"); } conf_hashtbl = s_p_hashtbl_create(slurm_conf_options); @@ -2521,7 +2516,7 @@ _validate_and_set_defaults(slurm_ctl_conf_t *conf, s_p_hashtbl_t *hashtbl) * the cluster name is lower case since sacctmgr makes sure * this is the case as well. */ - if(conf->cluster_name) { + if (conf->cluster_name) { int i; for (i = 0; conf->cluster_name[i] != '\0'; i++) conf->cluster_name[i] = diff --git a/src/common/slurm_protocol_pack.c b/src/common/slurm_protocol_pack.c index c37401f715..0d932f4998 100644 --- a/src/common/slurm_protocol_pack.c +++ b/src/common/slurm_protocol_pack.c @@ -2394,7 +2394,7 @@ _pack_node_registration_status_msg(slurm_node_registration_status_msg_t * uint32_t gres_info_size = 0; xassert(msg != NULL); - if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { pack_time(msg->timestamp, buffer); pack_time(msg->slurmd_start_time, buffer); pack32(msg->status, buffer); @@ -2503,7 +2503,7 @@ _unpack_node_registration_status_msg(slurm_node_registration_status_msg_t node_reg_ptr = xmalloc(sizeof(slurm_node_registration_status_msg_t)); *msg = node_reg_ptr; - if(protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { + if (protocol_version >= SLURM_2_5_PROTOCOL_VERSION) { /* unpack timestamp of snapshot */ safe_unpack_time(&node_reg_ptr->timestamp, buffer); safe_unpack_time(&node_reg_ptr->slurmd_start_time, buffer); diff --git a/src/common/xcpuinfo.c b/src/common/xcpuinfo.c index c1fe1ccb80..ff42289e4d 100644 --- a/src/common/xcpuinfo.c +++ b/src/common/xcpuinfo.c @@ -67,12 +67,14 @@ #include "xcpuinfo.h" +#if !defined(HAVE_HWLOC) static char* _cpuinfo_path = "/proc/cpuinfo"; static int _compute_block_map(uint16_t numproc, uint16_t **block_map, uint16_t **block_map_inv); static int _chk_cpuinfo_str(char *buffer, char *keyword, char **valptr); static int _chk_cpuinfo_uint32(char *buffer, char *keyword, uint32_t *val); +#endif static int _ranges_conv(char* lrange, char** prange, int mode); static int _range_to_map(char* range, uint16_t *map, uint16_t map_size, @@ -173,27 +175,29 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, { hwloc_topology_t topology; hwloc_obj_t obj; - int depth; + int depth, i; + int boards, ncores, npu, nsockets; + /* Allocate and initialize topology object. */ hwloc_topology_init(&topology); /* Perform the topology detection. */ hwloc_topology_load(topology); - int boards = 1; + boards = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_GROUP); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { boards = hwloc_get_nbobjs_by_depth(topology, depth); } *p_boards = boards; - int nsockets = 1; + nsockets = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_SOCKET); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { nsockets = hwloc_get_nbobjs_by_depth(topology, depth); } *p_sockets = nsockets; - int ncores = 1; + ncores = 1; *p_cores = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_CORE); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { @@ -201,7 +205,7 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, } *p_cores = ncores / nsockets; - int npu = 1; + npu = 1; depth = hwloc_get_type_depth(topology, HWLOC_OBJ_PU); if (depth != HWLOC_TYPE_DEPTH_UNKNOWN) { npu = hwloc_get_nbobjs_by_depth(topology, depth); @@ -213,12 +217,10 @@ get_cpuinfo(uint16_t numproc, uint16_t *p_boards, * retval = _compute_block_map(*block_map_size, * block_map, block_map_inv); */ - uint16_t i; /* Compute abstract->machine block mapping (and inverse) */ if (block_map) { *block_map = xmalloc(npu * sizeof(uint16_t)); - for (i=0; ios_index; } diff --git a/src/plugins/select/cons_res/select_cons_res.c b/src/plugins/select/cons_res/select_cons_res.c index e9cffa42f2..5d05269575 100644 --- a/src/plugins/select/cons_res/select_cons_res.c +++ b/src/plugins/select/cons_res/select_cons_res.c @@ -1933,7 +1933,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) struct config_record *config_ptr; config_ptr = node_ptr[i].config_ptr; select_node_record[i].cpus = config_ptr->cpus; - select_node_record[i].boards = config_ptr->boards; + select_node_record[i].boards = config_ptr->boards; select_node_record[i].sockets = config_ptr->sockets; select_node_record[i].cores = config_ptr->cores; select_node_record[i].vpus = config_ptr->threads; @@ -1941,7 +1941,7 @@ extern int select_p_node_init(struct node_record *node_ptr, int node_cnt) real_memory; } else { select_node_record[i].cpus = node_ptr[i].cpus; - select_node_record[i].boards = node_ptr[i].boards; + select_node_record[i].boards = node_ptr[i].boards; select_node_record[i].sockets = node_ptr[i].sockets; select_node_record[i].cores = node_ptr[i].cores; select_node_record[i].vpus = node_ptr[i].threads; diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 7bc1922b05..622e8da60c 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -488,7 +488,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) threads = node_ptr->config_ptr->threads; } else { cpus = node_ptr->cpus; - boards = node_ptr->boards; + boards = node_ptr->boards; sockets = node_ptr->sockets; cores = node_ptr->cores; threads = node_ptr->threads; @@ -496,7 +496,7 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) #if SELECT_DEBUG info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", - node_ptr->name, cpus, boards, sockets, cores, threads); + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/slurmctld/node_mgr.c b/src/slurmctld/node_mgr.c index 2595de55a3..f1f4b7928d 100644 --- a/src/slurmctld/node_mgr.c +++ b/src/slurmctld/node_mgr.c @@ -1796,16 +1796,13 @@ extern int validate_node_specs(slurm_node_registration_status_msg_t *reg_msg) gres_plugin_node_state_log(node_ptr->gres_list, node_ptr->name); if (slurmctld_conf.fast_schedule != 2) { - int boards1, boards2; /* total boards on node */ int sockets1, sockets2; /* total sockets on node */ int cores1, cores2; /* total cores on node */ int threads1, threads2; /* total threads on node */ - boards1 = reg_msg->boards; sockets1 = reg_msg->sockets; cores1 = sockets1 * reg_msg->cores; threads1 = cores1 * reg_msg->threads; - boards2 = config_ptr->boards; sockets2 = config_ptr->sockets; cores2 = sockets2 * config_ptr->cores; threads2 = cores2 * config_ptr->threads; diff --git a/src/slurmd/common/slurmstepd_init.c b/src/slurmd/common/slurmstepd_init.c index 3264db053c..708e3c6d80 100644 --- a/src/slurmd/common/slurmstepd_init.c +++ b/src/slurmd/common/slurmstepd_init.c @@ -38,6 +38,9 @@ #include "src/slurmd/common/slurmstepd_init.h" +/* Assume that the slurmd and slurmstepd are the same version level when slurmd + * starts slurmstepd, so we do not need to support different protocol versions + * for the different message formats. */ extern void pack_slurmd_conf_lite(slurmd_conf_t *conf, Buf buffer) { xassert(conf != NULL); @@ -88,7 +91,8 @@ extern int unpack_slurmd_conf_lite_no_alloc(slurmd_conf_t *conf, Buf buffer) safe_unpackstr_xmalloc(&conf->task_prolog, &uint32_tmp, buffer); safe_unpackstr_xmalloc(&conf->task_epilog, &uint32_tmp, buffer); safe_unpack16(&conf->job_acct_gather_freq, buffer); - safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, buffer); + safe_unpackstr_xmalloc(&conf->job_acct_gather_type, &uint32_tmp, + buffer); safe_unpack16(&conf->propagate_prio, buffer); safe_unpack32(&conf->debug_flags, buffer); safe_unpack32(&uint32_tmp, buffer); -- GitLab From c1321b8f51752a33b12aa45567c82913b828bced Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 09:41:01 -0700 Subject: [PATCH 612/614] Boards logic, mostly cosmetic mods --- src/plugins/select/cons_res/dist_tasks.c | 4 ++-- src/plugins/select/linear/select_linear.c | 3 +++ src/slurmctld/read_config.c | 2 +- src/slurmd/slurmd/slurmd.c | 2 +- src/sview/node_info.c | 2 +- testsuite/expect/test4.12 | 4 ++-- 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/plugins/select/cons_res/dist_tasks.c b/src/plugins/select/cons_res/dist_tasks.c index 730bc6fe87..3ae3af650d 100644 --- a/src/plugins/select/cons_res/dist_tasks.c +++ b/src/plugins/select/cons_res/dist_tasks.c @@ -57,7 +57,7 @@ /* Combination counts * comb_counts[n-1][k-1] = number of combinations of - * k items from a set of n items + * k items from a set of n items * * Formula is n!/k!(n-k)! */ @@ -87,7 +87,7 @@ void _gen_combs(int *comb_list, int n, int k) /* Setup comb for the initial combination */ int i, b; for (i = 0; i < k; ++i) - comb[i] = i; + comb[i] = i; b = 0; /* Generate all the other combinations */ diff --git a/src/plugins/select/linear/select_linear.c b/src/plugins/select/linear/select_linear.c index 622e8da60c..e2304d0986 100644 --- a/src/plugins/select/linear/select_linear.c +++ b/src/plugins/select/linear/select_linear.c @@ -497,6 +497,9 @@ static uint16_t _get_avail_cpus(struct job_record *job_ptr, int index) #if SELECT_DEBUG info("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", node_ptr->name, cpus, boards, sockets, cores, threads); +#else + debug("host %s HW_ cpus %u boards %u sockets %u cores %u threads %u ", + node_ptr->name, cpus, boards, sockets, cores, threads); #endif avail_cpus = slurm_get_avail_procs( diff --git a/src/slurmctld/read_config.c b/src/slurmctld/read_config.c index 3cd547ac07..563e2e47ec 100644 --- a/src/slurmctld/read_config.c +++ b/src/slurmctld/read_config.c @@ -1053,7 +1053,7 @@ static int _restore_node_state(int recover, node_ptr->cpus = old_node_ptr->cpus; node_ptr->cores = old_node_ptr->cores; node_ptr->last_idle = old_node_ptr->last_idle; - node_ptr->boards = old_node_ptr->boards; + node_ptr->boards = old_node_ptr->boards; node_ptr->sockets = old_node_ptr->sockets; node_ptr->threads = old_node_ptr->threads; node_ptr->real_memory = old_node_ptr->real_memory; diff --git a/src/slurmd/slurmd/slurmd.c b/src/slurmd/slurmd/slurmd.c index 64e4028b97..df339cdaab 100644 --- a/src/slurmd/slurmd/slurmd.c +++ b/src/slurmd/slurmd/slurmd.c @@ -907,7 +907,7 @@ _read_config(void) #else get_procs(&conf->actual_cpus); get_cpuinfo(conf->actual_cpus, - &conf->actual_boards, + &conf->actual_boards, &conf->actual_sockets, &conf->actual_cores, &conf->actual_threads, diff --git a/src/sview/node_info.c b/src/sview/node_info.c index b5ed2d7728..c9749f5916 100644 --- a/src/sview/node_info.c +++ b/src/sview/node_info.c @@ -391,7 +391,7 @@ static void _update_node_record(sview_node_info_t *sview_node_info_ptr, /* Combining these records provides a slight performance improvement */ gtk_tree_store_set(treestore, &sview_node_info_ptr->iter_ptr, SORTID_ARCH, node_ptr->arch, - SORTID_BOARDS, node_ptr->boards, + SORTID_BOARDS, node_ptr->boards, SORTID_BOOT_TIME, sview_node_info_ptr->boot_time, SORTID_COLOR, sview_colors[sview_node_info_ptr->pos diff --git a/testsuite/expect/test4.12 b/testsuite/expect/test4.12 index 7832b683c5..e7a4d6a9c0 100755 --- a/testsuite/expect/test4.12 +++ b/testsuite/expect/test4.12 @@ -348,10 +348,10 @@ set inode_threads_per_core 0 set fd [open "|$scontrol --oneliner show node $def_hostlist"] exp_internal 1 while {[gets $fd line] != -1} { - if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+) State=IDLE ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { + if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+).*Boards=(\d+) State=IDLE ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { break } - if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+) State=IDLE.CLOUD ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { + if {[regexp {NodeName=(\w+).*CoresPerSocket=(\d+).*CPUTot=(\d+)(K?).*Sockets=(\d+).*Boards=(\d+) State=IDLE.CLOUD ThreadsPerCore=(\d+)} $line frag inode_name inode_cores_per_socket inode_procs units inode_sockets inode_threads_per_core] == 1} { break } } -- GitLab From 73209980613251af87090751e7e5f5c4aca41c0a Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 13:07:37 -0700 Subject: [PATCH 613/614] Boards logic, minor fixes for test suite and linking with libslurm --- src/common/Makefile.am | 4 ++-- src/common/Makefile.in | 7 ++++--- testsuite/expect/test24.1 | 8 ++++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/common/Makefile.am b/src/common/Makefile.am index 3cdcdd0e0d..6332b39a6d 100644 --- a/src/common/Makefile.am +++ b/src/common/Makefile.am @@ -133,9 +133,9 @@ libspank_la_SOURCES = \ plugstack.c plugstack.h \ optz.c optz.h -libcommon_la_LIBADD = $(DL_LIBS) +libcommon_la_LIBADD = $(DL_LIBS) $(HWLOC_LIBS) -libcommon_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic +libcommon_la_LDFLAGS = $(HWLOC_LDFLAGS) $(LIB_LDFLAGS) -module --export-dynamic # This was made so we could export all symbols from libcommon # on multiple platforms diff --git a/src/common/Makefile.in b/src/common/Makefile.in index 0029c86aa1..0abaf70dd1 100644 --- a/src/common/Makefile.in +++ b/src/common/Makefile.in @@ -96,7 +96,8 @@ CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = -libcommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libcommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__libcommon_la_SOURCES_DIST = xcgroup_read_config.c \ xcgroup_read_config.h xcgroup.c xcgroup.h xcpuinfo.c \ xcpuinfo.h cpu_frequency.c cpu_frequency.h assoc_mgr.c \ @@ -522,8 +523,8 @@ libspank_la_SOURCES = \ plugstack.c plugstack.h \ optz.c optz.h -libcommon_la_LIBADD = $(DL_LIBS) -libcommon_la_LDFLAGS = $(LIB_LDFLAGS) -module --export-dynamic +libcommon_la_LIBADD = $(DL_LIBS) $(HWLOC_LIBS) +libcommon_la_LDFLAGS = $(HWLOC_LDFLAGS) $(LIB_LDFLAGS) -module --export-dynamic # This was made so we could export all symbols from libcommon # on multiple platforms diff --git a/testsuite/expect/test24.1 b/testsuite/expect/test24.1 index f101411a58..f1dcc7bf67 100755 --- a/testsuite/expect/test24.1 +++ b/testsuite/expect/test24.1 @@ -48,11 +48,11 @@ file delete $test_prog send_user "build_dir is $build_dir\n" if {[test_aix]} { - send_user "$bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o\n" - exec $bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-brtl -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o + send_user "$bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-bhwloc -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o\n" + exec $bin_cc ${test_prog}.c -ldl -lm -lntbl -fno-gcse -fno-strict-aliasing -Wl,-brtl -Wl,-bgcbypass:1000 -Wl,-bexpfull -Wl,-bmaxdata:0x70000000 -Wl,-bhwloc -g -lpthreads -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o } else { - send_user "$bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -export-dynamic \n" - exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -export-dynamic + send_user "$bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -lhwloc-export-dynamic \n" + exec $bin_cc ${test_prog}.c -g -pthread -o ${test_prog} -I${build_dir} -I${src_dir} ${build_dir}/src/api/libslurm.o ${build_dir}/src/slurmctld/locks.o ${build_dir}/src/sshare/process.o -ldl -lm -lhwloc -export-dynamic } exec $bin_chmod 700 $test_prog -- GitLab From ab2dea3a7ea0a401ba3e6a272f5c88e4d4c47ead Mon Sep 17 00:00:00 2001 From: Morris Jette Date: Tue, 17 Jul 2012 14:51:37 -0700 Subject: [PATCH 614/614] In sview, only report count of requested nodes if job is pending. This corresponds to commit dd2dce542d6b75930d63839ac15bd92dfaac719b from Mark Grondona's work in squeue, but applied to the sview command. --- src/squeue/print.c | 3 +-- src/sview/job_info.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/squeue/print.c b/src/squeue/print.c index bc4332ae34..ce123d8572 100644 --- a/src/squeue/print.c +++ b/src/squeue/print.c @@ -751,7 +751,6 @@ int _print_job_num_nodes(job_info_t * job, int width, bool right_justify, static int _get_node_cnt(job_info_t * job) { int node_cnt = 0, round; - uint16_t base_job_state = job->job_state & (~JOB_COMPLETING); /* For PENDING jobs, return the maximum of the requested nodelist, * requested maximum number of nodes, or requested CPUs rounded @@ -763,7 +762,7 @@ static int _get_node_cnt(job_info_t * job) * allocated to this job. */ - if (base_job_state == JOB_PENDING) { + if (IS_JOB_PENDING(job)) { node_cnt = _nodes_in_list(job->req_nodes); node_cnt = MAX(node_cnt, job->num_nodes); round = job->num_cpus + params.max_cpus - 1; diff --git a/src/sview/job_info.c b/src/sview/job_info.c index 270eac1016..cd995183d5 100644 --- a/src/sview/job_info.c +++ b/src/sview/job_info.c @@ -1211,7 +1211,17 @@ static int _get_node_cnt(job_info_t * job) { int node_cnt = 0; - if (IS_JOB_PENDING(job) || IS_JOB_COMPLETING(job)) { + /* For PENDING jobs, return the maximum of the requested nodelist, + * requested maximum number of nodes, or requested CPUs rounded + * to nearest node. + * + * For COMPLETING jobs, the job->nodes nodelist has already been + * altered to list only the nodes still in the comp state, and + * thus we count only those nodes toward the total nodes still + * allocated to this job. + */ + + if (IS_JOB_PENDING(job)) { node_cnt = _nodes_in_list(job->req_nodes); node_cnt = MAX(node_cnt, job->num_nodes); } else -- GitLab