Hi,
When building the below subroutine, I am getting the following error. From the compile messages I am not able to understand which variable it is trying to copy and why it fails. Is there a workaround for this issue?
Thanks in advance.
PGF90-S-0155-Procedures called in a compute region must have acc routine information: pgf90_copy_f77_argl (psy/psykal_lite.F90: 280)
PGF90-S-0155-Accelerator region ignored; see -Minfo messages (psy/psykal_lite.F90: 267)
invoke_calc_exner_kernel:
263, Generating copyin(chi_proxy%data(1:undf_w0),theta_proxy%data(1:undf_w0),basis_func(z_b_9_1:z_b_8_1,1:ndf,1:nqp_h,1:nqp_v),basis_f_w0(z_b_22:z_b_21,1:ndf_w0,1:nqp_h,1:nqp_v),dbasis_w0(z_b_35:z_b_34,1:ndf_w0,1:nqp_h,1:nqp_v))
267, Accelerator region ignored
280, Accelerator restriction: call to ‘pgf90_copy_f77_argl’ with no acc routine information
0 inform, 0 warnings, 2 severes, 0 fatal for invoke_calc_exner_kernel
196 !-------------------------------------------------------------------------------
197 !> Invoke_calc_exner_kernel: Invoke the calculation of exner pressure
198 subroutine invoke_calc_exner_kernel( exner, rho, theta, chi, qr )
199
200 use calc_exner_kernel_mod, only : calc_exner_code
201 use log_mod, only : log_event, &
202 log_set_level, &
203 log_scratch_space, &
204 LOG_LEVEL_ERROR, &
205 LOG_LEVEL_INFO, &
206 LOG_LEVEL_DEBUG, &
207 LOG_LEVEL_TRACE
208
209 type( field_type ), intent( in ) :: exner, rho, theta
210 type( field_type ), intent( in ) :: chi(3)
211 type( quadrature_type), intent( in ) :: qr
212
213 integer :: cell, ndf, dim, ndf_w0,dim_w0,diff_dim
214 integer :: undf_w0, undf_w3, df1
215 integer :: nqp_v, nqp_h, nlayers, ncells
216 ! integer, pointer :: map_w3(:), map_w0(:) => null()
217 integer, allocatable :: map_w3(:), map_w0(:)
218
219 type( field_proxy_type ) :: exner_proxy, rho_proxy, theta_proxy
220 type( field_proxy_type ) :: chi_proxy(3)
221
222 real(kind=r_def),allocatable :: basis_func(:,:,:,:), &
223 basis_f_w0(:,:,:,:), &
224 dbasis_w0(:,:,:,:)
225 real(kind=r_def), pointer :: xp(:,:) => null()
226 real(kind=r_def), pointer :: zp(:) => null()
227 real(kind=r_def), pointer :: wh(:), wv(:) => null()
228
229 exner_proxy = exner%get_proxy()
230 rho_proxy = rho%get_proxy()
231 theta_proxy = theta%get_proxy()
232 chi_proxy(1) = chi(1)%get_proxy()
233 chi_proxy(2) = chi(2)%get_proxy()
234 chi_proxy(3) = chi(3)%get_proxy()
235
236 ndf = exner_proxy%vspace%get_ndf( )
237 dim = exner_proxy%vspace%get_dim_space( )
238 nqp_h=qr%get_nqp_h()
239 nqp_v=qr%get_nqp_v()
240 zp=>qr%get_xqp_v()
241 xp=>qr%get_xqp_h()
242 wh=>qr%get_wqp_h()
243 wv=>qr%get_wqp_v()
245 allocate(basis_func(dim,ndf,nqp_h,nqp_v))
246
247 ndf_w0 = chi_proxy(1)%vspace%get_ndf( )
248 dim_w0 = chi_proxy(1)%vspace%get_dim_space( )
249 diff_dim = chi_proxy(1)%vspace%get_dim_space_diff( )
250 allocate(basis_f_w0(dim_w0,ndf_w0,nqp_h,nqp_v))
251 allocate(dbasis_w0(diff_dim,ndf_w0,nqp_h,nqp_v) )
252 undf_w0 = chi_proxy(1)%vspace%get_undf()
253 undf_w3 = exner_proxy%vspace%get_undf()
254 nlayers = exner_proxy%vspace%get_nlayers()
255 ncells = exner_proxy%vspace%get_ncell()
256
257 allocate(map_w3(ndf))
258 allocate(map_w0(ndf_w0))
259 call exner_proxy%vspace%compute_basis_function(basis_func,ndf,nqp_h,nqp_v,xp,zp)
260 call chi_proxy(1)%vspace%compute_basis_function(basis_f_w0,ndf_w0,nqp_h,nqp_v,xp,zp)
261 call chi_proxy(1)%vspace%compute_diff_basis_function(dbasis_w0,ndf_w0,nqp_h,nqp_v,xp,zp)
262
263 !$acc data copyin(chi_proxy(1)%data(1:undf_w0), chi_proxy(2)%data(1:undf_w0), &
264 !$acc chi_proxy(3)%data(1:undf_w0), theta_proxy%data(1:undf_w0), &
265 !$acc basis_func(:,1:ndf,1:nqp_h,1:nqp_v), basis_f_w0(:,1:ndf_w0,1:nqp_h,1:nqp_v), dbasis_w0(:,1:ndf_w0,1:nqp_h,1:nqp_v) )
266 !!$acc copyout( exner_proxy%data(1:undf_w3) )
267 !$acc parallel loop
268 do cell = 1,ncells
269
270 do df1 = 1, ndf
271 map_w3(df1) = exner_proxy%vspace%dofmap(df1,cell)
272 end do
273
274 do df1 = 1, ndf_w0
275 map_w0(df1) = theta_proxy%vspace%dofmap(df1,cell)
276 end do
277 ! map_w3 => exner_proxy%vspace%dofmap(:,cell)
278 ! map_w0 => theta_proxy%vspace%dofmap(:,cell)
279
280 call calc_exner_code( nlayers, &
281 ndf, &
282 undf_w3, &
283 map_w3, &
284 basis_func, &
285 exner_proxy%data, &
286 rho_proxy%data, &
287 ndf_w0, &
288 undf_w0, &
289 map_w0, &
290 basis_f_w0, &
291 theta_proxy%data, &
292 dbasis_w0, &
293 chi_proxy(1)%data, &
294 chi_proxy(2)%data, &
295 chi_proxy(3)%data, &
295 chi_proxy(3)%data, &
296 nqp_h, &
297 nqp_v, &
298 wh, wv )
299
300 ! call exner%log_field( LOG_LEVEL_DEBUG, LOG_LEVEL_INFO, 'exner' )
301 end do
302 !$acc end parallel loop
303 !$acc end data
304 deallocate(basis_func,basis_f_w0,dbasis_w0)
305 end subroutine invoke_calc_exner_kernel