-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathparallel.h
112 lines (90 loc) · 2.39 KB
/
parallel.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef parallel_h
#define parallel_h
!//***************************************************************/
#define _Np 1
#define _CPUTIME
!/***************************************************************/
!/*-------------------------------------------------------------*/
#if _Np != 1
#define _MPI
#endif
!/*-------------------------------------------------------------*/
#ifndef _MPI
!/*-------------------------------------------------------------*/
#define _loop_mn_vars \
integer :: m,n,mm,nn
#define _loop_kmn_vars \
integer :: m,mm,n,nn,k,k1,k2,k3
#define _loop_mn_begin \
do n = 0, i_NN1; \
nn=n; \
do m = 0, i_M1
#define _loop_phy_begin \
do m = 0, i_3M-1; \
mm=m; \
do n = 0, i_3N-1
#define _loop_kmn_begin \
do n = 0, i_NN1 ; \
nn = n; \
do m = 0,i_M1; \
do k = 1,i_K
#define _loop_k0mn_begin \
do n = 0, i_NN1;\
nn = n;\
do m = 0,i_M1;\
do k = 0,i_K0-1;\
k1 = k + 1;\
k2 = k + i_K0
#define _loop_kmn_end \
end do; \
end do; \
end do
#define _loop_mn_end \
end do; \
end do
!/*-------------------------------------------------------------*/
#else /* def _MPI */
!/*-------------------------------------------------------------*/
#define _loop_mn_vars \
integer :: pH0,pH1,m,n,mm,nn
#define _loop_mn_begin \
pH0=var_N%pH0 ; \
pH1=var_N%pH1 ; \
do n = 0, pH1 ; \
nn = n + pH0; \
do m = 0,i_M1
#define _loop_phy_begin \
pH0=var_M%pH0 ; \
pH1=var_M%pH1 ; \
do m = 0, pH1 ; \
mm = m + pH0; \
do n = 0,i_3N-1
#define _loop_mn_end \
end do; \
end do
#define _loop_kmn_vars \
integer :: pH0,pH1,m,mm,n,nn,k,k1,k2,k3
#define _loop_kmn_begin \
pH0=var_N%pH0 ; \
pH1=var_N%pH1 ; \
do n = 0, pH1 ; \
nn = n + pH0; \
do m = 0,i_M1; \
do k = 1,i_K
#define _loop_k0mn_begin \
pH0=var_N%pH0 ; \
pH1=var_N%pH1 ; \
do n = 0, pH1 ; \
nn = n + pH0; \
do m = 0,i_M1; \
do k = 0,i_K0-1; \
k1 = k + 1; \
k2 = k + i_K0
#define _loop_kmn_end \
end do; \
end do; \
end do
!/*-------------------------------------------------------------*/
#endif /* def _MPI */
!/*-------------------------------------------------------------*/
#endif /* ndef parallel_h */