How to setup a Gerris server

In this setup example, we used the Ubuntu 18.04 (Bionic Beaver) OS system on a dedicated workstation.

Using the pre-built package

In Ubuntu 18.04 system, type the followings:

$ sudo apt install gerris

But, the pre-built package does not include some of modules such as libmap2D.so, libmap3D.so, libtide2D, and so on.

To have all necessary modules, it has to be compiled from source code (*.tar.gz)

Using the source code

Get the source code at

http://gfs.sourceforge.net/wiki/index.php/Installing_from_source

First, install the Glib development package from repository

$ sudo apt-get install libglib2.0-dev 

Then, install dependents packages from Ubuntu repositories.

$ sudo apt-get install libglib2.0-dev libnetpbm10-dev m4 libproj-dev \
libgsl0-dev libnetcdf-dev libode-dev libfftw3-dev libhypre-dev libgtkglext1-dev libstartup-notification0-dev ffmpeg
$ sudo apt-get install libopenmpi-dev

Next, compiling and installing the GTS

$ cd gts
$ ./configure (--prefix=... is optional)
$ make
$ sudo make install (or just 'make install' if installing locally)

In order for the system to know that a new dynamic library has been installed, you need to:

  1. If installing in /usr/local:
  2. check that the file /etc/ld.so.conf exists and contains the line /usr/local/lib (if not, add it)
  3. then run % sudo /sbin/ldconfig

Finally, compiling and installing the Gerris

Before compiling Gerris you need to decide whether you want to run Gerris in parallel. The parallel version of Gerris depends on an implementation of the MPI (Message Passing Interface) standard. If you do, you will need to install the MPI libraries first. On an Ubuntu/Debian system just do:

% sudo apt-get install openmpi-bin libopenmpi-dev

Note that the compilation of the parallel version of Gerris requires a working mpicc command (i.e. as provided by the openmpi-bin package above).

Otherwise the process is almost identical to the GTS installation. Again assuming you either downloaded and unpacked a source tarball or used darcs to get a directory called gerris, do:

$ cd gerris
$ ./configure
$ make
$ sudo make install

When installing in /usr/local do not forget to update the dynamic linker database:

$ sudo /sbin/ldconfig

If everything went well you should be able to run the following (if using a csh based shell, remember to rehash first):

$ gerris2D -V

Compiling and installing GfsView

Install the dependents packages. On an Ubuntu system do:

$ sudo apt-get install libgtk2.0-dev libgtkglext1-dev libstartup-notification0-dev libftgl-dev

GfsView also provides a non-graphical version (command gfsview-batch) which can run without any graphical display.

The batch command is useful for generating on-the-fly animations on systems without a graphical terminal, by using the Gfsview module with GfsOutputView.

To install OSMesa on an Ubuntu system do:

$ sudo apt-get install libosmesa6-dev

Then as usual do:

$ cd gfsview
$ ./configure
$ make
$ sudo make install