implementations.controller_classes.controller_MPI module

class controller_MPI(controller_params, description, comm)[source]

Bases: controller

PFASST controller, running parallel version of PFASST in blocks (MG-style)

check_iteration_estimate(comm)[source]

Routine to compute and check error/iteration estimation

Parameters:

comm – time-communicator

default(num_procs)[source]

Default routine to catch wrong status

it_check(comm, num_procs)[source]

Key routine to check for convergence/termination

it_coarse(comm, num_procs)[source]

Coarse sweep

it_down(comm, num_procs)[source]

Go down the hierarchy from finest to coarsest level

it_fine(comm, num_procs)[source]

Fine sweeps

it_up(comm, num_procs)[source]

Prolong corrections up to finest level (parallel)

pfasst(comm, num_procs)[source]

Main function including the stages of SDC, MLSDC and PFASST (the “controller”)

For the workflow of this controller, check out one of our PFASST talks or the pySDC paper

Parameters:
  • comm – communicator

  • num_procs (int) – number of parallel processes

predict(comm, num_procs)[source]

Predictor phase

recv(target, source, tag=None, comm=None)[source]

Receive function

Parameters:
  • target – level which will receive the values

  • source – level which initiated the send

  • tag – identifier to check if this message is really for me

  • comm – communicator

recv_full(comm, level=None, add_to_stats=False)[source]

Function to perform the recv, including bookkeeping and logging

Parameters:
  • comm – the communicator

  • level – the level number

  • add_to_stats – a flag to end recording data in the hooks (defaults to False)

restart_block(size, time, u0, comm)[source]

Helper routine to reset/restart block of (active) steps

Parameters:
  • size – number of active time steps

  • time – current time

  • u0 – initial value to distribute across the steps

  • comm – the communicator

Returns:

block of (all) steps

run(u0, t0, Tend)[source]

Main driver for running the parallel version of SDC, MSSDC, MLSDC and PFASST

Parameters:
  • u0 – initial values

  • t0 – starting time

  • Tend – ending time

Returns:

end values on the finest level stats object containing statistics for each step, each level and each iteration

send_full(comm=None, blocking=False, level=None, add_to_stats=False)[source]

Function to perform the send, including bookkeeping and logging

Parameters:
  • comm – the communicator

  • blocking – flag to indicate that we need blocking communication

  • level – the level number

  • add_to_stats – a flag to end recording data in the hooks (defaults to False)

spread(comm, num_procs)[source]

Spreading phase

wait_with_interrupt(request)[source]

Wrapper for waiting for the completion of a non-blocking communication, can be interrupted

Parameters:

request – request to wait for