mirror of
				https://github.com/paboyle/Grid.git
				synced 2025-11-04 14:04:32 +00:00 
			
		
		
		
	Preparing for close of feature/dirichlet
Initial code change review complete
This commit is contained in:
		@@ -463,11 +463,7 @@ void WilsonKernels<Impl>::DhopKernel(int Opt,StencilImpl &st,  DoubledGaugeField
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
   if( interior && exterior ) {
 | 
					   if( interior && exterior ) {
 | 
				
			||||||
     if (Opt == WilsonKernelsStatic::OptGeneric    ) { KERNEL_CALL(GenericDhopSite); return;}
 | 
					     if (Opt == WilsonKernelsStatic::OptGeneric    ) { KERNEL_CALL(GenericDhopSite); return;}
 | 
				
			||||||
#ifdef SYCL_HACK     
 | 
					 | 
				
			||||||
     if (Opt == WilsonKernelsStatic::OptHandUnroll ) { KERNEL_CALL(HandDhopSiteSycl);    return; }
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
     if (Opt == WilsonKernelsStatic::OptHandUnroll ) { KERNEL_CALL(HandDhopSite);    return;}
 | 
					     if (Opt == WilsonKernelsStatic::OptHandUnroll ) { KERNEL_CALL(HandDhopSite);    return;}
 | 
				
			||||||
#endif     
 | 
					 | 
				
			||||||
#ifndef GRID_CUDA
 | 
					#ifndef GRID_CUDA
 | 
				
			||||||
     if (Opt == WilsonKernelsStatic::OptInlineAsm  ) {  ASM_CALL(AsmDhopSite);    return;}
 | 
					     if (Opt == WilsonKernelsStatic::OptInlineAsm  ) {  ASM_CALL(AsmDhopSite);    return;}
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../CayleyFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../ContinuedFractionFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../DomainWallEOFAFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../MobiusEOFAFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../PartialFractionFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonCloverFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonKernelsInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonTMFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
#define IMPLEMENTATION WilsonImplD2
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../CayleyFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../ContinuedFractionFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../DomainWallEOFAFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../MobiusEOFAFermionInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../PartialFractionFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonFermion5DInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
../WilsonKernelsInstantiation.cc.master
 | 
					 | 
				
			||||||
@@ -1 +0,0 @@
 | 
				
			|||||||
#define IMPLEMENTATION ZWilsonImplD2
 | 
					 | 
				
			||||||
@@ -112,40 +112,27 @@ NAMESPACE_BEGIN(Grid);
 | 
				
			|||||||
        // NumOp == V
 | 
					        // NumOp == V
 | 
				
			||||||
        // DenOp == M
 | 
					        // DenOp == M
 | 
				
			||||||
        //
 | 
					        //
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        FermionField etaOdd (NumOp.FermionRedBlackGrid());
 | 
					        FermionField etaOdd (NumOp.FermionRedBlackGrid());
 | 
				
			||||||
        FermionField etaEven(NumOp.FermionRedBlackGrid());
 | 
					        FermionField etaEven(NumOp.FermionRedBlackGrid());
 | 
				
			||||||
        FermionField tmp    (NumOp.FermionRedBlackGrid());
 | 
					        FermionField tmp    (NumOp.FermionRedBlackGrid());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        pickCheckerboard(Even,etaEven,eta);
 | 
					        pickCheckerboard(Even,etaEven,eta);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        pickCheckerboard(Odd,etaOdd,eta);
 | 
					        pickCheckerboard(Odd,etaOdd,eta);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        NumOp.ImportGauge(U);
 | 
					        NumOp.ImportGauge(U);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        DenOp.ImportGauge(U);
 | 
					        DenOp.ImportGauge(U);
 | 
				
			||||||
	std::cout << " TwoFlavourRefresh:  Imported gauge "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh:  Imported gauge "<<std::endl;
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
        SchurDifferentiableOperator<Impl> Mpc(DenOp);
 | 
					        SchurDifferentiableOperator<Impl> Mpc(DenOp);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        SchurDifferentiableOperator<Impl> Vpc(NumOp);
 | 
					        SchurDifferentiableOperator<Impl> Vpc(NumOp);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	std::cout << " TwoFlavourRefresh: Diff ops "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh: Diff ops "<<std::endl;
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        // Odd det factors
 | 
					        // Odd det factors
 | 
				
			||||||
        Mpc.MpcDag(etaOdd,PhiOdd);
 | 
					        Mpc.MpcDag(etaOdd,PhiOdd);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
	std::cout << " TwoFlavourRefresh: MpcDag "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh: MpcDag "<<std::endl;
 | 
				
			||||||
        tmp=Zero();
 | 
					        tmp=Zero();
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
	std::cout << " TwoFlavourRefresh: Zero() guess "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh: Zero() guess "<<std::endl;
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
        HeatbathSolver(Vpc,PhiOdd,tmp);
 | 
					        HeatbathSolver(Vpc,PhiOdd,tmp);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
	std::cout << " TwoFlavourRefresh: Heatbath solver "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh: Heatbath solver "<<std::endl;
 | 
				
			||||||
        Vpc.Mpc(tmp,PhiOdd);            
 | 
					        Vpc.Mpc(tmp,PhiOdd);            
 | 
				
			||||||
	std::cout << " TwoFlavourRefresh: Mpc "<<std::endl;
 | 
						std::cout << " TwoFlavourRefresh: Mpc "<<std::endl;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -134,14 +134,12 @@ protected:
 | 
				
			|||||||
      double start_force = usecond();
 | 
					      double start_force = usecond();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      std::cout << GridLogMessage << "AuditForce["<<level<<"]["<<a<<"] before"<<std::endl;
 | 
					      std::cout << GridLogMessage << "AuditForce["<<level<<"]["<<a<<"] before"<<std::endl;
 | 
				
			||||||
      AUDIT();
 | 
					 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      as[level].actions.at(a)->deriv_timer_start();
 | 
					      as[level].actions.at(a)->deriv_timer_start();
 | 
				
			||||||
      as[level].actions.at(a)->deriv(Us, force);  // deriv should NOT include Ta
 | 
					      as[level].actions.at(a)->deriv(Us, force);  // deriv should NOT include Ta
 | 
				
			||||||
      as[level].actions.at(a)->deriv_timer_stop();
 | 
					      as[level].actions.at(a)->deriv_timer_stop();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      std::cout << GridLogMessage << "AuditForce["<<level<<"]["<<a<<"] after"<<std::endl;
 | 
					      std::cout << GridLogMessage << "AuditForce["<<level<<"]["<<a<<"] after"<<std::endl;
 | 
				
			||||||
      AUDIT();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
      std::cout << GridLogIntegrator << "Smearing (on/off): " << as[level].actions.at(a)->is_smeared << std::endl;
 | 
					      std::cout << GridLogIntegrator << "Smearing (on/off): " << as[level].actions.at(a)->is_smeared << std::endl;
 | 
				
			||||||
      auto name = as[level].actions.at(a)->action_name();
 | 
					      auto name = as[level].actions.at(a)->action_name();
 | 
				
			||||||
@@ -382,12 +380,12 @@ public:
 | 
				
			|||||||
        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
					        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	std::cout << GridLogMessage << "AuditRefresh["<<level<<"]["<<actionID<<"] before"<<std::endl;
 | 
						std::cout << GridLogMessage << "AuditRefresh["<<level<<"]["<<actionID<<"] before"<<std::endl;
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
	as[level].actions.at(actionID)->refresh_timer_start();
 | 
						as[level].actions.at(actionID)->refresh_timer_start();
 | 
				
			||||||
        as[level].actions.at(actionID)->refresh(Us, sRNG, pRNG);
 | 
					        as[level].actions.at(actionID)->refresh(Us, sRNG, pRNG);
 | 
				
			||||||
	as[level].actions.at(actionID)->refresh_timer_stop();
 | 
						as[level].actions.at(actionID)->refresh_timer_stop();
 | 
				
			||||||
	std::cout << GridLogMessage << "AuditRefresh["<<level<<"]["<<actionID<<"] after"<<std::endl;
 | 
						std::cout << GridLogMessage << "AuditRefresh["<<level<<"]["<<actionID<<"] after"<<std::endl;
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // Refresh the higher representation actions
 | 
					      // Refresh the higher representation actions
 | 
				
			||||||
@@ -424,7 +422,7 @@ public:
 | 
				
			|||||||
    // Actions
 | 
					    // Actions
 | 
				
			||||||
    for (int level = 0; level < as.size(); ++level) {
 | 
					    for (int level = 0; level < as.size(); ++level) {
 | 
				
			||||||
      for (int actionID = 0; actionID < as[level].actions.size(); ++actionID) {
 | 
					      for (int actionID = 0; actionID < as[level].actions.size(); ++actionID) {
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
        // get gauge field from the SmearingPolicy and
 | 
					        // get gauge field from the SmearingPolicy and
 | 
				
			||||||
        // based on the boolean is_smeared in actionID
 | 
					        // based on the boolean is_smeared in actionID
 | 
				
			||||||
        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
					        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
				
			||||||
@@ -434,7 +432,7 @@ public:
 | 
				
			|||||||
   	        as[level].actions.at(actionID)->S_timer_stop();
 | 
					   	        as[level].actions.at(actionID)->S_timer_stop();
 | 
				
			||||||
        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl;
 | 
					        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl;
 | 
				
			||||||
        H += Hterm;
 | 
					        H += Hterm;
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      as[level].apply(S_hireps, Representations, level, H);
 | 
					      as[level].apply(S_hireps, Representations, level, H);
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
@@ -447,9 +445,9 @@ public:
 | 
				
			|||||||
    void operator()(std::vector<Action<FieldType>*> repr_set, Repr& Rep, int level, RealD& H) {
 | 
					    void operator()(std::vector<Action<FieldType>*> repr_set, Repr& Rep, int level, RealD& H) {
 | 
				
			||||||
      
 | 
					      
 | 
				
			||||||
      for (int a = 0; a < repr_set.size(); ++a) {
 | 
					      for (int a = 0; a < repr_set.size(); ++a) {
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
        RealD Hterm = repr_set.at(a)->Sinitial(Rep.U);
 | 
					        RealD Hterm = repr_set.at(a)->Sinitial(Rep.U);
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
        std::cout << GridLogMessage << "Sinitial Level " << level << " term " << a << " H Hirep = " << Hterm << std::endl;
 | 
					        std::cout << GridLogMessage << "Sinitial Level " << level << " term " << a << " H Hirep = " << Hterm << std::endl;
 | 
				
			||||||
        H += Hterm;
 | 
					        H += Hterm;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -474,10 +472,10 @@ public:
 | 
				
			|||||||
        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
					        Field& Us = Smearer.get_U(as[level].actions.at(actionID)->is_smeared);
 | 
				
			||||||
        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] action eval " << std::endl;
 | 
					        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] action eval " << std::endl;
 | 
				
			||||||
	        as[level].actions.at(actionID)->S_timer_start();
 | 
						        as[level].actions.at(actionID)->S_timer_start();
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
        Hterm = as[level].actions.at(actionID)->Sinitial(Us);
 | 
					        Hterm = as[level].actions.at(actionID)->Sinitial(Us);
 | 
				
			||||||
   	        as[level].actions.at(actionID)->S_timer_stop();
 | 
					   	        as[level].actions.at(actionID)->S_timer_stop();
 | 
				
			||||||
	AUDIT();
 | 
					
 | 
				
			||||||
        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl;
 | 
					        std::cout << GridLogMessage << "S [" << level << "][" << actionID << "] H = " << Hterm << std::endl;
 | 
				
			||||||
        H += Hterm;
 | 
					        H += Hterm;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@@ -490,7 +488,6 @@ public:
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  void integrate(Field& U) 
 | 
					  void integrate(Field& U) 
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
    // reset the clocks
 | 
					    // reset the clocks
 | 
				
			||||||
    t_U = 0;
 | 
					    t_U = 0;
 | 
				
			||||||
    for (int level = 0; level < as.size(); ++level) {
 | 
					    for (int level = 0; level < as.size(); ++level) {
 | 
				
			||||||
@@ -508,10 +505,8 @@ public:
 | 
				
			|||||||
      assert(fabs(t_U - t_P[level]) < 1.0e-6);  // must be the same
 | 
					      assert(fabs(t_U - t_P[level]) < 1.0e-6);  // must be the same
 | 
				
			||||||
      std::cout << GridLogIntegrator << " times[" << level << "]= " << t_P[level] << " " << t_U << std::endl;
 | 
					      std::cout << GridLogIntegrator << " times[" << level << "]= " << t_P[level] << " " << t_U << std::endl;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    FieldImplementation::Project(U);
 | 
					    FieldImplementation::Project(U);
 | 
				
			||||||
    AUDIT();
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // and that we indeed got to the end of the trajectory
 | 
					    // and that we indeed got to the end of the trajectory
 | 
				
			||||||
    assert(fabs(t_U - Params.trajL) < 1.0e-6);
 | 
					    assert(fabs(t_U - Params.trajL) < 1.0e-6);
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user