-
Notifications
You must be signed in to change notification settings - Fork 146
Debug docs #225
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
Open
rosscastle
wants to merge
4
commits into
ExeClim:master
Choose a base branch
from
rosscastle:debug_docs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Debug docs #225
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| Ideas for ‘debugging’ problems in Isca | ||
| ====================================== | ||
|
|
||
| When Isca runs crash it can be difficult to diagnose the problem. We suggest trying these steps below in order to work out where the crash is happening. Not all may be applicable to your problem. | ||
|
|
||
| Write Statements | ||
| ---------------- | ||
| Add in some write commands into the Fortran files you suspect are causing trouble. These can be either to print out values to check if they seem sensible, or periodic statements (e.g. every 100 lines or after every major function) so see how far the code is running. A quick and dirty way of printing variables directly to the terminal is to use a command in the code like this (note this will print every timestep without further conditions): | ||
|
|
||
| .. code-block:: fortran | ||
|
|
||
| write(6,*) "<Some description>: ", <variable> | ||
|
|
||
| Alternatively variables can be written to files, such as this `example <http://www.python.org/>`_. | ||
|
|
||
| Running on 1 core | ||
| ----------------- | ||
| A lot of issues on Isca can stem from parallelisation across multiple computing cores. If you run a job on 1 core and it works, you know that the problem lies here. Quite often it can be the allocation of the start/end integers ``is, ie, js, je`` | ||
|
|
||
| Column Model | ||
| ------------ | ||
| Using the column model can be useful to test that parameterisations like convection and radiation are working properly as you don’t have horizontal dynamics complicating things. | ||
|
|
||
| One Change At A Time | ||
| ------------------ | ||
| Generally when building a model, it is a good idea to create it iteratively. Start from somewhere you know works, for example one of our test cases, and make 1 or 2 changes at a time towards your ideal set up. Then you will know what change is causing the crash. | ||
|
|
||
| Diagnostics | ||
| ----------- | ||
| Be sure to output diagnostics that can help you diagnose the problem. That said, sometimes turning off diagnostics can stop model crashes. If this is the case, your problem is likely data related. | ||
|
|
||
| Recompile | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps state this can be done by deleting the current |
||
| --------- | ||
| Ensure that you are recompiling the Fortran each time. | ||
|
|
||
| Timestep | ||
| -------- | ||
| The usual quickest fix when you have a model run that is crashing part way through is to increase the timestep. Your timestep must obey the `CFL criterion <https://en.wikipedia.org/wiki/Courant%E2%80%93Friedrichs%E2%80%93Lewy_condition>`_. | ||
|
|
||
| Check you’ve allocated large enough variable size | ||
| ------------------------------------------------- | ||
| Particularly important when using an uncommon diagnostic. | ||
|
|
||
|
|
||
| Increase the stack size | ||
| ----------------------- | ||
| Ensure there is enough temporary memory to hold the run and data created. | ||
|
|
||
|
|
||
| Authors | ||
| ------- | ||
| This documentation was put together by the Isca team from their experience with using Isca. | ||
| Last updated 08/10/2021 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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'd suggest removing the reference to the column model for now as it isn't in the master yet