File: test_interpolate_parallel.pro

package info (click to toggle)
gnudatalanguage 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 80,368 kB
  • sloc: cpp: 189,797; ansic: 46,721; sh: 677; python: 474; makefile: 146; xml: 69; f90: 28
file content (301 lines) | stat: -rw-r--r-- 18,298 bytes parent folder | download | duplicates (3)
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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
pro test_interpolate_parallel

  niter=500
  oldcpu=!cpu
  initial=oldcpu.tpool_nthreads
  n=2*!cpu.TPOOL_MIN_ELTS
  n2=long(sqrt(n))
  n3=long(n^0.333)
  a=findgen(n)
  b=findgen(n)/n*(n+100)-50 & c=b &d=c
;  help,a,b,c,d
  error=0
                                ;1D
  defsysv,"!GDL",exists=isgdl

  if (isgdl) then begin
     print,'1D nearest'
     t1=tic() & for i=1,niter do resin=interpolate(a,b,/near) & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a,b,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (total(resin-resout) gt 0 ) then error++
  endif
  

  print,'1D linear'
  t1=tic() & for i=1,niter do resin=interpolate(a,b) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a,b) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'1D linear missing'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,miss=-!DPI) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a,b,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'1D cubic'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,cub=-0.345) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do resout=interpolate(a,b,cub=-0.345) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'1D cubic missing'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,cub=-0.345,miss=-!DPI) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a,b,cub=-0.345,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++

                                ;2D
  
  a2=findgen(n2,n2)
  b=findgen(n)/n*(n2+100)-50 & c=b &d=c
  bgrid=findgen(n2)/n2*(n2+100)-50 &cgrid=bgrid
;  help,a2,bgrid,cgrid
  if (isgdl) then begin
     print,' 2D nearest '
     t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,/near)  & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (total(resin-resout) gt 0 ) then error++
     print,' 2D nearest grid '
     t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid,/near)  & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,/grid,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (total(resin-resout) gt 0 ) then error++
  endif

  print,'2D linear'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D linear missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a2,b,c,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D linear grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D linear grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a2,bgrid,cgrid,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++

  print,'2D cubic'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,cubic=-0.345)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c,cubic=-0.345) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D cubic missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,cubic=-0.345,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do   resout=interpolate(a2,b,c,cubic=-0.345,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D cubic grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'2D cubic grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do   resout=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++

;3D
  
  a3=findgen(n3,n3,n3)
  b=findgen(n)/n*(n3+10)-5 & c=b &d=c
  bgrid=findgen(n3)/n3*(n3+100)-50 & cgrid=bgrid & dgrid=cgrid
;  help,a3,b,c,d,bgrid,cgrid,dgrid

  print,'3D linear'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,b,c,d)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a3,b,c,d) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'3D linear missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,b,c,d,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a3,b,c,d,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'3D linear grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,bgrid,cgrid,dgrid,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a3,bgrid,cgrid,dgrid,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++
  print,'3D linear grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,bgrid,cgrid,dgrid,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a3,bgrid,cgrid,dgrid,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (total(resin-resout) gt 0 ) then error++

; complex is equivalent to another dimension (2) so this tests both
; complex and not-single-element arrays (see C++ code)
  a=cindgen(n)
  b=findgen(n)/n*(n+100)-50 & c=b &d=c
;  help,a,b,c,d
  error=0
                                ;1D
  if (isgdl) then begin
     print,' COMPLEX 1D nearest'
     t1=tic() & for i=1,niter do resin=interpolate(a,b,/near) & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a,b,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (real_part(total(resin-resout)) gt 0 ) then error++
  endif
  print,' COMPLEX 1D linear'
  t1=tic() & for i=1,niter do resin=interpolate(a,b) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a,b) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 1D linear missing'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,miss=-!DPI) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a,b,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 1D cubic'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,cub=-0.345) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do resout=interpolate(a,b,cub=-0.345) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 1D cubic missing'
  t1=tic() & for i=1,niter do resin=interpolate(a,b,cub=-0.345,miss=-!DPI) & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a,b,cub=-0.345,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++

                                ;2D
  
  a2=cindgen(n2,n2)
  b=findgen(n)/n*(n2+100)-50 & c=b &d=c
  bgrid=findgen(n2)/n2*(n2+100)-50 &cgrid=bgrid
;  help,a2,bgrid,cgrid
  if (isgdl) then begin
     print,' COMPLEX  2D nearest '
     t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,/near)  & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (real_part(total(resin-resout)) gt 0 ) then error++
     print,' COMPLEX  2D nearest grid '
     t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid,/near)  & t=toc() & in=t-t1.time
     cpu,tpool_nthreads=1
     t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,/grid,/near) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
     cpu,tpool_nthreads=initial
     if (real_part(total(resin-resout)) gt 0 ) then error++
  endif

  print,' COMPLEX 2D linear'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D linear missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a2,b,c,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D linear grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D linear grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a2,bgrid,cgrid,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++

  print,' COMPLEX 2D cubic'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,cubic=-0.345)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,b,c,cubic=-0.345) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D cubic missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,b,c,cubic=-0.345,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do   resout=interpolate(a2,b,c,cubic=-0.345,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D cubic grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 2D cubic grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do   resout=interpolate(a2,bgrid,cgrid,cubic=-0.345,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++

;3D
  
  a3=cindgen(n3,n3,n3)
  b=findgen(n)/n*(n3+10)-5 & c=b &d=c
  bgrid=findgen(n3)/n3*(n3+100)-50 & cgrid=bgrid & dgrid=cgrid
;  help,a3,b,c,d,bgrid,cgrid,dgrid

  print,' COMPLEX 3D linear'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,b,c,d)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a3,b,c,d) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 3D linear missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,b,c,d,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a3,b,c,d,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 3D linear grid'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,bgrid,cgrid,dgrid,/grid)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do     resout=interpolate(a3,bgrid,cgrid,dgrid,/grid) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++
  print,' COMPLEX 3D linear grid missing'
  t1=tic() & for i=1,niter do   resin=interpolate(a3,bgrid,cgrid,dgrid,/grid,miss=-!DPI)  & t=toc() & in=t-t1.time
  cpu,tpool_nthreads=1
  t2=tic() & for i=1,niter do    resout=interpolate(a3,bgrid,cgrid,dgrid,/grid,miss=-!DPI) & t=toc() & out=t-t2.time & s=out/in & print,"time="+strtrim(in,2)+", thread gain: "+strtrim(s,2)+", error counter: "+strtrim(error,2)
  cpu,tpool_nthreads=initial
  if (real_part(total(resin-resout)) gt 0 ) then error++


  if (error) then message,strtrim(error,2)+" Errors found."
  
  
end