Skip to content

Commit f0c5719

Browse files
Create tutorial triggers for the remaining tutorials
1 parent ac1f2b8 commit f0c5719

9 files changed

+563
-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,83 @@
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}-conda${_CONDA_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+
ramble config add "variables:processes_per_node:4"
40+
41+
ramble list --type modifiers
42+
43+
ramble info --type modifiers lscpu
44+
45+
ramble workspace info
46+
47+
ramble workspace setup --where '{n_nodes} == 1'
48+
49+
ramble on --where '{n_nodes} == 1'
50+
51+
ramble workspace analyze --where '{n_nodes} == 1'
52+
53+
ramble info --type modifiers intel-aps
54+
55+
cp /workspace/exmaples/tutorial_10_aps_error_config.yaml modifiers_wrf/configs/ramble.yaml
56+
57+
set +e
58+
59+
# Expected to error
60+
ramble workspace setup --dry-run
61+
62+
set -e
63+
64+
cp /workspace/exmaples/tutorial_10_aps_final_config.yaml modifiers_wrf/configs/ramble.yaml
65+
66+
ramble config add "variables:processes_per_node:4"
67+
68+
ramble workspace setup --where '{n_nodes} == 1'
69+
ramble on --where '{n_nodes} == 1'
70+
ramble workspace analyze --where '{n_nodes} == 1'
71+
72+
ramble workspace deactivate
73+
id: ramble-tutorial-test
74+
entrypoint: /bin/bash
75+
substitutions:
76+
_SPACK_REF: v0.21.2
77+
_CONDA_VER: 22.11.1
78+
_BASE_IMG: centos
79+
_BASE_VER: '7'
80+
_CI_CACHE: gs://spack/latest
81+
timeout: 1500s
82+
options:
83+
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}-conda${_CONDA_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+
_CONDA_VER: 22.11.1
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,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}-conda${_CONDA_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
36+
37+
ramble workspace activate ./basic_gromacs
38+
39+
ramble workspace info
40+
41+
ramble workspace info --expansions
42+
43+
ramble workspace info -vvv
44+
45+
cp /workspace/examples/vector_matrix_gromacs_config.yaml basic_gromacs/config/ramble.yaml
46+
47+
ramble workspace setup
48+
49+
ramble on
50+
51+
ramble workspace analyze
52+
53+
ramble workspace deactivate
54+
55+
id: ramble-tutorial-test
56+
entrypoint: /bin/bash
57+
substitutions:
58+
_SPACK_REF: v0.21.2
59+
_CONDA_VER: 22.11.1
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,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}-conda${_CONDA_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+
_CONDA_VER: 22.11.1
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,64 @@
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}-conda${_CONDA_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 -c /workspace/examples/tutorial_6_config.yaml
36+
37+
ramble workspace activate ./scaling_wrf
38+
39+
ramble config add "variables:processes_per_node:4"
40+
41+
ramble info wrfv4
42+
43+
ramble workspace info
44+
45+
ramble workspace info --expansions
46+
47+
ramble workspace setup
48+
49+
ramble on --where '{n_nodes} == 1'
50+
51+
ramble workspace analyze
52+
53+
ramble workspace deactivate
54+
id: ramble-tutorial-test
55+
entrypoint: /bin/bash
56+
substitutions:
57+
_SPACK_REF: v0.21.2
58+
_CONDA_VER: 22.11.1
59+
_BASE_IMG: centos
60+
_BASE_VER: '7'
61+
_CI_CACHE: gs://spack/latest
62+
timeout: 7200s
63+
options:
64+
machineType: N1_HIGHCPU_8

0 commit comments

Comments
 (0)