Skip to content

Commit eace86f

Browse files
authored
Fix filenames for OpenFoam tutorial (LLNL#475)
1 parent bba68ab commit eace86f

File tree

3 files changed

+22
-13
lines changed

3 files changed

+22
-13
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ All notable changes to Merlin will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [Unreleased]
8+
### Added
9+
10+
### Changed
11+
12+
### Fixed
13+
- Bugfix for output of `merlin example openfoam_wf_singularity`
14+
15+
716
## [1.12.1]
817
### Added
918
- New Priority.RETRY value for the Celery task priorities. This will be the new highest priority.

docs/tutorial/4_run_simulation.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ In the `openfoam_wf_singularity` directory you should see the following:
7272
<figcaption>Fig 3. openfoam_wf Directory Structure</figcaption>
7373
</figure>
7474

75-
- `openfoam_wf.yaml` -- this spec file is partially blank. You will fill in the gaps as you follow this module's steps.
76-
- `openfoam_wf_template.yaml` -- this is a complete spec file. You can always reference it as an example.
75+
- `openfoam_wf_singularity.yaml` -- this spec file is partially blank. You will fill in the gaps as you follow this module's steps.
76+
- `openfoam_wf_singularity_template.yaml` -- this is a complete spec file. You can always reference it as an example.
7777
- `scripts` -- This directory contains all the necessary scripts for this module.
7878
- We'll be exploring these scripts as we go with the tutorial.
7979
- `requirements.txt` -- this is a text file listing this workflow's python dependencies.
@@ -87,22 +87,22 @@ We are going to build a spec file that produces this DAG:
8787
<figcaption>Fig 4. OpenFOAM DAG</figcaption>
8888
</figure>
8989

90-
**To start, open** `openfoam_wf.yaml` **using your favorite text editor.**
90+
**To start, open** `openfoam_wf_singularity.yaml` **using your favorite text editor.**
9191

9292
It should look something like this:
9393

9494
???+ abstract "Initial Contents of the Spec"
9595

9696
<!--codeinclude-->
97-
[openfoam_wf.yaml](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf.yaml)
97+
[openfoam_wf_singularity.yaml](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf_singularity.yaml)
9898
<!--/codeinclude-->
9999

100100
### Variables
101101

102102
First we specify some variables to make our life easier. Locate the `env` block in our yaml spec:
103103

104104
<!--codeinclude-->
105-
[](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf.yaml) lines:9-15
105+
[](../../merlin/examples/workflows/openfoam_wf_singularity/openfoam_wf_singularity.yaml) lines:9-15
106106
<!--/codeinclude-->
107107

108108
The `OUTPUT_PATH` variable is set to tell Merlin where you want your output directory to be written. The default is the current working directory.
@@ -254,7 +254,7 @@ nonsimworkers:
254254

255255
### Putting It All Together
256256

257-
By the end, your `openfoam_wf.yaml` should look like the template version in the same directory:
257+
By the end, your `openfoam_wf_singularity.yaml` should look like the template version in the same directory:
258258

259259
???+ abstract "Complete Spec File"
260260

@@ -273,21 +273,21 @@ Now that you are done with the Specification file, use the following commands fr
273273
Create the DAG and send tasks to the server with:
274274

275275
```bash
276-
merlin run openfoam_wf.yaml
276+
merlin run openfoam_wf_singularity.yaml
277277
```
278278

279279
Open a new terminal window, then start the workers that will consume the tasks we just queued by using:
280280

281281
```bash
282-
merlin run-workers openfoam_wf.yaml
282+
merlin run-workers openfoam_wf_singularity.yaml
283283
```
284284

285285
But wait! We realize that 10 samples is not enough to train a good model. We would like to restart with 100 samples instead of 10 (should take about 6 minutes):
286286

287287
After sending the workers to start on their queues, we need to first stop the workers:
288288

289289
```bash
290-
merlin stop-workers --spec openfoam_wf.yaml
290+
merlin stop-workers --spec openfoam_wf_singularity.yaml
291291
```
292292

293293
!!! tip
@@ -297,25 +297,25 @@ merlin stop-workers --spec openfoam_wf.yaml
297297
We stopped these tasks from running but if we were to run the workflow again (with 100 samples instead of 10), we would continue running the 10 samples first! This is because the queues are still filled with the previous attempt's tasks. This can be seen with:
298298

299299
```bash
300-
merlin status openfoam_wf.yaml
300+
merlin status openfoam_wf_singularity.yaml
301301
```
302302

303303
We need to purge these queues first in order to repopulate them with the appropriate tasks. This is where we use the `merlin purge` command:
304304

305305
```bash
306-
merlin purge openfoam_wf.yaml
306+
merlin purge openfoam_wf_singularity.yaml
307307
```
308308

309309
Now we are free to repopulate the queues with the 100 samples. In our terminal window that's not designated for our workers, we'll queue up tasks again, this time with 100 samples:
310310

311311
```bash
312-
merlin run openfoam_wf.yaml --vars N_SAMPLES=100
312+
merlin run openfoam_wf_singularity.yaml --vars N_SAMPLES=100
313313
```
314314

315315
Then in our window for workers, we'll execute:
316316

317317
```bash
318-
merlin run-workers openfoam_wf.yaml
318+
merlin run-workers openfoam_wf_singularity.yaml
319319
```
320320

321321
To see your results, look inside the `learn` output directory. You should see a png that looks like this:

0 commit comments

Comments
 (0)