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

Compilation and Installation

Basic Installation Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the VASP installation package.
    cd /path/to/VASP
    tar -xvf vasp.5.4.4.tar.gz
  3. Go to the directory generated after the decompression.
    cd vasp.5.4.4
  4. If the environment configuration has been loaded, skip this step. Configure the compiler, Hyper MPI, and precompilation environment based on the actual installation paths. For example:
    export INCLUDE=/path/to/hypermpi/hmpi/include
    export PATH=/path/to/hypermpi/hmpi/bin:/path/to/hypermpi/ucx/bin:$PATH
    export OPAL_PREFIX=/path/to/hypermpi/hmpi/
    export LD_LIBRARY_PATH=/path/to/hypermpi/hmpi/lib:/path/to/hypermpi/ucx/lib:$LD_LIBRARY_PATH
    export PATH=/opt/compiler/bisheng-compiler-1.3.3-aarch64-linux/bin:$PATH
    export LD_LIBRARY_PATH=/opt/compiler/bisheng-compiler-1.3.3-aarch64-linux/lib:$LD_LIBRARY_PATH
    export LD_LIBRARY_PATH=/path/to/OPENBLAS/lib:/path/to/SCALAPACK:/path/to/FFTW/lib:$LD_LIBRARY_PATH

    Set the environment variables of the BiSheng Compiler and Hyper MPI before you configure the compilation environment.

  5. Create and edit the makefile.include file.
    1. Create a makefile.include file.
      vi makefile.include
    2. Press i to enter the insert mode and add the following content to the makefile.include file:
      ##Precompiler options
      CPP_OPTIONS= -DHOST=\"LinuxGNU\" \
                    -DMPI -DMPI_BLOCK=8000 \
                    -Duse_collective \
                    -DscaLAPACK \
                    -DCACHE_SIZE=5000 \
                    -Davoidalloc \
                    -Duse_bse_te \
                    -Dtbdyn \
                    -Duse_shmem
      CPP        = flang -E -P -C -w $*$(FUFFIX) >$*$(SUFFIX) $(CPP_OPTIONS)
      FC         = mpif90
      FCL        = mpif90
      FREE       = -ffree-form -ffree-line-length-none
      FFLAGS     = -w
      OFLAG      = -O1 -ffp-contract=fast  -ffpe-trap=invalid,zero,overflow
      OFLAG_IN   = $(OFLAG)
      DEBUG      = -O0
      LLIBS      = -L/path/to/SCALAPACK -lscalapack -L/path/to/OPENBLAS/lib -lopenblas
      FFTW       ?= /path/to/FFTW
      LLIBS      += -L$(FFTW)/lib -lfftw3
      INCS       = -I$(FFTW)/include
      OBJECTS    = fftmpiw.o fftmpi_map.o  fftw3d.o  fft3dlib.o
      OBJECTS_O1 += fftw3d.o fftmpi.o fftmpiw.o
      OBJECTS_O2 += fft3dlib.o
      # For what used to be vasp.5.lib
      CPP_LIB    = $(CPP)
      FC_LIB     = $(FC)
      CC_LIB     = clang
      CFLAGS_LIB = -O
      FFLAGS_LIB = -O1
      FREE_LIB   = $(FREE)
      OBJECTS_LIB= linpack_double.o getshmem.o
      # For the parser library
      CXX_PARS   = clang++
      LIBS       += parser
      LLIBS    += -Lparser -lparser -lstdc++
      # Normally no need to change this
      SRCDIR     = ../../src
      BINDIR     = ../../bin
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Perform the compilation and installation.
    make std

    To generate vasp_gam and vasp_ncl, run the following command:

    make all

(Optional) Extended Installation Procedure

