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:
@@ -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++){
|
||||
|
||||
Reference in New Issue
Block a user