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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Go to the installation directory.
    cd /path/to/NAMD
  3. Create and go to the main program installation directory.
    mkdir NAMD-2.13
    cd NAMD-2.13
  4. Create a build directory.
    mkdir build install
  5. Perform the configuration.
    export BUILD_DIR=/path/to/NAMD/NAMD-2.13/build
    export INSTALL_DIR=/path/to/NAMD/NAMD-2.13/install
  6. Set the environment variables of the compiler. If the setting fails, use the absolute path.
    export CC=mpicc
    export CXX=mpicxx
    export FC=mpif90
  7. Go to the build directory.
    cd /path/to/NAMD/NAMD-2.13/build
  8. Upload the Charm package to the build directory.
  9. Install Charm.
    tar -xvf charm-6.9.0.tar.gz
    cd charm-6.9.0
    mkdir ${INSTALL_DIR}/charm690/
    cp src/arch/mpi-linux-x86_64 src/arch/mpi-linux-arm8 -rf
    grep -rl 'm64' src/arch/mpi-linux-arm8 | xargs sed -i 's/\-m64//g'
    ./build charm++ mpi-linux-arm8 smp --with-production --destination=/path/to/NAMD/NAMD-2.13/install/charm690/mpi-linux-arm8
  10. Go to the build directory.
    cd /path/to/NAMD/NAMD-2.13/build
  11. Decompress the NAMD installation package.
    tar -zxvf NAMD_2.13_Source.tar.gz
  12. Go to the directory generated after the decompression.
    cd NAMD_2.13_Source
  13. Rename Linux-ARM64.fftw3.
    cp arch/Linux-x86_64.fftw3 arch/Linux-ARM64.fftw3
  14. Go to the NAMD-2.13 directory.
    cd /path/to/NAMD/NAMD-2.13
  15. Use an SFTP tool to upload the tcl package to the current directory.
  16. Decompress the tcl file.
    tar -xzvf tcl8.5.9-linux-arm64-threaded.tar.gz
  17. Modify the Make.charm file.
    1. Open the Make.charm file.
      cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source
      vi Make.charm
    2. Press i to enter the edit mode and modify the file as follows:
      CHARMBASE = /path/to/NAMD/NAMD-2.13/install/charm690
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  18. Modify the Linux-ARM64-g++.arch file.
    1. Open the Linux-ARM64-g++.arch file.
      cd /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source
      vi arch/Linux-ARM64-g++.arch
    2. Press i to enter the edit mode and modify the file as follows:
      NAMD_ARCH = Linux-ARM64
          CHARMARCH = mpi-linux-arm8
          #FLOATOPTS = -O2 -ffast-math -funsafe-math-optimizations -fomit-frame-pointer -mcpu=cortex-a9 -mtune=cortex-a9
          FLOATOPTS = -O2 -ffast-math -funsafe-math-optimizations -fomit-frame-pointer 
          CXX = clang++
          CXXOPTS = $(FLOATOPTS)
          CXXNOALIASOPTS = $(FLOATOPTS) -fno-strict-aliasing
          CC = clang
          COPTS = $(FLOATOPTS)
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  19. Configure NAMD.
    ./config Linux-ARM64-g++ --with-fftw3 --fftw-prefix /path/to/FFTW --with-tcl --tcl-prefix /path/to/NAMD/NAMD-2.13/tcl8.5.9-linux-arm64-threaded --charm-arch mpi-linux-arm8
  20. Go to the Linux-ARM64-g++ directory.
    cd Linux-ARM64-g++
  21. Compile and install NAMD.
    make
  22. Check whether an executable file is generated.
    ls /path/to/NAMD/NAMD-2.13/build/NAMD_2.13_Source/Linux-ARM64-g++/namd2

    If the namd2 file exists, the compilation is successful.