Skip to content

Commit

Permalink
Create tutorial triggers for the remaining tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasjacobsen committed Sep 13, 2024
1 parent ac1f2b8 commit f0c5719
Show file tree
Hide file tree
Showing 9 changed files with 563 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ramble/docs/tutorials/10_using_modifiers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ To discover which modifiers are available, execute:

.. code-block:: console
$ ramble mods list
$ ramble list --type modifiers
Which might output the following:

Expand All @@ -82,7 +82,7 @@ about the ``lscpu`` modifier, execute:

.. code-block:: console
$ ramble mods info lscpu
$ ramble info --type modifiers lscpu
This modifier adds the execution of ``lscpu`` to each experiment in a workspace
(to capture additional platform level details, such as the CPU model), and
Expand Down Expand Up @@ -157,7 +157,7 @@ To get information about the ``intel-aps`` modifier, execute:

.. code-block:: console
$ ramble mods info intel-aps
$ ramble info --type modifiers intel-aps
In the output from this command, you should see a ``mode`` named ``mpi``. One
additional difference relateive to ``lscpu`` is that the ``Software Specs:``
Expand Down
83 changes: 83 additions & 0 deletions share/ramble/cloud-build/tutorials/ramble-tutorial-10.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.


steps:
- name: gcr.io/cloud-builders/git
args:
- fetch
- '--unshallow'
id: ramble-clone
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-conda${_CONDA_VER}:latest
args:
- '-c'
- |
cd /workspace
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
. /opt/spack/share/spack/setup-env.sh
. /workspace/share/ramble/setup-env.sh
echo "Spack version is $(spack --version)"
echo "Python version is $(python3 --version)"
spack mirror add ci_cache ${_CI_CACHE}
spack buildcache keys --install --trust
set -e
ramble workspace create -d modifiers_wrf -c /workspace/examples/tutorial_10_lscpu_config.yaml
ramble workspace activate ./modifiers_wrf
ramble config add "variables:processes_per_node:4"
ramble list --type modifiers
ramble info --type modifiers lscpu
ramble workspace info
ramble workspace setup --where '{n_nodes} == 1'
ramble on --where '{n_nodes} == 1'
ramble workspace analyze --where '{n_nodes} == 1'
ramble info --type modifiers intel-aps
cp /workspace/exmaples/tutorial_10_aps_error_config.yaml modifiers_wrf/configs/ramble.yaml
set +e
# Expected to error
ramble workspace setup --dry-run
set -e
cp /workspace/exmaples/tutorial_10_aps_final_config.yaml modifiers_wrf/configs/ramble.yaml
ramble config add "variables:processes_per_node:4"
ramble workspace setup --where '{n_nodes} == 1'
ramble on --where '{n_nodes} == 1'
ramble workspace analyze --where '{n_nodes} == 1'
ramble workspace deactivate
id: ramble-tutorial-test
entrypoint: /bin/bash
substitutions:
_SPACK_REF: v0.21.2
_CONDA_VER: 22.11.1
_BASE_IMG: centos
_BASE_VER: '7'
_CI_CACHE: gs://spack/latest
timeout: 1500s
options:
machineType: N1_HIGHCPU_8
68 changes: 68 additions & 0 deletions share/ramble/cloud-build/tutorials/ramble-tutorial-11.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.


steps:
- name: gcr.io/cloud-builders/git
args:
- fetch
- '--unshallow'
id: ramble-clone
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-conda${_CONDA_VER}:latest
args:
- '-c'
- |
cd /workspace
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
. /opt/spack/share/spack/setup-env.sh
. /workspace/share/ramble/setup-env.sh
echo "Spack version is $(spack --version)"
echo "Python version is $(python3 --version)"
spack mirror add ci_cache ${_CI_CACHE}
spack buildcache keys --install --trust
set -e
ramble workspace create -d internals_wrf -c /workspace/examples/tutorial_11_new_exec_config.yaml
ramble workspace activate ./internals_wrf
ramble workspace info
ramble workspace setup --dry-run
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
cp /workspace/examples/tutorial_11_exec_order_config.yaml internals_wrf/configs/ramble.yaml
ramble workspace setup --dry-run
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
cp /workspace/examples/tutorial_11_exec_injection_config.yaml internals_wrf/configs/ramble.yaml
ramble workspace setup --dry-run
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
ramble workspace deactivate
id: ramble-tutorial-test
entrypoint: /bin/bash
substitutions:
_SPACK_REF: v0.21.2
_CONDA_VER: 22.11.1
_BASE_IMG: centos
_BASE_VER: '7'
_CI_CACHE: gs://spack/latest
timeout: 1500s
options:
machineType: N1_HIGHCPU_8
65 changes: 65 additions & 0 deletions share/ramble/cloud-build/tutorials/ramble-tutorial-4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.


