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

Re-factored GFDL gitlab pipeline #144

Merged
merged 2 commits into from
Jun 13, 2022
Merged

Conversation

adcroft
Copy link
Member

@adcroft adcroft commented Jun 10, 2022

The MOM6 pipeline commands were scripted using make in the file MOM6-examples/tools/MRS/Makefile. This was trying to encapsulate the commands used in the pipeline so they could also be used at the command line (for emulating the pipeline). However, it required emulating the temporary/transient work-spaces provided by gitlab. Also, the Makefile was impenetrable.

New approach:

  • Create a persistent working space for each pipeline, just as you'd work interactively in a single working directory
  • Use the same commands in .gitlab-ci.yml as we'd use interactively (these still use the tools/MRS Makefile.build and Makefile.run)
  • The compute stage of tasks is now a bash script (.gitlab/mom6-ci-run-script.sh) which will work/can be submitted from your working directory
  • The caching of results from each run (gnu/intel/pgi, symmetric/nonsymmetric/layout/etc) is stored locally in the same working directory so we don't have to look elsewhere for the results
  • Using the "fetch" strategy allows later stages to startup in mere seconds (previously re-cloning the repo took minutes)

This does not shorten the turn around significantly but I believe it is a lot easy to follow and emulate.

An example pipeline is https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/15815 (GFDL-only)

Todo:

  • split up the run stage to reduce it from 41+ minutes to ~13 minutes.

The MOM6 pipeline commands were scripted using make in the file MOM6-examples/tools/MRS/Makefile. This was trying to encapsulate the commands used in the pipeline so they could also be used at the command line (for emulating the pipeline). However, it required emulating the temporary/transient work-spaces provided by gitlab. Also, the Makefile was impenetrable.

New approach:
- Create a persistent working space for each pipeline, just as you'd work interactively in a single working directory
- Use the same commands in .gitlab-ci.yml as we'd use interactively (these still use the tools/MRS Makefile.build and Makefile.run)
- The compute stage of tasks is now a bash script (.gitlab/mom6-ci-run-script.sh) which will work/can be submitted from your working directory
- The caching of results from each run (gnu/intel/pgi, symmetric/nonsymmetric/layout/etc) is stored locally in the same working directory so we don't have to look elsewhere for the results
- Using the "fetch" strategy allows later stages to startup in mere seconds (previously re-cloning the repo took minutes)

This does not shorten the turn around significantly but I believe it is a lot easy to follow and emulate.

Todo:
- split up the run stage to reduce it from 41+ minutes to ~13 minutes.
@adcroft adcroft added the enhancement New feature or request label Jun 10, 2022
@codecov
Copy link

codecov bot commented Jun 10, 2022

Codecov Report

Merging #144 (8954c86) into dev/gfdl (c886ae7) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           dev/gfdl     #144   +/-   ##
=========================================
  Coverage     33.45%   33.45%           
=========================================
  Files           262      262           
  Lines         71434    71434           
  Branches      13339    13339           
=========================================
  Hits          23896    23896           
  Misses        43064    43064           
  Partials       4474     4474           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c886ae7...8954c86. Read the comment docs.

@marshallward
Copy link
Member

Gaea regression: https://gitlab.gfdl.noaa.gov/ogrp/MOM6/-/pipelines/15863 ✔️

@marshallward marshallward merged commit e5580e3 into NOAA-GFDL:dev/gfdl Jun 13, 2022
@adcroft adcroft deleted the new-pipes branch June 26, 2023 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants