Buona Mattina Matt,
 I tried moving the def of umask to the main body of misc_rand as an executable statement and the same problem with overflow occurred (at least the compiler is consistent)

gfortran -g -O2 -fPIC -c misc_rand.f
misc_rand.f:130.26:

       umask = -2147483648  ! most significant w-r bits                 
                         1
Error: Integer too big for its kind at (1)
make[3]: *** [misc_rand.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all-recursive-am] Error 2


Paul
On Aug 23, 2007, at 6:40 PM, Matt Newville wrote:

Hi Paul,

On 8/23/07, paul fons <paul-fons@aist.go.jp> wrote:
gfortran -g -O2 -fPIC -c misc_rand.f
misc_rand.f:111.36:

       parameter(umask = -2147483648) ! most significant w-r bits
                                   1
Error: Integer too big for its kind at (1)

Thanks for the report.  This compiled for me on linux, using gfortran
4.1.1 and 4.1.2, and obviously works in g77.     I do see a reference
that  -2**31 is no longer a valid integer _constant_ in gfortran, but
that it can be (oddly enough), a valid integer _value_.  Weird.

I don't have an installation of gfortran 4.2 easily available.  Would
you be willing to try this change?  Comment out the parameter(umask
...) line, and simply set umask at the beginning of the executable
statements

******************************************************************************************
misc_rand.f lines 110,111,112 should read:

        parameter(mata  = -1727483681) ! constant vector a
c      parameter(umask = -2147483648) ! most significant w-r bits
        parameter(lmask =  2147483647) ! least significant r bits

misc_rand.f lines 129,130,131,132 should read:

c                        mag01(x) = x * mata for x=0,1
c
        umask = -2147483648  ! most significant w-r bits
        if(mti.ge.n) then
******************************************************************************************

That seems like it would be the easiest fix to me.

Thanks,

--Matt
_______________________________________________
Ifeffit mailing list
Ifeffit@millenia.cars.aps.anl.gov
http://millenia.cars.aps.anl.gov/mailman/listinfo/ifeffit

Paul Fons
Team Leader
Nano-Optics Research Team

Center for Applied Near-Field Optics
National Institute of Advanced Industrial Technology
Tsukuba Central 4, Higashi 1-1-1
Tsukuba, Ibaraki Japan 305-8562

tel. +81-298-61-5635
fax. +81-298-61-2939

The following lines are in a Japanese font
〒305-8562 茨城県つくば市つくば中央東 1-1-1
産業技術総合研究所
近接場光応用工学研究センター
近接場光基礎研究チーム チーム長
ポール・フォンス