Pointer to a subroutine in a parallel loop

I have the following declaration in a Fortran module:

PROCEDURE(), POINTER :: EXACT_SOL => NULL()
!--------------------------------------------------------------------
!$ACC ROUTINE(EXACT_SOL) SEQ
!--------------------------------------------------------------------

Then later on, in a subroutine of the same module, I set:
EXACT_SOL => CELL_SOL_CUBIC_CAVITY_TIME

And finally, in another subroutine of the same module, within a parallel loop, I have the following call:
CALL EXACT_SOL(iCell, nDofV, order, time)

When compiling this module, I get the following error:
PGF90-S-0155-Accelerator region ignored; see -Minfo messages (L2_error.f90: 173)
compute_l2_error_em_time:
173, Accelerator region ignored
176, Accelerator restriction: loop contains unsupported statement type
188, Accelerator restriction: unsupported statement type: opcode=JSRA

It seems to me that I cannot use a pointer to a procedure within a parallel loop construct.
Is there a simple way to get around this issue?

Thanks in advance!

Hi sl06,

It seems to me that I cannot use a pointer to a procedure within a parallel loop construct.

Correct. Procedure pointers are not supported within device code. This requires the use of a device side jump table which is not currently available, though something we’re investigating if can be implemented. Though, there’s no timeline as to when this support would be available.

Is there a simple way to get around this issue?

Not really. You’ll need to call the routine directly and not got through the procedure pointer.

-Mat

Hi Mat,

Happy New Year 2020!

You mentioned that there is no timeline as to when this support would be available.

Does this mean that it will be the case between 6 to 12 months from now? Or later? Or earlier?

Does this mean that it will be the case between 6 to 12 months from now? Or later? Or earlier?

Sorry, I don’t know. Please don’t hold up your development work for this feature.