Subject: G98: 64-bit file pointers on ia32 architectures

From: "Matt Zwier" <[email-masked]>
Date: Fri, 17 May 2002 11:57:15 -0400

Hello all,

Earlier in the week we ran into the infamous 2GB file limit with G98 
on Linux (i686).  I've searched the G98 site and the CCL archive, 
and while it's clear that the kernel and libc both support 64-bit file 
positions, it's much less clear how to get G98 to use them.  Does 
this mean writing a replacement FORTRAN IO library?  Or does it 
just mean setting some compile-time flag and rebuilding G98?  Has 
anybody conquered this problem?  Is there *any* way other than 
just splitting our rwf files, something that hasn't worked too well for 
us?

Thanks bunches,
Matt Zwier

--
Matthew Zwier ([email-masked])
Department of Chemistry Undergraduate Researcher
Hope College, Holland, MI

---

From: Andrey Khavryuchenko <[email-masked]>
Date: 17 May 2002 21:06:16 +0300

Matt,

"MZ" == Matt Zwier wrote:

 MZ> Earlier in the week we ran into the infamous 2GB file limit with G98 
 MZ> on Linux (i686).  I've searched the G98 site and the CCL archive, 
 MZ> and while it's clear that the kernel and libc both support 64-bit file 
 MZ> positions, it's much less clear how to get G98 to use them.  Does 
 MZ> this mean writing a replacement FORTRAN IO library?  Or does it 
 MZ> just mean setting some compile-time flag and rebuilding G98?  Has 
 MZ> anybody conquered this problem?  Is there *any* way other than 
 MZ> just splitting our rwf files, something that hasn't worked too well for 
 MZ> us?

Does G98 rebuild on recent Linux distribution helps?  It should[1] work
without any additional compile- or run-time flags.

Footnotes: 
[1]  but not necessary it would :) :(

-- 
Andrey V Khavryuchenko          http://www.kds.com.ua/
Offshore Software Development

---

From: Andrew Ryzhkov <[email-masked]>
Date: Fri, 17 May 2002 17:43:46 -0400

Hello Matt,

I think all people usually split files when use the 32-bit version of G98.
There is another problem also, namely the 16Gb limit, which is more complex because
indexes of arrays in G98 have INTEGER*4 type and can't address more than 8*2^32=16Gb data.
The way, I guess, to avoid this problem is to recompile G98 after changing type of integer
variables in sources. I think it should be no so difficult,
just replace all INTEGER and INTEGER*4 to INTEGER*8.
I don't know exactly whether the PGF compiler, usually used for compiling the G98,
support such integer type, but I sure that it must.
IFC, for example, can use INTEGER*8.
So, to solve both these problems you should replace 32-bit integers to 64-bit one at least.

Best regards,
          Andrew

 Dr. Andrei Ryjkov
 Departments of Chemistry, and Atmospheric and Oceanic Sciences,
 McGill University,
 805 Sherbrooke St. West #808
 Montreal, Quebec, CANADA,
 H3A 2K6.
 ----------------------------------------------------------------
 E-mail:  [email-masked]
 Internet: http://RedAndr.tripod.com