By default MPI errors are fatal and abort. The error message says it all:

*** An error occurred in MPI_Reduce
*** reported by process [3645440001,0]
*** on communicator MPI_COMM_WORLD
*** MPI_ERR_COUNT: invalid count argument
*** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
*** and potentially your MPI job)

If you want different behavior you have to change the default error handler on 
the communicator using MPI_Comm_set_errhandler. You can set it to 
MPI_ERRORS_RETURN and check the error code or you can create your own function. 
See MPI 3.1 Chapter 8.

-Nathan

On May 04, 2017, at 02:58 PM, Dahai Guo <dahai....@gmail.com> wrote:

Hi,

Using opemi 2.1,  the following code resulted in the core dump, although only a 
simple error msg was expected.  Any idea what is wrong?  It seemed related the 
errhandler somewhere.


D.G.


 *** An error occurred in MPI_Reduce
 *** reported by process [3645440001,0]
 *** on communicator MPI_COMM_WORLD
 *** MPI_ERR_COUNT: invalid count argument
 *** MPI_ERRORS_ARE_FATAL (processes in this communicator will now abort,
 ***    and potentially your MPI job)  
......

[1,1]<stderr>:1000151c0000-1000151e0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:1000151e0000-100015250000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015250000-100015270000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015270000-1000152e0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:1000152e0000-100015300000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015300000-100015510000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015510000-100015530000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015530000-100015740000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015740000-100015760000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015760000-100015970000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015970000-100015990000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015990000-100015ba0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015ba0000-100015bc0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015bc0000-100015dd0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015dd0000-100015df0000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100015df0000-100016000000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100016000000-100016020000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100016020000-100016230000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100016230000-100016250000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100016250000-100016460000 rw-p 00000000 00:00 0 
[1,1]<stderr>:100016460000-100016470000 rw-p 00000000 00:00 0 
[1,1]<stderr>:3fffd4630000-3fffd46c0000 rw-p 00000000 00:00 0                   
       [stack] 
-------------------------------------------------------------------------- 

#include <stdlib.h> 
#include <stdio.h> 
#include <mpi.h> 
int main(int argc, char** argv) 
{ 

    int r[1], s[1]; 
    MPI_Init(&argc,&argv); 

    s[0] = 1; 
    r[0] = -1; 
    MPI_Reduce(s,r,-1,MPI_INT,MPI_SUM,0,MPI_COMM_WORLD); 
    printf("%d\n",r[0]); 
    MPI_Finalize(); 
}

_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel
_______________________________________________
devel mailing list
devel@lists.open-mpi.org
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel

Reply via email to