Dear all:
I have the same problem as the one mentioned in the last message of Sagi:
Compiling LAMMPS for machine mpi_mbx
make[1]: Entering directory '/home2/horbatenko/bin/lammps-29Sep2021.quip.mbx/src/Obj_mpi_mbx'
make[1]: Leaving directory '/home2/horbatenko/bin/lammps-29Sep2021.quip.mbx/src/Obj_mpi_mbx'
make[1]: Entering directory '/home2/horbatenko/bin/lammps-29Sep2021.quip.mbx/src/Obj_mpi_mbx'
mpicxx -g -O3 -fopenmp -std=c++11 -ldl -I/home2/horbatenko/bin/MBX-0.8/install/include -I/home2/seungchang/software/fftw3.3.7/include -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -c ../force.cpp
mpicxx -g -O3 -fopenmp -std=c++11 -ldl -I/home2/horbatenko/bin/MBX-0.8/install/include -I/home2/seungchang/software/fftw3.3.7/include -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -c ../pair_mbx.cpp
mpicxx -g -O3 -fopenmp -std=c++11 -ldl -I/home2/horbatenko/bin/MBX-0.8/install/include -I/home2/seungchang/software/fftw3.3.7/include -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -c ../modify.cpp
mpicxx -g -O3 -fopenmp -std=c++11 -ldl -I/home2/horbatenko/bin/MBX-0.8/install/include -I/home2/seungchang/software/fftw3.3.7/include -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -c ../lammps.cpp
mpicxx -g -O3 -fopenmp -std=c++11 -ldl -I/home2/horbatenko/bin/MBX-0.8/install/include -I/home2/seungchang/software/fftw3.3.7/include -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -DMPICH_SKIP_MPICXX -DOMPI_SKIP_MPICXX=1 -DFFT_FFTW3 -c ../fix_mbx.cpp
../fix_mbx.cpp: In member function ‘void LAMMPS_NS::FixMBX::mbx_init_dipole_history_local()’:
../fix_mbx.cpp:2034:28: error: invalid conversion from ‘LAMMPS_NS::FixMBX*’ to ‘int’ [-fpermissive]
comm->forward_comm(this);
^
In file included from ../fix_mbx.cpp:20:0:
../comm.h:78:16: note: initializing argument 1 of ‘virtual void LAMMPS_NS::Comm::forward_comm(int)’
virtual void forward_comm(int dummy = 0) = 0; // forward comm of atom coords
^~~~~~~~~~~~
make[1]: *** [Makefile:117: fix_mbx.o] Error 1
make[1]: Leaving directory '/home2/horbatenko/bin/lammps-29Sep2021.quip.mbx/src/Obj_mpi_mbx'
make: *** [Makefile:389: mpi_mbx] Error 2
Ok, let me explain:
1. For LAMMPS, QUIP, and MBX compilation i used
gcc 6.5.0
mpicxx 6.5.0
make 4.2.1
fftw3.3.7
gsl 2.4
2. After installation of MBX with
autoreconf -fi
./configure
make && make install
i did make check and it showed all tests passed (34 out of 34).
3. After re-installation with
autoreconf -fi
./configure --enable-mpi CXX=mpicxx
make && make install
i did make check and it showed 28 out of 34 tests passed.
But i did not worry about the rest 6, since Marc mentioned that not all tests would pass with the mpi version.
(if someone is curious those not passed were
unittest-electrostatics
unittest-pme-nopolarization
unittest-pme-nopolarization-findif
unittest-pme-withpolarization
unittest-pme-withpolarization-findif
unittest-system)
4. After, for lammps and mbx, i did as mentioned at the mbx web:
cp Makefile.mpi_mbx LAMMPS_HOME/src/MAKE/Makefile.mpi_mbx
cp -rf USER-MBX LAMMPS_HOME/src
cp USER-MBX/*.cpp LAMMPS_HOME/src
cd LAMMPS_HOME/src/
5. Then, i modified LAMMPS_HOME/src/MAKEMakefile.mpi_mbx
(Please, see makefile_comparison.png, where i show the file modified by me as well as original ones from mbx and lammps)
Basically, i modified CC, CCFLAGS, LINK, LINKFLAGS, since my compiler comes from gcc (mpicxx) rather than intel (mpiicpc).
6. For the first trial there were no -ldl options in my modified Makefile.mpi_mbx.
make yes-user-mbx yes-molecule yes-kspace yes-rigid yes-extra-pair yes-body yes-manybody yes-ml-quip (the last three i need for my purposes)
make yes-user-mbx
make mpi_mbx
Here, i received the FixMBX error.
7a. make clean-all before proceeding further.
7b. After, having found Marc's recommendation regarding -ldl, i modified my Makefile by adding -ldl option, as you see in the right pic.
make yes-user-mbx yes-molecule yes-kspace yes-rigid yes-extra-pair yes-body yes-manybody yes-ml-quip (the last three i need for my purposes)
make yes-user-mbx
make mpi_mbx
Again, i received the same FixMBX error.
Do i miss something?
I would be thankful for any help.
Kind regards,
Yevhen Horbatenko