Skip to content

Commit b459268

Browse files
committed
examples: mpi: a few beautifications
1 parent ff721cb commit b459268

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

doc/source/supercomputers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,6 @@ There are a few steps one has to complete before using _PFASST++_ on _JUQUEEN_.
6464
#@bg_size = 1
6565
#@bg_connectivity = TORUS
6666
#@queue
67-
runjob --np 32 --ranks-per-node 32 \
68-
--exe <PATH_TO_BUILD_DIR>/examples/advection_diffusion/mpi_pfasst \
69-
--args '-q'
67+
runjob --np 32 --ranks-per-node 32 : \
68+
<PATH_TO_BUILD_DIR>/examples/advection_diffusion/mpi_pfasst \
69+
-q --tend 0.64 --dt 0.01 --num_iter 8

examples/advection_diffusion/mpi_pfasst.cpp

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ using namespace std;
1616
#include <fftw3.h>
1717

1818
#include <pfasst.hpp>
19+
#include <pfasst/logging.hpp>
1920
#include <pfasst/controller/pfasst.hpp>
2021
#include <pfasst/mpi_communicator.hpp>
2122
#include <pfasst/encap/automagic.hpp>
@@ -45,6 +46,13 @@ namespace pfasst
4546
const size_t ndofs_f, const size_t ndofs_c,
4647
const size_t nnodes_f, const size_t nnodes_c)
4748
{
49+
CLOG(INFO, "Advec") << "abs_res_tol: " << abs_res_tol << ", "
50+
<< "rel_res_tol: " << rel_res_tol << ", "
51+
<< "niter: " << niters << ", "
52+
<< "nsteps: " << nsteps << ", "
53+
<< "dt: " << dt << ", "
54+
<< "ndofs (f-c): " << ndofs_f << "-" << ndofs_c << ", "
55+
<< "nnodes (f-c): " << nnodes_f << "-" << nnodes_c;
4856
vector<pair<size_t, quadrature::QuadratureType>> nodes = {
4957
{ nnodes_c, quadrature::QuadratureType::GaussLobatto },
5058
{ nnodes_f, quadrature::QuadratureType::GaussLobatto }
@@ -107,7 +115,9 @@ int main(int argc, char** argv)
107115
const size_t nnodes_c = (nnodes_f + 1) / 2;
108116
const size_t ndofs_c = ndofs_f / 2;
109117

110-
pfasst::examples::advection_diffusion::run_mpi_pfasst(abs_res_tol, rel_res_tol, niters, nsteps, dt, ndofs_f, ndofs_c, nnodes_f, nnodes_c);
118+
pfasst::examples::advection_diffusion::run_mpi_pfasst(abs_res_tol, rel_res_tol,
119+
niters, nsteps, dt,
120+
ndofs_f, ndofs_c, nnodes_f, nnodes_c);
111121
fftw_cleanup();
112122
MPI_Finalize();
113123
}

0 commit comments

Comments
 (0)