Spack is the package manager used by C2SM and MeteoSwiss to install and deploy our software on supercomputers mostly at the Swiss Super Computing Center (CSCS)
Detailed C2SM/MeteoSwiss spack documentation
More about spack in general : Official Spack documentation.
- Tsa
module load python/3.7.4
source /project/g110/spack/user/tsa/spack/share/spack/setup-env.sh # Source spack instance
spack info cosmo # Check available options
spack spec cosmo # Check if your spec is precised enough, else precise more options
cd <cosmo_base_dir> # cosmo, not cosmo/cosmo
spack devbuildcosmo cosmo@dev-build # -t option for test, -c for clean build usually cosmo@dev-build%pgi is enough
- Daint
module load cray-python
source /project/g110/spack/user/daint/spack/share/spack/setup-env.sh # Source spack instance
spack info cosmo # Check available options
spack spec cosmo # Check if your spec is precised enough, else precise more options
cd <cosmo_base_dir> # cosmo, not cosmo/cosmo
spack devbuildcosmo cosmo@dev-build # -t option for test, -c for clean build usually cosmo@dev-build%pgi is enough
If you want to automatically source the correct spack instance depending on the machine you are working on, you can add the following lines to your .bashrc file:
case $(hostname -s) in
tsa*|arolla*) module load python; export SPACK_ROOT=/project/g110/spack/user/tsa/spack ;;
daint*) module load cray-python; export SPACK_ROOT=/project/g110/spack/user/daint/spack ;;
esac
source $SPACK_ROOT/share/spack/setup-env.sh