Skip to content

Error when link Lammps to python after Nequip complied #30

Open
@Dio2k

Description

@Dio2k

I have pytorch==1.11.0+cu113 and cuda 11.3 on my system.
After I complied Lammps with Nequip, I want to link Lammps to python. but when I input
make serial mode=shlib
in terminal in the path/to/src, the following error accurred:

g++ -g -O3 -std=c++11 -fPIC -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64    -I../STUBS     -c ../lammps.cpp
In file included from ../style_pair.h:16,
                 from ../lammps.cpp:29:
../pair_nequip.h:25:10: fatal error: torch/torch.h: No such file or directory
   25 | #include <torch/torch.h>;
      |          ^~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [Makefile:109: lammps.o] Error 1
make[2]: Leaving directory '/home/ubuntu/software/lammps/lammps/src/Obj_shared_serial'
make[1]: *** [Makefile:390: serial] Error 2
make[1]: Leaving directory '/home/ubuntu/software/lammps/lammps/src'
make: *** [Makefile:390: serial] Error 2

I can easily link a new Lammps with nothing complied to python by:

make serial mode=shlib
make install-python

but I can't make it when Nequip is complied. I wonder if it is possible to link Lammps with Nequip implied to python or does someone manage it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions