4. Getting DAE Tools

4.1. System requirements

Supported platforms:

  • GNU/Linux (x86_64)

  • Windows (x64)

  • MacOS (x86_64)

The binaries are provided for Python 3.10+.

Mandatory packages:

Optional packages:

Optional packages (proprietary):

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-1.8.0-source.tar.gz for instance).

4.3. Installation

4.3.1. GNU/Linux

4.3.1.1. Install Python and Python packages

4.3.1.1.1. Use the system’s Python
  • Debian GNU/Linux and derivatives (Ubuntu, Linux Mint)

    sudo apt-get install python3-numpy python3-scipy python3-matplotlib python3-pyqt5 mayavi2 python3-lxml
    # Optional packages:
    sudo apt-get install python3-openpyxl python3-h5py python3-pandas python3-pygraphviz
    
  • Red Hat and derivatives (Fedora, CentOS):

    sudo yum install python3-numpy python3-scipy python3-matplotlib python3-qt5 Mayavi python3-lxml
    # Optional packages:
    sudo yum install python3-openpyxl python3-h5py python3-pandas python3-pygraphviz
    
  • SUSE Linux:

    sudo zypper in python3-numpy python3-scipy python3-matplotlib python3-qt5 python3-lxml
    # Optional packages:
    sudo zypper in python3-openpyxl python3-h5py python3-pandas python3-pygraphviz
    
  • Arch Linux:

    sudo pacman -S python-numpy python-scipy python-matplotlib python-pyqt5 mayavi python-lxml
    # Optional packages:
    sudo pacman -S python-openpyxl python-h5py python-pandas python-pygraphviz
    
4.3.1.1.2. Install one of scientific python distributions
  • Anaconda

  • Miniconda

    Install dependencies using:

    conda install numpy scipy matplotlib pyqt lxml pandas h5py openpyxl SALib
    pip install pygraphviz pymetis mayavi
    
  • Enthought Canopy

4.3.1.2. Install DAE Tools

Unpack the downloaded archive, cd to the daetools-X.Y.Z-platform-architecture:

sudo 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.3.2. MacOS

4.3.2.1. Install Python and Python packages

4.3.2.1.1. Install one of scientific python distributions
  • Anaconda

  • Miniconda

    Install dependencies using:

    conda install numpy scipy matplotlib pyqt lxml pandas h5py openpyxl SALib
    conda install -c menpo vtk=7
    pip install pygraphviz pymetis mayavi
    
  • Enthought Canopy

4.3.2.1.2. Use the system’s Python

First, install the mandatory packages: python, numpy, scipy, matplotlib and pyqt. As a starting point the following links can be used:

4.3.2.2. Install DAE Tools

Unpack the downloaded archive, cd to the daetools-X.Y.Z-platform-architecture:

sudo pip install .

You can also install DAE Tools into a python virtual environment:

conda activate <environment_name>
pip install .

4.3.3. Windows

4.3.3.1. Install Python and Python packages

The easiest way is to install one of available scientific python distributions:

To be able to create 3D plots you need to install Mayavi2 package. It can be installed using the following shell command:

easy_install "Mayavi[app]"

4.3.3.2. Install DAE Tools

Unpack the downloaded archive, cd to the daetools-X.Y.Z-platform-architecture:

pip install .

You can also install DAE Tools into a python virtual environment:

conda activate <environment_name>
pip install .

4.4. Compiling from source

To compile the DAE Tools the following is needed:

  • Installed python and numpy modules

  • Compiled 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. GNU/Linux and MacOS

4.4.1.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.1.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 dae project (you can add the additional Make argument -jN to 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_MT and Bonmin/Ipopt solvers. SuperLU/SuperLU_MT and Bonmin/Ipopt share the same code and the same project file so some hacking is needed. Here are the instructions how to compile them:

    • Compiling libcdaeBONMIN_MINLPSolver.a and pyBONMIN.so:

      • Set CONFIG += BONMIN in BONMIN_MINLPSolver.pro, run qmake and then compile

      • Set CONFIG += BONMIN in pyBONMIN.pro, run qmake and then compile

    • Compiling libcdaeIPOPT_NLPSolver.a and pyIPOPT.so:

      • Set CONFIG += IPOPT in BONMIN_MINLPSolver.pro, run qmake and then compile

      • Set CONFIG += IPOPT in pyBONMIN.pro, run qmake and then compile

    • Compiling libcdaeSuperLU_LASolver.a and pySuperLU.so:

      • Set CONFIG += SuperLU in LA_SuperLU.pro, run qmake and then compile

      • Set CONFIG += SuperLU in pySuperLU.pro, run qmake and then compile

    • Compiling libcdaeSuperLU_MT_LASolver.a and pySuperLU_MT.so:

      • Set CONFIG += SuperLU_MT in LA_SuperLU.pro, run qmake and then compile

      • Set CONFIG += SuperLU_MT in pySuperLU.pro, run qmake and then compile

  • Compile the LA_Trilinos_Amesos and then pyTrilinos project

  • Compile the NLOPT_NLPSolver and then pyNLOPT project

  • Compile the pyDealII project (no compile needed for FE_DealII project since all files there are header files/templates)

4.4.2. Windows

4.4.2.1. 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 as find): 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.