-
Notifications
You must be signed in to change notification settings - Fork 11
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
bug fix: ensure that all processes have the same npert and pert_select #642
Conversation
This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Please add one so that the PR can be merged. |
Yes. The fix works in my tests. |
This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Please add one so that the PR can be merged. |
src/Components/GEOSldas_GridComp/GEOSlandpert_GridComp/LDAS_PertRoutines.F90
Outdated
Show resolved
Hide resolved
…M/GEOSldas into feature/wjiang/bcast_pert_select
This PR is being prevented from merging because you have not added one of our required labels: 0 diff, 0 diff trivial, Non 0-diff, 0 diff structural, 0-diff trivial, Not 0-diff, 0-diff, automatic, 0-diff uncoupled. Please add one so that the PR can be merged. |
@gmao-rreichle , I have added the check. I think it should be ready |
Thanks, @weiyuan-jiang. When I edited the intro to the PR so we have some description of what's done here, I started wondering if we actually need to enforce pert_std>0 for all grid cells that contain land tiles. Specifically, I now think that the MPI_AllReduce --> MPI_MAX operation may be just fine in dealing with a processor having exact zeros for pert_std in its subdomain when others have non-zero pert_std values. |
Yes, That makes sense to me. I can roll back the commit. |
All our tests passed. |
This PR fixes a bug in perturbation simulations that occurred when the root processor was not assigned any tiles in the domain decomposition, which can happen for very small domains (even when the number of tiles exceeds the number of processors). When root did not have tiles, its local
fft_npert=0
was imposed on all processors, and consequently no perturbations were applied at all.The bug consists of an
MPI_AllReduce
-->MPI_MAX
of thepert_select
vector.With the bug fix, there is no need to have pert_std values > 0 for grid cells that contain land tiles. That is, regions with pert_std=0 should be fine.
Original comment:
@gmao-qliu Could you try this branch and see if this branch fixes your issue ? I will add some more checks on heterogenous std_dev and make sure it is greater than 0 on land.