You are not logged in.
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
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
+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
+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
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.f90should 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
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.f90should 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
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
This isn't right. This isn't even wrong.
-- Wolfgang Pauli --
Offline