Introduction to the Cray Programming Environment¶
The Cray Programming Environment (PE) provides tools designed to maximize developer productivity, application scalability, and code performance, including compilers, analyzers, optimized libraries, and debuggers.
Cray PE Components¶
- Cray Compiling Environment (CCE):
CCE consists of Cray compilers performing code analysis during compilation to generate highly optimized code. Supported languages include Fortran, C and C++, and UPC (Unified Parallel C).
- Cray Scientific and Mathematical Libraries:
A set of high performance libraries providing portability for scientific applications, sparse and dense linear algebra (BLAS, LAPACK, ScaLAPACK) and fast Fourier transforms (FFTW).
- Cray Message Passing Toolkit:
A collection of software libraries used to perform data transfers between nodes running in parallel applications. It includes the Message Passing Interface (MPI) and OpenSHMEM parallel programming models.
- Cray Environment Setup and Compiling Support:
Libraries supporting code compilation and setting up the development environment, including compiler drivers.
- Cray Performance and Analysis Tools:
Tools to analyze the performance and behavior of programs that are run on Cray systems, and a Performance API (PAPI).
- Cray Debugging Support Tools:
Debugging tools, including
Modules enable users to modify their environment dynamically by using modulefiles:
module command provides a user interface to the Environment Modules package.
The module command interprets modulefiles, which contain Tool Command Language (Tcl) code,
and dynamically modifies shell environment variables such as
Cray sites can alternately enable Lmod to handle modules with the Cray Programming Environment on Cray EX Systems.
Both module systems use the same module names and syntax shown in command-line examples.
Environment Modules and Lmod are mutually exclusive and cannot both run on the same system.
The configuration files
allow sites to customize the default environment.
To support customer-specific needs, the system administrator can create modulefiles for a product set for the users:
- for more information about the Environment Modules software package see the help screen
Programming Environment meta-modules¶
Programming Environment modules are organized into meta-modules, where each supports a different compiler suite.
These modules are
Meta-modules provide wrappers (
ftn) for both Cray and third-party compiler drivers.
The main purposes of using the Cray wrappers are the following:
call the correct compiler with appropriate options to build and link applications
link relevant libraries as required by modules loaded, with only dynamic linking supported
replace direct calls to compiler drivers in Makefiles and build scripts
In addition to the default Environment Modules system, Cray PE offers support for Lmod as an alternative module management system.
Lmod is a Lua-based module system that loads and unloads modulefiles, handles path variables, and manages library and header files.
The Cray PE implementation of Lmod is hierarchical, managing module dependencies and ensuring any module a user has access to is compatible with other loaded modules.
Lmod loads related compiler, network, CPU, and MPI modules adding dynamic module paths to the Lmod hierarchy:
- "families" of modules are used to flag circular conflicts, for instance:
- when module details are displayed through
when users attempt to load conflicting modules
a default set of modules is loaded automatically: the default set includes compiler, network, CPU and MPI modules
Users may choose to load a different module set, defining user collections
Environment Modules and Lmod modules use the same names in the Cray Programming Environment, therefore all command examples work the same whether using Environment Modules or Lmod.
For more information, please refer to the User Guide for Lmod.
Cray Pubs is the documentation portal of HPE/Cray and the main source of the information provided in this tutorial.
Documentation on the Cray Programming Environment (PE) can be found under the PE-Tile. The page provides links to the following content:
PE Release Announcements
PE Installation & Configuration
Cray Compiling Environment (CCE)
PE User Procedures (including Cray Programming Environment User Guides)
The GitHub project PE-Cray provides additional documentation:
Whitepapers are available at https://github.com/PE-Cray/whitepapers
Documentation for cray-openshmemx
Information on cray-dsmml