Abaqus is usually configured to compile subroutines with the proprietary Intel Fortran Compiler, which will either cost you a lot of money or access to a university license.
This is how you can get Abaqus 6.14-5 and 2018 to use the GFortran Compiler and to have GFortran interpret the code in the F90 Free form format.
This method was completely successfully tested on Debian Buster with Abaqus 6.14-5 and on Linux Mint 18 (based on Ubuntu 16.04) with Abaqus 2018. For testing on Abaqus 2016 on Debian Buster see the last section.
Locate your abaqus_v6.env file or for Abaqus2016 the lnx86_64.env. You can either use a default file in the directory where you installed Abaqus in, or a copy of a complete abaqus_v6.env (for both cases) in the directory in which you are executing Abaqus.
Change the following:
fortCmd = “ifort” # <– Fortran compiler
fortCmd = “gfortran”
compile_fortran = [fortCmd,
‘-c’, ‘-fPIC’, ‘-auto’, ‘-mP2OPT_hpo_vec_divbyzero=F’, ‘-extend_source’,
‘-fpp’, ‘-WB’, ‘-I%I’]
compile_fortran = (fortCmd + ” -ffree-form -c -fPIC -I%I -extend_source -free”)
link_sl = [fortCmd,
‘-cxxlib’, ‘-fPIC’, ‘-threads’, ‘-shared’,’-Wl,–add-needed’,
‘%E’, ‘-Wl,-soname,%U’, ‘-o’, ‘%U’, ‘%F’, ‘%A’, ‘%L’, ‘%B’, ‘-parallel’,
link_sl = (fortCmd +
” -gcc-version=%i -fPIC -shared ” +
“%E -Wl,-soname,%U -o %U %F %A %L %B -Wl,-Bdynamic ” +
” -lifport -lifcoremt”)
Since Abaqus only accepts file extensions which do NOT imply a version of F90 or above, gfortran will automatically compile it as a nonfree F77 program, leeding to severe errors. The -ffree-form flag as used the second point is crucial to make it work.
You should be able to successfully run
abq6145 job=YourJOB user=YourUmat interactive
If you have a valid YourJOB.inp and a valid YourUmat.f
The compiling works for Abaqus 2016 on Debian Buster as well, but with an error on linking.
End Compiling Abaqus/Standard User Subroutines
Begin Linking Abaqus/Standard User Subroutines
Abaqus Error: The Abaqus user subroutine library could not be found.
This might be due to a corruption of my Abaqus 2016 installation. Note: Abaqus 2016 has been installed on Debian Jessie and the test was now done with this installation taken over to Debian Buster. This might be an explanation for the error (even though the Abaqus 6.14-5 installation has endured the same procedure!).
Title image source: Hans