public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* g77 on cygwin64
@ 2014-02-12  4:35 Scott T. Marshall
  2014-02-12  6:00 ` Marco Atzeri
  0 siblings, 1 reply; 18+ messages in thread
From: Scott T. Marshall @ 2014-02-12  4:35 UTC (permalink / raw)
  To: cygwin

Hi All,
First a compliment: I recently went from the old x86 version of cygwin 
to cygwin64. I was pleased to see that many of my perl scripts run about 
twice as fast. Thanks!

My question: Would it be possible to have the old g77 fortran compiler 
as an optional install for cygwin64? I realize that g77 is now 
deprecated by gfortran, but I have a lot of old fortran 77 code that 
does not compile correctly with gfortran. Since I am not a fortran coder 
(I mainly use interpreted languages), I do not have the skills to figure 
out what the issues with gfortran are. It would immensely useful to have 
a cygwin64 g77 as an optional install.

If this is not an option, could anyone maybe point me in the right 
direction as to how to compile g77 myself? I attempted to do so with an 
old g77 from gcc version 3.4.6, but the makefiles do not recognize the 
uname of cygwin64, and I'm not sure of what compiler flags to use, so 
the build always fails.

Any tips/suggestions would be appreciated.
Cheers,
-Scott

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  4:35 g77 on cygwin64 Scott T. Marshall
@ 2014-02-12  6:00 ` Marco Atzeri
  2014-02-12  7:05   ` Scott T. Marshall
  0 siblings, 1 reply; 18+ messages in thread
From: Marco Atzeri @ 2014-02-12  6:00 UTC (permalink / raw)
  To: cygwin



On 12/02/2014 04:54, Scott T. Marshall wrote:
> Hi All,
> First a compliment: I recently went from the old x86 version of cygwin
> to cygwin64. I was pleased to see that many of my perl scripts run about
> twice as fast. Thanks!
>
> My question: Would it be possible to have the old g77 fortran compiler
> as an optional install for cygwin64? I realize that g77 is now
> deprecated by gfortran, but I have a lot of old fortran 77 code that
> does not compile correctly with gfortran. Since I am not a fortran coder
> (I mainly use interpreted languages), I do not have the skills to figure
> out what the issues with gfortran are. It would immensely useful to have
> a cygwin64 g77 as an optional install.
>
> If this is not an option, could anyone maybe point me in the right
> direction as to how to compile g77 myself? I attempted to do so with an
> old g77 from gcc version 3.4.6, but the makefiles do not recognize the
> uname of cygwin64, and I'm not sure of what compiler flags to use, so
> the build always fails.
>
> Any tips/suggestions would be appreciated.
> Cheers,
> -Scott
>

have you tested with -std=legacy ?

'-std=STD'
      Specify the standard to which the program is expected to conform,
      which may be one of 'f95', 'f2003', 'f2008', 'gnu', or 'legacy'.
      The default value for STD is 'gnu', which specifies a superset of
      the Fortran 95 standard that includes all of the extensions
      supported by GNU Fortran, although warnings will be given for
      obsolete extensions not recommended for use in new code.  The
      'legacy' value is equivalent but without the warnings for obsolete
      extensions, and may be useful for old non-standard programs.  The
      'f95', 'f2003' and 'f2008' values specify strict conformance to the
      Fortran 95, Fortran 2003 and Fortran 2008 standards, respectively;
      errors are given for all extensions beyond the relevant language
      standard, and warnings are given for the Fortran 77 features that
      are permitted but obsolescent in later standards.  '-std=f2008ts'
      allows the Fortran 2008 standard including the additions of the
      Technical Specification (TS) 29113 on Further Interoperability of
      Fortran with C.


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  6:00 ` Marco Atzeri
@ 2014-02-12  7:05   ` Scott T. Marshall
  2014-02-12  7:24     ` Andrey Repin
  2014-02-12  7:31     ` LMH
  0 siblings, 2 replies; 18+ messages in thread
From: Scott T. Marshall @ 2014-02-12  7:05 UTC (permalink / raw)
  To: cygwin


On 2/12/2014 12:28 AM, Marco Atzeri wrote:
>
>
> On 12/02/2014 04:54, Scott T. Marshall wrote:
>> Hi All,
>> First a compliment: I recently went from the old x86 version of cygwin
>> to cygwin64. I was pleased to see that many of my perl scripts run about
>> twice as fast. Thanks!
>>
>> My question: Would it be possible to have the old g77 fortran compiler
>> as an optional install for cygwin64? I realize that g77 is now
>> deprecated by gfortran, but I have a lot of old fortran 77 code that
>> does not compile correctly with gfortran. Since I am not a fortran coder
>> (I mainly use interpreted languages), I do not have the skills to figure
>> out what the issues with gfortran are. It would immensely useful to have
>> a cygwin64 g77 as an optional install.
>>
>> If this is not an option, could anyone maybe point me in the right
>> direction as to how to compile g77 myself? I attempted to do so with an
>> old g77 from gcc version 3.4.6, but the makefiles do not recognize the
>> uname of cygwin64, and I'm not sure of what compiler flags to use, so
>> the build always fails.
>>
>> Any tips/suggestions would be appreciated.
>> Cheers,
>> -Scott
>>
>
> have you tested with -std=legacy ?
>
> '-std=STD'
>      Specify the standard to which the program is expected to conform,
>      which may be one of 'f95', 'f2003', 'f2008', 'gnu', or 'legacy'.
>      The default value for STD is 'gnu', which specifies a superset of
>      the Fortran 95 standard that includes all of the extensions
>      supported by GNU Fortran, although warnings will be given for
>      obsolete extensions not recommended for use in new code.  The
>      'legacy' value is equivalent but without the warnings for obsolete
>      extensions, and may be useful for old non-standard programs. The
>      'f95', 'f2003' and 'f2008' values specify strict conformance to the
>      Fortran 95, Fortran 2003 and Fortran 2008 standards, respectively;
>      errors are given for all extensions beyond the relevant language
>      standard, and warnings are given for the Fortran 77 features that
>      are permitted but obsolescent in later standards. '-std=f2008ts'
>      allows the Fortran 2008 standard including the additions of the
>      Technical Specification (TS) 29113 on Further Interoperability of
>      Fortran with C.
>
Yup, I tried that compiler flag (-std=legacy) with gfortran. No luck. 
Back when cygwin was x86 only and had g77, the same code compiled 
correctly and ran fine. I have the same issues on Linux boxes, so the 
gfortran issue is not unique to cygwin. The solution I found was to dig 
up the old binaries for my Linux boxes and install g77 on them. I don't 
think I can do this for cygwin since g77 was never a part of cygwin64. 
Would it be very difficult to take the old g77 source and recompile it 
for cygwin64? Has anyone successfully done this before?
Cheers
-Scott

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


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  7:05   ` Scott T. Marshall
@ 2014-02-12  7:24     ` Andrey Repin
  2014-02-12  8:00       ` Arjen Markus
  2014-02-12 16:16       ` Christopher Faylor
  2014-02-12  7:31     ` LMH
  1 sibling, 2 replies; 18+ messages in thread
