Closed carlocamilloni closed 9 years ago
@carlocamilloni In branch fix-110 I tried to introduce a separate namespace for molfile to avoid clashes. Can you check if branch fix-110 solves the issue and, in case, merge it to v2.1? Thanks! Giovanni
@giovannibussi, unfortunately it doesn’t fix the problem,
this is the GDB output (that is not changed upon the fix)
Carlo
On 29 Sep 2014, at 19:25, Giovanni notifications@github.com wrote:
@carlocamilloni In branch fix-110 I tried to introduce a separate namespace for molfile to avoid clashes. Can you check if branch fix-110 solves the issue and, in case, merge it to v2.1? Thanks! Giovanni
— Reply to this email directly or view it on GitHub.
@carlocamilloni Is PLUMED configured with the internal plugins (--enable-external-molfile-plugins) or with the external ones?
@giovannibussi
I am using the internal ones.
./configure --disable-mpi --enable-debug
configure:4980: WARNING: using internal molfile_plugins, which only support dcd and xtc/trr/trj
On 30 Sep 2014, at 11:22, Giovanni notifications@github.com wrote:
@carlocamilloni Is PLUMED configured with the internal plugins (--enable-external-molfile-plugins) or with the external ones?
— Reply to this email directly or view it on GitHub.
@carlocamilloni I double checked and I found a few other global identifiers. I hope I fixed it now, but before merging it is better if @tonigi double checks also. Thanks!
Giovanni
@giovannibussi
nope
On 30 Sep 2014, at 11:35, Giovanni notifications@github.com wrote:
@carlocamilloni I double checked and I found a few other global identifiers. I hope I fixed it now, but before merging it is better if @tonigi double checks also. Thanks!
Giovanni
— Reply to this email directly or view it on GitHub.
Hi @carlocamilloni @GiovanniBussi , here's another attempt in branch fix-110-tg. I removed the "extern C" so the internal functions should completely live in the plumed namespace (thus no more a need to rename the functions).
@giovannibussi @tonigi
still doesn't work
I don’t know if it has something to do with the problem, but clang gives this warning upon compiling driver.cpp, while the warning is not there when it compiles DriverDouble or DriverFloat
Driver.cpp:117:12: warning: function 'register_cb' is not needed and will not be emitted [-Wunneeded-internal-declaration] static int register_cb(void v, vmdplugin_t p)
On 30 Sep 2014, at 12:14, Toni G notifications@github.com wrote:
Hi @carlocamilloni @GiovanniBussi , here's another attempt in branch fix-110-tg. I removed the "extern C" so the internal functions should completely live in the plumed namespace (thus no more a need to rename the functions).
— Reply to this email directly or view it on GitHub.
@giovannibussi @carlocamilloni Odd - there does not seem to be other symbols outside of the namespace defined in molfile plugins any more (checking with nm -C *.o
).
The warning might be a confusing way to indicate that the code for register_cb
is being inlined - it must be somewhere because it is referenced in Driver.cpp , unless there is some ifdef mixup. I'll check later if I can get something similar with clang under linux (have no OSX unfortunately).
@giovannibussi @carlocamilloni I could build and run a gmx5 statically with plumed and clang... nm -C build/bin/gmx
only shows molfile stuff once, in their namespace. Can you try to recompile after setting VMD_PLUGIN_PATH to some meaningless value? Also, I needed to delete the build directory every time, otherwise it was picking the wrong compiler and giving "duplicate symbol" error.
@carlocamilloni not sure if you want to try yet once again... I removed the "extern" qualifiers
@giovannibussi @tonigi
Probably it is a bug specific of OSX with clang. I have recompiled everything from scratch with no success, as soon as I run gmx -h I get the usual Segmentation fault: 11 Giovanni have you had any chance to reproduce it? I will try to compile everything with gcc later
@carlocamilloni @tonigi not yet I never compiled gromacs 5 :-)
@giovannibussi @tonigi
I compiled everything with gcc-4.8 and it works fine with and without the new patches, so it is probably a bug of clang for osx.
@carlocamilloni @GiovanniBussi I'd suggest to merge the changes anyway, because it's logical that plumed's specific molfiles stay segregated in plumed's namespace (may avoid future problems).
I merged the branch fix-110. In principle this is not closing the issue, but since it appears to be a compiler bug I mark this issue as closed.
I have just found that by linking statically gmx5 with plumed2.1 the code crashes immediately (while in runtime linking works fine) by doing some debugging I have found that it works if one compiles plumed without the internal molfile plugin.