Installation

FluidSim is part of the FluidDyn project. Some issues regarding the installation of Python packages are discussed in the main documentation of the project.

Dependencies

  • Python 2.7 or >= 3.4

  • Numpy

  • fluidfft

    fluidsim needs fluidfft. If you don’t install it before carefully, it will be installed automatically and you won’t be able to use fancy FFT libraries (using for example MPI with 2D decomposition or CUDA). If you are not too concerned about performance, no problem. Otherwise, install fluidfft as explained here

  • A C++11 compiler (for example GCC 4.9)

  • Pythran

    We choose to use the new static Python compiler Pythran for some functions. Our microbenchmarks show that the performances are as good as what we are able to get with Fortran or C++!

Warning

To reach good performance, we advice to try to put in the file ~/.pythranrc the lines (see the Pythran documentation):

[pythran]
complex_hook = True
  • h5py (optionally, with MPI support only if you know what you do)

Warning

Prebuilt installations (for eg. via h5py wheels) may lack MPI support. It may be useful to install from source, as follows:

$ CC="mpicc" HDF5_MPI="ON" HDF5_DIR=/path/to/parallel-hdf5 pip install --no-deps --no-binary=h5py h5py
$ python -c 'import h5py; h5py.run_tests()'

See the h5py documentation for more details.

  • Optionally, mpi4py (which depends on a MPI implementation).

Basic installation with pip

If you are in a hurry and that you are not really concerned about performance, you can use pip:

pip install fluidsim

or:

pip install fluidsim --user

Run the tests!

You can run some unit tests by running make tests or make tests_mpi from the root directory or python -m unittest discover from the root directory or from any of the “test” directories.