From: Andrey Repin @ 2014-02-12  7:24 UTC (permalink / raw)
  To: Scott T. Marshall, cygwin

Greetings, Scott T. Marshall!

> Would it be very difficult to take the old g77 source and recompile it
> for cygwin64? Has anyone successfully done this before?

It would certainly be easier to fix you code to compile with
standards-conformant compiler.
Because every other course of action seems counterproductive, if not plain stupid.


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 12.02.2014, <11:13>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  7:05   ` Scott T. Marshall
  2014-02-12  7:24     ` Andrey Repin
@ 2014-02-12  7:31     ` LMH
  1 sibling, 0 replies; 18+ messages in thread
From: LMH @ 2014-02-12  7:31 UTC (permalink / raw)
  To: cygwin

What host operating system are you running cygwin on? Do you have 
examples of your old g77 applications that are already compiled that you 
can test on your current system?

There are several options. Compiling g77 is one of them, but you would 
need the proper runtime components as well. It is also possible to have 
more than one cygwin installation. You can have an older x86 cygwin 
installed that still has g77. The question is weather or not an app 
compiled with g77 under 32-bit cygwin will run on your OS. You also 
would not be able to run both versions of cygwin at the same time.

A think a bit more information would be useful.

This is the gnu archive page for gcc version 3.4.6, which I think is the 
one that is most compatible with the gcc 4 stuff.

http://ftp.gnu.org/gnu/gcc/gcc-3.4.6/

If I remember right, you could not compile with 3.4.4 once your cygwin 
had been updated to gcc 4. There were some collisions and header issues. 
I think that had been fixed by 3.4.6, but cygwin had moved on from gcc 3 
by then and they never released a package past 3.4.4.

I think you can get it compiled and it would probably be better to 
consult with the gnu message board about that, since that's there thing. 
If you think it would be useful to try installing a second cygwin, I can 
send you some notes for that.

LMH


Scott T. Marshall wrote:
>
> On 2/12/2014 12:28 AM, Marco Atzeri wrote:
>>
>>
>> On 12/02/2014 04:54, Scott T. Marshall wrote:
>>> Hi All,
>>> First a compliment: I recently went from the old x86 version of cygwin
>>> to cygwin64. I was pleased to see that many of my perl scripts run about
>>> twice as fast. Thanks!
>>>
>>> My question: Would it be possible to have the old g77 fortran compiler
>>> as an optional install for cygwin64? I realize that g77 is now
>>> deprecated by gfortran, but I have a lot of old fortran 77 code that
>>> does not compile correctly with gfortran. Since I am not a fortran coder
>>> (I mainly use interpreted languages), I do not have the skills to figure
>>> out what the issues with gfortran are. It would immensely useful to have
>>> a cygwin64 g77 as an optional install.
>>>
>>> If this is not an option, could anyone maybe point me in the right
>>> direction as to how to compile g77 myself? I attempted to do so with an
>>> old g77 from gcc version 3.4.6, but the makefiles do not recognize the
>>> uname of cygwin64, and I'm not sure of what compiler flags to use, so
>>> the build always fails.
>>>
>>> Any tips/suggestions would be appreciated.
>>> Cheers,
>>> -Scott
>>>
>>
>> have you tested with -std=legacy ?
>>
>> '-std=STD'
>>      Specify the standard to which the program is expected to conform,
>>      which may be one of 'f95', 'f2003', 'f2008', 'gnu', or 'legacy'.
>>      The default value for STD is 'gnu', which specifies a superset of
>>      the Fortran 95 standard that includes all of the extensions
>>      supported by GNU Fortran, although warnings will be given for
>>      obsolete extensions not recommended for use in new code.  The
>>      'legacy' value is equivalent but without the warnings for obsolete
>>      extensions, and may be useful for old non-standard programs. The
>>      'f95', 'f2003' and 'f2008' values specify strict conformance to the
>>      Fortran 95, Fortran 2003 and Fortran 2008 standards, respectively;
>>      errors are given for all extensions beyond the relevant language
>>      standard, and warnings are given for the Fortran 77 features that
>>      are permitted but obsolescent in later standards. '-std=f2008ts'
>>      allows the Fortran 2008 standard including the additions of the
>>      Technical Specification (TS) 29113 on Further Interoperability of
>>      Fortran with C.
>>
> Yup, I tried that compiler flag (-std=legacy) with gfortran. No luck.
> Back when cygwin was x86 only and had g77, the same code compiled
> correctly and ran fine. I have the same issues on Linux boxes, so the
> gfortran issue is not unique to cygwin. The solution I found was to dig
> up the old binaries for my Linux boxes and install g77 on them. I don't
> think I can do this for cygwin since g77 was never a part of cygwin64.
> Would it be very difficult to take the old g77 source and recompile it
> for cygwin64? Has anyone successfully done this before?
> Cheers
> -Scott
>
>>
>> --
>> 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
>>
>
>
> --
> 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
>
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  7:24     ` Andrey Repin
@ 2014-02-12  8:00       ` Arjen Markus
  2014-02-12 16:04         ` Scott T. Marshall
  2014-02-12 16:16       ` Christopher Faylor
  1 sibling, 1 reply; 18+ messages in thread
From: Arjen Markus @ 2014-02-12  8:00 UTC (permalink / raw)
  To: Andrey Repin; +Cc: Scott T. Marshall

I agree with Andrey - could you give us examples of code fragments
that are not accepted by gfortran but are by g77?

Regards,

Arjen

2014-02-12 8:14 GMT+01:00 Andrey Repin <anrdaemon@yandex.ru>:
> Greetings, Scott T. Marshall!
>
>> Would it be very difficult to take the old g77 source and recompile it
>> for cygwin64? Has anyone successfully done this before?
>
> It would certainly be easier to fix you code to compile with
> standards-conformant compiler.
> Because every other course of action seems counterproductive, if not plain stupid.
>
>
> --
> WBR,
> Andrey Repin (anrdaemon@yandex.ru) 12.02.2014, <11:13>
>
> Sorry for my terrible english...
>
>
> --
> 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
>

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  8:00       ` Arjen Markus
@ 2014-02-12 16:04         ` Scott T. Marshall
  2014-02-12 17:20           ` Marco Atzeri
                             ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Scott T. Marshall @ 2014-02-12 16:04 UTC (permalink / raw)
  To: cygwin

