Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
minLevel1
maxLevel3
outlinefalse
stylenone
typelist
printabletrue

...

0. Define local module command (only once)

To utilize local modules, we suggest creating a bash command such as localmod that contains essential setup within your $HOME/.bashrc. The provided set of commands below will create a local module directory based on LOCALMOD_DIR and then define the localmod command in your $HOME/.bashrc.

...

Code Block
languagebash
LOCALMOD_DIR=$HOME/localmod           # *** EDITABLE, set to an empty path ***

mkdir -p ${LOCALMOD_DIR}              # Create the directory if not already exist
cat << Eof >> $HOME/.bashrc           # Define the below "localmod" function in your .bashrc
function localmod(){
  export EASYBUILD_PREFIX=${LOCALMOD_DIR}   
  module use \${EASYBUILD_PREFIX}/modules/all
  export EASYBUILD_OPTARCH=x86-milan
  echo "*** Import modules at \${EASYBUILD_PREFIX} on LANTA ***"
}
Eof
Expand
titleNote & Check
  • If you copy the above localmod function directly and paste it in your .bashrc, don’t forget to remove \ before $.

  • After this step, if you execute cat $HOME/.bashrc, the output should contain.

    Code Block
    languagebash
    function localmod(){
      export EASYBUILD_PREFIX=<Path-to-your-specified-directory>   
      module use ${EASYBUILD_PREFIX}/modules/all
      export EASYBUILD_OPTARCH=x86-milan
      echo "*** Import modules at ${EASYBUILD_PREFIX} on LANTA ***"
    }
Expand
titleMore explanation
  • module use will import extra modules to your Lmod system, i.e., MODULEPATH.

  • EASYBUILD_PREFIX variable is for setting default paths when using EasyBuild.

  • EASYBUILD_OPTARCH variable must be set to x86-milan to be consistent with LANTA hardware.

...