2GB file size limit on GNU/Linux.

Matt Hodges pczmph at unix.nott.ac.uk
Fri Jul 13 18:13:04 BST 2001

The matter of how to circumvent the 2GB file size limit on GNU/Linux
(x86) has been raised once or twice, but I've never seen a
satisfactory solution.

The key to getting this working, at least with a 2.4.5 kernel and
version 2.2.3 of glibc, is to replace the 32-bit file system interface
with the 64-bit interface. One way to achieve this[1] is to compile
the C sources with the _FILE_OFFSET_BITS macro defined as 64. Thus,
the only departure needed from the usual configure/build/install
procedure is to use the following in the CONFIG file:


I have tested this with a calculation on H2O..Ne at the HF/aug-cc-pVQZ
level of theory, which needs about 5GB of disk and which previously
failed. Comparison was made with the same calculation run on Tru64
UNIX V5.1.

I didn't find this solution on searching the archives, so I hope this
is of use to others as well as to myself.

[1]  I don't know if Large File Support is optional in glibc; this
     fix will fail if this is the case and it isn't built in.

Matt Hodges
School of Chemistry
Nottingham University

More information about the Molpro-user mailing list