Thank-you to those that responded with suggestions involving my fortran 
issues. Fixing the code is not something I am going to pursue since the 
source code was written by several different colleagues and is spread 
out amongst many .f files. My colleagues have no interest in fixing it 
since they have g77 on their unix machines, and to them, it isn't 
broken. 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. So it is not clear to me exactly what 
needs to be updated in the code.
I have tried to compile gcc 3.4.6 from source with no luck, but I am not 
so good with compiler flags and makefiles. I will give it a go again, 
but I am not optimistic.
So, to avoid further mean comments about my course of action being 
"stupid", I will sign off.
-Scott


On 2/12/2014 2:31 AM, Arjen Markus wrote:
> I agree with Andrey - could you give us examples of code fragments
> that are not accepted by gfortran but are by g77?
>
> Regards,
>
> Arjen
>
> 2014-02-12 8:14 GMT+01:00 Andrey Repin <anrdaemon@yandex.ru>:
>> Greetings, Scott T. Marshall!
>>
>>> Would it be very difficult to take the old g77 source and recompile it
>>> for cygwin64? Has anyone successfully done this before?
>> It would certainly be easier to fix you code to compile with
>> standards-conformant compiler.
>> Because every other course of action seems counterproductive, if not plain stupid.
>>
>>
>> --
>> WBR,
>> Andrey Repin (anrdaemon@yandex.ru) 12.02.2014, <11:13>
>>
>> Sorry for my terrible english...
>>
>>
>> --
>> 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
>>


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12  7:24     ` Andrey Repin
  2014-02-12  8:00       ` Arjen Markus
