X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/13a775d458d6616227bfe215af742411850677dc..21fe278c8460849931b37ccde22e944edec46f71:/src/smpi/bindings/smpi_pmpi.cpp diff --git a/src/smpi/bindings/smpi_pmpi.cpp b/src/smpi/bindings/smpi_pmpi.cpp index c05c46d063..7b406659c5 100644 --- a/src/smpi/bindings/smpi_pmpi.cpp +++ b/src/smpi/bindings/smpi_pmpi.cpp @@ -124,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; } @@ -232,3 +232,30 @@ 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(keyval); } + +MPI_Errhandler PMPI_Errhandler_f2c(MPI_Fint errhan){ + if(errhan==-1) + return MPI_ERRHANDLER_NULL; + return static_cast(simgrid::smpi::Errhandler::f2c(errhan)); +} + +MPI_Fint PMPI_Errhandler_c2f(MPI_Errhandler errhan){ + if(errhan==MPI_ERRHANDLER_NULL) + return -1; + return errhan->c2f(); +} + +int PMPI_Buffer_attach(void *buf, int size){ + if(buf==nullptr) + return MPI_ERR_BUFFER; + if(size<0) + return MPI_ERR_ARG; + smpi_process()->set_bsend_buffer(buf, size); + return MPI_SUCCESS; +} + +int PMPI_Buffer_detach(void* buffer, int* size){ + smpi_process()->bsend_buffer((void**)buffer, size); + smpi_process()->set_bsend_buffer(nullptr, 0); + return MPI_SUCCESS; +}