mirror of
https://github.com/paboyle/Grid.git
synced 2026-07-24 12:33:28 +01:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6e40e22004 |
@@ -27,8 +27,6 @@ Author: Peter Boyle <paboyle@ph.ed.ac.uk>
|
|||||||
/* END LEGAL */
|
/* END LEGAL */
|
||||||
#include <Grid/GridCore.h>
|
#include <Grid/GridCore.h>
|
||||||
|
|
||||||
void GridAbort(void) { abort(); }
|
|
||||||
|
|
||||||
NAMESPACE_BEGIN(Grid);
|
NAMESPACE_BEGIN(Grid);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -36,6 +34,7 @@ NAMESPACE_BEGIN(Grid);
|
|||||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
Grid_MPI_Comm CartesianCommunicator::communicator_world;
|
Grid_MPI_Comm CartesianCommunicator::communicator_world;
|
||||||
|
|
||||||
|
void GridAbort(void) { abort(); }
|
||||||
|
|
||||||
void CartesianCommunicator::Init(int *argc, char *** arv)
|
void CartesianCommunicator::Init(int *argc, char *** arv)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ template<class vobj> void Cshift_simple(Lattice<vobj>& ret,const Lattice<vobj> &
|
|||||||
void *hsend_buf = (void *)&hrhs[0];
|
void *hsend_buf = (void *)&hrhs[0];
|
||||||
void *hrecv_buf = (void *)&hret[0];
|
void *hrecv_buf = (void *)&hret[0];
|
||||||
|
|
||||||
acceleratorCopyFromDevice(send_buf,hsend_buf,bytes);
|
acceleratorCopyFromDevice(&send_buf[0],&hsend_buf[0],bytes);
|
||||||
|
|
||||||
grid->SendToRecvFrom(hsend_buf,
|
grid->SendToRecvFrom(hsend_buf,
|
||||||
xmit_to_rank,
|
xmit_to_rank,
|
||||||
@@ -132,7 +132,7 @@ template<class vobj> void Cshift_simple(Lattice<vobj>& ret,const Lattice<vobj> &
|
|||||||
recv_from_rank,
|
recv_from_rank,
|
||||||
bytes);
|
bytes);
|
||||||
|
|
||||||
acceleratorCopyToDevice(hrecv_buf,recv_buf,bytes);
|
acceleratorCopyToDevice(&hrecv_buf[0],&recv_buf[0],bytes);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -411,7 +411,7 @@ void WilsonKernels<Impl>::DhopDirKernel( StencilImpl &st, DoubledGaugeField &U,S
|
|||||||
#undef LoopBody
|
#undef LoopBody
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#ifdef GRID_SYCL
|
||||||
extern "C" {
|
extern "C" {
|
||||||
ulong SYCL_EXTERNAL __attribute__((overloadable)) intel_get_cycle_counter( void );
|
ulong SYCL_EXTERNAL __attribute__((overloadable)) intel_get_cycle_counter( void );
|
||||||
uint SYCL_EXTERNAL __attribute__((overloadable)) intel_get_active_channel_mask( void );
|
uint SYCL_EXTERNAL __attribute__((overloadable)) intel_get_active_channel_mask( void );
|
||||||
|
|||||||
@@ -291,8 +291,8 @@ public:
|
|||||||
int idx=0;
|
int idx=0;
|
||||||
for(int mu=0;mu<4;mu++){
|
for(int mu=0;mu<4;mu++){
|
||||||
for(int nu=0;nu<4;nu++){
|
for(int nu=0;nu<4;nu++){
|
||||||
if ( mu!=nu) assert(this->StoutSmearing->SmearRho[idx]==rho);
|
if ( mu!=nu) GRID_ASSERT(this->StoutSmearing->SmearRho[idx]==rho);
|
||||||
else assert(this->StoutSmearing->SmearRho[idx]==0.0);
|
else GRID_ASSERT(this->StoutSmearing->SmearRho[idx]==0.0);
|
||||||
idx++;
|
idx++;
|
||||||
}}
|
}}
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
@@ -825,7 +825,6 @@ public:
|
|||||||
virtual void fill_smearedSet(GaugeField &U)
|
virtual void fill_smearedSet(GaugeField &U)
|
||||||
{
|
{
|
||||||
this->ThinLinks = &U; // attach the smearing routine to the field U
|
this->ThinLinks = &U; // attach the smearing routine to the field U
|
||||||
std::cout << GridLogMessage << " fill_smearedSet " << WilsonLoops<PeriodicGimplR>::avgPlaquette(U) << std::endl;
|
|
||||||
|
|
||||||
// check the pointer is not null
|
// check the pointer is not null
|
||||||
if (this->ThinLinks == NULL)
|
if (this->ThinLinks == NULL)
|
||||||
@@ -847,8 +846,6 @@ public:
|
|||||||
ApplyMask(smeared_A,smearLvl);
|
ApplyMask(smeared_A,smearLvl);
|
||||||
smeared_B = previous_u;
|
smeared_B = previous_u;
|
||||||
ApplyMask(smeared_B,smearLvl);
|
ApplyMask(smeared_B,smearLvl);
|
||||||
std::cout << GridLogMessage << " smeared_A " << norm2(smeared_A) << std::endl;
|
|
||||||
std::cout << GridLogMessage << " smeared_B " << norm2(smeared_B) << std::endl;
|
|
||||||
// Replace only the masked portion
|
// Replace only the masked portion
|
||||||
this->SmearedSet[smearLvl] = previous_u-smeared_B + smeared_A;
|
this->SmearedSet[smearLvl] = previous_u-smeared_B + smeared_A;
|
||||||
previous_u = this->SmearedSet[smearLvl];
|
previous_u = this->SmearedSet[smearLvl];
|
||||||
@@ -937,10 +934,10 @@ public:
|
|||||||
SmearedConfigurationMasked(GridCartesian* _UGrid, unsigned int Nsmear, Smear_Stout<Gimpl>& Stout)
|
SmearedConfigurationMasked(GridCartesian* _UGrid, unsigned int Nsmear, Smear_Stout<Gimpl>& Stout)
|
||||||
: SmearedConfiguration<Gimpl>(_UGrid, Nsmear,Stout)
|
: SmearedConfiguration<Gimpl>(_UGrid, Nsmear,Stout)
|
||||||
{
|
{
|
||||||
assert(Nsmear%(2*Nd)==0); // Or multiply by 8??
|
GRID_ASSERT(Nsmear%(2*Nd)==0); // Or multiply by 8??
|
||||||
|
|
||||||
// was resized in base class
|
// was resized in base class
|
||||||
assert(this->SmearedSet.size()==Nsmear);
|
GRID_ASSERT(this->SmearedSet.size()==Nsmear);
|
||||||
|
|
||||||
GridRedBlackCartesian * UrbGrid;
|
GridRedBlackCartesian * UrbGrid;
|
||||||
UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(_UGrid);
|
UrbGrid = SpaceTimeGrid::makeFourDimRedBlackGrid(_UGrid);
|
||||||
|
|||||||
@@ -751,7 +751,7 @@ public:
|
|||||||
obj.xbytes = xbytes;
|
obj.xbytes = xbytes;
|
||||||
obj.rbytes = rbytes;
|
obj.rbytes = rbytes;
|
||||||
obj.cb = cb;
|
obj.cb = cb;
|
||||||
|
|
||||||
for(int i=0;i<CachedTransfers.size();i++){
|
for(int i=0;i<CachedTransfers.size();i++){
|
||||||
if ( (CachedTransfers[i].direction ==direction)
|
if ( (CachedTransfers[i].direction ==direction)
|
||||||
&&(CachedTransfers[i].OrthogPlane==OrthogPlane)
|
&&(CachedTransfers[i].OrthogPlane==OrthogPlane)
|
||||||
@@ -763,13 +763,11 @@ public:
|
|||||||
){
|
){
|
||||||
// FIXME worry about duplicate with partial compression
|
// FIXME worry about duplicate with partial compression
|
||||||
// Wont happen as DWF has no duplicates, but...
|
// Wont happen as DWF has no duplicates, but...
|
||||||
// AddCopy(CachedTransfers[i].recv_buf,recv_buf,rbytes);
|
AddCopy(CachedTransfers[i].recv_buf,recv_buf,rbytes);
|
||||||
// std::cout << "Duplicate dir " <<direction<<" "<<" OrthogPlane "<<OrthogPlane<<" Dest"<<DestProc <<" xbytes " <<xbytes<<" lane "<< lane<<" cb "<<cb<<std::endl;
|
return 1;
|
||||||
return 0;
|
|
||||||
|
|
||||||
// return 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CachedTransfers.push_back(obj);
|
CachedTransfers.push_back(obj);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -755,7 +755,7 @@ void Grid_generic_handler(int sig,siginfo_t *si,void * ptr)
|
|||||||
sig_print_uint(si->si_code);
|
sig_print_uint(si->si_code);
|
||||||
SIGLOG("\n");
|
SIGLOG("\n");
|
||||||
|
|
||||||
ucontext_t *uc= (ucontext_t *)ptr;
|
unw_context_t *uc= (unw_context_t *)ptr;
|
||||||
|
|
||||||
SIGLOG("Backtrace:\n");
|
SIGLOG("Backtrace:\n");
|
||||||
#ifdef HAVE_UNWIND
|
#ifdef HAVE_UNWIND
|
||||||
|
|||||||
+10
-4
@@ -409,10 +409,16 @@ AC_SEARCH_LIBS([unw_backtrace], [unwind],
|
|||||||
[have_unwind=true],
|
[have_unwind=true],
|
||||||
[AC_MSG_WARN(libunwind library was not found in your system.)])
|
[AC_MSG_WARN(libunwind library was not found in your system.)])
|
||||||
|
|
||||||
AC_SEARCH_LIBS([_Ux86_64_step], [unwind-x86_64],
|
AS_CASE([$host_cpu], [x86_64],
|
||||||
[AC_DEFINE([HAVE_UNWIND_X86_64], [1], [Define to 1 if you have the `libunwind-x86_64' library])]
|
[AC_SEARCH_LIBS([_Ux86_64_step], [unwind-x86_64],
|
||||||
[have_unwind_x86_64=true],
|
[AC_DEFINE([HAVE_UNWIND_X86_64], [1], [Define to 1 if you have the `libunwind-x86_64' library])]
|
||||||
[AC_MSG_WARN(libunwind library was not found in your system.)])
|
[have_unwind_x86_64=true],
|
||||||
|
[AC_MSG_WARN(libunwind library was not found in your system.)])],
|
||||||
|
[aarch64],
|
||||||
|
[AC_SEARCH_LIBS([_Uaarch64_step], [unwind-aarch64],
|
||||||
|
[AC_DEFINE([HAVE_UNWIND_AARCH64], [1], [Define to 1 if you have the `libunwind-aarch64' library])]
|
||||||
|
[have_unwind_aarch64=true],
|
||||||
|
[AC_MSG_WARN(libunwind library was not found in your system.)])])
|
||||||
|
|
||||||
AC_SEARCH_LIBS([SHA256_Init], [crypto],
|
AC_SEARCH_LIBS([SHA256_Init], [crypto],
|
||||||
[AC_DEFINE([HAVE_CRYPTO], [1], [Define to 1 if you have the `OpenSSL' library])]
|
[AC_DEFINE([HAVE_CRYPTO], [1], [Define to 1 if you have the `OpenSSL' library])]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export HDF5=/opt/cray/pe/hdf5/1.12.2.3/gnu/9.1
|
|||||||
--disable-gparity \
|
--disable-gparity \
|
||||||
--disable-fermion-reps \
|
--disable-fermion-reps \
|
||||||
--enable-shm=nvlink \
|
--enable-shm=nvlink \
|
||||||
--enable-checksum-comms=no \
|
--enable-checksum-comms=yes \
|
||||||
--enable-log-views=yes \
|
--enable-log-views=yes \
|
||||||
--enable-accelerator=sycl \
|
--enable-accelerator=sycl \
|
||||||
--enable-accelerator-aware-mpi=no \
|
--enable-accelerator-aware-mpi=no \
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ void ForceTest(Action<LatticeGaugeField> &action,ConfigurationBase<LatticeGaugeF
|
|||||||
|
|
||||||
Gimpl::generate_momenta(P,sRNG,RNG4);
|
Gimpl::generate_momenta(P,sRNG,RNG4);
|
||||||
// Filter.applyFilter(P);
|
// Filter.applyFilter(P);
|
||||||
std::cout << GridLogMessage << "Initial momenta " << norm2(P) << std::endl;
|
|
||||||
|
|
||||||
action.refresh(smU,sRNG,RNG4);
|
action.refresh(smU,sRNG,RNG4);
|
||||||
|
|
||||||
@@ -71,8 +70,6 @@ void ForceTest(Action<LatticeGaugeField> &action,ConfigurationBase<LatticeGaugeF
|
|||||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||||
|
|
||||||
RealD S1 = action.S(smU);
|
RealD S1 = action.S(smU);
|
||||||
std::cout << GridLogMessage << "Initial action " << S1 << std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
Gimpl::update_field(P,U,eps);
|
Gimpl::update_field(P,U,eps);
|
||||||
smU.set_Field(U);
|
smU.set_Field(U);
|
||||||
@@ -83,7 +80,6 @@ void ForceTest(Action<LatticeGaugeField> &action,ConfigurationBase<LatticeGaugeF
|
|||||||
action.deriv(smU,UdSdU);
|
action.deriv(smU,UdSdU);
|
||||||
UdSdU = Ta(UdSdU);
|
UdSdU = Ta(UdSdU);
|
||||||
// Filter.applyFilter(UdSdU);
|
// Filter.applyFilter(UdSdU);
|
||||||
std::cout << GridLogMessage << "Derivative " << norm2(UdSdU) << std::endl;
|
|
||||||
|
|
||||||
DumpSliceNorm("Force",UdSdU,Nd-1);
|
DumpSliceNorm("Force",UdSdU,Nd-1);
|
||||||
|
|
||||||
@@ -95,7 +91,6 @@ void ForceTest(Action<LatticeGaugeField> &action,ConfigurationBase<LatticeGaugeF
|
|||||||
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
std::cout << GridLogMessage << "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++"<<std::endl;
|
||||||
|
|
||||||
RealD S2 = action.S(smU);
|
RealD S2 = action.S(smU);
|
||||||
std::cout << GridLogMessage << "Final action " << S1 << std::endl;
|
|
||||||
|
|
||||||
// Use the derivative
|
// Use the derivative
|
||||||
LatticeComplex dS(UGrid); dS = Zero();
|
LatticeComplex dS(UGrid); dS = Zero();
|
||||||
@@ -150,8 +145,6 @@ int main (int argc, char ** argv)
|
|||||||
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds);
|
GridParallelRNG RNG4(UGrid); RNG4.SeedFixedIntegers(seeds);
|
||||||
SU<Nc>::HotConfiguration(RNG4,U);
|
SU<Nc>::HotConfiguration(RNG4,U);
|
||||||
#endif
|
#endif
|
||||||
std::cout << GridLogMessage << "Initial plaquette: " << WilsonLoops<PeriodicGimplR>::avgPlaquette(U) << std::endl;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
WilsonGaugeActionR PlaqAction(6.0);
|
WilsonGaugeActionR PlaqAction(6.0);
|
||||||
|
|||||||
Reference in New Issue
Block a user