]> AND Public Git Repository - simgrid.git/blobdiff - src/smpi/bindings/smpi_pmpi_type.cpp
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
move the simcall template to the kernel::actor namespace
[simgrid.git] / src / smpi / bindings / smpi_pmpi_type.cpp
index 868a2a962212323230e7a5aa6a73bb7d073c3da7..5e35a9dcaade73b36ae55215ac803f23cf4fa6e1 100644 (file)
@@ -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<MPI_Datatype>(simgrid::smpi::F2C::f2c(datatype));
 }
 
 MPI_Fint PMPI_Type_c2f(MPI_Datatype datatype){
+  if(datatype==MPI_DATATYPE_NULL)
+    return -1;
   return datatype->c2f();
 }