I am trying to compile LAMMPS using “make mpi” command.
I am getting the following error msg.
Gathering installed package information (may take a little while)
make[1]: Entering directory ‘/home/sadgun/lammps-23Jun2022/src’
make[1]: ‘lmpinstalledpkgs.h’ is up to date.
Gathering git version information
make[1]: Leaving directory ‘/home/sadgun/lammps-23Jun2022/src’
Compiling LAMMPS for machine mpi
make[1]: Entering directory ‘/home/sadgun/lammps-23Jun2022/src/Obj_mpi’
make[1]: Leaving directory ‘/home/sadgun/lammps-23Jun2022/src/Obj_mpi’
make[1]: Entering directory ‘/home/sadgun/lammps-23Jun2022/src/Obj_mpi’
mpicxx -g -O3 -std=c++11 main.o -L. -llammps_mpi -L/usr/lib/python2.7/config-x86_64-linux-gnu -L/usr/lib -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -L/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…//lib/x86_64-linux-gnu -Wl,-rpath,/usr/lib/x86_64-linux-gnu/pkgconfig/…/…/…//lib/x86_64-linux-gnu -lkim-api -L/home/sadgun/anaconda3/lib -lcurl -ldl -o …/lmp_mpi
/usr/bin/ld: ./liblammps_mpi.a(lammps.o): in function LAMMPS_NS::LAMMPS::LAMMPS(int, char**, int)': /home/sadgun/lammps-23Jun2022/src/Obj_mpi/../lammps.cpp:127: undefined reference to
LAMMPS_NS::Universe::Universe(LAMMPS_NS::LAMMPS*, int)’
/usr/bin/ld: /home/sadgun/lammps-23Jun2022/src/Obj_mpi/…/lammps.cpp:184: undefined reference to LAMMPS_NS::Universe::Universe(LAMMPS_NS::LAMMPS*, int)' /usr/bin/ld: ./liblammps_mpi.a(library.o): in function
lammps_open’:
/home/sadgun/lammps-23Jun2022/src/Obj_mpi/…/library.cpp:186: undefined reference to LAMMPS_NS::LAMMPS::LAMMPS(int, char**, ompi_communicator_t*)' /usr/bin/ld: ./liblammps_mpi.a(library.o): in function
lammps_open_no_mpi’:
/home/sadgun/lammps-23Jun2022/src/Obj_mpi/…/library.cpp:186: undefined reference to LAMMPS_NS::LAMMPS::LAMMPS(int, char**, ompi_communicator_t*)' /usr/bin/ld: ./liblammps_mpi.a(library.o): in function
lammps_open_fortran’:
/home/sadgun/lammps-23Jun2022/src/Obj_mpi/…/library.cpp:186: undefined reference to `LAMMPS_NS::LAMMPS::LAMMPS(int, char**, ompi_communicator_t*)’
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:94: …/lmp_mpi] Error 1
make[1]: Leaving directory ‘/home/sadgun/lammps-23Jun2022/src/Obj_mpi’
make: *** [Makefile:393: mpi] Error 2
Please kindly suggest a solution to this problem. Thanks in advance.