Windows
The following instructions have been tested on windows 10 64bits, in Release and Debug configurations, and with the following packages versions: Visual Studio 2019, CMake 3.20, Python 3.8.7, SWIG 4.0.2, Intel oneAPI 2021.3, Eigen 3.3.9, Gmsh 4.4.1, VTK 9.0.3, PyQt 5.15.2, and MSMPI 10.1.1.
Required libraries
-
Git
Install git from https://git-scm.com/download/win. -
Visual Studio
Download the Visual Studio installer from https://visualstudio.microsoft.com/downloads/ and follow the instructions. You can either download the full installer including the IDE (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16), or only the build tools (https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16). The following instructions assumes that VS has been installed in C:\Program Files\Microsoft Visual Studio. -
CMake
Install CMake from https://cmake.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\CMake\bin). -
Python and packages
Install Python from https://www.python.org/, and add the executable to the Path environment variable (e.g. C:\Program Files\Python). Install python packages using pip
python -m pip install numpy
python -m pip install matplotlib
-
SWIG
Download SWIG from http://www.swig.org/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\SWIG). -
Intel TBB and MKL (oneAPI)
Download Intel oneAPI installer from https://software.intel.com/content/www/us/en/develop/tools/oneapi/base-toolkit/download.html and follow the instructions. Only the TBB and MKL modules are needed. After the install is complete, add the librairies to the Path environment variable (e.g. C:\Program Files\Intel\oneAPI\tbb\latest\redist\intel64\vc14, C:\Program Files\Intel\oneAPI\tbb\latest\redist\intel64). -
Eigen
Download Eigen from https://eigen.tuxfamily.org/index.php?title=Main_Page, unzip it to the location of your choice (e.g. C:\Program Files\eigen). -
Gmsh
Download gmsh from https://gmsh.info/, unzip it to the location of your choice, and add the executable to the Path environment variable (e.g. C:\Program Files\gmsh).
Optional libraries
- VTK
Download VTK from https://vtk.org/, and unzip in the location of your choice (e.g. C:\Users\Me\Desktop\VTK). Install from source (e.g. in C:\Program Files\VTK):
REM load VS env
call "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
REM setup dir
cd C:\Users\Me\Desktop\VTK
mkdir build
cd build
REM configure
cmake -A x64 -DVTK_PYTHON_VERSION=3 -DVTK_WRAP_PYTHON=ON -DCMAKE_INSTALL_PREFIX=C:\Program Files\VTK ..
REM build and install
cmake --build . --target install --config Release
Add the executables to the Path environment variable (e.g. C:\Program Files\VTK\bin), and the python libraries to the PYTHONPATH environment variable (e.g. C:\Program Files\VTK\lib\python\site-packages).
WARNING if the libraries cannot be loaded (simply try import vtk
in a python console), do not add the PYTHONPATH environment variable, and install python bindings for vtk using pip:
python -m pip install vtk
- MPI and mpy4py
Install MSMPI from https://www.microsoft.com/en-us/download/details.aspx?id=100305, and install python bindings using pip
python -m pip install mpi4py
Build
REM setup env
call "C:\Program Files\Intel\oneAPI\mkl\2021.3.0\env\vars.bat" intel64 vs2019
call "C:\Program Files\Intel\oneAPI\tbb\2021.3.0\env\vars.bat" intel64 vs2019
call "C:\Program Files\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
set INCLUDE=%INCLUDE%;"C:\Program Files\eigen"
REM clone DART (e.g. in C:\Users\Me\dev\amfe)
cd C:\Users\Me\dev
git clone git@gitlab.uliege.be:am-dept/amfe.git
REM configure, build and test
cd amfe
mkdir build
cd build
cmake -A x64 -DUSE_MUMPS=OFF ..
cmake --build . [--target install] --config Release
ctest [-j6] -C Release