Process placement with aprun -- need one process per node

129 views Asked by At

I need to run an MPI code on a Cray system under aprun. For reasons I won't go into, I am being asked to run it such that no node has more than one process. I have been puzzling over the aprun man page and I'm not sure if I've figured this out or not. If I have only two processes, will this command ensure that they run on different nodes? (Let's say there are 32 cores on a node.)

> aprun -n 2 -d 32 --cc depth ./myexec
1

There are 1 answers

0
bob.sacamento On BEST ANSWER

If anyone is interested, my above command line does work. I tested it with the code:

#include <mpi.h>
#include <stdio.h>
 
int main(int argc, char **argv) {
char hname[80];
int length;
 
MPI_Init(&argc, &argv);
 
MPI_Get_processor_name(hname, &length);
printf("Hello world from %s\n", hname);
MPI_Finalize();

}