Skip to content

Commit

Permalink
Cleanup testing output on multiple mpi ranks (#24)
Browse files Browse the repository at this point in the history
* only print error messages if mpi rank is 0

* add rank check for num ranks

* have non-zero ranks exit gracefully when throwing exago error

* pflow functionality tests fully mpi aware

* add logging rank variable

* Apply pre-commmit fixes

* Deleted unused header file.

* Brought SCOPFLOW test driver in line with PFLOW driver.

* Applied additional changes to selfcheck.cpp file for PFLOW, SOPFLOW and SCOPFLOW
to adapt tests for running on multiple MPI ranks.

* Apply pre-commmit fixes

* Initialized some variables that were not getting properly set for serial
test case.

* only print error messages if mpi rank is 0

* pflow functionality tests fully mpi aware

* add logging rank variable

* Apply pre-commmit fixes

* Deleted unused header file.

* Brought SCOPFLOW test driver in line with PFLOW driver.

* Applied additional changes to selfcheck.cpp file for PFLOW, SOPFLOW and SCOPFLOW
to adapt tests for running on multiple MPI ranks.

* Apply pre-commmit fixes

* Update summit modules (#21)

* Minor fix for Summit build system

* Fix '--nnodes'-->'-nodes' on Summit

* Attempt to update Summit modules

* Reinstall Ginkgo and python dependencies on Summit

* Enforce [email protected] on Summit

* Specify RelWithDebInfo for ExaGO and HiOp on Summit

* Update Spack

* Relax constraints on exago dependencies on Summit

* Add constraints on HiOp in the spack config. Part of the ExaGO package was conflicting with building HiOp in release mode.

* Cleaner module install on Summit

* Update spack_cpu_build.yaml to work without fork

* Update .github/workflows/spack_cpu_build.yaml

* Update Spack

* Try updating pybind11 submodule to see if it fixes errors with exago+python builds

---------

Co-authored-by: Cameron Rutherford <[email protected]>

* OPFLOW with RAJA/HIOP sparse GPU solvers (#8)

* OPFLOW: initial implementation of RAJA/HiOp sparse GPU-based solver

WIP - HIOP Sparse solver with GPU model

OPFLOW: Started work on support for HIOP sparse solver interface for GPUs.

Added a copy of hiop sparse solver interface.

OPFLOW: Added model skeleton for GPU sparse version (copying from pbpolrajahiop)

Fixed build

Did some copy paste to add a test for HIOPSPARSE. This test is not actually
functional yet.

Started updating the hiopsparse model and solver code.

More work on updating the solver and model

Added scalar and vector unit tests for model to be used with HIOP sparse solver on GPU

Apply cmake lint

Fix unit tests.

Set the size of array when using Umpire memset.

Code formatting

Some minor changes to get PBPOLRAJAHIOPSPARSE model code to compile

Separate BUS/LINE/GEN/.../Param structs into reusable module

Minor edit

Rename files

Fix typo

Use BUS/LINE/GEN/.../Param structs in Raja HiOp Sparse model (compiles)

Updating HIOP sparse solver GPU API

Completed bounds kernels

Completed scalar and vector functions

WIP - HIOP Sparse solver with GPU model

OPFLOW: Started work on support for HIOP sparse solver interface for GPUs.

Added a copy of hiop sparse solver interface.

OPFLOW: Added model skeleton for GPU sparse version (copying from pbpolrajahiop)

Fixed build

Did some copy paste to add a test for HIOPSPARSE. This test is not actually
functional yet.

Started updating the hiopsparse model and solver code.

More work on updating the solver and model

Added scalar and vector unit tests for model to be used with HIOP sparse solver on GPU

Apply cmake lint

Fix unit tests.

Set the size of array when using Umpire memset.

Code formatting

Rename files

Use BUS/LINE/GEN/.../Param structs in Raja HiOp Sparse model (compiles)

Updating HIOP sparse solver GPU API

Completed bounds kernels

Jacobian and Hessian for sparse model (CPU --> GPU copy)

Use correct array lengths in Eq. Jacobian

Fix bug in Jacobian.

Fix unused variable/parameter errors

OPFLOW: rework solution callback for RAJA/HIOP GPU-based solver

Formatting changes

* Add unit test for RAJA/HiOp Sparse GPU model (9-bus only)

* Apply pre-commmit fixes

* Add test for 200-bus case

* Apply pre-commmit fixes

---------

Co-authored-by: Abhyankar, Shrirang G <[email protected]>

* Upgrade ascent build system and use `[email protected]` on CI platforms (#20)

* Boilerplate scripts to install modules on Ascent via submodule Spack

* Fix '--nnodes'-->'-nodes' on Ascent

* Improve Ascent env.sh

* [email protected] on Ascent

* Apply pre-commmit fixes

* Relax constraints on exago dependencies on Ascent and build ~python

* concretizer: reuse was causing several packages to be duplicated in the environment. Require clean concretizations on  Ascent.

* Minor module update on Ascent

* Add LAPACK_LIBRARIES to Ascent base script. CMAKE was picking up python's openblas otherwise.

* Error with unzip.

* Apply pre-commmit fixes

* Add working build on ascent.

* Add working gcc11.2.0 spack spec.

* Add Ascent Spack pipeline. [ascent-rebuild]

* Update gcc version to 11.2.0 in base.sh [skip-ci]

* Fix stages of Ascent pipeline [ascent-rebuild]

* Add working ascent spack build.

* Add hiop@develop force rebuild to PNNL CI [ascent-rebuild] [newell-rebuild] [deception-rebuild] [incline-rebuild].

* Update Ascent spack built tcl modules

* Only test ascent on tcl module update [ci-skip]

* Update base.sh to disable python on ascent [skip ci]

* Remove LAPACK_LIBRARIES spec [ascent-test]

* Update ascent.gitlab-ci.yml to fix needs/dependencies [ascent-test]

* Update deception spack built tcl modules - [deception-test]

* Try again with Python, but have Spack build it instead of using the external module [ascent-rebuild]

* Force python rebuild on ascent and use [email protected] on incline [ascent-rebuild] [newell-rebuild] [incline-rebuild]

* Pin [email protected] on all CI platforms [decetpion-rebuild] [ascent-rebuild] [newell-rebuild] [incline-rebuild]

* Fix false positive/negative in Ascent pipelines [deception-rebuild] [ascent-test]

* Update incline spack built tcl modules - [incline-test]

* Update newell spack built tcl modules - [newell-test]

* Fix HiOp spec on Ascent [ascent-rebuild].

* Update deception spack built tcl modules - [deception-test]

* Update CPU Spack build with issue for each failing build [ci skip]

* Update Ascent spack built tcl modules [ascent-test]

* Add 1.0.0 dep into CHANGELOG.

* Add ascent-skip to CI to get tests passing [ascent-test]

---------

Co-authored-by: nkoukpaizan <[email protected]>
Co-authored-by: Cameron Rutherford <[email protected]>
Co-authored-by: cameronrutherford <[email protected]>
Co-authored-by: spack-auto-module <[email protected]>

* Add Spack CPU build with `exago+hiop+raja~ipopt ^hiop+raja~sparse` (#41)

* Add CPU build with hiop+sparse and exago~ipopt+hiop+raja

* Update .github/workflows/spack_cpu_build.yaml

* `+mpi` to `+raja` CPU build

* Add HIOPRAJASPARSE model if sparse and raja enabled

* Fix other HIOPRAJASPARSE ifdef

* pflow functionality tests fully mpi aware

* add logging rank variable

* Apply pre-commmit fixes

* Deleted unused header file.

* Brought SCOPFLOW test driver in line with PFLOW driver.

* Applied additional changes to selfcheck.cpp file for PFLOW, SOPFLOW and SCOPFLOW
to adapt tests for running on multiple MPI ranks.

* Apply pre-commmit fixes

* Apply pre-commmit fixes

* Updated third party libraries

* Set more default values in selfcheck.cpp to get rid of uninitialized variables
errors in Valgrind and modified a few test values so that tests pass.

* Apply pre-commmit fixes

* Fixed up some preprocessor glitches that got introduced in the rebase.

* Modified versions on pybind11 and spack to match develop.

* Fix remaining issues in merge request.

* Apply pre-commmit fixes

* Fixed preprocessor directives to match develop branch.

* Modified constructor of FunctionalityTestContext to get rid of a bunch of code
checking MPI calls.

* Apply pre-commmit fixes

* Remove logging ranks variable.

---------

Co-authored-by: Jaelyn Litzinger <[email protected]>
Co-authored-by: Bruce J Palmer <[email protected]>
Co-authored-by: Nicholson Koukpaizan <[email protected]>
Co-authored-by: Cameron Rutherford <[email protected]>
Co-authored-by: Bill <[email protected]>
Co-authored-by: Abhyankar, Shrirang G <[email protected]>
Co-authored-by: nkoukpaizan <[email protected]>
Co-authored-by: cameronrutherford <[email protected]>
Co-authored-by: spack-auto-module <[email protected]>
Co-authored-by: Bruce J Palmer <[email protected]>
  • Loading branch information
11 people authored Nov 29, 2023
1 parent ff1e7aa commit f19b82f
Show file tree
Hide file tree
Showing 11 changed files with 138 additions and 87 deletions.
8 changes: 7 additions & 1 deletion src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -584,12 +584,18 @@ PetscErrorCode ExaGOInitialize(MPI_Comm comm, int *argc, char ***argv,
PetscErrorCode ExaGOFinalize() {
PetscFunctionBegin;
ExaGOLog(EXAGO_LOG_INFO, "Finalizing {} application.", ExaGOCurrentAppName);
MPI_Comm comm = MPI_COMM_WORLD;
int my_rank;
auto err = MPI_Comm_rank(comm, &my_rank);
if (err)
throw ExaGOError("Error getting MPI rank number");
bool flg;
ExaGOLogIsUsingLogFile(&flg);
if (flg) {
std::string filename;
ExaGOLogGetLoggerName(filename);
ExaGOLog(EXAGO_LOG_INFO, "See logfile {} for output.", filename);
if (my_rank == 0)
ExaGOLog(EXAGO_LOG_INFO, "See logfile {} for output.", filename);
}
PetscFinalize();

Expand Down
28 changes: 15 additions & 13 deletions tests/functionality/opflow/selfcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,16 @@ static char help[] = "OPFLOW Functionality Tests.\n\n";
#include <opflow.h>

struct OpflowFunctionalityTestParameters {
/* Communicator required to run funcitonality test */
MPI_Comm comm = MPI_COMM_WORLD;

/* Parameters required to set up and test a OPFlow */
std::string solver = "";
std::string model = "";
std::string network = "";
bool is_loadloss_active;
bool is_powerimb_active;
std::string gen_bus_voltage_string;
bool is_loadloss_active = false;
bool is_powerimb_active = false;
std::string gen_bus_voltage_string =
OPFLOWOptions::genbusvoltage.default_value;
OPFLOWGenBusVoltageType gen_bus_voltage_type;
double tolerance;
double tolerance = OPFLOWOptions::tolerance.default_value;
double warning_tolerance = 0.01;
int iter_range = 0;
double has_gen_set_point;
Expand All @@ -24,8 +22,9 @@ struct OpflowFunctionalityTestParameters {
double power_imbalance_penalty = 1000.0;
std::string description = "";
int hiop_verbosity_level = 0;
std::string hiop_compute_mode;
std::string hiop_mem_space;
std::string hiop_compute_mode =
OPFLOWOptions::hiop_compute_mode.default_value;
std::string hiop_mem_space = OPFLOWOptions::hiop_mem_space.default_value;
std::string initialization_string = "MIDPOINT";
OPFLOWInitializationType initialization_type;

Expand Down Expand Up @@ -86,11 +85,14 @@ struct OpflowFunctionalityTestParameters {

struct OpflowFunctionalityTests
: public FunctionalityTestContext<OpflowFunctionalityTestParameters> {
OpflowFunctionalityTests(std::string testsuite_filename,
OpflowFunctionalityTests(std::string testsuite_filename, MPI_Comm comm,
int logging_verbosity = EXAGO_LOG_INFO)
: FunctionalityTestContext(testsuite_filename, logging_verbosity) {}
: FunctionalityTestContext(testsuite_filename, comm, logging_verbosity),
comm{comm} {}

using Params = OpflowFunctionalityTestParameters;

MPI_Comm comm;
void
ensure_options_are_consistent(toml::value testcase,
toml::value presets = toml::value{}) override {
Expand Down Expand Up @@ -160,7 +162,7 @@ struct OpflowFunctionalityTests
if (rank == 0) {
std::cout << "Test Description: " << params.description << std::endl;
}
ierr = OPFLOWCreate(params.comm, &opflow);
ierr = OPFLOWCreate(comm, &opflow);
ExaGOCheckError(ierr);

ierr = OPFLOWSetHIOPVerbosityLevel(opflow, params.hiop_verbosity_level);
Expand Down Expand Up @@ -357,7 +359,7 @@ int main(int argc, char **argv) {
ExaGOCheckError(ierr);
ExaGOLog(EXAGO_LOG_INFO, "{}", "Creating OPFlow Functionality Test");

OpflowFunctionalityTests test{std::string(argv[1])};
OpflowFunctionalityTests test{std::string(argv[1]), comm};
test.run_all_test_cases();
test.print_report();
std::string filename = test.set_file_name(argv[1]);
Expand Down
33 changes: 16 additions & 17 deletions tests/functionality/pflow/selfcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ static char help[] = "PFLOW Functionality Tests.\n\n";
#include <pflow.h>

struct PflowFunctionalityTestParameters {
/* Communicator required to run funcitonality test */
MPI_Comm comm = MPI_COMM_WORLD;

/* Parameters required to set up and test a PFlow */
std::string network = "";
std::string description = "";
Expand Down Expand Up @@ -37,11 +34,10 @@ struct PflowFunctionalityTests

PflowFunctionalityTests(std::string testsuite_filename, MPI_Comm comm,
int logging_verbosity = EXAGO_LOG_INFO)
: FunctionalityTestContext(testsuite_filename, logging_verbosity),
: FunctionalityTestContext(testsuite_filename, comm, logging_verbosity),
comm{comm} {
auto err = MPI_Comm_size(comm, &nprocs);
if (err)
throw ExaGOError("Error getting MPI num ranks");

nprocs = FunctionalityTestContext::nprocs;
}

void
Expand All @@ -53,14 +49,14 @@ struct PflowFunctionalityTests
int n_testcase_procs = -1;
set_if_found(n_testcase_procs, testcase, "n_procs");

if (-1 != n_testcase_procs) {
if (is_true_somewhere(-1 != n_testcase_procs, comm)) {
std::stringstream errs;
errs << "Number of processes should be declared globally in the preset "
"area of the test suite TOML file, not inside each testcase.\n"
<< "Testcase: " << testcase << "\nWith presets:\n"
<< presets;
throw ExaGOError(errs.str().c_str());
} else if (nprocs != n_preset_procs) {
} else if (is_true_somewhere(nprocs != n_preset_procs, comm)) {
std::stringstream errs;
errs << "PFLOW Functionality test suite found " << n_preset_procs
<< " processes specified in the presets of the test suite TOML "
Expand All @@ -73,7 +69,7 @@ struct PflowFunctionalityTests

auto ensure_option_available = [&](const std::string &opt) {
bool is_available = testcase.contains(opt) || presets.contains(opt);
if (!is_available) {
if (is_true_somewhere(!is_available, comm)) {
std::stringstream errs;
errs << "PFLOW Test suite expected option '" << opt
<< "' to be available, but it was not found in this testsuite"
Expand Down Expand Up @@ -108,14 +104,11 @@ struct PflowFunctionalityTests
void run_test_case(Params &params) override {
PetscErrorCode ierr;
PFLOW pflow;
int rank;

MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
int my_rank = FunctionalityTestContext::rank;

if (rank == 0) {
if (my_rank == 0)
std::cout << "Test Description: " << params.description << std::endl;
}
ierr = PFLOWCreate(params.comm, &pflow);
ierr = PFLOWCreate(comm, &pflow);
ExaGOCheckError(ierr);

// Prepend installation directory to network path
Expand Down Expand Up @@ -192,10 +185,16 @@ int main(int argc, char **argv) {
ExaGOCheckError(ierr);
ExaGOLog(EXAGO_LOG_INFO, "{}", "Creating PFlow Functionality Test");

int my_rank;
auto err = MPI_Comm_rank(comm, &my_rank);
if (err != MPI_SUCCESS)
throw ExaGOError("Error getting MPI rank number");

if (my_rank == 0)
ExaGOLog(EXAGO_LOG_INFO, "{}", "Creating PFlow Functionality Test");
PflowFunctionalityTests test{std::string(argv[1]), comm};
test.run_all_test_cases();
test.print_report();

ExaGOFinalize();
return test.failures();
}
6 changes: 1 addition & 5 deletions tests/functionality/scopflow/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,6 @@ if(EXAGO_INSTALL_TESTS)
${RUNCMD}
$<TARGET_FILE:test_scopflow_functionality>
${CMAKE_CURRENT_SOURCE_DIR}/hiop_cont_pbhiop.toml
-hiop_mem_space
HOST
)

if(EXAGO_ENABLE_IPOPT AND EXAGO_ENABLE_HIOP)
Expand All @@ -103,8 +101,6 @@ if(EXAGO_INSTALL_TESTS)
3
$<TARGET_FILE:test_scopflow_functionality>
${CMAKE_CURRENT_SOURCE_DIR}/hiop_cont_mpi_pbhiop.toml
-hiop_mem_space
HOST
)
exago_add_test(
NAME
Expand Down Expand Up @@ -136,7 +132,7 @@ if(EXAGO_INSTALL_TESTS)
COMMAND
${MPICMD}
"-n"
3
1
$<TARGET_FILE:test_scopflow_functionality>
${CMAKE_CURRENT_SOURCE_DIR}/hiop_serial.toml
)
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/scopflow/hiop_cont_mpi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ network = 'datafiles/case_ACTIVSg200.m'
contingencies = 'datafiles/case_ACTIVSg200.cont'
description = 'case_ACTIVSg200.m with HIOP solver/20 contingencies/run with MPI'
num_contingencies = 20
num_iters = 1
obj_value = 25957.56699172251
num_iters = 2
obj_value = 27557.524961865754

[[testcase]]
network = 'datafiles/case_ACTIVSg200.m'
Expand Down
2 changes: 1 addition & 1 deletion tests/functionality/scopflow/hiop_cont_mpi_pbhiop.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ subproblem_model = 'POWER_BALANCE_HIOP'
subproblem_solver = 'HIOP'
compute_mode = 'CPU'
verbosity_level = 3
hiop_mem_space = 'HOST' #need API implemented for this to work
hiop_mem_space = 'HOST'

[[testcase]]
network = 'datafiles/case_ACTIVSg200.m'
Expand Down
2 changes: 1 addition & 1 deletion tests/functionality/scopflow/hiop_cont_pbhiop.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ compute_mode = 'CPU'
enable_powerimbalance_variables = true
verbosity_level = 3
description = "No Description"
hiop_mem_space = 'HOST' #need API implemented for this to work
hiop_mem_space = 'HOST'

[[testcase]]
network = 'datafiles/case9/case9mod.m'
Expand Down
4 changes: 2 additions & 2 deletions tests/functionality/scopflow/hiop_serial.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ contingencies = 'datafiles/case9/case9.cont'
description = 'case9mod.m with HIOP solver/9 contingencies'
num_contingencies = -1
num_iters = 1
obj_value = 4072.4623362595667
obj_value = 4144.460442911344

[[testcase]]
network = 'datafiles/case_ACTIVSg200.m'
contingencies = 'datafiles/case_ACTIVSg200.cont'
description = 'case_ACTIVSg200.m with HIOP solver/20 contingencies'
num_contingencies = 20
num_iters = -1
obj_value = 25957.56759147379
obj_value = 27557.524963989952

[[testcase]]
network = 'datafiles/case9/case9mod.m'
Expand Down
70 changes: 43 additions & 27 deletions tests/functionality/scopflow/selfcheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,39 @@ struct ScopflowFunctionalityTestParameters {
MPI_Comm comm = MPI_COMM_WORLD;

/* Parameters required to set up and test a SCOPFlow */
std::string solver = "";
std::string model = "";
std::string solver = SCOPFLOWOptions::solver.default_value;
std::string model = SCOPFLOWOptions::model.default_value;
std::string network = "";
std::string contingencies = "";
std::string pload = "";
std::string qload = "";
std::string windgen = "";
std::string description = "";
int num_contingencies;
double tolerance;
int num_contingencies = 0;
double tolerance = SCOPFLOWOptions::tolerance.default_value;
double warning_tolerance = 0.01;
int iter_range = 0;
double duration;
double dT;
int mode;
bool multiperiod;
double duration = SCOPFLOWOptions::duration.default_value;
double dT = SCOPFLOWOptions::dT.default_value;
int mode = SCOPFLOWOptions::mode.default_value;
bool multiperiod = SCOPFLOWOptions::enable_multiperiod.default_value;

/* Parameters used to modify underlying opflow */
std::string opflow_initialization_string;
std::string opflow_initialization_string =
OPFLOWOptions::initialization.default_value;
int opflow_initialization;
std::string opflow_genbusvoltage_string;
std::string opflow_genbusvoltage_string =
OPFLOWOptions::genbusvoltage.default_value;
int opflow_genbusvoltage;
std::string subproblem_solver;
std::string subproblem_model;
bool enable_powerimbalance_variables;
bool ignore_lineflow_constraints;
int verbosity_level;
std::string subproblem_solver = OPFLOWOptions::solver.default_value;
std::string subproblem_model = OPFLOWOptions::model.default_value;
bool enable_powerimbalance_variables =
OPFLOWOptions::include_powerimbalance_variables.default_value;
bool ignore_lineflow_constraints =
OPFLOWOptions::ignore_lineflow_constraints.default_value;
int verbosity_level = 3;
std::string mem_space = "DEFAULT";
std::string compute_mode;
std::string compute_mode = "cpu";

/* Parameters used to determine success or failure of functionality test */
int expected_num_iters;
Expand Down Expand Up @@ -104,17 +108,25 @@ struct ScopflowFunctionalityTestParameters {

struct ScopflowFunctionalityTests
: public FunctionalityTestContext<ScopflowFunctionalityTestParameters> {
ScopflowFunctionalityTests(std::string testsuite_filename,
int logging_verbosity = EXAGO_LOG_INFO)
: FunctionalityTestContext(testsuite_filename, logging_verbosity) {}

using Params = ScopflowFunctionalityTestParameters;
MPI_Comm comm;
int nprocs;

ScopflowFunctionalityTests(std::string testsuite_filename, MPI_Comm comm,
int logging_verbosity = EXAGO_LOG_INFO)
: FunctionalityTestContext(testsuite_filename, comm, logging_verbosity),
comm{comm} {
nprocs = FunctionalityTestContext::nprocs;
}

void
ensure_options_are_consistent(toml::value testcase,
toml::value presets = toml::value{}) override {

auto ensure_option_available = [&](const std::string &opt) {
bool is_available = testcase.contains(opt) || presets.contains(opt);
if (!is_available) {
if (is_true_somewhere(!is_available, comm)) {
std::stringstream errs;
errs << "SCOPFLOW Test suite expected option '" << opt
<< "' to be available, but it was not found in this testsuite"
Expand Down Expand Up @@ -191,14 +203,11 @@ struct ScopflowFunctionalityTests
void run_test_case(Params &params) override {
PetscErrorCode ierr;
SCOPFLOW scopflow;
int rank;

MPI_Comm_rank(PETSC_COMM_WORLD, &rank);
int rank = FunctionalityTestContext::rank;

if (rank == 0) {
if (rank == 0)
std::cout << "Test Description: " << params.description << std::endl;
}
ierr = SCOPFLOWCreate(params.comm, &scopflow);
ierr = SCOPFLOWCreate(comm, &scopflow);
ExaGOCheckError(ierr);

ierr = SCOPFLOWSetTolerance(scopflow, params.tolerance);
Expand Down Expand Up @@ -429,7 +438,14 @@ int main(int argc, char **argv) {
ExaGOCheckError(ierr);
ExaGOLog(EXAGO_LOG_INFO, "{}", "Creating SCOPFlow Functionality Test");

ScopflowFunctionalityTests test{std::string(argv[1])};
int my_rank;
auto err = MPI_Comm_rank(comm, &my_rank);
if (err != MPI_SUCCESS)
throw ExaGOError("Error getting MPI rank number");

if (my_rank == 0)
ExaGOLog(EXAGO_LOG_INFO, "{}", "Creating SCOPFLOW Functionality Test");
ScopflowFunctionalityTests test{std::string(argv[1]), comm};
test.run_all_test_cases();
test.print_report();
std::string filename = test.set_file_name(argv[1]);
Expand Down
Loading

0 comments on commit f19b82f

Please sign in to comment.