diff --git a/examples/parameter_example.yml b/examples/parameter_example.yml index a7fa05a2948a2f4281f8afb8e5526f46cef1c6d3..e997059f926f64a966e1cf0ef11e4e54a64861e0 100644 --- a/examples/parameter_example.yml +++ b/examples/parameter_example.yml @@ -15,7 +15,7 @@ Scheduler: cell_split_size: 400 # (Optional) Maximal number of particles per cell (this is the default value). max_top_level_cells: 12 # (Optional) Maximal number of top-level cells in any dimension. The number of top-level cells will be the cube of this (this is the default value). tasks_per_cell: 0 # (Optional) The average number of tasks per cell. If not large enough the simulation will fail (means guess...). - mpi_message_limit: 4194304 # (Optional) Maximum MPI task message size to send non-buffered + mpi_message_limit: 4096 # (Optional) Maximum MPI task message size to send non-buffered, KB. # Parameters governing the time integration (Set dt_min and dt_max to the same value for a fixed time-step run.) TimeIntegration: diff --git a/src/engine.c b/src/engine.c index fdc534f9a6938c95dc7f955e67488959612838eb..25586b7d1ee199bc50808386d67263564e6053c4 100644 --- a/src/engine.c +++ b/src/engine.c @@ -4636,12 +4636,11 @@ void engine_init(struct engine *e, struct space *s, scheduler_init(&e->sched, e->s, engine_estimate_nr_tasks(e), nr_queues, (policy & scheduler_flag_steal), e->nodeID, &e->threadpool); - /* Maximum size of MPI task messages that should not be buffered, + /* Maximum size of MPI task messages, in KB, that should not be buffered, * that is sent using MPI_Issend, not MPI_Isend. 4Mb by default. */ e->sched.mpi_message_limit = - parser_get_opt_param_int(params, "Scheduler:mpi_message_limit", - 4194304); + parser_get_opt_param_int(params, "Scheduler:mpi_message_limit", 4) * 1024; /* Allocate and init the threads. */ if ((e->runners = (struct runner *)malloc(sizeof(struct runner) * diff --git a/src/scheduler.h b/src/scheduler.h index 86c6dd0c5184636eab244b62ff306d44974f4a8c..26ac9fab1de4cff5fb98af97b19da3e9a2921cc6 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -105,7 +105,7 @@ struct scheduler { /* Maximum size of task messages, in bytes, to sent using non-buffered * MPI. */ - int mpi_message_limit; + size_t mpi_message_limit; /* 'Pointer' to the seed for the random number generator */ pthread_key_t local_seed_pointer;