Problem with Building LAMMPS
I followed all steps in the document page 'Using Amp Potentials for Molecular Dynamics' (https://amp.readthedocs.io/en/latest/moleculardynamics.html) but I failed to build LAMMPS because the pair_kim.cpp file has a problem.
The error message says " home/jinsookim/lammps/src/KIM/pair_kim.cpp: In member function ‘virtual void LAMMPS_NS::PairKIM::kim_init()’: /home/jinsookim/lammps/src/KIM/pair_kim.cpp:738:25: error: expected type-specifier reinterpret_cast<KIM::Function >(get_neigh), ^ /home/jinsookim/lammps/src/KIM/pair_kim.cpp:738:25: error: expected ‘>’ /home/jinsookim/lammps/src/KIM/pair_kim.cpp:738:25: error: expected ‘(’ /home/jinsookim/lammps/src/KIM/pair_kim.cpp:738:25: error: ‘Function’ is not a member of ‘KIM’ /home/jinsookim/lammps/src/KIM/pair_kim.cpp:738:40: error: expected primary-expression before ‘>’ token reinterpret_cast<KIM::Function >(get_neigh), ^ make[2]: [CMakeFiles/lmp.dir/home/jinsookim/lammps/src/KIM/pair_kim.cpp.o] Error 1 make[1]: [CMakeFiles/lmp.dir/all] Error 2 make: *** [all] Error 2 "
Of course, I fixed the bug which the document pointed out, by typing "sed -i "s/modelWillNotRequestNeighborsOfNoncontributingParticles)/modelWillNotRequestNeighborsOfNoncontributingParticles, 0)/g" ./src/KIM/pair_kim.cpp" So that's not the problem.
I think there is another bug in the pair_kim.cpp file which the document did not point out. And I don't know what it is.
Comments (3)
-
-
reporter Thanks for the reply, but another error occurred: "
/home/jinsookim/lammps/src/KIM/pair_kim.cpp:42:21: fatal error: KIM_API.h: No such file or directory #include "KIM_API.h" ^ compilation terminated. make[2]: *** [CMakeFiles/lmp.dir/home/jinsookim/lammps/src/KIM/pair_kim.cpp.o] Error 1 make[1]: *** [CMakeFiles/lmp.dir/all] Error 2 make: *** [all] Error 2
"
-
- changed status to resolved
Hello,
Sorry, I just had a chance to upgrade this. It should be solved in the last few commits, ending with the commit f580604.
Feel free to open this issue if the problem still exists.
- Log in to comment
I suspect the last commit of local lammps has made this issue. Would you mind checking out the commit f61f43a56b7b33597101e99e53f37ca75660920b, and letting us know how it works? Thanks!