It is very easy to call the NAg FORTRAN 77 library from within an F77_LOCAL extrinsic. To use from the NAg library:
DOUBLE PRECISION FUNCTION Pi() DOUBLE PRECISION X01AAF, x Pi = X01AAF(x) END
and the calling program
PROGRAM Using_NAG_4_Pi !HPF$ PROCESSORS, DIMENSION(4) :: P DOUBLE PRECISION, DIMENSION(100) :: A !HPF$ DISTRIBUTE (BLOCK) ONTO P :: A INTERFACE EXTRINSIC(F77_LOCAL) DOUBLE PRECISION FUNCTION Pi() END FUNCTION Pi END INTERFACE A = Pi() END PROGRAM Using_NAG_4_Pi
All scalars (ie Pi) must be coherent.
For more information, click here