Initial commit authored by acrovato's avatar acrovato
## Windows - MSYS2
**Install MSYS2**
Get [MSYS2](https://www.msys2.org) and install it where you have read/write privileges (e.g. C:\msys64).
Open a MSYS terminal and perform basic configuration
```sh
pacman -Syu
```
We asked to do so, close the terminal (ignore the warning saying that a process is running), and open a new one
```sh
pacman -Su
```
**Get pre-compiled packages**
Open a MSYS terminal
```sh
pacman -S make
pacman -S mingw-w64-x86_64-tools-git
pacman -S mingw-w64-x86_64-gcc-fortran
pacman -S mingw-w64-x86_64-cmake
pacman -S mingw-w64-x86_64-swig
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-eigen3
pacman -S mingw-w64-x86_64-intel-tbb
pacman -S mingw-w64-x86_64-openblas
# python 3
pacman -S mingw-w64-x86_64-vtk
pacman -S mingw-w64-x86_64-python3
pacman -S mingw-w64-x86_64-python3-numpy
pacman -S mingw-w64-x86_64-python3-scipy
pacman -S mingw-w64-x86_64-python3-matplotlib
pacman -S mingw-w64-x86_64-python3-pyqt5
# optional (needed to build the documentation)
[pacman -S mingw-w64-x86_64-doxygen]
[pacman -S mingw-w64-x86_64-graphviz]
```
*Notes*:
- A python binding for vtk is currently broken (vtkIOMySQL). To disable it, comment the related line in path/to/msys/mingw64/lib/python3.8/site-packages/vtkmodules/all.py (around line 86: ```from .vtkIOMySQL import *```)
- nb lpx : 11/2020 : the upper problem seems to have been solved
**Compile packages**
1) MUMPS (optional)
Get [MUMPS with CMake](https://gitlab.uliege.be/am-dept/MN2L/mumps-4.10.0).
Open a MSYS-MINGW64 terminal
```sh
mkdir build && cd build
export MINGW_LOC=/path/to/msys/mingw
cmake -C ../Cmake/msys.cmake ..
make [-j4] install
```
2) MS-MPI (optional)
Install [MSMPI](https://www.microsoft.com/en-us/download/details.aspx?id=100305) and the related SDK and copy the header
```sh
cp "$MSMPI_INC/mpi.h" /path/to/msys/mingw64/include
```
Modify mpi.h by adding `#include <stdint.h>` just above `typedef int_64t MPI_Aint;`
3) mpi4py (optional)
Get [mpi4py](https://bitbucket.org/mpi4py/mpi4py/downloads/). Open a MSYS-MINGW terminal and install mpi4py
```sh
python setup.py build
python setup.py install
```
**Install packages**
Install [gmsh](http://geuz.org/gmsh) and add it to MSYS path. Open a WINDOWS console (admin mode)
```msdos
mkdir \path\to\msys\usr\local\bin
mklink \path\to\msys\usr\local\bin\gmsh.exe "\path\to\gmsh"
```
**Build**
Get [git for windows](https://git-scm.com/download/win), or alternatively, install git using pacman (`pacman -S mingw-w64-x86_64-git`), then clone DART
```sh
git lfs install # enable large file support
git clone git@gitlab.uliege.be:am-dept/dart.git
```
Compile DART in a MSYS-MINGW terminal
```sh
cd dartflo
mkdir build && cd build
export INCLUDE="${INCLUDE}:/mingw64/include/eigen3"
cmake -C ../CMake/msys2.cmake ..
make [-j4]
ctest [-j4]
[make install]
```
For a complete list of options, refer to the [build](Build) page.
*Note*: test tbox/mpi/helloworld.py requires MS-MPI and mpi4py to work
**Run an example**
```sh
cd ..
python run.py waves/tests/lift.py [-k4] [--nogui]
```
\ No newline at end of file