From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28510 invoked by alias); 14 May 2003 10:11:01 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 28451 invoked from network); 14 May 2003 10:10:59 -0000 Received: from unknown (HELO barr.stir.ac.uk) (139.153.12.53) by sources.redhat.com with SMTP; 14 May 2003 10:10:59 -0000 Received: from halladale.stir.ac.uk (halladale.stir.ac.uk [139.153.13.35]) by barr.stir.ac.uk (8.12.3/8.12.3/Debian-6.3) with ESMTP id h4E9x11j026165 for ; Wed, 14 May 2003 10:59:05 +0100 Received: from forth.stir.ac.uk (root@findhorn.stir.ac.uk [139.153.13.6]) by halladale.stir.ac.uk (8.12.3/8.12.3/Debian-5) with ESMTP id h4E9w2ce013732 for ; Wed, 14 May 2003 10:58:02 +0100 Received: from pc17078 (d138183.stir.ac.uk [139.153.138.183]) by forth.stir.ac.uk (8.8.4/8.8.4) with ESMTP id KAA17483 for ; Wed, 14 May 2003 10:58:01 +0100 (BST) Received: from pc17078 ([127.0.0.1] helo=stir.ac.uk) by pc17078 with esmtp (Exim 3.12 #1 (Debian)) id 19Ftph-00008t-00 for ; Wed, 14 May 2003 11:50:01 +0100 Message-ID: <3EC21F59.B493490C@stir.ac.uk> Date: Wed, 14 May 2003 10:11:00 -0000 From: Craig Kennedy X-Accept-Language: en MIME-Version: 1.0 To: gcc-help@gcc.gnu.org Subject: Opening a very large file Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Filter-Info: UoS MailScan 0.1 [D 1] X-MailScanner-Information: See www.mailscanner.info for information X-MailScanner: Found to be clean X-MailScanner-SpamCheck: not spam, SpamAssassin (score=-6.3, required 5, SIGNATURE_LONG_DENSE) X-SW-Source: 2003-05/txt/msg00105.txt.bz2 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.