Rate This Document
Findability
Accuracy
Completeness
Readability

Compilation and Installation

Procedure

  1. Use PuTTY to log in to the server as the root user.
  2. Decompress the installation package.
    unzip miniGhost-master.zip
  3. Go to the directory generated after the decompression.
    cd /path/to/MINIGHOST/miniGhost-master/ref
  4. Create a Makefile file.
    mv Makefile Makefile.bak
    cp makefile.mpi.gnu Makefile
  5. Modify the Makefile file.
    1. Open the Makefile file.
      vi Makefile
    2. Press i to enter the edit mode and modify the file as follows:
      PROTOCOL = -D_MG_MPI
      MPI_LOC = /path/TO/OPENMPI
      MPI_INCLUDE = -I$(MPI_LOC)/include
      # State precision: -D_REAL4 and/or -D_REAL8.
      REAL_PRECISION = -D_MG_REAL8
      # Integer precision: -D_INT4 and/or -D_INT8.
      INT_PRECISION = -D_MG_INT4
      # Compilers
      FC=$(MPI_LOC)/bin/mpif90
      CC=$(MPI_LOC)/bin/mpicc
      CFLAGS = $(PROTOCOL) $(REAL_PRECISION) $(INT_PRECISION)
      # C main calling Fortran subroutine:
      CFLAGS += -Df2c_ -fsigned-char
      CFLAGS += $(MPI_INCLUDE)
      FFLAGS = $(PROTOCOL) $(REAL_PRECISION) $(INT_PRECISION)
      # Optimization
      OPT_F =-O3
      FFLAGS += $(OPT_F)
      #FFLAGS += $(MPI_INCLUDE)
      # Free-form Fortran source code:
      FFLAGS += -ffree-form -ffree-line-length-none
      # Array bounds checking: (expensive!)
      #FFLAGS += -fbounds-check
      # Compile to include checkpointing capability.
      FFLAGS += -D_MG_CHECKPT
      NCPATH=
      LNCDF=-L$(NCPATH)/lib
      LD=$(CC)
      LDFLAGS=$(CFLAGS) $(FFLAGS) -L/path/to/HMPI/lib -lmpi_mpifh
      #LDFLAGS=$(CFLAGS) $(FFLAGS)
      #LDFLAGS=$(FFLAGS)
      LIBS=
      include make_targets
    3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Perform the compilation.
    make