Random number generators in modules: linkage, missing symbols, etc.
We build the FORTRAN models as libraries that are later linked with the main corsika executable. These libraries are not self-contained / usable stand-alone due to missing symbols - the functions for random-number generation are not included in the library itself but are to be provided by the dependant (see also #400 (closed)). This is very awkward.
My proposal is to build the libraries with a "placeholder" function pointer, so that the libraries are at least "complete" (no missing symbols). The dependant still has to "inject" the RNG, but this happens at runtime, e.g. calling something like epos::setRNG(&rngFunction)
. This way, the libraries could also be used in other context, e.g. loaading them into Python via ctypes
.