LSEEK and large files in Scyld
Peter Lindgren
Peter.Lindgren at experian.com
Thu Oct 18 10:37:30 PDT 2001
The code:
off_t off_t_ret;
off_t byte_offset;
......
off_t_ret = lseek(input_file, byte_offset, 0);
printf("lseek returned (off_t as lld)= %lld on seek to %lld\n", off_t_ret, byte_offset);
if ( off_t_ret < 0 ) {
break;
}
(I have _FILE_OFFSET_BITS=64 defined)
On the system with:
Scyld Beowulf release 27bz-7
Kernel 2.2.17-33.beo
-rw-rw-r-- 1 root root 2879944568 Sep 10 09:22 ../test/test4.ipt
sizeof(off_t_ret) =8
sizeof(byte_offset)=8
lseek returned (off_t as lld)= 71478149 on seek to 71478149
lseek returned (off_t as lld)= 2143376790 on seek to 2143376790
lseek returned (off_t as lld)= 2147241391 on seek to 2147241391
lseek returned (off_t as lld)= -2146458477 on seek to 2148508819
lseek returned (off_t as lld)= -1415228299 on seek to 2879738997
On the system with:
Scyld Beowulf Basic Edition 27bz-8
Kernel 2.2.19-12.beo
-rw-rw-r-- 1 peterl peterl 2879944568 Oct 17 11:13 ../test/test4.ipt
sizeof(off_t_ret) =8
sizeof(byte_offset)=8
lseek returned (off_t as lld)= 71478149 on seek to 71478149
lseek returned (off_t as lld)= 2143376790 on seek to 2143376790
lseek returned (off_t as lld)= 2147241391 on seek to 2147241391
lseek returned (off_t as lld)= -1 on seek to 2148508819
lseek returned (off_t as lld)= -1 on seek to 2879738997
Doesn't seem to work in either case; just reports failure differently.
Peter Lindgren
Phone: 847 944 4515
Fax: 847 517 5889
E-mail: peter.lindgren at experian.com
More information about the Beowulf
mailing list