Set up a local environment file
Abaqus reads the system-wide environment files and afterwards a local environment file if present. The file is expected to be called abaqus_v6.env.For using the xMat with Abaqus the compile_fortran command has to be provided and adjusted in that local file.The recommended way is to copy the full command and needed variables from the system-wide environment file and adjust it.The path to the system-wide environment file (relative to the Abaqus installation) should be for Linux
linux_a64/SMA/site/lnx86_64.env
and for Windows
win_b64/SMA/site/win86_64.env
After copying the full compile_fortran command to the local environment file, add a line specifying to use the free source code format and pass the macro ABAQUS_CALLING.Depending on the operating system and the compiler used, the actual flags might be different. For example, using the GNU Fortran compiler in Windows requires
/free-format /DABAQUS_CALLING
while the Intel compiler requires
/free /DABAQUS_CALLING
Use the GNU Fortran compiler in Linux is slightly different and reads
-free-format -DABAQUS_CALLING
while the Intel compiler requires
-free -DABAQUS_CALLING
As an example, a local environment file abaqus_v6.env for Linux with Intel Compiler should look similar to the following
import os
abaHomeInc = os.path.abspath(os.path.join(os.environ.get('ABA_HOME', ''), os.pardir))
compile_fortran = ['ifort',
'-V',
'-free', '-DABAQUS_CALLING', # <-- this line is important for use with xMat
'-c', '-fPIC', '-auto', '-mP2OPT_hpo_vec_divbyzero=F', '-extend_source',
'-fpp', '-WB', '-I%I',
'-I'+abaHomeInc, '%P',
]
del abaHomeInc
For more information about using local environment files, please consult your Abaqus manual.