@@ -13,46 +13,29 @@ proc ModulesHelp { } {
1313
1414module load global/directories
1515
16+
1617if { [info exists env(SAVUHOME)] } {
1718 set gitrepo $env(SAVUHOME)
1819}
1920
20- # Set RHEL 6 or 7
21- # set redhatrelease [eval exec "cat /etc/redhat-release"]
22- # if { [regexp -nocase {release 6} $redhatrelease] } {
23- # set OS rhel6
24- # } elseif { [regexp -nocase {release 7} $redhatrelease] } {
25- # set OS rhel7
26- # } else {
27- # puts stderr "Incompatible operating system."
28- # }
29-
30- # # switch OS
31- # if { [info exists env(SWITCH_SAVU_OS)] } {
32- # if { [string equal $OS rhel7] } {
33- # set OS rhel6
34- # } else {
35- # set OS rhel7
36- # }
37- # }
38-
39- #============================================================================
40- # When creating a new module, update these variables.
41- set savu_version 3.0
42-
43- set mpi_version 3.1.4
44- # if { [string equal $OS rhel6] } {
45- # set PYTHON_HOME $env(softwaredir)/savu/2.4_RHEL6/miniconda
46- # setenv SAVU_PLUGINS_PATH /dls_sw/apps/savu/2.4_RHEL6/savu_plugins
47- # #puts stderr "\tLoading Savu for RHEL 6"
48- # } else {
49- set PYTHON_HOME $env(softwaredir)/savu/3.0_RHEL7/savu
50- # set PYTHON_HOME $env(softwaredir)/savu/3.0_RHEL7/miniconda
51- setenv SAVU_PLUGINS_PATH /dls_sw/apps/savu/3.0_RHEL7/savu_plugins
52- #puts stderr "\tLoading Savu for RHEL 7"
53- # }
54-
55- #============================================================================
21+
22+ set hostname [eval exec "cat /proc/sys/kernel/hostname"]
23+ if { [regexp -nocase {cs03r-sc-serv-39} $hostname] } {
24+ puts stderr "\t Unfortunately Savu won't work on this node, please start a new nx session."
25+ exit
26+ } elseif { [regexp -nocase {cs03r-sc-serv-40} $hostname] } {
27+ puts stderr "\t Unfortunately Savu won't work on this node, please start a new nx session."
28+ exit
29+ } else {
30+ #============================================================================
31+ # When creating a new module, update these variables.
32+ set savu_version 4.0
33+ set mpi_version 4.1.1
34+ set PYTHON_HOME /dls_sw/apps/savu/4.0/miniconda
35+ set hebi /dls_sw/apps/savu/hebi
36+ #============================================================================
37+ }
38+
5639
5740set mach $tcl_platform(machine)
5841module-whatis "loads Savu version $savu_version"
@@ -74,6 +57,7 @@ if { [module-info mode load] } {
7457 module load openmpi/$mpi_version
7558 }
7659
60+
7761 if { ! [info exists env(SAVU_PRERELEASE)] } {
7862 puts stderr "\n\t\t ********************************************"
7963 puts stderr "\t\t * Loading Savu version $savu_version *"
@@ -91,37 +75,35 @@ if { [module-info mode load] } {
9175 module unload openmpi/$mpi_version
9276 }
9377
94- # TODO is this necessary? SAVUHOME seems like a user-set environment
95- # so we shouldn't automatically delete it
96- # if { [info exists env(SAVUHOME)] } {
97- # unsetenv SAVUHOME
98- # puts stderr "Cleaning up SAVUHOME"
99- # }
100-
101- # if { [info exists env(SWITCH_SAVU_OS)] } {
102- # unsetenv SWITCH_SAVU_OS
103- # puts stderr "Cleaning up SWITCH_SAVU_OS"
104- # }
78+ if { [info exists env(SAVUHOME)] } {
79+ unsetenv SAVUHOME
80+ puts stderr "Cleaning up SAVUHOME"
81+ }
82+
10583}
10684
10785setenv PYTHONNOUSERSITE True
10886prepend-path PATH $PYTHON_HOME/bin
87+ prepend-path PATH $hebi
10988
11089module add fastxrf
11190
11291set-alias "savu_mpi" "savu_launcher.sh -s $savu_version"
11392set-alias "savu_mpi_auto" "savu_launcher.sh -s $savu_version -t AUTO"
11493set-alias "savu_mpi_preview" "savu_launcher.sh -s $savu_version -t PREVIEW"
94+ set-alias "savu_mpi_com14" "savu_launcher.sh -s $savu_version -t BIG"
11595
11696if { [info exists gitrepo] } {
11797 prepend-path PATH $gitrepo
11898 prepend-path PYTHONPATH $gitrepo
99+ prepend-path PYTHONPATH $gitrepo/scripts # required for the configurators
119100 set-alias "savu_mpi_dev" "$gitrepo/system_files/dls/mpi/savu_launcher.sh -s $savu_version -i"
120101 set-alias "savu_mpi_local" "$gitrepo/system_files/dls/mpi/savu_mpijob_local.sh"
121- set-alias "savu_config" "python $gitrepo/scripts/ config_generator/savu_config.py "
102+ set-alias "savu_config" "python -m config_generator.savu_config "
122103 set-alias "savu" "python $gitrepo/savu/tomo_recon.py"
123104 set-alias "savu_citations" "python $gitrepo/scripts/citation_extractor/citation_extractor.py"
124105} else {
125106 set-alias "savu" "savu -s cs04r-sc-serv-14"
126107 set-alias "savu_mpi_local" "savu_mpijob_local.sh"
127108}
109+
0 commit comments