AcuMakeDll

Make a dynamic linked library from user codes, implementing user-defined functions. This program runs on Windows platforms only.

Syntax

acuMakeDll [options]

Type

AcuSolve User-Defined Functions Program

Description

AcuMakeDll is a utility program that builds a dynamic linked library from a set of user source codes containing user-defined functions. One or more libraries may then be loaded into AcuSolve. AcuMakeDll is for Windows platforms only.

AcuMakeDll is written in Perl 5. If execution of this script generates an error message, such as
acuMakeDll - command not found

then Perl may not be on your system.

AcuMakeDll relies on files stored in ACUSIM installed directories. As such, it requires the environment variables ACUSIM_HOME and ACUSIM_MACHINE.

AcuMakeDll supports Intel C++ Compiler (version 8 to 16), Microsoft Visual C++Compiler (version 8 to 14) and Intel Fortran Compiler (version 8 to 16). Other compilers may require extending AcuMakeDll.

AcuMakeDll looks for available C++ and Fortran compilers in your system, and their build environments are invoked at the run time. If your system has both Intel and Microsoft compilers, AcuMakeDll chooses the former. Note that version eight of both Intel C++ and Fortran Compilers support only 32-bit compilation. Search paths used in AcuMakeDll are the following default installation directories:

Intel C++ Compiler Search Path

Version 19 (2019)
%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries_2019\windows\bin\iclvars.bat
Version 18 (2018)
%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries_2018\windows\bin\iclvars.bat
Version 17 (2017)
%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries_2017\windows\bin\iclvars.bat
Version 16 (2016)
%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries_2016\windows\bin\iclvars.bat
Version 15 (2015)
%ProgramFiles(x86)%\Intel\Composer XE 2015\bin\iclvars.bat
Version 14 (2013 SP1)
%ProgramFiles(x86)%\Intel\Composer XE 2015\bin\iclvars.bat
Version 13 (2013)
%ProgramFiles(x86)%\Intel\Composer XE 2013\bin\iclvars.bat
Version 12.1 (2011)
%ProgramFiles(x86)%\Intel\Composer XE 2011 SP1\bin\iclvars.bat
Version 12.0 (2011)
%ProgramFiles(x86)%\Intel\ComposerXE-2011\bin\iclvars.bat
Version 11.1
%ProgramFiles(x86)%\Intel\Compiler\11.1\xxx\bin\iclvars.bat
Version 11.0
%ProgramFiles(x86)%\Intel\Compiler\11.0\xxx\cpp\bin\iclvars.bat
Version 10.1
%ProgramFiles(x86)%\Intel\Compiler\C++\10.1.xxx\{EM64T, IA32}\Bin\iclvars.bat
Version 10.0
%ProgramFiles(x86)%\Intel\Compiler\C++\10.0.xxx\{EM64T, IA32}\Bin\iclvars.bat
Version 9.1
%ProgramFiles(x86)%\Intel\Compiler\C++\9.1\{EM64T, IA32}\Bin\iclvars.bat
Version 9.0
%ProgramFiles(x86)%\Intel\Compiler\C++\9.0\{EM64T, IA32}\Bin\iclvars.bat
Version 8.0, 8.1
%ProgramFiles(x86)%\Intel\CPP\Compiler80\Ia32\Bin\iclvars.bat

where xxx is the three-digit build number.

Microsoft Visual C++ Search Path

Version 8--16
%ProgramFiles(x86)%\Microsoft Visual Studio xxx\VC\vcvarsall.bat
where xxx is the version number: {16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0}
Note: Intel 2017, 2018, 2019 do not support the VS2010 option. Using the VS2015 option instead.

Intel Fortran Compiler Search Path

Version 16 (2016)
%ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat
Version 15 (2015)
%ProgramFiles(x86)%\Intel\Composer XE 2015\bin\ifortvars.bat
Version 14 (2013 SP1)
%ProgramFiles(x86)%\Intel\Composer XE 2013 SP1\bin\ifortvars.bat
Version 13 (2013)
%ProgramFiles(x86)%\Intel\Composer XE 2013\bin\ifortvars.bat
Version 12.1 (2011)
%ProgramFiles(x86)%\Intel\Composer XE 2011 SP1\bin\ifortvars.bat
Version 12.0 (2011)
%ProgramFiles(x86)%\Intel\ComposerXE-2011\bin\ifortvars.bat
Version 11.1
%ProgramFiles(x86)%\Intel\Compiler\11.1\xxx\bin\ifortvars.bat
Version 11.1
%ProgramFiles(x86)%\Intel\Compiler\11.0\xxx\Fortran\Bin\ifortvars.bat
Version 10.1
%ProgramFiles(x86)%\Intel\Compiler\Fortran\10.1.xxx\{em64t, IA32}\bin\ifortvars.bat
Version 10.0
%ProgramFiles(x86)%\Intel\Compiler\Fortran\10.0.xxx\{em64t, IA32}\bin\ifortvars.bat
Version 9.1
%ProgramFiles(x86)%\Intel\Compiler\Fortran\9.1\{em64t, IA32}\bin\ifortvars.bat
Version 9.0
%ProgramFiles(x86)%\Intel\Compiler\Fortran\9.0\{em64t, IA32}\bin\ifortvars.bat
Version 8.1, 8.0
%ProgramFiles(x86)%\Intel\Fortran\compiler80\IA32\BIN\ifortvars.bat

