From 2a2a9c18fdd2a0366757297c8d21b122e01f30c9 Mon Sep 17 00:00:00 2001 From: Camille Coti <camille.coti@lipn.univ-paris13.fr> Date: Wed, 31 Jul 2019 18:10:13 -0700 Subject: [PATCH] Use the number of foremen.... for real --- src/hierarchical.cpp | 2 +- src/tensormatrix_mpi.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hierarchical.cpp b/src/hierarchical.cpp index 6104e10..f6f2ca1 100644 --- a/src/hierarchical.cpp +++ b/src/hierarchical.cpp @@ -24,7 +24,7 @@ void create_communicators_hierarch( MPI_Comm& COMM_FOREMEN, MPI_Comm& COMM_TEAM color_foreman is set to 1 if I am the root or a foreman */ int color_foreman, workers_per_foreman; - workers_per_foreman = ceil( (double)( np - 1) / (double)NBFOREMEN ); + workers_per_foreman = ceil( (double)( np - 1) / (double)nbforemen ); if( ROOT == rank ) { color_foreman = 1; } else { diff --git a/src/tensormatrix_mpi.cpp b/src/tensormatrix_mpi.cpp index b720d88..96289fc 100644 --- a/src/tensormatrix_mpi.cpp +++ b/src/tensormatrix_mpi.cpp @@ -39,7 +39,7 @@ real 3m31,034s MPI_Datatype DT_PARAMETERS; MPI_Datatype DT_PARAMETERS_2; -int nbforemen; /* Number of foremen to use with the hierarchical M/W */ +int nbforemen = NBFOREMEN; /* Number of foremen to use with the hierarchical M/W */ /******************************************************************************* * Main function * -- GitLab