diff --git a/src/main_utils.cpp b/src/main_utils.cpp index 5d1e2eb..c61c63a 100644 --- a/src/main_utils.cpp +++ b/src/main_utils.cpp @@ -10,6 +10,7 @@ #define DEFAULT_TAG 0 +#define JOB_DIAGNOSTICS_TAG 1 #define MASTER 0 @@ -157,7 +158,7 @@ void master(const size_t min_index_inclusive, const size_t max_index_exclusive) // And finally we ask for the total number of tasks it had to compute int tmp_n_jobs; - MPI_Recv(&tmp_n_jobs, 1, MPI_INT, MPI_ANY_SOURCE, DEFAULT_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); + MPI_Recv(&tmp_n_jobs, 1, MPI_INT, MPI_ANY_SOURCE, JOB_DIAGNOSTICS_TAG, MPI_COMM_WORLD, MPI_STATUS_IGNORE); jobs_finished_per_task.push_back(tmp_n_jobs); } @@ -193,7 +194,7 @@ void worker(const utils::SimulationParameters params) { // Now we can return some information back to the master process about // how many jobs were completed. - MPI_Send(&total_jobs, 1, MPI_INT, 0, DEFAULT_TAG, MPI_COMM_WORLD); + MPI_Send(&total_jobs, 1, MPI_INT, 0, JOB_DIAGNOSTICS_TAG, MPI_COMM_WORLD); // Finish signal received, break from the loop return;