Compiling Abaqus with Fortran

image

Introduction


Welcome to our "Compiling Abaqus with Fortran" blog, your go-to guide for compliling Abaqus with Fortran on Windows. This article was done with Abaqus 2024 and Windows 10, but it should also work for any version of Abaqus after 2019 and for Windows 11 as well.

In the realm of computational simulations, the fusion of SIMULIA Abaqus and Fortran is important to execute user subroutines such as USDFLD, UMAT, VUMAT, etc... As you might be aware, SIMULIA Abaqus, a powerful finite element analysis tool for structural simulations by Dassault Systèmes, and Fortran, is a robust language facilitating efficient numerical computations.

Join us as we navigate the steps, offering concise insights to enhance your Abaqus-Fortran compilation experience!

Prerequisites


The user is assumed to have a licensed Abaqus 2024 installed already.

Microsoft Visual Studio 2022


The Community version of Visual Studio 2022 is the minimum requirement and can be downloaded in this link: Download Visual Studio Tools

When installing Visual Studio 2022, the user must ensure that “Desktop Development with C++” has been enabled alongside the main Visual Studio Core Editor.

image

Intel® Toolkits


The recent release of Intel OneAPI is free to install. The user should download and install both the OneAPI Base and High-Performance Computing (HPC) toolkit for the Fortran compiler. The OneAPI Base toolkit should be downloaded and installed first as it is a prequisite to download and install the HPC toolkit.

The link for the OneAPI Base and HPC downloads can be found here: Intel® oneAPI Toolkits

Due to bugs, it is recommended to use the online Installer to download both OneAPI packs. Please ensure that when proceeding to download, the option “Maybe next time. Please take me to download” is selected to automatically download the setup files. For lack of inconvenience, use the images shown below as a reference to successfully download both toolkits.

image
image

When downloading and installing both the Base and HPC toolkit, the following libraries are sufficient:

Intel® ToolkitRequired Libraries
oneAPI Base Toolkit- Intel oneAPI DPC++/C++ Compiler
- Intel oneAPI Threading Building Blocks
- Intel oneAPI DPC++ Library
- Intel Distribution for GDB
oneAPI HPC Toolkit- Intel oneAPI DPC++/C++ Compiler & Intel C++ Compiler Classic
- Intel Fortran Compiler (Beta) & Intel Fortran Compiler Classic

During the installation, ensure that you integrate Intel oneAPI with Visual Studio 2022 as the Integrated IDE.

Adding the ABAQUS Command and modifying the ABAQUS environment


The user should first go to the Intel oneAPI installation folder. A reference where this can be found is shown below. Click the bar and type “cmd”. A command prompt will appear. In the command prompt, type “setvars.bat” and run the command. This will set the environment files ready in the system.

image
image

The user then needs to find the ABAQUS Commands folder found in <installation directory>\SIMULIA\Commands. Since the guide is for the ABAQUS 2024 version, the “abq2024.bat” will be edited. Right click and edit the file using notepad.

image

The following calls, Visual Studio’s “vcvarsall.bat” and OneAPI’s “vars.bat” need to be inputted depending on where they are in the system. An example of the file locations are shown below

Copy Code
@call "<installationdirectory>:\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
@call "<installationdirectory>:\Intel\oneAPI\compiler\latest\env\vars.bat" intel64 vs2022

The following image shows where the commands should be inputted within the file.

image

Save the file and close the notepad file.

The ABAQUS environment file will then need to be edited. This can be found in <installation directory>\SIMULIA\EstProducts\2024\win_b64\SMA\site and editing the abaqus_v6.env file using notepad. The following commands need to be added in the end of the file.

Copy Code
compile_fortran += ['/names:lowercase',]
link_sl='LINK /NODEFAULTLIB:LIBCMT.LIB /dll /def:%E /out:%U %F %A %L %B'
image

Save the file and close the notepad.

Finally, open a command prompt using administration privileges and type “abaqus verify -user_std”.

Copy Code
abaqus verify -user_std

If the below message appears, ABAQUS user-subroutines has been successfully configured with the compiler!

image

Need Further Assistance?

Please send us a Ticket on the 3DSupport App or contact us at support(AT)launchtech.ae

Mohammed Zourob

Solutions Consultant - EMAG

Mohammed holds a Bachelor's in Electrical Engineering and an MBA. His expertise lies in power and renewable energy, electromagnetic simulations, and product life cycle management.