output - Saving the current seed in a Fortran random number sequence -
i using intrinsic function rand() generate random numbers. initialized sequence defined seed, want able output current seed rand() using @ point in loop.
by doing this, should able "continue" sequence of random numbers in new program.
from have seen online, there no way random number generator associated rand() , srand() functions. true? can suggest different method (perhaps, random_number()?).
rand , srand not standard fortran functions. expect compiler documentation can tell how best use them. fortran standard defines subroutine random_seed 3 optional arguments (named save, put , get). put , get setting , getting random seed. save can used return size of integer array used hold seed prng. generator can called standard routine random_number.
Comments
Post a Comment