Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29273 Discussions

Inquire of large file works on one machine, but not another

michael_white
Beginner
645 Views
I have a Fortran program doing a INQUIRE call that seems to be behaving differently on two machines.

First machine (works)

OS: SuSE Linux 9.0 (x86-64) - Kernel (l)
uname -a: Linux system_old 2.6.16-20-smp #1 SMP Wed Mar 26 18:02:05 CET 2008
x86_64 x86_64 x86_64 GNU/Linux

Filesystem type is RiserFS

inquire( file='filename', EXIST=Exists )
(strace output)
[pid 5326] open("filename", O_RDONLY) = 3

Exists = .TRUE.

Second machine (fails)

Redhat Enterprise (Clone): CentOS release 5 (Final)
uname -a: Linux system_new 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:37:38 EST
2008 x86_64 x86_64 x86_64 GNU/Linux

Filesystem type is EXT3 (largefile is enabled according to tune2fs)

inquire( file='filename', EXIST=Exists )
(strace output)
[pid 5520] open("filename", O_RDONLY) = -1 EFBIG (File too
large)

Exists = .FALSE.

Unfortunately this is a on a customers machine, and I am unable to reproduce it locally. Any suggestions?

Thanks!
Jesse Brockmann
0 Kudos
3 Replies
Steven_L_Intel1
Employee
645 Views
It's pretty clear from the strace output that this is an OS-related issue, rather than a failing in the Fortran library, but perhaps you recognize that.
0 Kudos
michael_white
Beginner
645 Views
After further inspection, it's happening in a fopen C call, not Fortran like I originally thought. Yes, I am aware that it seems to be a system issue. But rebuilding our product to fix a bug like this isn't something I can easily do. I was hoping for a work around. But, since it's a Intel C/C++ issue, I'll move the question there.
0 Kudos
jimdempseyatthecove
Honored Contributor III
645 Views

Jesse,

Are you compiling as a 32-bit application?

See if you have a variant for inquire such as inquireEX that will return 64-bit file addressing on 32-bit systems. I am not a Linux programmer but Windows was full of two ways of calling I/O functions. You may also need to open using the openEX or whatever it is called on Linux to getyour file open. This may also require you have once only code in your startup to determine which set of I/O functions to use.

Jim Dempsey

0 Kudos
Reply