Hi,
did you check the source code for ompi_datatype_is_valid() ?
MPI_Datatype is an opaque handler.
in Open MPI, this is an ompi_datatype_t *;
iirc, ompi_datatype_is_valid() test for a NULL pointer, or MPI_DATATYPE_
NULL.
in your case, you forced an invalid pointer, so the behavior is
undefined
(and i am not so surprised it crashes)
Cheers,
Gilles
----- Original Message -----
Hi,
if I insert following lines somewhere openmpi, such as ompi/mpi/c/
iscatter.c
printf(" --- in MPI_Iscatter\n");
//MPI_Datatype dt00 = (MPI_Datatype) MPI_INT;
MPI_Datatype dt00 = (MPI_Datatype) -1;
if(!ompi_datatype_is_valid(dt00) ) {
printf(" --- dt00 is NOT valid \n");
}
The attached test code will give the errors:
*** Process received signal ***
Signal: Segmentation fault (11)
Signal code: Address not mapped (1)
Failing at address: 0xf
[ 0] [0x3fff9d480478]
...
Is it a bug in the function ompi_datatype_is_valid(..) ? or I miss
something?
Dahai
_______________________________________________
devel mailing list
[email protected]
https://rfd.newmexicoconsortium.org/mailman/listinfo/devel