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 - 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 16 (2016)
- %ProgramFiles(x86)%\IntelSWTools\compilers_and_libraries\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--14
- %ProgramFiles(x86)%\Microsoft Visual Studio xxx\VC\vcvarsall.bat
where xxx is the version number: {14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8}
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
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
Note that pmpi and msmpi options are only available for 64-bit Windows systems.
- 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
acuMakeDll -lib libusr.dll -src "usr*.c,fusr*.f" -mp pmpi
user_library= libusr.dll
user_source_files= usr*.c,fusr*.f
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.