Start 'new' environmet here.
More...
#include <environment.hpp>
Start 'new' environmet here.
Definition at line 136 of file environment.hpp.
havoqgt::environment::environment |
( |
int * |
argc, |
|
|
char *** |
argv |
|
) |
| |
|
inline |
Definition at line 138 of file environment.hpp.
140 MPI_Init(argc, argv);
communicator m_node_offset_comm
MPI_Comm split_node_offset_comm(MPI_Comm world_comm, MPI_Comm node_local_comm)
communicator m_node_local_comm
MPI_Comm split_node_local_comm(MPI_Comm world_comm)
communicator m_world_comm
havoqgt::environment::~environment |
( |
| ) |
|
|
inline |
bool havoqgt::environment::is_node_mapping_block |
( |
MPI_Comm |
world_comm, |
|
|
MPI_Comm |
node_local_comm |
|
) |
| |
|
inlineprivate |
Definition at line 219 of file environment.hpp.
221 int world_rank, world_size, node_local_rank, node_local_size;
const communicator & world_comm() const
const communicator & node_local_comm() const
bool havoqgt::environment::is_node_mapping_round_robin |
( |
MPI_Comm |
world_comm, |
|
|
MPI_Comm |
node_local_comm |
|
) |
| |
|
inlineprivate |
const communicator& havoqgt::environment::node_local_comm |
( |
| ) |
const |
|
inline |
const communicator& havoqgt::environment::node_offset_comm |
( |
| ) |
const |
|
inline |
MPI_Comm havoqgt::environment::split_node_local_comm |
( |
MPI_Comm |
world_comm | ) |
|
|
inlineprivate |
Definition at line 161 of file environment.hpp.
168 char* cnodeid = NULL;
170 gethostname(chostname, 256);
172 color = boost::lexical_cast<
int>(cnodeid);
173 }
else if(chostname) {
174 std::string shostname(chostname);
175 std::hash<std::string> hasher;
176 color = hasher(shostname);
177 if(color < 0) color *= -1;
181 int ret = MPI_Comm_split(
world_comm, color, key, &to_return);
183 int node_local_rank, node_local_size;
184 MPI_Comm_rank(to_return, &node_local_rank);
185 MPI_Comm_size(to_return, &node_local_size);
187 if(rank < node_local_size)
189 if(rank != node_local_rank) {
190 std::cerr <<
"ERROR: Only blocked task mapping is supported" << std::endl; exit(-1);
const communicator & world_comm() const
MPI_Comm havoqgt::environment::split_node_offset_comm |
( |
MPI_Comm |
world_comm, |
|
|
MPI_Comm |
node_local_comm |
|
) |
| |
|
inlineprivate |
Definition at line 199 of file environment.hpp.
202 int world_rank, node_local_rank;
206 int color = node_local_rank;
207 int key = world_rank;
209 int ret = MPI_Comm_split(
world_comm, color, key, &to_return);
const communicator & world_comm() const
const communicator & node_local_comm() const
const communicator& havoqgt::environment::world_comm |
( |
| ) |
const |
|
inline |
The documentation for this class was generated from the following file: