ソースを参照

EnKF compiling upon start of freeboard assim developments

Francois Massonnet 4 年 前
コミット
5a0af75992

+ 38 - 0
EnKF-MPI-TOPAZ/Config/make.zenobe

@@ -0,0 +1,38 @@
+# Library and include
+
+INC_NETCDFF = -I${EBROOTNETCDFMINFORTRAN}/include
+INC_NETCDF = -I${EBROOTNETCDF}/include
+LIB_NETCDF = -L${EBROOTNETCDF}/lib64 -lnetcdf
+LIB_NETCDFF = -L${EBROOTNETCDFMINFORTRAN}/lib -lnetcdff
+INC_LAPACK = -I${EBROOTSCALAPACK}/include
+LIB_LAPACK = -L${EBROOTSCALAPACK}/lib -lscalapack
+LIB_BLAS = -L${EBROOTOPENBLAS}/lib -lopenblas
+INC_BLAS = -I${EBROOTOPENBLAS}/include
+INC_FFT = -I${EBROOTFFTW}/include
+LIB_FFT = -L${EBROOTFFTW}/lib -lfftw3 -lfftw3_mpi
+
+INCS = $(INC_NETCDF) $(INC_FFT) $(INC_NETCDFF) $(INC_LAPACK) $(INC_BLAS)
+LIBS = $(LIB_NETCDF) $(LIB_NETCDFF) $(LIB_FFT) $(LIB_LAPACK) $(LIB_BLAS)
+
+CF90 = mpif90
+CPPFLAGS = -D_G95_ -DQMPI
+CF77 = $(CF90)
+LD = $(CF90)
+CPP = cpp -traditional-cpp
+CC = mpicc
+
+CPPARCH =
+CPPFLAGS +=
+
+SIZEO = -fdefault-real-8
+OPTO = -O3
+DEBUG_FLAGS = #-g -traceback -W1 -warn unused -warn uncalled -debug extended -debug-parameters -ftrapuv -fpe0
+
+FFLAGS = $(SIZEO) $(OPTO) $(DEBUG_FLAGS) $(INCS)
+CFLAGS = -Df2cFortran $(OPTO) $(INCS)
+LINKFLAGS = $(SIZEO) $(OPTO) $(DEBUG_FLAGS) $(LIBS)
+
+# language-specific flags
+#
+F77FLG =
+F90FLG =

+ 4 - 0
EnKF-MPI-TOPAZ/EnKF.F90

@@ -70,7 +70,11 @@ program EnKF
 
   character(*), parameter :: ENKF_VERSION = "2.11"
 
+#if defined(_G95_)
+  integer, intrinsic :: iargc
+#else
   integer, external :: iargc
+#endif
 
   ! NFIELD is the number of fields (x N) passed for the update during a call to
   ! update_fields(). In TOPAZ4 NFIELD = 2 if there is 1 GB of RAM per node, and

+ 4 - 2
EnKF-MPI-TOPAZ/m_io_mod_fld.F90

@@ -120,9 +120,11 @@ contains
      endif
   case(2) ! 3D ocean variable
      if     (gorp=='get') then
-        error = nf90_get_var(ncid, varID, fld, start=(/1,1,zvlevel/), count=(/nx,ny,1/)); if (error.ne.nf90_noerr) call handle_err(error, "getting ocean variable")
+        error = nf90_get_var(ncid, varID, fld, start=(/1,1,zvlevel/), count=(/nx,ny,1/))
+        if (error.ne.nf90_noerr) call handle_err(error, "getting ocean variable")
      elseif (gorp=='put') then
-        error = nf90_put_var(ncid, varID, fld, start=(/1,1,zvlevel/), count=(/nx,ny,1/)); if (error.ne.nf90_noerr) call handle_err(error, "putting ocean variable")
+        error = nf90_put_var(ncid, varID, fld, start=(/1,1,zvlevel/), count=(/nx,ny,1/))
+        if (error.ne.nf90_noerr) call handle_err(error, "putting ocean variable")
      else
         if (master) print *, "(io_mod_fld): Either 'put' or 'get'!"
         call stop_mpi()

+ 1 - 1
EnKF-MPI-TOPAZ/make.inc

@@ -1 +1 @@
-Config/make.mn4
+Config/make.zenobe

+ 4 - 2
EnKF-MPI-TOPAZ/makefile

@@ -7,7 +7,7 @@ VPATH = .:TMP
 
 PROGS = EnKF
 
-all: $(PROGS)
+all:	$(PROGS)
 
 ENKF_SRC_F90 = \
 qmpi.F90\
@@ -54,8 +54,10 @@ m_insitu.o: nfw.o mod_measurement.o m_get_mod_xyz.o m_io_mod_fld.o
 m_local_analysis.o: mod_measurement.o m_point2nc.o m_parameters.o
 
 EnKF: $(ENKF_OBJ)
+	@echo "FRANCOIS"
+	@exit
 	@echo "->EnKF"
-	@cd ./TMP ; $(LD) $(LINKFLAGS) -o ../EnKF $(ENKF_OBJ) $(LIBS) 
+	@cd ./TMP ; $(LD) $(LINKFLAGS) -o ../EnKF $(ENKF_OBJ)
 
 $(ENKF_OBJ): makefile make.inc MODEL.CPP
 

+ 2 - 3
sanity_check/README.txt

@@ -1,3 +1,2 @@
-This set of routines HAS TO BE COMPILED ON THE HPC 
-
-Don't forget to do a module load intel before compiling
+module purge; module load netCDF-Fortran/4.4.4-foss-2016b
+make

+ 1 - 1
sanity_check/make.inc

@@ -1 +1 @@
-../EnKF-MPI-TOPAZ/Config/make.mn4
+../EnKF-MPI-TOPAZ/Config/make.zenobe