Last change
on this file since 2471 was
2209,
checked in by ymipsl, 3 years ago
|
Revisiting registry management and make it working.
YM
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
|
File size:
816 bytes
|
Line | |
---|
1 | #include "registry_manager.hpp" |
---|
2 | #include "cxios.hpp" |
---|
3 | |
---|
4 | namespace xios |
---|
5 | { |
---|
6 | CRegistryManager::CRegistryManager(bool isXiosServer) |
---|
7 | { |
---|
8 | |
---|
9 | int commRank ; |
---|
10 | xiosComm_ = CXios::getXiosComm() ; |
---|
11 | MPI_Comm_rank(xiosComm_, &commRank) ; |
---|
12 | managerGlobalLeader_ = 0 ; |
---|
13 | if (commRank==managerGlobalLeader_) isManagerGlobalLeader_=true; |
---|
14 | else isManagerGlobalLeader_=false; |
---|
15 | registryIn_ = new CRegistry(xiosComm_) ; |
---|
16 | if (commRank==managerGlobalLeader_) registryIn_->fromFile(registryInFileName) ; |
---|
17 | registryIn_->bcastRegistry() ; |
---|
18 | registryOut_= new CRegistry(xiosComm_) ; |
---|
19 | } |
---|
20 | |
---|
21 | void CRegistryManager::finalize(void) |
---|
22 | { |
---|
23 | delete registryIn_ ; |
---|
24 | registryOut_->hierarchicalGatherRegistry() ; |
---|
25 | if (isManagerGlobalLeader_) registryOut_->toFile(registryOutFileName) ; |
---|
26 | delete registryOut_ ; |
---|
27 | } |
---|
28 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.