Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add system to modulepath #9

Merged
merged 2 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions files/vsc.csh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,19 @@ eval `/usr/bin/vsc_env csh`

setenv LMOD_SYSTEM_NAME "${VSC_INSTITUTE_CLUSTER}-${VSC_ARCH_LOCAL}${VSC_ARCH_SUFFIX}"

setenv CLUSTER_MODULEPATH "/etc/modulefiles/vsc"
set CLUSTER_MODULEPATH = "/etc/modulefiles/vsc"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does this change do?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes CLUSTER_MODULEPATH from an environment variable to a normal variable.
we don't need CLUSTER_MODULEPATH for anything else, so it makes more sense to use a normal var.

besides, we unset it at the end of the script with unset CLUSTER_MODULEPATH, which is broken for envvars: you need unsetenv for that.


set modulesroot = "/apps/brussel/${VSC_OS_LOCAL}/${VSC_ARCH_LOCAL}${VSC_ARCH_SUFFIX}/modules"

set i = 2019
if ( -d $modulesroot/${i}b/all ) then
setenv CLUSTER_MODULEPATH "$modulesroot/${i}b/all:${CLUSTER_MODULEPATH}"
endif
set CLUSTER_MODULEPATH = "$modulesroot/system/all:$CLUSTER_MODULEPATH"

set i = 2020
while ($i < 2025)
set i = 2022
while ($i <= 2027)
if ( -d $modulesroot/${i}a/all ) then
setenv CLUSTER_MODULEPATH "$modulesroot/${i}a/all:${CLUSTER_MODULEPATH}"
set CLUSTER_MODULEPATH = "$modulesroot/${i}a/all:${CLUSTER_MODULEPATH}"
endif
if ( -d $modulesroot/${i}b/all ) then
setenv CLUSTER_MODULEPATH "$modulesroot/${i}b/all:${CLUSTER_MODULEPATH}"
set CLUSTER_MODULEPATH = "$modulesroot/${i}b/all:${CLUSTER_MODULEPATH}"
endif
@ i++
end
Expand Down
7 changes: 2 additions & 5 deletions files/vsc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,9 @@ CLUSTER_MODULEPATH="/etc/modulefiles/vsc"

modulesroot="/apps/brussel/${VSC_OS_LOCAL}/${VSC_ARCH_LOCAL}${VSC_ARCH_SUFFIX:-}/modules"

i=2019
if [ -d "$modulesroot/${i}b/all" ]; then
CLUSTER_MODULEPATH="$modulesroot/${i}b/all:$CLUSTER_MODULEPATH"
fi
CLUSTER_MODULEPATH="$modulesroot/system/all:$CLUSTER_MODULEPATH"

for i in {2020..2025}; do
for i in {2022..2027}; do
if [ -d "$modulesroot/${i}a/all" ]; then
CLUSTER_MODULEPATH="$modulesroot/${i}a/all:$CLUSTER_MODULEPATH"
fi
Expand Down
4 changes: 3 additions & 1 deletion vsc-profiles-brussel.spec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Summary: brussel vsc profiles files
Name: vsc-profiles-brussel
Version: 1.41
Version: 1.42
Release: 1
License: GPL
Group: Applications/System
Expand Down Expand Up @@ -42,6 +42,8 @@ rm -rf %{buildroot}


%changelog
* Wed Sep 25 2024 Samuel Moors <[email protected]>
- Add system to MODULEPATH
* Fri Oct 27 2023 Ward Poelmans <[email protected]>
- Adjust scratch regex to also support rhea scratch
* Fri Sep 29 2023 Alex Domingo <[email protected]>
Expand Down
Loading