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

Sanity check causes problems with our setup #787

Closed
ocaisa opened this issue Dec 12, 2013 · 1 comment
Closed

Sanity check causes problems with our setup #787

ocaisa opened this issue Dec 12, 2013 · 1 comment
Milestone

Comments

@ocaisa
Copy link
Member

ocaisa commented Dec 12, 2013

At JSC we have the current modules environment which contains some modules that conflict with EB. To avoid any problems I created the following module file that changes the module path to only point to the EB space:

#%Module1.0##########################################################
##
## EasyBuild ZAM Developers modulefile
##
proc ModulesHelp { } {
  puts stderr "  This module will purge the default module environment and replace it "
  puts stderr "  with the EasyBuild module environment instead."
  puts stderr "  I have installed toolchains for GCC and Intel compilers by default."
  puts stderr "  For the Intel compiler toolchain with Parastation MPI, load the impmkl module"
  puts stderr "  - this includes Intel MKL using Parastation MPI"
  puts stderr "  For the Intel compiler toolchain with Intel MPI, load the ictce module"
  puts stderr "  - this includes Intel MKL using Intel MPI"
  puts stderr "  For the GCC compiler toolchain with Parastation MPI, load the gmpolf module"
  puts stderr "  - this includes Parastation MPI, OpenBLAS, FFTW and ScaLAPACK"
  puts stderr "  "
}

module-whatis   "Module to set up ZAM developer space for EasyBuild"


# Set the default path to be the common development space
set            pkgroot           /usr/local/eb      
setenv         EASYBUILD_PREFIX  $pkgroot

# Make sure that people build in a unique space so we avoid stepping on each others toes as much as possible
setenv         EASYBUILD_BUILDPATH   "/tmp/$::env(USER)"

# Indicate that we (currently) use Tcl modules 
setenv         EASYBUILD_MODULES_TOOL   EnvironmentModulesTcl

# Set the python path to find all the EasyBuild files
prepend-path     PYTHONPATH       $pkgroot/lib/python2.6/site-packages

# Set the path to find the eb command AND to find the modulecmd.tcl
prepend-path     PATH         $pkgroot/bin
prepend-path     PATH         /usr/local/module

# Finally, purge installed modules and set the new module path
module purge
setenv      MODULEPATH  /usr/local/eb/modules/all 

The problem is loading this module leaves you with a loaded module that needs to be found in the module path. I created a dummy module (which is identical except for the last 2 lines) for this case that, when unloaded, puts you back into the default environment:

# Finally, ~~purge installed modules and set the new module path~~ sneakily reset the path
unsetenv        MODULEPATH  /usr/local/modulefiles/COMPILER:/usr/local/modulefiles/MATH:/usr/local/modulefiles/SCIENTIFIC:/usr/local/modulefiles/IO:/usr/local/modulefiles/TOOLS:/usr/local/modulefiles/MISC

The problem is that this approach breaks the sanity checks. Is there a better way?

@boegel boegel modified the milestone: 3.x May 2, 2017
@boegel boegel modified the milestones: 3.x, 4.x Feb 20, 2020
@ocaisa
Copy link
Member Author

ocaisa commented Sep 26, 2022

Life has moved on, closing this

@ocaisa ocaisa closed this as completed Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants