From 0528ef23273f2f4cc211290e17152365cd4de72b Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Mon, 1 Dec 2025 14:02:57 -0900 Subject: [PATCH 1/2] Revert "Don't deploy pism-cloud-test anymore" --- .github/workflows/deploy-custom-test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/deploy-custom-test.yml b/.github/workflows/deploy-custom-test.yml index 856c11edc..b018ce32a 100644 --- a/.github/workflows/deploy-custom-test.yml +++ b/.github/workflows/deploy-custom-test.yml @@ -91,6 +91,23 @@ jobs: security_environment: ASF ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id + - environment: hyp3-pism-cloud-test + domain: pism-cloud-test.asf.alaska.edu + template_bucket: cf-templates-1qca1gr649g17-us-west-2 + image_tag: test + product_lifetime_in_days: 14 + default_credits_per_user: 0 + default_application_status: APPROVED + cost_profile: DEFAULT + job_files: >- + job_spec/INSAR_ISCE_BURST.yml + instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge + default_max_vcpus: 640 + expanded_max_vcpus: 640 + required_surplus: 0 + security_environment: ASF + ami_id: /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id + - environment: hyp3-volcsarvatory-test domain: hyp3-volcsarvatory-test.asf.alaska.edu template_bucket: cf-templates-1uzy61g1h6omf-us-west-2 From fdb470da64ee90497e03c5c0f8082696f04bed57 Mon Sep 17 00:00:00 2001 From: Joseph H Kennedy Date: Fri, 30 Jan 2026 17:05:47 -0900 Subject: [PATCH 2/2] Add PISM jobs and allow setting linux parameters for batch --- apps/workflow-cf.yml.j2 | 6 +++ job_spec/PISM_TERRA_EXECUTE.yml | 42 +++++++++++++++ job_spec/PISM_TERRA_PREP_ENSEMBLE.yml | 68 ++++++++++++++++++++++++ job_spec/PISM_TERRA_RUN.yml | 63 ++++++++++++++++++++++ job_spec/config/compute_environments.yml | 4 ++ 5 files changed, 183 insertions(+) create mode 100644 job_spec/PISM_TERRA_EXECUTE.yml create mode 100644 job_spec/PISM_TERRA_PREP_ENSEMBLE.yml create mode 100644 job_spec/PISM_TERRA_RUN.yml diff --git a/apps/workflow-cf.yml.j2 b/apps/workflow-cf.yml.j2 index 61e7996ea..a2c224581 100644 --- a/apps/workflow-cf.yml.j2 +++ b/apps/workflow-cf.yml.j2 @@ -69,6 +69,12 @@ Resources: - Type: GPU Value: "{{ step['gpu'] }}" {% endif %} + {% if 'linux_parameters' in step %} + LinuxParameters: + {% for key, value in step['linux_parameters'].items() %} + {{ key }}: {{ value }} + {% endfor %} + {% endif %} Command: {% for command in step['command'] %} - {{ command }} diff --git a/job_spec/PISM_TERRA_EXECUTE.yml b/job_spec/PISM_TERRA_EXECUTE.yml new file mode 100644 index 000000000..67cd190d7 --- /dev/null +++ b/job_spec/PISM_TERRA_EXECUTE.yml @@ -0,0 +1,42 @@ +PISM_TERRA_EXECUTE: + required_parameters: + - ensemble_job_id + - run_script + parameters: + ensemble_job_id: + api_schema: + description: HyP3 job ID for an PISM_TERRA_PREP_ENSEMBLE job that has successfully completed + type: string + format: uuid + example: 27836b79-e5b2-4d8f-932f-659724ea02c3 + run_script: + api_schema: + description: Relative path to the run script under the ensemble_job_id prefix within the HyP3 content bucket + type: string + example: RGI2000-v7.0-C-01-09429/run_scripts/submit_g400m_RGI2000-v7.0-C-01-09429_id_0_1978-01-01_2025-01-01.sh + cost_profiles: + DEFAULT: + cost: 1.0 + validators: [] + steps: + - name: '' + image: ghcr.io/pism/pism-terra + command: + - ++process + - pism-glacier-execute + - Ref::run_script + - --bucket + - '!Ref Bucket' + - --bucket-prefix + - Ref::job_id + - --job-id + - Ref::ensemble_job_id + secrets: + - CDS_API_URL + - CDS_API_KEY + timeout: 345600 # 96 hours + compute_environment: PismExecute + vcpu: 32 + memory: 254000 + linux_parameters: + SharedMemorySize: 15259 diff --git a/job_spec/PISM_TERRA_PREP_ENSEMBLE.yml b/job_spec/PISM_TERRA_PREP_ENSEMBLE.yml new file mode 100644 index 000000000..203e697c6 --- /dev/null +++ b/job_spec/PISM_TERRA_PREP_ENSEMBLE.yml @@ -0,0 +1,68 @@ +PISM_TERRA_PREP_ENSEMBLE: + required_parameters: + - rgi_id + parameters: + rgi_id: + api_schema: + description: Randolph Glacier Inventory 7.0 identifier the a glacier complex to simulate + type: string + pattern: 'RGI2000-v7.0-C-.*$' + example: RGI2000-v7.0-C-01-09429 + rgi_gpkg: + api_schema: + description: URI to a PISM-terra GeoPackage prepared from Randolph Glacier Inventory 7.0 + type: string + format: uri + default: s3://pism-cloud-data/terra/rgi.gpkg + pism_config: + api_schema: + description: URI to a PISM Config file or the path to one bundled within the pism-terra package + type: string + default: config/era5_ec2.toml + run_template: + api_schema: + description: URI to a Jinja2 run template or the path to one bundled within the pism-terra package + type: string + default: templates/ec2.j2 + uq_config: + api_schema: + description: URI to a PISM Config file or the path to one bundled within the pism-terra package + type: string + default: uq/era5_agu.toml + ntasks: + api_schema: + description: Number of MPI tasks to use when executing PISM simulations + type: integer + default: 32 + minimum: 2 + maximum: 32 + cost_profiles: + DEFAULT: + cost: 1.0 + validators: [] + steps: + - name: '' + image: ghcr.io/pism/pism-terra + command: + - ++process + - pism-glacier-run-ensemble + - Ref::rgi_id + - Ref::rgi_gpkg + - Ref::pism_config + - Ref::run_template + - Ref::uq_config + - --bucket + - '!Ref Bucket' + - --bucket-prefix + - Ref::job_id + - --ntasks + - Ref::ntasks + secrets: + - CDS_API_URL + - CDS_API_KEY + timeout: 10800 # 3 hours + compute_environment: PismExecute + vcpu: 32 + memory: 254000 + linux_parameters: + SharedMemorySize: 15259 diff --git a/job_spec/PISM_TERRA_RUN.yml b/job_spec/PISM_TERRA_RUN.yml new file mode 100644 index 000000000..cd0f61777 --- /dev/null +++ b/job_spec/PISM_TERRA_RUN.yml @@ -0,0 +1,63 @@ +PISM_TERRA_RUN: + required_parameters: + - rgi_id + parameters: + rgi_id: + api_schema: + description: Randolph Glacier Inventory 7.0 identifier the a glacier complex to simulate + type: string + pattern: 'RGI2000-v7.0-C-.*$' + example: RGI2000-v7.0-C-01-09429 + rgi_gpkg: + api_schema: + description: URI to a PISM-terra GeoPackage prepared from Randolph Glacier Inventory 7.0 + type: string + format: uri + default: s3://pism-cloud-data/terra/rgi.gpkg + pism_config: + api_schema: + description: URI to a PISM Config file or the path to one bundled within the pism-terra package + type: string + default: config/era5_ec2.toml + run_template: + api_schema: + description: URI to a Jinja2 run template or the path to one bundled within the pism-terra package + type: string + default: templates/ec2.j2 + ntasks: + api_schema: + description: Number of MPI tasks to use when executing PISM simulations + type: integer + default: 32 + minimum: 2 + maximum: 32 + cost_profiles: + DEFAULT: + cost: 1.0 + validators: [] + steps: + - name: '' + image: ghcr.io/pism/pism-terra + command: + - ++process + - pism-glacier-run + - Ref::rgi_id + - Ref::rgi_gpkg + - Ref::pism_config + - Ref::run_template + - --bucket + - '!Ref Bucket' + - --bucket-prefix + - Ref::job_id + - --ntasks + - Ref::ntasks + - --execute + secrets: + - CDS_API_URL + - CDS_API_KEY + timeout: 345600 # 96 hours + compute_environment: PismExecute + vcpu: 32 + memory: 254000 + linux_parameters: + SharedMemorySize: 15259 diff --git a/job_spec/config/compute_environments.yml b/job_spec/config/compute_environments.yml index dfc3460bd..5a41bd2d0 100644 --- a/job_spec/config/compute_environments.yml +++ b/job_spec/config/compute_environments.yml @@ -27,3 +27,7 @@ compute_environments: ItsLiveMeta: instance_types: r6id.xlarge,r6id.2xlarge,r6id.4xlarge,r6id.8xlarge,r6idn.xlarge,r6idn.2xlarge,r6idn.4xlarge,r6idn.8xlarge ami_id: ami-0aece254fc7c27a77 # /aws/service/ecs/optimized-ami/amazon-linux-2023/recommended/image_id + PismExecute: + instance_types: r6id.8xlarge,r6id.12xlarge,r6id.16xlarge,r6id.24xlarge,r6id.32xlarge,r6idn.8xlarge,r6idn.12xlarge,r6idn.16xlarge,r6idn.24xlarge,r6idn.32xlarge + allocation_type: EC2 + allocation_strategy: BEST_FIT_PROGRESSIVE