1
0
mirror of https://github.com/paboyle/Grid.git synced 2026-01-03 19:29:29 +00:00

Rework of RNG to use C++11 random. Should work correctly maintaining parallel RNG across

a machine. If a "fixedSeed" is used, randoms should be reproducible across different machine
decomposition since the generators are physically indexed and assigned in lexico ordering.
This commit is contained in:
Peter Boyle
2015-04-19 14:55:58 +01:00
parent 650410cb2f
commit a5b0c492d7
7 changed files with 191 additions and 55 deletions

View File

@@ -48,14 +48,15 @@ int main (int argc, char ** argv)
GridCartesian Fine(latt_size,simd_layout,mpi_layout);
GridRedBlackCartesian rbFine(latt_size,simd_layout,mpi_layout);
GridRNG fRNG(&Fine);
LatticeColourMatrix Foo(&Fine);
LatticeColourMatrix Bar(&Fine);
LatticeColourMatrix Check(&Fine);
LatticeColourMatrix Diff(&Fine);
random(Foo);
gaussian(Bar);
random(fRNG,Foo);
gaussian(fRNG,Bar);
for(int dir=0;dir<4;dir++){