top of page

Free Fortran for Abaqus: Windows Guide

  • Aug 7
  • 3 min read

Updated: Dec 2

Visual Studio 2022 installation window showing Desktop development with C++ selected
Visual Studio 2022: Select 'Desktop development with C++' and required components

Why a Fortran Compiler is Needed for Abaqus

Abaqus provides robust built-in capabilities, but many users extend its functionality using user subroutines written in Fortran. These subroutines allow you to define custom material behavior, loads, boundary conditions, and more. To use them, however, you need a compatible Fortran compiler.


Fortunately, a free and compatible solution is now available: the Intel® oneAPI HPC Toolkit. In this guide, we’ll walk through the basic steps to install and configure it on a Windows system for use with Abaqus.


If you’re a 4RealSim customer, you can also request:

  • A detailed installation guide in PDF

  • Direct download links

  • One-on-one technical support

 

Step-by-step installation for Windows

Prerequisites

Before starting, make sure:

  • The CAA components of Abaqus are installed. These must match your installed solver version, including any hotfixes.

    • One should open using windows file manager the following location: 

      • C:\SIMULIA\EstProducts\<abq version>\InstallData\ 

  • From the Golden edition, the following two files should be present:

    • UserIntentions_CODE.xml 

    • UserIntentions_CAA_Additional_42x.xml 

  • From the hotfix (if installed), these files should be present:

    • UserIntentions_CODE_42x.<HF#>xml 

    • UserIntentions_CAA_42x.<HF#>.xml 

  • If you only find 1 of the two hotfix files or the number at the place of <HF#> placeholder is not identical, the hotfix installation is incomplete. Ensure the installation of both components.  

    • If multiple hotfixes have been installed in the past only compare the largest number. 

  • You have administrator rights on your system.

 

Step 1 – Install Microsoft Visual Studio 2022

Abaqus requires Visual Studio for compiler integration.

  • Go to the Visual Studio 2022 download page.

  • Download and launch the installer.

  • Choose “Desktop development with C++.”

  • Ensure the following components are selected:

    • Windows 10 SDK

    • MSVC build tools (latest)

    • Just-In-Time debugger

    • Complete the installation.

 

Visual Studio 2019 installer showing required components selected under Desktop development with C++"
Visual Studio 2022: Select 'Desktop development with C++' and required components

 

Step 2 – Install Intel® oneAPI Fortran Compiler


Step 3 – Update Abaqus Environment File

To ensure compatibility, modify the compiler flags in the win86_64.env edit the Abaqus environment file:

  • Located in the path: "<Abaqus installation directory>\EstProducts\<abq version>\win_b64\SMA\site\win86_64.env".

  • Add an argument to the “compile_fortran” command:

    • Argument to add: ‘/names:lowercase’

    • The first lines of the command should look like this

 

The first lines of the command should look similar like:

compile_fortran=['ifort', 
	'/names:lowercase',
	'/c', '/fpp', '/extend-source',

For Abaqus 2024 and newer more changes should be made

  • ifort should be changed to ifx

  • Remove '/Qprec-sqrt' from the compiler options

  • Comment out:  '/Qfp-stack-check’

    • The first lines of the command should look like this:

compile_fortran=['ifx',
	'/names:lowercase',
	'/c', '/fpp', '/extend-source', 
	'/DABQ_WIN86_64',  '/DABQ_FORTRAN',
	'/iface:cref', '/recursive',
	'/Qauto',  # <-- important for thread-safety of parallel user subroutines
	'/align:array64byte',
	'/Qpc64',                      # set FPU precision to 53 bit significand
	'/Qprec-div',                  # improve precision of FP divides and sqrt
	'/Qfma-',                      # disable floating point fused multiply-add
	'/fp:precise',                 # floating point model: precise 
	'/Qimf-arch-consistency:true', # math library consistent results
	'/Qfp-speculation:safe',       # floating point speculations only when safe
	'/Qprotect-parens',            # honor parenthesis during expression evaluation
	#'/Qfp-stack-check',           # enable stack overflow protection checks

Step 4 – Automate Compiler Sourcing

Change the Abaqus command.bat files to automatically source the compiler environment.

  • Update the abq<abq version>.bat file to match the below example.

Note: your installation folder may vary, please check your installation folder of Abaqus (CAE),   Microsoft Visual studio and Intel® OneAPI.


@echo off
setlocal
set ABA_COMMAND=%~nx0
set ABA_COMMAND_FULL=%~f0
set ABA_DRIVERNAME=%~nx0
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files (x86)\Intel\OneAPI\setvars.bat" --force
"C:\SIMULIA\EstProducts\<abq version>\win_b64\code\bin\SMALauncher.exe" %*
endlocal

 

  • Change this configuration separately for every installed Abaqus version.

  • When Abaqus/CAE is launched through a command prompt, the presence of both Microsoft Visual Studio and Intel OneAPI should be visible in the startup messages.

  • Switch to a directory where you have write permissions, for example: cd C:\temp.

  • Run the Abaqus user subroutine verification::

abaqus verify -user_std -user_exp
  • If any verification step fails, review the log files in the verify directory to identify the compiler or environment variable causing the issue.



Having Trouble Configuring Fortran With Abaqus on Windows?

If you're a 4RealSim customer and need help during installation or setup, we are happy to assist. Use the contact form or email us at marketing@4realsim.com to request support, download links, or the Linux installation guide.

 

Comments


bottom of page