Best fortran compiler for Windows 7?

In summary, it is recommended to use the GNU Fortran compiler for Windows, which is a free and high-performing compiler. To use it on Windows 7, you will need to install the CYGWIN system, which creates a POSIX compliant shell for use. There are many resources available, such as books and online tutorials, to learn how to use Fortran for programming.
  • #1
Machinus
3
0
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?
 
Technology news on Phys.org
  • #2
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
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
symbolipoint said:
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.
 
  • #5
Machinus said:
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.
 
  • #6
symbolipoint said:
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.
 
  • #7
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
jtbell said:
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 website 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! :smile:
 
  • #9
Simply Fortran by Approximatrix is a Win Doze variant of Gnu F90, and it is absolutely superb.
---
John
 
  • #10
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
 
  • Like
Likes Zitra
  • #11
symbolipoint said:
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.
 
Last edited by a moderator:
  • #12
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
 
  • Like
Likes FactChecker
  • #13
@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
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
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 knowledgeable 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 referring 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
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
Stephan: The easiest thing for you, I think, would be to stop loving 40 bucks and buy Simply Fortran.
 
  • #18
another sugestions please?
 
  • #19
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
I believe Intel's compiler is the best one on Win 7 but as SteamKing said, it's going to cost you (much $)
 
  • #21
Simply Fortran is great--but its price is now up to $99 (the last time I checked)
 
  • #22
I like Absoft Fortran. It is expensive. Especially with the imsslib libraries. Absoft technical support is excellent.
 
  • #23
What features do the more expensive compilers have that Simply Fortran doesn't have? Which piece of software is easiest to learn how to use?

I used to have a compiler called Compaq Visual Fortran, but it was expensive and only ran on 32 bit machines. When I got a new 64 bit computer, it would no longer run. Of course, they offered a 64 bit version of the software, but you had to buy this even if you had already owned the 32 bit version. No way. Also, the documentation on this software was desperately poorly written.

Chet
 
Last edited:
  • #24
Chestermiller said:
What features do the more expensive compilers have that Simply Fortran doesn't have?

The Simply Fortran compiler is just the GNU gfortran compiler, which is free. So you are not paying Simply Fortran for the compiler itself, just for the IDE that comes with it - and maybe for some documentation and tutorials as well.

If you just want the compiler, plus a set of unix-like utilities for Windows (including a debugger) you can get them from http://gcc.gnu.org/wiki/GFortranBinaries

The main issue with GNU gfortran is that it doesn't fully support either Fortran 2003 or 2008 (nor does it claim to) though it does have a few features from those language versions added on to Fortran 95. In particular, Fortran 95 is not really an object oriented language, though it supports some OO features. Fortran 2003 is a lot closer fuly supporting OO. For example the modularization options in F95 don't play well with attempting to create program libraries where you want to distribute only the binary code. Either you are driven towards putting the entire source code of the library into one file to compile it (which is going back to 1960s style computing!) or it is hard to hide the internal implenentation from the user.
 
  • Like
Likes 1 person
  • #25
