-
Notifications
You must be signed in to change notification settings - Fork 64
Branch of fesom2.6 including recom and tracer parallelisation #681
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: main
Are you sure you want to change the base?
Conversation
Define new variables to track tracer changes due to advection and diffusion. We want to save for now diffusion and advection contribution to the tracer changes. Horizontal and vertical diffusion includes Redi parametrization (if it is set .true.).
Fill __ciso directive to ensure that carbon isotope code works. Medusa interface is added.
|
By compilation I found an issue regrading new compilations. I need to manually delete the executable file fesom.x in fesom2.build/bin and then compile the model. Otherwise, after a successful compilation I will still find the old fesom.x in fesom2/bin. |
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.
Summary of review:
There were a few places that need changing, some that may not need to change but would require a closer look that everything is indeed ok. There are a number of style improvements to be made. All comment that start with ! kh date should start without the name and date. Same for !YY, !O:G !OG and !.OG. Git blame can tell you this info.
In addition to the standalone FESOM2 CI tests, this branch needs to be tested by me as part of AWI-CM3, by @ackerlar as part of AWI-ESM2, by @sebastianbeyer or @suvarchal as part of IFS-FESOM, by @mbutzin with active tracers. I'm assuming here, that you have already tested this branch with recom and without _usetp
| set(USE_ICEPACK OFF CACHE BOOL "compile fesom with the Iceapck modules for sea ice column physics.") | ||
| set(OPENMP_REPRODUCIBLE OFF CACHE BOOL "serialize OpenMP loops that are critical for reproducible results") | ||
| set(RECOM_COUPLED OFF CACHE BOOL "compile fesom including biogeochemistry, REcoM3") | ||
| set(RECOM_COUPLED ON CACHE BOOL "compile fesom including biogeochemistry, REcoM3") |
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 turned back for the main branch.
| integer :: AB_order=2 | ||
| integer :: ID | ||
| !___________________________________________________________________________ | ||
| ! TODO: Make it as a part of namelist.tra |
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.
Should be done before more?
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.
need to clarify with Özgür
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.
@ogurses ?
|
In addition to the changes of the review, the merge conflicts should be solved. Most of them look like simple double additions of new features that both have to be kept. e.g. parallel tracers and icebergs. |
|
Is there any template fesom-recom yaml that I can use for testing? |
|
I get this error during compilation: |
|
I am still testing the code. So far I can run ocean-only without __usetp in CMakeLists and compile the model with __usetp. But I have not yet tested the coupled setup. |
I just compiled it with FESOM_COUPLED ON and didn't get any error. Did you compile the model with esm-tools? |
|
@a270105 yes, I used esm_tools: which oasis version are you using? |
|
I got at least rid of this error when switching to oasis branch |
| call cpl_oasis3mct_init(f%partit,f%partit%MPI_COMM_FESOM) | ||
| ! call cpl_oasis3mct_init(f%partit,f%partit%MPI_COMM_FESOM) | ||
| ! kh 02.12.21 | ||
| #if defined(__recom) && defined(__usetp) |
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.
"localCommunicator" is neither defined in fesom_module nor in MOD_PARTIT. Should this really be "localCommunicator" or "f%partit%MPI_COMM_FESOM"?
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 can't really answer this. These lines already exited in fesom2.5-recom and another earlier version where Özgür and I merged their complex recom version and my simpler paleo version. But I can't find them in my paleo version where Kai first time implemented tracer parallelisation. There this part of code is still in fvom_main.f90 and only contains:
#if defined (__oasis)
! kh 21.03.22 pass num_fesom_groups to coupler
call cpl_oasis3mct_init(MPI_COMM_FESOM, num_fesom_groups)
#endif
t1 = MPI_Wtime()
call par_init
......
So I think it should be for the case with tracer parallelisation:
call cpl_oasis3mct_init(f%partit, f%partit%MPI_COMM_FESOM, num_fesom_groups)
|
FESOM compiled for me with some minor changes in MPI calls. I also changed in However, the model crashes as FESOM is missing some entries in namelist.config. Is there a recom specific namelist.config? |
|
Do you compile with __usetp? If not, there is no additional entry needed in namelist.config. |
Yes, I set in |
|
Good progress @a270105. @suvarchal, or maybe @sebastianbeyer, any chance you can try to run a day of ifs-fesom with this branch this week? |
|
The issue with copying recom restart files is fixed now and the changes are committed in the awiesm-2.6-recom branch. |
|
I tried the AWI-ESM3 part. I get stuck compiling: Does that look familiar to you @a270105 ? |
|
No, I have never had problem with this line. |
|
Yes, we use oasis3mct5, not oasis3mct2.8 |
|
Can you use the branch |
|
Can you link to that branch? |
|
This branch is many years out of date. We can not run the latest AWI-ESM3 with that. Even if we make that run, it would not help us for the merge request at hand. We need this to work with new oasis3mct versions that contain required features, such as CONSERV remapping. Maybe this is something Kai can tackle? I am running with: https://git.smhi.se/ec-earth/vendor/oasis/oasis3-mct-5.git |
|
I am not suggesting to use that branch, just to see where Kai changed things related to tracer parallelisation. Maybe it is not too difficult to just add those in your oasis code. |
|
yes, I also found his changes in these 3 files |
|
Can you give this a try @a270105 & @chrisdane? I might not have the time to do so before the model freeze. |
|
I can't run awiesm-2.6-recom with TP with the current oasis (from the branch 'multi-group-support') and got segmentation fault at the step |
Good to know. This does not block the merge, as that would be a new feature. |
I no longer get this error using the Group enabled version of OASIS3MCT5. |
I though I was able to fix this by switching from #ifdef to !DEC statements, But I think that broke the code even more. Consider reverting. We need a solution to have preprocessors statements in the .h files. Otherwise we need two versions and include those. But that would add over 300 preprocessors statements and back a clusterfuck. No way I want to do that. Any idea how to do this @suvarchal? |
|
I just looked back in this merge request. Yes, I had the same issue and Lars as well. I tried with !DIR since I thought it would be good to not to be compiler specific...But for some reasons it did not work. So we decided to remove the preprocessor directives and let those pointers always defined. The same is done for the iceberg part. I just have these lines in the beginnging of my associate_part_ass.h: |
|
I have the version that is pushed onto the repo here. |
|
The preprocessor directives in those two .h files are deleted and I compiled the code with usetp on and off. |
|
Adding the tests to the end, so they are easier to find: Here are the tests we need to pass once before we can merge this branch: Compiling:
Running for 1 day:
Update: |
|
Update, I was able to run AWI-ESM3 without TP on this branch, after a local merge of our CO2 coupling developments done on fesom2.6_recom_awiesm3_co2_coupling I will not test AWI-ESM3 with TP. It will not work yet, but it does not have to for this PR. |
|
I have to report something really odd: |
Tracer parallelisation can be switched on by __usetp in fesom2/src/CMakeLists.txt and onlye used when recom is on.