From 89d900932f25d56db38fae1c91dbb5a229f41985 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de>
Date: Wed, 17 May 2023 15:41:10 +0200
Subject: [PATCH] Putting the spack cache and config to $SCRATCH instead of the
 WORKDIR.

---
 examples/01_real-from-ideal.sh | 32 +++-----------------------------
 1 file changed, 3 insertions(+), 29 deletions(-)

diff --git a/examples/01_real-from-ideal.sh b/examples/01_real-from-ideal.sh
index fc5e3e0..1212f18 100755
--- a/examples/01_real-from-ideal.sh
+++ b/examples/01_real-from-ideal.sh
@@ -93,42 +93,16 @@ GIT:
   FETCH_SINGLE_BRANCH: True
 EOF
 
-
-cat > autosubmit/${EXPID}/conf/myplatforms.yml <<EOF
-#Platforms:
-#  LMU:
-#    TYPE: slurm
-#    HOST: $HOSTNAME
-#    PROJECT: $PROJECTNAME
-#    USER: $(whoami)
-#    SCRATCH_DIR: $WORKDIR
-#    ADD_PROJECT_TO_HOST: False
-#    MAX_WALLCLOCK: '48:00'
-#    TEMP_DIR: ''
-#    CUSTOM_DIRECTIVES: "#SBATCH --export=ALL,OMPI_MCA_btl_tcp_if_include=10.0.0.0/8"
-#
-#  LRZ:
-#    # TYPE: slurm
-#    TYPE: ps
-#    HOST: LRZ-kcs
-#    PROJECT: lxcusers
-#    USER: ra57nun
-#    SCRATCH_DIR: /dss/dssfs02/lwp-dss-0001/uh211/uh211-dss-0000/ra57nun
-#    ADD_PROJECT_TO_HOST: False
-#    MAX_WALLCLOCK: '48:00'
-#    TEMP_DIR: ''
-EOF
-
 cat > autosubmit/${EXPID}/conf/myconf.yml <<EOF
 spack:
   init: "" # command to load spack environment, e.g. module load spack, use spack/setup-env.sh if empty
   url: https://github.com/spack/spack.git # url to download spack if necessary
   branch: develop # if downloaded, branch name to use
   compiler: "gcc@11.3.0" # desired compiler for spack
-  root: "%HPCROOTDIR%/../spack" # path to a spack install, will be downloaded to if not present
+  root: "$SCRATCH/autoicon-spack" # path to a spack install, will be downloaded to if not present
   externals: "slurm"
-  user_cache_path:  "%HPCROOTDIR%/../spackcache" # spack puts data here when bootstrapping, leave empty to use home folder
-  user_config_path: "%HPCROOTDIR%/../spackconfig" # spack puts data here when bootstrapping, leave empty to use home folder
+  user_cache_path:  "$SCRATCH/autoicon-spackcache" # spack puts data here when bootstrapping, leave empty to use home folder
+  user_config_path: "$SCRATCH/autoicon-spackconfig" # spack puts data here when bootstrapping, leave empty to use home folder
   disable_local_config: false # if true, spack installs into spack source dir
   upstreams: "/software/opt/focal/x86_64/spack/2023.02"
 
-- 
GitLab