public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Lars G Golmen <lars.golmen@niva.no>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Fortran issue
Date: Sat, 27 Aug 2022 13:19:22 +0000	[thread overview]
Message-ID: <OSWP279MB032540A197A2502028C67BC7E5749@OSWP279MB0325.NORP279.PROD.OUTLOOK.COM> (raw)

[-- Attachment #1: Type: text/plain, Size: 3235 bytes --]


Hello
I have an old, small Fortran 4 program doing some statistics on time series: Aandstat.
The .EXE file ran on 32 bits PC with like XP-OS, but not anymore on 64 bits.

A colleague on mine tried compile the attached code in gfortran.
The gfortran compilation gave a couple of error messages, gfortran does not seem to accept the “\” sign.
Is there a valid replacement for that sign (command) we can use, to get quickly forward?

Sorry for any inconvenience.

Best regards
Lars Golmen
----------------------------------------------------------------------------------------------------
Lars G. Golmen, oceanographer, senior research scientist, Adj. professor
NIVA, Norwegian Institute for Water Research - Bergen and Runde branch,
Tel: (47) 4789 0957, Address: c/o Runde miljøsenter, N-6096 Runde, Norway
Tokyo University of Marine Science and Technology, 4-5-7 Konan, Minato, Tokyo.
http://www.niva.no<http://www.niva.no/>
http://www.rundecentre.no<http://www.rundecentre.no/>
https://www.kaiyodai.ac.jp/english/
 << Fil: AANDSTAT.FOR >>
_____________________________________________
Frå: Shamil Iakubov <shamil.iakubov@niva.no>
Send: torsdag 25. august 2022 20:35
Til: Lars G Golmen <lars.golmen@niva.no>
Emne: RE: Fortran


Hi Lars!

Fortran is exciting, in fact it has evolved significantly during the last few years and it fits modern standards nowadays, except for the building system probably. Also, some of the most in demand machine learning libraries still use Fortran code.

Regarding your problem. I have tried to compile it with gfortran, it is a free open source compiler. It throws some errors:

```
(base) lmsh@l5:~/src/lars_fortran$ gfortran AANDSTAT.FOR -std=legacy -o program
AANDSTAT.FOR:27:22:

   27 |  10      WRITE(*,'(//,A\)')' OPPGI FILNAMN FOR INPUT DATA-->'
      |                      1
Error: Unexpected element ‘\’ in format string at (1)
AANDSTAT.FOR:30:17:

   30 |        WRITE(*,'(A\)')' OPPGI FILNAMN FOR RESULTAT (NY FIL)-->'
      |                 1
Error: Unexpected element ‘\’ in format string at (1)
(base) lmsh@l5:~/src/lars_fortran$

Some googling proved that the code is compiler specific. It can be compiled with the Intel compiler (ifort). Sadly it is not free now. I believe NIVA has VisualStudio license with ifort so your files can be compiled with visual studio solutions building system, but currently I don’t have access to these facilities.

Cheers,
Shamil

_____________________________________________
From: Lars G Golmen <lars.golmen@niva.no<mailto:lars.golmen@niva.no>>
Sent: torsdag 25. august 2022 13:29
To: Shamil Iakubov <shamil.iakubov@niva.no<mailto:shamil.iakubov@niva.no>>
Subject: Fortran


Hei Shamil
Nice to know you do Fortran.
I worked with Fortran many years ago, Fortran 4.. on old computers. My compliler no longer works.
Is it possible for you to recompile some source code I have, to work on present OS?
I attach an example, just one program, no subroutines to map here. To make some special statistics on a equidistant time series. Input file name to be provided, 2 columns w ascii data.
OK?
(I have several others..🙂)

Helsing
Lars G
 << File: AANDSTAT.FOR >>


[-- Attachment #2: AANDSTAT.FOR --]
[-- Type: application/octet-stream, Size: 5967 bytes --]

WARNING: multiple messages have this Message-ID
From: Lars G Golmen <lars.golmen@niva.no>
To: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Fortran issue
Date: Sat, 27 Aug 2022 13:19:22 +0000	[thread overview]
Message-ID: <OSWP279MB032540A197A2502028C67BC7E5749@OSWP279MB0325.NORP279.PROD.OUTLOOK.COM> (raw)
Message-ID: <20220827131922.H_PNYK8y5MBMbzngV7AGgCI_5AYTQ_WQp1I5pRxlFP0@z> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 3235 bytes --]


Hello
I have an old, small Fortran 4 program doing some statistics on time series: Aandstat.
The .EXE file ran on 32 bits PC with like XP-OS, but not anymore on 64 bits.

A colleague on mine tried compile the attached code in gfortran.
The gfortran compilation gave a couple of error messages, gfortran does not seem to accept the “\” sign.
Is there a valid replacement for that sign (command) we can use, to get quickly forward?

Sorry for any inconvenience.

Best regards
Lars Golmen
----------------------------------------------------------------------------------------------------
Lars G. Golmen, oceanographer, senior research scientist, Adj. professor
NIVA, Norwegian Institute for Water Research - Bergen and Runde branch,
Tel: (47) 4789 0957, Address: c/o Runde miljøsenter, N-6096 Runde, Norway
Tokyo University of Marine Science and Technology, 4-5-7 Konan, Minato, Tokyo.
http://www.niva.no<http://www.niva.no/>
http://www.rundecentre.no<http://www.rundecentre.no/>
https://www.kaiyodai.ac.jp/english/
 << Fil: AANDSTAT.FOR >>
_____________________________________________
Frå: Shamil Iakubov <shamil.iakubov@niva.no>
Send: torsdag 25. august 2022 20:35
Til: Lars G Golmen <lars.golmen@niva.no>
Emne: RE: Fortran


Hi Lars!

Fortran is exciting, in fact it has evolved significantly during the last few years and it fits modern standards nowadays, except for the building system probably. Also, some of the most in demand machine learning libraries still use Fortran code.

Regarding your problem. I have tried to compile it with gfortran, it is a free open source compiler. It throws some errors:

```
(base) lmsh@l5:~/src/lars_fortran$ gfortran AANDSTAT.FOR -std=legacy -o program
AANDSTAT.FOR:27:22:

   27 |  10      WRITE(*,'(//,A\)')' OPPGI FILNAMN FOR INPUT DATA-->'
      |                      1
Error: Unexpected element ‘\’ in format string at (1)
AANDSTAT.FOR:30:17:

   30 |        WRITE(*,'(A\)')' OPPGI FILNAMN FOR RESULTAT (NY FIL)-->'
      |                 1
Error: Unexpected element ‘\’ in format string at (1)
(base) lmsh@l5:~/src/lars_fortran$

Some googling proved that the code is compiler specific. It can be compiled with the Intel compiler (ifort). Sadly it is not free now. I believe NIVA has VisualStudio license with ifort so your files can be compiled with visual studio solutions building system, but currently I don’t have access to these facilities.

Cheers,
Shamil

_____________________________________________
From: Lars G Golmen <lars.golmen@niva.no<mailto:lars.golmen@niva.no>>
Sent: torsdag 25. august 2022 13:29
To: Shamil Iakubov <shamil.iakubov@niva.no<mailto:shamil.iakubov@niva.no>>
Subject: Fortran


Hei Shamil
Nice to know you do Fortran.
I worked with Fortran many years ago, Fortran 4.. on old computers. My compliler no longer works.
Is it possible for you to recompile some source code I have, to work on present OS?
I attach an example, just one program, no subroutines to map here. To make some special statistics on a equidistant time series. Input file name to be provided, 2 columns w ascii data.
OK?
(I have several others..🙂)

Helsing
Lars G
 << File: AANDSTAT.FOR >>


[-- Attachment #2: AANDSTAT.FOR --]
[-- Type: application/octet-stream, Size: 5967 bytes --]

             reply	other threads:[~2022-08-27 13:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-27 13:19 Lars G Golmen [this message]
2022-08-27 13:19 ` Lars G Golmen
2022-08-27 13:23 ` Arjen Markus
2022-08-27 13:23   ` Arjen Markus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OSWP279MB032540A197A2502028C67BC7E5749@OSWP279MB0325.NORP279.PROD.OUTLOOK.COM \
    --to=lars.golmen@niva.no \
    --cc=fortran@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).