@ 2014-02-12 16:16       ` Christopher Faylor
  1 sibling, 0 replies; 18+ messages in thread
From: Christopher Faylor @ 2014-02-12 16:16 UTC (permalink / raw)
  To: cygwin

On Wed, Feb 12, 2014 at 11:14:51AM +0400, Andrey Repin wrote:
>Greetings, Scott T. Marshall!
>> Would it be very difficult to take the old g77 source and recompile it
>> for cygwin64? Has anyone successfully done this before?
>
>It would certainly be easier to fix you code to compile with
>standards-conformant compiler.
>Because every other course of action seems counterproductive, if not plain stupid.

Come on, Andrey.  There is no reason to use the word "stupid" here.  You
could have just stopped with "counterproductive" and not sounded so
insulting.

cgf

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 16:04         ` Scott T. Marshall
@ 2014-02-12 17:20           ` Marco Atzeri
  2014-02-12 17:59             ` LMH
  2014-02-12 17:36           ` Andrey Repin
                             ` (2 subsequent siblings)
  3 siblings, 1 reply; 18+ messages in thread
From: Marco Atzeri @ 2014-02-12 17:20 UTC (permalink / raw)
  To: cygwin; +Cc: marshallst

On 12/02/2014 16:07, Scott T. Marshall wrote:
> Thank-you to those that responded with suggestions involving my fortran
> issues. Fixing the code is not something I am going to pursue since the
> source code was written by several different colleagues and is spread
> out amongst many .f files. My colleagues have no interest in fixing it
> since they have g77 on their unix machines, and to them, it isn't
> broken. 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. So it is not clear to me exactly what
> needs to be updated in the code.
> I have tried to compile gcc 3.4.6 from source with no luck, but I am not
> so good with compiler flags and makefiles. I will give it a go again,
> but I am not optimistic.
> So, to avoid further mean comments about my course of action being
> "stupid", I will sign off.
> -Scott
>

Hi Scott

As he wrote "Sorry for my terrible english...",
I assume it was not intentional offensive.

Coming back to your issue, it is really curious that gfortran compiles 
the code but behaves wrongly, I was expecting it rejects the code
if not in line with latest standard.
I saw rejected code with lapack some time ago, and the correction was 
trivial. But compiling and not working is a serious gfortran bug.

Have you a "short test case" ?

Regards
Marco



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 16:04         ` Scott T. Marshall
  2014-02-12 17:20           ` Marco Atzeri
@ 2014-02-12 17:36           ` Andrey Repin
  2014-02-12 18:07             ` David Conrad
  2014-02-12 19:41           ` Achim Gratz
  2014-02-12 23:05           ` carolus
  3 siblings, 1 reply; 18+ messages in thread
From: Andrey Repin @ 2014-02-12 17:36 UTC (permalink / raw)
  To: Scott T. Marshall, cygwin

Greetings, Scott T. Marshall!

