diff --git a/include/realizations/config/formulation.hpp b/include/realizations/config/formulation.hpp index 594a2900c1..51b976be35 100644 --- a/include/realizations/config/formulation.hpp +++ b/include/realizations/config/formulation.hpp @@ -1,11 +1,16 @@ #ifndef NGEN_REALIZATION_CONFIG_FORMULATION_H #define NGEN_REALIZATION_CONFIG_FORMULATION_H +#include #include #include #include "JSONProperty.hpp" +#if NGEN_WITH_MPI +#include +#endif + namespace realization{ namespace config{ @@ -53,9 +58,16 @@ namespace realization{ //Create the nested formulations in order of definition nested.push_back(Formulation(module.second)); } + // If running MPI job, output with only one processor + #if NGEN_WITH_MPI + int mpi_rank; + MPI_Comm_rank(MPI_COMM_WORLD, &mpi_rank); + if (mpi_rank == 0) + #endif + { geojson::JSONProperty::print_property(parameters.at("modules")); } - + } } /**