deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.48k stars 508 forks source link

error duing compilation of user-deepmd module in lammps #1

Closed hamelseb closed 6 years ago

hamelseb commented 6 years ago

hello

I compiled the deepmd-kit (using tensorflow-1.5.0 and gnu-4.9.3) and made the lammps module. the serial version of lammps without the deepmd module compiles fine. however when I tried to compile lammps with the deepmd module I'm seeing the following errors:

g++ -g -O3 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -std=c++11 -DHIGH_PREC -I/g/g99/hamel2/build_tf/1.5.0/gpu/include -I/g/g99/hamel2/deepmd-kit/include/deepmd -std=c++11 -DHIGH_PREC -I/g/g99/hamel2/build_tf/1.5.0/gpu/include -I/g/g99/hamel2/deepmd-kit/include/deepmd -std=c++11 -DHIGH_PREC -I/g/g99/hamel2/build_tf/1.5.0/gpu/include -I/g/g99/hamel2/deepmd-kit/include/deepmd -std=c++11 -DHIGH_PREC -I/g/g99/hamel2/build_tf/1.5.0/gpu/include -I/g/g99/hamel2/deepmd-kit/include/deepmd -I../STUBS -c ../pair_nnp.cpp ../pair_nnp.cpp: In member function 'virtual void LAMMPS_NS::PairNNP::compute(int, int)': ../pair_nnp.cpp:33:20: error: invalid use of incomplete type 'class LAMMPS_NS::Atom' double *x = atom->x; ^ In file included from ../pointers.h:26:0, from ../memory.h:18, from ../pair_nnp.cpp:3: ../lammps.h:29:9: error: forward declaration of 'class LAMMPS_NS::Atom' class Atom atom; // atom-based quantities ^ ...

any suggestions?

deepmodeling commented 6 years ago

Which lammps version did you use?

hamelseb commented 6 years ago

I downloaded the latest stable release

deepmodeling commented 6 years ago

I can reproduce the reported error. Let me work on it.

A fast solution for you should be switching to lammps-31Mar17.

hamelseb commented 6 years ago

ok thx. i'm will try that now.

hamelseb commented 6 years ago

ok that compiled. interesting. good luck on finding the issue with the newer version.

deepmodeling commented 6 years ago

bug fixed.