where xxx is the three-digit build number.

If the Intel or Microsoft compiler is installed outside of the above search paths, you can still use -cbat and -fbat options to directly specify the full paths of iclvars.bat and ifortvars.bat files. Note that you also need to provide necessary arguments for these batch files.

If your system does not have a C/C++ compiler, you may download and install a free compiler provided by Microsoft:

For Windows 10: Microsoft Visual Studio Express 2015 for Windows (contains 64-bit compiler)

www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-10

For Windows 7 and 8: Microsoft Visual Studio Express 2015 for Windows

www.visualstudio.com/downloads/download-visual-studio-vs#d-express-windows-desktop

If your system has compilers other than Intel or Microsoft, you may start off from their Command Prompt. At first, execute the following command from the AcuSolve command prompt:
echo %ACUSIM_ROOT%\bin\acusim.bat

then copy and paste the output of the above command into the compiler's Command Prompt. This will bring up AcuSolve's environment variables. Once the compiler's Command Prompt has AcuSolve environment variables such as %ACUSIM_HOME% and %ACUSIM_MACHINE%, you can invoke AcuMakeDll to create a dynamic link library.

In the following, the full name of each option is followed by its abbreviated name and its type. For a general description of option specifications, see Command Line Options and Configuration Files. See below for more individual option details:

help or h (boolean)
If set, the program prints a usage message and exits. The usage message includes all available options, their current values and the place where each option is set.
user_library or lib (string)
The name of the resulting dynamic linked library.
user_source_files or src (string)
Comma-separated list of user source files. The comma-separated fields may contain shell file name generation characters. All files must have extension ".c" (for C codes) or ".f, .for, .f77, f90, f95" (for Fortran codes). If user_source_files is set to _auto, all files with extension ".c" and ".f, .for, .f77, f90, f95" in the current directory are assumed.
c_setup_path_arg or cbat (string)
Specify the full path to the .bat file plus the argument to setup the C build environment. The specified path should contain the .bat file name: iclvars.bat, ipsxe-comp vars.bat or vcvarsall.bat. An example usage of this option is:

-cbat "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\iclvars.bat intel64 vs2010"

fortran_setup_path_arg or fbat (string)
Specify the full path to the .bat file plus the argument to setup the Fortran build environment. The specified path should contain the .bat file name: ifortvars.bat or ipsxe-comp-vars.bat. An example usage of this option is:

-fbat "C:\Program Files (x86)\IntelSWTools\compilers_and_libraries\windows\bin\ifortvars.bat intel64 vs2010"

optimization or opt (enumerated)
Compiler optimization level:
O
Default system optimization
debug
Compile with debug option
c_compiler_flags or cflags (string)
These flags are added to the built-in C compiler flags.
fortran_compiler_flags or fflags (string)
These flags are added to the built-in Fortran compiler flags.
linker_flags or lflags (string)
These flags are added to the built-in linker flags.
message_passing_type or mp (enumerated)
Message passing type to link the DLL against:
none
No message passing environment
openmp
Link against openmp message passing environment
mpi
Link against mpi message passing environment
pmpi
Link against Platform mpi message passing environment
impi
Link against Intel mpi message passing environment
msmpi
Link against Microsoft mpi message passing environment
make_clean or clean (boolean)
If set, the program performs a clean make before compiling the user specified source code.
verbose or v (integer)
Set the verbose level for printing information to the screen. Each higher verbose level prints more information. If verbose is set to 0 (or less), only warning and error messages are printed. If verbose is set to 1, basic processing information is printed in addition to warning and error messages. This level is recommended. verbose levels greater than 1 provide information useful only for debugging.

Examples

To build a dynamic linked library, named libusr.dll, from C files usr*.c and Fortran files fusr*.f, issue the command
acuMakeDll -lib libusr.dll -src "usr*.c,fusr*.f" -mp pmpi
or alternatively place the options in the configuration file Acusim.cnf as follows:
user_library= libusr.dll
user_source_files= usr*.c,fusr*.f
and invoke AcuMakeDll as:
acuMakeDll

Note that on the command line usr*.c,fusr*.f was enclosed in a pair of double quotes so that the shell would not expand it. Instead, the expansion was done in AcuMakeDll. The Windows shell file name generation characters "*", "?", and "[]" are accepted and expanded by AcuMakeDll. Note that it is necessary to link against the message passing environment libraries when building a UDF that will be run in parallel.