Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cli doc #289

Merged
merged 2 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions docs/tools/yamltools.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.. NEEDS UPDATING #TODO

``combine-yamls``
-----------------

* placehold
``fre yamltools combine-yamls [options]``
- Purpose: Creates a combined yaml file for either compilation or post-processing.
If `--use compile`, the model yaml is combined with the compile and platforms yaml.
If `--use pp`, the model yaml is combined with post-processing yamls.
- Options:
- `-y, --yamlfile [experiment yaml] (required)`
- `-e, --experiment [experiment name]`
- `-p, --platform [platform] (required)`
- `-t, --target [target] (required)`
- `--use [compile|pp] (required)`
48 changes: 27 additions & 21 deletions docs/usage/compile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,45 +103,45 @@ Users will not be able to create containers unless they have podman access on ga

Quickstart
----------
The quickstart instructions can be used with the am5-compile examples located in the fre-examples repository: https://github.com/NOAA-GFDL/fre-examples/tree/main/AM5/am5-compile
The quickstart instructions can be used with the null model example located in the fre-cli repository: https://github.com/NOAA-GFDL/fre-cli/tree/main/fre/make/tests/null_example

1. Bare-metal Build:

.. code-block::

# Create checkout script
fre make create-checkout -y am5.yaml -p ncrc5.intel23 -t prod
fre make create-checkout -y null_model.yaml -p ncrc5.intel23 -t prod

# Create and run checkout script
fre make create-checkout -y am5.yaml -p ncrc5.intel23 -t prod --execute
fre make create-checkout -y null_model.yaml -p ncrc5.intel23 -t prod --execute

# Create Makefile
fre make create-makefile -y am5.yaml -p ncrc5.intel23 -t prod
fre make create-makefile -y null_model.yaml -p ncrc5.intel23 -t prod

# Create the compile script
fre make create-compile -y am5.yaml -p ncrc5.intel23 -t prod
fre make create-compile -y null_model.yaml -p ncrc5.intel23 -t prod

# Create and run the compile script
fre make create-compile -y am5.yaml -p ncrc5.intel23 -t prod --execute
fre make create-compile -y null_model.yaml -p ncrc5.intel23 -t prod --execute

2. Bare-metal Build Multi-target:

.. code-block::

# Create checkout script
fre make create-checkout -y am5.yaml -p ncrc5.intel23 -t prod -t debug
fre make create-checkout -y null_model.yaml -p ncrc5.intel23 -t prod -t debug

# Create and run checkout script
fre make create-checkout -y am5.yaml -p ncrc5.intel23 -t prod -t debug --execute
fre make create-checkout -y null_model.yaml -p ncrc5.intel23 -t prod -t debug --execute

# Create Makefile
fre make create-makefile -y am5.yaml -p ncrc5.intel23 -t prod -t debug
fre make create-makefile -y null_model.yaml -p ncrc5.intel23 -t prod -t debug

# Create the compile script
fre make create-compile -y am5.yaml -p ncrc5.intel23 -t prod -t debug
fre make create-compile -y null_model.yaml -p ncrc5.intel23 -t prod -t debug

# Create and run the compile script
fre make create-compile -y am5.yaml -p ncrc5.intel23 -t prod -t debug --execute
fre make create-compile -y null_model.yaml -p ncrc5.intel23 -t prod -t debug --execute

3. Container Build:

Expand All @@ -150,28 +150,34 @@ In order for the container to build successfully, a `-npc`, or `--no-parallel-ch
.. code-block::

# Create checkout script
fre make create-checkout -y am5.yaml -p hpcme.2023 -t prod -npc
fre make create-checkout -y null_model.yaml -p hpcme.2023 -t prod -npc

# Create and run checkout script
fre make create-checkout -y am5.yaml -p hpcme.2023 -t prod -npc --execute
fre make create-checkout -y null_model.yaml -p hpcme.2023 -t prod -npc --execute

# Create Makefile
fre make create-makefile -y am5.yaml -p hpcme.2023 -t prod
fre make create-makefile -y null_model.yaml -p hpcme.2023 -t prod

# Create Dockerfile
fre make create-dockerfile -y am5.yaml -p hpcme.2023 -t prod
fre make create-dockerfile -y null_model.yaml -p hpcme.2023 -t prod

# Create and run the Dockerfile
fre make create-dockerfile -y am5.yaml -p hpcme.2023 -t prod --execute
fre make create-dockerfile -y null_model.yaml -p hpcme.2023 -t prod --execute

4. Run all of fremake:

Currently, run-fremake kicks off the compilation automatically; no ``--execute`` option needed.
`run-fremake` kicks off the compilation automatically

.. code-block::

# Bare-metal
fre make run-fremake -y am5.yaml -p ncrc5.intel23 -t prod
# Bare-metal: create and run checkout script, create makefile, create compile script
fre make run-fremake -y null_model.yaml -p ncrc5.intel23 -t prod

# Container
fre make run-fremake -y am5.yaml -p hpcme.2023 -t prod -npc
# Bare-metal: create and run checkout script, create makefile, create and run compile script
fre make run-fremake -y null_model.yaml -p ncrc5.intel23 -t prod --execute

# Container: create checkout script, makefile, and dockerfile
fre make run-fremake -y null_model.yaml -p hpcme.2023 -t prod -npc

# Container: create checkout script, makefile, create and run dockerfile to build container
fre make run-fremake -y null_model.yaml -p hpcme.2023 -t prod -npc --execute
Loading