Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Another attempt at fixing the Flag2 job of jenkins
[simgrid.git] / src / smpi / bindings / smpi_f77.cpp
index bfdbbc5b6c69e346888a46e2415bd4b77edfe851..33c9984bfb68a3fb7c2d917afa3088cd70ded214 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010-2021. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2010-2023. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -23,11 +23,10 @@ void smpi_init_fortran_types()
     MPI_COMM_WORLD->add_f();
     MPI_BYTE->add_f(); // MPI_BYTE
     MPI_CHAR->add_f(); // MPI_CHARACTER
+    MPI_C_BOOL->add_f(); // MPI_LOGICAL
     if (sizeof(void*) == 8) {
-      MPI_C_BOOL->add_f(); // MPI_LOGICAL
       MPI_INT->add_f();    // MPI_INTEGER
     } else {
-      MPI_C_BOOL->add_f(); // MPI_LOGICAL
       MPI_LONG->add_f();   // MPI_INTEGER
     }
     MPI_INT8_T->add_f();    // MPI_INTEGER1
@@ -287,7 +286,7 @@ void mpi_win_create_keyval_(void* copy_fn, void* delete_fn, int* keyval, void* e
 {
   smpi_copy_fn _copy_fn={nullptr,nullptr,nullptr,nullptr,nullptr,(*(int*)copy_fn) == 0 ? nullptr : reinterpret_cast<MPI_Win_copy_attr_function_fort*>(copy_fn)};
   smpi_delete_fn _delete_fn={nullptr,nullptr,nullptr,nullptr,nullptr,(*(int*)delete_fn) == 0 ? nullptr : reinterpret_cast<MPI_Win_delete_attr_function_fort*>(delete_fn)};
-  *ierr = simgrid::smpi::Keyval::keyval_create<simgrid::smpi::Win>(_copy_fn, _delete_fn, keyval, extra_state);
+  *ierr = simgrid::smpi::Keyval::keyval_create<simgrid::smpi::Win>(_copy_fn, _delete_fn, keyval, extra_state, true);
 }
 
 void mpi_win_free_keyval_(int* keyval, int* ierr)
@@ -570,10 +569,7 @@ void mpi_op_commutative_(int* op, int* commute, int* ierr)
 void mpi_group_free_(int* group, int* ierr)
 {
   MPI_Group tmp = simgrid::smpi::Group::f2c(*group);
-  if(tmp != MPI_COMM_WORLD->group() && tmp != MPI_GROUP_EMPTY){
-    simgrid::smpi::Group::unref(tmp);
-  }
-  *ierr = MPI_SUCCESS;
+  *ierr         = MPI_Group_free(&tmp);
 }
 
 void mpi_group_size_(int* group, int* size, int* ierr)
@@ -809,7 +805,7 @@ void mpi_attr_put_ (int* comm, int* keyval, int* attr_value, int* ierr) {
 void mpi_keyval_create_ (void* copy_fn, void* delete_fn, int* keyval, void* extra_state, int* ierr) {
   smpi_copy_fn _copy_fn={nullptr,nullptr,nullptr,(*(int*)copy_fn) == 0 ? nullptr : reinterpret_cast<MPI_Copy_function_fort*>(copy_fn),nullptr,nullptr};
   smpi_delete_fn _delete_fn={nullptr,nullptr,nullptr,(*(int*)delete_fn) == 0 ? nullptr : reinterpret_cast<MPI_Delete_function_fort*>(delete_fn),nullptr,nullptr};
-  *ierr = simgrid::smpi::Keyval::keyval_create<simgrid::smpi::Comm>(_copy_fn, _delete_fn, keyval, extra_state);
+  *ierr = simgrid::smpi::Keyval::keyval_create<simgrid::smpi::Comm>(_copy_fn, _delete_fn, keyval, extra_state, true);
 }
 
 void mpi_keyval_free_ (int* keyval, int* ierr) {