X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/fe304706848f0a64477d4687b3ea97d5b9a0c35c..21fe278c8460849931b37ccde22e944edec46f71:/src/smpi/bindings/smpi_pmpi_type.cpp diff --git a/src/smpi/bindings/smpi_pmpi_type.cpp b/src/smpi/bindings/smpi_pmpi_type.cpp index 868a2a9622..5e35a9dcaa 100644 --- a/src/smpi/bindings/smpi_pmpi_type.cpp +++ b/src/smpi/bindings/smpi_pmpi_type.cpp @@ -301,10 +301,14 @@ int PMPI_Type_get_name(MPI_Datatype datatype, char * name, int* len) } MPI_Datatype PMPI_Type_f2c(MPI_Fint datatype){ + if(datatype==-1) + return MPI_DATATYPE_NULL; return static_cast(simgrid::smpi::F2C::f2c(datatype)); } MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype){ + if(datatype==MPI_DATATYPE_NULL) + return -1; return datatype->c2f(); }