Last change
on this file since 490 was
490,
checked in by mhnguyen, 10 years ago
|
Implementing print output in seperate files
+) Add an option to write information into standard output or into files,
each of which is created by a process
+) Add a new file for global data (constant, value macro, etc)
+) Do a minor change in how to generate doxygen
Test
+) On Curie, with two modes: only client (connected) and client-server
+) All tests passed, each client prints out its info in a seperate file
|
File size:
1.4 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 | |
---|
8 | namespace xios |
---|
9 | { |
---|
10 | class CServer |
---|
11 | { |
---|
12 | public: |
---|
13 | |
---|
14 | static void initialize(void) ; |
---|
15 | static void finalize(void) ; |
---|
16 | static void eventLoop(void) ; |
---|
17 | static void contextEventLoop(void) ; |
---|
18 | static void listenContext(void) ; |
---|
19 | static void listenFinalize(void) ; |
---|
20 | static void recvContextMessage(void* buff,int count) ; |
---|
21 | static void listenRootContext(void) ; |
---|
22 | static void listenRootFinalize(void) ; |
---|
23 | static void registerContext(void* buff,int count, int leaderRank=0) ; |
---|
24 | |
---|
25 | static MPI_Comm intraComm ; |
---|
26 | static list<MPI_Comm> interComm ; |
---|
27 | |
---|
28 | struct contextMessage |
---|
29 | { |
---|
30 | int nbRecv ; |
---|
31 | int leaderRank ; |
---|
32 | } ; |
---|
33 | |
---|
34 | static bool isRoot ; |
---|
35 | |
---|
36 | static map<string,CContext*> contextList ; |
---|
37 | static bool finished ; |
---|
38 | static bool is_MPI_Initialized ; |
---|
39 | |
---|
40 | public: |
---|
41 | //! Get rank of the current process |
---|
42 | static int getRank(); |
---|
43 | |
---|
44 | //! Print Information into a file |
---|
45 | static void openInfoStream(const StdString& fileName); |
---|
46 | |
---|
47 | //! Print information to standard output |
---|
48 | static void openInfoStream(); |
---|
49 | |
---|
50 | //! Close Info stream (closing file) |
---|
51 | static void closeInfoStream(); |
---|
52 | |
---|
53 | private: |
---|
54 | static StdOFStream m_infoStream; |
---|
55 | static int rank ; |
---|
56 | } ; |
---|
57 | } |
---|
58 | |
---|
59 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.