Last change
on this file since 1132 was
1129,
checked in by mhnguyen, 7 years ago
|
Updating two-level server.
Each client now can play the role of server: It can forward data to other clients or write data like a server.
Each client must combine all data received from other client(s) before forward them or write them on files
+) Correct some bugs of exchange data_index in domain and axis
+) Reorder some functions in context.cpp to make sure that all necessary attributes are available before computing index
+) Add the mapping index for client to write data.
Test
+) On Curie
+) test_client and test_complete
+) Mode:
- Only one level: Correct
- Two levels: Work if using ddt (bug)
+) Only zoom is tested but other transformations should work
+) No reading test
|
File size:
1.2 KB
|
Rev | Line | |
---|
[553] | 1 | /*! |
---|
| 2 | \file distribution.hpp |
---|
| 3 | \author Ha NGUYEN |
---|
| 4 | \since 13 Jan 2015 |
---|
| 5 | \date 09 Feb 2015 |
---|
| 6 | |
---|
| 7 | \brief Index distribution on server side. |
---|
| 8 | */ |
---|
[551] | 9 | #ifndef __XIOS_DISTRIBUTION_HPP__ |
---|
| 10 | #define __XIOS_DISTRIBUTION_HPP__ |
---|
| 11 | |
---|
[591] | 12 | #include "xios_spl.hpp" |
---|
[551] | 13 | #include "array_new.hpp" |
---|
[930] | 14 | #include <boost/unordered_map.hpp> |
---|
[551] | 15 | |
---|
| 16 | namespace xios { |
---|
[553] | 17 | /*! |
---|
| 18 | \class CDistribution |
---|
| 19 | The parent class of CDistributionClient and CDistributionServer, which declares and defines |
---|
| 20 | some basic methods and properties for its children. This class allows its descendants to calculate |
---|
| 21 | distribution of index on client or server side. |
---|
| 22 | */ |
---|
[551] | 23 | class CDistribution |
---|
| 24 | { |
---|
| 25 | public: |
---|
[930] | 26 | typedef boost::unordered_map<size_t,int> GlobalLocalMap; |
---|
| 27 | |
---|
| 28 | public: |
---|
[551] | 29 | /** Default constructor */ |
---|
[653] | 30 | CDistribution(int rank, int dims, const CArray<size_t,1>& globalIndex = CArray<size_t,1>()); |
---|
[551] | 31 | |
---|
| 32 | /** Default destructor */ |
---|
| 33 | virtual ~CDistribution(); |
---|
| 34 | |
---|
[553] | 35 | int getDims() const; //! Get dimension size |
---|
| 36 | int getRank() const; //! Get rank of current process |
---|
[1129] | 37 | const CArray<size_t,1>& getGlobalIndex() const; |
---|
| 38 | |
---|
[551] | 39 | protected: |
---|
[887] | 40 | virtual void createGlobalIndex() {}; |
---|
| 41 | |
---|
[551] | 42 | protected: |
---|
[653] | 43 | CArray<size_t,1> globalIndex_; |
---|
[551] | 44 | int dims_; |
---|
| 45 | int rank_; |
---|
| 46 | }; |
---|
| 47 | |
---|
| 48 | } // namespace xios |
---|
| 49 | #endif // __XIOS_DISTRIBUTION_HPP__ |
---|
Note: See
TracBrowser
for help on using the repository browser.