Programming
Quick Start for Hopper Users
You should be able to compile codes the same way you do on Hopper unless your code in some way relies on the PGI compilers. The default programming environment on Edison uses the Intel compiler suite. Cray and GNU compilers are also available. PGI and Pathscale compilers are not installed.
Overview
Cray provides a convenient set of wrapper commands that should be used in almost all cases for compiling and linking parallel programs. Invoking the wrappers will automatically link codes with MPI libraries and other Cray system software. All MPI and Cray system include directories are also transparently imported. In addition the wrappers append the compiler's target processor arguments for the Edison compute node processors.
NOTE: The intention is that programs be compiled on the login nodes and executed on the compute nodes. Because the compute nodes and login nodes have different operating systems, binaries created for compute nodes may not run on the login node. The wrappers mentioned above guarantee that codes compiled using the wrappers are prepared for running on the compute nodes.
Basic Example
For Fortran source code use ftn
% ftn -fast -o example.x example.f90
For C source code use cc
% cc -fast -o example.x example.c
For C++ source code use CC
% CC -fast -o example.x example.C
All compilers on Edison -- Intel, Cray and GNU -- are provided via three programming environments that are accessed via the module utility. Each programming environment contains the full set of compatible compilers and libraries. To change from one compiler to the other you change the programming environment via the 'module swap' command.
Help NERSC Configure the Programming Environment
Edison is a pre-production system and the default Intel programming environment is still being configured. Currently, many of the math libraries included in the Cray LIBSCI suite are available to the Intel compilers only through the Intel MKL library. You need to add the
-mkl=cluster
compiler option to link with MKL. For more details please check the Intel compiler man page.
If you encounter other missing programming libraries that prohibit you from building your code, please report these to the NERSC consultants at consult@nersc.gov.