diff --git a/NEWS b/NEWS index 34c2eca1872ba68508381a8f8e8aeeea185c1282..85eafec981aee4f685537573fb89a802c76ba0ef 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 1.2.6 +======================== + * Changes in SLURM 1.2.5 ======================== -- Fix nodelist truncation in "scontrol show jobs" output diff --git a/doc/man/man1/sbatch.1 b/doc/man/man1/sbatch.1 index 9888e80478932052a2766886388810d214368c72..d74718aa3501b344edbacfcda80468c9097fe051 100644 --- a/doc/man/man1/sbatch.1 +++ b/doc/man/man1/sbatch.1 @@ -250,6 +250,7 @@ When a job is requeued, the batch script is initiated from its beginning. .TP \fB\-\-ntasks\-per\-node\fR[=]<\fIn\fR> Specify the number of tasks to be launched per node. +Equivalent to \fB\-\-tasks\-per\-node\fR. .TP \fB\-o\fR, \fB\-\-output\fR[=]<\fIfilename pattern\fR> @@ -285,6 +286,11 @@ the 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 represents unlimited time. +.TP +\fB\-\-tasks\-per\-node\fR[=]<\fIn\fR> +Specify the number of tasks to be launched per node. +Equivalent to \fB\-\-ntasks\-per\-node\fR. + .TP \fB\-\-tmp\fR[=]<\fIMB\fR> Specify a minimum amount of temporary disk space. diff --git a/src/sbatch/opt.c b/src/sbatch/opt.c index bcdf0df6e1c116e4be57f1f122516d3876a7fe57..cb8bc2c1126772695790cd517048e0c482aea5b5 100644 --- a/src/sbatch/opt.c +++ b/src/sbatch/opt.c @@ -108,7 +108,7 @@ #define LONG_OPT_MLOADER_IMAGE 0x142 #define LONG_OPT_RAMDISK_IMAGE 0x143 #define LONG_OPT_REBOOT 0x144 -#define LONG_OPT_NTASKSPERNODE 0x145 +#define LONG_OPT_TASKSPERNODE 0x145 /*---- global variables, defined in opt.h ----*/ opt_t opt; @@ -389,7 +389,7 @@ static void _opt_default() opt.cpus_set = false; opt.min_nodes = 1; opt.max_nodes = 0; - opt.ntasks_per_node = -1; + opt.tasks_per_node = -1; opt.nodes_set = false; opt.time_limit = -1; opt.partition = NULL; @@ -632,7 +632,8 @@ static struct option long_options[] = { {"mloader-image", required_argument, 0, LONG_OPT_MLOADER_IMAGE}, {"ramdisk-image", required_argument, 0, LONG_OPT_RAMDISK_IMAGE}, {"reboot", no_argument, 0, LONG_OPT_REBOOT}, - {"ntasks-per-node", required_argument,0,LONG_OPT_NTASKSPERNODE}, + {"tasks-per-node", required_argument,0,LONG_OPT_TASKSPERNODE}, + {"ntasks-per-node", required_argument,0,LONG_OPT_TASKSPERNODE}, {NULL, 0, 0, 0} }; @@ -1168,8 +1169,8 @@ static void _set_options(int argc, char **argv) case LONG_OPT_REBOOT: opt.reboot = true; break; - case LONG_OPT_NTASKSPERNODE: - opt.ntasks_per_node = _get_int(optarg, "ntasks-per-node"); + case LONG_OPT_TASKSPERNODE: + opt.tasks_per_node = _get_int(optarg, "ntasks-per-node"); break; default: fatal("Unrecognized command line parameter %c", @@ -1552,7 +1553,7 @@ static void _opt_list() } info("mail_type : %s", _print_mail_type(opt.mail_type)); info("mail_user : %s", opt.mail_user); - info("ntasks-per-node : %d", opt.ntasks_per_node); + info("tasks-per-node : %d", opt.tasks_per_node); str = print_commandline(); info("remote command : `%s'", str); xfree(str); diff --git a/src/sbatch/opt.h b/src/sbatch/opt.h index 87f45db211269b2a3638e61e3776eae26d63b65a..133c70a6b419aba4af065017430419956ba5fef1 100644 --- a/src/sbatch/opt.h +++ b/src/sbatch/opt.h @@ -90,7 +90,7 @@ typedef struct sbatch_options { int minthreads; /* --minthreads=n */ int realmem; /* --mem=n */ long tmpdisk; /* --tmp=n */ - int ntasks_per_node; /* --ntasks-per-node=n */ + int tasks_per_node; /* --tasks-per-node=n */ char *constraints; /* --constraints=, -C constraint*/ bool contiguous; /* --contiguous */ char *nodelist; /* --nodelist=node1,node2,... */ diff --git a/src/sbatch/sbatch.c b/src/sbatch/sbatch.c index f1ef0b3d81d7a2b0ef66717c066d29435c1b1075..0428a07f219a88aee63d48584c3ae8fa39bd995b 100644 --- a/src/sbatch/sbatch.c +++ b/src/sbatch/sbatch.c @@ -169,8 +169,8 @@ static int fill_job_desc_from_opts(job_desc_msg_t *desc) if (opt.tmpdisk > -1) desc->job_min_tmp_disk = opt.tmpdisk; desc->num_procs = opt.nprocs * opt.cpus_per_task; - if (opt.ntasks_per_node > -1) - desc->ntasks_per_node = opt.ntasks_per_node; + if (opt.tasks_per_node > -1) + desc->ntasks_per_node = opt.tasks_per_node; if (opt.nprocs_set) desc->num_tasks = opt.nprocs; if (opt.cpus_set)