28 namespace MdagMSysSolverQUDACloverEnv
45 Handle<
FermState< LatticeFermion, multi1d<LatticeColorMatrix>, multi1d<LatticeColorMatrix> > >
state,
76 #ifdef BUILD_QUDA_DEVIFACE_SPINOR
77 std::vector<QDPCache::ArgKey> ids;
82 #ifndef BUILD_QUDA_DEVIFACE_SPINOR
83 spinorIn =(
void *)&(chi_s.elem(rb[1].start()).elem(0).elem(0).real());
86 ids.push_back(chi_s.getId());
89 #ifndef BUILD_QUDA_DEVIFACE_SPINOR
90 spinorOut =(
void *)&(psi_s.elem(rb[1].start()).elem(0).elem(0).real());
92 ids.push_back(psi_s.getId());
93 auto dev_ptr = GetMemoryPtr(ids);
94 spinorIn = dev_ptr[0];
95 spinorOut = dev_ptr[1];
103 invertQuda(spinorOut, spinorIn, (QudaInvertParam*)&quda_inv_param);
108 QDPIO::cout <<
"QUDA_"<<solver_string<<
"_CLOVER_SOLVER: time="<< quda_inv_param.secs <<
" s" ;
109 QDPIO::cout <<
"\tPerformance="<< quda_inv_param.gflops/quda_inv_param.secs<<
" GFLOPS" ;
110 QDPIO::cout <<
"\tTotal Time (incl. load gauge)=" << swatch1.getTimeInSeconds() <<
" s"<<std::endl;
112 ret.
n_count =quda_inv_param.iter;
125 void* spinorIn =(
void *)&(mod_chi.elem(rb[1].start()).elem(0).elem(0).real());
126 void* spinorOut =(
void *)&(psi_s.elem(rb[0].start()).elem(0).elem(0).real());
131 quda_inv_param.dslash_type = QUDA_CLOVER_WILSON_DSLASH;
132 dslashQuda(spinorOut, spinorIn, &quda_inv_param, 0, 0);
138 const AnisoParam_t& aniso = invParam.CloverParams.anisoParam;
145 qdp_dslash.apply(
tmp, mod_chi,
PLUS, 0);
152 QDPIO::cout <<
"CB=0" << std::endl;
153 QDPIO::cout <<
"Dslash Test: || r || = " << sqrt(norm2(
r,rb[0])) << std::endl;
156 QDPIO::cout <<
"CB=1: Should be zero" << std::endl;
157 QDPIO::cout <<
"Dslash Test: || r || = " << sqrt(norm2(
r,rb[1])) << std::endl;
160 const int* tab = rb[0].siteTable().slice();
161 for(
int i=0;
i < rb[0].numSiteTable();
i++) {
163 bool printSite=
false;
165 for(
int spin=0; spin < 4; spin++) {
166 for(
int col=0; col < 3; col++) {
167 if( (fabs(
r.elem(
j).elem(spin).elem(col).real()) > 1.0e-5 )
168 || (fabs(
r.elem(
j).elem(spin).elem(col).imag()) > 1.0e-5 )) {
175 for(
int spin=0; spin < 4; spin++) {
176 for(
int col=0; col < 3; col++) {
177 QDPIO::cout <<
"Site= " <<
j <<
" Spin= "<< spin <<
" Col= " << col <<
" spinor = ( "
178 << psi2.elem(
j).elem(spin).elem(col).real() <<
" , "
179 << psi2.elem(
j).elem(spin).elem(col).imag() <<
" )" << std::endl;
182 QDPIO::cout << std::endl;
Support class for fermion actions and linear operators.
Class for counted reference semantics.
Periodic version of FermState.
void apply(T &chi, const T &psi, enum PlusMinus isign, int cb) const
General Wilson-Dirac dslash.
Class for counted reference semantics.
Wilson Dslash linear operator.
static bool registered
Local registration flag.
const std::string name
Name to be used.
MdagMSystemSolver< LatticeFermion > * createFerm(XMLReader &xml_in, const std::string &path, Handle< FermState< LatticeFermion, multi1d< LatticeColorMatrix >, multi1d< LatticeColorMatrix > > > state, Handle< LinearOperator< LatticeFermion > > A)
bool registerAll()
Register all the factories.
Asqtad Staggered-Dirac operator.
LinOpSysSolverMGProtoClover::T T
const WilsonTypeFermAct< multi1d< LatticeFermion > > Handle< const ConnectState > state
multi1d< LatticeFermion > r(Ncb)
Periodic ferm state and a creator.
Parameters for anisotropy.
Holds return info from SystemSolver call.
Register MdagM system solvers.
Solve a MdagM*psi=chi linear system by BiCGStab.
Factory for producing system solvers for MdagM*psi = chi.