NOAA-OWP / ngen

Next Generation Water Modeling Engine and Framework Prototype
Other
83 stars 62 forks source link

Realization Config Format For BMI Modules Not OS Agnostic #334

Open robertbartel opened 2 years ago

robertbartel commented 2 years ago

At the moment, realization configs required paths to shared library files for any utilized BMI module (except those in Python). This makes building a config tricky, because shared library files on different operating systems have different file extensions. I.e., even with the parent directory of a module file standardized, it generally isn't possible to write a single config file including a BMI formulation that works across OSs.

This needs to be remedied in some way. That may involve something akin to #221, a different approach, or a combination of both.

mattw-nws commented 2 years ago

I was just thinking about this Wednesday... I thought perhaps we could add {{libext}} or something similar as a find/replace token to the library_file config processing, so you could do e.g.:

"library_file": "./extern/noah-mp-modular/cmake_build/libsurfacebmi.{{libext}}"

to explicitly make an agnostic config. The value for libext could be set as a compiler macro by CMake, where we already need to figure that out.