Install older version Basilisk from source

Description:

Since the opensource CFD software Basilisk has been updated to a stage that possesses so many new features, a new learner should follow the offical website and use the new version. However, if you have used Basilisk for a while and want to keep consistency of the software version, like me, this post may help because the installation guide may change with the software updates. This post shows how to install an older version of the software and relating packages such as the gl libary. This is a short summary of the old offical installation guide.

Installation and compilation of Basilisk

  • Firstly, we download the source code and extract the files.
    1
    2
    wget http://basilisk.fr/basilisk/basilisk.tar.gz
    tar xzf basilisk.tar.gz
  • Next, we compile the source code with gcc(a C99-compliant compiler) and make utility.
    1
    2
    3
    4
    5
    6
    cd basilisk/src
    export BASILISK=$PWD
    export PATH=$PATH:$PWD
    ln -s config.gcc config #create a link config to the file config.gcc in the current directory.
    make -k #(--keep-going) Continue as much as possible after an error.
    make
  • Next, we add the installation directory to the environment variables in $HOME/.bashrc
    1
    2
    3
    cd basilisk/src
    echo "export BASILISK=$PWD" >> ~/.bashrc
    echo "export PATH=\$PATH:$BASILISK" >> ~/.bashrc
    Don’t forget to source ~/.bashrc to make the variables work.
  • If we see the complier information after typing qcc --version, the Basilisk software is installed and compiled correctly. For example,
    success

Installation and compilation of bview

The latest Basilisk uses jview and the default web browser to post-process results, however, it is not very convinent to connect to the Basilisk server all the time for many users like me. I would like to use the old bview instead. Here is how to install the libraries related to bview.

  • Firstly, we install the gl related libraries
    1
    sudo apt-get install libglu1-mesa-dev libosmesa6-dev
  • Next, go to the gl directory and compile the files
    1
    2
    cd $BASILISK/gl
    make libglutils.a libfb_osmesa.a #The .a files are the target files by make according to the Makefile.
  • If a graphics card is available on the computer, we can install the related libraries
    1
    2
    3
    sudo apt-get install libglu1-mesa-dev libglew-dev libgl1-mesa-dev
    cd $BASILISK/gl
    make libglutils.a libfb_glx.a

Some additional information

Standalone installation

The libraries are independent from Basilisk and can be installed separately. This is useful for example when running on supercomputers which do not have Basilisk installed.

  • On the local system(eg: personal computer)
    1
    2
    3
    cd $BASILISK
    tar czvf gl.tgz gl
    scp gl.tgz login@supercomputer.org:
  • On the remote machine
    1
    2
    3
    tar xzvf gl.tgz
    cd gl
    make clean
    and then follow the installation instructions above.

Installing OSMesa/GLU from source

1
2
3
4
5
6
7
8
9
10
11
12
13
wget http://basilisk.fr/src/gl/mesa-17.2.4.tar.gz
tar xzvf mesa-17.2.4.tar.gz
cd mesa-17.2.4
./configure --prefix=/home/popinet/local --enable-osmesa \
--with-gallium-drivers=swrast \
--disable-driglx-direct --disable-dri --disable-gbm --disable-egl
make
make install
wget http://basilisk.fr/src/gl/glu-9.0.0.tar.gz
tar xzvf glu-9.0.0.tar.gz
cd glu-9.0.0
make
make install