This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: g77 on cygwin64
- From: David Conrad <DavidConrad at acm dot org>
- To: Andrey Repin <cygwin at cygwin dot com>
- Date: Wed, 12 Feb 2014 12:59:47 -0500
- Subject: Re: g77 on cygwin64
- Authentication-results: sourceware.org; auth=none
- References: <52FAF082 dot 6020805 at appstate dot edu> <52FB0686 dot 8080403 at gmail dot com> <52FB13E2 dot 1070107 at appstate dot edu> <724410821 dot 20140212111451 at mtu-net dot ru> <CAMCbSMoqb_TsY3BQSU-AwnCOuCYecwCw4YexBQuUhbAbpSNDQg at mail dot gmail dot com> <52FB8E3C dot 3030704 at appstate dot edu> <1436686110 dot 20140212211626 at mtu-net dot ru>
On Wed, Feb 12, 2014 at 12:16 PM, Andrey Repin wrote:
>> The strange thing is that gfortran does compile the code, but
>> once compiled, the executables have strange behavior mainly involving
>> problems reading in data files. ...
>
> And this is finally the information, that we can work with.
> My wild guess is that your "colleagues" making certain assumptions about
> files, that not always true on other systems.
> I.e. opening a file in text mode, and then treating [its] data as binary ...
Since the problem occurs going from 32-bit to 64-bit Cygwin, it sounds
to me like all-the-world's-a-VAX syndrome. I bet there are places
where it reads from files and assumes that if it reads N words into
integers, that is N 32-bit quantities, or something like that. I
haven't written any Fortran since the 1980s, but I bet there are types
that have changed size due to the switch to 64-bit and that results in
reading incorrect values from files, including reading some of them
from the wrong file offsets, and hitting end-of-file at a different
point.
Are there any switches to gfortran that control this? I took a brief
look, and the only thing I saw was the -finteger-4-integer-8 option
and friends, but that sounds like going the opposite direction you
want to go, and the -ff2c option that generates C code. You could run
the code through g77 on 32-bit, gfortran on 64-bit, and compare the C
code generated for the file handling. But I suspect that's more hassle
than you want to get into; it doesn't sound like fun to me.
Good luck.
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple