You are not logged in.

#1 2019-01-26 15:23:09

huzo11
Member
Registered: 2018-10-31
Posts: 60

Could not find a legit FORTRAN compiler or IDE

Hello, 
So I currently need a fortran compiler. I learned about intel-fortran-compiler and openwatcom's fortran compiler. But when I install them, I for some reason cannot run the packages. When I try to do, I get an error saying that there is no such command. But they are listed in pacman -Q. What could be the reason? Or do you know any other legit fortran compiler that would do the job? 

Thanks!


Be nice and live for others.
https://prismatically.blog

Offline

#2 2019-01-26 15:29:49

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,648

Re: Could not find a legit FORTRAN compiler or IDE

But when I install them, I for some reason cannot run the packages.

What exactly have you installed? What commands have you tried, and what is the output? Have you tried https://www.archlinux.org/packages/core … c-fortran/ ?

https://bbs.archlinux.org/viewtopic.php?id=57855

Moving to Newbie Corner.

Offline

#3 2019-01-26 16:25:15

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Could not find a legit FORTRAN compiler or IDE

+1 for GCC Fortran. The code it produces is pretty fast these days, so I would not bother with Intel Fortran anymore. The performance gain is probably not worth the hassle. At least that has been my experience with GCC Fortran vs proprietary Fortran compilers.

Offline

#4 2019-01-27 12:02:28

huzo11
Member
Registered: 2018-10-31
Posts: 60

Re: Could not find a legit FORTRAN compiler or IDE

Morn wrote:

+1 for GCC Fortran. The code it produces is pretty fast these days, so I would not bother with Intel Fortran anymore. The performance gain is probably not worth the hassle. At least that has been my experience with GCC Fortran vs proprietary Fortran compilers.

A newbie question: How can I compile and run my .for fortran code file? 

Thanks


Be nice and live for others.
https://prismatically.blog

Offline

#5 2019-01-27 12:05:50

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Could not find a legit FORTRAN compiler or IDE

huzo11 wrote:
Morn wrote:

+1 for GCC Fortran. The code it produces is pretty fast these days, so I would not bother with Intel Fortran anymore. The performance gain is probably not worth the hassle. At least that has been my experience with GCC Fortran vs proprietary Fortran compilers.

A newbie question: How can I compile and run my .for fortran code file? 

Thanks

Something like

f95 -o my_prog my_prog.f90

should work I think.

Of course larger Fortran codebases like scientific models usually have Makefiles, so you really only invoke the Fortran compiler manually for smaller projects.

Maybe you have change the file extension by the way. .f/.for is usually Fortran 77 (fixed column format) and .f90 is Fortran 90 and later. I am not sure if the compiler will detect the correct language version on its own or if it uses the extension. Newly written code normally has the .f90 extension.

Last edited by Morn (2019-01-27 12:13:09)

Offline

#6 2019-01-27 12:13:07

huzo11
Member
Registered: 2018-10-31
Posts: 60

Re: Could not find a legit FORTRAN compiler or IDE

Morn wrote:
huzo11 wrote:
Morn wrote:

+1 for GCC Fortran. The code it produces is pretty fast these days, so I would not bother with Intel Fortran anymore. The performance gain is probably not worth the hassle. At least that has been my experience with GCC Fortran vs proprietary Fortran compilers.

A newbie question: How can I compile and run my .for fortran code file? 

Thanks

Something like

f95 -o my_prog my_prog.f90

should work I think.

Of course larger Fortran codebases like scientific models usually have Makefiles, so you really only invoke the Fortran compiler manually for smaller projects.

Maybe you have change the file extension by the way. .f/.for is usually Fortran 77 and .f90 is Fortran 90 and later. I am not sure if the compiler will detect the correct version on its own or if it uses the extension. Newly written code normally has the .f90 extension.

It does work! Thanks. However, I was asked to use f77. Is there a way to use that specific "version"? Or would saving the file in .for format and running it with f95 would be the same thing?

Thanks


Be nice and live for others.
https://prismatically.blog

Offline

#7 2019-01-27 12:16:48

Morn
Member
Registered: 2012-09-02
Posts: 886

Re: Could not find a legit FORTRAN compiler or IDE

huzo11 wrote:

It does work! Thanks. However, I was asked to use f77. Is there a way to use that specific "version"? Or would saving the file in .for format and running it with f95 would be the same thing?

Thanks

Yes, just use the correct extension. The GNU Fortran 77 compiler has been discontinued and Fortran 77 support is now included with regular GNU Fortran.

Offline

#8 2019-01-27 12:22:53

judd1
Member
Registered: 2015-09-04
Posts: 260

Re: Could not find a legit FORTRAN compiler or IDE


This isn't right. This isn't even wrong.
-- Wolfgang Pauli --

Offline

Board footer

Powered by FluxBB