Peano 4
Loading...
Searching...
No Matches
multicore.cpp
Go to the documentation of this file.
1#include "multicore.h"
2#include "tarch/mpi/Rank.h"
4
5#ifdef UseSmartMPI
6#include "smartmpi.h"
7#include "topology/topologies.h"
8#endif
9
10
12 #ifdef UseSmartMPI
13 using namespace smartmpi::topology;
14 typedef UseSmartMPI MyTopology;
15 smartmpi::topology::Topology* smartMPITopology = new MyTopology(
16 tarch::mpi::Rank::getInstance().getCommunicator()
17 );
18 smartmpi::init( smartMPITopology );
19
20 smartmpi::appendToSchedulerChain( "HardcodedMigrationScheduler" );
21
22 tarch::mpi::Rank::getInstance().setCommunicator( smartMPITopology->computeNodeOrSmartServerCommunicator );
23 #endif
24}
25
26
28 #ifdef UseSmartMPI
29 smartmpi::shutdown();
30 #endif
31}
32
void setCommunicator(MPI_Comm communicator, bool recomputeRankAndWorld=true)
Set communicator to be used by Peano.
Definition Rank.cpp:575
static Rank & getInstance()
This operation returns the singleton instance.
Definition Rank.cpp:538
void shutdownSmartMPI()
Definition multicore.cpp:27
void initSmartMPI()
Switch on SmartMPI.
Definition multicore.cpp:11