-
Notifications
You must be signed in to change notification settings - Fork 43
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
Global interpolation matrix --> MPI-distributed interpolation matrices #258
base: develop
Are you sure you want to change the base?
Conversation
sbrdar
commented
Feb 13, 2025
- add method 'distribute_global_matrix (src_fs, tgt_fs, global_matrix, mpi_root)' to return local interpolation matrices
- make sure that interpolation method in Atlas which take cache matrix as an argument actually use that cache
- extend test_interpolation_global_matrix to: 1) create a global matrix from a parallel interpolator (was there before); 2) distribute the global matrix to task-local matrices (new); 3) compare the remapped field gathered in a global field on the single task with the global-matrix remapped global field.
- extend sandbox/atlas-global-matrix to be able to read from the disc and distribute matrix to the parallel interpolator
…o parallel Interpolation
…dle with creation of FunctionSpace from the conservative-spherical-polygon interpolator (not done)
…re that the interpolation setup from cache does use that cache (with Willem D.)
…sts for interpolations which do not accept a cached matrix
… the global matrix from the disc
…nd ./bin/atlas-global-matrix --read
1b786cd
to
efc5b6c
Compare
Thanks @sbrdar , I have rebased this on latest develop, which now contains a much tougher ci that no longer permits warnings. Please fix the warnings before I review. |
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.
Very nice work!
I have a few suggestions, see below.
src/atlas/interpolation/method/cubedsphere/CubedSphereBilinear.h
Outdated
Show resolved
Hide resolved
setMatrix(cache); | ||
source_ = source; | ||
target_ = target; | ||
buildPointSearchTree(source); |
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.
Building the PointSearchTree should not be needed when the cache contains a matrix.
On the other hand when there's no matrix in the cache this sets up nothing. That needs fixing.
if(interpolation::MatrixCache(cache)) { ... }
else {
THIS SITUATION
}
do_setup(source, target); | ||
return; | ||
} | ||
ATLAS_NOTIMPLEMENTED; |
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 needs also the handling of the "matrix_free" configuration option, meaning that when "matrix_free" is chosen we also need to ignore the matrix.
This if
is not needed, and you can just call do_setup(source, target)
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! Now, if the method is not matrix free and there is a cache matrix, we initialise from the cache. In all other cases do_setup(source, target)
ATLAS_ASSERT(matrix().cols() == source.size()); | ||
return; | ||
} | ||
if (functionspace::NodeColumns(source) && functionspace::PointCloud(target)) { |
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 if
is not needed, and you can just call do_setup(source, target)
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! Done.