Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > cannot open huge file (beyond 4GB) with fopen

Reply
Thread Tools

cannot open huge file (beyond 4GB) with fopen

 
 
Digital Puer
Guest
Posts: n/a
 
      11-24-2005
Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
message is: "Value too large to be stored in data type". Can someone
sugggest a solution? Do I need to use a new file library?

I am on an AIX, 32-bit PPC architecture, in case that matters.

 
Reply With Quote
 
 
 
 
Skarmander
Guest
Posts: n/a
 
      11-24-2005
Digital Puer wrote:
> Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
> message is: "Value too large to be stored in data type". Can someone
> sugggest a solution? Do I need to use a new file library?
>
> I am on an AIX, 32-bit PPC architecture, in case that matters.
>

I'm unfamiliar with the platform, but if fopen() is already failing
before you even perform an operation on the file, your problem is with
the C library implementation.

Try a platform or library-specific newsgroup/forum/wiki/message
board/Post-It(tm) exchange network. comp.unix.aix looks promising.

S.
 
Reply With Quote
 
 
 
 
Skarmander
Guest
Posts: n/a
 
      11-24-2005
Skarmander wrote:
> Digital Puer wrote:
>
>> Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
>> message is: "Value too large to be stored in data type". Can someone
>> sugggest a solution? Do I need to use a new file library?
>>
>> I am on an AIX, 32-bit PPC architecture, in case that matters.
>>

> I'm unfamiliar with the platform, but if fopen() is already failing
> before you even perform an operation on the file, your problem is with
> the C library implementation.
>
> Try a platform or library-specific newsgroup/forum/wiki/message
> board/Post-It(tm) exchange network. comp.unix.aix looks promising.
>

Oh, and try "man fopen64".

S.
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      11-24-2005
"Digital Puer" <> writes:
> Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
> message is: "Value too large to be stored in data type". Can someone
> sugggest a solution? Do I need to use a new file library?
>
> I am on an AIX, 32-bit PPC architecture, in case that matters.


This is system-specific, so we can't really give a definitive answer
here.

<OFF_TOPIC>
I don't know whether the "-q64" option to IBM's compiler will help.
</OFF_TOPIC>

Try comp.unix.aix.

--
Keith Thompson (The_Other_Keith) kst- <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
 
Reply With Quote
 
Mark McIntyre
Guest
Posts: n/a
 
      11-24-2005
On 23 Nov 2005 18:27:02 -0800, in comp.lang.c , "Digital Puer"
<> wrote:

>Hi, I have a 13GB file. fopen() is failing on me. The resulting perror
>message is: "Value too large to be stored in data type". Can someone
>sugggest a solution?


Upgrade to Solaris....

>Do I need to use a new file library?


Its possible you might find a different standard library could handle
larger files. the likely problem is that the filesize is stored in a
long, which on a 32-bit implementation is probably 32 bits ie max of
4GB.

The short answer is that this is very operating system specific, and
you'll need to ask in a group specialising in your OS.


--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
Digital Puer
Guest
Posts: n/a
 
      11-25-2005

Skarmander wrote:
> >

> Oh, and try "man fopen64".
>
> S.



This works. Thanks!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory error due to the huge/huge input file size tejsupra@gmail.com Python 3 11-20-2008 07:21 PM
fopen() with full path affecting subsequent fopen calls Michel Rouzic C Programming 4 04-28-2008 04:48 PM
What is up with fopen??? FOpen and local directories Nonee HTML 2 10-25-2005 09:18 PM
Re: why fopen( ) can't open a big data file? (single file, as big as 29G) dominiconnor@gmail.com C++ 2 06-21-2005 06:24 PM
The file 'bin\WebProj.dll' cannot be copied to the run directory. The requested operation cannot be performed on a file with a user-mapped section open. J Gao ASP .Net 0 07-28-2003 04:18 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57