source: XIOS/trunk/src/server.hpp @ 516

Last change on this file since 516 was 501, checked in by ymipsl, 10 years ago

Add licence copyright to all file ond directory src using the command :
svn propset -R copyright -F header_licence src

XIOS is now officialy under CeCILL licence

YM

  • Property copyright set to
    Software name : XIOS (Xml I/O Server)
    http://forge.ipsl.jussieu.fr/ioserver
    Creation date : January 2009
    Licence : CeCCIL version2
    see license file in root directory : Licence_CeCILL_V2-en.txt
    or http://www.cecill.info/licences/Licence_CeCILL_V2-en.html
    Holder : CEA/LSCE (Laboratoire des Sciences du CLimat et de l'Environnement)
    CNRS/IPSL (Institut Pierre Simon Laplace)
    Project Manager : Yann Meurdesoif
    yann.meurdesoif@cea.fr
File size: 1.5 KB
Line 
1#ifndef __SERVER_HPP__
2#define __SERVER_HPP__
3
4#include "xmlioserver_spl.hpp"
5#include "context.hpp"
6#include "mpi.hpp"
7#include "event_scheduler.hpp"
8
9namespace xios
10{
11    class CServer
12    {
13       public:
14
15       static void initialize(void) ;
16       static void finalize(void) ;
17       static void eventLoop(void) ;
18       static void contextEventLoop(void) ;
19       static void listenContext(void) ;
20       static void listenFinalize(void) ;
21       static void recvContextMessage(void* buff,int count) ;
22       static void listenRootContext(void) ;
23       static void listenRootFinalize(void) ;
24       static void registerContext(void* buff,int count, int leaderRank=0) ;
25
26       static MPI_Comm intraComm ;
27       static list<MPI_Comm> interComm ;
28       static CEventScheduler* eventScheduler ;
29
30       struct contextMessage
31       {
32         int nbRecv ;
33         int leaderRank ;
34       } ;
35
36       static bool isRoot ;
37
38       static map<string,CContext*> contextList ;
39       static bool finished ;
40       static bool is_MPI_Initialized ;
41
42       public:
43         //! Get rank of the current process
44         static int getRank();
45
46        //! Print Information into a file
47        static void openInfoStream(const StdString& fileName);
48
49        //! Print information to standard output
50        static void openInfoStream();
51
52        //! Close Info stream (closing file)
53        static void closeInfoStream();
54
55       private:
56        static StdOFStream m_infoStream;
57        static int rank ;
58    } ;
59}
60
61#endif
Note: See TracBrowser for help on using the repository browser.