Skip to content
This repository has been archived by the owner on Sep 27, 2021. It is now read-only.

GROMACS File Readers #543

Closed
JoshuaSBrown opened this issue May 30, 2020 · 15 comments
Closed

GROMACS File Readers #543

JoshuaSBrown opened this issue May 30, 2020 · 15 comments

Comments

@JoshuaSBrown
Copy link
Contributor

@JensWehner you had trouble with gromacs file readers before, did you ever get the problem fixed. I'm getting tones of linker errors now as well.

@JoshuaSBrown
Copy link
Contributor Author

I'm wondering if all the gmx files now need a refactor.

@junghans
Copy link
Member

I'm getting tones of linker errors now as well.

Any details?

@JensWehner
Copy link
Member

I had an old version of a gromacs libarray around, which caused those errors. Everything is fine now, it was a user error.

@JoshuaSBrown
Copy link
Contributor Author

We might need to update cmake,

Found GROMACS: /usr/lib/x86_64-linux-gnu/libgromacs_d.so (found suitable version "2019.6", minimum required is "2018")

Here is a list of the errors

../libcsg/libvotca_csg.so.7: undefined reference to gmx_mtop_t::gmx_mtop_t()' ../libcsg/libvotca_csg.so.7: undefined reference to read_first_frame(gmx_output_env_t const*, t_trxstatus**, char const*, t_trxframe*, int)'
../libcsg/libvotca_csg.so.7: undefined reference to open_trx(char const*, char const*)' ../libcsg/libvotca_csg.so.7: undefined reference to close_trx(t_trxstatus*)'
../libcsg/libvotca_csg.so.7: undefined reference to output_env_init(gmx_output_env_t**, gmx::IProgramContext const&, time_unit_t, bool, xvg_format_t, int)' ../libcsg/libvotca_csg.so.7: undefined reference to read_next_frame(gmx_output_env_t const*.,. /t_trxstatuslibcsg*/,libvotca_csg.so.7 :t_trxframe undefined) 'reference
.to. /libcsggmx_mtop_t/:libvotca_csg.so.7::gmx_mtop_t (undefined) 'reference .to. /libcsggmx_mtop_t/:libvotca_csg.so.7::~ gmx_mtop_tundefined( )reference'
to. ./read_first_framelibcsg(/gmx_output_env_tlibvotca_csg.so.7 :const *undefined, referencet_trxstatus *to* , write_trxframechar( t_trxstatusconst
*,, t_trxframet_trxframe**,, gmx_conect_tint*))''

.collect2: error: ld returned 1 exit status
./libcsg/libvotca_csg.so.7: undefined reference to open_trx(char const*, char const*)' ../libcsg/libvotca_csg.so.7: undefined src/tools/CMakeFiles/csg_property.dir/build.make:98: recipe for target 'src/tools/csg_property' failed referencemake[2]: *** [src/tools/csg_property] Error 1 toCMakeFiles/Makefile2:939: recipe for target 'src/tools/CMakeFiles/csg_property.dir/all' failed make[1]: *** [src/tools/CMakeFiles/csg_property.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs....
close_trx(t_trxstatus*)'
../libcsg/libvotca_csg.so.7: undefined reference to output_env_init(gmx_output_env_t**, gmx::IProgramContext const&, time_unit_t, bool, xvg_format_t, int)' ../libcsg/libvotca_csg.so.7: undefined reference to read_next_frame(gmx_output_env_t const*, t_trxstatus*, t_trxframe*)'
../libcsg/libvotca_csg.so.7: undefined reference to gmx_mtop_t::~gmx_mtop_t()' ../libcsg/libvotca_csg.so.7: undefined reference to write_trxframe(t_trxstatus*, t_trxframe*, gmx_conect_t*)'
collect2: error: ld returned 1 exit status
src/tools/CMakeFiles/csg_resample.dir/build.make:98: recipe for target 'src/tools/csg_resample' failed
make[2]: *** [src/tools/csg_resample] Error 1
CMakeFiles/Makefile2:976: recipe for target 'src/tools/CMakeFiles/csg_resample.dir/all' failed
make[1]: *** [src/tools/CMakeFiles/csg_resample.dir/all] Error 2

@JoshuaSBrown
Copy link
Contributor Author

JoshuaSBrown commented Jun 18, 2020

I'll look into this to make sure I'm not doing something wonky with the files in my system library/includes. This passes the ci but I cann't build it locally.

@JoshuaSBrown
Copy link
Contributor Author

JoshuaSBrown commented Jun 18, 2020

@junghans what versions of gromacs are being used in the ci?

@junghans
Copy link
Member

junghans commented Jun 18, 2020

We build against:

  • Gromacs-2019.6 on Fedora
  • Gromacs 2018.1 on Ubuntu-18.04
  • Gromacs-2020.1 on Ubunutu 20.04
  • lastest Gromacs-2019/2020/2021 (single and double) in our own containers

@JoshuaSBrown
Copy link
Contributor Author

There is a problem with the FindGromacs cmake module. Recently the gromacs has switched the api versioning system. Current versions of gromacs are now versioning starting at version 0 which breaks our current cmake module.

@JoshuaSBrown
Copy link
Contributor Author

Also using the spack gromacs causes problems because it is built with openmpi, gromacs_mpi and libgromacs_mpi need to be added as possible options. I'm working on a solution but welcome feedback.

@junghans
Copy link
Member

Also using the spack gromacs causes problems because it is built with openmpi, gromacs_mpi and libgromacs_mpi need to be added as possible options. I'm working on a solution but welcome feedback.

There is something wrong, in spack votca-csg depends on gromacs without mpi: https://github.com/spack/spack/blob/a20ba315f57bcbbb73838d1b67a15a9e14d580cd/var/spack/repos/builtin/packages/votca-csg/package.py#L35

@junghans
Copy link
Member

There is a problem with the FindGromacs cmake module. Recently the gromacs has switched the api versioning system. Current versions of gromacs are now versioning starting at version 0 which breaks our current cmake module.

Remember that we have two mechanisms to detect gromacs:
https://github.com/votca/csg/blob/master/CMakeLists.txt#L86-L89
First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.

@junghans
Copy link
Member

Plus whatever you do make sure we can still use gromacs-2018/2019 as this is needed for the coarse-graining part.

@JoshuaSBrown
Copy link
Contributor Author

First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.

I have a question why can't we use the config method for also finding earlier versions?

@junghans
Copy link
Member

junghans commented Jun 20, 2020

First we try gromacs-2021 via cmake config and then <=gromacs-2020 via our custom find module.

I have a question why can't we use the config method for also finding earlier versions?

Because it is brocken in earlier versions. I just fixed that recently https://gitlab.com/gromacs/gromacs/-/merge_requests/48

@junghans
Copy link
Member

junghans commented Sep 26, 2021

Fixed in #554.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants