Installing Packages
Table of Contents
Compiling
in linking the generated C, Fortran and Matlab files
1. download installation file as instructed
2. unzip
the installation file to arbitrary directory
(the option "Use folder names" in WinZip must be switched on!)
3. If Mathematica is opened, completely close Mathematica.
4. Run the Mathematica notebook Install.nb.
The packages are by default installed to $UserBaseDirectory. The user base installation directory $UserBaseDirectory is set by Mathematica (e.g. for Windows 7 $BaseDirectory is set to "C:\\Users\\username\\AppData\\Roaming\\Mathematica"). In this case, the packages can be used only by the current user.
Alternatively, the packages can be installed to $BaseDirectory. $BaseDirectory is normally accessible to all users (network installation). User should be able to read and write to $BaseDirectory directory at the time of installation. This usually requires administrators’ privileges.
AceGen/AceFEM packages are automatic code generation systems, thus they create new executable files and they run newly created executable files. PLEASE be certain that the account and the directory from which the packages are used do have proper privileges to create new executable files. On the newer operating systems this might not be the default value for the new account!!! Sometimes the antivirus software might also prevent the use of Ace-packages. One does not need to be a computer expert to use Ace-packages, however one may need a help from the expert to set the proper privileges for the user account!
Additional instructions specific to the certain operating system are given in section Default C compiler.
The information about the version of operating system on which the executables were build is given during the installation procedure. Only 64 bit systems are supported. The latest version might not work on older versions of Mathematica or operating systems!!
Windows 7: In order to use the Windows 7 operating system one needs to make the following update:
https://support.microsoft.com/en-us/help/2999226/update-for-universal-c-runtime-in-windows
Linux: Additional Linux component that is required, but not normally automatically installed is uuid-dev library.
Mac: Xcode package.
1. load the AceGen code generator with the command Get["AceGen`"]
2.
the AceFEM palette will appear
· http://symech.fgg.uni-lj.si/User/AceGenPrint.pdf
· http://symech.fgg.uni-lj.si/User/AceFEMPrint.pdf
C compiler is not obligatory for the generation of the source codes by AceGen. However, the compiled codes would run significantly faster than the codes in native Mathematica or Matlab language.
On Windows the MinGW gcc is used by default. The MinGW compiler is collection of freely available and freely distributable Windows specific header files and import libraries combined with GNU toolsets. For more information see http://www.mingw.org/. The MinGW compiler is installed by AceGen installation procedure. DO NOT INSTALL YOUR OWN MinGW!
By default the installation looks for the existing version of the gcc C compiler. The gcc C compiler is freely available for Linux. And is a part of standard installation procedure.
Additional component that is required but not normally automatically installed is uuid-dev library. See below a snapshot of the installation procedure under Ubuntu Linux and OpenSuSE.
Ubuntu
OpenSuSE
The gcc C compiler is freely available for Mac systems, however not installed automatically. On the newer versions of Mac OS, the C compiler has to be installed additionally. User has to register first at the Apple site as an application developer, after that Xcode package can be downloaded. The gcc C compiler is a part of Xcode package.
If the C compiler is not located automatically, then the user has to set the SMTCDirectory variable located in “Paths.m” file manually after the installation of the AceGen system. The “Paths.m” file is after the installation located at:
ToFileName[{$UserBaseDirectory, "Applications","AceGen","AceCommon"},"Paths.m"]
The information about the chosen compiler is stored as the
SMTCDirectory={"name","","path to 64-bit compiler"}
system variable in the initialization file “Paths.m”. The standard value for the SMTCDirectory variable is as follows:
OS |
SMTCDirectory |
Linux |
SMTCDirectory={"Linux GCC","/usr/bin/gcc", } |
Mac |
SMTCDirectory={"Xcode","/usr/bin/gcc","/usr/bin/gcc"} |
Windows |
SMTCDirectory={"MinGW","","...MinGW/MinGW64/bin/gcc.exe"} |
The header file SMS.h has to be available when compiling AceGen generated C or Fortran files. Source code of some supplementary routines is available in SMSUtility.c or SMSUtility.f file that has to be compiled and linked together with the user code.
C file |
|
header |
$UserBaseDirectory/Applications/AceGen/Include/C/SMS.h |
supplementary routines |
$UserBaseDirectory/Applications/AceGen/Include/C/SMSUtility.c |
Matrix functions as a library |
$UserBaseDirectory/Applications/AceGen/Include/C/libaceutilityXXX XXX depends on OS and compiler |
Fortran file |
|
header |
$UserBaseDirectory/Applications/AceGen/Include/Fortran/SMS.h |
supplementary routines |
$UserBaseDirectory/Applications/AceGen/Include/Fortran /SMSUtility.c |
Matrix functions as a library |
$UserBaseDirectory/Applications/AceGen/Include/Fortran/libaceutilityXXX XXX depends on OS and compiler |
Matlab file |
|
header |
not required |
supplementary routines |
not required |
The user base installation directory $UserBaseDirectory is set by Mathematica.