Skip to content

Commit 42e295b

Browse files
Create tutorial triggers for the remaining tutorials
1 parent 2ce16f9 commit 42e295b

9 files changed

+575
-3
lines changed

lib/ramble/docs/tutorials/10_using_modifiers.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ To discover which modifiers are available, execute:
6565

6666
.. code-block:: console
6767
68-
$ ramble mods list
68+
$ ramble list --type modifiers
6969
7070
Which might output the following:
7171

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

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

158158
.. code-block:: console
159159
160-
$ ramble mods info intel-aps
160+
$ ramble info --type modifiers intel-aps
161161
162162
In the output from this command, you should see a ``mode`` named ``mpi``. One
163163
additional difference relateive to ``lscpu`` is that the ``Software Specs:``
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Copyright 2022-2024 The Ramble Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6+
# option. This file may not be copied, modified, or distributed
7+
# except according to those terms.
8+
9+
10+
steps:
11+
- name: gcr.io/cloud-builders/git
12+
args:
13+
- fetch
14+
- '--unshallow'
15+
id: ramble-clone
16+
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest
17+
args:
18+
- '-c'
19+
- |
20+
cd /workspace
21+
22+
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
23+
24+
. /opt/spack/share/spack/setup-env.sh
25+
. /workspace/share/ramble/setup-env.sh
26+
27+
echo "Spack version is $(spack --version)"
28+
echo "Python version is $(python3 --version)"
29+
30+
spack mirror add ci_cache ${_CI_CACHE}
31+
spack buildcache keys --install --trust
32+
33+
set -e
34+
35+
ramble workspace create -d modifiers_wrf -c /workspace/examples/tutorial_10_lscpu_config.yaml
36+
37+
ramble workspace activate ./modifiers_wrf
38+
39+
# Cloud build VMs only have 4 cores
40+
ramble config add "variables:processes_per_node:4"
41+
42+
ramble list --type modifiers
43+
44+
ramble info --type modifiers lscpu
45+
46+
ramble workspace info
47+
48+
ramble workspace setup --where '{n_nodes} == 1'
49+
50+
ramble on --where '{n_nodes} == 1'
51+
52+
ramble workspace analyze --where '{n_nodes} == 1'
53+
54+
ramble info --type modifiers intel-aps
55+
56+
cp /workspace/examples/tutorial_10_aps_error_config.yaml modifiers_wrf/configs/ramble.yaml
57+
58+
set +e
59+
60+
# Expected to error
61+
ramble workspace setup --dry-run
62+
63+
set -e
64+
65+
cp /workspace/examples/tutorial_10_aps_final_config.yaml modifiers_wrf/configs/ramble.yaml
66+
67+
# Cloud build VMs only have 4 cores
68+
ramble config add "variables:processes_per_node:4"
69+
70+
ramble workspace setup --where '{n_nodes} == 1'
71+
ramble on --where '{n_nodes} == 1'
72+
ramble workspace analyze --where '{n_nodes} == 1'
73+
74+
ramble workspace deactivate
75+
id: ramble-tutorial-test
76+
entrypoint: /bin/bash
77+
substitutions:
78+
_SPACK_REF: v0.21.2
79+
_PYTHON_VER: 3.11.6
80+
_BASE_IMG: centos
81+
_BASE_VER: '7'
82+
_CI_CACHE: gs://spack/latest
83+
timeout: 1500s
84+
options:
85+
machineType: N1_HIGHCPU_8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# Copyright 2022-2024 The Ramble Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6+
# option. This file may not be copied, modified, or distributed
7+
# except according to those terms.
8+
9+
10+
steps:
11+
- name: gcr.io/cloud-builders/git
12+
args:
13+
- fetch
14+
- '--unshallow'
15+
id: ramble-clone
16+
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest
17+
args:
18+
- '-c'
19+
- |
20+
cd /workspace
21+
22+
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
23+
24+
. /opt/spack/share/spack/setup-env.sh
25+
. /workspace/share/ramble/setup-env.sh
26+
27+
echo "Spack version is $(spack --version)"
28+
echo "Python version is $(python3 --version)"
29+
30+
spack mirror add ci_cache ${_CI_CACHE}
31+
spack buildcache keys --install --trust
32+
33+
set -e
34+
35+
ramble workspace create -d internals_wrf -c /workspace/examples/tutorial_11_new_exec_config.yaml
36+
37+
ramble workspace activate ./internals_wrf
38+
39+
ramble workspace info
40+
41+
ramble workspace setup --dry-run
42+
43+
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
44+
45+
cp /workspace/examples/tutorial_11_exec_order_config.yaml internals_wrf/configs/ramble.yaml
46+
47+
ramble workspace setup --dry-run
48+
49+
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
50+
51+
cp /workspace/examples/tutorial_11_exec_injection_config.yaml internals_wrf/configs/ramble.yaml
52+
53+
ramble workspace setup --dry-run
54+
55+
grep "date +" internals_wrf/experiments/wrfv4/CONUS_12km/scaling_1/execute_experiment
56+
57+
ramble workspace deactivate
58+
id: ramble-tutorial-test
59+
entrypoint: /bin/bash
60+
substitutions:
61+
_SPACK_REF: v0.21.2
62+
_PYTHON_VER: 3.11.6
63+
_BASE_IMG: centos
64+
_BASE_VER: '7'
65+
_CI_CACHE: gs://spack/latest
66+
timeout: 1500s
67+
options:
68+
machineType: N1_HIGHCPU_8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# Copyright 2022-2024 The Ramble Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6+
# option. This file may not be copied, modified, or distributed
7+
# except according to those terms.
8+
9+
10+
steps:
11+
- name: gcr.io/cloud-builders/git
12+
args:
13+
- fetch
14+
- '--unshallow'
15+
id: ramble-clone
16+
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest
17+
args:
18+
- '-c'
19+
- |
20+
cd /workspace
21+
22+
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
23+
24+
. /opt/spack/share/spack/setup-env.sh
25+
. /workspace/share/ramble/setup-env.sh
26+
27+
echo "Spack version is $(spack --version)"
28+
echo "Python version is $(python3 --version)"
29+
30+
spack mirror add ci_cache ${_CI_CACHE}
31+
spack buildcache keys --install --trust
32+
33+
set -e
34+
35+
ramble workspace create -d basic_gromacs -c /workspace/examples/basic_gromacs_config.yaml -a
36+
37+
ramble workspace info
38+
39+
ramble workspace info --expansions
40+
41+
ramble workspace info -vvv
42+
43+
cp /workspace/examples/vector_matrix_gromacs_config.yaml basic_gromacs/config/ramble.yaml
44+
45+
ramble workspace setup
46+
47+
ramble on
48+
49+
ramble workspace analyze
50+
51+
ramble workspace deactivate
52+
53+
id: ramble-tutorial-test
54+
entrypoint: /bin/bash
55+
substitutions:
56+
_SPACK_REF: v0.21.2
57+
_PYTHON_VER: 3.11.6
58+
_BASE_IMG: centos
59+
_BASE_VER: '7'
60+
_CI_CACHE: gs://spack/latest
61+
timeout: 7200s
62+
options:
63+
machineType: N1_HIGHCPU_8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Copyright 2022-2024 The Ramble Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6+
# option. This file may not be copied, modified, or distributed
7+
# except according to those terms.
8+
9+
10+
steps:
11+
- name: gcr.io/cloud-builders/git
12+
args:
13+
- fetch
14+
- '--unshallow'
15+
id: ramble-clone
16+
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest
17+
args:
18+
- '-c'
19+
- |
20+
cd /workspace
21+
22+
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
23+
24+
. /opt/spack/share/spack/setup-env.sh
25+
. /workspace/share/ramble/setup-env.sh
26+
27+
echo "Spack version is $(spack --version)"
28+
echo "Python version is $(python3 --version)"
29+
30+
spack mirror add ci_cache ${_CI_CACHE}
31+
spack buildcache keys --install --trust
32+
33+
set -e
34+
35+
ramble workspace create -d vector_gromacs -c /workspace/examples/vector_matrix_gromacs_config.yaml
36+
37+
ramble workspace activate ./vector_gromacs
38+
39+
ramble workspace info
40+
41+
spack info gromacs
42+
43+
cp /workspace/examples/vector_gromacs_software_config.yaml vector_gromacs/configs/ramble.yaml
44+
45+
ramble workspace info
46+
47+
ramble workspace setup --dry-run
48+
49+
# Test no package manager works.
50+
ramble -c "variables:gromacs_path:/not/a/path" -c "variants:package_manager:null" workspace setup --dry-run
51+
52+
ramble list --type package_managers
53+
54+
ramble workspace deactivate
55+
id: ramble-tutorial-test
56+
entrypoint: /bin/bash
57+
substitutions:
58+
_SPACK_REF: v0.21.2
59+
_PYTHON_VER: 3.11.6
60+
_BASE_IMG: centos
61+
_BASE_VER: '7'
62+
_CI_CACHE: gs://spack/latest
63+
timeout: 7200s
64+
options:
65+
machineType: N1_HIGHCPU_8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Copyright 2022-2024 The Ramble Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4+
# https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5+
# <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
6+
# option. This file may not be copied, modified, or distributed
7+
# except according to those terms.
8+
9+
10+
steps:
11+
- name: gcr.io/cloud-builders/git
12+
args:
13+
- fetch
14+
- '--unshallow'
15+
id: ramble-clone
16+
- name: us-central1-docker.pkg.dev/$PROJECT_ID/ramble-repo/ramble-${_BASE_IMG}-${_BASE_VER}-spack${_SPACK_REF}-python${_PYTHON_VER}:latest
17+
args:
18+
- '-c'
19+
- |
20+
cd /workspace
21+
22+
export PATH=$$(. /opt/spack/share/spack/setup-env.sh && spack location -i miniconda3)/bin:$${PATH}
23+
24+
. /opt/spack/share/spack/setup-env.sh
25+
. /workspace/share/ramble/setup-env.sh
26+
27+
echo "Spack version is $(spack --version)"
28+
echo "Python version is $(python3 --version)"
29+
30+
spack mirror add ci_cache ${_CI_CACHE}
31+
spack buildcache keys --install --trust
32+
33+
set -e
34+
35+
ramble workspace create -d scaling_wrf
36+
37+
ramble workspace activate ./scaling_wrf
38+
39+
# Cloud build VMs only have 4 cores
40+
ramble config add "variables:processes_per_node:4"
41+
ramble config add "variables:n_ranks:'{processes_per_node}*{n_nodes}'"
42+
43+
ramble info --attrs workloads wrfv4
44+
45+
ramble workspace generate-config wrfv4 -e scaling_{n_nodes} -p spack --wf "CONUS_12km" -v "n_nodes=[1, 2]"
46+
47+
set +e
48+
ramble workspace info
49+
set -e
50+
51+
ramble workspace concretize
52+
53+
ramble workspace info
54+
55+
cp /workspace/examples/tutorial_6_config.yaml /workspace/scaling_wrf/configs/ramble.yaml
56+
57+
ramble workspace info
58+
59+
ramble workspace setup
60+
61+
ramble on --where '{n_nodes} == 1'
62+
63+
ramble workspace analyze
64+
65+
ramble workspace deactivate
66+
id: ramble-tutorial-test
67+
entrypoint: /bin/bash
68+
substitutions:
69+
_SPACK_REF: v0.21.2
70+
_PYTHON_VER: 3.11.6
71+
_BASE_IMG: centos
72+
_BASE_VER: '7'
73+
_CI_CACHE: gs://spack/latest
74+
timeout: 7200s
75+
options:
76+
machineType: N1_HIGHCPU_8

0 commit comments

Comments
 (0)