Install the VTST transition state tool.

  1. Use PuTTY to log in to the server as the root user.
  2. Upload the VTSTcode installation package to the directory where VASP is installed.
  3. Decompress the VTSTcode installation package.
    cd /path/to/VASP
    tar -xvf vtstcode-179.tgz
  4. Back up the chain.F file in the src directory of the VASP installation package.
    cp vasp.5.4.4/src/chain.F vasp.5.4.4/src/chain.F_bak
  5. Copy files of the vtstcode-179 directory to the src directory.
    cp vtstcode-179/* vasp.5.4.4/src/
  6. Modify the src/main.F file.
    1. Open the test case file.
      vi vasp.5.4.4/src/main.F
    2. Press i to enter the insert mode and change the statements in lines 3146 and 3147 in the src/main.F file to the following:
      CALL CHAIN_FORCE(T_INFO%NIONS,DYN%POSION,TOTEN,TIFOR, &  TSIF,LATT_CUR%A,LATT_CUR%B,IO%IU6)

      After performing 6.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  7. Modify the compilation configuration file.
    1. Open the test case file.
      vi vasp.5.4.4/src/.objects
    2. Press i to enter the insert mode and add the following content between line 71 and line 72:
      bfgs.o dynmat.o instanton.o lbfgs.o sd.o cg.o dimer.o bbm.o \
      fire.o lanczos.o neb.o qm.o opt.o \

      After performing 7.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  8. Perform the compilation and installation.
    make std

    To generate vasp_gam and vasp_ncl, run the following command:

    make all

(Optional) Extended Installation Procedure

Installing the VASPsol Tool

  1. Use PuTTY to log in to the server as the root user.
  2. Download and decompress the VASPsol installation package.
    cd /path/to/VASP
    wget https://github.com/henniggroup/VASPsol/archive/refs/tags/V1.0.tar.gz
    tar -xvf V1.0.tar.gz
  3. Copy files of the VASPsol directory to the src directory.
    cp VASPsol-1.0/src/solvation.F vasp.5.4.4/src/
  4. Modify the makefile.include file in step 5 of Basic Installation Procedure.
    1. Open the makefile.include file.
      vi makefile.include
    2. Press i to enter the insert mode and add -Dsol_compat to CPP_OPTIONS.
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Perform the compilation and installation.
    make std

    To generate vasp_gam and vasp_ncl, run the following command:

    make all

Procedure for Installing the Wannier90 Interface

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the wannier90-1.2 installation package in the directory where VASP is installed.
    cd /path/to/VASP
    tar -xvf wannier90-1.2.tar.gz
  3. Replace make.sys with make.sys.gfort.
    cd wannier90-1.2
    cp config/make.sys.gfort make.sys
  4. Modify the make.sys file.
    1. Open the test case file.
      vi make.sys
    2. Press i to enter the insert mode and modify the content in line 4.
      F90 = flang
      Add the following content to the end of the make.sys file.
      LIBS = -L/path/to/SCALAPACK -L/path/to/OPENBLAS/lib -lscalapack -lopenblas

      After performing 4.a, press Esc, type :set nu, and press Enter to display the line number.

    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Perform the installation.
    make wannier lib test

    The libwannnier.a function library is generated, which needs to be added to the VASP installation and compilation.

  6. Modify the makefile.include file.
    cd /path/to/VASP/vasp.5.4.4
    vi makefile.include
  7. Press i to enter the insert mode and modify the makefile.include file.

    Modify line 10 as follows:

    -Duse_shmem -Dtbdyn -DVASP2WANNIER90

    Add the following content between line 18 and line 19.

    WANNIER90 = /path/to/VASP/wannier90-1.2/libwannier.a

    Modify line 20: Add Wannier interface parameters to LLIBS.

    LLIBS = $(WANNIER90) -L/path/to/SCALAPACK -lscalapack -L/path/to/OPENBLAS/lib -lopenblas

    After performing 6, press Esc, type :set nu, and press Enter to display the line number.

  8. Press Esc, type :wq!, and press Enter to save the file and exit.
  9. Perform the compilation.
    make std