Comments (14)
I'm confused by this one. We do a halo update of uvm right after we compute it. Also, the NAG compiler with -nan on was not catching this.
from cice.
Okay, let's not worry about it for now. They've been working on their version of the code, which we will try to merge into the main CICE sooner or later. I'll ask them to run the new code through their tests, and we'll see if it comes up again. I'll take this off of the project board but keep the issue open.
from cice.
@mhrib @TillRasmussen
This is one of the issues that I entered based on your original text describing the various tests that you'd run, which turned up some problems. If you can, please run those tests again with the current code and see which problems persist. See also #59.
from cice.
@dabail10 please test with your Nag compiler - if it comes back clean then we can close this issue.
from cice.
I have looked into the compile flags that was used. For IEEE, which were the one that displayed the issue, the flags were "-g -00 -ieee=stop -nan". Unfortunatly we dont have the compiler inhouse at DMI anymore.
from cice.
I have been playing with the nag compiler this morning and have not been able to duplicate this error. There is an interesting line at 1584,
! uvm = c0
which seems to have been modified (commented out) in 2018 by Dave. Not sure why, but given we are not able to duplicate the error from DMI, I think we can close this.
There is one other thing though. When I add -nan to the compile, I get a separate error,
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90: In function ‘dmi_omp_MP_domp_get_domain_rlu’:
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90:110:58: error: ‘dmi_omp_MP_rdomp_iamTPI’ undeclared (first use in this function)
> > subroutine domp_get_domain_rlu(lower,upper,d_lower,d_upper)
> > ^
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90:110:58: note: each undeclared identifier is reported only once for each function it appears in
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90:110:57: error: ‘dmi_omp_MP_rdomp_ntTPI’ undeclared (first use in this function)
> > subroutine domp_get_domain_rlu(lower,upper,d_lower,d_upper)
> > ^
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90: In function ‘dmi_omp_MP_domp_initMP__omp459’:
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90:70:57: error: ‘dmi_omp_MP_rdomp_ntTPI’ undeclared (first use in this function)
> > !$OMP PARALLEL DEFAULT(none)
> > ^
> > /home/tcraig/cice-consortium/cice.nagclean/cicecore/cicedynB/dynamics/ice_dyn_evp_1d.F90:70:58: error: ‘dmi_omp_MP_rdomp_iamTPI’ undeclared (first use in this function)
> > !$OMP PARALLEL DEFAULT(none)
> > ^
> > /home/tcraig/cice-consortium/cice.nagclean/izumi_nag_smoke_gx3_8x1_debug_diag1_run1day_thread.chk02/Makefile:144: recipe for target 'ice_dyn_evp_1d.o' failed
> > gmake: *** [ice_dyn_evp_1d.o] Error 1
> >
>
I spent a few minutes trying to understand this. This only happens when threading and -nan is set. The error went away if I removed the threadprivate OMP definition at line 51 and then changed the OMP PARALLEL DEFAULT(none) statement on line 70 to OMP PARALLEL PRIVATE(domp_iam,domp_nt,rdomp_iam,rdomp_nt).
At this time, I think we have to assume this is a compiler bug. It doesn't make a lot of sense that the -nan compiler argument breaks some thread private implementation. On the other hand, it would be nice to be able to use the -nan option, and I do have some lingering concerns about whether maybe the thread implementation in the evp_1d is completely correct.
What I will do is add a comment to #279 and reopen it (it probably should not have been closed). This might be part of the evp kernel=2 validation still needed. Separately, I suggest we close this issue.
from cice.
We have not been able to reproduce the original problem, and so closing the issue.
from cice.
Now that I Iook at this again. Is there a problem wtth the openmp?
!$OMP PARALLEL DO PRIVATE(iblk,i,j,ilo,ihi,jlo,jhi,this_block)
What is ilo, jlo... Doing here?
from cice.
For reference, these are the lines Till is talking about (right?):
CICE/cicecore/cicedynB/infrastructure/ice_grid.F90
Lines 1641 to 1657 in a76893a
from cice.
above is the first loop, the second one is:
CICE/cicecore/cicedynB/infrastructure/ice_grid.F90
Lines 1666 to 1675 in a76893a
and the uninitialized value in uvm
I'm talking about in #560 is triggerd at line 1673 (in the second loop).
from cice.
The variables in the OMP loop have to be private so they are unique to each block/thread. Variables that are already scattered and have iblk as an array index are fine.
from cice.
@apcraig @TillRasmussen
Is this issue relevant to the current conversation about NaNs in halos or padding? See #572
from cice.
Yes I think so. In the first loop from @phil-blain comment on the 29th of January uvm is calculated from ilo to ihi and jlo to jhi and then copied to the halo zones. I think that this is fine except now that I look at it there is an integer divided by a double in the calculation of bm.
After the loop a call to halo update is done for uvm and bm.
If the ice_haloupdate has a bug then this is not copied to the halo in the blocks with padding.
In the second loop uvm and hm are used in the padding zone.
This loop could also be limited to ilo,jlo to ihi,jjhi. This may require calls to icehaloupdate for variables calculated within this loop
from cice.
This is being addressed in #560 and follow on. Will close now.
from cice.
Related Issues (20)
- dsnow optional argument in icepack_step_therm1 HOT 2
- evp1d performance evaluation
- Support netcdf-4 compression & chunking HOT 1
- hist_avg on multiple streams writes the same filenames when .false. HOT 9
- Potential instability related to explicit treatment of Coriolis for C-grid HOT 3
- Arguments in update_state need if present. HOT 2
- dynamics U points are active when T points are not HOT 5
- Commit/PR process HOT 3
- PIO and hdf5 failures HOT 6
- Test various restart formats and add Derecho port that uses pio spack HOT 1
- tripole initial/restart file with inconsistent values on the tripole seam HOT 15
- CICE C-grid crash on 1/12 degree tripole HOT 11
- Can we remove `nprocs` from `ice_in` ? HOT 6
- FSD heat / water / salt conservation
- PIO createfile where path is a symlink
- Minor modifications required in documentation HOT 3
- Unnecessary calculations for uvel, vvel for the C-grid HOT 5
- Questions about the computer configuration required to run HOT 1
- Make a_min and m_min adjustable
- NCAR derecho compilers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cice.