public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Opening a very large file
@ 2003-05-14 10:11 Craig Kennedy
  2003-05-14 21:21 ` Toon Moene
  0 siblings, 1 reply; 2+ messages in thread
From: Craig Kennedy @ 2003-05-14 10:11 UTC (permalink / raw)
  To: gcc-help

Hello!

I'm using Fortran 77 and I am trying to open a large file (120
megabytes). However, when I try and compile the program it warns that
the stack size is too large. This file is made up of 115 smaller files
all put together - the program is to take the large file apart and
generate the 115 new files. The program works for smaller sets (40 files
in one etc.)

Here is some code from the file:

      reclen=512*512*115

     open(1,file=infname,form='unformatted',access='direct',
     +recl=reclen,status='old')
      print*,'opened'
       read(1) (realstream(i),i=1,reclen)
      close( 1 )


       do k=1,ilen
       ip=(k-1)*262144
       do l=1,262144
        ip=ip+1
        realstreamdiv(l)=realstream(ip)+realstreamdiv(l)
       enddo
       enddo


       reclen=262144

      open(18,file=outfname,form='unformatted',access='direct',
     +recl=reclen,status='new')
       write(18) realstreamdiv
       close(18)

Any help on how to open the file in chunks to output them would be
greatly appreciated.

-- 
The University of Stirling is a university established in Scotland by
charter at Stirling, FK9 4LA.  Privileged/Confidential Information may
be contained in this message.  If you are not the addressee indicated
in this message (or responsible for delivery of the message to such
person), you may not disclose, copy or deliver this message to anyone
and any action taken or omitted to be taken in reliance on it, is
prohibited and may be unlawful.  In such case, you should destroy this
message and kindly notify the sender by reply email.  Please advise
immediately if you or your employer do not consent to Internet email
for messages of this kind.  Opinions, conclusions and other
information in this message that do not relate to the official
business of the University of Stirling shall be understood as neither
given nor endorsed by it.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Opening a very large file
  2003-05-14 10:11 Opening a very large file Craig Kennedy
@ 2003-05-14 21:21 ` Toon Moene
  0 siblings, 0 replies; 2+ messages in thread
From: Toon Moene @ 2003-05-14 21:21 UTC (permalink / raw)
  To: Craig Kennedy; +Cc: gcc-help

Craig Kennedy wrote:

> I'm using Fortran 77 and I am trying to open a large file (120
> megabytes). However, when I try and compile the program it warns that
> the stack size is too large. This file is made up of 115 smaller files
> all put together - the program is to take the large file apart and
> generate the 115 new files. The program works for smaller sets (40 files
> in one etc.)

Hmmmm, I need the exact error message to make sense of that.  Does "it" 
warn when compiling or when running the program ?

I also need to know the version of g77 that you are using (the output of 
g77 -v).

Thanks in advance,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
GNU Fortran 95: http://gcc-g95.sourceforge.net/ (under construction)

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-14 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 10:11 Opening a very large file Craig Kennedy
2003-05-14 21:21 ` Toon Moene

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).