-
Notifications
You must be signed in to change notification settings - Fork 42
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
upgrade the halo exchange procedure for the function space 'PointCloud' #120
upgrade the halo exchange procedure for the function space 'PointCloud' #120
Conversation
…ote_index' to be used for the halo exchange
notes
|
Closes #121 |
Please @mo-lormi sign the CLA when you can. |
If we ever get to use this for observation we will have cases where the longitude and latitude points are non unique. (We can have multiple observations at the same longitude/latitude) . It might be worth having a chat about this at the Atlas code sprint that is happening next week). |
array::make_view<idx_t, 1>(remote_index_).data(), | ||
REMOTE_IDX_BASE, | ||
ghost_.size()); | ||
ghost_(flds["ghost"]), remote_index_(flds["remote_index"]), partition_(flds["partition"]) { |
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 personally would have kept the old functionality for this constructor to allow for special cases.
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.
@MarekWlasak please note that the constructor PointCloud(const FieldSet & flds)
that uses four fields for the intialization has not been modified -- see lines 422-429.
The introduction of the function setupHaloExchange()
and the check here allow to avoid redundant code by sharing the procedure to set up the halo exchange across constructors with different signature.
... done |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #120 +/- ##
===========================================
- Coverage 77.54% 76.99% -0.55%
===========================================
Files 806 801 -5
Lines 57679 50544 -7135
===========================================
- Hits 44725 38916 -5809
+ Misses 12954 11628 -1326
☔ View full report in Codecov by Sentry. |
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.
Hi @mo-lormi , Very good improvement! Just a few cosmetic changes requested.
src/atlas/functionspace/PointCloud.h
Outdated
PointCloud(const FieldSet&); // assuming lonlat ghost ridx and partition present. | ||
|
||
PointCloud(const Field&); | ||
PointCloud(const Field&, const Field&); |
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.
It is good to keep the arguments named in above 2 lines to indicate what is expected without going into the ".cc" file.
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.
... done
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation | ||
* nor does it submit to any jurisdiction. |
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 comment cannot be removed
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.
... done
* | ||
* This software is licensed under the terms of the Apache Licence Version 2.0 | ||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | ||
* In applying this licence, ECMWF does not waive the privileges and immunities | ||
* granted to it by virtue of its status as an intergovernmental organisation | ||
* nor does it submit to any jurisdiction. |
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 comment cannot be removed
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.
... done
|
||
const eckit::mpi::Comm& comm = atlas::mpi::comm(); | ||
std::size_t mpi_rank = comm.rank(); | ||
const std::size_t no_mpi_ranks = comm.size(); |
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.
Cosmetic change: Please use "mpi_size" as name.
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.
Actually, these lines were not used. I removed them.
void PointCloud::setupHaloExchange(){ | ||
const eckit::mpi::Comm& comm = atlas::mpi::comm(); | ||
std::size_t mpi_rank = comm.rank(); | ||
const std::size_t no_mpi_ranks = comm.size(); |
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.
Cosmetic change: please use mpi_size as variable name.
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.
... done
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.
Thanks @mo-lormi all good now, ready to merge.
Thanks ... |
Description
This PR is intended to upgrade the procedure for the halo exchange for the function space PointCloud, in particular to:
Acceptance Criteria (Definition of Done)
All the tests pass.