Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
outlinetrue

...

Code Block
languagebash
# detect kernel version, then source spack file if it exists
_KERNEL_VERSION=$(uname -r | cut -d '.' -f1,2,3)
if [[ "${HOSTNAME}" != "pascal.med.cornell.edu" ]] || [[ "${HOSTNAME}" != "aphrodite.med.cornell.edu" ]] || [[ "${HOSTNAME}" != "aristotle.med.cornell.edu" ]]; then
    if [[ "${_KERNEL_VERSION}" == *"2.6.3"* ]] ; then
        if [ -f /softlib/apps/EL6/spack/share/spack/setup-env.sh ] ; then
            . /softlib/apps/EL6/spack/share/spack/setup-env.sh
    fi
  fi
        fi
    fi
    if [[ "${_KERNEL_VERSION}" ==  *"3.10"* ]] ; then
        if [ -f /software/spack/centos7/share/spack/setup-env.sh ] ; then
            . /software/spack/centos7/share/spack/setup-env.sh
        elif [ -f /software/spack/share/spack/setup-env.sh ] ; then
            . /software/spack/share/spack/setup-env.sh
        fi
    fi
fi
builtin unset _KERNEL_VERSION

...

Warning

Note: Sometimes, you'll see multiple installations of the same package installed on the same OS, with the same compiler (e.g. relion@3.0_beta is listed 3 times in the above output). What this means is that this packages was installed for the same OS/compiler, but with different configuration options. This will be explained in the next section.

...

Warning

Before loading any Spack packages, it is helpful to know that Spack stores a list of loaded packages in the variable $LOADEDMODULES. Executing the command echo $LOADEDMODULES at this point will produce a blank line, as we haven't loaded Spack packages yet (try it out, just to prove this to yourself).

...

Code Block
spack load -r python@3.7.0^gcc@6.3.0
  • The -r instructs Spack to load all modules that python@3.7.0 depends on. This is typically done automatically, but not currently done for perl, python, or R (this is because Spack does not build these packages with RPATH support--this may change in the future).

...

Code Block
echo $LOADEDMODULES | sed "s/:/\n/g" | sort

Here, we can see that python@3.7.0 is indeed loaded, as are all packages that it depends on.

...