Allow to select the Fortran interface generator in ecbuild_generate_fortran_interfaces
Is your feature request related to a problem? Please describe.
The function ecbuild_generate_fortran_interfaces make use of FCM to generate the interfaces.
We would like to have the possibility to replace FCM to use our custom interface generator, able for instance to manage specific #pragma directives,
Describe the solution you'd like
Ideally, the user would have the possibility to choose among a list of generators when calling ecbuild_generate_fortran_interfaces. He should need a way to configure a generator (file path + configuration file).
Describe alternatives you've considered
Using hirlam code generator hm_list_generated_interfaces
Additional context
The context is GPU code porting
Organisation
RMI Meteo-France
@pmarguinaud
@wdeconinck , you can assess this feature request better than me. I'm happy to help with any implementation changes/review that you feel should be done.
It is not a bad idea to support other interface generators, as long as the result is the same.
I know where this is coming from and the rationale. I am not sure if the intention is as follows but let us be clear that we would not agree to contribute such hm_list_generated_interfaces script directly into ecbuild though, and require to maintain it in ecbuild either; especially if this comes with the dependency of fypp etc. This interface generator backend would have to be a preinstalled program which ecbuild can pick up.
If the FCM backend is insufficient only for the ACCORD use cases in the ial-source code path however, then perhaps I could advise to create an abstraction layer within ial-source?
i.e.
ial_generate_fortran_interfaces which can either delegate to ecbuild_generate_fortran_interfaces or to hm_list_generated_interfaces.