|
|
# Installing dependencies on Windows #
|
|
|
|
|
|
|
|
|
## To build from source ##
|
|
|
## By setting up Windows Subsystem Linux ##
|
|
|
|
|
|
The first thing is to install the ubuntu environment in Windows by following these instructions:
|
|
|
* https://docs.microsoft.com/en-us/windows/wsl/install-win10
|
|
|
|
|
|
* https://www.windows8facile.fr/w10-activer-bash-linux/
|
|
|
* https://solarianprogrammer.com/2017/04/16/windows-susbsystem-for-linux-xfce-4/
|
|
|
Then you can, optionally install a graphical server for you subsystem using either:
|
|
|
* [VcXsrv](https://sourceforge.net/projects/vcxsrv/) (for free)
|
|
|
* [Xming](http://www.straightrunning.com/XmingNotes/) (for free)
|
|
|
* [X410](https://token2shell.com/x410/) (not free but more efficient)
|
|
|
|
|
|
Then in an ubuntu 18.04 terminal run the following commands:
|
|
|
|
|
|
```shell
|
|
|
sudo apt install firefox
|
|
|
sudo apt-get install cmake gcc g++ gfortran liblapack-dev swig python3-dev python3-numpy python3-scipy python3-vtk7 paraview python3-pip
|
|
|
sudo apt-get install cmake gcc g++ gfortran liblapack-dev swig python3-dev python3-numpy python3-scipy python3-matplotlib python3-vtk7 paraview python3-pip libhdf5-dev hdf5-tools
|
|
|
sudo -H pip install jupyter
|
|
|
```
|
|
|
|
|
|
Then follow the *Linux* instruction in the following [here](./Download_and_install)
|
|
|
|
|
|
## To use binaries ##
|
|
|
|
|
|
To use the latest available version, first download and install
|
|
|
[Anaconda version 2018.12 for Python 3](https://www.anaconda.com/distribution/#download-section)
|
|
|
(make sure to clic windows tab before downloading).
|
|
|
|
|
|
Then download:
|
|
|
## By using Python Anaconda environment manager ##
|
|
|
|
|
|
* [sources version 2019.rc1](https://seafile.lmgc.univ-montp2.fr/f/7ea37ca5a7ec469f9373/?dl=1)
|
|
|
* [binaries version 2019.rc1](https://seafile.lmgc.univ-montp2.fr/f/39efae4d9d5e442d9d3d/?dl=1)
|
|
|
First, it is not already present, download and install Anaconda Python Distribution from here:
|
|
|
* [Anaconda](https://www.anaconda.com/distribution/) (download version 3.x and NOT 2.7)
|
|
|
|
|
|
Then uncompress the first downloaded archive (sources) wherever you want on your system.
|
|
|
This should create a directory *lmgc90_user_xxx* (where 'xxx' is the version downloaded)
|
|
|
which will contain the following subdirectories:
|
|
|
If you have any doubt, follow the default installation recommendations (install only
|
|
|
for current user and do not change default PATH).
|
|
|
|
|
|
* *src* : the sources of LMGC90 software
|
|
|
* *examples* : the user examples working with the sources
|
|
|
* *manuals* : a list of manuals/documentation for the software in pdf format
|
|
|
* *docs* : the html documentation generated from the sources
|
|
|
* *build* : (empty) where to compile/build LMGC90 libraries
|
|
|
|
|
|
Then uncompres the second downloaded archive (binaries) in the previously empty
|
|
|
*build* directory to put inside the *pylmgc90* directory.
|
|
|
Then start _Anaconda Prompt_ which will give you a black window in which you will be able to run
|
|
|
command (like in any bash or powershell terminal). You can start by updating to latest version
|
|
|
by running:
|
|
|
```cmd
|
|
|
conda update -n base -c defaults anaconda
|
|
|
```
|
|
|
|
|
|
Using the **conda terminal** application, run the following command:
|
|
|
```shell
|
|
|
conda install vtk
|
|
|
Then to set up an environment that will allow to
|
|
|
build lmgc90, run the following command:
|
|
|
```cmd
|
|
|
conda create -n lmgc90 python
|
|
|
conda activate lmgc90
|
|
|
conda install -c conda-forge m2w64-gcc-fortran m2w64-make m2w64-openblas
|
|
|
conda install -c conda-forge cmake swig
|
|
|
conda install -c conda-forge numpy scipy matplotlib vtk
|
|
|
cd build
|
|
|
cmake .. -DVENV_PATH=%CONDA_PREFIX% -G "MinGW Makefiles"
|
|
|
mingw32-make install
|
|
|
..\finalize_conda_env.bat
|
|
|
```
|
|
|
|
|
|
Finally to make things easier and kind of automatic, you may need to start **Spyder**
|
|
|
application and in the menu **tools** select the **PYTHONPATH manager**. Add a path
|
|
|
and select the *build* directory in which you previously added the *pylmgc90* directory.
|
|
|
Then you can start the _Anaconda Navigator_ application.
|
|
|
The first thing is to activate the environment to use LMGC90 by
|
|
|
selection _lmgc90_ in the menu next to _Applications on_ on the
|
|
|
upper part of the window.
|
|
|
|
|
|
Then quit all **Anaconda** related application and take a look at the
|
|
|
[first steps](./first_steps) section.
|
|
|
Then start spyder for example to start using python.
|
|
|
On the use of LMGC90 itself, read the [first steps](./first_steps) section.
|
|
|
|
|
|
****
|
|
|
|
... | ... | |