Intel IMSL FNL with PGI?

Hi,

I have a program written in VFortran 2013 that uses the library Intel IMSL FNL 7.0.1 for Intel 64bit.
I have the PGI Visual Fortran 17.3 with the VS Shells 2013 and 2015.
I have also installed the Intel Parallel Studio XE 2017.
I would like to use my Tesla K40m with this program that uses the IMSL library (we bought it for the Intel compiler before we got PGI). So, is it possible to integrate/use it?
So far, I have the imsl library set up in the VS 2013 shell, but I cannot see/use the Tesla accelerator; and in the VS 2015 shell I can see/use the Tesla card but I cannot see/use the IMSL library…
I am sort of new with parallel programming, so any help/guidance is very much appreciated.
Cheers,



Mila

Mila,

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.

dave

Hi Dave,
thanks a lot, I will follow your recommendations and eventually report back the results.
Cheers,


Mila