Compilers and Libraries

Compilers are installed ONLY on the development node.

GNU compilers, gcc, g77, and g++

For help type: man g77

Use optimization flags -O or -O2 for production jobs g77 -O program.f -o program.x

To compile a fortran code using mpi libraries:

  1. Make sure that /opt/mpich/gnu/bin is in your PATH
    • For csh or tcsh shells (in .tcshrc .cshrc or .login):
      set path = ($path /opt/mpich/gnu/bin)
    • For bash shell (in .bashrc):
      PATH1=/opt/mpich/gnu/bin PATH=$PATH:$PATH1
  2. SSH to the development node from lakemead ssh development
  3. use the wrapper (script) mpif77 mpif77 -o my-mpi.x my-mpi.f
  • To compile a C code using MPI libraries:
    1. connect to the development node ssh development
    2. Use the wrapper (script) for mpicc mpicc -o my-mpi.x my-mpi.c
  • Intel compilers ARE available (version 8.1)
    • To compile a Fortran90 code: ifort -fast -o my-code.x mycode.f90
    • the -fast option sets optimization level and options to -O3 -ipo -static which may improve run-time performance
    • To compile a C (or C++) code using the Intel compilers, icc -o fast -o my-c.x mycode.c
    • see man pages for ifort and icc for more options

    Important Documents


  • ©2010 NSCEE