1. SELFE need two external library: ParMETISLib and METISLib. The compliation of the two libraries can reference the previous blog.
2. FOR SELFE compile, as the program need fpp compile instruction. The fpp function needed to be turn on in MSIDE. Two additional preprocessor definitions needed to be added:
USE_MPIMODULE;MPIVERSION=2.
2.1 The compiler may report error on the max function in file “elfe_main.f90”. An additional file is created to ower-write the max file as flowing:
MODULE funMaxModule
IMPLICIT NONE;INTERFACE max
MODULE PROCEDURE max2i
END INTERFACECONTAINS
INTEGER FUNCTION max2i(x,y)
INTEGER ::x,y;max2i= max(x,y);
END FUNCTION
END MODULE
Use the funMaxModule in the file may solve the problem.
2.2 slefe have problem in calling “netcdf ” function. in file “sflux_9c.F90”
change
“integer time_dim” to “integer time_dim(2)”
and
“iret = nf_inq_dimlen(ncid, time_dim, num_file_times)” to
iret = nf_inq_dimlen(ncid, time_dim(1), num_file_times)
2.3 IF the MPICH2 library was used: It looks like the MPICH2 library don’t support MPI_REAL8 data, need to change in file “elfe_msgp.F90” :
integer,public,save :: rtype = MPI_REAL8 to
integer,public,save :: rtype = MPI_DOUBLE_PRECISION
2.4 The SELFE can run in release model but will have problems in debug model. Because the SELEF will access the array(0) and will cause problem.