18
18
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
20
/// =========================================================================
21
# include "rheolef/parallel.h"
21
# include "rheolef/distributed.h"
22
22
# include "rheolef/array.h"
23
23
using namespace rheolef;
24
24
using namespace std;
25
int main(int argc, char**argv)
27
environment parallel(argc, argv);
25
int main(int argc, char**argv) {
26
environment distributed(argc, argv);
30
warning_macro ("CSTOR...");
31
28
array<Float> x(n,0.0);
32
warning_macro ("CSTOR done");
34
size_t first = x.first_index();
35
size_t last = x.last_index();
36
warning_macro ("ADDING...");
29
size_t first = x.ownership().first_index();
30
size_t last = x.ownership().last_index();
37
31
for (size_t i_global = 0; i_global < n; i_global++) {
38
32
if (i_global >= first && i_global < last) {
39
x.set (i_global, 1000+i_global+0.5);
33
x.dis_entry (i_global) = 1000+i_global+0.5;
42
warning_macro ("ADDING done");
43
warning_macro ("PRINTING...");
44
pcout << x.par_size() << endl
36
dcout << x.dis_size() << endl
46
warning_macro ("PRINTING done");