Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Keyvals : handle MPI_KEYVAL_INVALID
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index 06567f1..53fb394 100644 (file)
@@ -243,6 +243,8 @@ int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_f
 }
 
 int PMPI_Keyval_free(int* keyval) {
+  CHECK_NULL(1, MPI_ERR_ARG, keyval)
+  CHECK_MPI_NULL(1, MPI_KEYVAL_INVALID, MPI_ERR_KEYVAL, *keyval)
   return simgrid::smpi::Keyval::keyval_free<simgrid::smpi::Comm>(keyval);
 }