19 const std::string
FILE_NAME(
"parallel_dataset_example.h5");
29 int mpi_rank, mpi_size;
33 MPI_Comm_size(MPI_COMM_WORLD, &mpi_size);
34 MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank);
46 std::vector<size_t> dims(2);
47 dims[0] = std::size_t(mpi_size);
56 int data[1][2] = {{mpi_rank, mpi_rank}};
59 dataset.
select({std::size_t(mpi_rank), 0}, {1, 2}).write(data);
63 std::cerr << err.
what() << std::endl;
64 MPI_Abort(MPI_COMM_WORLD, 1);