precice / python-bindings

Python language bindings for preCICE
https://precice.org
GNU Lesser General Public License v3.0
22 stars 12 forks source link

Version compatibilities #189

Closed steffenger closed 10 months ago

steffenger commented 10 months ago

When I try to install pyprecice with precice version 2.5.0

sudo apt install ./libprecice2_2.5.0_focal.deb pip3 install --user pyprecice==2.5.0.4

i get the following error

image

image

I am using WSL/Ubuntu20.04 with python 3.8.10.

According to @IshaanDesai this error is due to version compatibilities.

BenjaminRodenberg commented 10 months ago

To me it looks a bit like the preCICE version you are actually using here is too old. Generally pyprecice 2.5.0.4 and preCICE 2.5.0 should work together. Indeed, we forgot to add the corresponding part of the API until 2.5.0.2 (https://github.com/precice/python-bindings/pull/168).

Looking at your logs, I assume you are accidentally using preCICE 2.3.0: In your logs it says .../precice/SolverInterface.hpp:741:8: note candidate void SolverInterface::readVectorData.... The location of readVectorData matches with preCICE 2.3.0, where it shows up in line 741.

Some ideas how to fix this:

@fsimonis any more hints on debugging this?

PS: Please post logs as formatted text instead of screenshots next time. This makes it much easier to copy-paste from them in order to answer your question.

steffenger commented 10 months ago

@BenjaminRodenberg thanks a lot.

i found the V2.3.0 files causing the issue

/usr/local/include/precice$ ls SolverInterface.hpp SolverInterfaceC.h SolverInterfaceFortran.hpp types.hpp

After removing them, i could install pyprecice==2.5.0.4 But i am wondering why a newer precice version doesnt overwrite those files?

fsimonis commented 10 months ago

But i am wondering why a newer precice version doesnt overwrite those files?

The v2.3.0 files are the result of building and installing preCICE from source. The default installation location/prefix is /usr/local, which purpose is to provide system-wide resources managed by the admin, not the package manager.

You then installed the preCICE 2.5.0 Debian package using the package manager, which installs the package in /usr/.

So, you end up with two co-existing versions:

Headers are normally the first instance where this leads to confusion.