delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/02/12/15:49:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=iDJpOmqW+OvyiQO9
NhV15Cd8AwNwLmqxI+vrgt5/FvCX8+M5mj4rUruRi2YRooMVx3aHwZtk98Tpfv8D
mAAUBQyNWKLENqySL8B8AyLWd5t8ltvEA43DbNWzdS6gRc3XAqMaFycs1KThXwHX
axDZQ9/Dp0B7HrtV1ambQMYLrFE=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:reply-to:mime-version:to
:subject:references:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=JaingihqggYNmVVzI+z3Gb
1+zBQ=; b=gCVcLTxBj0VSOx3LfNMtQxYy/kS5bvAqAEZNLU1K74FFs5BxVlDDAr
AKY0ncbfCAYC7+gNCIEDxGsrkpRI5fpqKpNMrOi+J1BNsC/j9gqZkdTX94lvoH5h
iFlq9ZGgrgtz4Dnz8L03C9uSEeHCc1M98cxZh1ZHTBTCOXb+2Ie5M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=1.0 required=5.0 tests=AWL,BAYES_40,FREEMAIL_FROM,KAM_MXURI,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,SPF_PASS autolearn=no version=3.3.2
X-HELO: omr-d08.mx.aol.com
Message-ID: <52FBDE56.8050304@aol.com>
Date: Wed, 12 Feb 2014 15:49:26 -0500
From: Tim Prince <n8tm AT aol DOT com>
Reply-To: tprince AT computer DOT org
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: g77 on cygwin64
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> <CAEotdwn+dWCyiw2a6oN987XOP2Fs6BkAfkwChe5ZH3UWs3d=Cg AT mail DOT gmail DOT com>
In-Reply-To: <CAEotdwn+dWCyiw2a6oN987XOP2Fs6BkAfkwChe5ZH3UWs3d=Cg@mail.gmail.com>
x-aol-global-disposition: G
x-aol-sid: 3039ac1a856d52fbde575bee
X-AOL-IP: 75.128.227.7

On 2/12/2014 12:59 PM, David Conrad wrote:
> 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 t:hat. 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?
ifort still has switches for selecting the VAX convention of measuring 
RECL in 32-bit words vs. the f2003 recommended convention of byte size.  
gfortran (and afaik g77) used byte lengths only.
Note that 32-bit g77 unformatted direct access files were never intended 
to work with any 64-bit mode compiler (not even the buggy 64-bit g77) 
and can't be expected to work with gfortran (you would need to make 
those data files from scratch):

http://gcc.gnu.org/onlinedocs/gcc-3.4.4/g77/Portable-Unformatted-Files.html

Also important is the point made above that g77 may have allowed 
indiscriminate switching between formatted and unformatted or direct and 
sequential access files, or read after write, but the run-time errors 
should shed light on that, and you would need to watch for unsuspected 
problems if g77 let it through.

--
Tim Prince


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

- Raw text -


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