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

Public GIT Repository
Add support for MPI Errhandlers in Comm, File, Win.
[simgrid.git] / src / smpi / bindings / smpi_pmpi.cpp
index a57e4b1dadc1971901c859d6a1dfb12b54d4f194..2b8f28e2999a043281f096c354eb56a24723d97f 100644 (file)
@@ -63,7 +63,6 @@ int PMPI_Finalize()
   smpi_process()->finalize();
 
   TRACE_smpi_comm_out(rank_traced);
-  TRACE_smpi_finalize(rank_traced);
   return MPI_SUCCESS;
 }
 
@@ -125,7 +124,7 @@ int PMPI_Abort(MPI_Comm /*comm*/, int /*errorcode*/)
   smpi_bench_end();
   // FIXME: should kill all processes in comm instead
   smx_actor_t actor = SIMIX_process_self();
-  simgrid::simix::simcall([actor] { actor->exit(); });
+  simgrid::kernel::actor::simcall([actor] { actor->exit(); });
   return MPI_SUCCESS;
 }
 
@@ -233,3 +232,15 @@ int PMPI_Keyval_create(MPI_Copy_function* copy_fn, MPI_Delete_function* delete_f
 int PMPI_Keyval_free(int* keyval) {
   return simgrid::smpi::Keyval::keyval_free<simgrid::smpi::Comm>(keyval);
 }
+
+MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhan){
+  if(errhan==-1)
+    return MPI_ERRHANDLER_NULL;
+  return static_cast<MPI_Errhandler>(simgrid::smpi::Errhandler::f2c(errhan));
+}
+
+MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhan){
+  if(errhan==MPI_ERRHANDLER_NULL)
+    return -1;
+  return errhan->c2f();
+}