26 int rc = MPI_File_open(
29 MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_EXCL | MPI_MODE_UNIQUE_OPEN,
33 if (rc != MPI_SUCCESS) {
36 MPICHECK(MPI_File_delete(fname.c_str(), MPI_INFO_NULL));
39 int rc = MPI_File_open(
42 MPI_MODE_CREATE | MPI_MODE_WRONLY | MPI_MODE_EXCL | MPI_MODE_UNIQUE_OPEN,
46 if (rc != MPI_SUCCESS) {
56 MPI_MODE_RDONLY | MPI_MODE_UNIQUE_OPEN,
This header file contains utility functions related to exception handling in the code.
Utility functions for MPI error checking.
#define MPICHECK(mpicall)
Shortcut macro to check MPI return codes.
void throw_with_loc(std::string message, SourceLocation loc=SourceLocation{})
Throw an exception and append the source location to it.
namespace for communication related stuff
void open_reset_file(MPI_File &fh, const std::string &fname)
Open a MPI file and remove its content.
i32 world_rank()
Gives the rank of the current process in the MPI communicator.
void open_read_only_file(MPI_File &fh, const std::string &fname)
Open a mpi file in read only mode.
Functions related to the MPI communicator.