From f85e715b33a1627ef4004c7db81ff8069aad0946 Mon Sep 17 00:00:00 2001
From: Jusong Yu
Date: Tue, 10 Oct 2023 07:50:18 +0000
Subject: [PATCH] Schema changes to add a layer for template variables
---
.../gpu/codes/QE-7.2-exe-template.yml | 17 +++---
daint.cscs.ch/gpu/computer-configure.yml | 9 +--
daint.cscs.ch/gpu/computer-setup.yml | 59 +++++++++---------
.../mc/codes/QE-7.0-exe-template.yml | 17 +++---
.../mc/codes/QE-7.2-exe-template.yml | 17 +++---
daint.cscs.ch/mc/computer-configure.yml | 9 +--
daint.cscs.ch/mc/computer-setup.yml | 59 +++++++++---------
gh_page/resource.schema.json | 49 +++++++++++----
.../cpu/codes/QE-7.0-exe-template.yml | 17 +++---
merlin.psi.ch/cpu/computer-configure.yml | 9 +--
merlin.psi.ch/cpu/computer-setup.yml | 45 +++++++-------
.../gpu/codes/QE-7.0-exe-template.yml | 17 +++---
merlin.psi.ch/gpu/computer-configure.yml | 9 +--
merlin.psi.ch/gpu/computer-setup.yml | 61 ++++++++++---------
14 files changed, 215 insertions(+), 179 deletions(-)
diff --git a/daint.cscs.ch/gpu/codes/QE-7.2-exe-template.yml b/daint.cscs.ch/gpu/codes/QE-7.2-exe-template.yml
index 352d0f9..83e009c 100644
--- a/daint.cscs.ch/gpu/codes/QE-7.2-exe-template.yml
+++ b/daint.cscs.ch/gpu/codes/QE-7.2-exe-template.yml
@@ -8,11 +8,12 @@ prepend_text: |
module load QuantumESPRESSO
append_text: ' '
metadata:
- code_binary_name:
- type: list
- key_display: Code name
- options:
- - pw
- - ph
- - dos
- - projwfc
+ template_variables:
+ code_binary_name:
+ type: list
+ key_display: Code name
+ options:
+ - pw
+ - ph
+ - dos
+ - projwfc
diff --git a/daint.cscs.ch/gpu/computer-configure.yml b/daint.cscs.ch/gpu/computer-configure.yml
index 293452b..841fdad 100644
--- a/daint.cscs.ch/gpu/computer-configure.yml
+++ b/daint.cscs.ch/gpu/computer-configure.yml
@@ -8,7 +8,8 @@ metadata:
Setup up the SSH connection.
ssh_auth: 2FA
- username:
- description: The username to use for the SSH connection
- type: text
- key_display: SSH username
+ template_variables:
+ username:
+ description: The username to use for the SSH connection
+ type: text
+ key_display: SSH username
diff --git a/daint.cscs.ch/gpu/computer-setup.yml b/daint.cscs.ch/gpu/computer-setup.yml
index 7916aad..cc18e8e 100644
--- a/daint.cscs.ch/gpu/computer-setup.yml
+++ b/daint.cscs.ch/gpu/computer-setup.yml
@@ -28,33 +28,34 @@ metadata:
The CSCS now require MFA to login, please check the MFA CSCS documentation for details on how to set up SSH connection.
If you are using the AiiDAlab, please use the MFA CSCS plugin to set SSH connection.
- label:
- default: daint-gpu
- description: A short name to identify the computer
- type: text
- key_display: Computer Label
- slurm_partition:
- default: normal
- description: The slurm partition to submit jobs to
- type: list
- options:
- - normal
- - debug
- - large
- - long
- - low
- - prepost
- key_display: Slurm partition
- slurm_account:
- description: The slurm account to submit jobs to
- type: text
- key_display: Slurm account
- multithreading:
- default: nomultithread
- description: The multithreading hint
- type: list
- options:
- - nomultithread
- - multithread
- key_display: Multithreading hint
+ template_variables:
+ label:
+ default: daint-gpu
+ description: A short name to identify the computer
+ type: text
+ key_display: Computer Label
+ slurm_partition:
+ default: normal
+ description: The slurm partition to submit jobs to
+ type: list
+ options:
+ - normal
+ - debug
+ - large
+ - long
+ - low
+ - prepost
+ key_display: Slurm partition
+ slurm_account:
+ description: The slurm account to submit jobs to
+ type: text
+ key_display: Slurm account
+ multithreading:
+ default: nomultithread
+ description: The multithreading hint
+ type: list
+ options:
+ - nomultithread
+ - multithread
+ key_display: Multithreading hint
diff --git a/daint.cscs.ch/mc/codes/QE-7.0-exe-template.yml b/daint.cscs.ch/mc/codes/QE-7.0-exe-template.yml
index e9023a8..e053d18 100644
--- a/daint.cscs.ch/mc/codes/QE-7.0-exe-template.yml
+++ b/daint.cscs.ch/mc/codes/QE-7.0-exe-template.yml
@@ -8,11 +8,12 @@ prepend_text: |
module load QuantumESPRESSO
append_text: ''
metadata:
- code_binary_name:
- key_display: Code name
- type: list
- options:
- - pw
- - ph
- - dos
- - projwfc
+ templte_variables:
+ code_binary_name:
+ key_display: Code name
+ type: list
+ options:
+ - pw
+ - ph
+ - dos
+ - projwfc
diff --git a/daint.cscs.ch/mc/codes/QE-7.2-exe-template.yml b/daint.cscs.ch/mc/codes/QE-7.2-exe-template.yml
index 86582d2..e3ba38b 100644
--- a/daint.cscs.ch/mc/codes/QE-7.2-exe-template.yml
+++ b/daint.cscs.ch/mc/codes/QE-7.2-exe-template.yml
@@ -8,11 +8,12 @@ prepend_text: |
module load QuantumESPRESSO
append_text: ''
metadata:
- code_binary_name:
- key_display: Code name
- type: list
- options:
- - pw
- - ph
- - dos
- - projwfc
+ templte_variables:
+ code_binary_name:
+ key_display: Code name
+ type: list
+ options:
+ - pw
+ - ph
+ - dos
+ - projwfc
diff --git a/daint.cscs.ch/mc/computer-configure.yml b/daint.cscs.ch/mc/computer-configure.yml
index 0eeec9d..0fc0eca 100644
--- a/daint.cscs.ch/mc/computer-configure.yml
+++ b/daint.cscs.ch/mc/computer-configure.yml
@@ -8,7 +8,8 @@ metadata:
Setup up the SSH connection.
ssh_auth: 2FA
- username:
- description: The username to use for the SSH connection
- type: text
- key_display: SSH username
+ template_variables:
+ username:
+ description: The username to use for the SSH connection
+ type: text
+ key_display: SSH username
diff --git a/daint.cscs.ch/mc/computer-setup.yml b/daint.cscs.ch/mc/computer-setup.yml
index 0a5752e..12da722 100644
--- a/daint.cscs.ch/mc/computer-setup.yml
+++ b/daint.cscs.ch/mc/computer-setup.yml
@@ -25,32 +25,33 @@ metadata:
The CSCS now require MFA to login, please check the MFA CSCS documentation for details on how to set up SSH connection.
If you are using the AiiDAlab, please use the MFA CSCS plugin to set SSH connection.
- label:
- default: daint-mc
- description: A short name to identify the computer
- type: text
- key_display: Computer Label
- slurm_partition:
- default: normal
- description: The slurm partition to submit jobs to
- type: list
- options:
- - normal
- - debug
- - large
- - long
- - low
- - prepost
- key_display: Slurm partition
- slurm_account:
- description: The slurm account to submit jobs to
- type: text
- key_display: Slurm account
- multithreading:
- default: nomultithread
- description: The multithreading hint
- type: list
- options:
- - nomultithread
- - multithread
- key_display: Multithreading hint
+ template_variables:
+ label:
+ default: daint-mc
+ description: A short name to identify the computer
+ type: text
+ key_display: Computer Label
+ slurm_partition:
+ default: normal
+ description: The slurm partition to submit jobs to
+ type: list
+ options:
+ - normal
+ - debug
+ - large
+ - long
+ - low
+ - prepost
+ key_display: Slurm partition
+ slurm_account:
+ description: The slurm account to submit jobs to
+ type: text
+ key_display: Slurm account
+ multithreading:
+ default: nomultithread
+ description: The multithreading hint
+ type: list
+ options:
+ - nomultithread
+ - multithread
+ key_display: Multithreading hint
diff --git a/gh_page/resource.schema.json b/gh_page/resource.schema.json
index dcf488e..81f2ef9 100644
--- a/gh_page/resource.schema.json
+++ b/gh_page/resource.schema.json
@@ -14,17 +14,8 @@
"$ref": "#/definitions/resource"
}
},
- "metadata": {
+ "template_variables": {
"type": "object",
- "properties": {
- "tooltip": {
- "type": "string"
- },
- "ssh_auth": {
- "type": "string",
- "enum": ["password", "2FA"]
- }
- },
"additionalProperties": {
"type": "object",
"properties": {
@@ -120,7 +111,15 @@
"type": "string"
},
"metadata": {
- "$ref": "#/definitions/metadata"
+ "type": "object",
+ "properties": {
+ "tooltip": {
+ "type": "string"
+ },
+ "template_variables": {
+ "$ref": "#/definitions/template_variables"
+ }
+ }
}
},
"required": ["label", "hostname", "description", "transport", "scheduler", "work_dir", "shebang", "mpirun_command", "mpiprocs_per_machine", "prepend_text"],
@@ -140,7 +139,19 @@
"type": "string"
},
"metadata": {
- "$ref": "#/definitions/metadata"
+ "type": "object",
+ "properties": {
+ "tooltip": {
+ "type": "string"
+ },
+ "ssh_auth": {
+ "type": "string",
+ "enum": ["password", "key", "2FA"]
+ },
+ "template_variables": {
+ "$ref": "#/definitions/template_variables"
+ }
+ }
}
},
"required": ["safe_interval", "username"],
@@ -169,7 +180,19 @@
"type": "string"
},
"metadata": {
- "$ref": "#/definitions/metadata"
+ "type": "object",
+ "properties": {
+ "tooltip": {
+ "type": "string"
+ },
+ "ssh_auth": {
+ "type": "string",
+ "enum": ["password", "key", "2FA"]
+ },
+ "template_variables": {
+ "$ref": "#/definitions/template_variables"
+ }
+ }
}
},
"required": ["label", "description", "default_calc_job_plugin", "filepath_executable", "prepend_text", "append_text"],
diff --git a/merlin.psi.ch/cpu/codes/QE-7.0-exe-template.yml b/merlin.psi.ch/cpu/codes/QE-7.0-exe-template.yml
index e725892..e6c6a91 100644
--- a/merlin.psi.ch/cpu/codes/QE-7.0-exe-template.yml
+++ b/merlin.psi.ch/cpu/codes/QE-7.0-exe-template.yml
@@ -9,11 +9,12 @@ prepend_text: |
module load qe/7.0
append_text: ''
metadata:
- code_binary_name:
- key_display: Code name
- type: list
- options:
- - pw
- - ph
- - dos
- - projwfc
+ template_variables:
+ code_binary_name:
+ key_display: Code name
+ type: list
+ options:
+ - pw
+ - ph
+ - dos
+ - projwfc
diff --git a/merlin.psi.ch/cpu/computer-configure.yml b/merlin.psi.ch/cpu/computer-configure.yml
index 1afc4f0..7334227 100644
--- a/merlin.psi.ch/cpu/computer-configure.yml
+++ b/merlin.psi.ch/cpu/computer-configure.yml
@@ -7,7 +7,8 @@ metadata:
Setup up the SSH connection.
ssh_auth: password
- username:
- description: The username to use for the SSH connection
- type: text
- key_display: SSH username
+ template_variables:
+ username:
+ description: The username to use for the SSH connection
+ type: text
+ key_display: SSH username
diff --git a/merlin.psi.ch/cpu/computer-setup.yml b/merlin.psi.ch/cpu/computer-setup.yml
index f711ad3..65ce43b 100644
--- a/merlin.psi.ch/cpu/computer-setup.yml
+++ b/merlin.psi.ch/cpu/computer-setup.yml
@@ -22,25 +22,26 @@ metadata:
Merlin HPC at PSI.
- label:
- default: merlin-cpu
- description: A short name to identify the computer
- type: text
- key_display: Computer Label
- slurm_partition:
- default: general
- description: The slurm partition to submit jobs to
- type: list
- options:
- - general
- - daily
- - hourly
- key_display: Slurm partition
- multithreading:
- default: nomultithread
- description: The multithreading hint
- type: list
- options:
- - nomultithread
- - multithread
- key_display: Multithreading hint
+ template_variables:
+ label:
+ default: merlin-cpu
+ description: A short name to identify the computer
+ type: text
+ key_display: Computer Label
+ slurm_partition:
+ default: general
+ description: The slurm partition to submit jobs to
+ type: list
+ options:
+ - general
+ - daily
+ - hourly
+ key_display: Slurm partition
+ multithreading:
+ default: nomultithread
+ description: The multithreading hint
+ type: list
+ options:
+ - nomultithread
+ - multithread
+ key_display: Multithreading hint
diff --git a/merlin.psi.ch/gpu/codes/QE-7.0-exe-template.yml b/merlin.psi.ch/gpu/codes/QE-7.0-exe-template.yml
index e725892..e6c6a91 100644
--- a/merlin.psi.ch/gpu/codes/QE-7.0-exe-template.yml
+++ b/merlin.psi.ch/gpu/codes/QE-7.0-exe-template.yml
@@ -9,11 +9,12 @@ prepend_text: |
module load qe/7.0
append_text: ''
metadata:
- code_binary_name:
- key_display: Code name
- type: list
- options:
- - pw
- - ph
- - dos
- - projwfc
+ template_variables:
+ code_binary_name:
+ key_display: Code name
+ type: list
+ options:
+ - pw
+ - ph
+ - dos
+ - projwfc
diff --git a/merlin.psi.ch/gpu/computer-configure.yml b/merlin.psi.ch/gpu/computer-configure.yml
index 1afc4f0..7334227 100644
--- a/merlin.psi.ch/gpu/computer-configure.yml
+++ b/merlin.psi.ch/gpu/computer-configure.yml
@@ -7,7 +7,8 @@ metadata:
Setup up the SSH connection.
ssh_auth: password
- username:
- description: The username to use for the SSH connection
- type: text
- key_display: SSH username
+ template_variables:
+ username:
+ description: The username to use for the SSH connection
+ type: text
+ key_display: SSH username
diff --git a/merlin.psi.ch/gpu/computer-setup.yml b/merlin.psi.ch/gpu/computer-setup.yml
index 1c12638..7ce0abd 100644
--- a/merlin.psi.ch/gpu/computer-setup.yml
+++ b/merlin.psi.ch/gpu/computer-setup.yml
@@ -22,33 +22,34 @@ metadata:
Merlin HPC at PSI (gpu).
- label:
- default: merlin-gpu
- description: A short name to identify the computer
- type: text
- key_display: Computer Label
- slurm_partition:
- default: gpu
- description: The slurm partition to submit jobs to
- type: list
- options:
- - gpu
- - gpu-short
- key_display: Slurm partition
- slurm_constraint:
- default: gpumem_8gb
- description: Specify the GPU by the amount of memory available in the GPU card itself.
- type: list
- options:
- - gpumem_8gb
- - gpumem_11gb
- - gpumem_40gb
- key_display: Slurm constraint
- multithreading:
- default: nomultithread
- description: The multithreading hint
- type: list
- options:
- - nomultithread
- - multithread
- key_display: Multithreading hint
+ template_variables:
+ label:
+ default: merlin-gpu
+ description: A short name to identify the computer
+ type: text
+ key_display: Computer Label
+ slurm_partition:
+ default: gpu
+ description: The slurm partition to submit jobs to
+ type: list
+ options:
+ - gpu
+ - gpu-short
+ key_display: Slurm partition
+ slurm_constraint:
+ default: gpumem_8gb
+ description: Specify the GPU by the amount of memory available in the GPU card itself.
+ type: list
+ options:
+ - gpumem_8gb
+ - gpumem_11gb
+ - gpumem_40gb
+ key_display: Slurm constraint
+ multithreading:
+ default: nomultithread
+ description: The multithreading hint
+ type: list
+ options:
+ - nomultithread
+ - multithread
+ key_display: Multithreading hint