Register to reply

Best fortran compiler for Windows 7?

by Machinus
Tags: compiler, fortran, windows
Share this thread:
Machinus
#1
Jan21-11, 05:08 PM
P: 3
Due to research changes I have to switch from C++ to Fortran development. In the past I have used Microsoft development tools since they are free for students, but afaik they do not have similar software for Fortran, and the Intel software is a little too expensive for me to afford.

Which compilers are the best for Windows? If you use Fortran on Windows, what do you use?
Phys.Org News Partner Science news on Phys.org
Apple to unveil 'iWatch' on September 9
NASA deep-space rocket, SLS, to launch in 2018
Study examines 13,000-year-old nanodiamonds from multiple locations across three continents
anti-proton
#2
Jan22-11, 08:58 PM
P: 6
Have you tried the GNU fortran compiler? GNU makes a wonderful compiler, which often outperfroms other compilers, and is totally free.

If you want to use it in Windows 7 you will need to use the CYGWIN system. This creates a tiny POSIX compliant shell for you to use.

http://www.gnu.org/software/gcc/
http://gcc.gnu.org/install/binaries.html

GNU is always a good place to start. The GCC can also compile C, C++, and many more. I use it as an assembler.


Enjoy.
symbolipoint
#3
Jan23-11, 02:45 PM
HW Helper
PF Gold
P: 2,822
I visited that www.gnu.org link above. All the steps of understanding are missing.

What does a person need to know if he has Windows XP, or Windows Vista, and he wants to learn to use a programming language like FORTRAN? Person does not understand Windows, but just knows how to USE Windows. Person has either very limited or no programming knowledge. So what is the missing information and the missing steps to begin to learn how to use and create programs in FORTRAN?
... cygwin? What is it? What does it do? How do you apply it? How do you understand it?

anti-proton
#4
Jan23-11, 05:57 PM
P: 6
Best fortran compiler for Windows 7?

Quote Quote by symbolipoint View Post
I visited that www.gnu.org link above. All the steps of understanding are missing.

What does a person need to know if he has Windows XP, or Windows Vista, and he wants to learn to use a programming language like FORTRAN? Person does not understand Windows, but just knows how to USE Windows. Person has either very limited or no programming knowledge. So what is the missing information and the missing steps to begin to learn how to use and create programs in FORTRAN?
... cygwin? What is it? What does it do? How do you apply it? How do you understand it?


The original question asked about the best compilers from Fortran, not a full explanation of the use of Fortrans with respect to Windows. Fortran isn't really a good language to start with, if your learning. Consider an easier language to start with, like Java or Java Script.

Learning to program isn't hard but it takes work and time. I would advise you to go get a good book, SAMs publishing is great, and pick a language to learn.
symbolipoint
#5
Jan23-11, 06:13 PM
HW Helper
PF Gold
P: 2,822
Quote Quote by Machinus View Post
Due to research changes I have to switch from C++ to Fortran development. In the past I have used Microsoft development tools since they are free for students, but afaik they do not have similar software for Fortran, and the Intel software is a little too expensive for me to afford.

Which compilers are the best for Windows? If you use Fortran on Windows, what do you use?
In addition to wanting to know "what", I am also interested in wanting to know "how" and including other required software to be used with the FORTRAN in Windows 7. FORTRAN was offered as a language to learn on for beginners many years ago; maybe that has changed.
Grep
#6
Jan23-11, 06:23 PM
P: 296
Quote Quote by symbolipoint View Post
FORTRAN was offered as a language to learn on for beginners many years ago; maybe that has changed.
I've been programming for around 30 years, and I'm not so sure that was good advice even 30 years ago. I'd suggest FORTRAN to a beginner if I felt like torturing them, perhaps.

FORTRAN sees little use outside of certain scientific uses, these days. I'll admit it, I don't like FORTRAN much. It does a few things well, and I won't argue that, but I'd never start writing new software in FORTRAN these days, given a choice.

