From 450eed185a4b2c67a5c762b68aae3c653f7a1391 Mon Sep 17 00:00:00 2001
From: "Takumi.Matsunobu" <Takumi.Matsunobu@physik.uni-muenchen.de>
Date: Fri, 7 Jul 2023 10:41:30 +0200
Subject: [PATCH] Update job.yml

---
 conf/real-from-d2-ana/jobs.yml | 56 +++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/conf/real-from-d2-ana/jobs.yml b/conf/real-from-d2-ana/jobs.yml
index 9275908..03791d9 100644
--- a/conf/real-from-d2-ana/jobs.yml
+++ b/conf/real-from-d2-ana/jobs.yml
@@ -1,6 +1,29 @@
 JOBS:
+  TRANSFER_PROJECT:
+    FILE: templates/common/transfer_project.sh
+    PLATFORM: LOCAL
+
+  BUILD_ICON:
+    FILE: templates/common/build_icon.sh
+    DEPENDENCIES: TRANSFER_PROJECT
+    WALLCLOCK: 04:00
+    PROCESSORS: 16
+    RETRIALS: 2 # retry because spack downloads sometimes timeout
+    NODES: 1
+
+  BUILD_PYTHON_ENVIRONMENT:
+    FILE: templates/common/build_python_environment.sh
+    # Right now we rely on spack for building icon and having a python interpreter, so we need this dependency:
+    DEPENDENCIES: BUILD_ICON
+    WALLCLOCK: 01:00
+    PROCESSORS: 16
+    NODES: 1
+
   PREPARE_EXPERIMENT:
     FILE: templates/real-from-d2-ana/prepare_experiment.sh
+    DEPENDENCIES: BUILD_ICON
+    RUNNING: once
+    WALLCLOCK: 01:00
 
   PREPARE_DATE_LOCAL:
     FILE: templates/real-from-d2-ana/prepare_date_local.sh
@@ -29,10 +52,41 @@ JOBS:
   PREPARE_NAMELIST:
     FILE: templates/real-from-d2-ana/prepare_namelist.py
     DEPENDENCIES: PREPARE_LBC_REMOTE RUN_ICON-1
+    WALLCLOCK: 00:05
+    RUNNING: chunk
+    TYPE: python
+    EXECUTABLE: "%HPCROOTDIR%/%python_environment.folder_name%/bin/python3"
 
   RUN_ICON:
     FILE: templates/common/run_icon.sh
     DEPENDENCIES: PREPARE_NAMELIST
     WALLCLOCK: 12:00
     PROCESSORS: 64
-    MEMORY: 81920
\ No newline at end of file
+    MEMORY: 81920
+    RUNNING: chunk
+    CUSTOM_DIRECTIVES: [ "#SBATCH --exclusive" ]
+
+  COMPRESS:
+    FILE: templates/common/compress.py
+    DEPENDENCIES: RUN_ICON BUILD_PYTHON_ENVIRONMENT COMPRESS-1
+    RUNNING: chunk
+    TYPE: python
+    EXECUTABLE: "%HPCROOTDIR%/%python_environment.folder_name%/bin/python3"
+    PROCESSORS: 16
+    MEMORY: 16384
+    WALLCLOCK: 01:00
+
+  TRANSFER:
+    FILE: templates/common/transfer.sh
+    DEPENDENCIES: COMPRESS
+    # Since this is running locally, can simply leave a long wallclock.
+    WALLCLOCK: 24:00
+    RUNNING: member
+    PLATFORM: LOCAL
+
+  CLEAN:
+    FILE: templates/common/clean.sh
+    DEPENDENCIES: TRANSFER
+    WALLCLOCK: 00:10
+    RUNNING: member
+
-- 
GitLab