Last change
on this file since 1670 was
1661,
checked in by yushan, 5 years ago
|
MARK: branch merged with trunk @1660. Test (test_complete, test_remap) on ADA with IntelMPI and _usingEP/_usingMPI as switch.
|
File size:
1.1 KB
|
Rev | Line | |
---|
[721] | 1 | /*! |
---|
| 2 | \file policy.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 06 Oct 2015 |
---|
| 5 | \date 06 Oct 2015 |
---|
| 6 | |
---|
| 7 | \brief Some useful policies for templated classes |
---|
| 8 | */ |
---|
| 9 | |
---|
| 10 | #ifndef __XIOS_POLICY_HPP__ |
---|
| 11 | #define __XIOS_POLICY_HPP__ |
---|
| 12 | |
---|
| 13 | #include <vector> |
---|
| 14 | #include "mpi.hpp" |
---|
| 15 | |
---|
| 16 | namespace xios |
---|
| 17 | { |
---|
| 18 | |
---|
[1661] | 19 | |
---|
[833] | 20 | class DivideAdaptiveComm |
---|
| 21 | { |
---|
| 22 | protected: |
---|
[1601] | 23 | DivideAdaptiveComm(const ep_lib::MPI_Comm& mpiComm); |
---|
[833] | 24 | |
---|
| 25 | void computeMPICommLevel(); |
---|
| 26 | const std::vector<int>& getGroupBegin() { return groupBegin_; } |
---|
| 27 | const std::vector<int>& getNbInGroup() { return nbInGroup_; } |
---|
| 28 | const std::vector<std::vector<int> >& getGroupParentsBegin() { return groupParentsBegin_; } |
---|
| 29 | const std::vector<std::vector<int> >& getNbInGroupParents() { return nbInGroupParents_; } |
---|
| 30 | int getNbLevel() { return level_; } |
---|
| 31 | |
---|
| 32 | protected: |
---|
[1601] | 33 | const ep_lib::MPI_Comm& internalComm_; |
---|
[833] | 34 | std::vector<std::vector<int> > groupParentsBegin_; |
---|
| 35 | std::vector<std::vector<int> > nbInGroupParents_; |
---|
| 36 | |
---|
| 37 | int level_; |
---|
| 38 | std::vector<int> groupBegin_; //! Rank beginning of a group |
---|
| 39 | std::vector<int> nbInGroup_; //! Number of process in each group |
---|
| 40 | bool computed_; |
---|
[1661] | 41 | |
---|
| 42 | |
---|
[833] | 43 | }; |
---|
| 44 | |
---|
[721] | 45 | } |
---|
| 46 | |
---|
| 47 | #endif // __XIOS_POLICY_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.