Pascal, on the other hand, was excellent to teach structured programming. Don't know that I'd still suggest it, but I'd put it well above FORTRAN for teaching. But I digress.
jtbell
#7
Jan23-11, 09:18 PM
Mentor
jtbell's Avatar
P: 11,777
Thirty years ago, if you wanted to learn programming, you learned Fortran if you were a science guy, or Cobol if you were a business guy, or Basic if you were a hobbyist. All three are now pretty much niche languages. In the US, the most common introductory programming languages in high schools, colleges and universities nowadays are probably Java and C++. There are many textbooks for introductory Java and C++ courses.
Grep
#8
Jan23-11, 10:33 PM
P: 296
Quote Quote by jtbell View Post
Thirty years ago, if you wanted to learn programming, you learned Fortran if you were a science guy, or Cobol if you were a business guy, or Basic if you were a hobbyist. All three are now pretty much niche languages. In the US, the most common introductory programming languages in high schools, colleges and universities nowadays are probably Java and C++. There are many textbooks for introductory Java and C++ courses.
Agreed. As I recall, BASIC was based somewhat on FORTRAN, and meant to be simpler for beginners to use. I started on BASIC, myself.

Anyways, to the OP, Cygwin is sort of a UNIX on Windows. Not too hard to install. I'm sure there's instructions on the Cygwin site. When you're installing it, you get to select packages to install. Of those, gcc and friends (including, I presume, FORTRAN) are some of the choices. I figure there must be some other compilers for Windows, but that's the only one I know, these days. A Google search may find more.

Here's one page with a list (first hit on Google looking for "Fortran compilers for Windows"):

http://www.thefreecountry.com/compilers/fortran.shtml

Cygwin's web site is at: http://www.cygwin.com/

