#include "smpi_datatype.hpp"
XBT_LOG_EXTERNAL_DEFAULT_CATEGORY(smpi_pmpi);
-#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;
}
int PMPI_File_read(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
- CHECK_FLAGS(fh)
+ CHECK_FILE_INPUTS
CHECK_WRONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int PMPI_File_read_shared(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_WRONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int PMPI_File_write(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int PMPI_File_write_shared(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count)
smpi_bench_end();
int PMPI_File_read_all(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_WRONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
int PMPI_File_read_ordered(MPI_File fh, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_WRONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
int PMPI_File_write_all(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
int PMPI_File_write_ordered(MPI_File fh, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
int PMPI_File_read_at(MPI_File fh, MPI_Offset offset, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUTS
- CHECK_FLAGS(fh)
CHECK_WRONLY(fh)
PASS_ZEROCOUNT(count);
smpi_bench_end();
int PMPI_File_read_at_all(MPI_File fh, MPI_Offset offset, void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUT_OFFSET
- CHECK_FLAGS(fh)
CHECK_WRONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();
int PMPI_File_write_at(MPI_File fh, MPI_Offset offset, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUT_OFFSET
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
PASS_ZEROCOUNT(count);
smpi_bench_end();
int PMPI_File_write_at_all(MPI_File fh, MPI_Offset offset, const void *buf, int count,MPI_Datatype datatype, MPI_Status *status){
CHECK_FILE_INPUT_OFFSET
- CHECK_FLAGS(fh)
CHECK_RDONLY(fh)
smpi_bench_end();
int rank_traced = simgrid::s4u::this_actor::get_pid();