[Q-e-developers] QE random number generator (randy) error: j out of range
Paolo Giannozzi
giannozz at democritos.it
Sat Nov 10 17:43:49 CET 2012
It seems to me exceedingly unlikely that there is a bug in a simple
routine like randy. It is more likely that there is either a bug in
the compiler,
or some array going out of bounds. In any case, it would be important
to know
whether this happens only in conjunction with PLUMED or not, and to
have an
input that produces this problem
Paolo
On Nov 10, 2012, at 15:57 , LIDing wrote:
> Dear QE developers,
>
> I am using QE 4.3.2 with PLUMED 1.3 (PWscf with metadynamics), and
> encountered a problem. I think it may be a bug.
> The problem occurs most of the time, and only occasionally the
> error did not occur.
> The message was always the same:
>
> Molecular Dynamics Calculation
>
> Starting temperature = 9000.00 K
>
> temperature is set once at start
>
> mass Mg = 24.30
> mass Si = 28.09
> mass O &nbs! p; = 16.00
> Time step = 20.00 a.u., 0.9676 femto-seconds
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%%%%%%%%%%
> from randy : error # 1038
> j out of range
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %%%%%%%%%%%%
>
> stopping ...
>
> I checked the relevant sources, and found that it occurred right in
> the md_init call.
> The error was reported by randy function in the ramdom_numbers.f90
> file when it was first called by set_random_seed.
> In the random_numbers.f90:
>
> 50 IF ( first ) T! HEN
> 51 ;!
> 52 first = .false.
> 53 idum = MOD( ic - idum, m )
> 54 !
>
> ic = 150889, if you pass a random seed that is larger than ic, then
> idum will be a negative number after line 53.
> I wrote a little program to call set_random_seed, most of the time
> idum will be a negative number and the test in
> randy
> 63 IF( j > ntab .OR. j < 1 ) call errore('randy','j out
> of range',j)
> fails. j will be a negative number when I test this.
>
> But in actual run, j is always 1038 whenever the error occurs,
> which does not match what I see in my little test program. It is
> very strange.
>
> If I remove the line 53, everything seems OK in my test program but
> I am no! t sure if this line should be corrected in QE.
> So is it a bug in QE, or I just made some mistakes (the random seed
> can be negative, and the error is caused by other problems)?
>
> I work on a Linux PC cluster with intel compilers and openmpi, and
> QE is linked with the mkl library.
>
> I am not a subscriber of this mail list. Contact me by email to
> dingmaotu at 126.com. Thank you!
>
> Regards,
> Li Ding
> Institute of Geology and Geophysics, Chinese Academy of Science
>
>
> _______________________________________________
> Q-e-developers mailing list
> Q-e-developers at qe-forge.org
> http://qe-forge.org/mailman/listinfo/q-e-developers
---
Paolo Giannozzi, Dept of Chemistry&Physics&Environment,
Univ. Udine, via delle Scienze 208, 33100 Udine, Italy
Phone +39-0432-558216, fax +39-0432-558222
More information about the developers
mailing list