Want to use Abaqus and the Intel OneAPI to compile user subroutines in Windows but are unsure where to begin? In this article, we walk through each step of setting up the required software, setting up the development environment, and modifying Abaqus to support Intel OneAPI. Additionally, we'll outline how to automatically run the initialization batch file each time Abaqus is launched.
To quickly begin compiling user subroutines, follow these instructions.
To compile user subroutines in Windows with Abaqus and Intel OneAPI, you will need to download and install the following software in the specified order:
During the installation of Microsoft Visual Studio 2022, select Desktop development with C++, which is all that is required to compile user subroutines with Abaqus. Note that Microsoft Visual Studio Community Edition is supported.
Once you've installed Visual Studio and rebooted your system, proceed to install the Intel OneAPI Base Toolkit. After installation, Intel OneAPI Base Toolkit automatically detects your Visual Studio 2022 installation and provides integration.
If multiple versions of Visual Studio are present in your system, you can choose the version you want to integrate with.
After configuring the correct version of Visual Studio to use, proceed to install the Intel OneAPI HPC Toolkit. These toolkits provide the necessary compilers and libraries to compile user subroutines.
For more information, visit the following links:
Once you've installed the Intel OneAPI HPC Toolkit, open an Intel Developer Command Window from the Start menu by going to
Start > Intel oneAPI 2023 > Intel oneAPI command prompt for Intel 64 for Visual Studio 2022.
Alternatively, open a regular command prompt window and execute the following command to set the compiler environment variables:
"C:\Program Files (x86)\Intel\oneAPI\setvars.bat"
Switch to a directory where you have writing privileges and intend to carry out your work. It is worth noting that the oneAPI environment is solely configured in this terminal window. If you launch another terminal window, you will have to invoke the setvars.bat script to establish the oneAPI environment.
Create an abaqus_v6.env file in your HOME directory and add the following:
compile_fortran += ['/names:lowercase',]
This is because of a bug in the Intel OneAPI compiler, which may be resolved in a future update. In case you encounter the Abaqus solver abruptly terminating with certain user subroutines, it is necessary to append the following line to the abaqus_v6.env file:
link_sl='LINK /NODEFAULTLIB:LIBCMT.LIB /dll /def:%E /out:%U %F %A %L %B'
From the command configured with Intel OneAPI environment, run the following:
abaqus verify –user_std
This method automates the execution of the initialization batch file every time Abaqus is launched from specific shortcuts. You only need to change the shortcuts for Abaqus Command, Abaqus CAE, and Abaqus Verification in order to use this method.
The steps are as follows:
By following the above steps, you can automate the execution of the initialization batch file each time you launch Abaqus from these shortcuts. This method eliminates the need to manually call the Intel setvars batch file every time you open the Abaqus Command prompt. The compiler will display a message every time the Abaqus shortcut is executed, indicating that this is the recommended method. Additionally, you must perform the same steps for each shortcut in future maintenance releases.
About Bilal Abdul Halim
Bilal Abdul Halim is an Application Engineer at GoEngineer specializing in Abaqus. Bilal holds a Bachelor’s degree in Mechanical Engineering and a Master's degree in Experimental Fluid Mechanics where he studied the effects of corona discharge on viscous oil using particle image velocimetry. When not at work, Bilal is usually playing ping pong or trying different restaurants.
Get our wide array of technical resources delivered right to your inbox.
Unsubscribe at any time.