This POP WP7 CoDesign code implements parallel file I/O for binary files, where every process reads or writes to a unique file, i.e. the number of processes equals the number of files.
This POP WP7 CoDesign code implements parallel file I/O for binary files, where every process reads or writes to a unique file, i.e. the number of processes equals the number of files.
The resulting executable takes one argument, which defines the number of double precision values held in a 1D array on each process, the default value is 100,000. The array value for entry `i` on process `p` is `i + p + 0.1`. This data is written & read to/from binary files `data3_<p>.bin`, where `<p>` is the process rank, i.e. there is one file per process.
The resulting executable takes one argument, which defines the number of double precision values held in a 1D array on each process, the default value is 100,000. The array value for entry `i` on process `p` is `i + p + 0.1`. This data is written & read to/from binary files `data3_<p>.bin`, where `<p>` is the process rank, i.e. there is one file per process.
The program reports the time for processes to write and read data to/from the files.
The program reports the time for processes to write and read data to/from the files.
## Building the code
The file mpi_io_kernel.cpp should be compiled with an MPI C++ compiler with the -std=c++11 flag, e.g.
The file mpi_io_kernel.cpp should be compiled with an MPI C++ compiler with the -std=c++11 flag, e.g.
To run the code using mpirun use the following command, replacing `nproc` with the number of processess, and `nval` with the number of double precision values per process.