diff --git a/lib/qcd/action/ActionSet.h b/lib/qcd/action/ActionSet.h index e45b7a39..e6879fe5 100644 --- a/lib/qcd/action/ActionSet.h +++ b/lib/qcd/action/ActionSet.h @@ -84,7 +84,7 @@ public: void push_back(Action* ptr) { // insert only in the correct vector std::get< Index < GenField, action_hirep_types>::value >(actions_hirep).push_back(ptr); - }; + } template static void resize(ActPtr ap, unsigned int n) { diff --git a/lib/qcd/action/fermion/CayleyFermion5D.cc b/lib/qcd/action/fermion/CayleyFermion5D.cc index 9a014608..894ef938 100644 --- a/lib/qcd/action/fermion/CayleyFermion5D.cc +++ b/lib/qcd/action/fermion/CayleyFermion5D.cc @@ -238,8 +238,6 @@ void CayleyFermion5D::MeooeDag5D (const FermionField &psi, FermionField template RealD CayleyFermion5D::M (const FermionField &psi, FermionField &chi) { - int Ls=this->Ls; - FermionField Din(psi._grid); // Assemble Din @@ -276,8 +274,6 @@ RealD CayleyFermion5D::Mdag (const FermionField &psi, FermionField &chi) template void CayleyFermion5D::Meooe (const FermionField &psi, FermionField &chi) { - int Ls=this->Ls; - Meooe5D(psi,this->tmp()); if ( psi.checkerboard == Odd ) { diff --git a/lib/qcd/action/fermion/ContinuedFractionFermion5D.cc b/lib/qcd/action/fermion/ContinuedFractionFermion5D.cc index 9d6d99e7..94384b5f 100644 --- a/lib/qcd/action/fermion/ContinuedFractionFermion5D.cc +++ b/lib/qcd/action/fermion/ContinuedFractionFermion5D.cc @@ -58,14 +58,14 @@ void ContinuedFractionFermion5D::SetCoefficientsZolotarev(RealD zolo_hi,Ap for(int i=0; i < Ls ; i++){ Beta[i] = zdata -> beta[i]; cc[i] = 1.0/Beta[i]; - cc_d[i]=sqrt(cc[i]); + cc_d[i]=std::sqrt(cc[i]); } cc_d[Ls-1]=1.0; for(int i=0; i < Ls-1 ; i++){ - sqrt_cc[i]= sqrt(cc[i]*cc[i+1]); + sqrt_cc[i]= std::sqrt(cc[i]*cc[i+1]); } - sqrt_cc[Ls-2]=sqrt(cc[Ls-2]); + sqrt_cc[Ls-2]=std::sqrt(cc[Ls-2]); ZoloHiInv =1.0/zolo_hi; diff --git a/lib/qcd/action/fermion/DomainWallEOFAFermion.cc b/lib/qcd/action/fermion/DomainWallEOFAFermion.cc index 248ebcd3..61762daf 100644 --- a/lib/qcd/action/fermion/DomainWallEOFAFermion.cc +++ b/lib/qcd/action/fermion/DomainWallEOFAFermion.cc @@ -89,8 +89,6 @@ void DomainWallEOFAFermion::DtildeInv(const FermionField& psi, FermionFiel template RealD DomainWallEOFAFermion::M(const FermionField& psi, FermionField& chi) { - int Ls = this->Ls; - FermionField Din(psi._grid); this->Meooe5D(psi, Din); @@ -103,8 +101,6 @@ RealD DomainWallEOFAFermion::M(const FermionField& psi, FermionField& chi) template RealD DomainWallEOFAFermion::Mdag(const FermionField& psi, FermionField& chi) { - int Ls = this->Ls; - FermionField Din(psi._grid); this->DW(psi, Din, DaggerYes); diff --git a/lib/qcd/action/fermion/FermionOperatorImpl.h b/lib/qcd/action/fermion/FermionOperatorImpl.h index f2a2f7d0..dac5cb4e 100644 --- a/lib/qcd/action/fermion/FermionOperatorImpl.h +++ b/lib/qcd/action/fermion/FermionOperatorImpl.h @@ -413,7 +413,6 @@ public: // Passing through the local coordinate for grid transformation // the force grid is in general very different from the Ls vectorized grid - PARALLEL_FOR_LOOP for (int so = 0; so < grid->oSites(); so++) { std::vector vres(Bgrid->Nsimd()); std::vector ocoor; grid->oCoorFromOindex(ocoor,so); diff --git a/lib/qcd/action/fermion/ImprovedStaggeredFermion.cc b/lib/qcd/action/fermion/ImprovedStaggeredFermion.cc index 33fb0086..8e1dd3f7 100644 --- a/lib/qcd/action/fermion/ImprovedStaggeredFermion.cc +++ b/lib/qcd/action/fermion/ImprovedStaggeredFermion.cc @@ -249,10 +249,9 @@ void ImprovedStaggeredFermion::DerivInternal(StencilImpl &st, DoubledGauge //////////////////////// // Call the single hop //////////////////////// - PARALLEL_FOR_LOOP - for (int sss = 0; sss < B._grid->oSites(); sss++) { - Kernels::DhopDir(st, U, UUU, st.CommBuf(), sss, sss, B, Btilde, mu,1); - } + thread_loop( (int sss = 0; sss < B._grid->oSites(); sss++), { + Kernels::DhopDirK(st, U, UUU, st.CommBuf(), sss, sss, B, Btilde, mu,1); + }); // Force in three link terms // @@ -362,10 +361,9 @@ void ImprovedStaggeredFermion::DhopDir(const FermionField &in, FermionFiel Compressor compressor; Stencil.HaloExchange(in, compressor); - PARALLEL_FOR_LOOP - for (int sss = 0; sss < in._grid->oSites(); sss++) { - Kernels::DhopDir(Stencil, Umu, UUUmu, Stencil.CommBuf(), sss, sss, in, out, dir, disp); - } + thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++) , { + Kernels::DhopDirK(Stencil, Umu, UUUmu, Stencil.CommBuf(), sss, sss, in, out, dir, disp); + }); }; template @@ -380,15 +378,13 @@ void ImprovedStaggeredFermion::DhopInternal(StencilImpl &st, LebesgueOrder st.HaloExchange(in, compressor); if (dag == DaggerYes) { - PARALLEL_FOR_LOOP - for (int sss = 0; sss < in._grid->oSites(); sss++) { + thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++), { Kernels::DhopSiteDag(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out); - } + }); } else { - PARALLEL_FOR_LOOP - for (int sss = 0; sss < in._grid->oSites(); sss++) { + thread_loop( (int sss = 0; sss < in._grid->oSites(); sss++), { Kernels::DhopSite(st, lo, U, UUU, st.CommBuf(), 1, sss, in, out); - } + }); } }; diff --git a/lib/qcd/action/fermion/ImprovedStaggeredFermion5D.cc b/lib/qcd/action/fermion/ImprovedStaggeredFermion5D.cc index 643ed825..b0d65be6 100644 --- a/lib/qcd/action/fermion/ImprovedStaggeredFermion5D.cc +++ b/lib/qcd/action/fermion/ImprovedStaggeredFermion5D.cc @@ -108,8 +108,8 @@ ImprovedStaggeredFermion5D::ImprovedStaggeredFermion5D(GaugeField &_Uthin, assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd); for(int d=0;d<4;d++){ - assert(FourDimGrid._simd_layout[d]=1); - assert(FourDimRedBlackGrid._simd_layout[d]=1); + assert(FourDimGrid._simd_layout[d]==1); + assert(FourDimRedBlackGrid._simd_layout[d]==1); assert(FiveDimRedBlackGrid._simd_layout[d+1]==1); } @@ -176,7 +176,7 @@ void ImprovedStaggeredFermion5D::DhopDir(const FermionField &in, FermionFi for(int s=0;s::DtildeInv(const FermionField& psi, FermionField& c template RealD MobiusEOFAFermion::M(const FermionField& psi, FermionField& chi) { - int Ls = this->Ls; - FermionField Din(psi._grid); this->Meooe5D(psi, Din); @@ -181,8 +179,6 @@ RealD MobiusEOFAFermion::M(const FermionField& psi, FermionField& chi) template RealD MobiusEOFAFermion::Mdag(const FermionField& psi, FermionField& chi) { - int Ls = this->Ls; - FermionField Din(psi._grid); this->DW(psi, Din, DaggerYes); @@ -373,18 +369,18 @@ void MobiusEOFAFermion::SetCoefficientsPrecondShiftOps() for(int s=0; sbee[s],s) * std::pow(this->cee[s],Ls-1-s); } - else{ MooeeInv_shift_lc[s] = std::pow(this->bee[s],Ls-1-s) * std::pow(this->cee[s],s); } + if(pm == 1){ MooeeInv_shift_lc[s] = pow(this->bee[s],s) * pow(this->cee[s],Ls-1-s); } + else { MooeeInv_shift_lc[s] = pow(this->bee[s],Ls-1-s) * pow(this->cee[s],s); } // MooeeInv_shift_norm MooeeInv_shift_norm[s] = -MooeeInvDag_shift_lc[s] / - ( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N; + ( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N; // MooeeInvDag_shift_norm - if(pm == 1){ MooeeInvDag_shift_norm[s] = -std::pow(this->bee[s],s) * std::pow(this->cee[s],Ls-1-s) / - ( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N; } - else{ MooeeInvDag_shift_norm[s] = -std::pow(this->bee[s],Ls-1-s) * std::pow(this->cee[s],s) / - ( std::pow(this->bee[s],Ls) + mq1*std::pow(this->cee[s],Ls) ) / N; } + if(pm == 1){ MooeeInvDag_shift_norm[s] = -pow(this->bee[s],s) * pow(this->cee[s],(Ls-1-s)) / + ( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N; } + else{ MooeeInvDag_shift_norm[s] = -pow(this->bee[s],(Ls-1-s)) * pow(this->cee[s],s) / + ( pow(this->bee[s],Ls) + mq1*pow(this->cee[s],Ls) ) / N; } } } } diff --git a/lib/qcd/action/fermion/PartialFractionFermion5D.cc b/lib/qcd/action/fermion/PartialFractionFermion5D.cc index 3151e9b4..1ba8a788 100644 --- a/lib/qcd/action/fermion/PartialFractionFermion5D.cc +++ b/lib/qcd/action/fermion/PartialFractionFermion5D.cc @@ -34,8 +34,6 @@ NAMESPACE_BEGIN(Grid); template void PartialFractionFermion5D::Mdir (const FermionField &psi, FermionField &chi,int dir,int disp){ // this does both dag and undag but is trivial; make a common helper routing - - int sign = 1; int Ls = this->Ls; this->DhopDir(psi,chi,dir,disp); @@ -53,8 +51,6 @@ template void PartialFractionFermion5D::Meooe_internal(const FermionField &psi, FermionField &chi,int dag) { int Ls = this->Ls; - int sign = dag ? (-1) : 1; - if ( psi.checkerboard == Odd ) { this->DhopEO(psi,chi,DaggerNo); } else { diff --git a/lib/qcd/action/fermion/StaggeredKernels.cc b/lib/qcd/action/fermion/StaggeredKernels.cc index 7ed2104d..29732ec7 100644 --- a/lib/qcd/action/fermion/StaggeredKernels.cc +++ b/lib/qcd/action/fermion/StaggeredKernels.cc @@ -258,7 +258,7 @@ void StaggeredKernels::DhopSite(StencilImpl &st, LebesgueOrder &lo, Double }; template -void StaggeredKernels::DhopDir( StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor *buf, int sF, +void StaggeredKernels::DhopDirK( StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor *buf, int sF, int sU, const FermionField &in, FermionField &out, int dir, int disp) { // Disp should be either +1,-1,+3,-3 diff --git a/lib/qcd/action/fermion/StaggeredKernels.h b/lib/qcd/action/fermion/StaggeredKernels.h index 49962e76..e07dd402 100644 --- a/lib/qcd/action/fermion/StaggeredKernels.h +++ b/lib/qcd/action/fermion/StaggeredKernels.h @@ -49,7 +49,7 @@ public: public: - void DhopDir(StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf, + void DhopDirK(StencilImpl &st, DoubledGaugeField &U, DoubledGaugeField &UUU, SiteSpinor * buf, int sF, int sU, const FermionField &in, FermionField &out, int dir,int disp); void DhopSiteDepth(StencilImpl &st, LebesgueOrder &lo, DoubledGaugeField &U, SiteSpinor * buf, diff --git a/lib/qcd/action/fermion/StaggeredKernelsHand.cc b/lib/qcd/action/fermion/StaggeredKernelsHand.cc index 1238dced..bbbde7b4 100644 --- a/lib/qcd/action/fermion/StaggeredKernelsHand.cc +++ b/lib/qcd/action/fermion/StaggeredKernelsHand.cc @@ -97,7 +97,6 @@ void StaggeredKernels::DhopSiteHand(StencilImpl &st, LebesgueOrder &lo, Do SiteSpinor naive; int oneLink =0; int threeLink=1; - int skew(0); Real scale(1.0); if(dag) scale = -1.0; diff --git a/lib/qcd/action/fermion/WilsonCompressor.h b/lib/qcd/action/fermion/WilsonCompressor.h index 07df2b75..f9a356c7 100644 --- a/lib/qcd/action/fermion/WilsonCompressor.h +++ b/lib/qcd/action/fermion/WilsonCompressor.h @@ -97,7 +97,7 @@ public: SiteHalfSpinor *out1, const SiteSpinor *in, Integer j,Integer k, Integer m,Integer type){ - SiteHalfSpinor temp1, temp2,temp3,temp4; + SiteHalfSpinor temp1, temp2; projector::Proj(temp1,in[k],mu,dag); projector::Proj(temp2,in[m],mu,dag); exchange(out0[j],out1[j],temp1,temp2,type); diff --git a/lib/qcd/action/fermion/WilsonFermion.cc b/lib/qcd/action/fermion/WilsonFermion.cc index 19c71821..d6fdcd92 100644 --- a/lib/qcd/action/fermion/WilsonFermion.cc +++ b/lib/qcd/action/fermion/WilsonFermion.cc @@ -217,7 +217,7 @@ void WilsonFermion::DerivInternal(StencilImpl &st, DoubledGaugeField &U, // Call the single hop //////////////////////// parallel_for (int sss = 0; sss < B._grid->oSites(); sss++) { - Kernels::DhopDir(st, U, st.CommBuf(), sss, sss, B, Btilde, mu, gamma); + Kernels::DhopDirK(st, U, st.CommBuf(), sss, sss, B, Btilde, mu, gamma); } ////////////////////////////////////////////////// @@ -318,7 +318,7 @@ void WilsonFermion::DhopDirDisp(const FermionField &in, FermionField &out, Stencil.HaloExchange(in, compressor); parallel_for (int sss = 0; sss < in._grid->oSites(); sss++) { - Kernels::DhopDir(Stencil, Umu, Stencil.CommBuf(), sss, sss, in, out, dirdisp, gamma); + Kernels::DhopDirK(Stencil, Umu, Stencil.CommBuf(), sss, sss, in, out, dirdisp, gamma); } }; diff --git a/lib/qcd/action/fermion/WilsonFermion5D.cc b/lib/qcd/action/fermion/WilsonFermion5D.cc index 7bbd45fe..1d4bc038 100644 --- a/lib/qcd/action/fermion/WilsonFermion5D.cc +++ b/lib/qcd/action/fermion/WilsonFermion5D.cc @@ -103,8 +103,8 @@ WilsonFermion5D::WilsonFermion5D(GaugeField &_Umu, assert(FiveDimRedBlackGrid._simd_layout[0]==nsimd); for(int d=0;d<4;d++){ - assert(FourDimGrid._simd_layout[d]=1); - assert(FourDimRedBlackGrid._simd_layout[d]=1); + assert(FourDimGrid._simd_layout[d]==1); + assert(FourDimRedBlackGrid._simd_layout[d]==1); assert(FiveDimRedBlackGrid._simd_layout[d+1]==1); } @@ -248,7 +248,7 @@ void WilsonFermion5D::DhopDir(const FermionField &in, FermionField &out,in for(int s=0;s::DerivInternal(StencilImpl & st, assert(sF < B._grid->oSites()); assert(sU < U._grid->oSites()); - Kernels::DhopDir(st, U, st.CommBuf(), sF, sU, B, Btilde, mu, gamma); + Kernels::DhopDirK(st, U, st.CommBuf(), sF, sU, B, Btilde, mu, gamma); //////////////////////////// // spin trace outer product @@ -312,7 +312,7 @@ void WilsonFermion5D::DerivInternal(StencilImpl & st, // spin trace outer product //////////////////////////// DerivDhopComputeTime += usecond(); - Impl::InsertForce5D(mat, Btilde, Atilde, mu); + this->Impl::InsertForce5D(mat, Btilde, Atilde, mu); } DerivComputeTime += usecond(); } @@ -624,7 +624,6 @@ void WilsonFermion5D::MomentumSpacePropagatorHt(FermionField &out,const Fe for(int idx=0;idx<_grid->lSites();idx++){ std::vector lcoor(Nd); Tcomplex cc; - RealD sgn; _grid->LocalIndexToLocalCoor(idx,lcoor); peekLocalSite(cc,cosha,lcoor); assert((double)real(cc)>=1.0); diff --git a/lib/qcd/action/fermion/WilsonKernels.cc b/lib/qcd/action/fermion/WilsonKernels.cc index e015b765..ce3e3f5b 100644 --- a/lib/qcd/action/fermion/WilsonKernels.cc +++ b/lib/qcd/action/fermion/WilsonKernels.cc @@ -208,8 +208,8 @@ void WilsonKernels::GenericDhopSiteDagExt(StencilImpl &st, LebesgueOrder & SiteHalfSpinor *buf, int sF, int sU, const FermionField &in, FermionField &out) { - SiteHalfSpinor tmp; - SiteHalfSpinor chi; + // SiteHalfSpinor tmp; + // SiteHalfSpinor chi; SiteHalfSpinor *chi_p; SiteHalfSpinor Uchi; SiteSpinor result; @@ -235,8 +235,8 @@ void WilsonKernels::GenericDhopSiteExt(StencilImpl &st, LebesgueOrder &lo, SiteHalfSpinor *buf, int sF, int sU, const FermionField &in, FermionField &out) { - SiteHalfSpinor tmp; - SiteHalfSpinor chi; + // SiteHalfSpinor tmp; + // SiteHalfSpinor chi; SiteHalfSpinor *chi_p; SiteHalfSpinor Uchi; SiteSpinor result; @@ -258,7 +258,7 @@ void WilsonKernels::GenericDhopSiteExt(StencilImpl &st, LebesgueOrder &lo, }; template -void WilsonKernels::DhopDir( StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor *buf, int sF, +void WilsonKernels::DhopDirK( StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor *buf, int sF, int sU, const FermionField &in, FermionField &out, int dir, int gamma) { SiteHalfSpinor tmp; diff --git a/lib/qcd/action/fermion/WilsonKernels.h b/lib/qcd/action/fermion/WilsonKernels.h index c9be52af..bbc4590f 100644 --- a/lib/qcd/action/fermion/WilsonKernels.h +++ b/lib/qcd/action/fermion/WilsonKernels.h @@ -176,7 +176,7 @@ public: } } - void DhopDir(StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor * buf, + void DhopDirK(StencilImpl &st, DoubledGaugeField &U,SiteHalfSpinor * buf, int sF, int sU, const FermionField &in, FermionField &out, int dirdisp, int gamma); ////////////////////////////////////////////////////////////////////////////// diff --git a/lib/qcd/action/fermion/WilsonKernelsHand.cc b/lib/qcd/action/fermion/WilsonKernelsHand.cc index d65571e7..8b21103a 100644 --- a/lib/qcd/action/fermion/WilsonKernelsHand.cc +++ b/lib/qcd/action/fermion/WilsonKernelsHand.cc @@ -468,8 +468,7 @@ Author: paboyle #define HAND_STENCIL_LEG_EXT(PROJ,PERM,DIR,RECON,F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \ SE=st.GetEntry(ptype,DIR,ss); \ offset = SE->_offset; \ - local = SE->_is_local; \ - perm = SE->_permute; \ + perm = SE->_permute; \ if((!SE->_is_local)&&(!st.same_node[DIR]) ) { \ LOAD_CHI_IMPL(DIR,F,PERM); \ MULT_2SPIN_IMPL(DIR,F); \ @@ -691,7 +690,7 @@ WilsonKernels::HandDhopSiteExt(StencilImpl &st,LebesgueOrder &lo,DoubledGa HAND_DECLARATIONS(ignore); - int offset,local,perm, ptype; + int offset, perm, ptype; StencilEntry *SE; int nmu=0; @@ -708,6 +707,7 @@ WilsonKernels::HandDhopSiteExt(StencilImpl &st,LebesgueOrder &lo,DoubledGa HAND_RESULT_EXT(ss,F) HAND_DOP_SITE_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN); + perm++; } template @@ -720,7 +720,7 @@ void WilsonKernels::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D HAND_DECLARATIONS(ignore); StencilEntry *SE; - int offset,local,perm, ptype; + int offset, perm, ptype; int nmu=0; #define HAND_DOP_SITE_DAG_EXT(F,LOAD_CHI_IMPL,LOAD_CHIMU_IMPL,MULT_2SPIN_IMPL) \ @@ -736,6 +736,7 @@ void WilsonKernels::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D HAND_RESULT_EXT(ss,F) HAND_DOP_SITE_DAG_EXT(, LOAD_CHI,LOAD_CHIMU,MULT_2SPIN); + perm++; } //////////////////////////////////////////////// @@ -868,7 +869,7 @@ void WilsonKernels::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D \ HAND_DECLARATIONS(ignore); \ \ - int offset,local,perm, ptype, g, direction, distance, sl, inplace_twist; \ + int offset,perm, ptype, g, direction, distance, sl, inplace_twist; \ StencilEntry *SE; \ int nmu=0; \ HAND_DOP_SITE_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \ @@ -886,7 +887,7 @@ void WilsonKernels::HandDhopSiteDagExt(StencilImpl &st,LebesgueOrder &lo,D HAND_DECLARATIONS(ignore); \ \ StencilEntry *SE; \ - int offset,local,perm, ptype, g, direction, distance, sl, inplace_twist; \ + int offset,perm, ptype, g, direction, distance, sl, inplace_twist; \ int nmu=0; \ HAND_DOP_SITE_DAG_EXT(0, LOAD_CHI_GPARITY,LOAD_CHIMU_GPARITY,MULT_2SPIN_GPARITY); \ nmu = 0; \ diff --git a/lib/qcd/action/fermion/WilsonTMFermion.cc b/lib/qcd/action/fermion/WilsonTMFermion.cc index 3bf7d99f..049a959d 100644 --- a/lib/qcd/action/fermion/WilsonTMFermion.cc +++ b/lib/qcd/action/fermion/WilsonTMFermion.cc @@ -75,7 +75,7 @@ template void WilsonTMFermion::MooeeInv(const FermionField &in, FermionField &out) { RealD m = this->mass; RealD tm = this->mu; - RealD mtil = 4.0+this->mass; + RealD mtil = 4.0+m; RealD sq = mtil*mtil+tm*tm; RealD a = mtil/sq; RealD b = -tm /sq; @@ -85,7 +85,7 @@ template void WilsonTMFermion::MooeeInvDag(const FermionField &in, FermionField &out) { RealD m = this->mass; RealD tm = this->mu; - RealD mtil = 4.0+this->mass; + RealD mtil = 4.0+m; RealD sq = mtil*mtil+tm*tm; RealD a = mtil/sq; RealD b = tm /sq; diff --git a/lib/qcd/action/fermion/ZMobiusFermion.h b/lib/qcd/action/fermion/ZMobiusFermion.h index d285736e..4c2390d6 100644 --- a/lib/qcd/action/fermion/ZMobiusFermion.h +++ b/lib/qcd/action/fermion/ZMobiusFermion.h @@ -57,8 +57,7 @@ public: FourDimRedBlackGrid,_mass,_M5,p) { - RealD eps = 1.0; - + // RealD eps = 1.0; std::cout< zgamma(this->Ls); for(int s=0;sLs;s++){ diff --git a/lib/qcd/action/gauge/GaugeImplTypes.h b/lib/qcd/action/gauge/GaugeImplTypes.h index 2a4f4885..197f0c73 100644 --- a/lib/qcd/action/gauge/GaugeImplTypes.h +++ b/lib/qcd/action/gauge/GaugeImplTypes.h @@ -76,11 +76,10 @@ public: // Move this elsewhere? FIXME static inline void AddLink(Field &U, LinkField &W, int mu) { // U[mu] += W - PARALLEL_FOR_LOOP - for (auto ss = 0; ss < U._grid->oSites(); ss++) { + thread_loop ( (auto ss = 0; ss < U._grid->oSites(); ss++),{ U._odata[ss]._internal[mu] = U._odata[ss]._internal[mu] + W._odata[ss]._internal; - } + }); } /////////////////////////////////////////////////////////// diff --git a/lib/qcd/action/gauge/GaugeImplementations.h b/lib/qcd/action/gauge/GaugeImplementations.h index 1fbda152..b9ed524a 100644 --- a/lib/qcd/action/gauge/GaugeImplementations.h +++ b/lib/qcd/action/gauge/GaugeImplementations.h @@ -41,7 +41,7 @@ public: //////////////////////////////////////////////////////////////////////////////////////////////////////////// // Support needed for the assembly of loops including all boundary condition - // effects such as conjugate bcs + // effects such as Conjugate bcs //////////////////////////////////////////////////////////////////////////////////////////////////////////// template diff --git a/lib/qcd/utils/CovariantCshift.h b/lib/qcd/utils/CovariantCshift.h index 35aa1ca5..880b1c2e 100644 --- a/lib/qcd/utils/CovariantCshift.h +++ b/lib/qcd/utils/CovariantCshift.h @@ -73,14 +73,14 @@ namespace ConjugateBC { // U U^* U^* U^T U^adj = U (U U U^dag U^T )^* // = U (U U U^dag)^* ( U^T )^* // - // So covariant shift rule: conjugate inward shifted plane when crossing boundary applies. + // So covariant shift rule: Conjugate inward shifted plane when crossing boundary applies. // - // This conjugate should be applied to BOTH the link and the covariant field on backward shift + // This Conjugate should be applied to BOTH the link and the covariant field on backward shift // boundary wrap. // // | | // xxxxxxxxxxxxxxxxx - // | | <---- this link is conjugated, and the path leading into it. Segment crossing in and out is double conjugated. + // | | <---- this link is Conjugated, and the path leading into it. Segment crossing in and out is double Conjugated. // -- // -------> template Lattice CovShiftForward(const Lattice &Link, diff --git a/lib/qcd/utils/SUn.h b/lib/qcd/utils/SUn.h index 318f001a..b0b1aaee 100644 --- a/lib/qcd/utils/SUn.h +++ b/lib/qcd/utils/SUn.h @@ -279,8 +279,6 @@ public: int su2_subgroup, int nheatbath, LatticeInteger &wheremask) { GridBase *grid = link._grid; - int ntrials = 0; - int nfails = 0; const RealD twopi = 2.0 * M_PI; LatticeMatrix staple(grid);