Last change
on this file since 312 was
311,
checked in by ymipsl, 13 years ago
|
CXios::getin has now default parameters
YM
|
-
Property svn:eol-style set to
native
|
File size:
1.3 KB
|
Rev | Line | |
---|
[300] | 1 | |
---|
| 2 | #include "xmlioserver_spl.hpp" |
---|
| 3 | #include "cxios.hpp" |
---|
| 4 | #include "client_ym.hpp" |
---|
| 5 | #include "server_ym.hpp" |
---|
| 6 | #include "tree_manager.hpp" |
---|
| 7 | #include <boost/functional/hash.hpp> |
---|
| 8 | #include <mpi.h> |
---|
| 9 | |
---|
| 10 | namespace xmlioserver |
---|
| 11 | { |
---|
| 12 | string CXios::rootFile="./iodef.xml" ; |
---|
| 13 | string CXios::xiosCodeId="xios.x" ; |
---|
| 14 | |
---|
| 15 | bool CXios::isClient ; |
---|
| 16 | bool CXios::isServer ; |
---|
| 17 | MPI_Comm CXios::globalComm ; |
---|
| 18 | bool CXios::usingOasis ; |
---|
| 19 | bool CXios::usingServer ; |
---|
| 20 | |
---|
| 21 | void CXios::initialize() |
---|
| 22 | { |
---|
| 23 | tree::CTreeManager::ParseFile(rootFile); |
---|
[311] | 24 | usingServer=getin<bool>("using_server",false) ; |
---|
| 25 | usingOasis=getin<bool>("using_oasis",false) ; |
---|
| 26 | info.setLevel(getin<int>("info_level",0)) ; |
---|
[300] | 27 | globalComm=MPI_COMM_WORLD ; |
---|
| 28 | } |
---|
| 29 | |
---|
| 30 | |
---|
| 31 | void CXios::initClientSide(const string& codeId, MPI_Comm& localComm, MPI_Comm& returnComm) |
---|
| 32 | { |
---|
| 33 | |
---|
| 34 | initialize() ; |
---|
| 35 | |
---|
| 36 | isClient=true; |
---|
| 37 | if (usingServer) isServer=false; |
---|
| 38 | else isServer=true ; |
---|
| 39 | |
---|
| 40 | ym::CClient::initialize(codeId,localComm,returnComm) ; |
---|
| 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | void CXios::clientFinalize(void) |
---|
| 45 | { |
---|
| 46 | ym::CClient::finalize() ; |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | void CXios::initServerSide(void) |
---|
| 51 | { |
---|
| 52 | initialize(); |
---|
| 53 | |
---|
| 54 | if (!usingServer) ERROR("void CXios::initServerSide(void)",<<"using_server is set to <false> and server initialization is called") ; |
---|
| 55 | isClient=true; |
---|
| 56 | isServer=false ; |
---|
| 57 | |
---|
| 58 | ym::CServer::initialize() ; |
---|
| 59 | } |
---|
| 60 | |
---|
| 61 | |
---|
| 62 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.