Please don't http://cygwin.com/acronyms/#TOFU

> Thank-you to those that responded with suggestions involving my fortran
> issues. Fixing the code is not something I am going to pursue since the 
> source code was written by several different colleagues and is spread 
> out amongst many .f files. My colleagues have no interest in fixing it 
> since they have g77 on their unix machines, and to them, it isn't 
> broken.

"Our logs show nothing, server runs fine."
If only you knew, how many times I've heard this argument...

> 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. So it is not clear to me exactly what 
> needs to be updated in the code.

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 it's data as binary safe,
quite predictable, prone to fail (not actual opening, but reading and 
writing operations on it) on systems with different line endings.

> I have tried to compile gcc 3.4.6 from source with no luck, but I am not 
> so good with compiler flags and makefiles. I will give it a go again, 
> but I am not optimistic.
> So, to avoid further mean comments about my course of action being 
> "stupid", I will sign off.

I beg for forgiveness. Was merely trying to save you some time. Perhaps,
trying too hard...


--
WBR,
Andrey Repin (anrdaemon@yandex.ru) 12.02.2014, <21:10>

Sorry for my terrible english...


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 17:20           ` Marco Atzeri
@ 2014-02-12 17:59             ` LMH
  2014-02-12 19:38               ` Marco Atzeri
  0 siblings, 1 reply; 18+ messages in thread
From: LMH @ 2014-02-12 17:59 UTC (permalink / raw)
  To: cygwin



Marco Atzeri wrote:
> On 12/02/2014 16:07, Scott T. Marshall wrote:
>> Thank-you to those that responded with suggestions involving my fortran
>> issues. Fixing the code is not something I am going to pursue since the
>> source code was written by several different colleagues and is spread
>> out amongst many .f files. My colleagues have no interest in fixing it
>> since they have g77 on their unix machines, and to them, it isn't
>> broken. 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. So it is not clear to me exactly what
>> needs to be updated in the code.
>> I have tried to compile gcc 3.4.6 from source with no luck, but I am not
>> so good with compiler flags and makefiles. I will give it a go again,
>> but I am not optimistic.
>> So, to avoid further mean comments about my course of action being
>> "stupid", I will sign off.
>> -Scott
>>
>
> Hi Scott
>
> As he wrote "Sorry for my terrible english...",
> I assume it was not intentional offensive.
>
> Coming back to your issue, it is really curious that gfortran compiles
> the code but behaves wrongly, I was expecting it rejects the code
> if not in line with latest standard.
> I saw rejected code with lapack some time ago, and the correction was
> trivial. But compiling and not working is a serious gfortran bug.
>
> Have you a "short test case" ?
>
> Regards
> Marco
>
>
>
> --
> 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
>
>


 > Coming back to your issue, it is really curious that gfortran compiles
 > the code but behaves wrongly, I was expecting it rejects the code
 > if not in line with latest standard.

This happens on some of my code as well and is in many ways a far worse 
issue to deal with. Some of my code compiles and runs, but the floating 
point answers to many of the calculations are wrong. This makes the 
issue(s) very difficult to run down (and also makes me stick with gcc3 
like the posters colleagues).

LMH



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 17:36           ` Andrey Repin
@ 2014-02-12 18:07             ` David Conrad
  2014-02-12 19:11               ` Richard
  2014-02-12 21:37               ` Tim Prince
  0 siblings, 2 replies; 18+ messages in thread
From: David Conrad @ 2014-02-12 18:07 UTC (permalink / raw)
  To: Andrey Repin

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 18:07             ` David Conrad
@ 2014-02-12 19:11               ` Richard
  2014-02-12 19:59                 ` Marco Atzeri
  2014-02-12 21:37               ` Tim Prince
  1 sibling, 1 reply; 18+ messages in thread
From: Richard @ 2014-02-12 19:11 UTC (permalink / raw)
  To: David Conrad; +Cc: Andrey Repin


On Wed, 12 Feb 2014, David Conrad wrote:
>
> 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.

It's called, "inadvertent varriable sharing."

Yeah, I was there, fought those battles. The proof of what was going on 
was found in crash dumps. ...This was from the era when "RISC 
architecture" meant "Relegate all the Important Sh_t to the Compiler."

Richard

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 17:59             ` LMH
@ 2014-02-12 19:38               ` Marco Atzeri
  0 siblings, 0 replies; 18+ messages in thread
From: Marco Atzeri @ 2014-02-12 19:38 UTC (permalink / raw)
  To: cygwin



On 12/02/2014 18:35, LMH wrote:
>

>
>
>  > Coming back to your issue, it is really curious that gfortran compiles
>  > the code but behaves wrongly, I was expecting it rejects the code
>  > if not in line with latest standard.
>
> This happens on some of my code as well and is in many ways a far worse
> issue to deal with. Some of my code compiles and runs, but the floating
> point answers to many of the calculations are wrong. This makes the
> issue(s) very difficult to run down (and also makes me stick with gcc3
> like the posters colleagues).
>
> LMH
>

Could you share a test case ?
I found no difference in math behaviour on all the Fortran
codes in LAPACK and OCTAVE when we moved from G77 to GFORTRAN

I am really curious

Regards
Marco

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 16:04         ` Scott T. Marshall
  2014-02-12 17:20           ` Marco Atzeri
  2014-02-12 17:36           ` Andrey Repin
