I've created the CPU platform for my plugin, at runtime it finds the plugin ".so" library but `dlsym` returns a NULL handle for registerKernelFactories.
I defined the function as:
Code: Select all
extern "C" OPENMM_EXPORT void registerKernelFactories() { std::cout << "Executing registerKernelFactories of CPU MBPol" << std::endl;
for( int ii = 0; ii < Platform::getNumPlatforms(); ii++ ){
Platform& platform = Platform::getPlatform(ii);
if( platform.getName() == "CPU" ){
MBPolCpuKernelFactory* factory = new MBPolCpuKernelFactory();
std::cout << "Registered CPU CalcMBPolElectrostaticsForceKernel::Name" << std::endl;
}
}
}
Code: Select all
nm -gC /usr/local/openmm/lib/plugins/libOpenMMMBPolCPU.so | grep registerKernelFactories
00000000000237b7 T registerKernelFactories
Do you have suggestions on how to debug this?
Thanks!