Fortran development environments for Linux

Fortran development environments for Linux

Historically, the only development tool that I have opted to use has been vim. Vim works well, but I've been reading more and more folks make convincing arguments, usually while discussing development in more common languages like C/C++/Java, for the use of integrated development environments (IDEs).

What's out there in the way of IDEs that support Fortran in Linux? I'm aware of Eclipse/Photran and Kdevelop, but don't have any real experience with them. Are they worth the hassle of installation? (Photran, in partcular, seems non-trivial to install, and requires particular versions of Eclipse, which makes me a little wary.)

Any opinions or information would be appreciated

Thanks,
Greg

22 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

The silence is deafening :)

Photran/Eclipse is pretty much it. Like you said, the installation is not straightforward and the integration is not 100% complete. This is an area where Windows is light years ahead of Linux. It is surprising that someone hasn't come up with a better Fortran-aware IDE.

Personally, I use vim for editing and have a separate window for compiling/debugging. Do try our graphical debugger, IDB, that comes with compiler version 11.0. It's much easier than using gdb and it's Fortran aware, and the GUI is quite intuitive. You will need JRE 1.5 or 1.6 installed.

ron

off course as a Vi user you forgot Emacs :P

there's also kdevelop (http://www.kdevelop.org)

for debugging, ddd is also a good GUI and accepts gdb and idb...

My opinion is that Visual Studio + Intel Fortran is probably the best thing out there for a fortran developer. The only drawback is that it is available for Windows only.

Although it is an Intel forum, I would recommend you to try Sun Studio 12. It comes with an IDE that is based on NetBeans. Sun Fortran and C/C++ compilers are included (using other compilers, such as gnu, is possible as well). If you need MPI stuff for your work it that can be downloaded from Sun's website, too. The IDE is not as nice as Visual Studio, but good enough for most situations (At least I use it 80% of the time when I do fortran programing). There are some things that I do not like about it, but, on the other hand, there are a few things that are more convenient there than in VS. It is not difficult to install and use, and Fortran seems to be fully integrated. What I do not like about this IDE is the fact that you cannot have two instances of it and run two (or more) debugging sessions simultaneously, side by side (at least I do not know how). Other than that it is good enough.

As far as simple source editing is concerned, I really like gedit and would prefer it to vi. Having colored syntax is helpful.

Sergiy

Quoting - bubin

As far as simple source editing is concerned, I really like gedit and would prefer it to vi. Having colored syntax is helpful.

Sergiy

Both vi and emacs have syntax highlighting so it should not be a preference criteria between them and any other alternative.

Quoting - rreis

Both vi and emacs have syntax highlighting so it should not be a preference criteria between them and any other alternative.

My bad... Yes, I knew about Emacs. I guess the fact that I use vi pretty much only on remote computers accessed via ssh made me forget that it does actually support color highlighting. :-)

