mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
reorganize to avoid unused warnings without MPI
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user