mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-13 20:57:06 +01:00
Merge branch 'develop' into feature/distil
* develop: Hadron WeakEye and A2ALoop bug fixes, and WWVVContraction bug fix DiskVector: fix of memory bug triggering segfault when the cache is accessed following a certain pattern MFermion::GaugeProp fix for 4d fields
This commit is contained in:
@ -395,12 +395,26 @@ void DiskVectorBase<T>::cacheInsert(const unsigned int i, const T &obj) const
|
||||
auto &freeInd = *freePtr_;
|
||||
auto &loads = *loadsPtr_;
|
||||
|
||||
evict();
|
||||
index[i] = freeInd.top();
|
||||
freeInd.pop();
|
||||
cache[index.at(i)] = obj;
|
||||
loads.push_back(i);
|
||||
modified[index.at(i)] = false;
|
||||
// cache miss, evict and store
|
||||
if (index.find(i) == index.end())
|
||||
{
|
||||
evict();
|
||||
index[i] = freeInd.top();
|
||||
freeInd.pop();
|
||||
cache[index.at(i)] = obj;
|
||||
loads.push_back(i);
|
||||
modified[index.at(i)] = false;
|
||||
}
|
||||
// cache hit, modify current value
|
||||
else
|
||||
{
|
||||
auto pos = std::find(loads.begin(), loads.end(), i);
|
||||
|
||||
cache[index.at(i)] = obj;
|
||||
modified[index.at(i)] = true;
|
||||
loads.erase(pos);
|
||||
loads.push_back(i);
|
||||
}
|
||||
|
||||
#ifdef DV_DEBUG
|
||||
std::string msg;
|
||||
|
@ -89,7 +89,7 @@ std::vector<std::string> TA2ALoop<FImpl>::getInput(void)
|
||||
template <typename FImpl>
|
||||
std::vector<std::string> TA2ALoop<FImpl>::getOutput(void)
|
||||
{
|
||||
std::vector<std::string> out = {};
|
||||
std::vector<std::string> out = {getName()};
|
||||
|
||||
return out;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ BEGIN_HADRONS_NAMESPACE
|
||||
* |
|
||||
* one trace | two traces
|
||||
*
|
||||
* one trace : tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut)
|
||||
* one trace : tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G*loop*G)
|
||||
* two traces: tr(qbr*gOut*qs*adj(gIn)*g5*adj(qbl)*g5*G)*tr(loop*G)
|
||||
*
|
||||
*/
|
||||
@ -118,7 +118,7 @@ template <typename FImpl>
|
||||
std::vector<std::string> TWeakEye3pt<FImpl>::getInput(void)
|
||||
{
|
||||
std::vector<std::string> in = {par().qBarLeft, par().qBarRight,
|
||||
par().qSpectator};
|
||||
par().qSpectator, par().loop};
|
||||
|
||||
return in;
|
||||
}
|
||||
@ -170,7 +170,7 @@ void TWeakEye3pt<FImpl>::execute(void)
|
||||
|
||||
r.info.op = G.g;
|
||||
// one trace
|
||||
corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G*loop*G*qbr*gOut);
|
||||
corr = trace(qbr*gOut*qst*adj(gIn)*g5*adj(qbl)*g5*G*loop*G);
|
||||
sliceSum(corr, buf, Tp);
|
||||
r.corr.clear();
|
||||
for (unsigned int t = 0; t < buf.size(); ++t)
|
||||
|
@ -111,13 +111,18 @@ void TGaugeProp<FImpl>::setup(void)
|
||||
{
|
||||
Ls_ = env().getObjectLs(par().solver);
|
||||
envCreateLat(PropagatorField, getName());
|
||||
envTmpLat(FermionField, "source", Ls_);
|
||||
envTmpLat(FermionField, "sol", Ls_);
|
||||
envTmpLat(FermionField, "tmp");
|
||||
if (Ls_ > 1)
|
||||
{
|
||||
envTmpLat(FermionField, "source", Ls_);
|
||||
envTmpLat(FermionField, "sol", Ls_);
|
||||
envCreateLat(PropagatorField, getName() + "_5d", Ls_);
|
||||
}
|
||||
else
|
||||
{
|
||||
envTmpLat(FermionField, "source");
|
||||
envTmpLat(FermionField, "sol");
|
||||
}
|
||||
}
|
||||
|
||||
// execution ///////////////////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user