One of my MPI programs keeps crashing and I want to write specific debugging output for each task to a file. The file to which is written is specified via a command line argument. I read in the OpenMPI documentation that there is the possibility of launching several commands via the syntax
mpirun [global options] [local options 1] ./main --file debug.log1 : [local options 2] ./main --file debug.log2 : ...
However I was not able to find which flags are considered global and which ones local. Most important I don't know about the number of processes, i.e. "-np". Should I give it as a global option or a local one.
mpirun --map-by node --bind-to none -np 3 ./main --file debug.log1 : ./main --file debug.log2 : ./main --file debug.log3
or
mpirun --map-by node --bind-to none -np 1 ./main --file debug.log1 : -np 1 ./main --file debug.log2 : -np 1 ./main --file debug.log3
If the latter is true, does every binary get "-np 1" or "-np [#nodes]"? I suppose arguments like "--map-by" and "--bind-to" are global, is that correct?