Hello,
I have made some changes to some files in the src
directory to do some tests. The documentation says that I will have to re-compile and relink the LAMMPS executable with make
. While the initial build was successful with an executable created in the bin
directory, recompilation failed to update this executable. Have I missed any key commands in the cmake settings?
I have attached my initial build installation and recompilation script below. I have also tried by simply loading the required modules and running cmake -DCMAKE_INSTALL_PREFIX=/home/lammps_new ../cmake
and the make
and make install
in the build directory, this failed to update the executable too. No error arose in the initial build and all recompilation attempts.
Thank you
Jean
- Initial build:
mkdir ./lammps_new
cd ./lammps_new
wget https://download.lammps.org/tars/lammps-23Jun2022.tar.gz
tar -xzvf lammps-23Jun2022.tar.gz
cd lammps-23Jun2022
mkdir build && cd build
module purge
module load cmake intel/20.0.4 mvapich2/2.3.6 fftw/3.3.10-mva2-lghh6f
cmake -D CMAKE_INSTALL_PREFIX=/home/lammps_new \
-D CMAKE_BUILD_TYPE=Release \
-D LAMMPS_MACHINE=intel \
-D ENABLE_TESTING=no \
-D BUILD_OMP=yes \
-D BUILD_MPI=yes \
-D CMAKE_C_COMPILER=icc \
-D CMAKE_CXX_COMPILER=icpc \
-D PKG_MOLECULE=yes \
-D PKG_EXTRA-MOLECULE=yes \
-D PKG_RIGID=yes \
-D PKG_MISC=yes \
-D PKG_KSPACE=yes \
-D PKG_EXTRA-PAIR=yes \
-D PKG_EXTRA-FIX=yes \
-D PKG_EXTRA-COMPUTE=yes \
-D PKG_CLASS2=yes \
-D PKG_REACTION=yes \
-D PKG_MC=yes \
-D FFT=MKL \
-D FFT_SINGLE=yes \
-D PKG_INTEL=yes \
-D INTEL_ARCH=cpu \
-D INTEL_LRT_MODE=threads ../cmake
make
make install
- Recompilation
cd ./lammps_new/lammps-23Jun2022/build
module purge
module load cmake intel/20.0.4 mvapich2/2.3.6-z2duuy fftw/3.3.10-mva2-lghh6f
cmake -D CMAKE_INSTALL_PREFIX=/home/lammps_new \
-D CMAKE_BUILD_TYPE=Release \
-D LAMMPS_MACHINE=intel \
-D ENABLE_TESTING=no \
-D BUILD_OMP=yes \
-D BUILD_MPI=yes \
-D CMAKE_C_COMPILER=icc \
-D CMAKE_CXX_COMPILER=icpc \
-D PKG_MOLECULE=yes \
-D PKG_EXTRA-MOLECULE=yes \
-D PKG_RIGID=yes \
-D PKG_MISC=yes \
-D PKG_KSPACE=yes \
-D PKG_EXTRA-PAIR=yes \
-D PKG_EXTRA-FIX=yes \
-D PKG_EXTRA-COMPUTE=yes \
-D PKG_CLASS2=yes \
-D PKG_REACTION=yes \
-D PKG_MC=yes \
-D FFT=MKL \
-D FFT_SINGLE=yes \
-D PKG_INTEL=yes \
-D INTEL_ARCH=cpu \
-D INTEL_LRT_MODE=threads ../cmake
make
make install