1 | // XmlIOServer |
---|
2 | #include "xmlioserver.hpp" |
---|
3 | |
---|
4 | #include "attribute_template_impl.hpp" |
---|
5 | #include "group_template_impl.hpp" |
---|
6 | |
---|
7 | #include "client.hpp" |
---|
8 | #include "server.hpp" |
---|
9 | #include "oasis_cinterface.hpp" |
---|
10 | #include <string> |
---|
11 | #include <iostream> |
---|
12 | |
---|
13 | #include <unistd.h> |
---|
14 | |
---|
15 | |
---|
16 | |
---|
17 | // Point d'entrée du programme principal |
---|
18 | |
---|
19 | int main (int argc, char ** argv, char ** UNUSED (env)) |
---|
20 | { |
---|
21 | try |
---|
22 | { |
---|
23 | MPI_Comm comm_client=MPI_COMM_NULL, comm_client_server=MPI_COMM_NULL, comm_server=MPI_COMM_NULL, comm_parent=MPI_COMM_NULL; |
---|
24 | // sleep(60) ; |
---|
25 | CTreeManager::ParseFile("iodef.xml"); |
---|
26 | |
---|
27 | CTreeManager::SetCurrentContextId(StdString("xios")); |
---|
28 | boost::shared_ptr<CVariable> var = CObjectFactory::GetObject<CVariable>("buffer_client_size"); |
---|
29 | |
---|
30 | // oasis_init(std::string("ionemo")) ; |
---|
31 | // oasis_get_intracomm(comm_parent,std::string("oceanx")) ; |
---|
32 | CXIOSManager::Initialise(CXIOSManager::CLIENT_SERVER, &argc, &argv); |
---|
33 | |
---|
34 | CMPIManager::DispatchClient(true, comm_client, comm_client_server, comm_server, comm_parent); |
---|
35 | CXIOSManager::RunServer("Nemo", comm_client_server, comm_server); |
---|
36 | CTreeManager::SetCurrentContextId(StdString("nemo")); |
---|
37 | CServer::CreateServer(comm_client_server)->run(); |
---|
38 | CXIOSManager::Finalize (); |
---|
39 | |
---|
40 | } |
---|
41 | catch (CException & exc) |
---|
42 | { |
---|
43 | std::cerr << exc.getMessage () << std::endl; |
---|
44 | CMPIManager::Finalize (); |
---|
45 | return (EXIT_FAILURE); |
---|
46 | } |
---|
47 | return (EXIT_SUCCESS); |
---|
48 | } |
---|
49 | |
---|