Install Intel oneAPI C++ and Fortran compiler

Intel oneAPI is a cross-platform toolset that covers several languages including C, C++, Fortran and Python. Intel oneAPI including the Fortran compiler is free-to-use and no login is required to download oneAPI. The no-cost oneAPI access is distinct from Intel Parallel Studio that requires a paid license, except for instructional use or to develop open source projects.

Install

Refer to the oneAPI install guide to download the oneAPI Fortran compiler for Linux, MacOS or Windows.

  1. (Windows only) Install latest Visual Studio
  2. install GDB from oneAPI Base Toolkit
  3. Install the remaining packages below with oneAPI HPC toolkit

The oneAPI package options we installed included:

  • GDB
  • Intel MPI library
  • Intel C++ compiler
  • Intel Fortran compiler
  • Intel Math Kernel Library

Usage

As with Intel Parallel Studio, there are slightly distinct usage patterns to access the Intel oneAPI compilers on Windows NOTE: it is NOT recommended by Intel to use ifx.exe or icx.exe directly. You should be using ifort icl icc icpc with Intel oneAPI as with Intel Parallel Studio.

Windows

On Windows a Start menu shortcut for a oneAPI command prompt is installed. CMake et al should just find the Intel compiler when in the oneAPI command prompt. Otherwise run setvars.bat as per oneAPI documentation.

Linux / MacOS

each time you wish to use Intel oneAPI, do

. /opt/intel/inteloneapi/setvars.sh