mirror of
https://github.com/paboyle/Grid.git
synced 2024-11-09 23:45:36 +00:00
Compare commits
4 Commits
fb9b1d76ca
...
d299c86633
Author | SHA1 | Date | |
---|---|---|---|
|
d299c86633 | ||
|
6ce52092e8 | ||
|
b5926c1d21 | ||
|
9563238e9b |
@ -13,6 +13,7 @@ inline typename vobj::scalar_objectD sumD_gpu_tensor(const vobj *lat, Integer os
|
|||||||
mysum.resize(1);
|
mysum.resize(1);
|
||||||
sobj *mysum_p = & mysum[0];
|
sobj *mysum_p = & mysum[0];
|
||||||
sobj identity; zeroit(identity);
|
sobj identity; zeroit(identity);
|
||||||
|
mysum[0] = identity;
|
||||||
sobj ret ;
|
sobj ret ;
|
||||||
|
|
||||||
Integer nsimd= vobj::Nsimd();
|
Integer nsimd= vobj::Nsimd();
|
||||||
@ -80,6 +81,7 @@ template<class Word> Word svm_xor(Word *vec,uint64_t L)
|
|||||||
d_sum.resize(1);
|
d_sum.resize(1);
|
||||||
Word *d_sum_p=&d_sum[0];
|
Word *d_sum_p=&d_sum[0];
|
||||||
Word identity; identity=0;
|
Word identity; identity=0;
|
||||||
|
d_sum[0] = identity;
|
||||||
const cl::sycl::property_list PropList ({ cl::sycl::property::reduction::initialize_to_identity() });
|
const cl::sycl::property_list PropList ({ cl::sycl::property::reduction::initialize_to_identity() });
|
||||||
theGridAccelerator->submit([&](cl::sycl::handler &cgh) {
|
theGridAccelerator->submit([&](cl::sycl::handler &cgh) {
|
||||||
auto Reduction = cl::sycl::reduction(d_sum_p,identity,std::bit_xor<>(),PropList);
|
auto Reduction = cl::sycl::reduction(d_sum_p,identity,std::bit_xor<>(),PropList);
|
||||||
|
@ -99,6 +99,8 @@ using std::log;
|
|||||||
using std::exp;
|
using std::exp;
|
||||||
using std::sin;
|
using std::sin;
|
||||||
using std::cos;
|
using std::cos;
|
||||||
|
using std::asin;
|
||||||
|
using std::acos;
|
||||||
|
|
||||||
|
|
||||||
accelerator_inline RealF conjugate(const RealF & r){ return r; }
|
accelerator_inline RealF conjugate(const RealF & r){ return r; }
|
||||||
|
@ -142,7 +142,9 @@ int main (int argc, char ** argv)
|
|||||||
std:: cout << " CG site flops = "<< CGsiteflops <<std::endl;
|
std:: cout << " CG site flops = "<< CGsiteflops <<std::endl;
|
||||||
int iters;
|
int iters;
|
||||||
|
|
||||||
|
time_t now;
|
||||||
time_t start = time(NULL);
|
time_t start = time(NULL);
|
||||||
|
UGrid->Broadcast(0,(void *)&start,sizeof(start));
|
||||||
|
|
||||||
FlightRecorder::ContinueOnFail = 0;
|
FlightRecorder::ContinueOnFail = 0;
|
||||||
FlightRecorder::PrintEntireLog = 0;
|
FlightRecorder::PrintEntireLog = 0;
|
||||||
@ -176,7 +178,8 @@ int main (int argc, char ** argv)
|
|||||||
|
|
||||||
std::cout << " FlightRecorder is OK! "<<std::endl;
|
std::cout << " FlightRecorder is OK! "<<std::endl;
|
||||||
iter ++;
|
iter ++;
|
||||||
} while (time(NULL) < (start + nsecs/10) );
|
now = time(NULL); UGrid->Broadcast(0,(void *)&now,sizeof(now));
|
||||||
|
} while (now < (start + nsecs/10) );
|
||||||
|
|
||||||
std::cout << GridLogMessage << "::::::::::::: Starting double precision CG" << std::endl;
|
std::cout << GridLogMessage << "::::::::::::: Starting double precision CG" << std::endl;
|
||||||
ConjugateGradient<LatticeFermionD> CG(1.0e-8,10000);
|
ConjugateGradient<LatticeFermionD> CG(1.0e-8,10000);
|
||||||
@ -201,8 +204,9 @@ int main (int argc, char ** argv)
|
|||||||
std::cout << " DoublePrecision error count "<< FlightRecorder::ErrorCount()<<std::endl;
|
std::cout << " DoublePrecision error count "<< FlightRecorder::ErrorCount()<<std::endl;
|
||||||
assert(FlightRecorder::ErrorCount()==0);
|
assert(FlightRecorder::ErrorCount()==0);
|
||||||
std::cout << " FlightRecorder is OK! "<<std::endl;
|
std::cout << " FlightRecorder is OK! "<<std::endl;
|
||||||
|
now = time(NULL); UGrid->Broadcast(0,(void *)&now,sizeof(now));
|
||||||
i++;
|
i++;
|
||||||
} while (time(NULL) < (start + nsecs) );
|
} while (now < (start + nsecs) );
|
||||||
|
|
||||||
LatticeFermionD diff_o(FrbGrid);
|
LatticeFermionD diff_o(FrbGrid);
|
||||||
RealD diff = axpy_norm(diff_o, -1.0, result_o, result_o_2);
|
RealD diff = axpy_norm(diff_o, -1.0, result_o, result_o_2);
|
||||||
|
Loading…
Reference in New Issue
Block a user