Installation Troubleshooting: xdrfiletools.h

84 views
Skip to first unread message

Camille Bilodeau

unread,
Nov 19, 2018, 12:28:48 PM11/19/18
to INDUS Users Forum
Hi Sean,

I created a new separate installation for plumed (version 2.5b) to patch indus into and then ran the patch script, but when I subsequently try to compile plumed, it can't find XdrFileTools.h. I tried adding XdrFileTools to the external_objects.list file, but when I do that, it can't find xdrfile.h. Are there additional files I should be including? I am not sure where to find xdrfile.h.

Thanks!
Camille

seanma...@gmail.com

unread,
Nov 19, 2018, 1:08:38 PM11/19/18
to INDUS Users Forum
Hi, Camille,

Thanks for bringing this to my attention. I mistakenly left out XdrFileTools from the list of external objects needed for the patch. I just fixed this in the git repos for both the public and developer versions.

'xdrfile.h' is a header file for the xdrfile library written by the GROMACS team for reading/writing XTC and TRR files. It's necessary to install INDUS as a standalone code, but I've set up the preprocessor macros so that it isn't required to patch INDUS into PLUMED. I'm surprised you receive that error: it suggests to me that the compiler isn't reading the macros as I intended. Let me check to see whether recent versions of PLUMED use different preprocessor variables.

In the meantime, can you try to patch again with the fixed version of the code I just updated on GitHub?

Some more questions that will help me help you:
  1. What system are you compiling on? Windows/Mac/Linux?
  2. What compiler are you using?
Best,
Sean

seanma...@gmail.com

unread,
Nov 19, 2018, 1:15:10 PM11/19/18
to INDUS Users Forum
PS: The way I currently check for whether or not INDUS is being compiled as a part of PLUMED is to look for the preprocessor variable __PLUMED_HASMPI. If this is defined--whether true or false--INDUS is compiled in "PLUMED mode" and everything which depends on xdrfile should be ignored.

seanma...@gmail.com

unread,
Nov 19, 2018, 1:22:08 PM11/19/18
to INDUS Users Forum
I see the problem. If you configure PLUMED with --disable-mpi, then __PLUMED_HAS_MPI is not set to false/0: it's not even defined.

The simplest fix is for you to use an MPI compiler instead. I will look at alternate ways of detecting PLUMED without using this preprocessor variable.

Camille Bilodeau

unread,
Nov 19, 2018, 2:30:19 PM11/19/18
to INDUS Users Forum
1. I am compiling on Linux and
2. I am using gcc (I just left all of the defaults)

I did what you suggested and am now compiling with MPI (I was not before). Now I am getting a different error:

In file included from XdrFileTools.cpp(8):
XdrFileTools.h(145): error: identifier "DIM" is undefined
          const T x[DIM],
                    ^

compilation aborted for XdrFileTools.cpp (code 2)


seanma...@gmail.com

unread,
Nov 19, 2018, 2:46:57 PM11/19/18
to INDUS Users Forum
Fixed: that section of code referenced a constant from xdrfile.

seanma...@gmail.com

unread,
Nov 19, 2018, 4:17:37 PM11/19/18
to INDUS Users Forum
With the recent fixes, I was able to compile both the release and developer versions with MPI and without the xdrfile library, using clang on Mac OS X. Let me know how it goes for you.
Reply all
Reply to author
Forward
0 new messages