Skip to content
Snippets Groups Projects
Commit 97d7c422 authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Further fix

After d669afb2 there was still
a fix in EffectiveEnergyDrift.cpp when a domain had zero atoms.

This could affect real calculations, so I think this fix should be
backported to v2.3

Fixes #246
parent d669afb2
No related branches found
No related tags found
No related merge requests found
......@@ -258,8 +258,8 @@ void EffectiveEnergyDrift::update() {
}
//share stored data
plumed.comm.Allgatherv(&indexS[0], pNLocalAtoms, &indexR[0], &indexCnt[0], &indexDsp[0]);
plumed.comm.Allgatherv(&dataS[0], pNLocalAtoms*6, &dataR[0], &dataCnt[0], &dataDsp[0]);
plumed.comm.Allgatherv((!indexS.empty()?&indexS[0]:NULL), pNLocalAtoms, &indexR[0], &indexCnt[0], &indexDsp[0]);
plumed.comm.Allgatherv((!dataS.empty()?&dataS[0]:NULL), pNLocalAtoms*6, &dataR[0], &dataCnt[0], &dataDsp[0]);
//resize vectors to store the proper amount of data
pGatindex.resize(nLocalAtoms);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment