CHROMA
syssolver_mdagm_clover_qphix_iter_refine_w.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /*! \file
3  * \brief Solve a M*psi=chi linear system by BiCGStab
4  */
5 
6 #ifndef __syssolver_mdagm_clover_qphix_iter_refine_h__
7 #define __syssolver_mdagm_clover_qphix_iter_refine_h__
8 
9 #include "chroma_config.h"
10 
11 #ifdef BUILD_QPHIX
12 #include "handle.h"
13 #include "state.h"
14 #include "syssolver.h"
15 #include "linearop.h"
16 #include "lmdagm.h"
24 #include "io/aniso_io.h"
25 #include <string>
26 #include "util/gauge/reunit.h"
27 #include "io/aniso_io.h"
28 
29 // Header files from the dslash package
30 #include "qphix/geometry.h"
31 #include "qphix/qdp_packer.h"
32 #include "qphix/clover.h"
33 #include "qphix/invbicgstab.h"
34 #include "qphix/inv_richardson_multiprec.h"
35 
37 #include "qphix_singleton.h"
38 
39 using namespace QDP;
40 
41 namespace Chroma
42 {
43 
44  //! Richardson system solver namespace
45  namespace MdagMSysSolverQPhiXCloverIterRefineEnv
46  {
47  //! Register the syssolver
48  bool registerAll();
49  }
50 
51 
52 
53  //! Solve a Clover Fermion System using the QPhiX inverter
54  /*! \ingroup invert
55  *** WARNING THIS SOLVER WORKS FOR Clover FERMIONS ONLY ***
56  */
57  using namespace QPhiXVecTraits;
58 
59  template<typename T, typename U>
60  class MdagMSysSolverQPhiXCloverIterRefine : public MdagMSystemSolver<T>
61  {
62  public:
63  using Q = multi1d<U>;
64  using REALT = typename WordType<T>::Type_t;
65 
66  using InnerReal = CHROMA_QPHIX_INNER_TYPE;
67 
68  static const int OuterVec = MixedVecTraits<REALT,InnerReal>::Vec;
69  static const int OuterSoa = MixedVecTraits<REALT,InnerReal>::Soa;
70  static const int InnerVec = MixedVecTraits<REALT,InnerReal>::VecInner;
71  static const int InnerSoa = MixedVecTraits<REALT,InnerReal>::SoaInner;
72  static const bool comp12 = MixedVecTraits<REALT,InnerReal>::compress12;
73 
74  using OuterGeom = QPhiX::Geometry<REALT,OuterVec,OuterSoa,comp12>;
75  using InnerGeom = QPhiX::Geometry<InnerReal,InnerVec,InnerSoa,comp12>;
76 
77  using QPhiX_Spinor = typename OuterGeom::FourSpinorBlock;
78  using QPhiX_Gauge = typename OuterGeom::SU3MatrixBlock;
79  using QPhiX_Clover = typename OuterGeom::CloverBlock;
80 
81  using QPhiX_InnerSpinor = typename InnerGeom::FourSpinorBlock;
82  using QPhiX_InnerGauge = typename InnerGeom::SU3MatrixBlock;
83  using QPhiX_InnerClover = typename InnerGeom::CloverBlock;
84 
85 
86  //! Constructor
87  /*!
88  * \param M_ Linear operator ( Read )
89  * \param invParam inverter parameters ( Read )
90  */
91  MdagMSysSolverQPhiXCloverIterRefine(Handle< LinearOperator<T> > A_,
92  Handle< FermState<T,Q,Q> > state_,
93  const SysSolverQPhiXCloverParams& invParam_) :
94  A(A_), invParam(invParam_), clov(new CloverTermT<T, U>()), invclov(new CloverTermT<T, U>())
95  {
96 
97 
98  QDPIO::cout << "MdagMSysSolverQPhiXCloverIterRefine:" << std::endl;
99 
100  if ( toBool( invParam.Delta < 0 ) ) {
101  QDPIO::cout << "Error: Delta parameter for solve should be set" << std::endl;
102  QDP_abort(1);
103  }
104 
105  QDPIO::cout << "AntiPeriodicT is: " << invParam.AntiPeriodicT << std::endl;
106 
107 
108  QDPIO::cout << "Veclen is " << OuterVec << std::endl;
109  QDPIO::cout << "Soalen is " << OuterSoa << std::endl;
110  QDPIO::cout << "Inner Veclen is " << InnerVec << std::endl;
111  QDPIO::cout << "Inner Soalen is " << InnerSoa << std::endl;
112 
113  if ( OuterSoa > OuterVec ) {
114  QDPIO::cerr << "PROBLEM: Soalen > Veclen. Please set soalen appropriately (<=VECLEN) at compile time" << std::endl;
115  QDP_abort(1);
116  }
117 
118  if ( InnerSoa > InnerVec ) {
119  QDPIO::cerr << "PROBLEM: Inner Soalen > Inner Veclen. Please set soalen appropriately at compile time" << std::endl;
120  QDP_abort(1);
121  }
122 
123  Q u(Nd);
124  for(int mu=0; mu < Nd; mu++) {
125  u[mu] = state_->getLinks()[mu];
126  }
127 
128  // Set up aniso coefficients
129  multi1d<Real> aniso_coeffs(Nd);
130  for(int mu=0; mu < Nd; mu++) aniso_coeffs[mu] = Real(1);
131 
132  bool anisotropy = invParam.CloverParams.anisoParam.anisoP;
133  if( anisotropy ) {
134  aniso_coeffs = makeFermCoeffs( invParam.CloverParams.anisoParam );
135  }
136 
137  double t_boundary=(double)(1);
138  // NB: In this case, the state will have boundaries applied.
139  // So we only need to apply our own boundaries if Compression is enabled
140  //
141  if (invParam.AntiPeriodicT) {
142  t_boundary=(double)(-1);
143  // Flip off the boundaries -- Dslash expects them off..
144  u[3] *= where(Layout::latticeCoordinate(3) == (Layout::lattSize()[3]-1),
145  Real(t_boundary), Real(1));
146  }
147 
148  cbsize_in_blocks = rb[0].numSiteTable()/OuterSoa;
149 
150  const QPhiX::QPhiXCLIArgs& QPhiXParams = TheQPhiXParams::Instance();
151 #ifdef QDP_IS_QDPJIT
152  int pad_xy = 0;
153  int pad_xyz = 0;
154 #else
155  int pad_xy = QPhiXParams.getPxy();
156  int pad_xyz = QPhiXParams.getPxyz();
157 #endif
158  n_blas_simt = QPhiXParams.getSy()*QPhiXParams.getSz();
159 
160  // Grab a dslash from which we will get geometry.
161  geom_outer = new OuterGeom( Layout::subgridLattSize().slice(),
162  QPhiXParams.getBy(),
163  QPhiXParams.getBz(),
164  QPhiXParams.getNCores(),
165  QPhiXParams.getSy(),
166  QPhiXParams.getSz(),
167  pad_xy,
168  pad_xyz,
169  QPhiXParams.getMinCt());
170 
171 
172  geom_inner = new InnerGeom( Layout::subgridLattSize().slice(),
173  QPhiXParams.getBy(),
174  QPhiXParams.getBz(),
175  QPhiXParams.getNCores(),
176  QPhiXParams.getSy(),
177  QPhiXParams.getSz(),
178  pad_xy,
179  pad_xyz,
180  QPhiXParams.getMinCt());
181 
182 
183 #ifndef QDP_IS_QDPJIT
184  psi_qphix=(QPhiX_Spinor *)geom_outer->allocCBFourSpinor();
185  chi_qphix=(QPhiX_Spinor *)geom_outer->allocCBFourSpinor();
186  tmp_qphix=(QPhiX_Spinor *)geom_outer->allocCBFourSpinor();
187 #else
188  psi_qphix=nullptr;
189  chi_qphix=nullptr;
190  tmp_qphix=nullptr;
191 
192 #endif
193 
194  // Pack the gauge field
195  QDPIO::cout << "Packing gauge field..." ;
196  // Alloc outer gauge field
197  QPhiX_Gauge* packed_gauge_cb0=(QPhiX_Gauge *)geom_outer->allocCBGauge();
198  QPhiX_Gauge* packed_gauge_cb1=(QPhiX_Gauge *)geom_outer->allocCBGauge();
199 
200  // Alloc inner gauge field
201  QPhiX_InnerGauge* packed_gauge_cb0_inner=(QPhiX_InnerGauge *)geom_inner->allocCBGauge();
202  QPhiX_InnerGauge* packed_gauge_cb1_inner=(QPhiX_InnerGauge *)geom_inner->allocCBGauge();
203 
204  // Pack outer gauge field
205  QPhiX::qdp_pack_gauge<>(u, packed_gauge_cb0,packed_gauge_cb1, *geom_outer);
206  u_packed[0] = packed_gauge_cb0;
207  u_packed[1] = packed_gauge_cb1;
208 
209  // Pack inner gauge field
210  QPhiX::qdp_pack_gauge<>(u, packed_gauge_cb0_inner,packed_gauge_cb1_inner, *geom_inner);
211  u_packed_i[0] = packed_gauge_cb0_inner;
212  u_packed_i[1] = packed_gauge_cb1_inner;
213 
214 
215  QDPIO::cout << "Creating Clover Term" << std::endl;
216  CloverTerm clov_qdp;
217  clov->create(state_, invParam.CloverParams);
218  QDPIO::cout << "Inverting Clover Term" << std::endl;
219  invclov->create(state_, invParam.CloverParams, (*clov));
220  for(int cb=0; cb < 2; cb++) {
221  invclov->choles(cb);
222  }
223  QDPIO::cout << "Done" << std::endl;
224  // Create buffer for outer clover
225  QPhiX_Clover* A_cb0=(QPhiX_Clover *)geom_outer->allocCBClov();
226  QPhiX_Clover* A_cb1=(QPhiX_Clover *)geom_outer->allocCBClov();
227  clov_packed[0] = A_cb0;
228  clov_packed[1] = A_cb1;
229 
230  QPhiX_Clover* A_inv_cb0=(QPhiX_Clover *)geom_outer->allocCBClov();
231  QPhiX_Clover* A_inv_cb1=(QPhiX_Clover *)geom_outer->allocCBClov();
232  invclov_packed[0] = A_inv_cb0;
233  invclov_packed[1] = A_inv_cb1;
234 
235  // Create buffer for inner clover
236  QPhiX_InnerClover* A_cb0_inner=(QPhiX_InnerClover *)geom_inner->allocCBClov();
237  QPhiX_InnerClover* A_cb1_inner=(QPhiX_InnerClover *)geom_inner->allocCBClov();
238  clov_packed_i[0] = A_cb0_inner;
239  clov_packed_i[1] = A_cb1_inner;
240 
241  QPhiX_InnerClover* A_inv_cb0_inner=(QPhiX_InnerClover *)geom_inner->allocCBClov();
242  QPhiX_InnerClover* A_inv_cb1_inner=(QPhiX_InnerClover *)geom_inner->allocCBClov();
243  invclov_packed_i[0] = A_inv_cb0_inner;
244  invclov_packed_i[1] = A_inv_cb1_inner;
245 
246  // Do the actual packing
247  QDPIO::cout << "Packing Clover term..." << std::endl;
248 
249  // Pack outer clover inverse
250  for(int cb=0; cb < 2; cb++) {
251  QPhiX::qdp_pack_clover<>((*invclov), invclov_packed[cb], *geom_outer, cb);
252  }
253 
254  // Pack outer clover
255  for(int cb=0; cb < 2; cb++) {
256  QPhiX::qdp_pack_clover<>((*clov), clov_packed[cb], *geom_outer, cb);
257  }
258 
259  // Pack inner clover inverse
260  for(int cb=0; cb < 2; cb++) {
261  QPhiX::qdp_pack_clover<>((*invclov), invclov_packed_i[cb], *geom_inner, cb);
262  }
263 
264  // Pack inner clover
265  for(int cb=0; cb < 2; cb++) {
266  QPhiX::qdp_pack_clover<>((*clov), clov_packed_i[cb], *geom_inner, cb);
267  }
268  QDPIO::cout << "Done" << std::endl;
269 
270 
271  M_outer=new QPhiX::EvenOddCloverOperator<REALT,OuterVec,OuterSoa,comp12>(u_packed,
272  clov_packed[1],
273  invclov_packed[0],
274  geom_outer,
275  t_boundary,
276  toDouble(aniso_coeffs[0]),
277  toDouble(aniso_coeffs[3]));
278 
279  M_inner=new QPhiX::EvenOddCloverOperator<InnerReal,InnerVec,InnerSoa,comp12>(u_packed_i,
280  clov_packed_i[1],
281  invclov_packed_i[0],
282  geom_inner,
283  t_boundary,
284  toDouble(aniso_coeffs[0]),
285  toDouble(aniso_coeffs[3]));
286 
287 
288  bicgstab_inner_solver = new QPhiX::InvBiCGStab<InnerReal, InnerVec,InnerSoa,comp12>((*M_inner), invParam.MaxIter);
289 
290  mixed_solver = new QPhiX::InvRichardsonMultiPrec<REALT,
291  OuterVec,OuterSoa,comp12,
292  InnerReal,InnerVec,InnerSoa,comp12>((*M_outer), (*bicgstab_inner_solver), toDouble(invParam.Delta), invParam.MaxIter);
293  }
294 
295 
296 
297  //! Destructor
298  ~MdagMSysSolverQPhiXCloverIterRefine()
299  {
300 
301  // Need to unalloc all the memory...
302  QDPIO::cout << "Destructing" << std::endl;
303 
304 #ifndef QDP_IS_QDPJIT
305  geom_outer->free(psi_qphix);
306  geom_outer->free(chi_qphix);
307  geom_outer->free(tmp_qphix);
308 #else
309  psi_qphix = nullptr;
310  chi_qphix = nullptr;
311  tmp_qphix = nullptr;
312 #endif
313  geom_outer->free(invclov_packed[0]);
314  geom_outer->free(invclov_packed[1]);
315  invclov_packed[0] = nullptr;
316  invclov_packed[1] = nullptr;
317 
318 
319  geom_outer->free(clov_packed[0]);
320  geom_outer->free(clov_packed[1]);
321  clov_packed[0] = nullptr;
322  clov_packed[1] = nullptr;
323 
324 
325  geom_outer->free(u_packed[0]);
326  geom_outer->free(u_packed[1]);
327  u_packed[0] = nullptr;
328  u_packed[1] = nullptr;
329 
330 
331  geom_inner->free(invclov_packed_i[0]);
332  geom_inner->free(invclov_packed_i[1]);
333  invclov_packed_i[0] = nullptr;
334  invclov_packed_i[1] = nullptr;
335 
336 
337  geom_inner->free(clov_packed_i[0]);
338  geom_inner->free(clov_packed_i[1]);
339  clov_packed_i[0] = nullptr;
340  clov_packed_i[1] = nullptr;
341 
342 
343  geom_inner->free(u_packed_i[0]);
344  geom_inner->free(u_packed_i[1]);
345  u_packed_i[0] = nullptr;
346  u_packed_i[1] = nullptr;
347 
348  delete geom_inner;
349  delete geom_outer;
350 
351 
352  }
353 
354  //! Return the subset on which the operator acts
355  const Subset& subset() const {return A->subset();}
356 
357 
358  SystemSolverResults_t operator()(T& psi, const T& chi) const
359  {
360  START_CODE();
361  SystemSolverResults_t res;
362  Null4DChronoPredictor not_predicting;
363  res=(*this)(psi,chi,not_predicting);
364  END_CODE();
365  return res;
366 
367  }
368  //! Solver the linear system
369  /*!
370  * \param psi solution ( Modify )
371  * \param chi source ( Read )
372  * \return syssolver results
373  */
374  SystemSolverResults_t operator()(T& psi, const T& chi, AbsChronologicalPredictor4D<T>& predictor) const
375  {
376  START_CODE();
377  StopWatch swatch;
378  swatch.reset(); swatch.start();
379  /* Factories here later? */
380  SystemSolverResults_t res;
381  Handle< LinearOperator<T> > MdagM( new MdagMLinOp<T>(A) );
382 
383  T Y;
384  Y[ A->subset() ] = psi; // Y is initial guess
385 
386  try {
387  // Try to cast the predictor to a two step predictor
388  AbsTwoStepChronologicalPredictor4D<T>& two_step_predictor =
389  dynamic_cast<AbsTwoStepChronologicalPredictor4D<T>& >(predictor);
390 
391 
392  // Predict Y and X separately
393  two_step_predictor.predictY(Y,*A,chi);
394  two_step_predictor.predictX(psi,*MdagM, chi);
395  }
396  catch( std::bad_cast) {
397 
398  // Not a 2 step predictor. Predict X
399  // Then MX = Y is a good guess.
400  predictor(psi,*MdagM, chi);
401  (*A)(Y,psi,PLUS);
402 
403  }
404 
405 
406 #ifndef QDP_IS_QDPJIT
407  QDPIO::cout << "Packing" << std::endl << std::flush ;
408  QPhiX::qdp_pack_cb_spinor<>(Y, tmp_qphix, *geom_outer,1); // Initial Guess for Y
409  QPhiX::qdp_pack_cb_spinor<>(psi, psi_qphix, *geom_outer,1); // Initial Guess for X
410  QPhiX::qdp_pack_cb_spinor<>(chi, chi_qphix, *geom_outer,1); // RHS
411 #else
412  tmp_qphix = (QPhiX_Spinor *)(Y.getFjit()) + cbsize_in_blocks;
413  psi_qphix = (QPhiX_Spinor *)(psi.getFjit()) + cbsize_in_blocks;
414  chi_qphix = (QPhiX_Spinor *)(chi.getFjit()) + cbsize_in_blocks;
415 #endif
416  QDPIO::cout << "Done" << std::endl << std::flush;
417  double rsd_final;
418  int num_cb_sites = Layout::vol()/2;
419 
420  unsigned long site_flops1=0;
421  unsigned long mv_apps1=0;
422  int n_count1=0;
423 
424  unsigned long site_flops2=0;
425  unsigned long mv_apps2=0;
426  int n_count2=0;
427 
428  QDPIO::cout << "Starting Y solve" << std::endl << std::flush ;
429  double start = omp_get_wtime();
430  (*mixed_solver)(tmp_qphix,chi_qphix, toDouble(invParam.RsdTarget), n_count1, rsd_final, site_flops1, mv_apps1, -1, invParam.VerboseP);
431  double end = omp_get_wtime();
432 
433 
434  unsigned long total_flops = (site_flops1 + (1320+504+1320+504+48)*mv_apps1)*num_cb_sites;
435  double gflops = (double)(total_flops)/(1.0e9);
436  double total_time = end - start;
437 
438  Double r_final = sqrt(toDouble(rsd_final));
439  QDPIO::cout << "QPHIX_CLOVER_ITER_REFINE_BICGSTAB_SOLVER: " << n_count1 << " iters, rsd_sq_final=" << rsd_final << " ||r||/||b|| (acc) = " << r_final <<std::endl;
440  QDPIO::cout << "QPHIX_CLOVER_ITER_REFINE_BICGSTAB_SOLVER: Solver Time="<< total_time <<" (sec) Performance=" << gflops / total_time << " GFLOPS" << std::endl;
441 
442  QDPIO::cout << "Starting X solve" << std::endl << std::flush ;
443  start = omp_get_wtime();
444  (*mixed_solver)(psi_qphix,tmp_qphix, toDouble(invParam.RsdTarget), n_count2, rsd_final, site_flops2, mv_apps2, +1, invParam.VerboseP);
445  end = omp_get_wtime();
446  total_flops = (site_flops2 + (1320+504+1320+504+48)*mv_apps2)*num_cb_sites;
447  gflops = (double)(total_flops)/(1.0e9);
448  total_time = end - start;
449 
450 #ifndef QDP_IS_QDPJIT
451  // Want Norm of Y
452  QPhiX::qdp_unpack_cb_spinor<>(tmp_qphix, Y, *geom_outer,1);
453 #endif
454  double norm2Y;
455  QPhiX::norm2Spinor(norm2Y, tmp_qphix, *geom_outer, n_blas_simt);
456  r_final = sqrt(toDouble(rsd_final));
457 
458  QDPIO::cout << "QPHIX_CLOVER_ITER_REFINE_BICGSTAB_SOLVER: " << n_count2 << " iters, rsd_sq_final=" << rsd_final << " ||r||/||b|| (acc) = " << r_final << std::endl;
459  QDPIO::cout << "QPHIX_CLOVER_ITER_REFINE_BICGSTAB_SOLVER: Solver Time="<< total_time <<" (sec) Performance=" << gflops / total_time << " GFLOPS" << std::endl;
460 
461 #ifndef QDP_IS_QDPJIT
462  QPhiX::qdp_unpack_cb_spinor<>(psi_qphix, psi, *geom_outer,1);
463 #endif
464 
465  try {
466  // Try to cast the predictor to a two step predictor
467  AbsTwoStepChronologicalPredictor4D<T>& two_step_predictor =
468  dynamic_cast<AbsTwoStepChronologicalPredictor4D<T>& >(predictor);
469  two_step_predictor.newYVector(Y);
470  two_step_predictor.newXVector(psi);
471 
472  }
473  catch( std::bad_cast) {
474 
475  // Not a 2 step predictor. Predict X
476  // Then MX = Y is a good guess.
477  predictor.newVector(psi);
478  }
479 
480  // Chi Should now hold the result spinor
481  // Check it against chroma. -- reuse Y as the residuum
482  Y[ A->subset() ] = chi;
483  {
484  T tmp,tmp2;
485  (*A)(tmp, psi, PLUS);
486  (*A)(tmp2, tmp, MINUS);
487 
488  Y[ A->subset() ] -= tmp2;
489  }
490 
491  Double r2 = norm2(Y,A->subset());
492  Double b2 = norm2(chi, A->subset());
493  Double rel_resid = sqrt(r2/b2);
494  res.resid=rel_resid;
495  res.n_count = n_count1 + n_count2;
496  QDPIO::cout << "QPHIX_CLOVER_ITER_REFINE_BICGSTAB_SOLVER: total_iters="<<res.n_count<<" || r || / || b || = " << res.resid << std::endl;
497 
498 
499 #if 0
500  if ( !toBool ( rel_resid < invParam.RsdTarget*invParam.RsdToleranceFactor ) ) {
501  QDPIO::cout << "SOLVE FAILED" << std::endl;
502  QDP_abort(1);
503  }
504 #endif
505  swatch.stop();
506  QDPIO::cout << "QPHIX_MDAGM_SOLVER: total time: " << swatch.getTimeInSeconds() << " (sec)" << std::endl;
507  END_CODE();
508 
509  return res;
510  }
511 
512 
513 
514 
515 
516 
517  private:
518  // Hide default constructor
519  MdagMSysSolverQPhiXCloverIterRefine() {}
520 
521 
522  // The LinOp
523  Handle< LinearOperator<T> > A;
524 
525  // Params
526  const SysSolverQPhiXCloverParams invParam;
527 
528  // Clover Terms
529  Handle< CloverTermT<T, U> > clov;
530  Handle< CloverTermT<T, U> > invclov;
531 
532  // Outer Geom
533  QPhiX::Geometry<REALT,
534  MixedVecTraits<REALT,InnerReal>::Vec,
535  MixedVecTraits<REALT,InnerReal>::Soa,
536  MixedVecTraits<REALT,InnerReal>::compress12>* geom_outer;
537 
538  // Inner Geom
539  QPhiX::Geometry<InnerReal,
540  MixedVecTraits<REALT,InnerReal>::VecInner,
541  MixedVecTraits<REALT,InnerReal>::SoaInner,
542  MixedVecTraits<REALT,InnerReal>::compress12>* geom_inner;
543 
544  // Outer M
545  Handle< QPhiX::EvenOddCloverOperator<REALT,
546  MixedVecTraits<REALT,InnerReal>::Vec,
547  MixedVecTraits<REALT,InnerReal>::Soa,
548  MixedVecTraits<REALT,InnerReal>::compress12> > M_outer;
549 
550 
551  // Inner M
552  Handle< QPhiX::EvenOddCloverOperator<InnerReal,
553  MixedVecTraits<REALT,InnerReal>::VecInner,
554  MixedVecTraits<REALT,InnerReal>::SoaInner,
555  MixedVecTraits<REALT,InnerReal>::compress12> > M_inner;
556 
557  // Inner BiCGStab
558  Handle< QPhiX::InvBiCGStab<InnerReal,
559  MixedVecTraits<REALT,InnerReal>::VecInner,
560  MixedVecTraits<REALT,InnerReal>::SoaInner,
561  MixedVecTraits<REALT,InnerReal>::compress12> > bicgstab_inner_solver;
562 
563 
564  // Outer solver
565  Handle< QPhiX::InvRichardsonMultiPrec<REALT,
566  MixedVecTraits<REALT,InnerReal>::Vec,
567  MixedVecTraits<REALT,InnerReal>::Soa,
568  MixedVecTraits<REALT,InnerReal>::compress12,
569  InnerReal,
570  MixedVecTraits<REALT,InnerReal>::VecInner,
571  MixedVecTraits<REALT,InnerReal>::SoaInner,
572  MixedVecTraits<REALT,InnerReal>::compress12> > mixed_solver;
573 
574  QPhiX_Clover* invclov_packed[2];
575  QPhiX_Clover* clov_packed[2];
576  QPhiX_Gauge* u_packed[2];
577 
578  QPhiX_InnerClover* invclov_packed_i[2];
579  QPhiX_InnerClover* clov_packed_i[2];
580  QPhiX_InnerGauge* u_packed_i[2];
581 
582 
583  mutable QPhiX_Spinor* psi_qphix;
584  mutable QPhiX_Spinor* chi_qphix;
585  mutable QPhiX_Spinor* tmp_qphix;
586  size_t cbsize_in_blocks;
587  int n_blas_simt;
588 
589  };
590 
591 
592 } // End namespace
593 
594 #endif // BUILD_QPHIX
595 #endif
596 
Anisotropy parameters.
#define END_CODE()
Definition: chromabase.h:65
#define START_CODE()
Definition: chromabase.h:64
void create(Handle< FermState< T, multi1d< U >, multi1d< U > > > fs, const CloverFermActParams &param_)
Creation routine.
Include possibly optimized Clover terms.
int mu
Definition: cool.cc:24
Even-odd preconditioned Clover fermion linear operator.
Class for counted reference semantics.
Linear Operators.
M^dag*M composition of a linear operator.
Double tmp
Definition: meslate.cc:60
Nd
Definition: meslate.cc:74
Double tmp2
Definition: mesq.cc:30
bool registerAll()
Register all the factories.
multi1d< Hadron2PtContraction_t > operator()(const multi1d< LatticeColorMatrix > &u)
Asqtad Staggered-Dirac operator.
Definition: klein_gord.cc:10
static multi1d< LatticeColorMatrix > u
QDPCloverTerm CloverTerm
Definition: clover_term_w.h:92
SystemSolverResults_t InvBiCGStab(const LinearOperator< LatticeFermionF > &A, const LatticeFermionF &chi, LatticeFermionF &psi, const Real &RsdBiCGStab, int MaxBiCGStab, enum PlusMinus isign)
Definition: invbicgstab.cc:222
@ MINUS
Definition: chromabase.h:45
@ PLUS
Definition: chromabase.h:45
QDPCloverTermT< T, U > CloverTermT
Definition: clover_term_w.h:97
A(A, psi, r, Ncb, PLUS)
int cb
Definition: invbicg.cc:120
multi1d< Real > makeFermCoeffs(const AnisoParam_t &aniso)
Make fermion coefficients.
Definition: aniso_io.cc:63
FloatingPoint< double > Double
Definition: gtest.h:7351
Null predictor: Leaves input x0 unchanged.
chi
Definition: pade_trln_w.cc:24
psi
Definition: pade_trln_w.cc:191
Periodic ferm state and a creator.
Fermion action factories.
Reunitarize in place a color matrix to SU(N)
Simple fermionic BC.
Support class for fermion actions and linear operators.
Linear system solvers.
Handle< LinearOperator< T > > MdagM
multi1d< LatticeColorMatrix > U
LatticeFermion T
Definition: t_clover.cc:11
multi1d< LatticeColorMatrix > Q
Definition: t_clover.cc:12
Axial gauge fixing.