# Best fortran compiler for Windows 7?

1. Jan 21, 2011

### Machinus

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?

2. Jan 22, 2011

### anti-proton

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.

3. Jan 23, 2011

### symbolipoint

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?

4. Jan 23, 2011

### anti-proton

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.

5. Jan 23, 2011

### symbolipoint

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.

6. Jan 23, 2011

### Grep

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.

7. Jan 23, 2011

### Staff: Mentor

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.

8. Jan 23, 2011

### Grep

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!

9. Sep 23, 2011

### PhysixForum

Simply Fortran by Approximatrix is a Win Doze variant of Gnu F90, and it is absolutely superb.
---
John

10. Sep 25, 2011

### uart

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/ftn95_personal_edition.aspx

11. Sep 25, 2011

### MarcoD

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.

Last edited: Sep 25, 2011
12. Sep 26, 2011

### PhysixForum

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

13. Dec 31, 2011

@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! 14. Nov 19, 2012 ### beezle 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') 15. Nov 20, 2012 ### gsal 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. 16. Jul 4, 2013 ### Stephan_doc 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! 17. Jul 4, 2013 ### gsal Stephan: The easiest thing for you, I think, would be to stop loving 40 bucks and buy Simply Fortran. 18. Jul 11, 2013 ### Stephan_doc another sugestions please? 19. Jul 13, 2013 ### SteamKing Staff Emeritus There are only so many compilers out there for Fortran. I recommend you consult www.fortran.com for some commercial compilers and various tools. In addition to Absoft, Lahey, etc. Intel markets a compiler but it is a bit pricey. There are some compilers from the UK (NAG and Salford), likewise which cost a bit. The trick with using these tools is to get them to interface with Windows, so you are not running your code in a console window. There are packages of routines available to work with the various compilers, but they too cost$ and take some time to learn. You find yourself learning how Windows works, creating and managing windows and such, and less how to solve your problem with Fortran code.

I personally used to program quite a bit in MS-DOS, but I hit the wall when programming under Windows, even though I had a compiler and some tools, because of the complexity of laying out and managing various windows for input/output, etc. With MS-DOS, you could program on the fly, so to speak, but Windows doesn't permit this kind of spontaneous activity, at least in my experience.

20. Jul 13, 2013

### Aero_UoP

I believe Intel's compiler is the best one on Win 7 but as SteamKing said, it's gonna cost you (much \$)

Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted