{"id":5039,"date":"2022-04-17T23:50:55","date_gmt":"2022-04-17T22:50:55","guid":{"rendered":"https:\/\/blog.hani-ibrahim.de\/?p=5039"},"modified":"2024-01-15T17:28:08","modified_gmt":"2024-01-15T16:28:08","slug":"english-fortran-ide-for-macos","status":"publish","type":"post","link":"https:\/\/blog.hani-ibrahim.de\/en\/english-fortran-ide-for-macos.html","title":{"rendered":"Fortran IDE for macOS"},"content":{"rendered":"<nav class=\"tinytoc tiny_toc\">\n<ul>\n<li><a href=\"#h0\">Code::Blocks?<\/a><\/li>\n<li><a href=\"#h1\">My requirements<\/a><\/li>\n<li><a href=\"#h2\">What is Eclipse for Scientific Computing<\/a><\/li>\n<li><a href=\"#h3\">Setup<\/a>\n<ul style=\"list-style-type:circle;\">\n<li><a href=\"#h4\">Fortran Toolchain<\/a><\/li>\n<li><a href=\"#h5\">Download<\/a><\/li>\n<li><a href=\"#h6\">Configuration<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#h7\">First working project<\/a>\n<ul style=\"list-style-type:circle;\">\n<li><a href=\"#h8\">Setup a project<\/a><\/li>\n<li><a href=\"#h9\">Fill project with code<\/a><\/li>\n<li><a href=\"#h10\">Build and run your project<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#h11\">Issues and bugs<\/a><\/li>\n<li><a href=\"#h12\">What is missing<\/a><\/li>\n<li><a href=\"#h13\">Target groups<\/a>\n<ul style=\"list-style-type:circle;\">\n<li><a href=\"#h14\">Students<\/a><\/li>\n<li><a href=\"#h15\">Hobbyists, researcher, postgraduates<\/a><\/li>\n<li><a href=\"#h16\">Professionals<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#h17\">Conclusion<\/a><\/li>\n<\/ul>\n<\/nav>\n\n\r\n<body><p><em>Updated 2023-10-03<\/em><\/p>\n<p>If you want or have to develop in Fortran on a Mac and you are looking for a convenient IDE you do not have the same opportunities as Windows or GNU\/Linux users. Especially to find an appropriate and <em>affordable<\/em> one for students and hobbyists which is comparable to e.g. Code::Blocks was not easy. But <strong>Eclipse for Scientific Computing<\/strong> fills the gap.<\/p>\n<p>This how-to and field report covers Eclipse as a Fortran IDE mainly. Not so much on setting up a Fortran toolchain.<\/p>\n<p><!--more--><\/p>\n<h2 id=\"h0\">Code::Blocks?<\/h2>\n<p>On Windows and GNU\/Linux I use <a href=\"https:\/\/cbfortran.sourceforge.io\/\" target=\"_blank\" rel=\"noopener\">Code::Blocks<\/a> (with the Fortran Plugin installed). Which is a good IDE for Fortran for many target groups.<\/p>\n<p>To set this up on GNU\/Linux refer <a href=\"https:\/\/blog.hani-ibrahim.de\/install-and-setup-codeblocks-for-fortran-on-linux.html\">(English) Install and Setup Code::Blocks for Fortran on GNU\/Linux<\/a> for Windows you find help at\u00a0<a href=\"https:\/\/groups.google.com\/g\/cbfortran\/c\/JqnlQbiXIeM\">10 minutes to setup Modern Fortran 2003 \/ 2008 with CB on Windows<\/a>.<\/p>\n<p>Unfortunately there is no pre-compiled macOS version of Code::Blocks for Fortran available and I failed to build it on my own. I tried a lot of alternatives for macOS like Geany, prior Photran on Eclipse, VS Code, etc. There is also a compiler-independend commercial IDE available: <a href=\"http:\/\/simplyfortran.com\/\" target=\"_blank\" rel=\"noopener\">SimplyFortran<\/a>, but 140.\u2013 USD was too much for a time to time Fortran programmer hobbyist. But not too bad for more enthusiastic Fortran programmers.<\/p>\n<p>Is Eclipse for Scientific Computing a good alternative for macOS?<\/p>\n<h2 id=\"h1\">My requirements<\/h2>\n<p>Must-haves:<\/p>\n<ul>\n<li>Affordable for students and hobbyists (not more than 50.\u2013 USD\/EUR)<\/li>\n<li>Fortran77\/90 fixed- and free-form editors<\/li>\n<li>Syntax highlighting<\/li>\n<li>Comment-out functionality by short-cut or at least by menu<\/li>\n<li>Automatic makefile-generation (or at least build management which can handle module-dependencies), if wanted<\/li>\n<li>Graphical debugger frontend<\/li>\n<\/ul>\n<p>Nice-to-haves:<\/p>\n<ul>\n<li>Code-completion<\/li>\n<li>Symbol-Browser<\/li>\n<li>Call-tips for function and subroutine arguments<\/li>\n<li>Refractoring tools<\/li>\n<li>Git-support<\/li>\n<\/ul>\n<p><strong>Eclipse for Scientific Computing (EfSC) <\/strong>has all the must-haves and some nice-to-haves (symbol-browser, Refactoring tools and Git-support).<\/p>\n<h2 id=\"h2\">What is Eclipse for Scientific Computing<\/h2>\n<p>EfSC is mainly the integration of the two plugins:<\/p>\n<ul>\n<li>CDT (C\/C++ Development Tooling)<\/li>\n<li>Photran (Integrated Development Environment and Refactoring Tool for Fortran)<\/li>\n<\/ul>\n<p>in Eclipse. Photran was build on top of CDT. I tried Photran in the past. But I had problems bring the makefile-generation to work and some other issues. Today it is much more mature and setup is no longer a problem because it is now fully integrated.<\/p>\n<p>But you still can see that EfSC was designed for C\/C++ in the first place.<\/p>\n<h2 id=\"h3\">Setup<\/h2>\n<h3 id=\"h4\">Fortran Toolchain<\/h3>\n<p>As I mentioned before I will not go into detail on this topic. If you do not have a Fortran toolchain already installed, I recommend the free (of cost) gfortran from GNU. Therefore I also recommend to install a package manager (<a href=\"https:\/\/brew.sh\/\" target=\"_blank\" rel=\"noopener\">Homebrew<\/a> or <a href=\"https:\/\/www.macports.org\/\" target=\"_blank\" rel=\"noopener\">MacPorts<\/a>) where you can easily install gfortran and other stuff you may or will need later. Take the extra time for one of these package manager you will not regret it. If installed just <a href=\"https:\/\/fortran-lang.org\/learn\/os_setup\/install_gfortran#macos\" target=\"_blank\" rel=\"noopener\">one command<\/a> is sufficient.<\/p>\n<h3 id=\"h5\">Download<\/h3>\n<p>Download EfSC from <a href=\"https:\/\/www.eclipse.org\/downloads\/packages\/\" target=\"_blank\" rel=\"noopener\">eclipse.org<\/a>. Scroll down to \u201cEclipse IDE for Scientific Computing\u201d and choose your platform. EfSC is also available for macOS on Apple\u2019s new M1 ARCH64-achitecture. You get an DMG. As an Mac user you know what to do.<\/p>\n<blockquote><p>You do not need a Java JRE installed. It is bundled with current EfSCs.<\/p><\/blockquote>\n<h3 id=\"h6\">Configuration<\/h3>\n<p>EfSC does almost work out of the box for Fortran. But it needs still some configuration.<\/p>\n<ol>\n<li>After the first start a Welcome screens appears. Close the tab by clicking on the X.\n<p><\/p><div id=\"attachment_5049\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/efsc-welcome.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Welcome Screen\" data-rl_caption=\"\" title=\"Welcome Screen\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5049\" class=\"size-medium wp-image-5049\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/efsc-welcome-632x490.png\" alt=\"Eclipse Welcome Screen\" width=\"632\" height=\"490\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/efsc-welcome-632x490.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/efsc-welcome-1020x790.png 1020w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/efsc-welcome.png 1136w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5049\" class=\"wp-caption-text\">Welcome Screen<\/p><\/div><\/li>\n<li>Go to the program menu ECLIPSE &gt; PREFERENCES, on the left pane choose GENERAL &gt; PERSPECTIVES and choose \u201cFortran\u201d and click on MAKE DEFAULT.\n<p><\/p><div id=\"attachment_5045\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/preferences-perspectives.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Preferences &gt; Perspectives\" data-rl_caption=\"\" title=\"Preferences &gt; Perspectives\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5045\" class=\"wp-image-5045 size-medium\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/preferences-perspectives-632x526.png\" alt=\"Eclipse-Perspectives\" width=\"632\" height=\"526\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/preferences-perspectives-632x526.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/preferences-perspectives-1020x849.png 1020w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/preferences-perspectives.png 1430w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5045\" class=\"wp-caption-text\">Preferences &gt; Perspectives<\/p><\/div><\/li>\n<li>On macOS EfSC does not find the Fortran compiler because it is not in the standard path \u201c\/usr\/bin\/\u201d but in \u201c\/us\/local\/bin\/\u201d (Homebrew) or \u201c\/opt\/local\/bin\/\u201d (Macports). You will get the error message:<span class=\"tt_tag\">\/bin\/sh: \/usr\/bin\/gfortran: No such file or directory<\/span> during building. In the next chapter there is a solution. You cannot solve this issue here globally unfortunately.<\/li>\n<\/ol>\n<h2 id=\"h7\">First working project<\/h2>\n<h3 id=\"h8\">Setup a project<\/h3>\n<ol>\n<li>Menu FILE &gt; NEW &gt; FORTRAN PROJECT. If \u201cFortran Project\u201d is not available, choose OTHERS.\n<ol>\n<li>In the wizard, expand FORTRAN<\/li>\n<li>Choose FORTRAN PROJECT<\/li>\n<li>NEXT<\/li>\n<\/ol>\n<\/li>\n<li>In the Fortran Project box give your project a name in \u201cProject name:\u201d.\n<p><\/p><div id=\"attachment_5050\" style=\"width: 598px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/fortran-projekt.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Fortran Project\" data-rl_caption=\"\" title=\"Fortran Project\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5050\" class=\"size-full wp-image-5050\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/fortran-projekt.png\" alt=\"Fortran Project\" width=\"588\" height=\"584\"><\/a><p id=\"caption-attachment-5050\" class=\"wp-caption-text\">Fortran Project<\/p><\/div><\/li>\n<li>You can leave \u201cUse default location\u201d checked.<\/li>\n<li>Choose \u201cProject type:\n<ol>\n<li>If you want an auto-generated Makefile choose \u201cOthers &gt; Executable (GNU Fortran on Mac OS X)\u201d, in \u201cToolchains:\u201d \u201cGCC Fortran\u201d<\/li>\n<li>If you have a Makefile already or want do make one on your own choose \u201cMakefile project &gt; \u201cEmpty Project \u2013 Fortran\u201d, in \u201cToolchains:\u201d click on \u201c\u2013 Other Toolchain \u2014\u201c<\/li>\n<\/ol>\n<\/li>\n<li>NEXT<\/li>\n<li>Select your configurations (Debug or Release or both)\n<p><\/p><div id=\"attachment_5051\" style=\"width: 600px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/configurations.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Build configurations\" data-rl_caption=\"\" title=\"Build configurations\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5051\" class=\"size-full wp-image-5051\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/configurations.png\" alt=\"Build configurations\" width=\"590\" height=\"586\"><\/a><p id=\"caption-attachment-5051\" class=\"wp-caption-text\">Build configurations<\/p><\/div><\/li>\n<li>To set up your compiler path (mentioned above), click on ADVANCED SETTINGS \u2026<\/li>\n<li>On the left pane choose \u201cFortran Build &gt; Settings\u201d<\/li>\n<li>On the right choose the first configuration, let\u2019s say \u201cDebug\u201d<\/li>\n<li>On Tab \u201cTool Settings\u201d go to \u201cGNU Fortran Compiler\u201d an change \u201cCommand\u201d to your complete path of your Fortran compiler.\n<div id=\"attachment_5053\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/compiler-settings.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Compiler Settings\" data-rl_caption=\"\" title=\"Compiler Settings\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5053\" class=\"size-medium wp-image-5053\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/compiler-settings-632x821.png\" alt=\"Compiler Settings\" width=\"632\" height=\"821\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/compiler-settings-632x821.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/compiler-settings.png 818w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5053\" class=\"wp-caption-text\">Compiler Settings<\/p><\/div>\n<ol>\n<li>MacPorts: <span class=\"tt_tag\">\/opt\/local\/bin\/gfortran<\/span><\/li>\n<li>Homebrew: <span class=\"tt_tag\">\/usr\/local\/bin\/gfortran<\/span><\/li>\n<\/ol>\n<\/li>\n<li>Do the same for \u201cMacOS X Fortran Linker\u201d\n<p><\/p><div id=\"attachment_5052\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/linker-settings.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Linker Settings\" data-rl_caption=\"\" title=\"Linker Settings\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5052\" class=\"size-medium wp-image-5052\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/linker-settings-632x826.png\" alt=\"Linker Settings\" width=\"632\" height=\"826\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/linker-settings-632x826.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/linker-settings.png 816w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5052\" class=\"wp-caption-text\">Linker Settings<\/p><\/div><\/li>\n<li>Repeat this steps (10-11) for the other configuration(s), e.g. \u201cRelease\u201d.<\/li>\n<li>APPLY AND CLOSE<\/li>\n<li>FINISH<\/li>\n<\/ol>\n<h3 id=\"h9\">Fill project with code<\/h3>\n<ol>\n<li>Click on your project name in the Project Explorer<\/li>\n<li>OPTIONAL: You can organize your code in one and more source folders by FILE &gt; NEW &gt; FORTRAN SOURCE FOLDER\n<p><\/p><div id=\"attachment_5054\" style=\"width: 594px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-folder.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Source folder\" data-rl_caption=\"\" title=\"Source folder\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5054\" class=\"size-full wp-image-5054\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-folder.png\" alt=\"Source folder\" width=\"584\" height=\"499\"><\/a><p id=\"caption-attachment-5054\" class=\"wp-caption-text\">Source folder<\/p><\/div><\/li>\n<li>FILE &gt; NEW &gt; FORTRAN SOURCE FILE<\/li>\n<li>Type in a file name in \u201cSource file:\u201d, e.g. hello.f90\n<p><\/p><div id=\"attachment_5055\" style=\"width: 597px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-file.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Source file\" data-rl_caption=\"\" title=\"Source file\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5055\" class=\"size-full wp-image-5055\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-file.png\" alt=\"Source file\" width=\"587\" height=\"412\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-file.png 587w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/source-file-100x70.png 100w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\"><\/a><p id=\"caption-attachment-5055\" class=\"wp-caption-text\">Source file<\/p><\/div><\/li>\n<li><strong>IMPORTANT<\/strong>: Choose the desired template. Be aware that the default gives you a fixed form template. If you want to use modern Fortran\u2019s free-form, choose:\n<ul>\n<li>\u201cDefault free-form Fortran source file template\u201d or<\/li>\n<li>\u201cFortran module (free-form)\u201d or<\/li>\n<li>\u201cFortran class (free-form)\u201d, respectively.<br>\nFor normal Fortran programs choose the first.<\/li>\n<\/ul>\n<\/li>\n<li>FINISH<\/li>\n<li>You get a skeleton code:\n<pre><span class=\"tt_tag\">program hello<\/span>\r\n<span class=\"tt_tag\">\u00a0\u00a0\u00a0 implicit none<\/span>\r\n<span class=\"tt_tag\">end program hello<\/span><\/pre>\n<\/li>\n<li>Lets add one more line and save\n<pre><span class=\"tt_tag\">program hello<\/span>\r\n<span class=\"tt_tag\"> \u00a0\u00a0 implicit none<\/span>\r\n    <strong>print*, \"Hello World\"<\/strong>\r\n<span class=\"tt_tag\">end program hello<\/span><\/pre>\n<\/li>\n<li>You can add other (source) files, e.g. modules, etc. the same way.<\/li>\n<\/ol>\n<p>You have access for all of these menu commands from the toolbar as well.<\/p>\n<h3 id=\"h10\">Build and run your project<\/h3>\n<div id=\"attachment_5056\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/run-project.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"Run project\" data-rl_caption=\"\" title=\"Run project\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5056\" class=\"size-medium wp-image-5056\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/run-project-632x490.png\" alt=\"Run project\" width=\"632\" height=\"490\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/run-project-632x490.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/run-project-1020x790.png 1020w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/run-project.png 1136w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5056\" class=\"wp-caption-text\">Run project<\/p><\/div>\n<ol>\n<li>Be sure that your current project is chosen in the Project Explorer<\/li>\n<li>Choose your configuration to build: Menu: PROJECT &gt; BUILD CONFIGURATION &gt; SET ACTIVE<\/li>\n<li>PROJECT &gt; BUILD PROJECT<\/li>\n<li>Check Tab \u201cConsole\u201d in the pane below for errors, warning or success.<\/li>\n<li>Menu: RUN &gt; RUN, choose \u201cLocal Fortran Application\u201d then OK<\/li>\n<li>You find terminal output in the Console tab below.<\/li>\n<\/ol>\n<p>You have access for all of these menu commands from the toolbar as well.<\/p>\n<p>Beginners who have frequent edit-build-debug-cycles and short codes can switch to \u201cauto build\u201d in PROJECT &gt; PROPERTIES &gt; Fortran Build &gt; Behavior &gt; Build on resource save (Auto build).<\/p>\n<div id=\"attachment_5064\" style=\"width: 642px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/auto-build.png\" data-rel=\"lightbox-gallery-93LYOtGf\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-5064\" class=\"wp-image-5064 size-medium\" src=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/auto-build-e1650232044473-632x519.png\" alt=\"Auto build\" width=\"632\" height=\"519\" srcset=\"https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/auto-build-e1650232044473-632x519.png 632w, https:\/\/blog.hani-ibrahim.de\/wp-content\/uploads\/auto-build-e1650232044473.png 817w\" sizes=\"auto, (max-width: 632px) 100vw, 632px\"><\/a><p id=\"caption-attachment-5064\" class=\"wp-caption-text\">Auto build on save<\/p><\/div>\n<h1 id=\"h11\">Issues and bugs<\/h1>\n<ul>\n<li><strong>EfSC build process does not recognize capital extensions, like \u201cF90\u201d as Fortran sources<br>\n<\/strong> Many Fortran compilers, so as Gfortran, pre-process these files, and process pre-processor directives in your code. Unfortunately you cannot add these extensions to the extensions list in PREFERENCES &gt; C\/C++ &gt; FILE TYPES. EfSC is not case sensitive in this case and reject them as doubles. EfSC is very flexible. Maybe it is possible to setup the pre-processor in \u201cBuild Steps\u201d in C\/C++ BUILD &gt; SETTINGS. But nothing simple.<\/li>\n<li><strong>Compiler and linker path<\/strong><br>\nEfSC expects Gfortran\u2019s executable in <span class=\"tt_tag\">\/usr\/bin\/<\/span> for some reasons. To have it in the path is not sufficient. So you have to setup the compiler and linker path on every new project (see above) for every configuration (Debug, Release, etc.) which is annoying. I have not found any settings to set this Eclipse-wide.<br>\nThis does not happen on GNU\/Linux for obvious reasons: Gfortran is in <span class=\"tt_tag\">\/usr\/bin\/<\/span> on Linux. I have not tested it on Windows. Setting a symbolic link to <span class=\"tt_tag\">\/usr\/bin\/<\/span> of gfortran as a workaround is not permitted on my Ventura with Homebrew even with <span class=\"tt_tag\">sudo<\/span>.<\/li>\n<\/ul>\n<h1 id=\"h12\">What is missing<\/h1>\n<p>In comparison to other Fortran IDEs, EfSC has unique features for parallel and remote computing. But if you just look for an IDE for local work EfSC lacks some useful features other IDEs provide:<\/p>\n<ul>\n<li>Code auto-complete<\/li>\n<li>Call tips for function and subroutine arguments<\/li>\n<li>Automated element renaming<\/li>\n<li>Auto-build (Makefile generation) for libraries<\/li>\n<\/ul>\n<h1 id=\"h13\">Target groups<\/h1>\n<h2 id=\"h14\">Students<\/h2>\n<p>To setup the compiler path on every new project is annoying, especially for students in a Fortran course who create a lot of small projects frequently.<\/p>\n<p>But they get a convenient auto-build environment with a graphical debugger. This is useful for bigger projects with external modules.<\/p>\n<p>If students just have to deal with small projects of just one source file, a graphical debugger and auto-build or Git-integrity is not important. To avoid the use of the command-line (many people are afraid of) and normal editors I recommend the lightweight IDE <em>Geany<\/em>, <em>TextMate<\/em> or <em>Visual Studio Code<\/em> for this target group.<\/p>\n<p><a href=\"https:\/\/geany.org\/\" target=\"_blank\" rel=\"noopener\"><strong>Geany<\/strong><\/a> runs for <em>one-file<\/em> Fortran projects almost out-of-the box. Just switch from tab to spaces indentation in Edit &gt; Preferences &gt; Editor &gt; Indentation &gt; Type &gt; Spaces.<\/p>\n<p>Pretty much the same with <a href=\"https:\/\/macromates.com\" target=\"_blank\" rel=\"noopener\"><strong>TextMate<\/strong><\/a> with its preinstalled Fortran bundle. There are no adjustments needed.<\/p>\n<p><em>Updated 2023-10-03<\/em>: But I recommend <a href=\"https:\/\/code.visualstudio.com\/\" target=\"_blank\" rel=\"noopener\"><strong>Visual Studio Code<\/strong><\/a> for this purpose. It is the most convenient and works in Windows and GNU\/Linux as well. And it can also provide visual <a href=\"https:\/\/youtu.be\/ynBLjFwHYWg?t=552\" target=\"_blank\" rel=\"noopener\">debugging<\/a>. You just need to add the extensions <em>Modern Fortran<\/em>,\u00a0<em>GDB Debugger \u2013 Beyond<\/em> and <em>Code Runner<\/em>. A single Fortran file can be compiled, linked and executed by pressing a single button and the result is displayed in the inbuilt terminal. For debugging the <span class=\"tt_tag\">settings.json<\/span> of Code Runner at <span class=\"tt_tag\">Executor Map<\/span> need to be extended with the compiler option <span class=\"tt_tag\">-g<\/span> at all Fortran commands, e.g.: <span class=\"tt_tag\">\u201cfortran\u201d: \u201ccd $dir &amp;&amp; gfortran <span style=\"color: #3366ff;\">-g<\/span> $fileName -o $fileNameWithoutExt &amp;&amp; $dir$fileNameWithoutExt\u201d,<\/span><\/p>\n<p>But all mentioned solutions are not the first choice for <em>multiple file<\/em> projects.<\/p>\n<p>If these students go for Eclipse anyway I recommend to turn on the auto-build on save at PROJECT &gt; PROPERTIES &gt; Fortran Build &gt; Build on resource save (Auto build).<\/p>\n<p>The pre-processing bug will not have an impact on these users.<\/p>\n<p>If students work on medium projects beyond beginner Fortran courses the situation is different. Therefore EfSC can be useful.<\/p>\n<h2 id=\"h15\">Hobbyists, researcher, postgraduates<\/h2>\n<p>For medium scale projects the compiler path inconvenience is not a big deal. The auto-build and debugger features overcompensate this issue. Especially if they have to deal with HPC and can make use of the parallel-computing-capabilities of EfSC or the refactoring tools.<\/p>\n<p>Unfortunately convenient features as code-autocompletion, automated element renaming, call tips for function and subroutine arguments, etc. are not included. Furthermore the auto-build feature cannot build libraries. You have to write them on your own or use external tools.<\/p>\n<p>The preprocessing bug could have an impact.<\/p>\n<p>But if they could afford 140,- USD they should give <a href=\"http:\/\/simplyfortran.com\/\" target=\"_blank\" rel=\"noopener\">SimplyFortran<\/a> a try. 30 day trial is available free of charge.<\/p>\n<h2 id=\"h16\">Professionals<\/h2>\n<p>I guess they will use a commercial IDE and compiler and\/or use a different platform \ud83d\ude09 But EfSC has unique features for them. The synchronized projects if they work on code for supercomputers or clusters. And also the Parallel Tools Platform with parallel debugger, tools for MPI\/OpenMP, etc.<\/p>\n<h1 id=\"h17\">Conclusion<\/h1>\n<p><strong>Eclipse for Scientific Computing<\/strong> is the best non-commercial Fortran IDE for macOS. It is cross-plattform, so you can use it on all systems you are on, not only macOS.<\/p>\n<p>For High Performance Computing (HPC) the synchronized projects make it unique, even on other platforms. Also an enormous plus is the Parallel Tools Platform with its parallel debugger and MPI\/OpenMP integration, if you need this. But where there is light there is shadow also.<\/p>\n<p>For a <strong>student<\/strong> who just has to handle a lot but small one file projects in a Fortran course, Eclipse is maybe to much hassle due to\u00a0 project configuration.<\/p>\n<p>For <strong>medium scale developer<\/strong> outside the HPC some convenient features other IDEs provide are missing. But it is still a good IDE for macOS for this target group. On other platforms <em>Code::Blocks for Fortran <\/em>is maybe a better alternative. But we are here on a Mac. Maybe a commercial IDE fits the whole, like <em>SimplyFortran<\/em>.<\/p>\n<p>For <strong>HPC-developer<\/strong> <em>Eclipse for Scientific Computing<\/em> is for them. The parallel tools and remote development capabilities to let run your code on a remote supercomputer supports them. But I am not such a developer.<\/p>\n<div class=\"notranslate\" style=\"all: initial;\">\u00a0<\/div>\n<p><\/p><\/body>","protected":false},"excerpt":{"rendered":"<div class=\"shariff shariff-align-left shariff-widget-align-left\" data-services=\"facebook\" data-url=\"https:\/\/blog.hani-ibrahim.de\/en\/english-fortran-ide-for-macos.html\" data-timestamp=\"1705339688\" data-backendurl=\"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/shariff\/v1\/share_counts?\"><ul class=\"shariff-buttons theme-round orientation-horizontal buttonsize-small\"><li class=\"shariff-button facebook shariff-nocustomcolor\" style=\"background-color:#4273c8;border-radius:50%\"><a href=\"https:\/\/www.facebook.com\/sharer\/sharer.php?u=https%3A%2F%2Fblog.hani-ibrahim.de%2Fen%2Fenglish-fortran-ide-for-macos.html\" title=\"Share on Facebook\" aria-label=\"Share on Facebook\" role=\"button\" rel=\"nofollow\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#3b5998; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 18 32\"><path fill=\"#3b5998\" d=\"M17.1 0.2v4.7h-2.8q-1.5 0-2.1 0.6t-0.5 1.9v3.4h5.2l-0.7 5.3h-4.5v13.6h-5.5v-13.6h-4.5v-5.3h4.5v-3.9q0-3.3 1.9-5.2t5-1.8q2.6 0 4.1 0.2z\"\/><\/svg><\/span><span data-service=\"facebook\" style=\"color:#3b5998\" class=\"shariff-count shariff-hidezero\"><\/span>&nbsp;<\/a><\/li><li class=\"shariff-button twitter shariff-nocustomcolor\" style=\"background-color:#595959;border-radius:50%\"><a href=\"https:\/\/twitter.com\/share?url=https%3A%2F%2Fblog.hani-ibrahim.de%2Fen%2Fenglish-fortran-ide-for-macos.html&text=Fortran%20IDE%20for%20macOS\" title=\"Share on X\" aria-label=\"Share on X\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#000; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 24 24\"><path fill=\"#000\" d=\"M14.258 10.152L23.176 0h-2.113l-7.747 8.813L7.133 0H0l9.352 13.328L0 23.973h2.113l8.176-9.309 6.531 9.309h7.133zm-2.895 3.293l-.949-1.328L2.875 1.56h3.246l6.086 8.523.945 1.328 7.91 11.078h-3.246zm0 0\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button pocket shariff-nocustomcolor\" style=\"background-color:#444;border-radius:50%\"><a href=\"https:\/\/getpocket.com\/save?url=https%3A%2F%2Fblog.hani-ibrahim.de%2Fen%2Fenglish-fortran-ide-for-macos.html&title=Fortran%20IDE%20for%20macOS\" title=\"Save to Pocket\" aria-label=\"Save to Pocket\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#ff0000; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 27 28\"><path fill=\"#ff0000\" d=\"M24.5 2q1 0 1.7 0.7t0.7 1.7v8.1q0 2.8-1.1 5.3t-2.9 4.3-4.3 2.9-5.2 1.1q-2.7 0-5.2-1.1t-4.3-2.9-2.9-4.3-1.1-5.2v-8.1q0-1 0.7-1.7t1.7-0.7h22zM13.5 18.6q0.7 0 1.3-0.5l6.3-6.1q0.6-0.5 0.6-1.3 0-0.8-0.5-1.3t-1.3-0.5q-0.7 0-1.3 0.5l-5 4.8-5-4.8q-0.5-0.5-1.3-0.5-0.8 0-1.3 0.5t-0.5 1.3q0 0.8 0.6 1.3l6.3 6.1q0.5 0.5 1.3 0.5z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button rss shariff-nocustomcolor\" style=\"background-color:#ff8c00;border-radius:50%\"><a href=\"https:\/\/blog.hani-ibrahim.de\/en\/feed\/rss\" title=\"RSS feed\" aria-label=\"RSS feed\" role=\"button\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#fe9312; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#fe9312\" d=\"M4.3 23.5c-2.3 0-4.3 1.9-4.3 4.3 0 2.3 1.9 4.2 4.3 4.2 2.4 0 4.3-1.9 4.3-4.2 0-2.3-1.9-4.3-4.3-4.3zM0 10.9v6.1c4 0 7.7 1.6 10.6 4.4 2.8 2.8 4.4 6.6 4.4 10.6h6.2c0-11.7-9.5-21.1-21.1-21.1zM0 0v6.1c14.2 0 25.8 11.6 25.8 25.9h6.2c0-17.6-14.4-32-32-32z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button mailto shariff-nocustomcolor\" style=\"background-color:#a8a8a8;border-radius:50%\"><a href=\"mailto:?body=https%3A%2F%2Fblog.hani-ibrahim.de%2Fen%2Fenglish-fortran-ide-for-macos.html&subject=Fortran%20IDE%20for%20macOS\" title=\"Send by email\" aria-label=\"Send by email\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#999; color:#fff\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#999\" d=\"M32 12.7v14.2q0 1.2-0.8 2t-2 0.9h-26.3q-1.2 0-2-0.9t-0.8-2v-14.2q0.8 0.9 1.8 1.6 6.5 4.4 8.9 6.1 1 0.8 1.6 1.2t1.7 0.9 2 0.4h0.1q0.9 0 2-0.4t1.7-0.9 1.6-1.2q3-2.2 8.9-6.1 1-0.7 1.8-1.6zM32 7.4q0 1.4-0.9 2.7t-2.2 2.2q-6.7 4.7-8.4 5.8-0.2 0.1-0.7 0.5t-1 0.7-0.9 0.6-1.1 0.5-0.9 0.2h-0.1q-0.4 0-0.9-0.2t-1.1-0.5-0.9-0.6-1-0.7-0.7-0.5q-1.6-1.1-4.7-3.2t-3.6-2.6q-1.1-0.7-2.1-2t-1-2.5q0-1.4 0.7-2.3t2.1-0.9h26.3q1.2 0 2 0.8t0.9 2z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button whatsapp shariff-nocustomcolor\" style=\"background-color:#5cbe4a;border-radius:50%\"><a href=\"https:\/\/api.whatsapp.com\/send?text=https%3A%2F%2Fblog.hani-ibrahim.de%2Fen%2Fenglish-fortran-ide-for-macos.html%20Fortran%20IDE%20for%20macOS\" title=\"Share on Whatsapp\" aria-label=\"Share on Whatsapp\" role=\"button\" rel=\"noopener nofollow\" class=\"shariff-link\" style=\";border-radius:50%; background-color:#34af23; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 32 32\"><path fill=\"#34af23\" d=\"M17.6 17.4q0.2 0 1.7 0.8t1.6 0.9q0 0.1 0 0.3 0 0.6-0.3 1.4-0.3 0.7-1.3 1.2t-1.8 0.5q-1 0-3.4-1.1-1.7-0.8-3-2.1t-2.6-3.3q-1.3-1.9-1.3-3.5v-0.1q0.1-1.6 1.3-2.8 0.4-0.4 0.9-0.4 0.1 0 0.3 0t0.3 0q0.3 0 0.5 0.1t0.3 0.5q0.1 0.4 0.6 1.6t0.4 1.3q0 0.4-0.6 1t-0.6 0.8q0 0.1 0.1 0.3 0.6 1.3 1.8 2.4 1 0.9 2.7 1.8 0.2 0.1 0.4 0.1 0.3 0 1-0.9t0.9-0.9zM14 26.9q2.3 0 4.3-0.9t3.6-2.4 2.4-3.6 0.9-4.3-0.9-4.3-2.4-3.6-3.6-2.4-4.3-0.9-4.3 0.9-3.6 2.4-2.4 3.6-0.9 4.3q0 3.6 2.1 6.6l-1.4 4.2 4.3-1.4q2.8 1.9 6.2 1.9zM14 2.2q2.7 0 5.2 1.1t4.3 2.9 2.9 4.3 1.1 5.2-1.1 5.2-2.9 4.3-4.3 2.9-5.2 1.1q-3.5 0-6.5-1.7l-7.4 2.4 2.4-7.2q-1.9-3.2-1.9-6.9 0-2.7 1.1-5.2t2.9-4.3 4.3-2.9 5.2-1.1z\"\/><\/svg><\/span><\/a><\/li><li class=\"shariff-button info shariff-nocustomcolor\" style=\"background-color:#eee;border-radius:50%\"><a href=\"http:\/\/ct.de\/-2467514\" title=\"More information\" aria-label=\"More information\" role=\"button\" rel=\"noopener \" class=\"shariff-link\" style=\";border-radius:50%; background-color:#fff; color:#fff\" target=\"_blank\"><span class=\"shariff-icon\" style=\"\"><svg width=\"32px\" height=\"20px\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 11 32\"><path fill=\"#999\" d=\"M11.4 24v2.3q0 0.5-0.3 0.8t-0.8 0.4h-9.1q-0.5 0-0.8-0.4t-0.4-0.8v-2.3q0-0.5 0.4-0.8t0.8-0.4h1.1v-6.8h-1.1q-0.5 0-0.8-0.4t-0.4-0.8v-2.3q0-0.5 0.4-0.8t0.8-0.4h6.8q0.5 0 0.8 0.4t0.4 0.8v10.3h1.1q0.5 0 0.8 0.4t0.3 0.8zM9.2 3.4v3.4q0 0.5-0.4 0.8t-0.8 0.4h-4.6q-0.4 0-0.8-0.4t-0.4-0.8v-3.4q0-0.4 0.4-0.8t0.8-0.4h4.6q0.5 0 0.8 0.4t0.4 0.8z\"\/><\/svg><\/span><\/a><\/li><\/ul><\/div><p>Introducing, setup, review and field report of Eclipse for Scientific Computing on a Mac. Ranking for usability for different target groups.<\/p>\n","protected":false},"author":2,"featured_media":5108,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ngg_post_thumbnail":0,"footnotes":""},"categories":[25,47,16,45,96,67],"tags":[219,95,76],"class_list":["post-5039","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-english","category-field-reports","category-fortran","category-how-tos","category-mac-os-x","category-programming","tag-eclipse","tag-featured","tag-ide"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/posts\/5039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/comments?post=5039"}],"version-history":[{"count":22,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/posts\/5039\/revisions"}],"predecessor-version":[{"id":5189,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/posts\/5039\/revisions\/5189"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/media\/5108"}],"wp:attachment":[{"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/media?parent=5039"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/categories?post=5039"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.hani-ibrahim.de\/en\/wp-json\/wp\/v2\/tags?post=5039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}