10 #define _XOPEN_SOURCE 700 15 #include "sion_const.h" 16 #include "sion_debug.h" 17 #include "sion_enums.h" 18 #include "sion_error_handler.h" 23 #include "sion_mpi_internal_gen.h" 39 cb_args->options = (options) ? *options : SION_MPI_OPTIONS_INIT;
41 _sion_errorprint(SION_NOT_SUCCESS, _SION_ERROR_RETURN,
42 "cannot allocate cb_args structure of size %lu (sion_file_check_par_args), aborting ...\n",
54 int sion_file_check_par_cb_mpi(
char *fname,
void *v_args)
58 MPI_Comm_rank(cb_args->comm, &grank);
62 DPRINTFP((1, __func__, grank,
"enter parallel check of file %s\n", fname));
64 _sion_errorprint_set_flag(_SION_ERROR_FLAG_SUPPRESS_MSG);
65 int sid =
sion_paropen_mpi(fname, cb_args->mode, cb_args->comm, &cb_args->options);
66 _sion_errorprint_set_flag(_SION_ERROR_FLAG_NONE);
69 rc = SION_NOT_SUCCESS;
77 DPRINTFP((1, __func__, grank,
"leave parallel check of file %s rc=%d\n", fname, rc));
int sion_paropen_mpi(const char *filename, sion_open_mode mode, MPI_Comm communicator, const sion_mpi_options *options)
Open a SIONlib file from multiple MPI processes.
int sion_parclose_mpi(int sid)
Close a SIONlib file using MPI.
sion_open_mode
specifies for what type of access to open a file
struct sion_mpi_options sion_mpi_options
Holds non-essential arguments for sion_paropen_mpi().