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

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Run the following command to decompress the Bifrost installation package:
    cd /path/to/BIFROST
    tar -xvf Bifrost_bench_v1.1.1-sigma2.tgz
    cd Bifrost_bench_v1.1.1
  3. Run the following command to modify the Makefile file:
    1. Open Makefile.
      vi Makefile
    2. Press I to enter the insert mode and modify the Makefile file. Pay attention to the information in bold.
      # set operating system dependent parameters
      F90               ?= mpifort
      F77                = $(F90)
      CC                 = mpicc
      LD                 = $(F90)
      F90FLAGS  ?= -O3 -ffree-line-length-0 -fno-range-check
      F77FLAGS   = $(F90FLAGS)
      LIBS       =
      INCL       =
      DEBUG      =
      LDFLAGS   ?= $(F90FLAGsS) $(DEBUG) $(INCL)
      OUTP      += compiler
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  4. Run the following command to modify the mpi.f90 file:
    1. Open mpi.f90.
      vi mpi.f90
    2. Press i to enter the insert mode and modify lines 776 and 778 in the mpi.f90 file. Pay attention to the information in bold.
      # if(gridsize < 1000) then
        fmti="(' ',I3)"
      else
        fmti="(' ',I4)"
      endif
      do k=dims(3)-1,0,-1
        do j=dims(2)-1,0,-1
          fmt="(A1)"
          do kk=0,(j-1)*2+5
            write (*,fmt,ADVANCE='NO') " "
          end do
          fmt=fmti
          do i=0,dims(1)-1
            do n=0,gridsize-1
              if (i.eq.(griddat(1,n)).and.(j.eq.griddat(2,n)).and.(k.eq.griddat(3,n))) write (*,fmt,ADVANCE='NO') n
            end do
          end do
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  5. Run the following command to perform compilation and installation:
    make
  6. Run the following command to view whether the photo_tr.x file is generated:
    ll RUNS/photo_tr.x
    -rwxr-xr-x 1 root root 2521960 Jan 11 14:39 RUNS/photo_tr.x