Realistic lfric2lfric configs - #660
Conversation
| partitioner_dst, & | ||
| enforce_constraints = .false. ) | ||
|
|
||
| call global_mesh_collection%clear() |
There was a problem hiding this comment.
I guess this line is here because the global mesh is not needed by lfric2lfric. Why is it not the case when the source and destination meshes are read from the same file? Shouldn't be this line outside the if sentence?
A comment in the PR indicating that this change is taking place, apart from the addition of the new tests, would be useful.
I could not find an associated issue where the details of the PR are discussed, although I know this is part of larger work.
There was a problem hiding this comment.
I've adjusted the code to also clear the global mesh for the case when the source and destination mesh are from the same file.
There was a problem hiding this comment.
What I meant is that the clear global mesh could be done outside the
if (mesh_file(dst) == mesh_file(src)) then
condition, but it is also possible to do it like you did.
There was a problem hiding this comment.
Thanks Juan. Sorry I didn't explain this. Yes I did consider putting the clear_global_mesh outside the if as you had suggested. But the reason I didn't is that when the dst is not the same as src, 2 clear_global_meshes are required - one after each create_local_mesh. So it seemed a better code structure to me to add the clear_global_mesh immediately after the create_local_mesh or create_local_maps. i.e. read global, create local_from_global, clear global. Repeat.
|
Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR. Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up. |
Juan Manuel Castillo Sanchez (ukmo-juan-castillo)
left a comment
There was a problem hiding this comment.
Approved, although the last comment should be considered.
mo-lucy-gordon
left a comment
There was a problem hiding this comment.
I'm happy with this code but I think another macro upgrade is needed for this PR as well, once 655 has gone on and this can be tested separately.
PR Summary
Also clearing the global mesh (which releases more memory for larger jobs such as these).
Tested by creating a test_branch, merging on the branch from #655, applying upgrade macro, merging on this branch and then running the
lfric2lfric_ex1a_weeklygroupSci/Tech Reviewer: Juan Manuel Castillo Sanchez (@ukmo-juan-castillo)
Code Reviewer: mo-lucy-gordon
blocked by #655
split from #530
#440
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - realistic/run16
Suite Information
Task Information
✅ succeeded tasks - 1208
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review