reorganize to avoid unused warnings without MPI

This commit is contained in:
Arne Morten Kvarving
2020-06-19 09:45:29 +02:00
parent c0464ea383
commit c8617141d4

View File

@@ -141,14 +141,16 @@ static inline int setupParameters_(int argc,
positionalParamCallback); positionalParamCallback);
if (!s.empty()) if (!s.empty())
{ {
int status = 1, globalStatus = 1; int status = 1;
if (s == "Help called") // only on master process if (s == "Help called") // only on master process
status = globalStatus = -1; // Use negative values to indicate --help argument status = -1; // Use negative values to indicate --help argument
#if HAVE_MPI #if HAVE_MPI
// Force -1 if the master process has that. // Force -1 if the master process has that.
int globalStatus;
MPI_Allreduce(&status, &globalStatus, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD); MPI_Allreduce(&status, &globalStatus, 1, MPI_INT, MPI_MIN, MPI_COMM_WORLD);
#endif
return globalStatus; return globalStatus;
#endif
return status;
} }
std::string paramFileName = EWOMS_GET_PARAM_(TypeTag, std::string, ParameterFile); std::string paramFileName = EWOMS_GET_PARAM_(TypeTag, std::string, ParameterFile);