Linux file size limits
- From: "T. Daniel Crawford" <crawdad-0at0-vt.edu>
- Subject: Linux file size limits
- Date: Mon, 1 Oct 2001 15:28:09 -0400 (EDT)
On Mon, 1 Oct 2001, Borislav Kovacevic wrote:
>
> Hi CCLers,
> My question is: why are total size of temporary files in Gussian (rwf) and
> in Molpro limited to max. 16 Gb under the Linux operating sistem.
> I know that in 32 bit operating system maximum file size is 2GB.
> In Gaussian I can split rwf files but 8 (16GB) is maximum number of
> them. Why?
> In new version of Linux (kernel 2.4) this 2 Gb problem is solved, i.e. I
> can have a file larger than 2 Gb. I tried with Molpro and sucessfully
> wrote file larger than 2 Gb, but it seems that there is a 16 Gb limit
> anyway.
> Why this limit exists and is there any way to change it?
>
> Thanks very much!
>
I cannot help with the MolPro limits as I'm not familiar enough with the
details of that code. However, I can try to clarify a few points regarding
filesize limits under Linux on 32-bit systems (e.g, ix86, athlon, etc.).
This doesn't directly address your question, but does deal with this
general topic and other questions recently posted to this list.
(1) The 2.4.X Linux kernels support filesizes > 2 GB, including under the
ext2 filesystem.
(2) For C-language programs, even with a 2.4.X kernel, one must use the
correct -D flags to make use of large-file support. These are:
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
They must be added for any codes which call low-level I/O routines such
as open(), read(), write(), close(), etc. This will work for both GNU
and Portland compilers, by the way.
(3) For Fortran programs, if one is using the Portland Group compilers,
PGI has provided large-file support through their I/O library:
http://www.pgroup.com/faq.htm#execute1k
If, instead, one if using the GNU Fortran compiler g77, it is still
possible to obtain code capable of reading/writing large files, but a bit
more problematic. If anyone cares to do this, let me know and I'll explain
how. If there's sufficient interest on this list, I'll post it.
-Daniel
--
T. Daniel Crawford Department of Chemistry
crawdad-0at0-vt.edu Virginia Tech
www.chem.vt.edu/chem-dept/crawford
--------------------
PGP Public Key at: http://www.chem.vt.edu/chem-dept/crawford/publickey.txt