11 typedef LatticeFermion
T;
12 typedef multi1d<LatticeColorMatrix>
Q;
13 typedef multi1d<LatticeColorMatrix>
P;
16 int main(
int argc,
char *argv[])
22 const int foo[]={4, 4, 4, 4};
23 multi1d<int> nrow(
Nd);
25 Layout::setLattSize(nrow);
30 multi1d<LatticeColorMatrix>
u(
Nd);
31 XMLReader gauge_file_xml, gauge_xml;
41 params.clovCoeffR = Real(1.92);
42 params.clovCoeffT = Real(0.57);
51 LatticeFermion src, dest1, dest2;
57 unsigned long iters=1;
60 QDPIO::cout <<
"Calibrating QDPCloverTerm" << std::endl;
66 for(
unsigned long i=0;
i < iters;
i++) {
70 time=swatch.getTimeInSeconds();
71 QDPInternal::globalSum(time);
72 time /= (double)Layout::numNodes();
73 QDPIO::cout <<
"." << std::flush;
75 while(time < (
double)n_sec );
78 QDPIO::cout << std::endl;
81 QDPIO::cout <<
"Timing with " << iters <<
" iterations" << std::endl;
85 for(
unsigned long i=0;
i < iters;
i++) {
89 time=swatch.getTimeInSeconds();
90 QDPInternal::globalSum(time);
91 time /= (double)Layout::numNodes();
94 QDPIO::cout <<
"Layout volume=" << Layout::vol() << std::endl;
95 QDPIO::cout <<
"FLOPS=" << qdp_clov.
nFlops() << std::endl;
96 QDPIO::cout <<
"iters=" << iters <<std::endl;
97 QDPIO::cout <<
"time=" << time << std::endl;
98 double flops=(double)qdp_clov.
nFlops();
99 flops *= (double)(Layout::sitesOnNode())/(
double)2;
100 flops *= (double)(iters);
102 fc.addFlops((
unsigned long long)floor(flops));
103 fc.report(
"QDPCloverTerm", time);
111 QDPIO::cout <<
"Calibrating CloverTerm" << std::endl;
117 for(
unsigned long i=0;
i < iters;
i++) {
121 time=swatch.getTimeInSeconds();
122 QDPInternal::globalSum(time);
123 time /= (double)Layout::numNodes();
124 QDPIO::cout <<
"." << std::flush;
126 while(time < (
double)n_sec );
129 QDPIO::cout << std::endl;
132 QDPIO::cout <<
"Timing with " << iters <<
" iterations" << std::endl;
136 for(
unsigned long i=0;
i < iters;
i++) {
140 time=swatch.getTimeInSeconds();
141 QDPInternal::globalSum(time);
142 time /= (double)Layout::numNodes();
145 QDPIO::cout <<
"Layout volume=" << Layout::vol() << std::endl;
146 QDPIO::cout <<
"FLOPS=" << qdp_clov.
nFlops() << std::endl;
147 QDPIO::cout <<
"iters=" << iters <<std::endl;
148 QDPIO::cout <<
"time=" << time << std::endl;
149 double flops=(double)qdp_clov.
nFlops();
150 flops *= (double)(Layout::sitesOnNode())/(
double)2;
151 flops *= (double)(iters);
153 fc.addFlops((
unsigned long long)floor(flops));
154 fc.report(
"CloverTerm", time);
165 QDPIO::cout <<
"Calibrating Possibly optimized EOPREC Clov Op" << std::endl;
171 for(
int i=0;
i < iters;
i++) {
173 D(dest1, src,
MINUS);
176 time=swatch.getTimeInSeconds();
177 QDPInternal::globalSum(time);
178 time /= (double)Layout::numNodes();
179 QDPIO::cout <<
"." << std::flush;
181 while(time < (
double)n_sec );
182 QDPIO::cout << std::endl;
185 QDPIO::cout <<
"Timing with " << iters <<
" iterations" << std::endl;
189 for(
int i=0;
i < iters;
i++) {
191 D(dest1, src,
MINUS);
194 time=swatch.getTimeInSeconds();
195 QDPInternal::globalSum(time);
196 time /= (double)Layout::numNodes();
200 unsigned long long flops = (
unsigned long long)2;
201 flops *= (
unsigned long long)iters;
202 flops *= (
unsigned long long)D.
nFlops();
205 fc.report(
"EOPrecCloverOp", time);
Primary include file for CHROMA in application codes.
unsigned long nFlops() const
Return flops performed by the operator()
Even-odd preconditioned Clover-Dirac operator.
unsigned long nFlops() const
Return flops performed by the operator()
void create(Handle< FermState< T, P, Q > > fs, const CloverFermActParams ¶m_)
Creation routine.
Class for counted reference semantics.
Periodic version of FermState.
void create(Handle< FermState< T, multi1d< U >, multi1d< U > > > fs, const CloverFermActParams ¶m_)
Creation routine.
void apply(T &chi, const T &psi, enum PlusMinus isign, int cb) const
void unitarityCheck(const multi1d< LatticeColorMatrixF3 > &u)
Check the unitarity of color matrix in SU(N)
void gaugeStartup(XMLReader &gauge_file_xml, XMLReader &gauge_xml, multi1d< LatticeColorMatrix > &u, Cfg_t &cfg)
Initialize the gauge fields.
Asqtad Staggered-Dirac operator.
static multi1d< LatticeColorMatrix > u
LinOpSysSolverMGProtoClover::Q Q
LinOpSysSolverMGProtoClover::T T
void initialize(int *argc, char ***argv)
Chroma initialisation routine.
void finalize(void)
Chroma finalization routine.
Gauge configuration structure.
Params for clover ferm acts.
int main(int argc, char *argv[])
multi1d< LatticeColorMatrix > P