Been a fortran writer for over 50 years,. Used to do special routines in assembler so they would run faster. Then fortran optimizing compilers
came along and suddenly fortran function calls were as fast as the hand-coded assembler ones. Goodbye assembler! Thirty years later started learning
C and it reminded me of my assembler days. Fortran subroutines would run faster and were easier to program so goodbye C. The only thing missing
in my fortran compilers was a visualization interface. So I programed up a general fortran callable C routine that would put up a window of arbitrary
size whose pixels could be colored any shade of red, blue and green. Now I have my own visual fortran that can do anything from graphing to
photo processing and make movies. One last anecdote. A few years MIT came out with a set of fast Fourier transforms that they labeled FFTW standing
for Fastest Fourier Transforms in the World. A post-doc of mine unwrapped CFFT(( which was the 3-D Fourier transform which came with
the Cray supercomputer. He then handled all the special cases so that he would;t waste time multiplying by zero, and we benchmarked it
against FFTW which was written in C. Our fortran version ran about 30% faster. I guess MIT should change their name to NFFTW.

Every time a new language comes out with a great feature, the next version of fortran usually has it. This is true of pointers and dynamic memory
allocation and many others. Gfortran is pretty nice and it is free, but my favorite was IBM''s XLF which was bulletproof and had quad-precision because
it as built for the IBM PowerPC chip which had 128 bit registers. Unfortunately when Apple upgraded their operating system from Tiger to Leopard,
all support for IBM software was dropped. I still have Tiger running on my old Mac Pro with a Power PC chip, and whenever I have a bug that
the other compilers can't find, I compile it on XLF and voilla, the error is found.
 
  • #26
For someone wanting to learn programming, I recommend TrueBasic (truebasic.com). It is a nice structured language, easy to learn, and powerful; not like the line-number orientated BASIC's of old. I have written many programs in TB. It is an allocated language, not compiled; hence, is a slower than FORTRAN or C++ (I have programmed in both). With today's GHz clock speed computers, the time difference is trivial.

The error checking is great, and programs can be easily written. There are IO defaults, so the Hollerith coding in FORTRAN can be avoided. Formatted output is much more intuitive than FORTRAN. It has built-in graphics, which FORTRAN lacks.
 
  • #27
bkm said:
With today's GHz clock speed computers, the time difference is trivial.
That depends on the application.
bkm said:
There are IO defaults, so the Hollerith coding in FORTRAN can be avoided.
"Hollerith coding" can already be avoided since the Fortran 90 standard (ISO 1991, ANSI 1992).
 
  • #28
jtbell said:
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.
Thirty years? That would be in the middle of the 1980s - no way! Make it fifty years - at least!
 
  • #29
I took a class at UW (Washington, not Wisconsin) in the summer of 1980, and they were still teaching Fortran as their entry-level Comp Sci course. We used keypunch machines and Hollerith cards, with our program deck sandwiched between a set of cards with JCL instructions. A couple of years later, I enrolled in a more advanced Fortran class, but after the instructor mentioned in class that he didn't know much about Fortran, and he wasn't up on the OS in use (recently installed VAX VMS). I don't think this guy was a part-timer, but I'm not sure. The icing on the cake for me was, that after the first hour-and-a half session, all that was on the blackboard (chalk in those days) was some meaningless nothing, written on a slant. I decided this wasn't the class for me. If I wanted to teach myself, I didn't want to have to be paying tuition as well.

The next summer course I took, in 1984, was a class advertised as Pascal, but actually in Modula-2. Sometime later, their intro course changed again, this time to C++. My rant above isn't meant to disparage the CS department at UW -- just the complete lack of preparation of the guy who was teaching the class. The instructor for the Modula-2 class was on the ball and knew what he was doing.
 
  • #30
This thread pre-dates dinosaurs as well as FORTRAN (hyperbole). I am not positive, but I believe "necroposting" is no-no here.
 
  • #31
Svein said:
Thirty years? That would be in the middle of the 1980s
Look at the date on the post that you quoted. :oldwink:
 
  • #32
jim mcnamara said:
This thread pre-dates dinosaurs as well as FORTRAN (hyperbole). I am not positive, but I believe "necroposting" is no-no here.
The thread was no that old. (It was still open for replies.) In any case, it seems to have been re-animated by a one-time poster with more interest in (and knowledge about) his own link than in (about) Fortran.
 
Last edited:
  • #33
@Krylov I agree. Apparently the rule is not hard and fast, which understandable. Mentor indicated that since it has had a stream of posts over time they feel it can stay.

Older PF threads are meant for reference usually. And they are a resource.
 
  • Like
Likes S.G. Janssens
  • #34
Historical trivia - I learned Fortran IV back in 1968 in high school, at a special Saturday class at an IBM data center (back in the days when many companies rented time on computers located at data centers). The high school had a Monrobot computer at the time that used some custom language called quickcomp, but a year later (1969), my high school got an IBM 1130 computer where I used Fortran IV, and assembly. My first job in 1973 on HP 2100 series computers was mostly assembly on a multi-computer / multi-threading database online system, using Fortran IV for the offline work. I also did some self-study programming in APL and Cobol at a local college computer center. I didn't start programming in C until the mid 1980's.

So getting back to the original question, since it's now 2016 and not 2011, what Fortran compilers are good for Windows 7 and later, perhaps 64 bit mode and possibly usage of SIMD / SSE instructions? How much of a trade off between good compiler and cost?
 

1. What is the best compiler for Fortran on Windows 7?

The best compiler for Fortran on Windows 7 is subjective and can vary depending on personal preferences and project requirements. Some popular options include Intel Fortran Compiler, GNU Fortran Compiler, and Silverfrost FTN95.

2. Is there a free Fortran compiler for Windows 7?

Yes, there are several free Fortran compilers available for Windows 7, such as GNU Fortran Compiler and Silverfrost FTN95. These compilers are open-source and can be downloaded and used for free.

3. Can I use a Fortran compiler on Windows 7 without a virtual machine?

Yes, Fortran compilers can be installed and used directly on Windows 7 without the need for a virtual machine. However, some compilers may require additional software or libraries to be installed for proper functioning.

4. What features should I look for in a Fortran compiler for Windows 7?

The features you should look for in a Fortran compiler for Windows 7 depend on your specific needs. Some important factors to consider include compatibility with your operating system, support for different Fortran standards, optimization capabilities, and debugging tools.

5. Are there any Fortran compilers specifically designed for Windows 7?

There are no Fortran compilers specifically designed for Windows 7, but there are compilers that are compatible with the operating system. It is important to check the system requirements of the compiler before installing it on your Windows 7 computer.

Similar threads

Replies
6
Views
1K
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
2
Views
2K
  • Programming and Computer Science
Replies
9
Views
1K
  • Programming and Computer Science
Replies
13
Views
5K
  • Programming and Computer Science
Replies
4
Views
4K
  • Programming and Computer Science
Replies
2
Views
14K
  • Programming and Computer Science
Replies
2
Views
3K
  • Programming and Computer Science
Replies
4
Views
2K
Back
Top