Open miha-plesko opened 8 years ago
I'm gonna CC a collegue of mine below. He has a lot of experience with compiling libraries so he could help if any problem arises.
/cc @justinc1
About how is OpenFOAM compield for OSv - is more or less the same as for Linux, we just added "-fPIC -fpic" to CFLAGS, and when linking .o files we add "-shared" flag. In short, the required steps are:
VERSION=2.4.0
BASEDIR=$PWD
ROOTFS=$BASEDIR/ROOTFS
SRCDIR=$BASEDIR/OpenFOAM-$VERSION
wget http://downloads.sourceforge.net/foam/OpenFOAM-$VERSION.tgz
tar zxf OpenFOAM-$VERSION.tgz
export MAKEFLAGS="-j `nproc`"
export FOAM_INST_DIR=$BASEDIR
. $SRCDIR/etc/bashrc
# First, compile the wmake used to build OpenFOAM sources.
cd $SRCDIR/wmake/src
make
# Make the OpenFOAM library
cd $SRCDIR/src
./Allwmake
# already compiled, I think
cd $SRCDIR/applications/solvers/incompressible/simpleFoam
wmake
# simpleFoam binary is in
$SRCDIR/platforms/$WM_OPTIONS/bin/simpleFoam
PS: the above lines are from https://github.com/mikelangelo-project/mike-apps/blob/master/OpenFOAM/GET
Before running any of OpenFOAM solvers (simpleFoam is just one of them), you need to source the $SRCDIR/etc/bashrc file to set PATH and other environ variables. Hope this helps.
@miha-plesko you should assigned someone to the issue
So we are interested in running an OpenFOAM benchmark on Rump unikernel using UniK. OpenFOAM is a C++ library (for running physical simulations) that we are currently able to run on OSv. We have it statically compiled and now we run it with the following command (on the OSv):
Attached please find HDD content of the OSv image with the OpenFOAM shared object: mpm-pkg.zip
We are unfamiliar with Rump unikernel so we would kindly ask you to help us port it also there. Could you please try to run it on Rump and check if you get same result as we do:
This is, ofcourse, only the "hello world" for the OpenFOAM. Once this works we should try to run it with some data.