Making User-Defined Executables and Subroutines

The abaqus make utility is used to create user postprocessing executables and user-defined libraries of Abaqus user subroutines. The commands used to compile and link a user-supplied program or user subroutine source file can be changed using the appropriate Abaqus environment file parameters; i.e., compile_cpp, compile_fortran, link_exe, and link_sl. You can skip the compilation step by providing a precompiled object as input for postprocessing programs.

Postprocessing executables created using this procedure must be run using the Abaqus execution procedure. This is necessary to set the operating system environment variables for finding the Abaqus utility libraries. To run a user postprocessing program, use the following command:

abaqus job-name

User subroutine shared libraries created using this procedure are used by specifying the usub_lib_dir variable in the Abaqus environment file. The advantage of doing this is that an analysis using user subroutines can execute without having to compile or link the user subroutine.

User subroutine shared libraries created using the uniquelibs option must be run using the Abaqus execution procedure as follows:

abaqus job-name uniquelibs

This page discusses:

Command Summary

abaqus make { job job-name library source-file } user { source-file object-file } directory library-dir object_type { fortran c cpp } uniquelibs

Command Line Options

job

This option is used to create a user-supplied postprocessing program. The value of the option specifies the name of the executable created by this procedure. It is also used as the default source file name.

If no option is given on the command line, you will be prompted for this value.

library

This option is used to create user subroutine object files and shared libraries. The value of the option specifies the name of the user subroutine source file to be compiled and linked. The resulting object and shared library files are placed in the directory given by the command line directory option. If the directory option is not used, the files are placed in the current working directory.

The object file or files created have a suffix indicating if the user subroutine is for Abaqus/Standard or Abaqus/Explicit. The Abaqus/Standard object file suffix is —std. Abaqus/Explicit has single and double precision object files; the object file suffixes are —xpl and —xplD. The Abaqus/Standard user subroutine shared library that is created is called standardU, and the Abaqus/Explicit shared libraries are called explicitU and explicitU-D. If the directory option is used and it contains object files with the appropriate suffix for the shared library that is being created, those files are linked to the shared library.

user

This option is valid only when used in conjunction with the job option. It is used to specify the name of the source or object file containing your program if it is different from job-name. If a file extension is not provided, the option value with a Fortran source file extension is sought. If a file by this name is not found, the option value with an object file extension is sought.

directory

This option is valid only when used in conjunction with the library option. It is used to specify the absolute path of the destination of the user subroutine object and shared library files that will be created by the procedure. It is also used to specify the location of additional object files that are to be linked to the shared library or libraries being created. If the option is omitted, the files created by the procedure are placed in the current working directory.

object_type

This option is valid only when used in conjunction with the job option. It is used to specify the type of object file, either Fortran, C, or C++, given by the job or user option.

uniquelibs

This option is valid only when used in conjunction with the library option. It is used to create Abaqus user subroutines in individual dynamic link libraries or shared objects. These libraries contain any utility routines included in the user subroutine. The library naming conventions are user_subroutine_name_usub.dll and user_subroutine_name_usub.so.

To direct Abaqus to use these user subroutines during input file execution, you must specify the uniquelibs option in the abaqus execution procedure (see Abaqus/Standard and Abaqus/Explicit Execution).

The use of global data between user subroutines via common blocks usage in Fortran routines is not allowed. If encountered, Abaqus issues a warning during the build process. To ensure the sharing of global data transfer among user subroutines, you must declare DLLExport and DLLImport statements accordingly.

Examples

To create an executable called “pprocess” given a Fortran source file of the same name, use the following command:

abaqus make job=pprocess

This program can then be run using the command

abaqus pprocess