[lammps-users] Large file support

Hello,

How do I compile LAMMPS for large-file support on Linux? I'm using a
recent g++ (3.4.4) but I can't seem to find the necessary flag.
Thanks.

Naveen

I don't know what large-file support means ...

Steve

Linux traditionally only supports 32 bit file offsets, resulting in a max
file size of 2 Gb. Newer versions have support for 64 bit file offsets
(Large file support), but it still needs to be enabled during compilation
and the correct 64 bit file interface functions need to be called.

However, I've found a page describing what to do on linux:
http://web.archive.org/web/20050218210522/http://www.ece.utexas.edu/~luo/linux_lfs.html.

Large file support simply requires setting two flags during compilation
(-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64) and also to make sure that no
file offsets are of type long (the -D_FILE_OFFSET_BITS=64 translates
all 32bit file interface functions to the 64 bit versions - ie fopen
becomes fopen64, off_t becomes off64_t, etc).

  Going through the dump*.cpp files, there are no file access calls that
require an offset, so I think no code changes need to be done, simply the
added compilation flags in the linux Makefiles.

Naveen