@ 2014-02-12 19:41           ` Achim Gratz
  2014-02-12 23:05           ` carolus
  3 siblings, 0 replies; 18+ messages in thread
From: Achim Gratz @ 2014-02-12 19:41 UTC (permalink / raw)
  To: cygwin

Scott T. Marshall writes:
> 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.

To me this rather indicates a bug in the code, probably involving bad
assumptions about what can be be done to files and in which order.  For
starters you might check if the files are opened in binary mode.

> So it is not clear to me
> exactly what needs to be updated in the code.

Big can of worms.  I've seen old Fortran code break on seemingly unrelated
things like a C library security update, not to say what happened when I
first tried to run it on an Alpha.  You might try if the program
works correctly if compiled unoptimized.  Another option is to
purposefully use a compiler that does things in a very different way and
see where it complains and/or breaks (I've been keeping f2c for that).


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 19:11               ` Richard
@ 2014-02-12 19:59                 ` Marco Atzeri
  0 siblings, 0 replies; 18+ messages in thread
From: Marco Atzeri @ 2014-02-12 19:59 UTC (permalink / raw)
  To: cygwin



On 12/02/2014 20:06, Richard wrote:
>
>
>
> Yeah, I was there, fought those battles. The proof of what was going on
> was found in crash dumps. ...This was from the era when "RISC
> architecture" meant "Relegate all the Important Sh_t to the Compiler."
>
> Richard
>

More recently, all wchar_t are 4 byte long...

It took a while to demonstrate that is was not the cygwin local
to be broken

Regards
Marco

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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 18:07             ` David Conrad
  2014-02-12 19:11               ` Richard
@ 2014-02-12 21:37               ` Tim Prince
  1 sibling, 0 replies; 18+ messages in thread
From: Tim Prince @ 2014-02-12 21:37 UTC (permalink / raw)
  To: cygwin


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

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: g77 on cygwin64
  2014-02-12 16:04         ` Scott T. Marshall
                             ` (2 preceding siblings ...)
  2014-02-12 19:41           ` Achim Gratz
@ 2014-02-12 23:05           ` carolus
  3 siblings, 0 replies; 18+ messages in thread
From: carolus @ 2014-02-12 23:05 UTC (permalink / raw)
  To: cygwin

On 2/12/2014 9:07 AM, Scott T. Marshall wrote:
> My colleagues have no interest in fixing it since they have g77 on their
> unix machines, and to them, it isn't broken.

Perhaps your colleagues would be willing to look at your results and 
tell you whether there is a trivial fix for your problem.  gfortran is 
quite compatible with g77, and since g77 is no longer maintained, your 
colleagues will also have to replace it sooner or later.



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

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2014-02-12 22:53 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-12  4:35 g77 on cygwin64 Scott T. Marshall
2014-02-12  6:00 ` Marco Atzeri
2014-02-12  7:05   ` Scott T. Marshall
2014-02-12  7:24     ` Andrey Repin
2014-02-12  8:00       ` Arjen Markus
2014-02-12 16:04         ` Scott T. Marshall
2014-02-12 17:20           ` Marco Atzeri
2014-02-12 17:59             ` LMH
2014-02-12 19:38               ` Marco Atzeri
2014-02-12 17:36           ` Andrey Repin
2014-02-12 18:07             ` David Conrad
2014-02-12 19:11               ` Richard
2014-02-12 19:59                 ` Marco Atzeri
2014-02-12 21:37               ` Tim Prince
2014-02-12 19:41           ` Achim Gratz
2014-02-12 23:05           ` carolus
2014-02-12 16:16       ` Christopher Faylor
2014-02-12  7:31     ` LMH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).