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.


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


There are slightly distinct usage patterns to access Intel oneAPI compilers on Windows vs. Mac/Linux.


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/oneapi/