conda-forge / gotm-feedstock

A conda-smithy repository for gotm.
BSD 3-Clause "New" or "Revised" License
0 stars 2 forks source link

Add development files to package #6

Open nicogodet opened 10 months ago

nicogodet commented 10 months ago

Solution to issue cannot be found in the documentation.

Issue

ref. https://github.com/gotm-model/code/issues/43

Installed packages

not needed

Environment info

not needed
jornbr commented 9 months ago

The most comprehensive solution would be to install all of GOTM's module files (*.mod) and all its libraries, built with -DBUILD_SHARED_LIBS=ON to conform to conda-forge's preference for distributing shared rather than static libraries. However, that means a lot (!) of module and library files, which probably should not be dumped directly under PREFIX/include and PREFIX/lib. An alternative could be to install all module files under PREFIX/include/gotm, and to build a single gotm dynamic library instead of separate turbulence, airsea, util etc. That single library could then go into PREFIX/lib (and on Windows, the DLL would go into PREFIX/bin). Does that sound suitable for your application?

tomsail commented 9 months ago

I confirm we need shared libraries. For the record here is how I built GOTM for TELEMAC https://github.com/tomsail/gotm-otm-feedstock/blob/main/recipe/build.sh

I would need to do some test builds to be sure. Only a few *.mod files were needed from the include dir. I could be only turbulence.mod but I could be wrong

Is there any way to test from your anaconda channel for example? (I'm on linux)

tomsail commented 8 months ago

Hello @jornbr, I had more insights from Alexander Breugem who implemented GOTM in TELEMAC.

TELEMAC uses two libraries from GOTM, libturbulence and libutil. The reason is that in libutil, the tridiagonal solver is defined that is used in the turbulence model. The only change we made to the source code of GOTM was in the file cppdefs.h. There the following two lines were changed: image

Note that these lines are not essential, it will still work without them. But it is useful for us as the GOTM log output comes in the TELEMAC log files