Installation

Dependencies

Recommended versions are:

  • python 2 (>= 2.7) is supported. If you experience any trouble, please use the bug tracker or go to Reporting Issues

  • NumPy >= 1.9.0

  • (optional) VTK >= 6.3.0 (supported from 5.6.1 but with less treatments)

  • (optional) SciPy >= 0.12.1

  • (optional) h5py >= 2.7.0

  • (optional) tqdm (progress bar)

For parallel processing:

  • mpi4py >= 2.0.0

  • h5py >= 2.7.1 parallel

  • METIS >= 5.1.0

  • HDF5 >= 1.8.15 parallel


Installation

You have two different ways to use Antares depending on what you want to do with it.

It is very easy to setup with both ways, assuming that python is properly installed.

Straightforward Use

If you want to use directly Antares, the easiest way is to source the file antares.env located at the Antares root directory:

source PATH_TO_ANTARES/antares.env      # in bash
source PATH_TO_ANTARES/antares_csh.env  # in csh

You’re done !

Alternatively, you can manually set the environment:

  • Set an environment variable to the Antares root directory

export ANTARES='PATH_TO_ANTARES/'  # in bash
setenv ANTARES 'PATH_TO_ANTARES/'  # in csh
  • Add Antares to your PYTHONPATH

export PYTHONPATH=$PYTHONPATH:$ANTARES    # in bash
setenv PYTHONPATH ${PYTHONPATH}:$ANTARES  # in csh
  • Add the bin/ folder to your PATH (if you want to use the bin)

export PATH=$PATH:$ANTARES/bin  # in bash
set path=($ANTARES/bin $path)   # in csh

You’re all set !

However, some specific modules will be disabled (see below).


Installing with extensions

Some Antares treatments are written in C langage to get CPU performance. So the installation needs to go through a compilation phase to use them.

If you want to use Antares with these specific compiled modules, then you have to install Antares the following way. You may need an internet connection, and you need to install the setuptools package first.

Then, get the Antares source package, unpack it, and go to the Antares root directory.

By default, Antares is installed as other python packages into Python’s main site-packages directory if you do:

python setup.py install

Very often though, you want to install python packages in an alternate location (see Alternate Installation).

Alternate Installation Schemes

Alternate Installation: the User Scheme

You can then either do,

python setup.py install --user

This will install Antares in your own local directory. To know the name of this directory, type:

python -c'import site; print(site.USER_BASE)'

or simply:

env PYTHONUSERBASE=/somewhere_in_the_system/local python setup.py install --user

Next, you just need to add the package directory to the PYTHONPATH and the binaries to the PATH

export PYTHONPATH=$PYTHONPATH:/somewhere_in_the_system/local/lib/python2.7/site-packages
export PATH=$PATH:/somewhere_in_the_system/local/bin

You may also install python packages in a custom location (see Custom Installation).

Custom Installation

For a custom installation, add the installation directory to the PYTHONPATH

export PYTHONPATH=$PYTHONPATH:/somewhere_in_the_system

then install Antares with:

python setup.py install --install-lib=/somewhere_in_the_system --install-scripts=/somewhere_in_the_system/bin

If you have no or limited network access, then look at the section Dependencies.


Extensions

Extensions are libraries written in C that can be called in python. You have to compile them if you want to use them in Antares.

If you want to change compiler options, then you can pass distutils-known variables as follows:

env CC="gcc" CFLAGS="-O3" OPT="" python setup.py build_ext

Boundary Layer Module

To install the BL treatment, you can type for example,

python setup.py install --user --bl

OpenMP

The BL module can be compiled with OpenMP. The compiler option for openmp should be provided. Here an example on linux gcc:

python setup.py install --user --bl --bl-openmp-flags -fopenmp

Optimization

The BL module can be compiled with higher optimization options than the setup default ones. By default, the setup uses the same option used for the python compilation itself.

Use –bl-optim-flags to define your own optimization level (depends on the compiler used). If defined, the tool will set also the following: -UDEBUG -DNDEBUG Here is an example with linux gcc:

python setup.py install --user --bl --bl-optim-flags -O3

Transformation of face-based connectivity to element-based connectivity

To install this extension, you can type for example,

python setup.py install --user --ngon

Process High-Order Solutions from the Jaguar solver

To install this extension, you can type for example,

python setup.py install --user --jag

Polyhedral Mesh Support

To install this extension, you can type for example,

python setup.py install --user --poly

Orientation of 2d mesh normals

To install this functionality used in TreatmentCellNormal, you can type for example,

python setup.py install --user --orient

FBC (Face-based Connectivity)

Warning

This treatment is not available in Antares from version 1.10.0.

The FBC treatment depends on the metis library.

You need to set the environnement variables METIS_DIR, the root directory of the metis library.

Then, you can type for example,

python setup.py install --user --fbc

Warning

This treatment has not been tested on windows platforms.


Parallel Support

The metis library is required when reading an HDF-CGNS file with unstructured zones.

You need to set the environnement variable METIS_LIB_DIR where the shared library lies.

C++ Mesh Cutter

To install the C++ Mesh Cutter module used in the “ccut” Treatment, you can type for example,

python setup.py install --user --mshcppcutter

Compiler Options

The C++ Mesh Cutter module can be compiled with OpenMP. The usage is the same as with the BL module, as you need to pass in the right flag for the compiler. An example with gcc on linux :

python setup.py install --user --mshcppcutter --mshcppcutter-openmp-flags -fopenmp

Documentation Generation

The python package sphinx is required. The documentation of antares is generated with Sphinx from docstrings inserted in the code using the reStructuredText (reST) syntax.

The documentation is available at https://www.cerfacs.fr/antares.

However, if you want to install it locally, then you may need to generate it from the source files.

The documentation is in PATH_TO_ANTARES/doc. Go to this directory.

Type

make html

Then open doc/_build/html/index.html

Type

make latexpdf

Then open doc/_build/latex/antares_doc.pdf


Data to run examples

Data are available at Example Data.