Suspected Memory Size Problems under Cygwin

Douglas A. Vechinski douglas.vechinski@dynetics.com
Thu Sep 2 15:46:00 GMT 2004


I have a Fortran code, developed mostly under Unix/Linux.  In the past 
(years ago) I have compiled it under Cygwin and run it with no 
problems.  I am now adding some more stuff to it and the user was 
wanting to run it under Cygwin.  So I compile it no problem, but then 
when I execute it -- nothing appears to happen, I just get the shell 
prompt back.  Adding some write statements, it is seen that it is not 
even getting to the first line of the code.  I do not get any error 
messages.

I was first wondering if there could be a memory problem, i.e. not 
enough system memory or possible a subroutine with large local arrays 
which I believe get allocated on the stack.  (I have run into these 
problems in the past on Unix machines and was able to change the stack 
size with the limit command.  However this doesn't appear to be present 
under Cygwin).  So I started playing around with some of the parameters 
I have which control the size of various arrays.  Eventually some 
combinations let the code run, but the parameters were then to small to 
use for the problem I was trying to run.  I can't say exactly how much 
memory before and after since the are many arrays scattered around in a 
number of common blocks.  However,  I may have been originally 
requesting 140 or so Meg scattereed across several arrays and common 
blocks.  I probably cut it down to70 Megs when it ran.  But increasing 
certain parameters while decreasing others let the code run with a 
larger total memory load while the reverse case (decreasing certain 
parameters while increasing others but a smaller total memory load) the 
code would not run.

Next, I recompiled the code using the -mno-cygwin flag and using the 
original set of parameters sizes so that the 140 or so Meg of memory was 
going to be needed.  The code ran fine in this case.  However, in a 
previous post about 3 months ago, I reported (and someone verified my 
claims) that a code compiled under Cygwin with the -mno-cygwin flag (or 
MSYS for that matter) ran 2 to 3 times slower than the same code 
compiled under Cywgin without the use of the -mno-cygwin flag.

So, the ultimate question is is anyone aware of memory problems, memory 
size limits, limits on contiguous memory chuck size limits (dealing with 
Fortran here) under Cygwin.  I am using Cygwin 1.5.7 with g77 3.3.1.


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



More information about the Cygwin mailing list