Skip to content

Commit 1655828

Browse files
committed
FEAT: new communicator for ensemble
1 parent fe71bab commit 1655828

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/init_parallel.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ std::string cMember;
2222
std::string cGrid;
2323

2424
MPI_Comm aether_comm;
25+
MPI_Comm aether_member_comm;
2526

2627
bool init_parallel(Quadtree &quadtree, Quadtree &quadtree_ion) {
2728

@@ -71,6 +72,11 @@ bool init_parallel(Quadtree &quadtree, Quadtree &quadtree_ion) {
7172
iMember = iProc / nGrids;
7273
iGrid = iProc % nGrids;
7374

75+
// Need a communicator for each ensemble member, this allows
76+
// communication between all blocks in one ensemble member without
77+
// the others getting the messages:
78+
MPI_Comm_split(aether_comm, iMember, iGrid, &aether_member_comm);
79+
7480
if (report.test_verbose(2))
7581
std::cout << "iProc : " << iProc
7682
<< "; iMember : " << iMember

0 commit comments

Comments
 (0)