Linking Intel oneAPI and Visual Studio with Abaqus 2019/2020

Abaqus is one of the most popular and common finite element packages used across academia and industry. To the best of my knowledge, it is the first commercial finite element program which allowed users to implement their own constitutive models and finite element models via Fortran based user subroutine. But it has always been a challenge to install the software packages properly with Abaqus to enable that capability. Abaqus recommends Intel C++/ Fortran compiler for user subroutine feature. Additionally, if you’re on Windows, you will need Microsoft Visual Studio to be linked with Intel Fortran compiler. Over the years both Intel and Microsoft made huge changes to these software – starting from their licensing to interface which make students and professionals very confused every time they have to install any of these products.

Earlier Abaqus versions required professional edition of Intel Fortran and VS Studio which would have costed academic labs to spend thousands of dollars. In last few years, Intel started to give out 1-year license to students for Intel Parallel Studio XE (which had all Intel software package including fortran compiler) and Microsoft released Visual Studio Community Edition with full capabilities for free. Quite a few tutorials are available online on how to link these But the latest scenario, as of December 2020, Intel rebranded Intel Parallel Studio XE as Intel oneAPI and people are having trouble link Intel oneAPI to Abaqus. Intel oneAPI is free for everyone and no license is required. This blog will demonstrate how to download, install, and link Intel oneAPI and Visual Studio Community with Abaqus 2019 or 2020.

To complete the process, you will need recent version of Abaqus, either academic or commercial license. I tested the procedure with Abaqus 2019 and 2020. I am not going to discuss Abaqus installation as you will likely to have it installed by tech support of your university or company. In case you’re doing the installation, you can find other tutorials available on internet. Next you will need Microsoft Visual Studio 2017 or 2019 (I used 2019) and Intel oneAPI 2021. You have to install the software in that order, otherwise it won’t work.

Microsoft Visual Studio

Intel oneAPI 2021 supports Visual Studio 2017 and Visual Studio 2019. Please search on google to download Visual Studio Community Edition for either of these versions. I recommend the latest one, VS 2019. Download the installer and click on it to start the installation process. On the installation page, please select “Desktop development with C++” and keep rest of them default. It will take a few minutes to install.

Intel oneAPI

Intel oneAPI split Intel Parallel Studio XE (it includes some new features and libraries as well) into two packages; Intel oneAPI Base Toolkit and Intel oneAPI HPC Toolkit. To be able to use Intel Fortran and C++ compiler, you will need both toolkits. As of February 2021, Intel website has a bug which prevents user from downloading Intel oneAPI when they are logged in to Intel software center/ website. Intel is supposed to fix the bug soon. For now, to download the software, log out of Intel website and then navigate to download pages of “Intel oneAPI Base Toolkit” and “Intel oneAPI HPC Toolkit” from google search. Select the operating system and Local as installer type and click on Download. It will ask you to sign in, you should click on “May be next time. Please take me to my download”. It will start downloading the software. If that doesn’t work, please clear your browser cookies and/ or browse in incognito mood (suggested on Intel forum). Once the bug is fixed, you can download in a regular way.

Once both of the packages are downloaded, first install Intel oneAPI Base Toolkit. If you click on the installer, it will uncompress all the file temporarily and then start the installation process. Please go ahead with default installation. You might be able to save some space by customizing but I didn’t really bother. It will recognize the existence of Visual Studio 2017 and 2019. Please click on the appropriate version and move forward with installation. It might take about 15-20 minutes to install the Base Toolkit. Next step is to install the HPC tool kit in same procedure. This will take 5-10 minutes to get installed.

Linking Intel Fortran with Abaqus

Update: There’s an easy alternative method to accomplishing the same task (see below). First approach is traditional and people who have done it before will find it familiar.

  1. If you did the default installation procedure, then batch file to start Visual Studio should be installed here: “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat” and Intel Fortran compiler should be installed at “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat”. Copy these locations with file names. From Windows start menu, search “Edit the system environment variables”. Then click on Environment Variables > Path (under system variables) and New. Paste those previously copied batch file paths and save them. You can see I already added those (2nd and 3rd from the bottom on the rightmost image).
  2. Next step is to link Intel Fortran compiler with Abaqus. Search Abaqus Command from Windows Menu. Click on Open File Location. Then in the Windows Explorer right click on Abaqus Command and click on Properties. In shortcut tab, locate target. Change from C:\WINDOWS\system32\cmd.exe /k to “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat” intel64 vs2019 & C:\WINDOWS\system32\cmd.exe /k. Following image is showing the step-by-step procedure.
  3. Now in the windows explorer, right click on Abaqus CAE, go to properties, and then shortcut tab. Change the target from C:\SIMULIA\CAE\2019\win_b64\resources\install\cae\launcher.bat cae || pause to “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat” intel64 vs2019 & C:\SIMULIA\CAE\2019\win_b64\resources\install\cae\launcher.bat cae || pause.
  4. In previous versions of Intel Parallel Studio XE, this step was not required. This step is new, and I think, this is kind of a quick fix, suggested by SIMULIA, for making this new Intel oneAPI Toolkits compatible with Abaqus. Please navigate to C:\Program Files\Dassault Systemes\SimulationServices\V6R2020x\win_b64\SMA\site directory and locate abaqus_v6.env file. Open the file using any text editor and add following line at the end of the file and save the file as administrator:
    compile_fortran += [‘/names:lowercase’,]

    Congratulations! You’re done installing Visual Studio and Intel oneAPI and linking it with Abaqus.

Alternative method

I recently discovered an alternate way of accomplishing the steps 1-3 described above. Go to C:\SiMULIA\Commands directory and open abq2019.bat file with any text editor. Before @echo off, add the following lines to the file and save it as administrator. Please make sure the path of vars.bat is correct based on your installation.

SET PATH=%PATH%;C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\windows\bin\intel64;
call “C:\Program Files (x86)\Intel\oneAPI\compiler\2021.1.1\env\vars.bat” intel64

These lines will ensure calling Intel Fortran compiler when Abaqus solver is called. I prefer this method over the old one as it’s easier and gives you the flexibility to use Abaqus user subroutine feature from PowerShell and cmd via Window’s new terminal application. Please remember, you still have to do step 4 for new Intel oneAPI Toolkit. Hope Intel fixes this soon.

Verify Linking and Installation

Open Abaqus Command (you can also do it from cmd or Powershell terminal) from Windows menu and type abaqus info=system. It should show system information as follows, including the new compiler and linker information. 

To verify further, type abaqus verify -user_std and/ or abaqus verify -user_exp on the Abaqus Command window. If the installation and linking were successful, then you will see something like this:

abaqus verify -user_std is for verifying user subroutine feature for Abaqus/ Standard (UMAT, UEL, etc.) and abaqus verify -user_exp is for verifying user subroutine feature for Abaqus/ Explicit (VUMAT, VUEL, etc.). To verify all of the features of Abaqus you can type abaqus verify -all. Please note, this might take a while and some components might not pass depending on your license and installation.

%d bloggers like this: