From 0e959d9b94551351dd8213beba19888d6dda54b3 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 22 Apr 2021 15:55:47 -0400 Subject: [PATCH 1/4] Update plaquette analysis --- scripts/hmc.sh | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/scripts/hmc.sh b/scripts/hmc.sh index c2cd6593..4d7191ff 100755 --- a/scripts/hmc.sh +++ b/scripts/hmc.sh @@ -1,19 +1,27 @@ #!/bin/bash LOG=$1 -SWEEPS=`grep dH $LOG | wc -l` -SWEEPS=`expr $SWEEPS - 80` +SWEEPS=`grep dH.= $LOG | wc -l` +SWEEPS=`expr $SWEEPS - 100` echo echo $SWEEPS thermalised sweeps echo -plaq=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$10} END { print S/NR} ' ` -plaqe=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$10 ; SS=SS+$10*$10 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` +plaq=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12} END { print S/NR} ' ` +plaqe=`grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12 ; SS=SS+$12*$12 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` echo "Plaquette: $plaq (${plaqe})" echo -dHv=`grep dH $LOG | tail -n $SWEEPS | awk '{ S=S+$10 ; SS=SS+$10*$10 } END { print sqrt(SS/NR) } ' ` -edH=`grep dH $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$10)} END { print S/NR} '` -echo ": $edH" +grep Plaq $LOG | tail -n $SWEEPS | awk '{ S=S+$12/20; if(NR%20==0){ print NR/20, " ", S; S=0;} } ' > plaq.binned + +plaq=`cat plaq.binned | awk '{ S=S+$2} END { print S/NR} ' ` +plaqe=`cat plaq.binned | awk '{ S=S+$2 ; SS=SS+$2*$2 } END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } ' ` +echo "Binned Plaquette: $plaq (${plaqe})" +echo + +dHv=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+$16 ; SS=SS+$16*$16 } END { print sqrt(SS/NR) } ' ` +edH=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$16)} END { print S/NR} '` +dedH=`grep dH.= $LOG | tail -n $SWEEPS | awk '{ S=S+exp(-$16); SS=SS+exp(-$16)*exp(-$16)} END { print sqrt( (SS/NR - S*S/NR/NR)/NR) } '` +echo ": $edH (${dedH})" echo ": $dHv" TRAJ=`grep Acc $LOG | wc -l` @@ -22,12 +30,13 @@ PACC=`expr 100 \* ${ACC} / ${TRAJ} ` echo echo "Acceptance $PACC % $ACC / $TRAJ " -grep Plaq $LOG | awk '{ print $10 }' | uniq > plaq.dat -grep dH $LOG | awk '{ print $10 }' > dH.dat -echo set yrange [-0.2:1.0] > plot.gnu +grep Plaq $LOG | awk '{ print $12 }' | uniq > plaq.dat +grep dH.= $LOG | awk '{ print $16 }' > dH.dat +echo set yrange [0.58:0.60] > plot.gnu echo set terminal 'pdf' >> plot.gnu +echo "f(x) =0.588" >> plot.gnu echo "set output 'plaq.${LOG}.pdf'" >> plot.gnu -echo "plot 'plaq.dat' w l, 'dH.dat' w l " >> plot.gnu +echo "plot 'plaq.dat' w l, f(x) " >> plot.gnu echo gnuplot plot.gnu >& gnu.errs open plaq.${LOG}.pdf From 0d9aa8722845c5b240445d93b009c2e9aa134dfd Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 22 Apr 2021 15:56:59 -0400 Subject: [PATCH 2/4] Reduce momentum to the GP plane --- tests/forces/Test_gpwilson_force.cc | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/tests/forces/Test_gpwilson_force.cc b/tests/forces/Test_gpwilson_force.cc index d731f27a..65bd865e 100644 --- a/tests/forces/Test_gpwilson_force.cc +++ b/tests/forces/Test_gpwilson_force.cc @@ -64,7 +64,9 @@ int main (int argc, char ** argv) //////////////////////////////////// RealD mass=0.01; - const int nu = 3; + const int nu = 1; + const int Lnu=latt_size[nu]; + std::vector twists(Nd,0); twists[nu] = 1; GparityWilsonFermionR::ImplParams params; params.twists = twists; GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params); @@ -84,20 +86,31 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.01; + RealD dt = 0.1; LatticeColourMatrix mommu(UGrid); + LatticeColourMatrix zz(UGrid); LatticeColourMatrix forcemu(UGrid); LatticeGaugeField mom(UGrid); LatticeGaugeField Uprime(UGrid); + + Lattice > coor(UGrid); + LatticeCoordinate(coor,nu); + zz=Zero(); for(int mu=0;mu::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); - + if(mu==nu){ + SU::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); + mommu=where(coor==Lnu-1,mommu,zz); + //mommu=where(coor==0,mommu,zz); + // mommu=where(coor==1,mommu,zz); + } else { + mommu=Zero(); + } PokeIndex(mom,mommu,mu); - + // fourth order exponential approx autoView( mom_v, mom, CpuRead); autoView( U_v , U, CpuRead); @@ -139,12 +152,14 @@ int main (int argc, char ** argv) // Update PF action density dS = dS+trace(mommu*forcemu)*dt; } - + std::cout << "mommu"< Date: Thu, 22 Apr 2021 15:57:37 -0400 Subject: [PATCH 3/4] Switch twist direction --- tests/hmc/Test_hmc_GparityIwasakiGauge.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc index 7f74d5d8..d4bfa0a5 100644 --- a/tests/hmc/Test_hmc_GparityIwasakiGauge.cc +++ b/tests/hmc/Test_hmc_GparityIwasakiGauge.cc @@ -58,7 +58,7 @@ int main(int argc, char **argv) { CheckpointerParameters CPparams; CPparams.config_prefix = "ckpoint_EODWF_lat"; CPparams.rng_prefix = "ckpoint_EODWF_rng"; - CPparams.saveInterval = 5; + CPparams.saveInterval = 1; CPparams.format = "IEEE64BIG"; TheHMC.Resources.LoadNerscCheckpointer(CPparams); @@ -79,7 +79,7 @@ int main(int argc, char **argv) { // that have a complex construction // standard RealD beta = 2.6 ; - const int nu = 3; + const int nu = 1; std::vector twists(Nd,0); twists[nu] = 1; ConjugateGimplD::setDirections(twists); From 3a4f5f232420f6ff356c5c4dad84f8c5bb5e3858 Mon Sep 17 00:00:00 2001 From: Peter Boyle Date: Thu, 22 Apr 2021 18:54:00 -0400 Subject: [PATCH 4/4] Merge develop, strengthen force tests --- tests/forces/Test_gpdwf_force.cc | 28 ++++++++++++++++++++++++---- tests/forces/Test_gpwilson_force.cc | 24 +++++++++++++++--------- 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/tests/forces/Test_gpdwf_force.cc b/tests/forces/Test_gpdwf_force.cc index d6744080..b1c0dd80 100644 --- a/tests/forces/Test_gpdwf_force.cc +++ b/tests/forces/Test_gpdwf_force.cc @@ -71,8 +71,10 @@ int main (int argc, char ** argv) RealD mass=0.01; RealD M5=1.8; - const int nu = 3; - std::vector twists(Nd,0); twists[nu] = 1; + const int nu = 1; + std::vector twists(Nd,0); + twists[nu] = 1; + twists[3] = 1; GparityDomainWallFermionR::ImplParams params; params.twists = twists; GparityDomainWallFermionR Ddwf(U,*FGrid,*FrbGrid,*UGrid,*UrbGrid,mass,M5,params); Ddwf.M (phi,Mphi); @@ -91,16 +93,28 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.0001; + RealD dt = 0.01; + LatticeColourMatrix zz(UGrid); zz=Zero(); LatticeColourMatrix mommu(UGrid); LatticeColourMatrix forcemu(UGrid); LatticeGaugeField mom(UGrid); LatticeGaugeField Uprime(UGrid); + const int Lnu=latt_size[nu]; + Lattice > coor(UGrid); + LatticeCoordinate(coor,nu); for(int mu=0;mu::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); // Traceless antihermitian momentum; gaussian in lie alg + // Traceless antihermitian momentum; gaussian in lie alg + SU::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); + if(0){ + if(mu==nu){ + mommu=where(coor==Lnu-1,mommu,zz); + } else { + mommu=Zero(); + } + } PokeIndex(mom,mommu,mu); @@ -125,6 +139,12 @@ int main (int argc, char ** argv) ComplexD Sprime = innerProduct(MphiPrime ,MphiPrime); + + LatticeComplex lip(FGrid); lip=localInnerProduct(Mphi,Mphi); + LatticeComplex lipp(FGrid); lipp=localInnerProduct(MphiPrime,MphiPrime); + LatticeComplex dip(FGrid); dip = lipp - lip; + std::cout << " dip "< twists(Nd,0); twists[nu] = 1; + std::vector twists(Nd,0); + twists[nu] = 1; + twists[3]=1; GparityWilsonFermionR::ImplParams params; params.twists = twists; GparityWilsonFermionR Wil(U,*UGrid,*UrbGrid,mass,params); Wil.M (phi,Mphi); @@ -86,7 +88,7 @@ int main (int argc, char ** argv) //////////////////////////////////// // Modify the gauge field a little //////////////////////////////////// - RealD dt = 0.1; + RealD dt = 0.01; LatticeColourMatrix mommu(UGrid); LatticeColourMatrix zz(UGrid); @@ -101,13 +103,13 @@ int main (int argc, char ** argv) for(int mu=0;mu::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); - mommu=where(coor==Lnu-1,mommu,zz); - //mommu=where(coor==0,mommu,zz); - // mommu=where(coor==1,mommu,zz); - } else { - mommu=Zero(); + SU::GaussianFundamentalLieAlgebraMatrix(RNG4, mommu); + if(0){ + if(mu==nu){ + mommu=where(coor==Lnu-1,mommu,zz); + } else { + mommu=Zero(); + } } PokeIndex(mom,mommu,mu); @@ -143,6 +145,10 @@ int main (int argc, char ** argv) mommu=Ta(mommu)*2.0; PokeIndex(UdSdU,mommu,mu); } + LatticeComplex lip(UGrid); lip=localInnerProduct(Mphi,Mphi); + LatticeComplex lipp(UGrid); lipp=localInnerProduct(MphiPrime,MphiPrime); + LatticeComplex dip(UGrid); dip = lipp - lip; + std::cout << " dip "<