我要评分
获取效率
正确性
完整性
易理解

Compiling and Installing LAMMPS

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to switch to the directory, in which the LAMMPS installation package is stored:
    cd  /path/to/LAMMPS
  3. Run the following command to decompress the LAMMPS installation package:
    tar -xvf lammps-5Jun19.tar.gz
  4. Run the following command to switch to the directory generated after decompression:
    cd lammps-5Jun2019
  5. Run the following command to switch to the src directory:
    cd src
  6. Perform the following operations to modify the MAKE/OPTIONS/Makefile.g++_openmpi file:
    1. Open the MAKE/OPTIONS/Makefile.g++_openmpi file.
      vi MAKE/OPTIONS/Makefile.g++_openmpi
    2. 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
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Run the following commands to perform compilation:
    make yes-std
    make no-lib
    make -j 96 g++_openmpi