Related: Install Flang LLVM Fortran compiler
The PGI Community Edition compilers are a set of no-cost, non-open-source, high performance compilers for:
pgf90including Fortran CUDA support.
Like Flang, PGI is building up support for:
- Fortran 2008 (including
- Fortran 2018 (including
- Download, extract and install
PGI Community Edition
~/.local/pgi(sudo not required). This is over 2 GB download, and must be extracted to a filesystem capable of symbolic links (e.g. not ExFAT). You don’t need to install CUDA support unless you have and want to use a CUDA-capable GPU.
- add to
or whichever directory you find with
find $HOME/.local/pgi -name pgf90
- open a new terminal to use PGI
PGI is known for its Java-based
pgdbg graphical debugger for Fortran, C and C++.
The PGI debugger is included in the no-cost Community Edition as well.
As usual, be sure the program to be debugged is compiled with
-g -O0 to provide maximum debugging information.
pgf90 -g hello.f90
pgdbg a.outopens the graphical Fortran debugger.
If you don’t see code in the upper left of the graphical PGI debugger for your program, be sure you compiled the executable with
-g -O0 options.
cmake_minimum_required (VERSION 3.10) project(myproj Fortran) if(CMAKE_Fortran_COMPILER_ID STREQUAL Intel) add_compile_options(-check all -fpe0 -warn -traceback -debug extended) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL GNU) # gfortran add_compile_options(-Wall -Werror=array-bounds -Wextra -Wpedantic) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL PGI) add_compile_options(-traceback) elseif(CMAKE_Fortran_COMPILER_ID STREQUAL Flang) # cmake >= 3.10 link_libraries(-static-flang-libs) endif()
and then clear out your build directory and select the PGI compilers with
FC=pgf90 CC=pgcc CXX=pgc++ cmake ..
- PGI 2018 Debugger manual