mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-22 09:42:02 +01:00
Merge GPU support (upstream/develop) into distillation branch.
This compiles and looks right ... but may need some testing * develop: (762 commits) Tensor ambiguous fix Fix for GCC preprocessor/pragma handling bug Trips up NVCC for reasons I dont understand on summit Fix GCC complaint Zero() change Force a couple of things to compile on NVCC Remove debug code nvcc error suppress Merge develop Reduction finished and hopefully fixes CI regression fail on single precisoin and force Double precision variants for summation accuracy Update todo list Freeze the seed Fix compiling of MSource::Gauss for single precision Think the reduction is now sorted and cleaned up Fix force term Printing improvement GPU reduction fix and also exit backtrace option GPU friendly Simplify the comms benchmark ... # Conflicts: # Grid/communicator/SharedMemoryMPI.cc # Grid/qcd/action/fermion/WilsonKernelsAsm.cc # Grid/qcd/action/fermion/implementation/StaggeredKernelsAsm.h # Grid/qcd/smearing/StoutSmearing.h # Hadrons/Modules.hpp # Hadrons/Utilities/Contractor.cc # Hadrons/modules.inc # tests/forces/Test_dwf_force_eofa.cc # tests/forces/Test_dwf_gpforce_eofa.cc
This commit is contained in:
@ -31,11 +31,9 @@
|
||||
@file StoutSmearing.h
|
||||
@brief Declares Stout smearing class
|
||||
*/
|
||||
#ifndef STOUT_SMEAR_
|
||||
#define STOUT_SMEAR_
|
||||
#pragma once
|
||||
|
||||
namespace Grid {
|
||||
namespace QCD {
|
||||
NAMESPACE_BEGIN(Grid);
|
||||
|
||||
/*! @brief Stout smearing of link variable. */
|
||||
template <class Gimpl>
|
||||
@ -90,8 +88,8 @@ public:
|
||||
~Smear_Stout() {} // delete SmearBase...
|
||||
|
||||
void smear(GaugeField& u_smr, const GaugeField& U) const {
|
||||
GaugeField C(U._grid);
|
||||
GaugeLinkField tmp(U._grid), iq_mu(U._grid), Umu(U._grid);
|
||||
GaugeField C(U.Grid());
|
||||
GaugeLinkField tmp(U.Grid()), iq_mu(U.Grid()), Umu(U.Grid());
|
||||
|
||||
std::cout << GridLogDebug << "Stout smearing started" << std::endl;
|
||||
|
||||
@ -136,7 +134,7 @@ public:
|
||||
// the i sign is coming from outside
|
||||
// input matrix is anti-hermitian NOT hermitian
|
||||
|
||||
GridBase* grid = iQ._grid;
|
||||
GridBase* grid = iQ.Grid();
|
||||
GaugeLinkField unity(grid);
|
||||
unity = 1.0;
|
||||
|
||||
@ -159,7 +157,7 @@ public:
|
||||
Complex one_over_three = 1.0 / 3.0;
|
||||
Complex one_over_two = 1.0 / 2.0;
|
||||
|
||||
GridBase* grid = u._grid;
|
||||
GridBase* grid = u.Grid();
|
||||
LatticeComplex c0(grid), c1(grid), tmp(grid), c0max(grid), theta(grid);
|
||||
|
||||
// sign in c0 from the conventions on the Ta
|
||||
@ -178,7 +176,7 @@ public:
|
||||
|
||||
void set_fj(LatticeComplex& f0, LatticeComplex& f1, LatticeComplex& f2,
|
||||
const LatticeComplex& u, const LatticeComplex& w) const {
|
||||
GridBase* grid = u._grid;
|
||||
GridBase* grid = u.Grid();
|
||||
LatticeComplex xi0(grid), u2(grid), w2(grid), cosw(grid);
|
||||
LatticeComplex fden(grid);
|
||||
LatticeComplex h0(grid), h1(grid), h2(grid);
|
||||
@ -219,7 +217,5 @@ public:
|
||||
return cos(w) / (w * w) - sin(w) / (w * w * w);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
NAMESPACE_END(Grid);
|
||||
|
Reference in New Issue
Block a user