Compilation and Installation
Procedure
- Use PuTTY to log in to the server as the root user.
- 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
- Run the following command to modify the Makefile file:
- Open Makefile.
vi Makefile
- 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
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open Makefile.
- Run the following command to modify the mpi.f90 file:
- Open mpi.f90.
vi mpi.f90
- 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 - Press Esc, type :wq!, and press Enter to save the file and exit.
- Open mpi.f90.
- Run the following command to perform compilation and installation:
make
- 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
Parent topic: Bifrost V1.1.1 Porting Guide (CentOS 7.6)