Vishal Mehta
Vishal Mehta

Reputation: 5

Error compiling openacc routines "pgf90_copy_f77_argl_i8"

Call to PGI runtime function not supported - pgf90_copy_f77_argl_i8

I believe am passing a 8byte integer argument to a !$acc routine.

Any work around or updates in this ?

PGI compiler 17.4

example.

type some
integer(4),pointer :: xx(:)
integer(4),pointer :: yy(:)
end type

type(some), pointer :: data(:)
call func(data(3) % xx, data(5) % yy)

Here func is the acc routine, so I guess this sort of approach is creating an issue.

We will create temporary arrays and then pass them.

Upvotes: 0

Views: 289

Answers (1)

Mat Colgrove
Mat Colgrove

Reputation: 5646

This routine is checking if the array being passed is contiguous or not when using F77 calling conventions. If it's not contiguous, the runtime has to create a temp array so that the array slice is being passed contiguously.

Although you say you're passing in an 8byte integer, are you also passing in an array slice?

We (PGI) do have a hard problem here. The "solution" would be to for us to create device side runtime routines that mimic the behavior we have on the host. However, this would mean that the compiler may need to then allocate on the device a temp array for each thread, copy the sliced data to the temp array, pass in the temp array, and then copy back the results into main array. However, this would absolutely kill the performance of your loop so not something we really want to do.

This is something we're debating about internally. We want users to be able to port their code more easily, but know if we add this support, it will hurt performance and wont be obvious as to why. So for now, we're encouraging users to avoid passing array slices, instead pass the base array and add extra arguments for the indices.

Admittedly, we need to first work on the error messages so it's more clear as to the problem. I've pushed our compiler team, but it's not straight forward. In the meantime, if you see any of these "argl" runtime calls, this is what's happening.

Upvotes: 1

Related Questions