diff --git a/src/tensormatrix_mpi.cpp b/src/tensormatrix_mpi.cpp index 96289fc110f2106b529bdb97dac464ffd0343837..9ede677061269b81ccf4d2a5f5bf67faf83a9aaa 100644 --- a/src/tensormatrix_mpi.cpp +++ b/src/tensormatrix_mpi.cpp @@ -40,6 +40,7 @@ MPI_Datatype DT_PARAMETERS; MPI_Datatype DT_PARAMETERS_2; int nbforemen = NBFOREMEN; /* Number of foremen to use with the hierarchical M/W */ +int maxresult = MAXRESULT; /* Maximum results in the result queue, addslave version */ /******************************************************************************* * Main function * @@ -98,7 +99,8 @@ int main( int argc, char** argv ){ break; } if( argc >= 4 ) { - nbforemen = atoi( argv[3]); + nbforemen = atoi( argv[3] ); /* these two variables are obtained from the same CI parameter but since they are */ + maxresult = atoi( argv[3] ); /* used in two functions for two purposes, use two different names */ } } } diff --git a/src/utils_parall.cpp b/src/utils_parall.cpp index 503ac709679fc8720b8711f3eb0e53250c1f8e69..07b9638e66f2275db6f4a18b6ef9a645c077ffc6 100644 --- a/src/utils_parall.cpp +++ b/src/utils_parall.cpp @@ -155,7 +155,7 @@ void send_add_or_end_addslave( std::vector<std::string>& results, int peer, int /* Do I have a lot of results to be treated in the result queue? */ - if( results.size() > MAXRESULT ) { + if( results.size() > maxresult ) { /* if the result queue is too big, send it */ send_expressions_to_add( results, peer ); } else { @@ -168,7 +168,7 @@ void send_add_or_end_addslave( std::vector<std::string>& results, int peer, int void send_work_addslave( std::vector<parameters_t>& input, std::vector<std::string>& results, int peer ) { - if( results.size() > MAXRESULT ) { + if( results.size() > maxresult ) { /* if the result queue is too big, send it */ send_expressions_to_add( results, peer ); } else { diff --git a/src/utils_parall.h b/src/utils_parall.h index 24350efa192e4f680fe24f5a9c27a072c25220b0..2d5cd4b9fafa69c749613858aedbd3d7f4f90134 100644 --- a/src/utils_parall.h +++ b/src/utils_parall.h @@ -56,5 +56,6 @@ extern MPI_Datatype DT_PARAMETERS; extern MPI_Datatype DT_PARAMETERS_2; extern int nbforemen; /* Number of foremen to use with the hierarchical M/W */ +extern int maxresult; /* Maximum results in the result queue, addslave version */ #endif // _UTILS_PARALL_H_