help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Max file Size for fwrite() function


From: Jaroslav Hajek
Subject: Re: Max file Size for fwrite() function
Date: Tue, 26 May 2009 13:12:35 +0200

2009/5/26 David Kremer <address@hidden>:
>
>> David,
>>
>> Can you provide a simple example demonstrating the problem?
>>
>> Ben
>>
>>
> Yes, surely :
>
> %%%% Beginning of octave script
> %%  Demonstrating impossibility to write more than 2Go by a single file
> %% Be care of space disk available (must be > 2 Go)
> fd = fopen( "test.bin" , "wb" ) ;
> for k = [ 1:300 ]
>    fwrite( fd , randn(1024,1024) , "double");
> end ;
> fclose( fd ) ;
>
> ls -lh
>

works for me, on both 3.0.5 and 3.2.0rc3.

octave:1> fd = fopen( "test.bin" , "wb" ) ;
octave:2> for k = [ 1:300 ]
>    fwrite( fd , randn(1024,1024) , "double");
> end ;
octave:3> fclose( fd ) ;
octave:4> stat("test.bin")
ans =
{
  dev =  2051
  ino =  14561678
  mode =  33188
  modestr = -rw-r--r--
  nlink =  1
  uid =  1000
  gid =  100
  rdev = 0
  size =  2.5166e+09
  atime =  1.2433e+09
  mtime =  1.2433e+09
  ctime =  1.2433e+09
  blksize =  4096
  blocks =  4920008
}

maybe upgrade will help.

cheers

-- 
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

[Prev in Thread] Current Thread [Next in Thread]