Fortran IDE (Integrated Development Environment)

Which is your favorite fortran IDE (if any) and why?

Myself,

  • I’ve started coding with vi (I’m still using it for small test codes)
  • Now on macOS, I’m using, Eclipse, but the refactoring features don’t work well with large codes and they become useless.
  • I’m thinking to move to atom.io (I’m trying it), the content assist, hover features seem to work better than in Eclipse
5 Likes

I have no favorite IDE. I am generally just using the text editor (+ terminal) of my desktop: Kate in KDE, Gedit in GNOME… Sometimes I use vim. I have also used Geany in the past.
More generally, I try, when possible, not getting stuck into one tool. On the long term, it makes migrations easier…

1 Like

My choice is Sublime (+ terminal). For remote work through the terminal I just stick with vim or nano. The SublimeFortran package provides Fortran syntax highlighting and snippets, however there are still a few inconsistencies with recent Fortran syntax features.

Atom and VSCode have a very similar feel to Sublime, however for me the speed of Sublime wins big time. I can have 30+ files open simultaneously and experience no lag. I also like the multi-cursor feature. The biggest downside is the 80 $ license fee; it does however allow you to install on multiple computers (I’ve got it on 4 computers). Without the license you get an annoying popup message every 40 or so number of times you save a file.

When I first learned programming (on a computer with Windows) I just used notepad++ and a precompiled gfortran binary.

I’ve been using bare-bones Vim (no plugins) since 2006.

For bigger projects I’ve been using Atom since 2015, but my experience with it has been getting worse over time (slow slow slow).

I only recently started using VS Code which has a similar feel to Atom but is much faster and seems like it has a richer ecosystem of plugins. Again, I only use these over Vim if I have many modules or a large external dependency, so they help with suggestions and autocomplete of imports. When I do use them, I have a Vim plugin enabled, so they behave like Vim. VS Code’s Vim plugin is considerably better than Atom’s, IMO.

1 Like

VS Code is pretty good with these extensions:

But not ideal. Certainly not what other languages have.

Unfortunately there is no good VS Code integration with the Intel Fortran compiler (linter, debugger, etc). On Windows, Intel’s intellisense integration with regular Visual Studio has always been terrible.

The lack of a real full featured cross-platform and free IDE for Fortran is a major problem for the language.

3 Likes

I’ve been using Vim since about 2000, and very recently switched to Neovim. No plugins in either. The reason I use Neovim is that I set it up to automatically save the current file when the terminal with the editor loses focus. So I simply edit a file, switch to another terminal (which saves the file) and compile + run.

I also use VSCode, mostly for reading code.

3 Likes

I’ve been using emacs for ~3 decades since loosing access to a VAX and EDT. emacs was much more like EDT that the alternative, vi. emacs does code coloring, auto-indenting, and end statement autocomplete. Recently, the native one in a Mac terminal window. emacs is included as part of most Unix-like systems.

