Intel releases oneAPI Toolkit, free, Fortran 2018

Which IDE is recommended to use with the Intel oneAPI?

On which OS? On Windows, Visual Studio. On Linux, you have many choices.

Steve, thank you for the guidance. I am using Windows. I can certainly get VS Community Edition. I see on the Intel oneAPI web page there is an IoT Toolkit, and the Eclipse IDE is bundled in that. It gives the impression that Intel is promoting Eclipse over VS. I take it your feeling is that VS is best overall for integrating with the Intel oneAPI. Any thoughts about Code:Blocks? Thank you in advance.

Robert, I have no personal experience with Code:Blocks, but have read good things about it. For Fortran on Windows, Intel supports only Visual Studio - if you use other IDEs you are on your own, especially as the only debugger that works is the VS debugger. Intel doesn’t support any IDEs for Fortran on Linux, though there is an awareness that Eclipse claims to support Intel Fortran.

1 Like

I followed that path: MS Fortran PowerStation, Digital Visual Fortran, Compaq Visual Fortran, then gfortran after migrating to Linux (but I have bought the ifort 2015).

I was a big fan of the QuickWin library, not available with Linux ifort (but the Windows version runs under Linux with WineHQ!). That’s why I launched with my coauthors the gtk-fortran project in 2011. Building it with ifort 2015 under Linux was not a success: lots of examples were crashing in the project… But I couldn’t pay for ifort updates… Now I can try again with that new version. It’s always interesting to build a project with several compilers! It makes a more robust code.

Thanks for the great info!

Have you gone through this site? https://cbfortran.sourceforge.io/

Re: Code::Blocks, you may also want to inquire here: https://groups.google.com/g/cbfortran. The developer of the Fortran integration for Code::Blocks is very responsive to inquiries there. There is some info for setting up the Intel Fortran compiler with Code::Blocks IDE there, however the issue is the debugger facility where the Visual Studio IDE is better.

Note, however, an aspect of significant sadness for Fortranners on Windows remains the experience of debugging modern Fortran code in Visual Studio is way, way too poor of an experience considering it’s year 2021 now. Intel itself has hardly improved the integration of their product with Visual Studio in nearly a decade now, Issues like this - community.intel.com/t5/Intel-Fortran-Compiler/Debug-issue-relating-to-allocatable-variables-in-user-defined/m-p/1194823#M150844 - have gone unresolved for a long, long time.

I am interested by that solution. It seems the Base oneAPI requires 4 GB. But I have not yet found the page were we could just download the Fortran compiler…

There is no “just the Fortran compiler” download. Currently, the Fortran debugging support is a component of the Base Toolkit (in “Intel Distribution for GDB”), but I am told that a future update will move this to the HPC Toolkit. You don’t have to install the whole Base or HPC Toolkit, you can select components. From the Base, pick only “Intel Distribution for GDB”. From HPC, you can select only Fortran. (If you want MKL, that is in the Base.)

1 Like