There's links to the setup.exe binary you need to run to get started installing it, as well as instructions. It's not really hard to install. That should get you started. If you get stuck, you know where you can find us!
PhysixForum
#9
Sep23-11, 06:49 PM
P: 3
Simply Fortran by Approximatrix is a Win Doze variant of Gnu F90, and it is absolutely superb.
---
John
uart
#10
Sep25-11, 09:11 AM
Sci Advisor
P: 2,751
Again this is another old thread that's been bumped, but I'll add some more to it anyway.
Since the previous post links to a 30 day trial (it my be good software though, I've never tried it) I'll post a couple of freeware options.

1. The gnu g95-minGW compiler is a good freeware option. It's only a command-line compiler but it has the advantage that it produces stand-alone exe files.

- Download the self extracting Windows x86 file, "g95-minGW.exe" here: http://ftp.g95.org/


2. The Silverfrost ftn95 compiler. This one comes with a nice IDE (editor and debugger). On the negative side this one needs the supplied Salford library and dll files to run the complied executables, and the freeware version has a nagware time delay of about 8 seconds after program load. The nice thing however is that you can edit and debug in a nice IDE and when you're finished the code is usually portable enough to just compile it with the g95 compiler, linked above, to get a stand alone exe if you want it.

- Download the "Silverfrost ftn95 personal" here: http://www.silverfrost.com/32/ftn95/...l_edition.aspx
MarcoD
#11
Sep25-11, 10:56 AM
P: 98
Quote Quote by symbolipoint View Post
I visited that www.gnu.org link above. All the steps of understanding are missing.

What does a person need to know if he has Windows XP, or Windows Vista, and he wants to learn to use a programming language like FORTRAN? Person does not understand Windows, but just knows how to USE Windows. Person has either very limited or no programming knowledge. So what is the missing information and the missing steps to begin to learn how to use and create programs in FORTRAN?
... cygwin? What is it? What does it do? How do you apply it? How do you understand it?
Conceptually, small-scale programming shouldn't be very hard if you're a physicist and used to math and symbolic algebraic manipulations. A program is something which is written in a programming language and can be translated to machine code runnable by a computer. (In layman speak, the latter is a .EXE file.) Conceptually, most programs just manipulate data. The minimal requirements for translating source code to machine code is a program called a compiler, like a FORTRAN or a C compiler.

There are little reasons to still learn FORTRAN unless you're interested in writing fast numerical algorithms or supercomputer simulations, both of which FORTRAN specializes in because of historical reasons. [Anyway, you need to be a specialist to do that, so that's out of bounds anyway if you're still learning.] By CS standards, it isn't a language which promotes good software engineering, so I wouldn't start there to learn programming.

If anything, start of with C or C++, buy a good book on it, and if you're going to do anything numerical there's always the 'Numerical Recipes in C' book.
PhysixForum
#12
Sep26-11, 06:04 AM
P: 3
Fortran is extremely efficient when developing software for numerical modelling, and it is highly valued for this purpose by scientists and engineers. In my opinion, it is also a high-level language that is the servant, not the master, of the person using it.

I mentioned Simply Fortran in a previous post because it is so cheap that it is almost free (compared with most commercial Fortran compilers) yet I have found it better by far than the commercial package, Compaq Visual Fortran, which I have used in the past. It is easily the best sixteen quid I have ever spent on software development.

Simply Fortran is no more than an IDE for Gnu F90, but
- (i) Gnu F90 is now excellent, and
- (ii) SF is, in my view, superb.

Included in the package are,
- a Fortran-aware editor,
- on-the-fly syntax checking,
- very good project organisation tools,
- Source level debugger,
- and more.

More info can be found at [http://simplyfortran.com/home/].

Why am I plugging this so hard? In part because I really do believe all that I say about it, and in part because I am extremely keen to see initiatives like this supported, because this benefits all Fortran users.
---
John Wasilewski
NeedMorePower
#13
Dec31-11, 10:14 PM
P: 2
@John Wasilewski: I downloaded it yesterday, and couldn't agree more! I threw a few programs at it, and compiling was a snap (once I modified a few default settings, but they were straight-forward). I already had CygWin for Octave, but both versions happily co-exist. The $25 registration fee is more than worth it, IMO. Thanks for your input!
beezle
#14
Nov19-12, 09:42 PM
P: 1
Well I had to re-register just to respond to some of the drivel that has been posted in this thread. @Greg and @MarcoD: Have you ever programmed anything in Fortran? Like in the past twenty years? Maybe you missed F90 or F2003 or the current F2008? Before dissing the language maybe you should at least try to be familar where it is today and forget your memories of FOTRAN IV or 77 or the 'oh fortran sucks it has gotos' mantra from CS ivory towers.


Fortran was and still is a great language and has all the 'modern' features. While its primary use still remains in high performance scientific computing, it is still a general purpose language and one I would take over the likes of C++ any day (java too ignoring the over played issue of 'portability')
gsal
#15
Nov20-12, 08:50 AM
P: 879
A couple of things.

Just because Fortran had to start with GO TOs, it does not mean you have to use them now; in fact, they are discouraged. And yes, Fortran has been around for a reason over 50 years, and it's a good reason.

Fortran has many features, now, that C or C++ don't have. Fortran lends itself for better optimization more easily right out of the box. Sure, sometime ago I read that a benchmarking C++ program had been compiled to run faster than the one in Fortran...but they don't mention what kind of effort they put into optimizing C++ to achieve that...I can assure you it was a lot and by very very knowledgable people and not your regular c++ programmer.

In any case, Fortran is easy to learn...you can do a lot with a few structures. It can handle arrays a-la-matlab. Did I mentioned that matlab's back bone's linear algebra package is written in Fortran 90?

If has "IF", "DO", "WHILE", "SELECT", "WHERE", "FORALL", masking arrays, etc. I has structures, type definitions, pointers, and the list goes on.

Oh, one last thing...up above, I read somebody refering to GNU g95...this is wrong, g95 is not part of the GNU tool chain. I don't remember the history, but g95's author might have been part of the GNU team way back, but I think he split and created g95.

I do like the Simply Fortran initiative, too.
Stephan_doc
#16
Jul4-13, 09:27 AM
P: 31
Hello to all. I need an Fortran Compiler for Windows 7 version 64 bytes operating system. Who can help me and which is the simplest method to get it. If exist a tuturial that can help me to solve my problem. Thank a lot!
gsal
#17
Jul4-13, 09:48 AM
P: 879
Stephan: The easiest thing for you, I think, would be to stop loving 40 bucks and buy Simply Fortran.
Stephan_doc
#18
Jul11-13, 09:32 AM
P: 31
another sugestions please?


Register to reply

Related Discussions
64 bit windows fortran compiler Programming & Computer Science 4
Need help installing fortran compiler... Programming & Computer Science 2
Fortran Compiler and C Preprocessor Programming & Computer Science 3
C or FORTRAN compiler for Vista? Programming & Computer Science 10
NEED HELP with fortran compiler ASAP Programming & Computer Science 2