#include "simgrid/instr.h"
#include "simgrid/s4u/Engine.hpp"
#include "simgrid/s4u/Host.hpp"
+#include "simgrid/version.h"
#include "smpi_comm.hpp"
#include "smpi_datatype_derived.hpp"
#include "smpi_status.hpp"
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;
}
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();
+}
+
+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;
+}