Test setRandomSeed to verify operation
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module.
subroutine testSetRandomSeed
!! Test setRandomSeed to verify operation
logical,dimension(2)::results
integer,parameter::N = 10
real(wp),dimension(N)::x,y,z
call setRandomSeed(1)
call random_number(x)
call setRandomSeed(2)
call random_number(y)
call setRandomSeed(1)
call random_number(z)
results(1) = any(x==y)
results(2) = .not.all(x==z)
if( any(results) ) error stop "Failed setRandomSeed check"
end subroutine testSetRandomSeed