Intel releases oneAPI Toolkit, free, Fortran 2018

Duh! I sometimes forget that Ubuntu LTS can be very out of date. Indeed, I have lmod 6.6, and depends_on was added in 7.6. Replacing depends_on with load works, but I’ll have to see if maybe I can get a newer lmod installed – otherwise it seems to leave some “inactive” modules after unloading.

The other mistake I made with the original

sudo /opt/intel/oneap/modulefiles-setup.sh --output-dir=/usr/share/lmod/lmod/modulefiles/intel

was that I put the module files in a intel subdirectory. This does not work! That’s because the files have hardcoded interdependencies, e.g., intel/compiler/latest contains a module load tbb, which would have to be module load intel/tbb.

The output folder of modulefiles-setup.sh has to be directly on MODULEPATH! It seems like pretty bad namespacing to me (module load compiler?.. maybe I have more than one “compiler”…?). Oh well.

Anyway, it’s working now. Thanks!

I filed a (now closed) Lmod issue on their GitHub specifically to deal with Intel oneAPI, particularly the Intel Python distribution (double conda prompt), which I still haven’t gotten to fully troubleshoot yet. You can read it here.

I usually avoid installing Intel Python mainly because it is ~10GB of disk space. For conda environments I found the following module to work nicely to activate and deactivate the base environment

local prefix = "/home/awvwgk/software/opt/conda"

prepend_path("PATH", pathJoin(prefix, "bin"))

local conda_sh = pathJoin(prefix, "etc/profile.d/conda."..myShellType())
local mamba_sh = pathJoin(prefix, "etc/profile.d/mamba."..myShellType())

cmd = "source " .. conda_sh .. "; source " .. mamba_sh .. "; conda activate base"
execute{cmd=cmd, modeA={"load"}}

if (myShellType() == "csh") then
  -- csh sets these environment variables and an alias for conda
  cmd = "unsetenv CONDA_EXE; unsetenv _CONDA_ROOT; unsetenv _CONDA_EXE; " ..
        "unsetenv CONDA_SHLVL; unalias conda"
  execute{cmd=cmd, modeA={"unload"}}
end
if (myShellType() == "sh") then
  -- bash sets environment variables, shell functions and path to condabin
  if (mode() == "unload") then
    remove_path("PATH", pathJoin(prefix, "condabin"))
  end
  cmd = "conda deactivate; unset CONDA_EXE; unset _CE_CONDA; unset _CE_M; " ..
        "unset -f __conda_activate; unset -f __conda_reactivate; " .. 
        "unset -f __conda_hashr; unset CONDA_SHLVL; unset _CONDA_EXE; " .. 
        "unset _CONDA_ROOT; unset -f conda"
  execute{cmd=cmd, modeA={"unload"}}
end

I’m using it for miniforge installation with mamba, so you might have to remove the mamba_sh line.

1 Like

Following the official instructions for dnf, I have successfully installed the Intel Fortran compilers on a Fedora machine in three steps:

$ tee > /tmp/oneAPI.repo << EOF
[oneAPI]
name=Intel® oneAPI repository
baseurl=https://yum.repos.intel.com/oneapi
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://yum.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
EOF
$ sudo mv /tmp/oneAPI.repo /etc/yum.repos.d
$ sudo dnf install intel-oneapi-compiler-fortran

The total download size is 522 M and the installed size: 1.9 G.

Then you set the environment variables and the compilers are available:

$ source /opt/intel/oneapi/setvars.sh --force > /dev/null
1 Like

Thanks a lot @awvwgk, I finally solved the problem!

Here’s what my Intel Python module looks like right now.

family( "python" )
whatis( "Intel Python 3.7" )
help([[
Intel Distribution for Python
Bundled with Intel oneAPI 2021.4
]])

local root = "/opt/intel/oneapi"
local ipy = pathJoin( root, "intelpython/latest" )
local conda_sh = pathJoin( ipy, "etc/profile.d/conda." .. myShellType() )
local envver = "2021.4.0"

cmd = "source " .. conda_sh .. "; " ..  "conda activate " .. envver
execute{cmd=cmd, modeA={"load"}}

if (myShellType() == "csh") then
  -- csh sets these environment variables and an alias for conda
  cmd = "unsetenv CONDA_EXE; unsetenv _CONDA_ROOT; unsetenv _CONDA_EXE; " ..
        "unsetenv CONDA_SHLVL; unalias conda"
  execute{cmd=cmd, modeA={"unload"}}
end
if (myShellType() == "sh") then
  -- bash sets environment variables, shell functions and path to condabin
  if (mode() == "unload") then
    execute{cmd="for i in $(seq ${CONDA_SHLVL:=0}); do conda deactivate; done;", modeA={"unload"} }
    cmd = "conda deactivate; unset CONDA_EXE; unset _CE_CONDA; unset _CE_M; " ..
          "unset -f __conda_activate; unset -f __conda_reactivate; " .. 
          "unset -f __conda_hashr; unset CONDA_SHLVL; unset _CONDA_EXE; " .. 
          "unset _CONDA_ROOT; unset -f conda; " ..
          "unset CONDA_PREFIX; unset CONDA_PYTHON_EXE"
    execute{cmd=cmd, modeA={"unload"}}
    remove_path( "PATH", pathJoin( ipy, "bin" ))
    remove_path( "PATH", pathJoin( ipy, "condabin" ))
  end
end

1 Like

Hi,
I am using a brand new Dell Laptop with windows 11. I was trying to install Intel oneAPI. But the installation screen is vanishing like a flash. Does anyone here found the same problem ? Please help me.

Does this help? KNOWN ISSUE with Intel oneAPI Toolkits versions 2022.1 and 2022.1.2 and standalone components - Intel Communities

1 Like

Thanks a lot. It is working with VS2019.
I also noticed that we can now download standalone components in oneAPI here

Is there any difference with the base and HPC toolkits ? I hope no.

The Base and HPC Toolkits have different sets of components - it all depends on what you want. The Toolkits by default install many components, but if you don’t want them all (or most), go for the standalone installers instead. I don’t think you get notified of updates, however, if you use the standalone installers.

@Ashok, to state the obvious:

  1. When using Intel components, you may want to peruse first Intel’s forum, especially the pinned discussions there and particularly the one titled, “Intel® Fortran Compiler Information and Frequently Asked Questions”
  2. Inquire also at that forum where you can also get responses from Intel Support Team and other Intel Component users.
1 Like

I have installed Windows SDK, MS Visual Studio 2022, Intel one API Base and HPC Toolkits. I have the error rc.exe not found. I have copied rc.exe and rcdll.dll fils from Windows Toolkit in VIsual Studion bin directory according to the answers posted on stackflow for this error. Still I cannot get past this issue. Did you have this issue and how did you resolve it?

@sihaqqi ,

As you would have noted from the Stackoverflow discussion, the issue with rc.exe pertains to something being amiss your Visual Studio installation which is a product from Microsoft. As such, it has nothing to do with Fortran generally. And even Intel Fortran may not need that executable for many of its projects.

Nonetheless, you need to follow up with Microsoft Visual Studio forums to resolve the error with rc.exe.

In the meantime, here are a couple of things to try that may be of indirect help:

  1. check whether you followed the steps in this link for your Visual Studio installation. It has mainly to do with ensuring the Microsoft C/C++ compiler and also the linker components are installed because Intel Fortran needs them. If not, uninstall everything and start afresh.

  2. After completing step 1, if you still encounter the rc.exe not found error, run VSInstaller to configure additional components toward Universal C/C++ and Windows Kits.

I was updating my software tools last week and Intel’s was one of those. I made the installation guide for Windows 10.