nest-simulator
nest-simulator copied to clipboard
Create NEST Extension Interface for NEST compatible with new registration scheme and unloading
The title says it all. This is still in draft stage as I need to iron out some problems, especially segfaults on lt_dlclose()
of the module. ResetKernel()
works and one can install the module again afterwards, but I have not yet checked what happens if the module changes between reloads. At present, I need to provide the (DY)LD_LIBRARY_PATH
to the install location of the module. The old DynamicLoader
is replaced by ModuleManager
and NESTExtensionInterface
is the base class for extension modules.
In https://github.com/nest/nest-extension-module/pull/26 you will find a version of mymodule
(in the modulemgr
branch) that works with this branch of NEST.
This fixes #3064.
Everything works now, including loading a modified module after ResetKernel()
. One still needs to make sure that the path to the extension module is explicitly set in (DY)LD_LIBRARY_PATH
, even if it is the same as the installation location for the NEST libs. Got to see if one can improve on this, would need some search-path expansion in the module manager. But otherwise, this is ready for review.
@pnbabu Thank you for your review! I have fixed most items and commented on the two remaining.
@clinssen This PR should definitely go into 3.7, but after discussion with @terhorstd I remove the milestone again for technical reasons.
@clinssen @pnbabu I have now removed the four metadata methods from the NESTExtensionModule
interface. I also made a corresponding update to the extension module branch.
Marked as blocked, because I just discovered a bug in the PR: Changing the number of threads will unload all models from extension modules. I know how to fix this. Also switching to Draft to avoid it being merged by accident.
@pnbabu @clinssen @terhorstd I fixed the reloading problem now. In the process I made two minor changes to the NESTExtensionModuleInterface
:
- The class is now in namespace
nest
, I had forgotten this before - The
init()
method is renamedinitialize()
for consistency with NEST managers
@terhorstd Thanks for your comments! Could you take a look at my replies?