-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile hycom oasis intel #219
base: develop
Are you sure you want to change the base?
Changes from 5 commits
500ebb8
7c9f9d5
dbba2e7
265350a
a9036c1
c7869c0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,25 +15,23 @@ | |
# LDFLAGS: Loader flags. | ||
# EXTRALIBS: Extra local libraries (if any). | ||
# | ||
#INCLUDES = -I/cluster/software/netCDF-Fortran/4.4.4-intel-2017a-HDF5-1.8.18/include -I${ESMF_MOD_DIR} -I${ESMF_DIR}include -I./CICE/rundir/compile | ||
|
||
# --- Mostafa: flags required for standalone HYCOM | ||
INCLUDES = -I${ESMF_MOD_DIR} -I${ESMF_DIR}include -I./CICE/rundir/compile | ||
OASIS_DIR = /cluster/projects/nn9878k/guibou/NANUK/oa3-mct_iimpi2022a/ | ||
LIBPSMILE = $(OASIS_DIR)/lib/libpsmile.MPI1.a $(OASIS_DIR)/lib/libmct.a $(OASIS_DIR)/lib/libmpeu.a $(OASIS_DIR)/lib/libscrip. | ||
a | ||
LIBBUILD = $(OASIS_DIR)/build/lib | ||
INCLUDES = -I$(NETCFD_DIR)/include/ | ||
|
||
FC = mpiifort | ||
#FCFFLAGS = -traceback -g -O2 -fp-model source -warn nogeneral -convert big_endian -assume byterecl -real-size 64 -integer-size 32 | ||
FCFFLAGS = -g -convert big_endian -assume byterecl -cm -vec_report0 -w -O3 -tpp7 -xW -r8 | ||
#FCFFLAGS = -traceback -g -O2 -check all -fp-stack-check -fp-model source -warn nogeneral -convert big_endian -assume byterecl -real-size 64 -integer-size 32 | ||
#FCFFLAGS = -O2 -fconvert=big-endian -fdefault-real-8 -fdefault-double-8 | ||
|
||
FCFFLAGS := $(FCFFLAGS) $(INCLUDES) | ||
|
||
FCFFLAGS = -g -convert big_endian -assume byterecl -cm -vec_report0 -w -O3 -tpp7 -xW -r8 | ||
FCFFLAGS := $(FCFFLAGS) $(INCLUDES) # -I$(LIBBUILD) | ||
FCFFLAGS_OASIS = $(FCFFLAGS) -I$(LIBBUILD) -I$(OASIS_DIR)/build/lib/psmile.MPI1 | ||
CC = mpicc | ||
CCFLAGS = -O | ||
CCFLAGS = -O2 | ||
CCFLAGS_OASIS = -O2 -I. -cpp -Duse_comm_MPI1 -D__VERBOSE -DTREAT_OVERLAY -DDECOMP_APPLE -DUSE_DOUBLE_PRECISION | ||
|
||
|
||
CPP = cpp -P | ||
LD = $(FC) | ||
#LDFLAGS = -V $(FCFFLAGS) -shared-intel -mcmodel=medium | ||
LDFLAGS = $(FCFFLAGS) -mcmodel=medium | ||
|
||
# ENDIAN_IO not needed due to byteswap compiler flag | ||
|
@@ -42,20 +40,15 @@ LDFLAGS = $(FCFFLAGS) -mcmodel=medium | |
# | ||
# if no STOKES: | ||
# --- Mostafa: flags required for standalone HYCOM | ||
CPPFLAGS = -DIA32 -DREAL8 -DMPI -DSERIAL_IO -DNAN2003 -DTIMER -DRELO -DNERSC_HYCOM_CICE | ||
|
||
#CPPFLAGS = -DIA32 -DREAL8 -DMPI -DSERIAL_IO -DNAN2003 -DTIMER -DRELO -DUSE_ESMF -DUSE_ESMF_5 -DNERSC_HYCOM_CICE | ||
CPPFLAGS = -DIA32 -DREAL8 -DMPI -DSERIAL_IO -DNAN2003 -DTIMER -DRELO -DNERSC_HYCOM_CICE -DCPL_OASIS_HYCOM -DOFFICEField | ||
# for STOKES flag use | ||
#CPPFLAGS = -DIA32 -DREAL8 -DMPI -DSERIAL_IO -DNAN2003 -DTIMER -DRELO -DUSE_ESMF -DUSE_ESMF_5 -DNERSC_HYCOM_CICE -DSTOKES | ||
#EXTRALIBS = -L${ESMF_LIB_DIR}/ -lesmf -pgcpplibs | ||
#EXTRALIBS = -L${ESMF_LIB_DIR}/ -lesmf -lfftw3 -lmkl -lnetcdff -lnetcdf -lmpi -lmpifort | ||
# --- Mostafa: flags required for standalone HYCOM | ||
EXTRALIBS = -lfftw3 -lmkl -lnetcdff -lnetcdf -lmpi -lmpifort | ||
|
||
|
||
# from fabm | ||
#CPPFLAGS += -D_FABM_ -I${HOME}/local/fabm/hycom/include | ||
#EXTRALIBS += -L${HOME}/local/fabm/hycom/lib -lfabm | ||
EXTRALIBS = $(LIBPSMILE) -lfftw3 -lnetcdf -lnetcdff | ||
# from fabm | ||
CPPFLAGS += -D_FABM_ -I${HOME}/local/fabm/hycom/include | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 50 should be commented out, so that the default does not require fabm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added the fix, was tested on an different setup, it works but please have a look |
||
EXTRALIBS += -L${HOME}/local/fabm/hycom/lib -lfabm | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line 51 should be commented out, so that the default does not require fabm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. added the fix, was tested on an different setup, it works but please have a look |
||
|
||
# | ||
# --- generic make definitions | ||
|
@@ -67,19 +60,22 @@ RM = \rm -f | |
# rules. | ||
# | ||
|
||
#mod_cpl_oasis: | ||
|
||
.c.o: | ||
$(CC) $(CPPFLAGS) $(CCFLAGS) -c $*.c | ||
|
||
.f.o: | ||
$(FC) $(FCFFLAGS) -c $*.f | ||
|
||
.F.o: | ||
$(FC) $(CPPFLAGS) $(FCFFLAGS) -c $*.F | ||
.F.o: | ||
$(FC) $(CPPFLAGS) $(FCFFLAGS) -c $*.F | ||
|
||
|
||
#======= for Fabm use these | ||
|
||
.f90.o: | ||
$(FC) $(FCFFLAGS) -c $*.f90 | ||
$(FC) $(CCFLAGS_OASIS) $(FCFFLAGS_OASIS) -c $*.f90 | ||
|
||
.F90.o: | ||
$(FC) $(CPPFLAGS) $(FCFFLAGS) -c $*.F90 | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,33 +2,18 @@ | |
# must be sourced before compiling and running | ||
export MACHINE_FRAM=1 # compile of core is slightly different on fram | ||
|
||
# Load the right modules | ||
module restore system | ||
module load GCC/6.3.0-2.27 | ||
module load Boost/1.63.0-foss-2017a-Python-2.7.13 | ||
module load netCDF-C++4/4.3.0-foss-2017a-HDF5-1.8.18 | ||
module load CMake/3.9.1 | ||
module load netCDF-Fortran/4.4.4-foss-2017a-HDF5-1.8.18 | ||
#AS | ||
module load PETSc/3.8.0-foss-2017a-Python-2.7.13 | ||
#AS | ||
|
||
|
||
# Linking module and neXtSIM envinronment variables | ||
CLUSTER_ROOT_DIR=/cluster/projects/nn2993k/sim | ||
export PETSC_DIR=$EBROOTPETSC #AS#$CLUSTER_ROOT_DIR/packages/petsc/ | ||
export EBROOTBOOST=/opt/nextsim_intel/boost-1.67/ | ||
export BOOST_INCDIR=$EBROOTBOOST/include | ||
export BOOST_LIBDIR=$EBROOTBOOST/lib | ||
export NETCDF_DIR=$EBROOTNETCDFMINCPLUSPLUS4 | ||
export NETCDF_FOR_DIR=$EBROOTNETCDF | ||
export OPENMPI_DIR=$EBROOTOPENMPI | ||
export NETCDF_DIR=/cluster/software/netCDF/4.9.0-iimpi-2022a | ||
|
||
# User or use-case specific directories | ||
export NEXTSIMDIR=$HOME/Progs/NeXtSIM/nextsim | ||
export NEXTSIMTOOLS_ROOT_DIR=$HOME/Progs/NeXtSIM/nextsim-tools | ||
export NEXTSIMF_ROOT_DIR=$HOME/Progs/NeXtSIM/nextsimf | ||
export NEXTSIM_ENV_ROOT_DIR=$HOME/Progs/NeXtSIM/nextsim-env | ||
export SWARP_ROUTINES=$HOME/Progs/NeXtSIM/SWARP-routines | ||
export INPUT_DATA_DIR=$CLUSTER_ROOT_DIR/data | ||
export XSIM_COMP_VERBOSE=no | ||
|
||
|
@@ -38,7 +23,7 @@ export NEXTSIM_MESH_DIR=$CLUSTER_ROOT_DIR/mesh | |
export NEXTSIM_DATA_DIR=$CLUSTER_ROOT_DIR/data_links | ||
|
||
# GMSH related variables | ||
export GMSH_DIR=$CLUSTER_ROOT_DIR/packages/gmsh/ | ||
export GMSH_DIR=/opt/nextsim_intel/gmsh-3.0.6/ | ||
export PATH=$PATH:$GMSH_DIR/bin | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GMSH_DIR/lib | ||
|
||
|
@@ -48,7 +33,7 @@ export AEROBULK_DIR=$CLUSTER_ROOT_DIR/packages/aerobulk/ | |
|
||
# Oasis related variables | ||
export USE_OASIS=true | ||
export OASIS_DIR=/cluster/projects/nn9481k/oasis3-mct/oa3-mct_gfortran/ | ||
export OASIS_DIR=/cluster/projects/nn9878k/guibou/NANUK/oa3-mct_iimpi2022a/ | ||
|
||
# email for slurm jobs | ||
export MY_EMAIL="[email protected]" | ||
export MY_EMAIL="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code seems to compile of with the extension "a" of "libscrip" on the next line (line 20) rather than at the end of $(OASIS_DIR)/lib/libscrip. , but it would be best to delete the newline command for clarity