Skip to content

Commit 7d7d403

Browse files
Merge pull request #589 from douglasjacobsen/info-cmd-update
Update the info command to be more flexible
2 parents 1179cbe + bd09e4b commit 7d7d403

15 files changed

+408
-82
lines changed

lib/ramble/docs/tutorials/11_using_internals.rst

+24-4
Original file line numberDiff line numberDiff line change
@@ -130,16 +130,36 @@ experiments, execute:
130130

131131
.. code-block:: console
132132
133-
$ ramble info wrfv4
133+
$ ramble info -a workloads -v -p "CONUS_12km" wrfv4
134134
135-
136-
And examine the section under the ``Workload: CONUS_12km`` header. The
135+
This prints the information for the ``CONUS_12km`` workload in the wrfv4 application definition.
137136
``Executables:`` definition lists the order of executables used for this
138137
workload. As an example, you might see the following:
139138

140139
.. code-block:: console
141140
142-
Executables: ['builtin::env_vars', 'builtin::spack_source', 'builtin::spack_activate', 'cleanup', 'copy', 'fix_12km', 'execute']
141+
Executables: ['cleanup', 'copy', 'fix_12km', 'execute']
142+
143+
Some executables are provided through the ``builtin`` functionality. These are
144+
executable commands that are injected by default from the object definitions.
145+
To be able to see these, you can execute:
146+
147+
.. code-block:: console
148+
149+
$ ramble info -a builtins -v wrfv4
150+
151+
This command should print something like the following:
152+
153+
.. code-block:: console
154+
155+
############
156+
# builtins #
157+
############
158+
builtin::env_vars:
159+
name: env_vars
160+
required: True
161+
injection_method: prepend
162+
depends_on: []
143163
144164
Now, edit the workspace configuration file with:
145165

lib/ramble/docs/tutorials/2_running_a_simple_gromacs_experiment.rst

+33-15
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ get information about these workloads:
3232

3333
.. code-block:: console
3434
35-
$ ramble info gromacs
35+
$ ramble info -a workloads -v -p "water*" gromacs
3636
37-
Searching the output for the sections marked ``Workload: water_bare`` and
37+
Under the workloads marked by ``Workload: water_bare`` and
3838
``Workload: water_gmx50``, you should see something like the following output:
3939

4040
.. code-block:: console
4141
4242
Workload: water_gmx50
4343
Executables: ['pre-process', 'execute-gen']
4444
Inputs: ['water_gmx50_bare']
45+
Tags: []
4546
Variables:
4647
size:
4748
Description: Workload size
@@ -57,6 +58,7 @@ Searching the output for the sections marked ``Workload: water_bare`` and
5758
Workload: water_bare
5859
Executables: ['pre-process', 'execute-gen']
5960
Inputs: ['water_bare_hbonds']
61+
Tags: []
6062
Variables:
6163
size:
6264
Description: Workload size
@@ -70,27 +72,43 @@ Searching the output for the sections marked ``Workload: water_bare`` and
7072
Description: Input path for water bare hbonds
7173
Default: {water_bare_hbonds}/{size}
7274
73-
74-
7575
Here we see that both of these workloads have a ``type`` variable (with
7676
possible values of ``pme`` and ``rf``) and a ``size`` variable with a variety
7777
of available sizes.
7878

79-
Towards the bottom of the output you should also see information about a valid
80-
software configuration:
79+
To determine a suggested software configuration, you can use:
8180

8281
.. code-block:: console
8382
84-
Default Compilers:
85-
gcc9:
86-
pkg_spec = [email protected]
83+
$ ramble info -a software_specs,compilers -v gromacs
84+
85+
With this command, you should see output similar to the following:
86+
87+
.. code-block:: console
8788
88-
Software Specs:
89-
impi2021:
90-
pkg_spec = [email protected]
91-
gromacs:
92-
pkg_spec = [email protected]
93-
compiler = gcc9
89+
##################
90+
# software_specs #
91+
##################
92+
impi2018:
93+
94+
compiler_spec: None
95+
compiler: None
96+
package_manager: spack*
97+
98+
gromacs:
99+
100+
compiler_spec: None
101+
compiler: gcc9
102+
package_manager: spack*
103+
104+
#############
105+
# compilers #
106+
#############
107+
gcc9:
108+
109+
compiler_spec: None
110+
compiler: None
111+
package_manager: spack*
94112
95113
This output does not represent the only possible configuration that works for
96114
this application, it only presents a good starting point. When using Ramble,

lib/ramble/docs/tutorials/3_modifying_a_gromacs_experiment.rst

+4-3
Original file line numberDiff line numberDiff line change
@@ -128,16 +128,16 @@ available variables with the following command:
128128

129129
.. code-block:: console
130130
131-
$ ramble info gromacs
131+
$ ramble info -a workloads -v -p "water*" gromacs
132132
133-
134-
Focusing on the relevant workloads, you see the following information:
133+
Which should contain the following information:
135134

136135
.. code-block:: console
137136
138137
Workload: water_gmx50
139138
Executables: ['pre-process', 'execute-gen']
140139
Inputs: ['water_gmx50_bare']
140+
Tags: []
141141
Variables:
142142
size:
143143
Description: Workload size
@@ -153,6 +153,7 @@ Focusing on the relevant workloads, you see the following information:
153153
Workload: water_bare
154154
Executables: ['pre-process', 'execute-gen']
155155
Inputs: ['water_bare_hbonds']
156+
Tags: []
156157
Variables:
157158
size:
158159
Description: Workload size

lib/ramble/docs/tutorials/6_configuring_a_scaling_study.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,14 @@ you want to execute. To begin with, select a workload from the output of:
5454

5555
.. code-block:: console
5656
57-
$ ramble info wrfv4
57+
$ ramble info -a workloads wrfv4
5858
5959
For the purposes of this tutorial, the ``CONUS_12km`` workload is recommended
6060
because it is less computationally expensive than the ``CONUS_2p5km`` workload.
6161

62+
**NOTE**: To get more detailed information about the workload definitions, you
63+
can use ``ramble info -a workloads -v wrfv4``.
64+
6265
Configure Experiment Definitions
6366
--------------------------------
6467

lib/ramble/ramble/application.py

+1-10
Original file line numberDiff line numberDiff line change
@@ -271,16 +271,7 @@ def build_phase_order(self):
271271
self._pipeline_graphs[pipeline].define_edges(phase_node, internal_order=True)
272272

273273
def _long_print(self):
274-
out_str = []
275-
out_str.append(rucolor.section_title("Application: ") + f"{self.name}\n")
276-
out_str.append("\n")
277-
278-
out_str.append(rucolor.section_title("Description:\n"))
279-
if self.__doc__:
280-
out_str.append(f"\t{self.__doc__}\n")
281-
else:
282-
out_str.append("\tNone\n")
283-
274+
out_str = ""
284275
if hasattr(self, "maintainers"):
285276
out_str.append("\n")
286277
out_str.append(rucolor.section_title("Maintainers:\n"))

0 commit comments

Comments
 (0)