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
GNU Compilers
    The gnu compilers are available in the default path and are invoked with the cc and f77 commands for the C/C++ and Fortran77 compilers respectively. gfortran invokes a gnu fortran90 compiler. Open source codes typically are rather easy to compile with gnu compilers. Writers widely used codes typically test their codes with the universally available gnu compilers.

    Parallel programmers are strongly encouraged to use the Intel or Portland Group compilers to generate more efficient code.

    To compile a MPI parallel program with GNU compilers use the command 'add gnu' to set up the environment to access the correct MPICH directories. This will permit mpicc, mpicxx, and mpif77 to be used to compile C,C++, and Fortran 77 MPI programs respectively. These commands will use the GNU compilers and MPICH libraries built with GNU compilers. To compile a 64 bit gnu code to link with the mpich libraries, log into login64.hpc.ncsu.edu or login03.hpc.ncsu.edu and use "add gnu_64" instead of "add gnu".

    The following command line gave relatively efficient OpenMP code with gfortran on the AMD blades

    gfortran -mtune=k8 -funroll-loops -fexpensive-optimization -ffast-math
    -fopenmp -o exec code.f
    

    For Intel blades, the command would be

    gfortran -mtune=nocona -funroll-loops -fexpensive-optimization -ffast-math
    -fopenmp -o exec code.f
    

    For a simple BLAS-1 test code, the gfortran compiled executable ran at about half the speed of Intel and Portland Group compiled code.


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