Have you ever used Scitools Understand? I used it in the past for a short time (it's a commercial product), and it makes available some features that are very usefull when you have to study cryptic code written by someone else.

Can anyone please tell me an IDE that supports fortran and have debugging for MPI? MPI is a nightmare to debugg without a tool. I'm using ubuntu 10.04 and I installed eclipse helios with photran update on it but it does not understand that ifort is installed. ifort is available via the terminal. what should I do with this?

There are plenty of reviews of on-line MPI debuggers at all price levels. Regardless of your tool, source'ing the ifortvars script is required; either explicitly or in your setup.

I need a debugger for the course project that I have this semester, so I'm looking for a freeone, does this narrow the plenty of debuggers to something else than eclipse?
I used to use the visual studio+intel fortran so I don't know what is vars script, I'm also new to ubuntu, how should I do this? or where can I learn how to do this?
I used the command: source /opt/intel/Compiler/11.1/073/bin/ifortvars.sh ia32 in terminal and it worked I think( there was no error) but I'm still having the same problem, eclipse cant find ifort.
should I install ifort after eclipse again? I'm using http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/dr... for eclipse and:
http://www.eclipse.org/downloads/download.php?file=/tools/cdt/releases/h...
http://www.eclipse.org/downloads/download.php?file=/tools/ptp/builds/hel...
as updates, please tell me they are right and my problem is somewhere else

Intel Fortran provides the Intel Debugger (idb) - we recommend that you use it. Eclipse is not itself a debugger. One can invoke gdb from Eclipse, but if you wanted gdb you could use it from the command line as well.

Retired 12/31/2016

Dear Steve,I was used to VS an Fortran in Windows, but now I have migrated to Linux. As long as I've been reading documentation I have find no similar to VS. As I understand, so, there is no IDE like VS for Linux and compilation is direct from command line. Am I correct?On the other hand, there is IDB with GUI, where I can even visualize source code. So the strategy in Linux would be?1 - use some editor for source code (gedit, vi, etc...);2 - compile source files;3 - verify generated code in IDB;4 - return to the editor for changing source code;5 - recompile source file;6 - go through the cycle of debugging, etc...Or is there some other way?best RegardsMarcio PMZ

That is the approach we support. There is no standard IDE for Fortran on Linux. Photran in Eclipse is under development, and someone has done a Code:Blocks implementation as well. You can try them but we don't provide support for them.

Retired 12/31/2016

Hi,I'm using vim for the development of my codes, too. If many people of intel are using it, why not create/mantain specific configuration files for vim in order to compile directly in the editor? I think the main problem at this moment is the highlight for the features of fortran supported by ifort, and recognize all the error/warning during the compilation, through makefile or directly using the compiler setting.Thanks

Let's not have the "vi or emacs" wars find their way here too! :-)

Retired 12/31/2016

Steve thanks for your kindly attention and your answer.

In addition, I have read that Photran does not call the compiler, instead it reads a make file which calls the compiler. So I will have to understand what is a make file. More than this, how could I prepare this make file? Is there some tool provided with Intel Fortran Composer to do this make file? In a nutsheel, does it pay the pain?

I am already rather trying to get used to command line as optional strategy. Which way is the most productive or the most appropriate?

Thanks.

Marcio PMZ

One more question,
which is so simple that I am embaressed to ask: Why does Intel provide so nice a compiler, like ifort, and even an IDB, but does not provide IDE, as it would be necessary just a editor source editor to add to the IDB?

Thanks,

Marcio PMZ

There's a lot more to an IDE than "just a source editor". We do not develop our own IDEs - we will use what is popular on a given platform. On Windows, that is Visual Studio. On Mac OS, that is Xcode, though Apple makes it difficult for this to work right.

On Linux, there is no single dominant IDE, and most of our Linux customers want to use the command line. I have seen emacs turned into an IDE of a sort, and of course there is Eclipse and Photran. We have supplied some help to the Photran project but there's not enough demand for this from our customer base to devote significant resources to it. My understanding is that Photran builds the makefile itself - you shouldn't have to - but I admit I have not played with it myself.

Code:Blocks looks intriguing as well. I played very briefly with a Windows version of this, but could not get it to work fully. It does claim to support Intel Fortran, though you'll have to play with the folder names if you are using version 12 of the compiler.

Retired 12/31/2016

I have been happily using the Eclipse/Photran & ifort combination for over 12 months now and I thought I'd mention that

  • in my experience, installing Eclipse & Photran is painless and straightforward
  • I have no experience with VS so I can't compare to that, but I find the ifort integration in Photran to be very smooth
  • Photran supports a fair few refactorings
  • The Linux tools plugin for Eclipse has been great: http://www.eclipse.org/linuxtools/. I use it mostly for managing the autoconf/automake side of my project. I do not use managed makefiles and the like, which a lot of people seem to do with eclipse. The Linux Tools plugins also manage interaction with gprof, valgrind and a few other staples of gnu/linux development, although I still use those from the command line (no particular reason, just haven't switched yet)
  • The subversive plugin for Eclipse manages version control repositories just fine
  • Eclox is a neat eclipse plugin that deals with Doxygen, which supports Fortran (95 completely, and 2003 mostly in the most recent release) well and generates beautiful documentation from in-source documentation

I have been trying to move from windows to Linux some monthes ago too. the most straight forward way seems to be using terminal (of course if you write all your code in a single file, else dependencies kill you).
My reason was to use MPI which yet I have a lot of problems with, I tired eclipse because it has a BIGGGG advantage of supporting PTP which let you debug your parallel program.
Unlike Rohou I could not managed to integrate ifort with eclipse at all! but I could easily integrate eclipse with gfortran, just after installing gfortran it was working very well in eclipse but whenever I tried ifort it just kept saying could not find ifort!!!!!
but have to say I couldn't make a MPI project in eclipse yet and that is really bothering how this eclipse project is distracting, I really worth windows now and its consistency.
If someone can help me on integrating ifort on eclipse(I'm using eclipse helios 3.6 and have installed photran on it just like mentioned in the installing guide on a Ubuntu 10.04) I would be gratefull.
THE BIGEST help would be to show me a way to debug MPI codes

@anishtain4: two things:
1. Are you sure that you have installed the Linux Intel Fortran Compiler Support when you installed the Photran plugin? To check whether you have done this, in Eclipse go to Help > Install New Software..., click on the "already installed" link in that window, and in the new window, under the "Installed Software" tab, you should see "Linux Intel Fortran Compiler Support". If you don't then you need to install it. See step 6 there: http://wiki.eclipse.org/PTP/photran/documentation/photran6#Installing_on...
2. Are you sure that ifort is set up in the environment that Eclipse is started? It could be for example that you are sourcing the ifort setup script (ifortvars.csh or the like) from your .cshrc file, which means that ifort will be setup for your shell sessions, but not necessarily in your desktop environment for example. To be sure, source the ifort setup script, check you can call ifort, then start eclipse from that same command line / shell.

Hope this helps!

1. Yep that is installed and I can see the toolchain while I'm making a new project.
2. The variables are set in the .bashrc file, maybe that is this, I'll check it later, now I'm in middle of final exams and all I'm trying to do is to finish this MPI course successfully.
Thanks anyway, I return to this later cuz I really need to learn linux stuff

Leave a Comment

Please sign in to add a comment. Not a member? Join today