Installing Packages           

Description: Description: Description: Description: Description: Description: Description: Description: Description: AceFEM Description: Description: Description: Description: Description: Description: Description: Description: AceGen



Table of Contents

Installation procedure. 2

Operating system requirements. 2

Using AceGen. 3

Using AceFEM and AceShare. 4

Tutorials and manual 5

Default C compiler 5

Windows. 5

The MinGW installation procedure: 5

Linux. 5

Mac. 6

For advanced users. 6

Other C compilers. 6

Compiling in linking the generated C, Fortran and Matlab files. 7



Installation procedure


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.     run the Mathematica notebook  Install.nb.


4.     on Windows system you will have to install the MinGW C compiler before the installation of Ace system (see also #The MinGW installation procedure:)



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.


Operating system requirements

The latest version of AceGen and AceFEM was compiled on:

Mathematica 11.0

Windows 10

Linux Ubuntu 14.04 LTS

Mac OS X 10.9.2

Only 64 bit systems are supported.


In general the system should work on all Mathematica versions newer than 10.0. The latest version might not work on older versions of Mathematica or operating systems!! In that case please ask for the older version.


Additional requirements


Windows 7: In order to use the Windows 7 operating system one needs to make the following update:


Linux: Additional Linux component that is required but not normally automatically installed is uuid-dev library.


Mac: Xcode package.

Using AceGen


1.     load the AceGen code generator with the command Get["AceGen`"]

  1. the AceGen palette will appear


Line Callout 3: open the AceGen help window and follow the tutorial lectures 





Using AceFEM and AceShare


  1. load the AceFEM finite element environment with the command Get["AceFEM`"]

2.     Line Callout 3: open the AceShare window and search for available built-in and on-line finite element solutions Line Callout 3: open the AceFEM help window and follow the tutorial lecturesthe AceFEM palette will appear



Tutorials and manual


  1. Tutorial lectures and manual are incorporated into the Mathematica´s help system.


  1. In order to get help for the specific command first highlight the command and then press the Help button at the top of the AceGen/AceFEM palette.


  1. Printable version of the manual and the tutorial lectures can be downloaded from the product web site




Default C compiler


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 The MinGW compiler can be installed by following the installation procedure.

The MinGW installation procedure:

1.     Download MinGW installation from:

2.     Unzip the file to arbitrary directory (e.g. C:\tmp) (the option "Use folder names" in WinZip must be switched on!).

3.     Run the Mathematica notebook  Install_MinGW.nb.


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.





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.

For advanced users

Other C compilers


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 32-bit compiler","path to 64-bit compiler"}


system variable in the initialization file “Paths.m”. The standard value for the SMTCDirectory variable is as follows:





SMTCDirectory={"Linux GCC","/usr/bin/gcc", }








Compiling in linking the generated C, Fortran and Matlab files


The header file SMS.h has to be available when compiling AceGen generated C or Fortran files. ource 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



supplementary routines


Fortran file



supplementary routines

$UserBaseDirectory/Applications/AceGen/Include/Fortran /SMSUtility.c

Matlab file


not required

supplementary routines

not required

The user base installation directory $UserBaseDirectory is set by Mathematica.