Open afalaize opened 1 year ago
also, with LAMMPS version 29 oct 2020, we have several undefined symbols:
#make mpi -j
Gathering installed package information (may take a little while)
make[1] : on entre dans le répertoire « /home/user/src/lammps_with_nnp_v2020/src »
make[1]: « lmpinstalledpkgs.h » est à jour.
Gathering git version information
make[1] : on quitte le répertoire « /home/user/src/lammps_with_nnp_v2020/src »
Compiling LAMMPS for machine mpi
make[1] : on entre dans le répertoire « /home/user/src/lammps_with_nnp_v2020/src/Obj_mpi »
make[1] : on quitte le répertoire « /home/user/src/lammps_with_nnp_v2020/src/Obj_mpi »
make[1] : on entre dans le répertoire « /home/user/src/lammps_with_nnp_v2020/src/Obj_mpi »
mpicxx -g -O3 main.o -L../../lib/nnp/lib -L. -llammps_mpi -o ../lmp_mpi
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « LAMMPS_NS::PairNNP::init_style() » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:223 : référence indéfinie vers « nnp::InterfaceLammps::initialize(char const* const&, char const* const&, bool, bool, int, int, double, double, double, int, int) »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:237 : référence indéfinie vers « nnp::InterfaceLammps::getMaxCutoffRadius() const »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:217 : référence indéfinie vers « nnp::Log::registerCFilePointer(_IO_FILE** const&) »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:219 : référence indéfinie vers « nnp::Log::registerCFilePointer(_IO_FILE** const&) »
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « LAMMPS_NS::PairNNP::PairNNP(LAMMPS_NS::LAMMPS*) » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:24 : référence indéfinie vers « nnp::InterfaceLammps::InterfaceLammps() »
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « LAMMPS_NS::PairNNP::transferNeighborList() » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:319 : référence indéfinie vers « nnp::InterfaceLammps::addNeighbor(int, int, long, int, double, double, double, double) »
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « LAMMPS_NS::PairNNP::handleExtrapolationWarnings() » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:329 : référence indéfinie vers « nnp::Mode::getNumExtrapolationWarnings() const »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:363 : référence indéfinie vers « nnp::InterfaceLammps::writeExtrapolationWarnings() »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:413 : référence indéfinie vers « nnp::InterfaceLammps::clearExtrapolationWarnings() »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:359 : référence indéfinie vers « nnp::InterfaceLammps::extractEWBuffer(char const* const&, int) »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:367 : référence indéfinie vers « nnp::InterfaceLammps::getEWBufferSize() const »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:370 : référence indéfinie vers « nnp::InterfaceLammps::fillEWBuffer(char* const&, int) const »
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « LAMMPS_NS::PairNNP::compute(int, int) » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:44 : référence indéfinie vers « nnp::InterfaceLammps::setLocalAtoms(int, int const*) »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:48 : référence indéfinie vers « nnp::InterfaceLammps::setLocalTags(int const*) »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:54 : référence indéfinie vers « nnp::InterfaceLammps::process() »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:62 : référence indéfinie vers « nnp::InterfaceLammps::getForces(double* const* const&) const »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:71 : référence indéfinie vers « nnp::InterfaceLammps::getAtomicEnergy(int) const »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../pair_nnp.cpp:66 : référence indéfinie vers « nnp::InterfaceLammps::getEnergy() const »
./liblammps_mpi.a(pair_nnp.o) : Dans la fonction « nnp::Mode::~Mode() » :
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../../lib/nnp/include/Mode.h:82 : référence indéfinie vers « vtable for nnp::Mode »
/home/user/src/lammps_with_nnp_v2020/src/Obj_mpi/../../lib/nnp/include/Mode.h:82 : référence indéfinie vers « vtable for nnp::Mode »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTIN3nnp15InterfaceLammpsE[_ZTIN3nnp15InterfaceLammpsE]+0x10) : référence indéfinie vers « typeinfo for nnp::Mode »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x10) : référence indéfinie vers « nnp::Mode::setupElementMap() »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x18) : référence indéfinie vers « nnp::Mode::setupElements() »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x20) : référence indéfinie vers « nnp::Mode::setupSymmetryFunctions() »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x28) : référence indéfinie vers « nnp::Mode::setupSymmetryFunctionScaling(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x30) : référence indéfinie vers « nnp::Mode::setupSymmetryFunctionGroups() »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x38) : référence indéfinie vers « nnp::Mode::setupSymmetryFunctionCache(bool) »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x40) : référence indéfinie vers « nnp::Mode::setupNeuralNetwork() »
./liblammps_mpi.a(pair_nnp.o):(.rodata._ZTVN3nnp15InterfaceLammpsE[_ZTVN3nnp15InterfaceLammpsE]+0x48) : référence indéfinie vers « nnp::Mode::setupNeuralNetworkWeights(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) »
collect2: error: ld a retourné le statut de sortie 1
make[1]: *** [../lmp_mpi] Erreur 1
make[1] : on quitte le répertoire « /home/user/src/lammps_with_nnp_v2020/src/Obj_mpi »
make: *** [mpi] Erreur 2
Any hint on how to get rid of these errors? best AF
This is an old question but for future readers:
This is caused by a change in the lammps interface in PR: https://github.com/lammps/lammps/pull/3159 which broke the neighbor request call at commit https://github.com/lammps/lammps/commit/799ab965d96878ae1f2408052c46d1ffb2530b5f, resulting in build error starting from release 24Mar2022.
As a workaround, you can revert commit https://github.com/lammps/lammps/commit/799ab965d96878ae1f2408052c46d1ffb2530b5f or modify the current LAMMPS src/neigh_request.h
in order to list PairNNP
as a friend class:
class NeighRequest : protected Pointers {
friend class Neighbor;
friend class NBin;
friend class NeighList;
friend class NPair;
friend class NStencil;
friend class NeighborKokkos;
friend class NPairSkipIntel;
friend class FixIntel;
friend class PairNNP; // addition
Hi, We currently face some difficulties to compile LAMMPS with interface to nnp. We followed the instructions provided here and could successfully compile the nnp library. But the compilation of lammps fails with the following error:
Is there anything we can do on our side?
Best
Antoine Falaize