Closed gitkol closed 4 years ago
Everything needs to be compiled with the same ABI: OpenMM, the Plumed plugin, and the Python module. It looks to me like the problem is that the plugin library is compiled with one ABI, but the Python module is compiled with the other. If you edit the setup.py file, you can use the extra_compile_args
and extra_link_args
variables to pass extra options to the compiler and linker telling it what ABI to use.
Of course, in an ideal world everything would just work...
Yes, adding '-D_GLIBCXX_USE_CXX11_ABI=0'
to extra_compile_args
did solve the problem. Thanks for the clue. What exactly does make PythonInstall
do as opposed to make install
?
Thanks again,
Istvan
make PythonInstall
is just a shortcut for setting a few environment variables and then running setup.py. So they're pretty much independent. Compiling the libraries is handled by CMake, while compiling the Python module is handled by distutils.
Thank you, Peter.
Hi, I know there have been multiple tickets addressing this problem, I myself contributed to them too, but the problem still seems to persist with the latest conda OpenMM build. I installed OpenMM with conda under anaconda3, 'conda install -c omnia/label/cuda100 openmm' and installed openmm-plumed with cmake. The only way openmm-plumed compiled was with this setting:
With ABI=1 or 'CMAKE_CXX_FLAGS:STRING=' I get the following error:
With ABI=0, openmm-plumed successfully compiles but then when I run a test job with PlumedForce I get the following error:
which indicates a Cxx11 issue. So, it seems that OpenMM 7.4.1 was compiled with a different ABI setting. Can you tell me what setting it was? I should compile openmm-plumed with the same setting, but so far I could only compile it with ABI=0 and that doesn't work.
Hopefully, the following ldd output might give a clue. First, I compared libOpenMMPlumed.so in the openmm-plumed-build directory and in the /raid/istvan/anaconda3/pkgs/openmm-7.4.1-py37_cuda100_rc_1/lib directory. The latter was created by the 'make PythonInstall' command and I would think it should be identical with the one in the local build directory.
They are the same size, but their ldd output is diiferent:
So, it seems that libOpenMMPlumed.so generated by 'make PythonInstall' actually doesn't know about OpenMM!? The ldd on libOpenMM.so prints:
Could you help me fix this problem? Of course, I can compile OpenMM from source and then I won't have this issue, but it is so nice to use conda. Thank you very much for your kind assistance.
Best regards,
Istvan