File tree Expand file tree Collapse file tree 2 files changed +3
-15
lines changed
examples/advection_diffusion Expand file tree Collapse file tree 2 files changed +3
-15
lines changed Original file line number Diff line number Diff line change @@ -89,10 +89,10 @@ namespace pfasst
8989#ifndef PFASST_UNIT_TESTING
9090int main (int argc, char ** argv)
9191{
92+ MPI_Init (&argc, &argv);
9293 pfasst::init (argc, argv,
9394 pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper<>::init_opts,
94- pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper<>::init_logs,
95- true );
95+ pfasst::examples::advection_diffusion::AdvectionDiffusionSweeper<>::init_logs);
9696 pfasst::examples::advection_diffusion::run_mpi_pfasst (0.0 );
9797 fftw_cleanup ();
9898 MPI_Finalize ();
Original file line number Diff line number Diff line change @@ -7,29 +7,17 @@ using namespace std;
77#include " pfasst/config.hpp"
88#include " pfasst/logging.hpp"
99
10- #ifdef WITH_MPI
11- #include < mpi.h>
12- #endif
13-
1410
1511namespace pfasst
1612{
1713 inline static void init (int argc, char ** argv,
1814 std::function<void ()> opts = nullptr,
19- std::function<void()> logs = nullptr,
20- bool with_mpi = false)
15+ std::function<void()> logs = nullptr)
2116 {
2217 if (opts) {
2318 opts ();
2419 }
2520 config::init ();
26- if (with_mpi) {
27- #ifdef WITH_MPI
28- MPI_Init (&argc, &argv);
29- #else
30- cerr << " PFASST::init() : 'with_mpi' flag used without enabling MPI" << endl;
31- #endif
32- }
3321 config::read_commandline (argc, argv);
3422 log::start_log (argc, argv);
3523 if (logs) {
You can’t perform that action at this time.
0 commit comments