From 5761d57c6a7c094414d50efaefaa292105ad411e Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Wed, 10 Jul 2024 11:03:35 +0200 Subject: [PATCH 1/5] Fix wording in allowed sources keys The allowed keys are more then three. e.g. `git_config wasn't available until 3.7 --- docs/writing-easyconfig-files.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/writing-easyconfig-files.md b/docs/writing-easyconfig-files.md index 7238a928c..39e99e3d9 100644 --- a/docs/writing-easyconfig-files.md +++ b/docs/writing-easyconfig-files.md @@ -443,7 +443,7 @@ filename that should be used to download the source file. This can be specified using a Python dictionary value in the `sources` easyconfig parameter. -Since EasyBuild v3.3.0, three keys are supported: +The following keys are supported: - `filename` (*mandatory*): filename of source file - `download_filename`: filename that should be used when downloading From bbfa3abebc7003feef8016b8d020d18a0aa1ae7a Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Tue, 3 Sep 2024 20:20:39 +0200 Subject: [PATCH 2/5] Update link to official Tcl website --- docs/installation.md | 2 +- docs/installing-environment-modules-without-root-permissions.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 0d2b5bd4b..6c60f9b37 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -369,7 +369,7 @@ Supported module tools: Additional notes: -* Tcl(/C) environment-modules requires [Tcl](https://www.tcl.tk/) to be +* Tcl(/C) environment-modules requires [Tcl](https://www.tcl-lang.org/) to be installed (with header files and development libraries) * Lmod requires [Lua](https://www.lua.org/) and a couple of non-standard Lua libraries (`lua-posix`, `lua-filesystem`) to be available diff --git a/docs/installing-environment-modules-without-root-permissions.md b/docs/installing-environment-modules-without-root-permissions.md index e93910ec4..069933d2f 100644 --- a/docs/installing-environment-modules-without-root-permissions.md +++ b/docs/installing-environment-modules-without-root-permissions.md @@ -6,7 +6,7 @@ Mac OS X system, together with Tcl on which it depends. ## Tcl -1. Go to and download the latest Tcl sources. At +1. Go to and download the latest Tcl sources. At the time of writing, the latest available Tcl version was 8.5.15, which can be downloaded from [here](https://prdownloads.sourceforge.net/tcl/tcl8.5.15-src.tar.gz). From ac99513ce267489a8095b9132ced4654eb9fb931 Mon Sep 17 00:00:00 2001 From: Xavier Delaruelle Date: Tue, 3 Sep 2024 20:43:29 +0200 Subject: [PATCH 3/5] Update Environment Modules installation doc Update installation guidelines to use latest Environment Modules version. Fixes #263 --- docs/installation.md | 2 +- ...onment-modules-without-root-permissions.md | 50 +++++++++---------- 2 files changed, 24 insertions(+), 28 deletions(-) diff --git a/docs/installation.md b/docs/installation.md index 6c60f9b37..77abfc13c 100644 --- a/docs/installation.md +++ b/docs/installation.md @@ -375,7 +375,7 @@ Additional notes: (`lua-posix`, `lua-filesystem`) to be available * Tcl (`tclsh`) must also be available for Lmod to support module files in `Tcl` syntax * a guide to installing Tcl/C environment modules without having root - permissions is available at [Installing environment modules without root permissions][installing_env_mod_c]. + permissions is available at [Installing environment modules without root permissions][installing_env_mod]. * a guide to installing Lmod without having root permissions is available at [Installing Lmod without root permissions][installing_lmod]. diff --git a/docs/installing-environment-modules-without-root-permissions.md b/docs/installing-environment-modules-without-root-permissions.md index 069933d2f..54adbcd80 100644 --- a/docs/installing-environment-modules-without-root-permissions.md +++ b/docs/installing-environment-modules-without-root-permissions.md @@ -1,25 +1,22 @@ -# Installing environment modules without root permissions {: #installing_env_mod_c } +# Installing Environment Modules without root permissions {: #installing_env_mod } -This short guide will explain how to install the standard environment -modules Tcl/C software package without root permissions on a Linux or +This short guide will explain how to install the standard Environment +Modules software package without root permissions on a Linux or Mac OS X system, together with Tcl on which it depends. ## Tcl 1. Go to and download the latest Tcl sources. At - the time of writing, the latest available Tcl version was 8.5.15, + the time of writing, the latest available Tcl version was 8.6.14, which can be downloaded from - [here](https://prdownloads.sourceforge.net/tcl/tcl8.5.15-src.tar.gz). - The remainder of these commands will assume Tcl v8.5.15 is being - installed, you may need to adjust them accordingly. **Note**: Stick - to Tcl v8.5.x, don't consider using the more recent v8.6.x or - higher, since the environment modules package is not compatible with - those Tcl versions. + [here](https://prdownloads.sourceforge.net/tcl/tcl8.6.14-src.tar.gz). + The remainder of these commands will assume Tcl v8.6.14 is being + installed, you may need to adjust them accordingly. 1. Unpack the Tcl source tarball: ``` shell - tar xfvz tcl8.5.15-src.tar.gz + tar xfvz tcl8.6.14-src.tar.gz ``` 1. Pick a location where you will install Tcl. It should be a directory @@ -30,12 +27,12 @@ Mac OS X system, together with Tcl on which it depends. the `configure` script using the `--prefix` option: ``` shell - cd tcl8.5.15/unix + cd tcl8.6.14/unix ./configure --prefix=$HOME/.local/Tcl ``` - If you're building Tcl and environment modules on Mac, you should - run `configure` in the `tcl8.5.15/macosx` directory instead. + If you're building Tcl and Environment Modules on Mac, you should + run `configure` in the `tcl8.6.14/macosx` directory instead. 1. Next, build Tcl using the `make` command. If the system you are building on has multiple cores, running make in parallel will speed @@ -54,38 +51,37 @@ Mac OS X system, together with Tcl on which it depends. make install ``` -**All done!** Now you are ready to build the environment modules +**All done!** Now you are ready to build the Environment Modules package, which requires Tcl. ## Environment Modules -1. Download the latest source tarball for the environment modules tools +1. Download the latest source tarball for the Environment Modules tools from . At the time of writing, the - latest available version is 3.2.10 which can be downloaded [from - here](https://prdownloads.sourceforge.net/modules/modules-3.2.10.tar.gz). + latest available version is 5.4.0 which can be downloaded [from + here](https://prdownloads.sourceforge.net/modules/modules-5.4.0.tar.gz). 1. Unpack the downloaded source tarball: ``` shell - tar xfvz modules-3.2.10.tar.gz + tar xfvz modules-5.4.0.tar.gz ``` 1. Configure the build, again use `--prefix` to specify where to - install the environment modules tool in the end. If you needed to + install the Environment Modules tool in the end. If you needed to install Tcl by hand as outlined in the previous section, you'll also need to specify where it was installed using the `--with-tcl` option: ``` shell - cd modules-3.2.10 + cd modules-5.4.0 ./configure --prefix=$HOME/.local/environment-modules --with-tcl=$HOME/.local/Tcl/lib ``` -1. Build with `make`, consider parallel build if your system is recent - enough: +1. Build with `make`: ``` shell - make -j 4 + make ``` 1. Install: @@ -98,17 +94,17 @@ Alright, now just one more thing... ## Set up your environment -Because you've installed environment modules and Tcl in a non-default +Because you've installed Environment Modules and Tcl in a non-default location, you need to make sure your environment is setup up correctly to use them. To make a long story short, these are the commands you need to execute: ``` shell -export PATH=$HOME/.local/environment-modules/Modules/3.2.10/bin:$PATH +export PATH=$HOME/.local/environment-modules/bin:$PATH export LD_LIBRARY_PATH=$HOME/.local/Tcl/lib:$LD_LIBRARY_PATH # adjust line below if you're using a shell other than bash, check with 'echo $SHELL' -source $HOME/.local/environment-modules/Modules/3.2.10/init/bash +source $HOME/.local/environment-modules/init/bash ``` !!! tip From e743a91ba98a669e839048a2c4a58c44d7bf8211 Mon Sep 17 00:00:00 2001 From: Simon Branford <4967+branfosj@users.noreply.github.com> Date: Wed, 11 Sep 2024 10:02:24 +0100 Subject: [PATCH 4/5] example of adding a hook conditional on EasyBuild version --- docs/hooks.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/hooks.md b/docs/hooks.md index 1c4977561..50222a04c 100644 --- a/docs/hooks.md +++ b/docs/hooks.md @@ -357,3 +357,16 @@ def post_run_shell_cmd_hook(cmd, work_dir=None, interactive=None, exit_code=None cmd_type = 'interactive' if interactive else 'non-interactive' fp.write("%s command '%s' in %s exited with %s - output: %s\n" % (cmd_type, cmd, work_dir, exit_code, output)) ``` + +### Adding a hook conditional on EasyBuild version + +If an unknown hook is used then EasyBuild will error (see [Available hooks](#available-hooks)). The following example only +adds the `pre_build_and_install_loop_hook` if the EasyBuild version is `>= "4.8.1"`. + +```py +from easybuild.tools.version import VERSION + +if VERSION >= "4.8.1": + def pre_build_and_install_loop_hook(ecs, *args, **kwargs): + pass +``` From 247fbc13bcf16920942868f0301149e34464cbbe Mon Sep 17 00:00:00 2001 From: sam Date: Wed, 11 Sep 2024 14:00:00 +0200 Subject: [PATCH 5/5] fix iimkl for 2022a --- docs/common-toolchains.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/common-toolchains.md b/docs/common-toolchains.md index 0d069852f..3a8ca20c4 100644 --- a/docs/common-toolchains.md +++ b/docs/common-toolchains.md @@ -61,9 +61,8 @@ graph LR Note: following notes apply for the generations listed and those older than it: -- `2022a` - `iimkl` not present yet -- `2021b` - `gfbf` not present yet -- `2020b` - `foss` uses OpenBLAS instead of FlexiBLAS, `iccifort` is used instead of `intel-compilers` +- <= `2021b` - `gfbf` not present yet +- <= `2020b` - `foss` uses OpenBLAS instead of FlexiBLAS, `iccifort` is used instead of `intel-compilers` Keep in mind that when creating an Easyconfig, you need to look at what toolchain "level" (e.g. `foss` vs `GCC`) your