Precicef_set_vertices type mismatch gnu

Dear all

I am trying precice v3.1.2 and v3.2.0. I am having trouble compiling an adapter to our CFD code (which worked with v2). Somehow the routine precicef_set_vertices is not accepted while compiling:

689 | CALL precicef_set_vertices(meshName, numberOfVertices, vertices, vertexIDs)
| 1
Error: Type mismatch in argument ‘meshid’ at (1); passed CHARACTER(50) to INTEGER(4)

I am using the gnu compiler.

The only CALL that works is

CALL precicef_set_vertices(meshOwnerID, numberOfVertices, vertices, vertexIDs)

but this is the old definition, so not what I expect if I study the API. To be clear, this is the only routine that does not work, I had to make changes to fit the adapter code to v3.

Has anyone seen this before?

best regards

Jaap

This could happen if you have a compiled module file in your build directory that was built from the v2.X version of the preCICE bindings module, and the compiler is finding that file when building your v3.X-capable CFD code instead of generating a new one from the 3.X bindings file. This module file is probably named precice.mod, and you probably have many other *.mod files as well. I advise deleting all of them and/or rebuilding your CFD code in a new, empty directory.

I would also double-check that the arguments to precicef_set_vertices in the source code of the v3.X bindings file you are using match those in the official repository.

Thank you for the information. Very helpful. I updated all source except the precice.f90 routine. I did not realize I had to do that. Now I understand where the precice.mod comes from. This explains why it did not work. I obtained the precice source code from Release v3.2.0 · precice/precice · GitHub

Maybe a stupid question, but is there no v3.2.0 tag for the fortran module?

It looks like the Fortran bindings module has no tags at all. Whether it should, or if it should be a Git submodule of the main preCICE repository, I’ll leave to the lead maintainers.