If your program returns an error status (i.e., a non-zero exit status), then mpirun passes that along to you so any script you are using can know that something failed.
On Feb 19, 2012, at 7:41 PM, Truls Edvard Stokke wrote: > Hi, > > In running this minimal program (test.c) > > #include <stdlib.h> > #include <mpi.h> > > int main (int argc, char ** argv) { > MPI_Init(&argc, &argv); > MPI_Finalize(); > > exit(EXIT_FAILURE); > } > > compiled and ran with the commands > > mpicc test.c > mpirun -n 1 a.out > > I get the output > > -------------------------------------------------------------------------- > mpirun noticed that the job aborted, but has no info as to the process > that caused that situation. > -------------------------------------------------------------------------- > > The return value of mpirun is 1 (presumably the value of EXIT_FAILURE) > instead of the expected 0. > Citing the manual page of mpirun, "mpirun returns 0 if all ranks started by > mpirun exit after calling MPI_FINALIZE." which should be the case in the > program. > > If EXIT_FAILURE is changed to EXIT_SUCCESS there is no output and mpirun > returns 0 as expected. > > My OpenMPI version is 1.5.4, the code and output from ompi_info --all is > attached. > > If it is relevant my OS is Fedora 16 and the packages installed are > openmpi.i686 and openmpi-devel.i686, the code is ran at a single node with a > single Intel atom processor. I have also ensured that no calls to MPI_Init or > MPI_Finalize have been optimized out by the compiler. > <ompi_info_output.txt><test.c>_______________________________________________ > users mailing list > us...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/users