I am using Simple Fortran on Windows (https://simplyfortran.com/), it is not free, but it installs the gfortran seamlessly and you can pay an additional fee if you would like additional packages (http://packages.simplyfortran.com/account/new.html).

I am also using VS Code. Works well.

1 Like

Code::Blocks (http://cbfortran.sourceforge.net/) is a great option for an IDE on Linux and Windows.

For users on Windows, Visual Studio by Microsoft is a must even though integration of Fortran with Visual Studio is far behind the times compared to all the tooling and facilities available to users of Microsoft’s .NET as well as C++, Python, and R.

1 Like

I have no favorite IDE, every solution I have used is lacking somewhere.
For some time I had access to Intel’s compiler and used it in Visual Studio 2015. The VS Debugger is, simply put, unmatched, it just works, no matter what, full of features. Unfortunately, it is the only positive I can think of. No auto-complete, no IntelliSense, if I recall correctly the only thing that would do is when started calling a subroutine by typing call name it would list possible intrinsic subroutines. Not to mention, that only works with Intel’$ compiler.

On the other edge, is CodeBlocks. I recently decided to use it for a big project of mine. It has everything I need from a modern IDE e.g. the way Pycharm works with Python or VS19 works with C# and C++, Edit: but unfortunately, I couldn’t make the debugger work. It makes use of the default gdb but for whatever the reason as soon as I start debugging it starts normally but almost immediately stops by itself. Honestly, If I figure out how to make gdb work, CodeBlocks will be my goto IDE in the foreseeable future. Edit: Installing GNU Fortran (GCC) 10.1.0 seems to have solved the debugger problem and everything works as intended. Personal favorite? Maybe!!

My favorite text editor is SublimeText3, I use it in both Windows and Linux environments. It is lightweight and can handle everything with good Fortran support, syntax highlighting, autocomplete, and hovering the mouse over an intrinsic procedure it shows implementation details with brief info. However, it lacks IntelliSense.

In Windows, I also use Notepad++ just for reading.

VS code… the new hype. I tried it but not impressed. I just couldn’t justify the transition from Sublime to VS code. However I still have it installed, and use it for web-related stuff and markdown, the preview feature that opens automatically in a vertical layout that is live-updated is so neat. With better Fortran packages and better instructions on how to set up things for Fortran, it has the potential to be a full-fetched IDE and probably be the one to replace all other solutions.

1 Like

I use Pycharm Professional with fortran plugin

I use ‘plain vanilla’ vim since I started using Linux and coding Fortran, in 2012.

Not sure if ideal, but I deal! :smiley:

3 Likes

I’ve been using atom with ide-fortran, linter-gfortran and language-fortran for roughly 3 years. I’ve been pretty happy with it, although the ide features are occasionally a bit buggy. I’ve found it’s made me far more productive though by pointing out compiler errors before I’ve even managed to save the file, let alone switching to a terminal and running the build process.

My current IDE is CLion (which has a Fortran plugin). As a code editor it is fast and easier to use than most, but its build mechanism is CMake so building is difficult;the debugger is fairly well connected. I agree with @stavros that all options seem to have disadvantages.
I have tried Eclipse several times but always failed, ditto CodeBlocks. For syntax highlighting most editors do a good job but the integration of build and debug system seems to be problematic. Of the simple ones I’d go with Kate.
The best combination is VisualStudio with the Intel compiler and integration but that only works on Windows and of course costs money.

I used Visual Studio as IDE for Intel and PGI Fortran for many years in Windows. Now I use VSCode with some extensions, including Modern Fortran and Fortran Intellisence, as IDE for those compilers.

Many productivity-boosting features are available such as syntax highlighting, autocomplete, code snippets, showing the brief information of subroutines/functions when hovering a mouse cursor, and showing an outline of sources.

Although there is no extension to integrate Fortran compilers into VSCode, I have configured tasks.json to build Fortran sources as if those compilers are integrated into VSCode. In combination with CMake, building projects consisting of multiple sources becomes even easier.

This way is troublesome because it requires installing a large amount of software, such as gfortran binary, Anaconda, CMake, make for windows in addition to the compilers and VSCode.

I use Visual Studio 2017 + Intel OneAPI. Overall it is decent. It seems have everything I need.
The only program as some others mentioned, is that every once in a while you need to turn off Visual Studio then start it again. Otherwise the Visual Studio will show a message like Intel Fortran extension is slowing down the IDE experience, and it will be very slow. I think Intel may want to improve the OneAPI integration with Visual Studio.

On the other hand, CLion which belongs JetBrains which has the famous PyCharm IDE, seems not bad,

This was the topic of a recent poll, but I don’t mind adding my opinion here either: Emacs all the way - as an IDE, an operating system, an anything really. In the beginning the learning curve is a bit steep, but once you give Emacs a real try, you probably won’t look back.

1 Like

Have used so many things I do not remember them all, but keep on coming back to vim(1) and xterm(1)
and scripts. Nothing ready for prime-time; but lately I just keep adding plugins to fpm. They are Linux
specific and half are scripts in different languages and some are programs so not something shareable but some of my favorites are

fpm gdb        # launch gdb(1) on a simple fpm(1) project.
fpm time       # build and run code using gprof(1) for profiling
fpm edit PROC  # finds procedure in source and invoke editor $EDIT
fpm coverage   # run coverage report
fpm search     # grep for a word case-insensitive in code sans comments
fpm standalone # build single-source file for pure Fortran projects
fpm prettify   # run through prettify
fpm index  # list procedures and files (using modified f90split(1) )

so not a GUI IDE, but pretty close to a CLI IDE; with a little TDI (ncurses). Some are just prototypes to see how feasible it is (the gdb one is a not-generic-enough Fortran program that can be built with fpm(1) to see if I could; and I will admit to mostly using WRITE statements unless it is something really unusual :blush:

And I have worked for some of the companies that make these IDEs; so it is somewhat ironic but going away from basic GNU/Linux and Unix tools is unlikely, as there are just too many environments I need to work in to depend on products not ubiquitous in the *nix world, I guess (do not use much outside of the HPC/Linux world, and on MSWIndows I go to Cygwin and WSL for the most part).

I do build github repositories on github on MSWindows and MacOS, but by CD/CI. If you set up a package with fpm so the tests run via “fpm test” you can use the same CD/CI scripts for all the packages, which is really nice. I just copy the same .github directory to each repo.

1 Like

Well, you have to have a recent version of vim(1) and gdb(1) and be on a *nix system and be an fpm(1)
user with a project that builds an application. Still interested? I put a plugin on github for the adventurous:

Not sure what the equivalent is for emacs(1). Honestly not sure if it will work for anyone; but it works for me; and if there is interest perhaps we can polish it up. I can build and install it by entering “fpm tools urbanjost/fpm-gdb” using another plugin, but that is another story.

Emacs integrates gdb as a buffer in its own mode (there are actually more than one ways to do this). Making your own tool in Vim for a similar behavior has the advantage it can be tailor-made for your needs. I always liked people passionate enough to go that way.