C OpenACC support for sincos, isinf, isnan.

Hello all.

Is there any C openACC support in pgcc for sincos, isinf and isnan? I have a code calling those functions in a “parallel loop” segment that does not compile and gives an “Undefined reference to ‘sincos’” message. (same for isinf and isnan).

Cuda does have those functions right? Pgcc’s implementation of OpenACC don’t use then?

And also, is there a way to call external libs’ functions from within a “parallel loop” segment? I want to use “GNU Scientific Library (GSL)”, for example.

Best regards,
Matheus.

Hi Matheus,

For the accelerator versions of libm, include “accelmath.h”. It includes isinf, isnan, sin, cos, etc. However, we don’t have “sincos” since it’s a GNU extension.

And also, is there a way to call external libs’ functions from within a “parallel loop” segment? I want to use “GNU Scientific Library (GSL)”, for example.

You can only call routines that have been compiled with device code, i.e. those that have been decorated with the OpenACC “routine” directive or have CUDA “device” routines.

You might be able to add “routine” to the GSL routines you want to use, but having not tried this before, I’m not sure what issues you may encounter.

-Mat