Can I get mpiexec command line arguments from the executable program?

When I run mpiexec to run a parallel program, the user can pass multiple parameters to mpiexec. Is there an MPI request to access these command line arguments from the executable?

+3


source to share


1 answer


This is all clearly outside the standard, so YMMV, but usually not - the executable never sees the arguments to mpiexec. mpiexec is the startup process, and the arguments are for starting the process, which then starts the processes with only command line arguments to the executable.

If you need these arguments, you can write a shell script that writes the command line to a file before executing it and processes the processes; but if someone is working with mpiexec directly it won't work.



Something that should often work for a given environment, but still completely out of the box and won't work very well, a cross-network environment (like linux vs windows) will have an MPI task of 0, check its shell command history and try to pull arguments from this.

+2


source







All Articles