delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/15/12:13:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <4237177B.5070803@bellsouth.net>
Date: Tue, 15 Mar 2005 11:12:27 -0600
From: "Charles D. Russell" <worwor AT bellsouth DOT net>
Reply-To: worwor AT bellsouth DOT net
User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206)
MIME-Version: 1.0
To: cygwin cygwin <cygwin AT cygwin DOT com>
Subject: Getting around 160 MB limit in g77 under cygwin

Jim McDonald wrote:

> I read your message about this g77 limit in the cygwin mail archives.
>
> I just installed cygwin-1.5.13-1 today and ran into the 160-MByte
> limit on memory for static variables under g77.  I used
>
>   g77 -mno-cygwin maxarray.f -o maxarray
>
> to compile
>
>      program maxarray
>      real*8 a(240000000)
>      do i=1,240000000
>         a(i) = i
>      end do
>      print *, a(240000000)
>      stop
>      end
>
> The resulting executable ran to completion.  Without -mno-cygwin,
> the executable returned immediately, with no output or error
> message.  Using -Wl,--stack,8388608 did not help, and actually
> reduced the memory limit.  Setting the registry entry
> heap_chunk_in_mb to 1024 did not help either, and with that entry
> still in effect, my array storage has exceeded that limit.
> I'm running cygwin under Windows 2000 SP4 + latest hotfixes.
>
> If this solution works for you, you may want to post it at
> cygwin.com or on comp.lang.fortran.
>
> - Jim McDonald
>  Naval Research Lab, Code 6841
>  (202) 404-6936, fax 767-1280
>  James.A.McDonald at nrl.dot navy mil


This works now.  I can again get 770 Mb of useful array
space with 512 Mb of RAM using Windows XP Pro, as I could a couple of
years ago by increasing the stack size.

I did try -mno-cygwin before, but without success.  Your message 
prompted me to try again, and now it works. Either I blundered the first 
time, or there has been some change in my system since then: 1) I 
reinstalled the old cygwin version for which changing the stack size was 
at one time, but no longer, an effective fix  2) I cleared the Windows 
Prefetch directory.

Some comments in the cygwin mail archives suggest that the problem 
resides in the "cygwin loader" (a modification of gnu ld?).  I suppose 
using -mno-cygwin avoids invoking the cygwin loader, but I am a bit 
disturbed that the problem did not disappear when I first tried that 
option.  Has anyone else had problems with large fortran arrays when 
using -mno-cygwin?






--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019