BoldingBruggeman / getm-rewrite

Rewrite of the General Estuarine Transport Model (GETM) in Python (mostly) and Fortran (performance-critical sections)
https://pygetm.readthedocs.io/
Other
7 stars 3 forks source link

Can't compile using -DFABM_<INSTITUTE>_BASE #26

Closed hpowley closed 4 months ago

hpowley commented 4 months ago

When installing pygetm, CMake is not picking up the -DFABM arguments as in the README instructions:

MicrosoftTeams-image

We have successfully installed with these arguments in the commit from 14th October (bd74f18c1cbb10be563380c5693dbc744842a975)

jornbr commented 4 months ago

Confirmed - we are in the process of switching to a more modern installation procedure, and in that process the ability to specify cmake flags to FABM was lost. I have enabled this again. it now follows the same approach as pyfabm: create a new file setup.cfg in <GETMDIR>/python, and in there, add:

[build_ext]
cmake_opts=-DFABM_ERSEM_BASE=<ERSEMDIR>

Note that recent FABM versions already include "ersem" in the default institute list (ignored if -DFABM_ERSEM_BASE is not provided), so no need to set or customize FABM_INSTITUTES.

You'll need a git pull to get the new functionality.

jornbr commented 4 months ago

There are some issues remaining in the latest version - I'll report back when those are addressed. Until then, I'd suggest holding off on testing.

jornbr commented 4 months ago

The remaining issues have been addressed and all tests are passing. Thus, you could now give the setup.cfg functionality described above a try.

hpowley commented 4 months ago

Thanks, I can also confirm that I can now successfully compile with a specific version of ERSEM.

jornbr commented 4 months ago

Great, thanks for reporting back.