Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: "Dave Korn" To: Subject: RE: Memory for large arrays in cygwin/g77 Date: Mon, 10 Jan 2005 10:39:32 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit In-Reply-To: <41E1A1C0.10101@niwa.co.nz> Message-ID: X-OriginalArrivalTime: 10 Jan 2005 10:39:39.0390 (UTC) FILETIME=[AFC069E0:01C4F700] > -----Original Message----- > From: cygwin-owner On Behalf Of Mark Hadfield > Sent: 09 January 2005 21:27 > Dante R. Chialvo wrote: > > Thanks for the suggestions > > Bottom line both ideas work fine in my case: > > > > 1) Install the g95 compiler, > > or > > 2) Use g77 using the Wl option, ie, > > > > g77 -O2 -o mybigprogram -Wl,--stack,100000000 mybigprogram.f > > > > So thanks a lot, > > That's odd. Increasing the stack size definitely does not > work for me. > It just causes the program to terminate silently, with no output. It's more random than that. The size of the stack isn't the critical issue here, since the array isn't on the stack, it's in the .bss section. The issue is the knock-on effects that specifying different initial stack sizes have at the time the executable image is mapped into memory, and the subsequent allocation or availability of the memory area for the cygheap. FWIW, I got it to work with much larger values of n by using --Wl,-stack=65536, but interestingly enough, it starts to miscount somewhere between 132m and 135m entries. It always seemed to undercount by 8. dk AT mace /test/g77> ./foo.sh 1. 40876200. dk AT mace /test/g77> ./foo.sh 1. 80876200. dk AT mace /test/g77> ./foo.sh 1. 120876200. dk AT mace /test/g77> ./foo.sh 1. 130876200. dk AT mace /test/g77> ./foo.sh 1. 140876192. dk AT mace /test/g77> ./foo.sh 1. 135876192. dk AT mace /test/g77> ./foo.sh 1. 132876200. dk AT mace /test/g77> Somewhere between 200876200 and 210876200 entries it starts to fail altogether, with "./g77test.exe: permission denied", which probably represents the total failure of the runtime loader to be find any way to map that huge .bss section and all the necessary dlls. cheers, DaveK -- Can't think of a witty .sigline today.... -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/