Skip to content

Commit fe6860b

Browse files
committed
Update with LIME library guard
1 parent d6406b1 commit fe6860b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/Test_compressed_lanczos_hot_start.cc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ class LocalCoherenceLanczosScidac : public LocalCoherenceLanczos<Fobj,CComplex,n
5656

5757
void checkpointFine(std::string evecs_file,std::string evals_file)
5858
{
59+
#ifdef HAVE_LIME
5960
assert(this->subspace.size()==nbasis);
6061
emptyUserRecord record;
6162
Grid::QCD::ScidacWriter WR(this->_FineGrid->IsBoss());
@@ -67,10 +68,14 @@ class LocalCoherenceLanczosScidac : public LocalCoherenceLanczos<Fobj,CComplex,n
6768

6869
XmlWriter WRx(evals_file);
6970
write(WRx,"evals",this->evals_fine);
71+
#else
72+
assert(0);
73+
#endif
7074
}
7175

7276
void checkpointFineRestore(std::string evecs_file,std::string evals_file)
7377
{
78+
#ifdef HAVE_LIME
7479
this->evals_fine.resize(nbasis);
7580
this->subspace.resize(nbasis,this->_FineGrid);
7681

@@ -90,10 +95,14 @@ class LocalCoherenceLanczosScidac : public LocalCoherenceLanczos<Fobj,CComplex,n
9095

9196
}
9297
RD.close();
98+
#else
99+
assert(0);
100+
#endif
93101
}
94102

95103
void checkpointCoarse(std::string evecs_file,std::string evals_file)
96104
{
105+
#ifdef HAVE_LIME
97106
int n = this->evec_coarse.size();
98107
emptyUserRecord record;
99108
Grid::QCD::ScidacWriter WR(this->_CoarseGrid->IsBoss());
@@ -105,10 +114,14 @@ class LocalCoherenceLanczosScidac : public LocalCoherenceLanczos<Fobj,CComplex,n
105114

106115
XmlWriter WRx(evals_file);
107116
write(WRx,"evals",this->evals_coarse);
117+
#else
118+
assert(0);
119+
#endif
108120
}
109121

110122
void checkpointCoarseRestore(std::string evecs_file,std::string evals_file,int nvec)
111123
{
124+
#ifdef HAVE_LIME
112125
std::cout << "resizing coarse vecs to " << nvec<< std::endl;
113126
this->evals_coarse.resize(nvec);
114127
this->evec_coarse.resize(nvec,this->_CoarseGrid);
@@ -125,6 +138,9 @@ class LocalCoherenceLanczosScidac : public LocalCoherenceLanczos<Fobj,CComplex,n
125138
RD.readScidacFieldRecord(this->evec_coarse[k],record);
126139
}
127140
RD.close();
141+
#else
142+
assert(0);
143+
#endif
128144
}
129145
};
130146

0 commit comments

Comments
 (0)