Compiling and Installing LAMMPS
Procedure
- Use PuTTY to log in to the server as the root user.
- Run the following command to switch to the directory, in which the LAMMPS installation package is stored:
cd /path/to/LAMMPS
- Run the following command to decompress the LAMMPS installation package:
tar -xvf lammps-5Jun19.tar.gz
- Run the following command to switch to the directory generated after decompression:
cd lammps-5Jun2019
- Run the following command to switch to the src directory:
cd src
- Perform the following operations to modify the MAKE/OPTIONS/Makefile.g++_openmpi file:
- Open the MAKE/OPTIONS/Makefile.g++_openmpi file.
vi MAKE/OPTIONS/Makefile.g++_openmpi
- Press i to enter the insert mode and modify the content in lines 54, 55, and 56.
FFT_INC = -DFFT_FFTW -I/path/to/FFTW/include FFT_PATH = -L/path/to/FFTW/lib FFT_LIB = -lfftw3
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the MAKE/OPTIONS/Makefile.g++_openmpi file.
- Run the following commands to perform compilation:
make yes-std make no-lib make -j 96 g++_openmpi
Parent topic: LAMMPS 5 Jun 2019 Porting Guide (CentOS 7.6)