added mpi info stuff

This commit is contained in:
2025-08-14 12:31:57 +02:00
parent 711c030cae
commit ddfa5672df
3 changed files with 30 additions and 2 deletions
+1 -2
View File
@@ -85,8 +85,7 @@ void MpiParticleWriter::output_particles(
// enable collective buffering
MPI_Info info;
// most rudamentary usage, might need to be improved
MPI_Info_create(&info);
MpiCommunication::create_mpi_info(&info);
// open the file
MPI_File file;
+25
View File
@@ -26,3 +26,28 @@ void MpiCommunication::init(int argc, char* argv[]) {
void MpiCommunication::finalize() {
MPI_Finalize();
}
void MpiCommunication::create_mpi_info(MPI_Info* info) {
MPI_Info_create(info);
struct {char key[32]; char val[32];} conf[] = {
// keys and values adapted from acronym
// deactivate data sieving
{"romio_ds_read" , "disable"},
{"romio_ds_write", "disable"},
// collective buffering
{"romio_cb_read" , "enable" },
// acc. to acronym the following option (if enabled)
// would "lead memory like crazy"
{"romio_cb_write", "disable"},
{"collective_buffering", "true"},
{"cb_block_size" , "1048576"}, // 1 MiB
{"cb_buffer_size", "8388608"}, // 8 MiB
// end of conf data structure
{"", ""}
};
for (int i = 0; conf[i].key[0] != '\0'; ++i) {
MPI_Info_set(*info, conf[i].key, conf[i].val);
}
}