Installation Troubleshooting -- IndusInterface.cpp:148:77: error

81 views
Skip to first unread message

Mayank Vats

unread,
May 16, 2019, 6:11:08 PM5/16/19
to INDUS Users Forum
Hi Sean,
I'm trying to setup indus using plumed, on a RHEL 7 machine, using gcc 4.8.5, with most of the defaults. ./configure has LDFLAGS and a CPPFLAGS arguments to link to a xdrfile.h and  completes successfully. I am getting the following error on issuing make, which I don't know how to get past:

IndusInterface.cpp: In member function ‘virtual void PLMD::colvar::IndusInterface::calculate()’:
IndusInterface.cpp:148:77: error: no matching function for call to ‘Indus::updateSimulationState(const std::vector<PLMD::VectorGeneric<3u> >&, CommonTypes::Box&, int&, double&)’
   indus_ptr_->updateSimulationState(indus_positions, box_matrix_, step, time);
                                                                             ^
IndusInterface.cpp:148:77: note: candidate is:
In file included from IndusInterface.h:13:0,
                 from IndusInterface.cpp:6:
Indus.h:101:7: note: void Indus::updateSimulationState(const RvecArray&, const Box&, int, double)
  void updateSimulationState(
       ^
Indus.h:101:7: note:   no known conversion for argument 1 from ‘const std::vector<PLMD::VectorGeneric<3u> >’ to ‘const RvecArray& {aka const SimpleVector<float [3]>&}’
In file included from IndusInterface.h:11:0,
                 from IndusInterface.cpp:6:


How can I fix this? I've tried plumed 2.5.1/2.4.0 to mimic the test conditions mentioned in the manual, but still get this error.
Thanks,
Mayank

Sean Marks

unread,
May 20, 2019, 12:08:13 PM5/20/19
to INDUS Users Forum
Hi, Mayank,

Thank you for your interest in the code. Are you compiling without MPI? If so, then I see the problem. Add the following statement to your FLAGS/CFLAGS/CXXFLAGS variables:

-DINDUS_PLUMED_MODE

In more detail: To detect whether it's being compiled as part of PLUMED, the code checks whether the preprocessor variable __PLUMED_HAS_MPI is defined. I assumed that folks would want to compile with MPI if they're running simulations on clusters. I look into alternatives that sidestep this issue, without overly complicating things.

Best,
Sean

Mayank Vats

unread,
May 24, 2019, 3:35:03 PM5/24/19
to INDUS Users Forum
Hi Sean,
Thanks for your response.
I am installing this on a workstation, and yes I'm not compiling with MPI support.
I tried the following in the compile step (added the -DINDUS_PLUMED_MODE, in all these flags):
./configure FLAGS=-DINDUS_PLUMED_MODE LDFLAGS=-L/usr/local/lib CPPFLAGS="-I/usr/local/include/xdrfile/ -DINDUS_PLUMED_MODE" CFLAGS=-DINDUS_PLUMED_MODE CXXFLAGS=-DINDUS_PLUMED_MODE

I'm still getting the same error:
IndusInterface.cpp: In member function ‘virtual void PLMD::colvar::IndusInterface::calculate()’:
IndusInterface.cpp:148:77: error: no matching function for call to ‘Indus::updateSimulationState(const std::vector<PLMD::VectorGeneric<3u> >&, CommonTypes::Box&, int&, double&)’
   indus_ptr_->updateSimulationState(indus_positions, box_matrix_, step, time);
                                                                                                                  ^
Could you help me with what I'm doing wrong?

Sean Marks

unread,
May 26, 2019, 2:50:30 PM5/26/19
to INDUS Users Forum
Hi, Mayank,

Thanks for your patience as I work to resolve this. I just uploaded a new version of the code to GitHub: you should be able to successfully install without the need for any special preprocessor variables. Please let me know how it goes.

Best,
Sean

Mayank Vats

unread,
May 28, 2019, 1:21:10 PM5/28/19
to INDUS Users Forum
Hello Sean,
I was able to complete plumed installation with the latest INDUS version. Thanks!
I had to adjust SOEXT in the plumed Makefile.conf, for static libraries, but I think that is a system specific issue for me. I still have to patch plumed into my gromacs engine, but i don't think any issues from here on out will pertain to INDUS specific issues.
Thanks a lot!
-Mayank

Sean Marks

unread,
May 30, 2019, 11:04:36 AM5/30/19
to INDUS Users Forum
Great news! Yeah, trying to use PLUMED as a static library can be complicated. I usually use it as a dynamic library so that I can update my PLUMED installation without having to recompile the MD engine. To my understanding, it's debatable how much using PLUMED as a static library actually improves performance.

Let me know if you run into any other difficulties.
Reply all
Reply to author
Forward
0 new messages