Where can I find the pre-processed fortran source files used in the lfric_apps rose-stem lfric_atm build? #308
Replies: 3 comments 10 replies
|
I'd be keen to know the answer to this too - we've had discussions before about the need to access this for exactly the purpose you describe. As a workaround, if you follow the command line build (https://code.metoffice.gov.uk/trac/lfric/wiki/GhaspSupport/PhysicsHandsOn#a2.Commandlinebuildandrun) you will be able to look at the pre-processed code in the /working directory - and running your comorph_dev scm case from the command line will also probably make it much easier to debug. |
|
Hi Michael, LFRic compiles take place on temporary directories for optimisation reasons, which is why they don't appear in the cylc run output. I do advocate working out how to build and test from the command line because turnaround can be much quicker as you benefit from incremental builds rather than having to rebuild each time. You may need to construct your own submission script if you want to run in batch. For your problem above, the only preprocessing that currently happens to (capital F) .F90 files is for #if defined lines, and there are none in the file you mention. The line number is the start of a loop. I'm wondering if the issue is that it's an OpenMP loop that's causing the compiler to give a confusing line number. What happens if you remove the openmp directives? |
|
The working directory for build tasks is controlled by You could change where the working directory is located. Remember that it must be somewhere the compute nodes can see. Alternatively you could set up a post-script to the compile task which uses This is not normally an issue for us as we develop interactively at the command line where the working directory is next to the source. Which wont help you if your bug only reveals itself in configurations too large to run on the desktop. |
Uh oh!
There was an error while loading. Please reload this page.
Hi folks,
I'm embarking on my first attempt to debug a failing lfric_apps rose-stem run of lfric_atm :)
I have some linked UM / lfric_apps tickets:
https://code.metoffice.gov.uk/trac/um/ticket/7407
https://code.metoffice.gov.uk/trac/lfric_apps/ticket/481
The UM tests look fine, and so do most of my latest go at lfric_apps tests, but I'm getting run-time fails in the comorph_dev apps that I've modified to test the new functionality, only for the SCM spice_intel_fast-debug compile (the same configuration run on xc40 CCE runs fine, including a larger 3D run).
The failing spice intel SCM comorph_dev run gives an error complaining about a floating divide-by-zero in one of the UM physics source files added by the linked UM ticket:
My problem now is that L366 of that file in my UM branch doesn't even contain a divide. Presumably the line number given by the error message refers to the pre-processed source file, not the original file in my UM branch, and the pre-processor has added or removed lines so that they don't match-up. I'm familiar with this issue when debugging run-time errors in the UM; one simply needs to go and dig out the pre-processed fortran source files from
cylc-run/vnXX.Y_my_branch/share/fcm_make_spice_whatever/preprocess-atmos/srcand find the line-number the error refers to in there.
How do I do this in lfric_apps?
I've had a good rummage through the files contained in the appropriate cylc-run directories on spice (where the compile for the failing job was performed), but have so-far failed to find the pre-processed fortran source. Does anyone know where the LFRic build squirrels these away?
Cheers!
Mike
All reactions