Installing preCICE error

I am trying to install preCICE with openfoam 2012. However, I am getting the following error
Building the OpenFOAM-preCICE adapter…
Allwmake: line 35: pkg-config: command not found

How this error can be resolved?
If possible, please post a link for the installion of preCICE and CalCulix.

Hi @iraza

It looks like you do not have the tool pkg-config installed on your machine. Can you install it and try again?

Hi Ishaan,
Thanks for your response. I installed pkg-config and tried to run the command “Allwmake” but encountered the following error.

How this can be removed?

@iraza this looks like a file permission issue to me. Can you create files in /home/iraza/OpenFOAM/iraza-v2012/applications/openfoam-adapter_v1.0.0_OpenFOAM1812-v2012?

By the way, you could probably upgrade to the latest adapter version (v1.2.1), it also works with OpenFOAM v2012. But the version is not related to this issue.

1 Like


I have installed preCICE and Calculix and trying to run turek-hron-fsi3 in two terminals. However, encountering errors attached in the pictures.

How these can be removed…

These are two issues.

For the first one (solid-dealii): have you built the solver before running it? Follow the instructions in the ../

For the second one (fluid-openfoam): have you installed groovyBC? Also for this one, see the instructions in the ../

Hi Makis,

There is a hint about nonlinear solver in the instructions but I am unable to find it. Where can I find?

In addition, how can install groovyBC? I read the instructions, however, I could not get it.


I think this is just outdated documentation, you just need the elasticity binary. @DavidSCN how can we improve the documentation?

That’s a bit tricky… You need to install swak4Foam. To copy that page (future reader: please check for updates):

hg clone swak4Foam
cd swak4Foam

This will take a while, as it builds more things than groovyBC, and it may even fail to build everything. It is fine if you get (or similar) when you execute ls $FOAM_USER_LIBBIN.

If by any chance you are using Ubuntu 20.04 and OpenFOAM v2206, you could also get the pre-built binaries from here: vm/provisioning/prebuilt/swak4Foam at develop · precice/vm · GitHub

We have built those to save time when preparing the preCICE demo virtual machine, so they are 100% unofficial.

I think this is just outdated documentation, you just need the elasticity binary. @DavidSCN how can we improve the documentation?

I guess I have to remove all these ‘copy executable’ statements in the tutorials and add something in the adapter documentation. The run script, however, tells the truth here.

Thank you for your response, I re-do all the installation of openfoam, precice and openfoam-adapter. Upon installing openfoam-adapter and running the command ./Allwmake, I got the error that can be seen in the attached picture.

I wanted to run the quickstart tutorial case just to feel the precice working, however, encountered by the following error upon running the command cmake . && make

It seems to me that I used all the commands to install mentioned material in the quickstart guide instead of using commands for openfoam as I am already using openfoam-2012. However, encountered those errors. How these errors can be encountered.


This can be one or multiple issues.

What definitely is an issue is the one reported in the second screenshot. This has nothing to do with the adapter and potentially little to do with OpenFOAM itself. Have you built OpenFOAM from source? If yes, did you maybe upgrade your system in the meantime? It looks like the library is not linking correctly to libstdc++. I am not sure where this comes from, but probably there is some version mixup involved.

As for the first screenshot, could you please attach the files mentioned there? Maybe the same issue is reported there as well.

When I make the CalculiX adapter,it appers some errors than I cant resolve it. undefined reference to `MPI_Attr_get’

could you five me some suggestion? thank you.