INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Trying to compile example from intel fortran website using gfortran compiler

Trying to compile example from intel fortran website using gfortran compiler

Trying to compile example from intel fortran website using gfortran compiler

(OP)
I am trying to compile the sample code provided in example 1 of [this link][1] using GNU Fortran. I have placed the source code in a .f95 file called "Test" and tried to compile it in `cmd` using

`gfortran test.95`

This throws quite a few errors as shown below:

C:\Program Files (x86)\mingw-w64\i686-5.1.0-posix-dwarf-rt_v4-rev0>echo off
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\>D;
'D' is not recognized as an internal or external command,
operable program or batch file.

C:\>D:

D:\>cd TEMP\FortranTest

D:\TEMP\FortranTest>gfortran test.f95
test.f95:8:20:

GENERIC :: READ (FORMATTED) => UDIO_READ_ARRAY
1
Error: Expected '=>' at (1)
test.f95:12:17:

INTERFACE WRITE(FORMATTED)
1
Error: Syntax error: Trailing garbage in INTERFACE statement at (1)
test.f95:13:21:

MODULE PROCEDURE UDIO_WRITE_ARRAY
1
Error: MODULE PROCEDURE at (1) must be in a generic module interface
test.f95:14:5:

END INTERFACE
1
Error: Expecting END MODULE statement at (1)
test.f95:51:6:

USE TYPES
1
Fatal Error: Can't open module file 'types.mod' for reading at (1): No such file
or directory
compilation terminated.

D:\TEMP\FortranTest>

Why is this happening? How can I fix it?

[1]: https://software.intel.com/en-us/node/678729

RE: Trying to compile example from intel fortran website using gfortran compiler

Did you read the manuals? You are ostensibly using a compiler than was current 22 years ago with Fortran code for a contemporary compiler.

TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm

RE: Trying to compile example from intel fortran website using gfortran compiler

Quote:

You are ostensibly using a compiler than was current 22 years ago with Fortran code for a contemporary compiler.

???

MinGW is still actively supported as far as I know. The latest version for download is from 2013. That said, it isn't necessarily going to be compatible with code written for the Intel compiler.

awa5114 - have you checked that your compiler is working properly with a simpler example from the MinGW site?

Doug Jenkins
Interactive Design Services
http://newtonexcelbach.wordpress.com/

RE: Trying to compile example from intel fortran website using gfortran compiler

Generic keyword is supported in the latest gfortran. Which version are you using?

Sorry - take that back - gfortran doesn't currently fully support user defined IO.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close