Repository navigation
Read the replica index on rank 0 in DIMER, grid output and OUTPUT_ANALYSIS_DATA_TO_COLVAR (#1443) - #1483
Merged
Conversation
multi_sim_comm is valid only on rank 0 of each replica. DIMER read it on every rank, so with more than one MPI rank per replica the other ranks took replica 0's DSIGMA, and the run aborted with "Mismatch between provided sigmas and number of replicas". The regtest runs 2 replicas with 2 ranks each under driver --debug-dd; its forces match the run with one rank per replica. See plumed#1443.
GridPrintingBase chose whether to write by reading multi_sim_comm, which is valid only on rank 0 of each replica. With more than one MPI rank per replica, the other ranks of every replica saw index 0, so with the default REPLICA=0 replica 1 also wrote its grid (histo.1). The regtest runs 2 replicas with 2 ranks each under driver --debug-dd and checks both the grids and the list of files written. See plumed#1443.
…broadcast it OutputColvarFile chose whether to write by reading multi_sim_comm, which is valid only on rank 0 of each replica. With more than one MPI rank per replica, the other ranks of every replica saw index 0, so with the default REPLICA=0 replica 1 also wrote its data (frames.1). The regtest runs 2 replicas with 2 ranks each under driver --debug-dd and checks both the data and the list of files written. See plumed#1443.
5 tasks done
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The
v2.9part of #1443.multi_sim_commis valid only on rank 0 of each replica, but three actions read it on every rank. With more than one MPI rank per replica (domain decomposition) they get the wrong replica index on the other ranks:DIMERDUMPGRID,DUMPCUBE,GRID_TO_XYZ(GridPrintingBase)REPLICA=0(histo.1)OUTPUT_ANALYSIS_DATA_TO_COLVARREPLICA=0(frames.1)The plan on #1443 was to guard such actions with an explicit error. Reading the index on rank 0 and broadcasting it over
commis the same few lines and makes them work instead, so this fixes them. One commit per action.I checked every other use of
multi_sim_commonv2.9: they either use the same rank-0 pattern already or run inside rank-0 blocks.LOGMFDis tracked separately in #1480. Onmasterthese actions use the helpers from #1481 (DIMER) or no longer exist (the other two).Target release
I would like my code to appear in release v2.9
Type of contribution
Copyright
Tests
Three new regtests, each with 2 replicas × 2 MPI ranks under
driver --debug-dd yes:basic/rt-dimer-multi-dd(same as onmaster): forces match the 1-rank-per-replica run exactly. Without the fix it aborts.basic/rt-dumpgrid-multi-ddandbasic/rt-output-colvar-multi-dd: output matches the 1-rank-per-replica run, and the list of files written is checked. Without the fix an extra.1file appears and the test fails.Locally the full suite gives 614 performed and 2 errors, both Fortran tests that are unrelated to this change:
rt-make-fortran(my gfortran rejects the argument type mismatches in the legacy interface) andrt-make-fortran08(as onmaster).