This document gathers various pieces from the official documentation to help you compile swak4Foam on the SCITAS clusters.
Prepare the ground
Load the required modules:
Then, create a folder to host the swak4Foam source code. For example,
and get the source:
Get m4 and Bison
Even though both m4 and bison are already installed, swak4Foam requires specific versions of them. To avoid any problem, we will download and compile them. The following assumes that you are in the
Download, unpack, compile and install m4:
Now, we need to prepend the path to the newly compiled m4 to the PATH variable to make sure we use the correct version:
swak4Foam comes with a script that will check the version of bison and download it if necessary. Simply run (still in the swak4Foam folder):
Make sure OpenFoam is correctly loaded
The following is a known issue, see the official installation documentation for more information.
Make sure OpenFoam is loaded:
Run the following commands to create a directory and a file that exports a few path variables:
Please note that now, whenever you load the OpenFoam module to use swak4Foam, you will need to source the
prefs.shfile. For example:
Go in the swak4Foam folder and create a link to the configuration file:
Allwmaketo compile (this will be long):
Now to check the compilation, go to your
homefolder where there should be a new
OpenFoamdirectory in which you will find the
binfolder containing various swak4Foam binaries. Try to execute:
This ends with an error message, but below the usual OpenFOAM banner you will find the version of swak4Foam and the release date.