... | Last updated: 20 May, 2021 Copy Copied As an alternative to using Intel compilers for Fortran, C, and C++ programs, you can use the compilers and program development tools from PGI Compilers and Tools. By default, the PGI compilers generate code that is optimized for the compilation host. PGI CompilingSeveral versions of PGI compilers and tools are installed as modules under the /nasa system directory on Pleiades and Endeavour. To view available versions, run: The following command line will load version 18.10: Note: Starting with the PGI compiler 2018, two different code generators (PGI-proprietary vs LLVM-based) are included in each package. The default code generator for 2018 versions is the PGI-proprietary code generator and for 2019 and later versions is the LLVM-based generator. The PGI 2019 compilers using LLVM are not link-compatible with PGI 2018 and prior releases. Using the PGI CompilersPGI provides multiple commands for different languages or functions. In 18.10 and earlier versions, the following are available.
Note: By default, the PGI compilers generate code that is optimized for the type of on which compilation is performed (the compilation host). Be aware that the processors are forward-compatible, but not backward-compatible. Thus a code compiled and optimized on a newer-generation processor will not necessarily execute correctly on previous-generation processors. If you want to build an executable that targets a specific processor type, use the -tp flag:
TIP: Using the -tp=sandybridge-64,haswell-64,skylake-64 option will generate a single executable in which the code is optimized for the Intel Sandy Bridge, Haswell, and Skylake architectures. The choice of which optimized copy to execute is made at run time and depends on the machine executing the code. You must load comp-pgi/18.4 or later versions in order to use -tp= skylake-64. PGI recommends that for best performance on processors which support SSE instructions (including all NAS processor types), use pgfortran, even for FORTRAN 77 code, use the -fastsse option. For more information about the PGI compilers, see man pgfortran, man pgcc, and man pgc++ or use the pgfortran -help, pgcc -help, or pgc++ -help commands. Information about the PGI debugger and performance analysis tool can be found using the commands pgdbg -help and pgprof -help. |
PGI compilers are supported on and can generate fully optimized code for a broad range of popular high-performance computing platforms including 64-bit x64 and 32-bit x86 processor-based systems. PGI Fortran compilers offer world-class performance and features including both automatic and OpenMP 3.0 parallelization support for optimizing.
Yet another Fortran compiler?
Honestly, I think that, whether you do have your favorite Fortran
compiler or not, it is always interesting to check how your applications behave to different compilers.
After the GNU
and the Intel Fortran
compilers, we will describe here how to install the PGI Fortran
compiler on Linux Ubuntu 12.04 LTS
. The PGI Fortran
compiler is also available for Mac OS X, and a link to download and install it is provided here.
- Flang (also known as 'Classic Flang') is an out-of-tree Fortran compiler targeting LLVM. It is an open-sourced version of pgfortran, a commercial Fortran compiler from PGI/NVIDIA.
- Fortran Compiler Systems – A brief guide. We offer Fortran compiler systems for PCs running Windows, Linux, and for Mac computers running Mac OS X. Only Absoft®, PGI®, NAG and Intel® produce and support Fortran compilers for Linux and Mac OS X. For Microsoft Windows® there is more variety. You can choose among compilers by Absoft, Intel.
PGI Compilers are products of the Portland Group, Inc.
or PGI, a company that produces a set of commercially available compilers for high-performance computing systems, and which is a wholly owned subsidiary of NVIDIA Corporation
. PGI compilers incorporate global optimization, vectorization, software pipelining, and shared-memory parallelization capabilities targeting both Intel
and AMD
processors.
1. PGI Compilers for Linux
- Donwload the installation file
To proceed, first you have to create an account on the PGI website, in order to download the compiler. Please note that the activation Email from PGI could be delayed, we had to wait for almost 24-hours to receive it!
In the address below, you can download, in addition to the Fortran compilers, a whole set of PGI compilers (C/C++
and CUDA
, among others), as well as debugging and memory evaluation tools.
However, some of them are not free. We will discuss the licensing procedure later on.
- Before the installation
Two different versions are available for each compiler: Workstation
or Server
. The characteristics of each version are as follow:
– Workstation
All PGI Workstation
products include a node–locked single–user license, meaning one user at a time can compile on the one system on which the PGI Workstation
compilers and tools are installed. The product and license server are on the same local machine.
– ServerPGI Server
products are offered in configurations identical to PGI Workstation, but include network floating multi–user licenses. This means that two or more users can use the PGI compilers and tools concurrently on any compatible system networked to the license server, that is, the system on which the PGI Server license keys are installed.
It is worth telling that the Workstation
version is totally free and permanent, whereas the Server
version is a 30-days trial version!
For this tutorial, we will proceed with the 32-bit PGI Fortran Workstation version
, Linux Release 15.1
, updated January 31, 2015.
Release 2015
includes, among other things, native OpenMP
and auto-parallelizing Fortran 2003
compiler (PGFortran
) and MPICH
libraries, version 3.1.3, for 64-bit development environments (both Linux
and Mac OS X
).
You can also use the PGI tools to develop, debug, and profile MPI
applications. Please note that The PGPROF
MPI profiler and PGDBG
debugger included with PGI Workstation
and PGI Server
are limited to 16 local processes.
PGI supports Linux Ubuntu 8.04+
, including Ubuntu 14.10
, as well as CentOS 5.2+
, Fedora 4+
and SuSE 9.3+
, among others.
A table, listing the processors on which the Release 2015
PGI compilers and tools are supported, is given. Please do refer to the PGI Installation Guide
for more details about the supported OS, processors, as well as for additional components installation:
Finally, before starting the installation, please consider installing the GNU C
and GNU C++
compilers, or update them, if need be:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential
- Installation procedure
Use the following command sequence to unpack the .tar.gz file into a temporary directory before the installation:
mkdir /tmp/pgi
mv pgilinux-2015-151-x86.tar.gz.tar.gz /tmp/pgi
cd /tmp/pgi
gunzip pgilinux-2015-151-x86.tar.gz.tar.gz
tar -xvf pgilinux-2015-151-x86.tar.gz.tar
Run the installation scripts:
sudo ./install
The default installation folder is /opt/pgi/
. You may choose to install the compiler in another directory.
When the installation script has completed, execute the following commands to make the PGI
products accessible and to initialize your environment for use. In your .bashrc
file, insert the following commands:
export PGI=/opt/pgi;
export PATH=/opt/pgi/linux86-64/15.1/bin:$PATH;
export MANPATH='$MANPATH':/opt/pgi/linux86-64/15.1/man;
export LM_LICENSE_FILE='$LM_LICENSE_FILE':/opt/pgi/license.dat;
At this point, all you need to do is to configure your license-key. There are three ways to obtain a license-key for the PGI compilers and tools:
– Invoke PGI’s license generation tool:
Pgi Fortran Compiler Cracked
/opt/pgi/linux86/15.1/bin/pgi_license_tool
– Login to your PGI account on http://www.pgroup.com
. The hostid
information for your computer is shown in the file /opt/pgi/license.info
.
– Copy the licence-key provided in the Email sent by PGI prior to the installation.
Paste your license-key in the file /opt/pgi/license.dat
.
You are done!
Please note that PGI provides permanent license key only for the PGI Workstation
version of the compiler. Other versions, such as PGI Server
or Accelarator
compilers are provided with a renewable 30-days trial license!
Again, please refer to the license.info
and the Installation Guide
files for further details.
2. PGI Compilers for Mac OS X
The PGI Fortran
compiler is also available on the Mac OS X
platform, namely Free PGI
.
Free PGI
for Mac OS X
includes the PGI high-performance parallel C99
and Fortran 2003
compilers and parallel debugger for 64-bit
and 32-bit Intel
processor-based Macs.
Pgi Visual Fortran
Although the installation for the Mac OS X
is not described here, it is relatively easy and doesn’t differ much from the Linux procedure.
Pgi Fortran Cuda
The download and installation procedure are described in details at this address:
Pgi Fortran Compiler
This procedure has successfully been tested on a Linux Ubuntu 12.04 LTS system.