Pardon me if my explanation is too basic. IMSL from intel is probably a
compiled library, without any source files. If you do not have the source
you cannot compile the IMSL library, to run on the Tesla K40.
But that is probably okay, because moving IMSL to GPUs so that the performance on the GPUs is good enough to mask the extra time spent
moving data and programs to the GPU, and results back to the platform,
may take a lot more work.
We do not support GPUs calling x86 subroutines, only the other way around.
You cannot think of IMSL as something a GPU routine can call.
As far as linking intel’s IMSL with PGI’s fortran, I do not know if that will work. The way to find out is if you can call the IMSL from a C program, and
link successfully. This would mean pgcc can work, and from there pgfortran
can call IMSL routines just like any C routine.
But if your programs require an IMSL interface module (for example
‘use imsl’ stmt, then unless the module sources or a PGI compiled version
of the imsl module does not exist (Intel does one for MKL) then I don’t
think you will have a successful port.
IMSL has many routines not found in other libraries. If you can find the
routines in our CUDA libraries, with the same interfaces, it could work
to link those in.
If you are new to all this, I recommend you start with a working program
that runs on the platform (x86-64), and incrementally convert each
compute intensive section to run on the GPUs, using OpenACC directives.
If you compile without "-acc ", the compiler will ignore the OpenACC
directives and your program runs successful on the host. If you compile
with “-acc -ta=tesla”, you will use the OPenACC directives to move the section
computation to the GPUs.
But you still run into the issue that IMSL routines are not running
on the GPU, unless the routines are in a CUDA library already.
See C\Program Files\PGI\win64\2017\examples\OpenACC on your
system for examples of OpenACC.