Well, almost :wink: The HPC Toolkit installer (at least on MacOS) offers just two options: Intel C++ compiler and Intel Fortran Compiler.
I chose the Fortran and it installed OK, with one warning about my system not being on “supported OSes list” (it is BigSur, maybe too new). “ifort” command works (after sourcing environment config script" but fails to compile even a simplest test code saying

ld: library not found for -lSystem

So maybe the Base Toolkit (or some its components) is required. Unfortunately I am unable to download it. The HPC Toolkit download did not require login to Intel Account but the Base Toolkit does. And for an unknown reason (reported also by several people in Intel Community forums) it keeps asking to register for the Intel Developer Zone, forever. link

I am unfamiliar with how the Intel product works on Mac. The Intel Community forum is the best place for help with that. Check the prerequisites - there may be some optional components you need, such as gcc or Xcode.

I am not very familiar with macOS, but as said @sblionel , you may need to install XCode (~5 GB) to develop under macOS.
But as far as I remember, you can avoid XCode if you install gcc via Homebrew (https://brew.sh/). I told that to my students working at home… I also remember some of them successfully installed Code::Blocks 17.12 (Code::Blocks - Browse /Binaries/17.12/Mac at SourceForge.net).

It would be interesting if people having successfully installed the Intel compiler share here the exact steps they followed on their system (Windows, macOS, Linux, etc.).

I surely have xcode command line tools installed. And brewed gcc/gfortran-10. I just wanted to give the Intel compiler a try with features which are (still) unsupported in Gnu.

Running under Linux the setup was quite straight-forward, much less painful than I remember reinstalling Intel Parallel Studio XE (always took me half a day).

As an user of a “non-standard” Linux distribution (Manjaro Linux) I went for the basekit and hpckit installers. The right way of installing under Arch derivatives would be to setup a custom PKGBUILD, but for Intel I usually make an exception.

I used the offline installers, though, since I prefer to separate the downloading step from the installation.

wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17431/l_BaseKit_p_2021.1.0.2659_offline.sh
wget https://registrationcenter-download.intel.com/akdlm/irc_nas/17427/l_HPCKit_p_2021.1.0.2684_offline.sh 

Installation worked smoothly with the shipped GUI installers, I selected everything except for the Intel Python distribution (because of disk space usage when having five or more compilers already installed)

sudo sh l_BaseKit_p_2021.1.0.2659_offline.sh  # Opens GUI installer, select your components, install
sudo sh l_HPCKit_p_2021.1.0.2684_offline.sh  # Opens GUI installer, select your components, install

You get this neat setup script you have to source, which you could add to your bashrc / zshrc, but I prefer to source them when I need the Intel compiler to keep my environment clean (also running the script is expensive in the shell startup):

source /opt/intel/oneapi/setvars.sh

A real alternative if you have your own environment module system on your local machine (I use TCL modules locally because it was easier to install than lmod) are the generated TCL environment modules from oneAPI, but you have to generate them after installation:

cd /opt/intel/oneapi/
sudo ./modulefiles-setup.sh
echo "module use /opt/intel/oneapi/modulefiles" >> ~/.zshrc

Makes life so much easier and the overhead from the setvars script is gone. Naming of the modules could definitely be improved, it takes some trial and error to find out which modules to load to get ifort and the MKL setup correctly, if you found your setup save the environment or create a meta module to load those in the future automatically.

Most of my Ubuntu using colleagues I recommended using the APT packages instead. I’m using those extensively in the GitHub actions workflow (I even created a continuous delivery based on the APT packages). They indeed allow to install only a Fortran compiler (with some required add-ons) rather than the complete basekit and hpckit.

wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt-get update
sudo apt-get install intel-oneapi-compiler-fortran

Than again you have to setup your environment with source /opt/intel/oneapi/setvars.sh or with modules.

This are the three packages I’m usually using in my CI setups:

  • intel-oneapi-compiler-fortran for ifort
  • intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic for icc
  • intel-oneapi-mkl-devel for MKL

Non of these information are secrets, they are all available on the Intel oneAPI page, but sometimes they are difficult to find or buried in some seemingly unrelated document.

There is one thing I still want to test at some point, the oneAPI distribution comes with a local conda channel, which allows to use the Intel compilers in conda-build! Given the correct recipe and dependencies (runtime-dependencies from the intel anaconda channel), one can package Intel compiled conda packages. Sounds like an awesome project to combine the Intel compilers with conda-smithy and the conda-forge CDTs.

4 Likes

Windows:

  1. Install Visual Studio 2019 (Community Edition is fine), making sure you select the “Desktop Development with C++” component. See Installing Microsoft Visual Studio* 2019 for Use with Intel® Compilers Under Optional components, do NOT uncheck “MSVC v142” or “Windows 10 SDK”. The other optional components can be deselected.

  2. Install the Intel oneAPI Base Toolkit, selecting at a minimum “Intel Distribution for GDB”. This provides the Fortran debugger support for Visual Studio. A future update may make this unnecessary. MKL is also in this toolkit if you want it.

  3. Install the Intel oneAPI HPC Toolkit, selecting at a minimum “Intel Fortran Compiler”.

5 Likes

There is also an official repository from the Intel oneAPI team to automate usage of the Intel compilers in different CI environments.

The great thing is they provide the download URLs for all the different installers so no need to click through the online masks to get to the download links anymore:

4 Likes

No MACOS_BASEKIT_URL though. Well, for the time being I’ll switch to Ubuntu for tests.

The linked repository sets up a C++ and Fortran compiler for OSX runners using only the HPCkit, seems like there is no basekit on OSX, but correct me if I’m wrong. A lot of features which are available on Linux and Windows are missing on OSX, I think there is no Coarray support and no IntelMPI for example.

@everythingfunctional might have used Intel oneAPI on OSX already for testing with fpm. Maybe he can give some pointers on this particular combination.

As I wrote before. The Intel pages do offer BaseKit for MacOS, at least at the stage of choosing the Kit and its version (web/offline). But then, I could not proceed with the download. I guessed it was some problem with their page, but unless somebody reports successful installation, I cannot be sure.

Yeah, I was able to download the BaseKit for MacOS. That was a more than a couple weeks ago, so I’ve forgotten the exact details, but I don’t remember encountering any difficulties. Just disappointed that there was no coarray support or ifx available.

1 Like