Changeset 1661 for XIOS/dev/dev_trunk_omp/src/policy.cpp
- Timestamp:
- 05/15/19 17:19:08 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_trunk_omp/src/policy.cpp
r1646 r1661 16 16 namespace xios 17 17 { 18 ///*! 19 // Calculate MPI communicator for each level of hierarchy. 20 // \param[in] mpiCommRoot MPI communicator of the level 0 (usually communicator of all clients) 21 // \param[in] levels number of level in hierarchy 22 //*/ 23 //void DivideCommByTwo::computeMPICommLevel(const MPI_Comm& mpiCommRoot, int levels) 24 //{ 25 // int nbProc; 26 // MPI_Comm_size(mpiCommRoot,&nbProc); 27 // if (levels > nbProc) levels = std::log10(nbProc) * 3.3219; // log2(x) = log2(10) * log10(x); stupid C++98 28 // else if (1 > levels) levels = 1; 29 // 30 // commLevel_.push_back(mpiCommRoot); 31 // divideMPICommLevel(mpiCommRoot, levels); 32 //} 33 // 34 ///*! 35 // Divide each MPI communicator into sub-communicator. Recursive function 36 // \param [in] mpiCommLevel MPI communicator of current level 37 // \param [in] level current level 38 //*/ 39 //void DivideCommByTwo::divideMPICommLevel(const MPI_Comm& mpiCommLevel, int level) 40 //{ 41 // int clientRank; 42 // MPI_Comm_rank(mpiCommLevel,&clientRank); 43 // 44 // --level; 45 // if (0 < level) 46 // { 47 // int color = clientRank % 2; 48 // commLevel_.push_back(MPI_Comm()); 49 // MPI_Comm_split(mpiCommLevel, color, 0, &(commLevel_.back())); 50 // divideMPICommLevel(commLevel_.back(), level); 51 // } 52 //} 18 53 19 54 20 DivideAdaptiveComm::DivideAdaptiveComm(const MPI_Comm& mpiComm)
Note: See TracChangeset
for help on using the changeset viewer.