-
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
Merged
wdeconinck
merged 16 commits into
ecmwf:develop
from
JCSDA-internal:feature/pointcloud_mpi_01
May 4, 2023
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
bfca20d
updated lon/lat layout
mo-lormi b770638
added new method to carry out the setup for the halo exchange
mo-lormi c61f411
implemented new procedure to evaluate the fields 'partition' and 'rem…
mo-lormi 6f56dcc
added test associated with the halo exchange
mo-lormi 8e62758
update 28.03.23-01
mo-lormi 4427c64
added new method
mo-lormi 91ab4ca
updated battery of tests; added new test;
mo-lormi 2cf7e20
updated build procedure
mo-lormi 8a52e31
update 30.03.23-01
mo-lormi 98ca50a
removed redundant code
mo-lormi 078f073
improved procedure to identify the locations
mo-lormi da4e42b
updated licence
mo-lormi 13a3227
update 21.04.23-01
mo-lormi 962ce01
updated licence
mo-lormi 515d528
update 03.05.23-01
mo-lormi 8920324
update 03.05.23-02
mo-lormi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
/* | ||
* (C) Copyright 2013 ECMWF. | ||
* (C) Copyright 2013 ECMWF | ||
* (C) Crown Copyright 2023 Met Office | ||
* | ||
* 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. | ||
|
@@ -8,6 +9,7 @@ | |
* nor does it submit to any jurisdiction. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. ... done |
||
*/ | ||
|
||
|
||
#pragma once | ||
|
||
#include <memory> | ||
|
@@ -43,9 +45,7 @@ class PointCloud : public functionspace::FunctionSpaceImpl { | |
PointCloud(const std::vector<Point>&); | ||
PointCloud(const Field& lonlat); | ||
PointCloud(const Field& lonlat, const Field& ghost); | ||
|
||
PointCloud(const FieldSet&); // assuming lonlat ghost ridx and partition present. | ||
|
||
PointCloud(const FieldSet&); // assuming lonlat ghost ridx and partition present | ||
PointCloud(const Grid&); | ||
~PointCloud() override {} | ||
std::string type() const override { return "PointCloud"; } | ||
|
@@ -55,6 +55,7 @@ class PointCloud : public functionspace::FunctionSpaceImpl { | |
Field lonlat() const override { return lonlat_; } | ||
const Field& vertical() const { return vertical_; } | ||
Field ghost() const override; | ||
Field remote_index() const override { return remote_index_; } | ||
virtual idx_t size() const override { return lonlat_.shape(0); } | ||
|
||
using FunctionSpaceImpl::createField; | ||
|
@@ -148,7 +149,6 @@ class PointCloud : public functionspace::FunctionSpaceImpl { | |
void set_field_metadata(const eckit::Configuration& config, Field& field) const; | ||
|
||
|
||
|
||
private: | ||
Field lonlat_; | ||
Field vertical_; | ||
|
@@ -157,6 +157,9 @@ class PointCloud : public functionspace::FunctionSpaceImpl { | |
Field partition_; | ||
std::unique_ptr<parallel::HaloExchange> halo_exchange_; | ||
idx_t levels_{0}; | ||
|
||
void setupHaloExchange(); | ||
|
||
}; | ||
|
||
//------------------------------------------------------------------------------------------------------ | ||
|
@@ -169,11 +172,12 @@ class PointCloud : public FunctionSpace { | |
public: | ||
PointCloud(const FunctionSpace&); | ||
PointCloud(const Field& points); | ||
PointCloud(const Field&, const Field&); | ||
PointCloud(const FieldSet& flds); | ||
PointCloud(const std::vector<PointXY>&); | ||
PointCloud(const std::vector<PointXYZ>&); | ||
PointCloud(const std::initializer_list<std::initializer_list<double>>&); | ||
PointCloud(const Grid& grid); | ||
PointCloud(const Grid&); | ||
|
||
operator bool() const { return valid(); } | ||
bool valid() const { return functionspace_; } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.