Mail Archives: cygwin/2003/03/02/19:58:13
Hi,
I boiled my problem down to the following Fortran test program,
which I always ran in an Xterm under Xwindows and in a cygwin.bat terminal
(without closing X, same behavior unless otherwise noted).
I'm using only default packages of the cygwin 1.3.20 distribution
except for fvwm-themes 0.6.2 and fvwm-2.4.14, which were compiled
from source.
Test program:
--------
program readtest
integer i(40000000)
character*80 process
read (*,'(a)') process
write(*,'(a)') process
end
--------
compiled with 'g77 -g readtest.f'. With array size 40000000
the program runs as expected, for example:
--------
$ a.exe
asdf (<----- this is the user input)
asdf
$
--------
Then, I change 40000000 to 41000000 in the source code
and recompile with 'g77 -g readtest.f'. Now the executable
does not stop to solicit input, but returns immediately:
--------
$ a.exe
$
--------
Having read about stack size problems with large arrays
under Cygwin, I recompile with 'g77 -g -Wl,--stack,0x2000000 readtest.f'
and run again. First I run in the Xterm and get:
--------
$ a.exe
fmt: end of file
apparent state: unit 5 (unnamed)
last format: (a)
lately reading sequential formatted external IO
Aborted (core dumped)
--------
Secondly, I run it in the Cygwin terminal, i.e. bash in Win window and
-- surprise -- it runs as expected:
--------
$ a.exe
asdf (<----- this is the user input)
asdf
$
--------
Can anybody explain this and suggest a remedy?
Any help would be greatly appreciated!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -