Am 20.02.2012 um 15:27 schrieb Ralph Castain:

> The return code is expected and the man page is incomplete. This was an 
> intended change in behavior to more accurately report the outcome of a job.

With the recent discussion about a singleton startup: then there won't be any 
error message as a singleton startup. This is not consistent, but I see the 
intention.

Maybe it could be checked against MPI_ERR_LASTCODE: if it's lower or equal: 
output MPI error message as observed, otherwise treat it as an application 
error unrelated to MPI, forward it without error message.

-- Reuti


> On Feb 19, 2012, at 11:08 PM, Truls Edvard Stokke wrote:
> 
>> Hi Ralph, thank you for answering.
>> 
>> So for clarity,
>> - the return code is expected and there is a bug in the man page,
>> - the warning is supposed to be printed in the event that a program exits 
>> with a non-zero exit status even if it calls MPI_Finalize before it does so.
>> 
>> Please correct me if either of those aren't really the case.
>> 
>> When running the code with an older version of OpenMPI (1.4.3) there is no 
>> warning.
>> If it is relevant there is no warning when running it with MPICH2.
>> 
>> Is the warning an intended change from 1.4.x to 1.5.x or is it likely that 
>> my installation of OpenMPI is configured incorrectly?
>> 
>> On Mon, Feb 20, 2012 at 4:53 AM, Ralph Castain <r...@open-mpi.org> wrote:
>> 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
>> 
>> 
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>> 
>> _______________________________________________
>> users mailing list
>> us...@open-mpi.org
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
> 
> _______________________________________________
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users


Reply via email to