Allow applications partitioning meshes to specify partition constraints (imposed by multigrid) - #290
Conversation
|
I run the lfric_core rose stem tests successfully, everything seems in order: Test Suite Results - lfric_core - EnforcePartitionRestrictions/run1Suite Information
Task Information✅ succeeded tasks - 384 |
Juan Manuel Castillo Sanchez (ukmo-juan-castillo)
left a comment
There was a problem hiding this comment.
Everything seems in order, just a minor comment
| ! Equal divisions are only required if there are maps between meshes | ||
| if (any_maps) then | ||
| if (check_constraints) then | ||
| call log_event("Performing partition constraints.", log_level_debug) |
There was a problem hiding this comment.
The print line should probably be: 'Checking partition constraints'
There was a problem hiding this comment.
done
Juan Manuel Castillo Sanchez (ukmo-juan-castillo)
left a comment
There was a problem hiding this comment.
Since the last time I looked at this code, the only thing that has been done has been updating to head of the trunk and addressing my comments. Rose stem tests also pass successfully. I am more than happy to approve.
Mike Hobson (mike-hobson)
left a comment
There was a problem hiding this comment.
I have just a few comments that need some attention.
| !> @param[in] num_cells_y The panel's size in the y direction | ||
| !> @param[in] any_maps Whether there exist maps between meshes that | ||
| !> must having aligning partitions | ||
| !> @param[in] check_constaints Check meshes have aligned partitions |
There was a problem hiding this comment.
"constaint" -> "constraint". But that will mess up the alignment of the other comments - so you may need to sort that, too. A search for "constaint" reveals 6 other mis-spellings in comments that need correcting, along with their associated alignments.
| generate_inner_halos, & | ||
| partitioner_ptr ) | ||
| partitioner_ptr, & | ||
| enforce_constraints ) |
There was a problem hiding this comment.
There are no Doxygen comments for the new argument: enforce_constraints. Please can you add some
| ! Equal divisions are only required if there are maps between meshes | ||
| if (any_maps) then | ||
| if (check_constraints) then | ||
| call log_event("Checking partition constraints.", log_level_debug) |
There was a problem hiding this comment.
Do we really need another debug log message for this?
| max_stencil_depth, & | ||
| mapping_factor, & | ||
| generate_inner_halos, & | ||
| enforce_constraints, & |
There was a problem hiding this comment.
enforce_constraints needs a Doxygen comment.
| decomposition, & | ||
| max_stencil_depth, & | ||
| generate_inner_halos, & | ||
| enforce_constraints, & |
There was a problem hiding this comment.
Again, enforce_constraints needs a Doxygen comment.
| max_stencil_depth, & | ||
| mapping_factor, & | ||
| generate_inner_halos, & | ||
| enforce_constraints, & |
There was a problem hiding this comment.
Doxygen comment
Mike Hobson (mike-hobson)
left a comment
There was a problem hiding this comment.
Thanks for those changes. They all look good, now. I'm happy to approve this for merging.
PR Summary
Sci/Tech Reviewer: Juan Manuel Castillo Sanchez (@ukmo-juan-castillo)
Code Reviewer: Mike Hobson (@mike-hobson)
ticket:4630 relocated checks/code-path for constraints on partitions when using
MultiGridwithin the the partitioners. This is a check that the partitioner (or infrastructure) should not be performing (it's a Gungho Science feature).The contraints on multigrid are being triggered if the mesh file from which a mesh was read, contained intergrid maps, regardless of whether the application had any interest in multigrid (e.g. Lfric2Lfric re-gridding). This change provides logic for applications to specify whether they are concerned with "Multigrid" constraints.
Ideally, the checks should be relocated to
Gungho Science. This change achieves the desired outcome without compounding ticket:4630 complexity.Linked PRs
Blocking PRs
Code Quality Checklist
Testing
All rose-stem tests run green. without issue.
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