Some procedures¶
Installing a new version of the Cray PE on the system¶
Part 1: Making available in CrayEnv¶
These instructions are enough to make the new CPE available in the CrayEnv stack
but do not yet include instructions for EasyBuild
-
Install the CPE components using the instructions of HPE
-
Create the components file in the
CrayPEsubdirectory of the repository. This is currently a simple .csv-file but may be replaced by a different one if HPE would provide that information in machine-readable format in a future version of the CPE.Much of that information can be extracted from the HPE-Cray provided file
/opt/cray/pe/cpe/yy.mm/modulerc.lua, though we do currently keep some additional packages in that file that don't have their defaults set in that file. One of them which is actually used in the LUMIpartition module file is the version of the craype-targets packages (essentially the CPE targeting modules). -
This step is only needed if you don't do part 2 as the installation script used in part 2 of this procedure will also do this.
Add a
cpe/yy.mm.lualink for the just installed programming environment to themodules/CrayOverwrite/coresubdirectory of the modules tree (NOT in themodulesdirectory of the repository). This file does need the .csv file generated in the previous step to function properly.Note that this directory also contains a link named
.modulercto the.versionfile of `/opt/cray/pe/lmod/modulefiles/core/cpe''. It is essential that the default version of thecpemodule is the same in the original module directory and inCrayOVerwriteas otherwise the original one may get loaded in some circumstances. By using the symbolic link and the new name with higher priority we assure that the modules fromCrayOVerwriteare used. One still needs to ensure that the overwrite modules also are more to the front of theMODULEPATHor things still go wrong. -
This step is only needed if you don't do part 2 as the installation script used in part 2 of this procedure will also do this.
If
/opt/cray/pe/cpe/yy.mm/modulerc.luais missing on the system, an alternative needs to be generated and stored inmodules/CrayOverwrite/data-cpe/yy.mmas it is used by the generic cpe module installed in the previous step.This can be done by running
./make_CPE_modulerc yy.mmin thescriptssubdirectory ofSystemRepo. -
Hide the new cpe module installed in the Cray PE subdirectory by adding a line to
LMOD/modulerc.luain theLUMI-SoftwareStackrepository. -
If there are new Cray targeting modules that are irrelevant for LUMI you may want to hide them in the respective code block in
LMOD/LUMIstack_modulerc.luain theLUMI-SoftwareStackrepository.
Part 2: Adding support as a LUMI/yy.mm(.dev) software stack¶
From here on the setup is largely automated by the prepare_LUMI_stack.sh script
in the scripts subdirectory of the repository. A few things need to be in place
though before running this script:
-
The component definition of the Cray PE software stack in the .csv file in the
CrayPEsubdirectory. -
An EasyConfig file for the right version of EasyBuild in the
easybuild/easyconfigs/e/EasyBuildsubdirectory of the repository.Note that it is always possible to run
prepare_LUMI_stack.sh-script withEASYBUILD_IGNORE_CHECKSUMS=1set if the checksums in the EasyConfig file are not yet OK. -
Add a software stack-specific configuration file
easybuild-production-LUMI-yy.mm.cfgfor EasyBuild if needed in theeasybuild/configsubdirectory of the repository.We currently don't include the
.devextension, i.e., if there is a development and an LTS software stack for the same version of the CPE, they share the EasyBuild configuration file. This makes sense because the development stack is meant to prepare for a production stack.
Furthermore you may want to make sure that the proper versions of the following files are available in the repository should you want to make changes compared to versions installed before:
-
The generic
EasyBuild-configmodule should you want to make changes to, e.g., the environment variables et by that module. -
The generic
LUMIstackandLUMIpartitionmodule. -
The generic cpe module
cpe-generic.
The software stack initialisation script will take the most recent one (based on the yy.mm version number) that is not newer than the release of the CPE for the software stack.
The prepare_LUMI_stack.sh script takes three arguments, and the order is important:
-
The version of the software stack: the Cray PE version, with the extension
.devfor a development stack (e.g., 21.05.dev or 21.06). -
The version of EasyBuild to install in the software stack
-
A work directory for temporary files, used to install a bootstrapping copy of EasyBuild. Rather than trying to use an EasyBuild installation from an older software stack if present to bootstrap the new one, we simply chose to do a bootstrap every time the script is run as this is a procedure that simply always works, though it is more time consuming.
The advantage however is that one can just clone the production repository anywhere, run an initialisation script to initialise the structure around the repository, then initialise a software stack and start working.
The script then does the following steps:
-
Generate our own
cpe/yy.mmmodule inmodules/CrayOverwrite/coreby creating a symbolic link to the right version of the generic modules inSystemRepo. -
Check if the Cray PE comes with its own
modulerc.luafile with the default components (if so, that file can be found in/opt/cray/pe/cpe/yy.mm). If not an alternative file is generated from the data in the compoments .csv file and stored inmodules/CrayOverwrite/data-cpe/yy.mm.The file is used by the generic
cpe/yy.mmmodule inmodules/CrayOVerwrite/core. -
Create the software stack module files by symlinking to the generic implementations in
SystemRepo. -
Create the partition modules (second level in the hierarchy) by symlinking to the generic implementations in
SystemRepo. -
Create the
LUMIstack_yy.mm_modulerc.luafile inmgmt/LMOD/ModuleRC. Currently this file only contain references to Cray PE modules and as such correspond to themodulerc.luafile in/opt/cray/pe/cpe/yy.mmbut his may change in a future version. Whereas the aforementionedmodulerc.luafiles are meant to be activated by thecpe.yy.mmmodules and hence to be used by any software stack that uses the Cray PE, theLUMIstack_yy.mm_modulerc.luaare really meant exclusively for the LUMI software stack.This is done by running the
make_LUMIstack_modulerc.shscript. -
Creates the
CPE_modules_*.luafile inmgmt/LMOD/VisibilityHookDataformodule availvisibility hook inSitePackage.lua. This is done by running themake_CPE_VisibilityHookData.shscript. -
Creates the full directory structure for the software stack for the modules, the binary installations and the EasyBuild repo.
-
Creates the EasyBuild external modules definition file from the data in the corresponding
CPEpakcages_<CPE version>.csvfile (if the file does not yet exist). This file is stored in the repo as it may be useful for other people who check out the repository to know what is going on. -
Creates the EasyBuild-production, EasyBuild-infrastructure and EasyBuild-user modules for each partition by softlinking to the matching generic file in the
SystemRepo. -
Downloads the selected version of EasyBuild to the EasyBuild sources directory if the files are not yet present.
-
Installs a bootstrapping version of EasyBuild in the work directory. As that version will only be used to install EasyBuild from our own EasyConfig file, there is no need to also install the EasyConfig files.
-
Loads the software stack module for the common partition and the EasyBuild-production module to install EasyBuild in the software stack.
-
Create EasyConfig files in the repository for the
cpeCray,cpeGNUandcpeAMDtoolchains (if those files do not yet exist) and use the just installed EasyBuild to install them in theInfrastructuremodule subdirectory for all 4 regular and the common partition.The toolchain definition EasyConfig files are generated by the
make_CPE_EBfile.shscript.
Things to do afterwards:
- If you want to change the default version of the LUMI software stack module,
you can do this by editing
.modulerc.luainmodules/SoftwareStack/LUMI.
And now one should be ready to install other software...
-
Ensure the software stack module is loaded and the partition module for the location where you want to install the software is loaded (so the hidden module partition/common to install software in the location common to all regular partitions)
-
Load EasyBuild-production for an install in the production directories or EasyBuild-user for an install in the user or project directories (and you'll need to set some environment variables beforehand to point to that location).
Making a master installation of the software stack¶
A master version is an installation of the full system that can run independently from another installation. This is made easy so that it is possible to install a master version under a personal account or on a test system for testing and development independent from the central installation on the system.
-
Create an empty directory which will be the root of the software installation.
-
Clone the
LUMI-SoftwareStackrepository in that directory. You can change the name of the repository directory to anything as the whole installation is independent of that name provided thatLMOD_PACKAGE_PATHrefers to the LMOD installation in that repository. In the documentation, we call the directorySystemRepo(as opposed toUserRepofor a user installation that depends on a master installation). -
Run the
prepare_LUMI.shscript fromSystemRepo/scriptsto initialise the directory structure. The script takes no arguments but it is important to run the version in theSytemRepoin the software installation that needs to be initialised. -
Running the
enable_LUMI.shscript fromSystemRepo/scriptsprints the (bash) shell commands that need to be executed to initialise the shell to start using this software installation. A very good way is to use it witheval:eval $(<directory>/SystemRepo/scripts/enable_LUMI.sh)
Now use the procedure "Installing a new version of the Cray PE on the system" to start a new version of the LUMI software stack, skipping the creation of those files that may already be in the repository because someone else has done them already.
Bumping the toolchain to a newer version without changing the other dependencies¶
For now, we use the script upgrade-tc.py developed at CSCS and kept in the tools
subdirectory. It is also available when any of our EasyBuild configuration modules is loaded.
Bumping the toolchain to a newer version and changing the other dependencies¶
Two scripts situated in the tools subdirectory and available in the path when any of the
EasyBuild configuration modules is loaded can help with this:
upgrade-tc.pyis a script developed at CSCS to upgrade the toolchain in the EasyConfig file. It will also update the name of the EasyConfig file to reflect the new toolchain version.upgrade-locals.txtuses the set oflocal_*_versionvariable defintions in one of theversions-yy.mm.txtfiles to update those variables in one or more given EasyConfig file.