Skip title Accessibility statement: we seek to make the HPC web pages accessible to all users. If you encounter accessibility issues with HPC web pages please send a description of the problem by email to eric_sills@ncsu.edu - thank you. NC State
Office of Information Technology
High Performance Computing
Skip menu side bar
Home
About
 
OpNews
 
Help/Accounts
 
Partners
 
User Projects
Services
 
Hardware
 
Software
 
Grid
 
Monitor
HowTo/FAQ
 
Docs & Pubs
 
Courses
 
Other Resources
Portland Group Compilers
    To use the Portland Group compilers it is necessary to properly configure some environment variables and paths. Portland group compilers are "user friendly" and produce efficient executables. There is run-time check for a valid license, so PGI compiled codes are valid only on machines with access to PGI licenses.

    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 Multi-Core Program
    PGI compilers can generate shared memory parallel executables. Older henry2 Linux cluster nodes have only two processors, so shared memory parallelization provide limited benefits. Newer nodes have 4 and 8 cores. Recently we've added some AMD blades with 16 cores. Moreover, most desktops and even laptops have multiple cores, so that program execution can be speeded by adapting codes to run using the shared memory.

    OpenMP directives in C and Fortran PGI compiled codes can be enabled with a -mp flag. The following command line would compile an OpenMP flag with a high level of optimizations

    pgf90 -fastsse -tp x64 -mp=numa -o exec code.f
    

    The -tp x64 flag optimises for either x86_64 Intel processors or for AMD Opteron processors. The command assumes compilation from login64 (not login01 or login02).

    Compiling a Parallel Program

    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.


Office of Information Technology | NC State University | Raleigh, NC 27695 | Accessibility Statement | Policy Disclaimer | Contact Us