4. Getting DAE Tools¶
4.1. System requirements¶
Supported platforms:
GNU/Linux (x86_64)
Windows (x64)
The binaries are provided for Python 3.10+.
Mandatory packages:
Python (3.10+): http://www.python.org
Numpy: http://www.numpy.org
Scipy: http://www.scipy.org
Matplotlib: http://matplotlib.sourceforge.net
lxml: http://lxml.de (Python interface to libxml2 and libxslt)
Optional packages:
openpyxl: http://www.python-excel.org (writing data to Excel files)
HDF5 for Python: http://www.h5py.org (HDF5 binary data format for large data sets)
Pandas: http://pandas.pydata.org (Python data analysis library)
Mayavi2: http://docs.enthought.com/mayavi/mayavi (3D scientific data visualization)
PyMetis: https://pypi.org/project/PyMetis (graph partitioning library used by the MPI code-generator)
PyGraphviz: https://pygraphviz.github.io (Python interface to the Graphviz graph layout and visualization package)
SALib: https://github.com/SALib/SALib (Sensitivity Analysis in Python)
PyEVTK: https://pypi.python.org/pypi/PyEVTK (data export to binary VTK files; included in
daetools/ext_libs/pyevtk)OpenCL runtime libraries
MPI (for parallel OpenCS simulations): MPICH for GNU/Linux (https://www.mpich.org) and Microsoft MPI for Windows (https://www.microsoft.com/en-us/download/details.aspx?id=57467)
Optional packages (proprietary):
Pardiso linear solver: http://www.pardiso-project.org
Intel Pardiso linear solver: https://software.intel.com/en-us/intel-mkl
For more information on how to install packages please refer to the documentation for the specific library. By default all versions (GNU/Linux, Windows and MacOS) come with the Sundials dense LU linear solver, SuperLU, Trilinos Amesos (with built-in support for KLU, SuperLU and Lapack linear solvers), Trilinos AztecOO (with built-in support for Ifpack and ML preconditioners), NLOPT and IPOPT/BONMIN (with MUMPS linear solver and PORD ordering).
Additional linear solvers (such as Pardiso and IntelPardiso) must be downloaded separately since they are subject to different licensing conditions (not free software).
4.2. Getting the packages¶
The installation files can be downloaded from the downloads section or from the SourceForge website.
The source code can be downloaded either from the subversion tree or from the download section
(daetools-2.25.0-source.tar.gz for instance).
4.3. Installation¶
4.3.1. Install Python and Python packages¶
4.3.1.1. Use the system’s Python¶
pip install numpy scipy matplotlib PyQt6 PyQt6-WebEngine lxml pandas h5py openpyxl SALib
pip install pygraphviz pymetis mayavi
Python 3.13+ requires installation of the optional package cgi (for daetools web services):
pip install legacy-cgi
4.3.1.2. Install one of scientific python distributions¶
-
Install dependencies using:
conda install numpy scipy matplotlib pyqt pyqtwebengine lxml pandas h5py openpyxl SALib pip install pygraphviz pymetis mayavi
Python 3.13+ requires installation of the optional package cgi (for daetools web services):
pip install legacy-cgi
4.3.2. Install DAE Tools¶
Unpack the downloaded archive, cd to the daetools-X.Y.Z-platform-architecture and execute the command:
pip install .
You can also install DAE Tools into a python virtual environment, i.e. miniconda:
conda activate <environment_name>
pip install .
Virtual environments in conda can be created using the following command:
conda create -n environment_name python=x.x
4.4. Compiling from source¶
To compile the DAE Tools the following is needed:
Installed
pythonandnumpymodulesCompiled third party libraries and DAE/LA/NLP solvers:
Boost,Sundials IDAS,Trilinos,SuperLU,SuperLU_MT,Bonmin,NLopt,deal.II,blas,lapack
All DAE Tools modules are developed using the QtCreator/QMake cross-platform integrated development environment. The source code can be downloaded from the SourceForge website or checked out from the DAE Tools subversion repository:
svn checkout svn://svn.code.sf.net/p/daetools/code daetools
4.4.1. From the command line¶
First, install all the necessary dependencies by executing install_python_dependencies_linux.sh and
install_dependencies_linux.sh shell script located in the trunk directory.
They will check the OS you are running (currently Debian, Ubuntu, Linux Mint, CentOS, Suse Linux,
Arch Linux and Fedora are supported but other can be easily added) and install all necessary packages needed for DAE Tools
development.
# 'lsb_release' command might be missing on some GNU/Linux platforms
# and has to be installed before proceeding.
# On Debian based systems:
# sudo apt-get install lsb-release
# On red Hat based systems:
# sudo yum install redhat-lsb
cd daetools/trunk
sh install_dependencies_linux.sh
Then, compile all third-party libraries by executing compile_libraries.sh shell script located in the
trunk directory. The script will download all necessary source archives from the DAE Tools SourceForge web-site,
unpack them, apply changes and compile them.
sh compile_libraries.sh all
It is also possible to compile individual libraries using one of the following options:
all All libraries and solvers.
On GNU/Linux equivalent to: boost ref_blas_lapack umfpack idas superlu superlu_mt bonmin nlopt coolprop trilinos deal.ii
On Windows equivalent to: boost cblas_clapack idas superlu nlopt coolprop trilinos deal.ii opencl_sdk
Individual libraries/solvers:
boost Boost libraries (system, filesystem, thread, python)
boost_static Boost static libraries (system, filesystem, thread, regex, no python nor --buildid set)
ref_blas_lapack reference BLAS and Lapack libraries
cblas_clapack CBLAS and CLapack libraries
mumps Mumps linear solver
umfpack Umfpack solver
idas IDAS solver
idas_mpi IDAS solver with MPI interface enabled
superlu SuperLU solver
superlu_mt SuperLU_MT solver
bonmin Bonmin solver
nlopt NLopt solver
trilinos Trilinos Amesos and AztecOO solvers
deal.ii deal.II finite elements library
coolprop CoolProp thermophysical property library
opencl_sdk OpenCL SDK (Khronos, Windows only)
opencs OpenCS library
Requires cblas_clapack, idas (with MPI support enabled), metis, hdf5 and trilinos libraries
compiled using the compile_opencs.sh script from the OpenCS directory.
After compilation, the shared libraries will be located in trunk/daetools-package/daetools/solibs directory.
Finally, compile all DAE Tools libraries and python modules by executing compile.sh shell script located
in the trunk directory.
sh compile.sh all pyopencs
It is also possible to compile individual libraries using one of the following options:
all Build all daetools c++ libraries, solvers and python extension modules.
On GNU/Linux and macOS equivalent to: dae superlu superlu_mt trilinos ipopt bonmin nlopt deal.ii
On Windows equivalent to: dae superlu trilinos ipopt bonmin nlopt deal.ii
dae Build all daetools c++ libraries and python extension modules (no 3rd party LA/(MI)NLP/FE solvers).
Equivalent to: config units data_reporting idas core activity simulation_loader fmi
solvers Build all solvers and their python extension modules.
On GNU/Linux and macOS equivalent to: superlu superlu_mt trilinos ipopt bonmin nlopt deal.ii
On Windows equivalent to: superlu trilinos ipopt bonmin nlopt deal.ii
pydae Build daetools core python extension modules only.
Individual projects:
config Build Config shared c++ library.
core Build Core c++ library and its python extension module (pyCore).
activity Build Activity c++ library and its python extension module (pyActivity).
data_reporting Build DataReporting c++ library and its python extension module (pyDataReporting).
idas Build IDAS c++ library and its python extension module (pyIDAS).
units Build Units c++ library and its python extension module (pyUnits).
simulation_loader Build simulation_loader shared library.
fmi Build FMI wrapper shared library.
fmi_ws Build FMI wrapper shared library that uses daetools FMI web service.
trilinos Build Trilinos Amesos/AztecOO linear solver and its python extension module (pyTrilinos).
superlu Build SuperLU linear solver and its python extension module (pySuperLU).
superlu_mt Build SuperLU_MT linear solver and its python extension module (pySuperLU_MT).
pardiso Build PARDISO linear solver and its python extension module (pyPardiso).
intel_pardiso Build Intel PARDISO linear solver and its python extension module (pyIntelPardiso).
bonmin Build BONMIN minlp solver and its python extension module (pyBONMIN).
ipopt Build IPOPT nlp solver and its python extension module (pyIPOPT).
nlopt Build NLOPT nlp solver and its python extension module (pyNLOPT).
deal.ii Build deal.II FEM library and its python extension module (pyDealII).
cape_open_thermo Build Cape Open thermo-physical property package library (cdaeCapeOpenThermoPackage.dll, Windows only).
opencl_evaluator Build Evaluator_OpenCL library and its python extension module (pyEvaluator_OpenCL).
pyopencs Build pyOpenCS python extension module (pyOpenCS).
All python extensions are located in the platform-dependent locations in trunk/daetools-package/daetools/solibs/platform directory
(gnu_linux64 or win64).
DAE Tools can be now installed using the information from the sections above.
OpenCS support can be enabled in the following way
(MPI and OpenCL header files and libraries are required).
First, compile all third-party libraries required for OpenCS by executing compile_opencs.sh shell script located in the
OpenCS directory. The script will download all necessary source archives, unpack and compile them.
cd trunk/OpenCS
sh compile_opencs.sh libs
Next, compile OpenCS:
sh compile_libraries.sh opencs
and finally the OpenCL evaluator and OpenCS python wrappers:
sh compile.sh opencl_evaluator pyopencs
4.4.2. From QtCreator IDE¶
DAE Tools can also be compiled from within QtCreator IDE. First install dependencies and compile third party libraries (as explained in the section From the command line) and then do the following:
Do not do the shadow build. Uncheck it (for all projects) and build everything in the release folder
Choose the right specification file for your platform (usually it is done automatically by the IDE, but double-check it):
for GNU/Linux use
-spec linux-g++for MacOS use
-spec macx-g++
Compile the
daeproject (you can add the additional Make argument-jNto speed-up the compilation process, where N is the number of processors plus one; for instance on the quad-core machine you can use-j5)Compile
SuperLU/SuperLU_MTandBonmin/Ipoptsolvers.SuperLU/SuperLU_MTandBonmin/Ipoptshare the same code and the same project file so some hacking is needed. Here are the instructions how to compile them:Compiling
libcdaeBONMIN_MINLPSolver.aandpyBONMIN.so:Set
CONFIG += BONMINinBONMIN_MINLPSolver.pro, runqmakeand then compileSet
CONFIG += BONMINinpyBONMIN.pro, runqmakeand then compile
Compiling
libcdaeIPOPT_NLPSolver.aandpyIPOPT.so:Set
CONFIG += IPOPTinBONMIN_MINLPSolver.pro, runqmakeand then compileSet
CONFIG += IPOPTinpyBONMIN.pro, runqmakeand then compile
Compiling
libcdaeSuperLU_LASolver.aandpySuperLU.so:Set
CONFIG += SuperLUinLA_SuperLU.pro, runqmakeand then compileSet
CONFIG += SuperLUinpySuperLU.pro, runqmakeand then compile
Compiling
libcdaeSuperLU_MT_LASolver.aandpySuperLU_MT.so:Set
CONFIG += SuperLU_MTinLA_SuperLU.pro, runqmakeand then compileSet
CONFIG += SuperLU_MTinpySuperLU.pro, runqmakeand then compile
Compile the
LA_Trilinos_Amesosand thenpyTrilinosprojectCompile the
NLOPT_NLPSolverand thenpyNLOPTprojectCompile the
pyDealIIproject (no compile needed forFE_DealIIproject since all files there are header files/templates)
4.4.3. Microsoft VC++¶
First, download and install (a) Visual Studio Community Edition
or (b) Visual Studio and VC++ Build Tools.
Start the native x64 Developer Command Prompt.
Install software that provides bash environment.
Git for Windows has been successfully tested.
During installation, when asked select the following options:
Use Git and optional Unix tools from the Windows Command Prompt
Use Windows’ default console window
Add all bash commands to the
PATH(nota bene: it might ‘hide’ some Windows commands such asfind): i.e.C:\Program Files\Git\cmd;C:\Program Files\Git\mingw32\bin;C:\Program Files\Git\usr\bin
wget is required to download the source archives from the DAE Tools SourceForge website.
If wget is missing it can be downloaded from http://gnuwin32.sourceforge.net/packages/wget.htm.
The source archives can also be downloaded manually to the trunk directory.
Next, compile all required third party libraries using the following command:
sh compile_libraries.sh all opencs
Finally, compile all DAE Tools libraries and python modules by executing compile.sh shell script located
in the trunk directory.
sh compile.sh all pyopencs
The OpenCS support can be compiled in the same way as in GNU/Linux and macOS. First, install Microsoft MPI (https://www.microsoft.com/en-us/download/details.aspx?id=57467) and OpenCL (if not installed with graphics drivers) and follow the procedure described in the section From the command line.