#define CHECK_DATATYPE(datatype, count) if (datatype == MPI_DATATYPE_NULL && count > 0) return MPI_ERR_TYPE;
#define CHECK_STATUS(status) if (status == nullptr) return MPI_ERR_ARG;
#define CHECK_FLAGS(fh) if (fh->flags() & MPI_MODE_SEQUENTIAL) return MPI_ERR_AMODE;
+#define CHECK_RDONLY(fh) if (fh->flags() & MPI_MODE_RDONLY ) return MPI_ERR_AMODE;
#define PASS_ZEROCOUNT(count) if (count == 0) {\
status->count=0;\
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("IO - write_all", static_cast<double>(count*datatype->size())));
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("IO - write_ordered", static_cast<double>(count*datatype->size())));
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count);
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
CHECK_DATATYPE(datatype, count)
CHECK_STATUS(status)
CHECK_FLAGS(fh)
+ CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
TRACE_smpi_comm_in(rank_traced, __func__, new simgrid::instr::CpuTIData("IO - write_at_all", static_cast<double>(count*datatype->size())));