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

Dev Guide updates #440

Merged
merged 1 commit into from
Sep 15, 2023
Merged

Dev Guide updates #440

merged 1 commit into from
Sep 15, 2023

Conversation

forsyth2
Copy link
Collaborator

Dev Guide updates

@forsyth2 forsyth2 added DevOps CI/CD, configuration, etc. Documentation Files in `docs` modified labels Jun 19, 2023
@forsyth2 forsyth2 self-assigned this Jun 19, 2023
@forsyth2 forsyth2 marked this pull request as draft June 19, 2023 12:43
@forsyth2
Copy link
Collaborator Author

I will probably merge this after the summer 2023 release. That way I can update it throughout the release process as difficulties/unclear steps are encountered.

Then I will make an equivalent pull request for zstash.

@forsyth2 forsyth2 mentioned this pull request Jun 19, 2023
@forsyth2 forsyth2 force-pushed the dev-guide-updates branch from d76a265 to ca8f498 Compare June 19, 2023 12:49
@xylar
Copy link
Contributor

xylar commented Jun 19, 2023

Good plan!

@forsyth2 forsyth2 force-pushed the dev-guide-updates branch 2 times, most recently from 007ad76 to 074c781 Compare August 10, 2023 18:45
* `Compy <https://github.com/E3SM-Project/zppy/blob/main/tests/integration/generated/directions_compy.md>`_
* `Perlmutter <https://github.com/E3SM-Project/zppy/blob/main/tests/integration/generated/directions_pm-cpu.md>`_

9. Run the integration tests with ``python -u -m unittest tests/integration/test_*.py``. Note that ``test_complete_run.py`` takes approximately 75 minutes to run on Compy.
Copy link
Collaborator Author

@forsyth2 forsyth2 Aug 15, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

About 20 minutes to run entire test suite on Chrysalis. The zppy run of test_complete_run_chrysalis.cfg takes a little over an hour.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compy: Ran 13 tests in 5836.885s [97.3 minutes] for python -u -m unittest tests/integration/test_*.py

Copy link
Collaborator Author

@forsyth2 forsyth2 Aug 18, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compy, after updating expected files: Ran 1 test in 669.627s [11.2 minutes] for python -u -m unittest tests/integration/test_complete_run.py (the longest-running test).

I suspect the printing of error messages (e.g., the image diff information) may be what slowed the previous run down so much.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compy, after updating expected files: Ran 13 tests in 2854.441s [47.6 minutes] for python -u -m unittest tests/integration/test_*.py (all integration tests)

Testing directions for making a release
***************************************

1. Have three shells open: one on Chrysalis, one on Compy, and one on Perlmutter. Do the following steps on each machine.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be a good idea to have a slightly different document for testing Unified releases (i.e., using Unified RCs rather than a zppy dev environment)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 3: git checkout -b test_unified_rc12 upstream/main
Step 6: Load the relevant Unified RC. E.g.,

Chrysalis: source /lcrc/soft/climate/e3sm-unified/test_e3sm_unified_1.9.0rc12_chrysalis.sh
Compy: source /share/apps/E3SM/conda_envs/test_e3sm_unified_1.9.0rc12_compy.sh
Perlmutter: source /global/common/software/e3sm/anaconda_envs/test_e3sm_unified_1.9.0rc12_pm-cpu.sh

Step 7: if there are any failures, make a fix and use a zppy dev environment until the fix can be incorporated into the next Unified RC.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Include the machine name in git checkout -b test_unified_rc12 upstream/main. That way I can push a branch for each machine for the testing-fixes PRs that are typical in the release process (e.g., #486)

* `Chrysalis <https://github.com/E3SM-Project/zppy/blob/main/tests/integration/generated/directions_chrysalis.md>`_
* `Compy <https://github.com/E3SM-Project/zppy/blob/main/tests/integration/generated/directions_compy.md>`_
* `Perlmutter <https://github.com/E3SM-Project/zppy/blob/main/tests/integration/generated/directions_pm-cpu.md>`_

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Between these steps, check the status of the files. Probably best to add that to the testing direction files above:
e.g., for Chrysalis:

$ cd /lcrc/group/e3sm/ac.forsyth2/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts
$ grep -v "OK" *status
$ cd /lcrc/group/e3sm/ac.forsyth2/zppy_test_bundles_output/v2.LR.historical_0201/post/scripts
$ grep -v "OK" *status

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compy:

$ cd /compyfs/fors729/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts/
$ grep -v "OK" *status
$ cd /compyfs/fors729/zppy_test_bundles_output/v2.LR.historical_0201/post/scripts/
$ grep -v "OK" *status

Perlmutter:

$ cd /global/cfs/cdirs/e3sm/forsyth/zppy_test_complete_run_output/v2.LR.historical_0201/post/scripts
$ grep -v "OK" *status
$ cd /global/cfs/cdirs/e3sm/forsyth/zppy_test_bundles_output/v2.LR.historical_0201/post/scripts
$ grep -v "OK" *status

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently, the placement of the image_check_failures directory results in it being mistakenly included in the expected files, when the expected files are updated. This should be resolved by running rm -rf /global/cfs/cdirs/e3sm/www/forsyth/zppy_test_bundles_www/v2.LR.historical_0201/image_check_failures* (and similar for complete run, and on different machines)before running thecp -r` line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, try to have two sets of expected -- one from the latest official release, one from the latest main.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=> Make a note before the rm -rf /lcrc/group/e3sm/public_html/zppy_test_resources/expected_complete_run line to copy to a expected_complete_run_v2.3.0 directory (if a release has just been made).

$ mamba clean --all
$ mamba env create -f conda-env/dev.yml -n e3sm_diags_<date>
$ conda activate e3sm_diags_<date>
$ pip install .
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd back to zppy directory

At https://github.com/E3SM-Project/zppy/branches, delete any branches that are no longer needed.

Once there is a final release of E3SM Unified, run the pre-test ``zppy`` runs to establish baseline expected images. Run the "Commands to run before running integration tests" for the current machine. To ensure you don't encounter issues from running ``zppy`` commands simultaneously, wait for all the automatically launched jobs from one run to finish before running ``zppy`` again.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, probably best to just follow the same directions from docs/source/dev_guide/pre_release_test_unified.rst, just with the final release rather than an RC

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Except, set generate_cfgs(unified_testing=False), so the latest Unified is in fact used

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to update environment_commands_test

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 6 needs to be the latest Unified script


3. Check out a branch to test on. ::

git fetch upstream main
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that on Compy, this might not always get the latest commits from main. It is better to do git fetch upstream to fetch all branches.


Use these directions to test a ``zppy`` dev environment prior to making a release candidate (RC).

TODO: match up wording with the other doc
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe make it all one doc with sub-steps A) dev, B) pre-release, C) testing Unified release

@@ -0,0 +1,61 @@
***************************************
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Render docs:

$ cd /home/ac.forsyth2/zppy/docs
$ make html
$ mv _build/html/ /lcrc/group/e3sm/public_html/diagnostic_output/ac.forsyth2/html_20230914

@forsyth2 forsyth2 marked this pull request as ready for review September 15, 2023 22:43
@forsyth2 forsyth2 merged commit 23065c9 into main Sep 15, 2023
@forsyth2 forsyth2 deleted the dev-guide-updates branch September 15, 2023 22:43
This was referenced Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps CI/CD, configuration, etc. Documentation Files in `docs` modified
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants