Last change
on this file since 1986 was
1349,
checked in by ymipsl, 7 years ago
|
New method to distribute file on server 2 : memory consumption of grids is now taking into account.
This new method can be activated using a specific variable from xios context :
<variable id="server2_dist_file_memory" type="bool">true_or_false</variable>
YM
|
File size:
906 bytes
|
Line | |
---|
1 | #ifndef __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__ |
---|
2 | #define __XIOS_DISTRIBUTE_FILE_SERVER2_HPP__ |
---|
3 | |
---|
4 | #include <cstddef> |
---|
5 | #include <string> |
---|
6 | |
---|
7 | namespace xios |
---|
8 | { |
---|
9 | |
---|
10 | |
---|
11 | struct SDistServer ; |
---|
12 | struct SDistFiles ; |
---|
13 | struct SDistGrid ; |
---|
14 | |
---|
15 | struct SDistFile |
---|
16 | { |
---|
17 | SDistServer* servers_ ; |
---|
18 | std::string id_; |
---|
19 | |
---|
20 | double bandwith_ ; |
---|
21 | int nbGrids_ ; |
---|
22 | int* assignedGrid_ ; |
---|
23 | int assignedServer_ ; |
---|
24 | |
---|
25 | } ; |
---|
26 | |
---|
27 | struct SDistServer |
---|
28 | { |
---|
29 | SDistFile* files_ ; |
---|
30 | SDistGrid* grids_ ; |
---|
31 | |
---|
32 | double energy_ ; |
---|
33 | double bandwith_ ; |
---|
34 | double memory_ ; |
---|
35 | int nMaxGrid_ ; |
---|
36 | int* assignedGrid_ ; |
---|
37 | int num_ ; |
---|
38 | |
---|
39 | void initialize(int num, int nMaxGrid, SDistGrid* grids, int nMaxFile, SDistFile* files) ; |
---|
40 | void finalize(void) ; |
---|
41 | |
---|
42 | double addFile(int numFile) ; |
---|
43 | double removeFile(int numFile) ; |
---|
44 | } ; |
---|
45 | |
---|
46 | struct SDistGrid |
---|
47 | { |
---|
48 | double size_ ; |
---|
49 | } ; |
---|
50 | |
---|
51 | void distributeFileOverServer2(int nbServers, int nGrids, SDistGrid* grids, int nFiles, SDistFile* files); |
---|
52 | } |
---|
53 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.