summaryrefslogtreecommitdiffstats
path: root/libraries/scafacos/scafacos-1.0.1.fix.diff
blob: 1307e4d8417d3f8be493970deff1f2b37d568ad5 (plain)
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
--- ./lib/fmm/src/mp_wrapper.f90 
+++ ./lib/fmm/src/mp_wrapper.f90
index c78178b..6a3c403 100644
--- a/lib/fmm/src/mp_wrapper.f90
+++ b/lib/fmm/src/mp_wrapper.f90
@@ -491,7 +491,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
-	
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    integer(kind=8)		:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 		elem_tmp = 1
 		
 		call mpi_allreduce(MPI_IN_PLACE,dst,elem_tmp,MPI_INTEGER8,op,comm,ierr)
@@ -510,6 +515,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    integer(kind=8), dimension(*) :: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		elem_tmp = elem
 		
@@ -528,6 +539,12 @@ implicit none
 	integer(MyMPI_Comm) 	:: comm
 	integer(MyMPI_Errorcode):: ierr,ierr2
 	integer(MyMPI_Entries)	:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=4)		:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		elem_tmp = 1
 		
@@ -547,6 +564,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=4), dimension(*)	:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		elem_tmp = elem
 		
@@ -566,6 +589,12 @@ implicit none
         integer(MyMPI_Comm)             :: comm
         integer(MyMPI_Errorcode)        :: ierr,ierr2
         integer(MyMPI_Entries)          :: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=4), dimension(*)	:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
         
                 lo = lbound(dst,1)
                 hi = ubound(dst,1)
@@ -586,6 +615,12 @@ implicit none
 	integer(MyMPI_Comm) 	:: comm
 	integer(MyMPI_Errorcode):: ierr,ierr2
 	integer(MyMPI_Entries)	:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=8)		:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		elem_tmp = 1
 		
@@ -605,6 +640,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=8), dimension(*)	:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		elem_tmp = elem
 		
@@ -624,6 +665,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allreduce(send,recv,num,rtype,rop,rcomm,rerr)
+	    real(kind=8), dimension(*)	:: recv
+	    integer(kind=4)		:: send, num, rop, rtype, rcomm, rerr
+	  end subroutine mpi_allreduce
+	end interface
 	
 		lo = lbound(dst,1)
 		hi = ubound(dst,1)
@@ -648,6 +695,12 @@ implicit none
 	integer(MyMPI_Comm) 	:: comm
 	integer(MyMPI_Errorcode):: ierr,ierr2
 	integer(MyMPI_Entries)	:: elem_tmp
+	interface
+	  subroutine mpi_allgather(send,snum,stype,recv,rnum,rtype,gcomm,gerr)
+	    byte, dimension(*)	:: recv
+	    integer(kind=4)		:: send, snum, rnum, stype, rtype, gcomm, gerr
+	  end subroutine mpi_allgather
+	end interface
 	
 		lo = lbound(dst,1)
 		hi = ubound(dst,1)	
@@ -668,6 +721,12 @@ implicit none
 	integer(MyMPI_Comm) 	:: comm
 	integer(MyMPI_Errorcode):: ierr,ierr2
 	integer(MyMPI_Entries)	:: elem_tmp
+	interface
+	  subroutine mpi_allgather(send,snum,stype,recv,rnum,rtype,gcomm,gerr)
+	    byte, dimension(*)	:: recv
+	    integer(kind=4)		:: send, snum, rnum, stype, rtype, gcomm, gerr
+	  end subroutine mpi_allgather
+	end interface
 	
 		lo1 = lbound(dst,1)
 		hi1 = ubound(dst,1)
@@ -690,6 +749,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allgather(send,snum,stype,recv,rnum,rtype,gcomm,gerr)
+	    real(kind=4), dimension(*)	:: recv
+	    integer(kind=4)		:: send, snum, rnum, stype, rtype, gcomm, gerr
+	  end subroutine mpi_allgather
+	end interface
 	
 		elem_tmp = elem
 		
@@ -708,6 +773,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allgather(send,snum,stype,recv,rnum,rtype,gcomm,gerr)
+	    integer(kind=8), dimension(*)	:: recv
+	    integer(kind=4)		:: send, snum, rnum, stype, rtype, gcomm, gerr
+	  end subroutine mpi_allgather
+	end interface
 	
 		elem_tmp = elem
 		
@@ -726,6 +797,12 @@ implicit none
 	integer(MyMPI_Comm) 		:: comm
 	integer(MyMPI_Errorcode)	:: ierr,ierr2
 	integer(MyMPI_Entries)		:: elem_tmp
+	interface
+	  subroutine mpi_allgather(send,snum,stype,recv,rnum,rtype,gcomm,gerr)
+	    integer(kind=8), dimension(*)	:: recv
+	    integer(kind=4)		:: send, snum, rnum, stype, rtype, gcomm, gerr
+	  end subroutine mpi_allgather
+	end interface
 	
 		lo = lbound(dst,1)
 		hi = ubound(dst,1)	
diff --git a/src/fcs_fmm.c b/src/fcs_fmm.c
index 37acb67..10bbd10 100644
--- a/src/fcs_fmm.c
+++ b/src/fcs_fmm.c
@@ -430,7 +430,7 @@ FCSResult fcs_fmm_tune(FCS handle, fcs_int local_particles, fcs_float *positions
   return FCS_RESULT_SUCCESS;
 }
 
-int fcs_mpi_fmm_sort_front_part, fcs_mpi_fmm_sort_back_part, fcs_mpi_fmm_sort_front_merge_presorted;
+extern int fcs_mpi_fmm_sort_front_part, fcs_mpi_fmm_sort_back_part, fcs_mpi_fmm_sort_front_merge_presorted;
 
 /* internal fmm-specific run function */
 FCSResult fcs_fmm_run(FCS handle, fcs_int local_particles,