Programming Environment Modules

The HPE Cray Supercomputing Programming Environment (CPE) provides a convenient way to switch between different programming environments using meta modules called “PrgEnv” (short for Programming Environment). These modules simplify the process of configuring and managing programming environments on HPE Cray Supercomputing EX systems. PrgEnv modules are special meta modules that automatically load a group of other modules essential for a particular programming environment. Each PrgEnv module represents the default setup for the programming environment it is named after. For example, PrgEnv-cray represents the default HPE Cray Supercomputing Programming Environment.

Customization

The default set of modules included in each programming environment can be customized for a specific system. These customizations are defined in configuration files located at:

/etc/cray-pe.d/cray-pe-configuration.sh
/etc/cray-pe.d/cray-pe-configuration.csh

Note: If your system uses the Lmod module system, you must ensure that a craype-network* module (for example, craype-network-ofi) is loaded before loading a PrgEnv module. This is required because CPE uses a dynamic module hierarchy in Lmod, and the network module is a key part of that hierarchy.

By using PrgEnv modules, you can efficiently manage programming environments and easily switch between them as needed.

Swapping Programming Environments

CPE PrgEnv meta modules enable users to switch between CPE-supported programming environments.

PREREQUISITES

System module environment setup completed.

OBJECTIVE

Swap an entire programming environment.

PROCEDURE

HPE recommends using the swap command in both Lmod and TCL modules. Using swap in Lmod forces an unload before reloading the desired modules. Using the swap command ensures that the system deploys the correct dynamic Lmod hierarchy paths.

Scenario: The user has the default PrgEnv meta module set loaded in their current environment. This module set includes the PrgEnv-cray module. However, the user requires a GNU programming environment. To switch the two modules, the user can switch to the CPE supported GNU environment by swapping the PrgEnv-cray module for PrgEnv-gnu module. For example, in Lmod. enter:

user# module list

Currently Loaded Modules:
1) craype-x86-rome          5) cce/17.0.0          9) cray-libsci/24.05.0
2) libfabric/1.20.1         6) craype/2.7.29      10) PrgEnv-cray/8.5.0
3) craype-network-ofi       7) cray-dsmml/0.3.0
4) perftools-base/24.07.0   8) cray-mpich/8.1.0

user# module swap PrgEnv-cray/8.5.0 PrgEnv-gnu

Lmod is automatically replacing cce/18.0.1.2 with gcc-native/13.2

Due to MODULEPATH changes, the following have been reloaded:
1) cray-libsci/24.07.0   2) cray-mpich/8.1.30

user# module list

Currently Loaded Modules:
1) craype-x86-rome          5) gcc-native/13.0     9) cray-libsci/24.05.0
2) libfabric/1.20.1         6) craype/2.7.29      10) PrgEnv-gnu/8.5.0
3) craype-network-ofi       7) cray-dsmml/0.3.0
4) perftools-base/24.07.0   8) cray-mpich/8.1.0