Hello world!

 

 

 

 

 

 

Hello world!

I’m 1 of 4

on host1

Hello world!

I’m 3

of 4

on host2

Hello

world!

I’m

0

of

4

on

host1

Hello

world!

I’m

2

of

4

on

host2

8.3.3 Using srun with HP-MPI

The SLURM srun utility (srun command) is used with the mpirun command to launch an MPI job on an HP XC system.

The following is the general format of the mpirun command with srun:

mpirun [mpirun options] -srun[srun options]

This method runs with no restrictions on MPI-2 functionality.

The HP MPI -npoption is not allowed with -srun. The following HP-MPI options are allowed with -srun:

HP-MPI options allowed with -srun:

-help

-version -jv

-i <spec>

-universe_size=# -sp <paths>

-T

-prot -spawn -tv -1sided

-evar[=val]

For additional information about using -srun, refer to Section 6.4 or the srun manpage (man srun).

8.3.3.1 Launching MPI Jobs

This section provides some examples of using -srunwith mpirun to launch an HP-MPI job. These examples assume that a system has the Quadrics Elan4 system interconnect and SLURM is configured to use the ELAN4. These examples also assume that your system is made up of nodes that each contain two CPUs.

For additional information about using the srun command and its options, refer to Section 6.4.

The following command runs a.out with four ranks, one per node, and ranks are cyclically allocated:

$ mpirun -srun-N4 ./a.outhost1 rank1

.

.

.

host4 rank4

8-4Using HP-MPI