steps:
- name: gcr.io/cloud-builders/git
args:
- fetch
- '--unshallow'
id: ramble-clone
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-conda${_CONDA_VER}:latest
args:
- '-c'
- |
cd /workspace
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
. /opt/spack/share/spack/setup-env.sh
. /workspace/share/ramble/setup-env.sh
echo "Spack version is $(spack --version)"
echo "Python version is $(python3 --version)"
spack mirror add ci_cache ${_CI_CACHE}
spack buildcache keys --install --trust
set -e
ramble workspace create -d basic_gromacs -c /workspace/examples/basic_gromacs_config.yaml
ramble workspace activate ./basic_gromacs
ramble workspace info
ramble workspace info --expansions
ramble workspace info -vvv
cp /workspace/examples/vector_matrix_gromacs_config.yaml basic_gromacs/config/ramble.yaml
ramble workspace setup
ramble on
ramble workspace analyze
ramble workspace deactivate
id: ramble-tutorial-test
entrypoint: /bin/bash
substitutions:
_SPACK_REF: v0.21.2
_CONDA_VER: 22.11.1
_BASE_IMG: centos
_BASE_VER: '7'
_CI_CACHE: gs://spack/latest
timeout: 7200s
options:
machineType: N1_HIGHCPU_8
65 changes: 65 additions & 0 deletions share/ramble/cloud-build/tutorials/ramble-tutorial-5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.


steps:
- name: gcr.io/cloud-builders/git
args:
- fetch
- '--unshallow'
id: ramble-clone
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-conda${_CONDA_VER}:latest
args:
- '-c'
- |
cd /workspace
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
. /opt/spack/share/spack/setup-env.sh
. /workspace/share/ramble/setup-env.sh
echo "Spack version is $(spack --version)"
echo "Python version is $(python3 --version)"
spack mirror add ci_cache ${_CI_CACHE}
spack buildcache keys --install --trust
set -e
ramble workspace create -d vector_gromacs -c /workspace/examples/vector_matrix_gromacs_config.yaml
ramble workspace activate ./vector_gromacs
ramble workspace info
spack info gromacs
cp /workspace/examples/vector_gromacs_software_config.yaml vector_gromacs/configs/ramble.yaml
ramble workspace info
ramble workspace setup --dry-run
# Test no package manager works.
ramble -c "variables:gromacs_path:/not/a/path" -c "variants:package_manager:null" workspace setup --dry-run
ramble list --type package_managers
ramble workspace deactivate
id: ramble-tutorial-test
entrypoint: /bin/bash
substitutions:
_SPACK_REF: v0.21.2
_CONDA_VER: 22.11.1
_BASE_IMG: centos
_BASE_VER: '7'
_CI_CACHE: gs://spack/latest
timeout: 7200s
options:
machineType: N1_HIGHCPU_8
64 changes: 64 additions & 0 deletions share/ramble/cloud-build/tutorials/ramble-tutorial-6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright 2022-2024 The Ramble Authors
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
# option. This file may not be copied, modified, or distributed
# except according to those terms.


steps:
- name: gcr.io/cloud-builders/git
args:
- fetch
- '--unshallow'
id: ramble-clone
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-conda${_CONDA_VER}:latest
args:
- '-c'
- |
cd /workspace
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
. /opt/spack/share/spack/setup-env.sh
. /workspace/share/ramble/setup-env.sh
echo "Spack version is $(spack --version)"
echo "Python version is $(python3 --version)"
spack mirror add ci_cache ${_CI_CACHE}
spack buildcache keys --install --trust
set -e
ramble workspace create -d scaling_wrf -c /workspace/examples/tutorial_6_config.yaml
ramble workspace activate ./scaling_wrf
ramble config add "variables:processes_per_node:4"
ramble info wrfv4
ramble workspace info
ramble workspace info --expansions
ramble workspace setup
ramble on --where '{n_nodes} == 1'
ramble workspace analyze
ramble workspace deactivate
id: ramble-tutorial-test
entrypoint: /bin/bash
substitutions:
_SPACK_REF: v0.21.2
_CONDA_VER: 22.11.1
_BASE_IMG: centos
_BASE_VER: '7'
_CI_CACHE: gs://spack/latest
timeout: 7200s
options:
machineType: N1_HIGHCPU_8
Loading

0 comments on commit f0c5719

Please sign in to comment.