mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-15 06:17:05 +01:00
Merge branch 'develop' into hisq_fat_links
This commit is contained in:
@ -152,6 +152,7 @@ public:
|
||||
#ifdef RNG_FAST_DISCARD
|
||||
static void Skip(RngEngine &eng,uint64_t site)
|
||||
{
|
||||
#if 0
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// Skip by 2^40 elements between successive lattice sites
|
||||
// This goes by 10^12.
|
||||
@ -162,9 +163,9 @@ public:
|
||||
// tens of seconds per trajectory so this is clean in all reasonable cases,
|
||||
// and margin of safety is orders of magnitude.
|
||||
// We could hack Sitmo to skip in the higher order words of state if necessary
|
||||
//
|
||||
// Replace with 2^30 ; avoid problem on large volumes
|
||||
//
|
||||
//
|
||||
// Replace with 2^30 ; avoid problem on large volumes
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////////
|
||||
// uint64_t skip = site+1; // Old init Skipped then drew. Checked compat with faster init
|
||||
const int shift = 30;
|
||||
@ -179,6 +180,9 @@ public:
|
||||
assert((skip >> shift)==site); // check for overflow
|
||||
|
||||
eng.discard(skip);
|
||||
#else
|
||||
eng.discardhi(site);
|
||||
#endif
|
||||
// std::cout << " Engine " <<site << " state " <<eng<<std::endl;
|
||||
}
|
||||
#endif
|
||||
|
@ -69,7 +69,7 @@ public:
|
||||
/*! Construct stout smearing object from explicitly specified rho matrix */
|
||||
Smear_Stout(const std::vector<double>& rho_)
|
||||
: OwnedBase{new Smear_APE<Gimpl>(rho_)}, SmearBase{OwnedBase.get()} {
|
||||
std::cout << GridLogDebug << "Stout smearing constructor : Smear_Stout(const std::vector<double>& " << rho_ << " )" << std::endl
|
||||
std::cout << GridLogDebug << "Stout smearing constructor : Smear_Stout(const std::vector<double>& " << rho_ << " )" << std::endl;
|
||||
assert(Nc == 3 && "Stout smearing currently implemented only for Nc==3");
|
||||
}
|
||||
|
||||
|
@ -218,6 +218,10 @@ public:
|
||||
// -------------------------------------------------
|
||||
// misc
|
||||
// -------------------------------------------------
|
||||
void discardhi(uint64_t z) {
|
||||
_s[3] += z;
|
||||
encrypt_counter();
|
||||
}
|
||||
|
||||
// req: 26.5.1.4 Random number engine requirements, p.908 table 117, row 9
|
||||
// Advances e’s state ei to ei+z by any means equivalent to z
|
||||
@ -387,4 +391,4 @@ private:
|
||||
#undef MIXK
|
||||
#undef MIX2
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
@ -7,6 +7,8 @@ uint32_t accelerator_threads=2;
|
||||
uint32_t acceleratorThreads(void) {return accelerator_threads;};
|
||||
void acceleratorThreads(uint32_t t) {accelerator_threads = t;};
|
||||
|
||||
#define ENV_LOCAL_RANK_PALS "PALS_LOCAL_RANKID"
|
||||
#define ENV_RANK_PALS "PALS_RANKID"
|
||||
#define ENV_LOCAL_RANK_OMPI "OMPI_COMM_WORLD_LOCAL_RANK"
|
||||
#define ENV_RANK_OMPI "OMPI_COMM_WORLD_RANK"
|
||||
#define ENV_LOCAL_RANK_SLURM "SLURM_LOCALID"
|
||||
@ -228,8 +230,17 @@ void acceleratorInit(void)
|
||||
{
|
||||
rank = atoi(localRankStr);
|
||||
}
|
||||
if ((localRankStr = getenv(ENV_LOCAL_RANK_PALS)) != NULL)
|
||||
{
|
||||
rank = atoi(localRankStr);
|
||||
}
|
||||
if ((localRankStr = getenv(ENV_RANK_OMPI )) != NULL) { world_rank = atoi(localRankStr);}
|
||||
if ((localRankStr = getenv(ENV_RANK_MVAPICH)) != NULL) { world_rank = atoi(localRankStr);}
|
||||
if ((localRankStr = getenv(ENV_RANK_PALS )) != NULL) { world_rank = atoi(localRankStr);}
|
||||
|
||||
char hostname[HOST_NAME_MAX+1];
|
||||
gethostname(hostname, HOST_NAME_MAX+1);
|
||||
if ( rank==0 ) printf(" acceleratorInit world_rank %d is host %s \n",world_rank,hostname);
|
||||
|
||||
auto devices = cl::sycl::device::get_devices();
|
||||
for(int d = 0;d<devices.size();d++){
|
||||
@ -241,9 +252,10 @@ void acceleratorInit(void)
|
||||
printf("AcceleratorSyclInit: " #prop ": " FMT" \n",devices[d].get_info<cl::sycl::info::device::prop>());
|
||||
|
||||
#define GPU_PROP(prop) GPU_PROP_FMT(prop,"%ld");
|
||||
if ( world_rank == 0) {
|
||||
|
||||
GPU_PROP_STR(vendor);
|
||||
GPU_PROP_STR(version);
|
||||
GPU_PROP_STR(vendor);
|
||||
GPU_PROP_STR(version);
|
||||
// GPU_PROP_STR(device_type);
|
||||
/*
|
||||
GPU_PROP(max_compute_units);
|
||||
@ -259,7 +271,8 @@ void acceleratorInit(void)
|
||||
GPU_PROP(single_fp_config);
|
||||
*/
|
||||
// GPU_PROP(double_fp_config);
|
||||
GPU_PROP(global_mem_size);
|
||||
GPU_PROP(global_mem_size);
|
||||
}
|
||||
|
||||
}
|
||||
if ( world_rank == 0 ) {
|
||||
|
Reference in New Issue
Block a user