From 0566b9183708f0d7fa7cfc71bace6ccce57c92d0 Mon Sep 17 00:00:00 2001 From: Moe Jette <jette1@llnl.gov> Date: Mon, 8 Aug 2005 15:47:25 +0000 Subject: [PATCH] Added mpi/none plugin and made it the default. --- NEWS | 2 + configure.ac | 1 + doc/html/quickstart_admin.html | 12 ++-- doc/man/man5/slurm.conf.5 | 4 +- etc/slurm.conf.example | 7 ++- src/common/read_config.h | 2 +- src/plugins/mpi/Makefile.am | 2 +- src/plugins/mpi/none/Makefile.am | 17 ++++++ src/plugins/mpi/none/mpi_none.c | 94 ++++++++++++++++++++++++++++++++ 9 files changed, 129 insertions(+), 12 deletions(-) create mode 100644 src/plugins/mpi/none/Makefile.am create mode 100644 src/plugins/mpi/none/mpi_none.c diff --git a/NEWS b/NEWS index 0b5c14e407d..ebe3da2aa62 100644 --- a/NEWS +++ b/NEWS @@ -9,6 +9,8 @@ documents those changes that are of interest to users and admins. -- Added MpiDefault slurm.conf parameter. -- Remove KillTree configuration parameter (replace with "ProctrackType=proctrack/linuxproc") + -- Make default plugin be "none". + -- Added mpi/none plugin and made it the default. * Changes in SLURM 0.5.0 ======================== diff --git a/configure.ac b/configure.ac index cafcebc4aa5..4d3759a4fe2 100644 --- a/configure.ac +++ b/configure.ac @@ -232,6 +232,7 @@ AC_CONFIG_FILES([Makefile src/plugins/mpi/mpichgm/Makefile src/plugins/mpi/mvapich/Makefile src/plugins/mpi/lam/Makefile + src/plugins/mpi/none/Makefile doc/Makefile doc/man/Makefile testsuite/Makefile diff --git a/doc/html/quickstart_admin.html b/doc/html/quickstart_admin.html index b11e5f5558b..bb3c3a85763 100644 --- a/doc/html/quickstart_admin.html +++ b/doc/html/quickstart_admin.html @@ -197,12 +197,13 @@ be synchronized. </p> <h4>MPI support</h4> <p>Quadrics MPI works directly with SLURM on systems having Quadrics -interconnects and is the prefered version of MPI for those systems.</p> +interconnects and is the prefered version of MPI for those systems. +Set the <b>MpiDefault=none</b> configuration parameter in slurm.conf.</p> <p>For <a href="http://www.myricom.com/">Myrinet</a> systems, MPICH-GM -is prefered. In order to use MPICH-GM, set <b>MpichGmDirectSupport=1</b> -and <b>ProctrackType=proctrack/linuxproc</b> configuration parameters in -slurm.conf.</p> +is prefered. In order to use MPICH-GM, set <b>MpichGmDirectSupport=1</b>, +<b>MpiDefault=mpichgm</b>, and <b>ProctrackType=proctrack/linuxproc</b> +configuration parameters in slurm.conf.</p> <p>HP customers would be well served by using <a href="http://www.hp.com/go/mpi">HP-MPI</a>.</p> @@ -213,7 +214,8 @@ slurm.conf.</p> <span class="commandline">srun</span> command. This places all MPI processes in a process-tree under the control of the <b>slurmd</b> daemon. LAM/MPI version 7.1 or higher contains support for -SLURM.</p> +SLURM. +Set the <b>MpiDefault=lam</b> configuration parameters in slurm.conf.</p> <p>Note that the ordering of tasks within an job's allocation matches that of nodes in the slurm.conf configuration file. SLURM presently lacks the ability diff --git a/doc/man/man5/slurm.conf.5 b/doc/man/man5/slurm.conf.5 index 98be6c5cff9..bef4ee1ffa4 100644 --- a/doc/man/man5/slurm.conf.5 +++ b/doc/man/man5/slurm.conf.5 @@ -221,8 +221,8 @@ May not exceed 65534. \fpMpiDefault\fR Identifies the default type of MPI to be used. Srun may override this configuration parameter in any case. -Currently supported versions include: lam (default), -mpich-gm, mvapich, champion, quadrics, and hp-mpi. +Currently supported versions include: lam, mpichgm, mvapich, +and none (default, which works for most other versions of MPI). .TP \fBMpichGmDirectSupport\fR If set to "1", srun handles executable files linked with the MPICH-GM diff --git a/etc/slurm.conf.example b/etc/slurm.conf.example index 3322b7098fe..06599020d2b 100644 --- a/etc/slurm.conf.example +++ b/etc/slurm.conf.example @@ -351,8 +351,9 @@ JobAcctType=jobacct/none # "MpiDefault" : define the default type of MPI to be used. If # srun does not specify another value, slurm will # establish the environment for this mpi to execute. -# Currently supported values are lam (default), -# mpich-gm, mvapich, champion, quadrics, and hp-mpi. +# Currently supported values are lam, mpichgm, mvapich, +# and none (default, which works for most other versions +# of MPI). # # "MpichGmDirectSupport" # : if set to `1', srun handles executable files linked @@ -365,7 +366,7 @@ JobAcctType=jobacct/none # FirstJobid=1000 # default is `1' # ReturnToService=1 # default is `0' # MaxJobCount=10000 # Defaults to 2000 -# MpiDefault # default is "lam" +# MpiDefault # default is "none" # MpichGmDirectSupport=1 # default is `0' diff --git a/src/common/read_config.h b/src/common/read_config.h index 1d73dd04019..0dad118aba1 100644 --- a/src/common/read_config.h +++ b/src/common/read_config.h @@ -47,7 +47,7 @@ #define DEFAULT_MAX_JOB_COUNT 2000 #define DEFAULT_MIN_JOB_AGE 300 #define DEFAULT_MPICH_GM_DIR 0 -#define DEFAULT_MPI_DEFAULT "lam" +#define DEFAULT_MPI_DEFAULT "none" #ifdef HAVE_AIX /* AIX specific default configuration parameters */ # define DEFAULT_CHECKPOINT_TYPE "checkpoint/aix" # define DEFAULT_PROCTRACK_TYPE "proctrack/aix" diff --git a/src/plugins/mpi/Makefile.am b/src/plugins/mpi/Makefile.am index 54833b9ec99..a1de103e4c8 100644 --- a/src/plugins/mpi/Makefile.am +++ b/src/plugins/mpi/Makefile.am @@ -1,4 +1,4 @@ # $Id: Makefile.am,v 1.6 2005/03/08 14:25:17 jking Exp $ # Makefile for mpi plugins -SUBDIRS = mpichgm mvapich lam +SUBDIRS = mpichgm mvapich none lam diff --git a/src/plugins/mpi/none/Makefile.am b/src/plugins/mpi/none/Makefile.am new file mode 100644 index 00000000000..5de265c825d --- /dev/null +++ b/src/plugins/mpi/none/Makefile.am @@ -0,0 +1,17 @@ +# $Id: Makefile.am,v 1.4 2004/07/26 23:43:53 jette Exp $ +# Makefile for mpi/none plugin + +AUTOMAKE_OPTIONS = foreign + +PLUGIN_FLAGS = -module -avoid-version --export-dynamic + +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src/common + +pkglib_LTLIBRARIES = mpi_none.la + +# Null MPI plugin. +mpi_none_la_SOURCES = mpi_none.c +mpi_none_la_LDFLAGS = $(SO_LDFLAGS) $(PLUGIN_FLAGS) +mpi_none_la_LIBADD = \ + $(top_builddir)/src/common/libcommon.la -lpthread \ + $(top_builddir)/src/api/libslurm.la diff --git a/src/plugins/mpi/none/mpi_none.c b/src/plugins/mpi/none/mpi_none.c new file mode 100644 index 00000000000..ef3b3a3f0f2 --- /dev/null +++ b/src/plugins/mpi/none/mpi_none.c @@ -0,0 +1,94 @@ +/*****************************************************************************\ + ** mpi_none.c - Library routines for initiating jobs on without mpi support + ** $Id$ + ***************************************************************************** + * Copyright (C) 2004 The Regents of the University of California. + * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). + * Written by Danny Auble <da@llnl.gov> + * UCRL-CODE-2002-040. + * + * This file is part of SLURM, a resource management program. + * For details, see <http://www.llnl.gov/linux/slurm/>. + * + * 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. +\*****************************************************************************/ + +#if HAVE_CONFIG_H +# include "config.h" +#endif + +#include <fcntl.h> +#include <signal.h> +#include <sys/types.h> + +#include <slurm/slurm_errno.h> + +#include "src/srun/srun_job.h" +#include "src/slurmd/slurmd_job.h" +#include "src/common/env.h" +#include "src/common/slurm_xlator.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 + * + * <application>/<method> + * + * where <application> is a description of the intended application of + * the plugin (e.g., "switch" for SLURM switch) and <method> 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 versions for their plugins as this API matures. + */ +const char plugin_name[] = "mpi none plugin"; +const char plugin_type[] = "mpi/none"; +const uint32_t plugin_version = 100; + +int mpi_p_init(slurmd_job_t *job) +{ + debug("Using mpi/none"); + return 0; +} + +int mpi_p_thr_create(srun_job_t *job) +{ + debug("Using mpi/none"); + return 0; +} + +int mpi_p_single_task() +{ + return false; +} + +int mpi_p_exit() +{ + return 0; +} -- GitLab