Installing CUDA Fortran

Hi,

I am trying to demo PGI’s CUDA Fortran.

I am a bit confused… Do I need to download both these packages:

  • PGI Accelerator Fortran/C/C++ Workstation
  • PGI Accelerator Visual Fortran with VS Shell

I am running Window 8

If I need both, do I need to install them in a specific order.

I already have CUDA 5.0 installed on my computer, should I remove it before installing the PGI accelerator?

I also have cygwin (I currently use Netbeans to develop my Fortran project). Will this cause a confict with PGI cygwin?

Thanks for any help, if there is a document or a video that can help me with this incredibly basic stuff let me know.

Kirk

Hi Kirk,

You can download either the Workstation, PVF, or both. They both use the same compilers, the difference being PVF uses a Visual Studio IDE while the Workstation is a command line interface. The Workstation also includes the C and C++ compilers while PVF is Fortran only. As an aside, purchase of the Workstation product also includes a license for PVF.

If you do install both, installation order doesn’t matter. Though, you will need to install the Windows 8 SDK before installing any PGI product in Win8. Please see Chapter 6 of the PGI Installation Guide for details (https://www.pgroup.com/doc/pgiinstall.pdf)

We ship our own CUDA tools that will not interfere with your currently installed CUDA 5.0 installation, hence you do not need to remove the installation.

During installation of the PGI Workstation, you can decline installation of the pre-package Cygwin and instead use you’re own version. The Cygwin we ship is only for the convenience to customers but not required. You will need to set-up your environment but this is normal.

As for Docs, I’d start here: http://www.pgroup.com/resources/cudafortran.htm and see the “additional resources” links towards the bottom of the page. There’s also a great book CUDA Fortran For Scientist and Engineers if you want to a more in-depth understanding.
See: http://www.amazon.com/CUDA-Fortran-Scientists-Engineers-Programming/dp/0124169708

Hope this helps,
Mat

Thanks Mat,

I have installed everything and have successfully used the PGI Workstation environment for compiling and running some basic .f90 and .cuf files.

I can build and compile a .f90 file in VS but I cant seem to get a .cuf to compile. Maybe I have not set my environment variables correctly. Is there an explanation in the documentation as to how I should set the environment variables to compile and run a CUDA Fortran file in VS?

Thank you,

Kirk

PS- I have the “CUDA Fortran For Scientist and Engineers”, it seems like a great book. I am looking forward to diving in.

Hi Kirk,

I can build and compile a .f90 file in VS but I cant seem to get a .cuf to compile. Maybe I have not set my environment variables correctly

There’s a setting in the Project’s Properties Page, Fortran->Language->Enable Cuda Fortran. This will add the appropriate -Mcuda flag to the compile and link.

  • Mat

Thank you for your help, I got it working in VS now.

Is there a reason why when I run the code from VS it is slower than when I compile and run from PGI workstation environment?

Kirk

Is there a reason why when I run the code from VS it is slower than when I compile and run from PGI workstation environment?

You might have built in “Debug” configuration instead of “Release”. The “Release” configuration will apply optimization while “Debug” wont.

  • Mat