

This document describes changes between PGI Workstation 3.0 and previous releases, as well as late-breaking information not included in the current printing of the PGI User's Guide.
PGI Workstation 3.0 includes the following components:
Depending on the product you purchased, you may not have received all of the above components.
PGI Workstation 3.0 is supported on systems using the Intel Pentium, Pentium Pro, or Pentium II processors, and running NT 4.0 or higher, Solaris86 2.4 or higher, or Linux with a kernel version of 2.0 or above. This includes newer versions of Linux that use glibc2, such as Redhat 5.1 and 5.2.
The PGI products are license managed. For PGI Workstation products, a single user can run as many simultaneous copies of the compiler as desired, on a single system, and no license daemon or Ethernet card is required. For PGI Server and PGI Cluster Development Kit (CDK) products, the number of users is controlled by the FLEXlm license manager. When the PGI compilers are first installed, they are usable for 15 days without a license key. Please contact PGI to obtain a permanent license key as soon as possible.
If you change the configuration of your system by adding or removing hardware, your license key may become invalid. Please contact PGI if you expect to reconfigure your system to ensure that you do not temporarily lose the use of PGI products.
If you need to use FLEXlm-style licensing, you will need to follow the installation instructions in sections 1.2 and 1.3 above, including installation of the license daemon and proper initialization of the LD_LIBRARY_PATH environment variable. FLEXlm-style licensing is not currently available with PGI products for NT. Please contact PGI for more information.
Following are the new features included in PGI Workstation 3.0:
Five new generic compiler options (options which apply to all of the PGI compilers) have been added in release 3.0:
* -Mchkfpstk - check for internal consistency of the IA-32 floating-point stack in the prologue of a function and after returning from a function or subroutine call. Floating-point stack corruption may occur in many ways, one of which is Fortran code calling floating-point functions as subroutines (i.e. with the CALL statement).
* -Mchkstk - check the stack for available space in the prologue of a function and before the start of a parallel region. Useful when many local and private variables are declared in an OpenMP program.
* -fpic - (Linux and Solaris86 only) generate position-independent code which can be used to create shared object files (dynamically linked libraries).
* -shared - (Linux only) passed to the linker. Instructs the linker to create a shared object file.
* -G - (Solaris only) passed to the linker. Instructs the linker to create a shared object file.
Eight new or modified Fortran-specific compiler options have been added in release 3.0:
* -module directory - (PGF90 and PGHPF only) save intermediate module files (which have a .mod extension) in directory and search directory for pre-compiled intermediate module files when trying to resolve USE statements.
* -mp - (PGF77 and PGF90 only) interpret and process user-inserted OpenMP or SGI parallelization directives. This option was operational in PGF77 in a previous release, and is now supported by PGF90 as well. See the PGI User's Guide for a complete list of supported directives.
* -Mbounds - Enable array bounds checking to catch programming errors. This option was operational in PGF77 in prior releases, and is now operational for PGF90 and PGHPF as well.
* -Mchkptr - (PGF90 and PGHPF only) check for unintended de-referencing of NULL pointers to catch programming errors.
* -Mnomain - When the link step is performed, don't include the object file which calls the Fortran main program. Useful for using the Fortran compiler drivers to link programs with the main program written in C or C++ and one or more subroutines written in Fortran.
* -M[no]ref_externals - [Don't] force references to names appearing in Fortran EXTERNAL statements.
* -M[no]second_underscore - [Don't] add a second underscore to the name of a Fortran global symbol if its name already contains an underscore. This option is useful for maintaining compatibility with g77, which adds a second underscore to such symbols by default.
* -Munix - (NT only) use UNIX-style argument passing and symbol naming conventions. In particular, C symbols are pre-pended with an underscore and Fortran symbols have underscores pre-pended and appended. This option is useful for porting mixed Fortran/C applications from UNIX to NT with a minimum of effort. See the PGI User's Guide for a more extensive description of this option.
Three new NT-specific compiler options have been added in release 3.0:
* -cyglibs - (NT only) link against the Cygnus libraries and use the Cygnus include files. You must have Cygwin32 installed in order to use this switch.
* -mslibs - (NT only) use the Microsoft linker and include files, and link against the Microsoft Visual C++ libraries. Microsoft Visual C++ must be installed in order to use this switch.
* -msvcrt - (NT only) use Microsoft's msvcrt.dll at runtime rather than the default crtdll.dll.
Release 3.0 contains the first production version of the PGDBG graphical debugger. PGDBG can be used to debug F77, F90, C, C++, and assembly-language programs. It is not HPF-aware. PGDBG is currently available only on Linux and Solaris86.
To use the command-level version of PGDBG, simply compile your program using the -g option and invoke the debugger as follows:
% pgdbg a.out
If you wish to use the graphical user interface (GUI), it is invoked using the command Xpgdbg:
% Xpgdbg a.out
Chapter 15 of the PGI User's Guide contains a complete description of PGDBG and how it is used, including an overview of the GUI.
Version 3.0 of PGDBG has the following limitations:
1. It cannot evaluate functions. If you specify "print" with an argument equivalent to a function call from the source code, you will see the error message:
INTERNAL ERROR: tgt_callfunc: not implemented
Program terminated, exit code is 0
However, it is generally safe to continue debugging your program even after this error message is printed.
2. It cannot process core files
3. When referencing members of Fortran 90 user-defined types, you must use a C-like syntax rather than the Fortran syntax (e.g. "print x.y" rather than "print x%y"). Also, when specifying types for printing (e.g. in a memory window) you must use C-like data type identifiers.
4. When debugging a program parallelized using either OpenMP directives or auto-parallelization, step or next into a parallel region is unreliable. If you need to debug within a parallel region, set a break point inside the parallel region and run to it. You can then alter thread contexts, examine the values of variables for each thread, and step the threads individually.
5. Correlation between the GUI and the underlying debugger is not reliable within parallel regions of code. For example, if you break within a parallel region and step or next an individual thread, the source correlation marker will track the instructions as they are executed by the active thread. However, when you switch contexts to a thread that is still stopped at the breakpoint, the source correlation marker will not repaint the screen to show the location of the new thread.
In addition, limited support is provided for gdb on Linux. The PGI compilers produce symbolic debugging information in a format called dwarf. gdb has limited support for this format. If you use the PGCC compiler, then gdb seems to work fine. gdb has not been tested with the PGCC C++ compiler.
If you wish to use gdb with the PGF77 and PGF90 compilers, you should download and install a modified version of gdb 4.16 from:
ftp://ftp.pgroup.com/x86/linux86-patches/gdb.tar.gz
This version allows you to examine common block variables. However, it still does not handle adjustable or assumed-shape arrays; apparently gdb has no support for these constructs.
Precompiled versions of the BLAS and LAPACK math libraries are included in the files $PGI/<target>/lib/libblas.a and $PGI/<target>/lib/liblapack.a. These can be linked in to your applications by simply placing the -llapack -blas options on the link line:
% pgf90 myprog.F -lblas -llapack
On NT, assembly-coded BLAS and FFT routines are included in the file $PGI/<target>/lib/libmkl.a. You can specify that these should be linked in place of the standard (compiled Fortran) version of the BLAS using the -lmkl link time option:
% pgf90 myprog.F -lmkl -llapack
For more information about this library, see the URL:
http://support.intel.com/support/performancetools/libraries
A similar library is available for Linux systems, but cannot be shipped with PGI Workstation for legal reasons. However, you may obtain it at no cost at the following URL:
http://www.cs.utk.edu/~ghenry/distrib/index.htm
Follow the instructions for obtaining the software, install it in the file $PGI/linux86/lib/libmkl.a, and compile/link as above for NT. NOTE: The contents of this library are similar but not identical to libmkl.a for NT.
As stated in section 2.3, all of the PGI compilers in release 3.0 support the creation of shared object files (dynamically linked libraries) on Linux and Solaris86. Chapter 8 of the PGI User's Guide contains detailed instructions on how to create and use shared objects.
As stated in section 2.3, all of the Microsoft calling conventions including Fortran STDCALL are now supported by the PGI Fortran compilers.
IMPORTANT: The default calling convention has changed, which means that object files compiled using release 3.0 of the PGI Fortran compilers are not compatible with object files compiled using earlier releases. The default is now compatible with Microsoft PowerStation 4.0 and Digital Visual Fortran.
In addition to these changes, support has been added for UNIX-style calling conventions on NT. This allows simple porting of mixed Fortran/C applications from UNIX to NT.
Section 6.14 of the PGI User's Guide contains a detailed description of all the supported Fortran calling conventions under NT.
A self-guided online tutorial is now available which should help you become familiar with how OpenMP directives can be used to parallelize a program. In particular, the tutorial takes the user step by step through the process of parallelizing the NAS FT benchmark using OpenMP directives. The tutorial can be found at:
ftp://ftp.pgroup.com/pub/SMP
You can download this file using a web browser, and unpack the file using the following commands:
% gunzip fftpde.tar.gz
% tar xvf fftpde.tar
Change directories to the fftpde sub-directory, and follow the instructions in the README file.
This release contains the EDG 2.38 C++ front-end, which contains numerous bug fixes to the EDG 2.37 release used in prior releases of PGCC C++.
On NT, a UNIX-like shell environment is bundled with PGI Workstation. After installation, double-clicking on the PGI Workstation icon on your desktop will launch a bash shell command window with pre-initialized environment settings. Most familiar UNIX commands are available (vi, emacs, sed, grep, awk, make, etc). If you are unfamiliar with the bash shell, reference the user's guide included with the online HTML documentation.
Alternatively, you can launch a standard NT command window pre-initialized for usage of the PGI compilers by selecting the appropriate option from the PGI Workstation program group accessed in the usual way through the "Start" button.
Except where noted in the PGI User's Guide, the command-level PGI compilers and tools on NT function identically to their UNIX counterparts. You can customize your command window (white background with black text, add a scroll bar, etc.) by right-clicking on the top border of the PGI Workstation command window, selecting "Properties", and making the appropriate modifications. When the changes are complete, NT will allow you to apply the modifications globally to any command window launched using the PGI Workstation desktop icon.
The PGI Workstation 3.0 command-level compilers are usable from within an Interix 2.2 shell (for more information about Interix from Softway Systems, see http://www.interix.com).
After installing PGI Workstation as outlined in section 1, issue the following commands from within an Interix shell to initialize your environment and path. Assuming csh:
% setenv PGI C:/pgi
% set path=(//C/pgi/nt86/bin $path)
Or, assuming sh or ksh:
% PGI=C:/pgi
% export PGI
% PATH=//C/pgi/nt86/bin:$PATH
The UNIX-style manual pages must be viewed in their HTML form on NT. See section 4 for information on how to view the HTML documentation.
Note that the PGI Workstation 3.0 compilers themselves have not been built under Interix, and do not link against the Interix libraries. Thus the executables produced by these compilers are standard NT executables rather than Interix executables. In particular, this means that Interix programs which rely on UNIX-specific system calls (e.g. fork()) cannot currently be built using the default installation of the PGI Workstation compilers.
NOTE 1: For reasons that have not been diagnosed at the time of this writing, PGHPF-compiled programs sometimes fail to execute when invoked from an Interix shell. You may see the error message:
% a.out
1: CreateProcess: no error
and a temporary file named pghpf_map_nnn may be left in your working directory. You will want to delete this temporary file manually, as it will be very large. This behavior has not been observed for executables compiled using PGF77 or PGF90, and PGHPF programs compiled within an Interix shell should operate correctly when invoked from within either a BASH command window or a standard MS-DOS command window.
NOTE 2: Even though your environment is initialized correctly within an Interix shell, the pgprof command won't be found in your path. You can either invoke PGPROF using the full executable name of pgprof.exe, or you can issue the following alias command:
% alias pgprof pgprof.exe
The PGI Workstation 3.0 command-level compilers can be used from within an MKS Toolkit shell window (for more information on the MKS Toolkit from Mortice Kern Systems, see http://www.mks.com).
After installing PGI Workstation as outlined in section 1, issue the following commands from within an MKS korn shell to initialize your environment and path:
% PGI=C:/pgi
% export PGI
% PATH="C:\PGI\nt86\bin;$PATH"
The UNIX-style manual pages must be viewed in their HTML form on NT. See section 4 for information on how to view the HTML documentation.
There is no well-defined process for creating DLLs using the PGI Workstation 3.0 compilers for NT. Contact PGI for more information and a status on the capability to create DLLs.

