This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Memory for large arrays in cygwin/g77


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,  

Dante


Dave Korn wrote:
> 
> > -----Original Message-----
> > From: cygwin-owner On Behalf Of Mark Hadfield
> > Sent: 06 January 2005 00:58
> 
> > Dante Chialvo wrote:
> > > I have similar problem than the one posted a while ago in
> > >
> > > http://www.cygwin.com/ml/cygwin/2003-02/msg00842.html
> > >
> > > Using cygwin/g77, in a PC with 1024 Mb of physical memory.
> > > After compiling and running the following test program
> > > the limit of 160 Mb cannot be surpassed.
> 
> > > error message after running
> > > C:\cygwin\home\dchialvo\test.exe (1972): ***
> > MapViewOfFileEx(0x71C, in_h
> > > 0x71C) failed, Win32 error 6
> 
> > Just to provide another data point, I have the same problem.
> > I have g77,
> > g95 and grfortran (gfc) installed (see below). With
> > heap_chunk_in_mb set
> > to 1024, on a machine with 1024 MiB RAM< I can run a simple Fortran
> > program with an array of up to ~ 1023 MiB. With g77 & gfc the
> > limit is
> > 156 MiB and beyond that it fails with something like
> >
> >    gfctest.exe (844): *** MapViewOfFileEx(0x224, in_h 0x224)
> >    failed, Win32 error 6
> 
> >  > Any suggestions will be appreciatted
> >
> > Use g95
> 
>   It may also be possible to workaround the problem by fooling around with the
> default stack allocation size; this can have knock-on effects which clear up the
> reserved area of the process' memory map that error message is complaining
> about.
> 
> See
> http://www.cygwin.com/ml/cygwin/2004-10/msg01188.html
> or
> http://www.cygwin.com/ml/cygwin/2004-07/msg00646.html for the full gory details,
> and look up the "-Wl,--stack=XXXX" option.  You might need to play around with
> values for the stack size until you find one that helps!
> 
>     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/

-- 
========================== 
Prof. Dante R. Chialvo 
http://www.chialvo.net
-------------------------- 
Cell: 310-3824810(in USA)
+34 679949564 (in Europe)
==========================

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]