-
Notifications
You must be signed in to change notification settings - Fork 32
(closes #3243) Unify and document nemo scritps #3244
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
base: master
Are you sure you want to change the base?
Conversation
…ation' into single_nemo_script
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3244 +/- ##
=======================================
Coverage 99.91% 99.91%
=======================================
Files 376 376
Lines 53529 53543 +14
=======================================
+ Hits 53484 53498 +14
Misses 45 45 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@arporter This is ready for a first review. See top PR description for the things that this PR attempts. |
LonelyCat124
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @sergisiso
Overall looks fine, few typos in the examples which I think means they won't have been tested with the new changes. Can you fix that up and then rerun the integration to check they all run correctly with the GPU enabled.
examples/nemo/eg1/Makefile
Outdated
| ${PSYCLONE} -s ./openmp_gpu_levels_trans.py ../code/tra_adv.F90 | ||
| ${PSYCLONE} -s ../scripts/omp_cpu_trans.py ../code/tra_adv.F90 | ||
| ${PSYCLONE} -s ../scripts/omp_gpu_trans.py ../code/tra_adv.F90 | ||
| PARALLEL_DIRECTICVES="omp_threading" ${PSYCLONE} -s ../scripts/insert_loop_parallelism.py ../code/tra_adv.F90 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be PARLLEL_DIRECTIVES I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ups, fixed
examples/nemo/eg2/Makefile
Outdated
| ${PSYCLONE} -s ./omp_levels_trans.py ../code/traldf_iso.F90 | ||
| ${PSYCLONE} -s ../scripts/omp_cpu_trans.py ../code/traldf_iso.F90 | ||
| ${PSYCLONE} -s ../scripts/omp_gpu_trans.py ../code/traldf_iso.F90 | ||
| PARALLEL_DIRECTICVES="omp_threading" ${PSYCLONE} -s ../scripts/insert_loop_parallelism.py ../code/traldf_iso.F90 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also should be DIRECTIVES
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
examples/nemo/scripts/README.md
Outdated
| > but these are pinned to a particular release of PSyclone and have constraints | ||
| > defined in `mk/sct_psyclone.sh` script. By contrast, the process presented in | ||
| > this README uses the experimental `psyclonefc` compiler wrapper command which | ||
| > bypases the `makenemo -p` and instead intercepts any compilation command and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bypasses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
examples/nemo/scripts/README.md
Outdated
| compile, but the results will diverge. This gets more complicated with parallel | ||
| programming because certain operations like reductions or atomics are not | ||
| always reproducible. Therefore, to understand what causes the results divergence | ||
| it is usefulk to apply the transformations step-by-step while checking if the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/usefulk/useful/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
examples/nemo/scripts/README.md
Outdated
| and see if the results still match. | ||
| - Finally, run it with `REPRODUCIBLE=1 PARALLEL_DIRECTIVES="omp_offloading" PSYCLONE_OPTS="-s insert_loop_parallelism.py"` | ||
|
|
||
| Orthogonally to finding which step is causing the divergence we may want to find |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think "Alongside finding which step is causing the divergence" might be more appropriate? These feel like related steps not opposed to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, updated
examples/nemo/scripts/README.md
Outdated
| In addition to the source, you can also modify the recipe that psyclone uses to | ||
| transform the code. In this example you can do so by changing any detail of the | ||
| `insert_loop_parallelism.py` transformation script, but the `FILES_TO_SKIP` | ||
| global variable is particularly relevant as it allows psyclone skip processing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/psyclone/PSyclone/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated several instances of this in this file
examples/nemo/scripts/utils.py
Outdated
| except TransformationError: | ||
| pass | ||
| if filename == "fldread.f90": | ||
| # TODO #2951: This file has issues converting SturctureRefs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/Sturcture/Structure
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
| if filename == "fldread.f90": | ||
| # TODO #2951: This file has issues converting SturctureRefs | ||
| pass | ||
| elif nemo_v4 and filename == "dynspg_ts.f90": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment on skipping this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I created the relevant issue and added a TODO here
|
@LonelyCat124 This is ready for another review |
bc5d55f to
1fc199e
Compare
Uh oh!
There was an error while loading. Please reload this page.