Commit 25e8216f authored by mozul's avatar mozul

fix README

parent c50a0e39
# LMGC90 project: user version #
Web site of this git repository [here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/tree/master)
Organization
============
# Downloading
To get the project please check [here](https://git-xen.lmgc.univ-montp2.fr/lmgc90/lmgc90_user/wikis/download_and_install)
Contains:
# Organization
In the *lmgc90_user* directory is organized in several
subdirectories:
* src : the sources of LMGC90 software
* examples : the user examples going with the sources
* 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
Update
======
# Linux and MacOS version
With MacOS and Linux the installation and use of LMGC90 software is through
the use of the terminal. You must know how to open a terminal in a specific
directory and move through your directory tree.
## Update
To update to very last version from a terminal in current directory:
```
$> git pull origin master
```
To get as specific version, for example *2016.rc4* :
```
$> git pull origin 2016.rc4
```
Compilation
===========
## Compilation
Pre-requisites
--------------
### Pre-requisites
To compile you need:
......@@ -45,61 +56,137 @@ For visualisation:
* Python VTK module
* Paraview
To build the sphinx documentation:
To read some tutorials:
* Jupyter
* iPython
### Ubuntu 12.04/14.04 Debian 7
To compile:
```
apt-get install cmake gcc g++ gfortran liblapack-dev swig python-dev python-numpy
```
To visualize:
```
apt-get install python-vtk paraview
```
To read tutorials
```
apt-get install python-pip
pip install jupyter
```
### OpenSuse Leap 42.1
To compile:
```
zypper install cmake gcc gcc-c++ gcc-fortran lapack-devel swig python-devel python-numpy-devel
```
To visualize:
```
zypper install python-vtk paraview
```
Due to some problem one must add to the *.bashrc* file a line similar to:
```
export LD_LIBRARY_PATH=/usr/lib64/mpi/gcc/openmpi/lib64
```
To read tutorials
```
zypper install python-pip
pip install jupyter
```
### CentOS 7
To compile:
```
yum install git cmake gcc gcc-c++ gcc-gfortran lapack-devel swig python-devel numpy
```
To visualize, some extra packages, not provided by the standard package repository, are
needed. Thus anextra repository must be added before installing the dependencies:
```
yum install epel-release
yum install vtk-python paraview
```
To read tutorials
```
yum install python-pip
pip install jupyter
```
* Latex distribution (with pdflatex utility)
* Sphinx and numpydoc
* Doxygen
* Graphviz
* dvipng
On Ubuntu the list of package needed for compiling and using is:
gfortran gcc g++ liblapack-dev python-dev python-numpy python-vtk swig cmake paraview
### Mac OS
For the doc you will also need:
doxygen graphviz python-numpydoc texlive-latex-extra dvipng imagemagick
On MacOs using macports (beware of the second line, the *+ python27* goes with *vtk*):
```
port install gcc49 python27 py27-numpy swig cmake
port install vtk +python27
```
On MacOs using macports:
gcc48 python27 py27-numpy swig-python vtk +python27 cmake
Then you need to set the compiler and python as the default on your system:
Then you need to set the compiler and python as the default on your system :
```
sudo port select gcc mp-gcc48
sudo port select gcc mp-gcc49
sudo port select python python27
```
For the doc:
doxygen graphvix py27-sphinx py27-sphinx texlive-latex-extra dvipng ImageMagick
Building
--------
```
doxygen graphviz py27-sphinx py27-numpydoc texlive-latex-extra dvipng ImageMagick
```
To read tutorials:
```
sudo port install py27-jupyter
```
## Building
You have several commands to run. If you are not familiar with the terminal and compilation in general
please read the output of each command carefully. And if an error occurs do not blindly run the next
commands, but try to correct it first.
If you are completely at loss
In this directory run:
In the `lmgc90\_user` directory run:
```
```shell
mkdir build
cd build
cmake ../src
make
```
Installing
----------
## Installing
Our policy is to not mess with default system paths. So instead we advise to
use a environment variable to add to python the path to our build directory.
In general adding the following lines to your *.bashrc* *.bash_profile* or *.profile*
In general adding the following lines to your *.bashrc* (Linux) or *.profile* (MacOS)
file does the trick. Of course you have to replace *mybuildpath* by the path to
your own building directory. Basically it is what returns the command *pwd* when
ran in the same directory you ran the commands *cmake* and *make*.
```
```shell
if [ -z ${PYTHONPATH} ]; then
export PYTHONPATH=mybuildpath
else
......@@ -107,23 +194,82 @@ else
fi
```
---------------------------------------
## Getting started
There a several examples in the directory `examples`
sorted by the type of simulation.
Reminder for the new versions:
------------------------------
A good entry point is the `Tutorial` directory where you
can find some **ipython notebooks** trying to introduce
step by step the use of the software.
To update a subtree directory :
### Linux
```
$> git subtree pull --prefix=src --squash remote_name tag_number
To read the notebooks, open a terminal there and run:
```shell
jupyter notebook
```
To add a new subtree directory :
### MacOS
To read the notebooks, open a terminal there and run:
```shell
jupyter-notebook-2.7
```
$> git remote add remote_name remote_url
$> git fetch remote_name
$> git subtree add --prefix=src --squash remote_name tag_or_branch_to_get
Python being the interface language to the LMGC90 software,
[this introduction](https://www.python.org/about/gettingstarted/)
is recommended for those unfamilliar with the language or programming
in general.
# Windows version
## Prerequisite
The only pre-requisite to use LMGC90 on Windows is the Python distribution used.
A binary build is provided to work only with a specific the Anaconda Python Disbritubion
which can be downloaded from [here](https://repo.continuum.io/archive/.winzip/Anaconda2-2.5.0-Windows-x86.zip). Once the file downloaded, unzip it and run the installer.
To generate visualization files the **vtk** python module must be added. To do that
launch the `cmd` software and type:
```shell
conda install vtk
```
To visualize the files the [Paraview](http://www.paraview.org/download) software
is also needed.
## Getting the pre-compiled version
Donwload the pre-compiled version of LMGC90 for Windows
[here](https://mycore.core-cloud.net/public.php?service=files&t=9525fc1c270aaddf7e8eae96214f4b49).
Then create a directory `build` in your `lmgc90\_user` directory and unzip
the download file there.
## Installation
Start `Spyder` then clic on the upper line `tools` and `PYTHONPATH manager`.
Then clic `Add a path` on lower left corner and select the path to the directory
previously unzipped (that is in this README: *lmgc90_user/build*).
## Getting started
There a several examples in the directory `examples`
sorted by the type of simulation.
A good entry point is the `Tutorial` directory where you
can find some **ipython notebooks** trying to introduce
step by step the use of the software.
To read the notebook run the `Jupyter Notebook` application
installed with Anaconda.
Python being the interface language to the LMGC90 software,
[this introduction](https://www.python.org/about/gettingstarted/)
is recommended for those unfamilliar with the language or programming
in general.
# These are information for the developper only: #
Reminder for the new versions:
------------------------------
To update a subtree directory :
```
$> git subtree pull --prefix=src --squash remote_name tag_number
```
To add a new subtree directory :
```
$> git remote add remote_name remote_url
$> git fetch remote_name
$> git subtree add --prefix=src --squash remote_name tag_or_branch_to_get
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment