Compiling

General

Several C/C++ and Fortran compilers are available on ewok. These include the GNU compilers as well as compilers from Portland Group (PGI), Pathscale, and Intel. Ewok will most likely have several versions of each compiler installed at any given time and available through modules.

MPI support is provided by OpenMPI. There are OpenMPI modules for each vendor’s compiler, and when switching compiler modules you should be sure that the appropriate OpenMPI module is loaded as well. For example, when using PGI, make sure the pgi and ompi/-pgi modules are both loaded. Likewise, for Pathscale, the necessary modules are pathscale and ompi/-pathscale. OpenMPI modules that are for compilers other than the one currently being used should not be loaded. To make things simpler when moving between compilers, several programming environment modules have been set up. These are named based on a specific compiler version and will load the appropriate compiler and ompi module. For example, PE-pgi/7.2.4 will load pgi/7.2.4 and ompi/1.2.8-pgi724. When moving between compiler vendors, such as PGI and Pathscale, swapping the PE modules will ensure the proper compiler and ompi module are loaded.

Wrappers are provided for building parallel codes. When using the wrappers, you do not need to link against the MPI library since this is handled by the wrapper. The wrappers are programming-language specific and include mpif77, mpif90, mpicc and mpiCC. Serial codes can be built by calling the compiler directly (e.g. pgf90, pathcc, ifort, gcc).