diff --git a/doc/man/man1/srun.1 b/doc/man/man1/srun.1 index 579dc8f0fe2e180a5451bf93c997f6b7a4a16d6b..8549effb2d34098224cce74f8d73ec9f9622da84 100644 --- a/doc/man/man1/srun.1 +++ b/doc/man/man1/srun.1 @@ -413,7 +413,9 @@ http://www.llnl.gov/linux/slurm/dist_plane.html. The arbitrary method of distribution will allocate processes in\-order as listed in file designated by the environment variable SLURM_HOSTFILE. If this variable is listed it will over ride any other method specified. -If not set the method will default to block. +If not set the method will default to block. Inside the hostfile must +contain at minimum the number of hosts requested. If requesting tasks +(-n) your tasks will be laid out on the nodes in the order of the file. .RE .TP @@ -866,7 +868,9 @@ Request a specific list of hosts. The job will contain \fIat least\fR these hosts. The list may be specified as a comma\-separated list of hosts, a range of hosts (host[1\-5,7,...] for example), or a filename. The host list will be assumed to be a filename if it contains a "/" -character. +character. If you specify a max node count (-N1-2) if there are more +than 2 hosts in the file only the first 2 nodes will be used in the +request list. .TP \fB\-X\fR, \fB\-\-disable\-status\fR @@ -1186,7 +1190,7 @@ Same as \fB\-X, \-\-disable\-status\fR Same as \fB\-m plane\fR .TP \fBSLURM_DISTRIBUTION\fR -Same as \fB\-m, \-\-distribution\fR=(\fIblock|cyclic|hostfile\fR) +Same as \fB\-m, \-\-distribution\fR=(\fIblock|cyclic|arbitrary\fR) .TP \fBSLURM_EPILOG\fR Same as \fB\-\-epilog\fR=\fIexecutable\fR diff --git a/src/srun/opt.c b/src/srun/opt.c index 78e364ee8a3985b39033c9c81d0dbd53479b5fff..1d47bd8081c8a84dc6d8609c4e25b3fcf3fe1317 100644 --- a/src/srun/opt.c +++ b/src/srun/opt.c @@ -2192,14 +2192,15 @@ static bool _opt_verify(void) if(!opt.nodelist) { if((opt.nodelist = xstrdup(getenv("SLURM_HOSTFILE")))) { + opt.distribution = SLURM_DIST_ARBITRARY; if (!_valid_node_list(&opt.nodelist)) { error("Failure getting NodeNames from " "hostfile"); exit(1); - } else + } else { debug("loaded nodes (%s) from hostfile", opt.nodelist); - + } } } else if (!_valid_node_list(&opt.nodelist))