Re: [slurm-users] mpi on multiple nodes

2018-03-13 Thread Christopher Samuel

On 14/03/18 06:30, Mahmood Naderan wrote:


I expected to see one compute-0-0.local and one compute-0-1.local
messages. Any idea about that?


You've asked for 2 MPI ranks each using 1 CPU and as you've got 2 cores
on one and 4 cores on the other Slurm can fit both on to one of your
nodes so that's what it's done. This reduces fragmentation of resources
for other jobs that may come later.

If you really want to have a task on each node then you'll need to add:

#SBATCH --ntasks-per-node=1

to your batch file to tell Slurm to only place one task on each node.

Hope that helps!
Chris
--
 Chris Samuel  :  http://www.csamuel.org/  :  Melbourne, VIC



[slurm-users] mpi on multiple nodes

2018-03-13 Thread Mahmood Naderan
Hi,
For a simple mpi hello program, I have written this script in order to
receive one message from each of the compute nodes.

#!/bin/bash
#SBATCH --output=hello.out
#SBATCH --job-name=hello
#SBATCH --ntasks=2
#SBATCH --cpus-per-task=1
mpirun mpihello

The node information show

[mahmood@rocks7 ~]$ rocks report slurmnodes
 Auto Created 
NodeName=compute-0-0 NodeAddr=10.1.1.254 CPUs=2 Weight=20481900
Feature=rack-0,2CPUs
NodeName=compute-0-1 NodeAddr=10.1.1.253 CPUs=4 Weight=20483899
Feature=rack-0,4CPUs


However, the output is

[mahmood@rocks7 ~]$ cat hello.out
Hello world from processor compute-0-0.local, rank 1 out of 2 processors
Hello world from processor compute-0-0.local, rank 0 out of 2 processors



I expected to see one compute-0-0.local and one compute-0-1.local
messages. Any idea about that?

Regards,
Mahmood