Portland Group Compilers
To use the Portland Group compilers it is necessary
to properly configure some environment
variables and paths.
As a convenience an alias - add - has been created
for tcsh users to set up the environment for various
software packages. To use the Intel compilers the command
add pgi
will set the necessary environment variables.
Currently the command 'add pgi' will set up the
environment for version
6.0 of the PGI compiler. To use the earlier
5.2 version of the PGI compilers use the command
'add pgi5-2'.
Once one of these files have been executed, the PGI
compilers may be invoked with the pgcc, pgCC,
pgf77, and pgf90 commands for the C, C++,
Fortran77 and Fortran90compilers respectively.
Compiling a Serial Program
The following command would generate an executable named
'exec' from the Fortran source code file named 'code.f'
with a moderately high level of optimization.
pgf90 -fastsse -o exec code.f
Compiling a Parallel Program
PGI compilers can generate shared memory
parallel executables. However, the cluster nodes
have only two processors, so shared
memory parallelization is unlikely to provide
benefit on the henry2 Linux cluster.
Distributed memory parallel programs written
with MPI function calls are currently the most
appropriate programming model to achieve good
performance from commodity clusters such as
henry2.
MPI parallel programs compiled with the PGI compilers
should use the mpif77, mpif90, mpicc, or mpiCC
commands to link with the MPICH libraries.
The following command line would compile an MPI
code with a high level of optimization:
mpif90 -o exec -fastsse code.f
The MPICH MPI library is used when the mpi* commands
are invoked with the PGI compiler environments.
|