Skip to content
Snippets Groups Projects
Commit 7f3d7e34 authored by Guillaume Samson's avatar Guillaume Samson :snowman2: Committed by Sebastien Masson
Browse files

Resolve "add a new "debug" (-d) option to `makenemo` and a specific FCM flag...

Resolve "add a new "debug" (-d) option to `makenemo` and a specific FCM flag to switch more easily in debug mode"
parent d81fb79c
No related branches found
No related tags found
No related merge requests found
Showing
with 54 additions and 510 deletions
......@@ -30,7 +30,8 @@
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
%XIOS_HOME $CCCWORKDIR/xios-trunk
%PROD_XIOS_HOME $CCCWORKDIR/xios-trunk
%DEBUG_XIOS_HOME %{PROD_XIOS_HOME}_debug
%OASIS_HOME $CCCWORKDIR/now/models/oa3mct
%NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR
......@@ -43,7 +44,8 @@
%CPP cpp
%FC mpif90 -c -cpp
%FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
%PROD_FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
%DEBUG_FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS
......
# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
#
# NCDF_HOME root directory containing lib and include subdirectories for netcdf4
# HDF5_HOME root directory containing lib and include subdirectories for HDF5
# XIOS_HOME root directory containing lib for XIOS
# OASIS_HOME root directory containing lib for OASIS
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
%XIOS_HOME $CCCWORKDIR/xios-trunk
%OASIS_HOME $CCCWORKDIR/now/models/oa3mct
%NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR
%NCDF_LIB -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl
%XIOS_INC -I%XIOS_HOME/inc
%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++
%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpif90 -c -cpp
%FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC cc
%CFLAGS -O0
......@@ -29,7 +29,8 @@
%CPP cpp -Dkey_nosignedzero
%FC mpif90
%FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -Wno-missing-include-dirs
%PROD_FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -Wno-missing-include-dirs
%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS
......
# Irene BULL at TGCC, http://www-hpc.cea.fr/en/complexe/tgcc-Irene.htm
#
# list of modules used
#
# module purge
# module load gnu/8.3.0
# module load flavor/buildcompiler/gcc/8
# module load flavor/buildmpi/openmpi/2.0
# module load flavor/hdf5/parallel
# module load mpi/openmpi/2.0.4
# module load hdf5/1.8.20
# module load netcdf-c/4.6.0
# module load netcdf-fortran/4.4.4
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
%XIOS_HOME $CCCWORKDIR/xios-trunk_gcc
%OASIS_HOME $CCCWORKDIR/now/models/oa3mct
%NCDF_INC -I$NETCDFFORTRAN_INCDIR -I$NETCDF_INCDIR
%NCDF_LIB -L$NETCDFFORTRAN_LIBDIR -lnetcdff -L$NETCDF_LIBDIR -lnetcdf -L$HDF5_LIBDIR -lhdf5_hl -lhdf5 -lz -lcurl
%XIOS_INC -I%XIOS_HOME/inc
%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++
%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp -Dkey_nosignedzero
%FC mpif90
%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK make
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC cc
%CFLAGS -O0
......@@ -48,7 +48,8 @@
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
%PROD_FCFLAGS -i4 -r8 -O3 -fp-model strict -xCORE-AVX512 -fno-alias
%DEBUG_FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
......
# Jean-Zay HPE at IDRIS, http://www.idris.fr/jean-zay
#
# XIOS_HOME root directory containing lib for XIOS
# OASIS_HOME root directory containing lib for OASIS
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
# All NETCDF and HDF paths are empty as they are automatically defined through environment
# variables by the load of modules
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
#
#
%XIOS_HOME $WORK/xios-trunk
%OASIS_HOME
%NCDF_INC
%NCDF_LIB -lnetcdff -lnetcdf
%XIOS_INC -I%XIOS_HOME/inc
%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++
%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC cc
%CFLAGS -O0
......@@ -41,12 +41,13 @@
%NCDF_LIB ${NETCDF4_LIB} ${HDF5_LIB}
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++
%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1
%OASIS_INC -I${OASIS_DIR}/include
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
......
......@@ -47,7 +47,8 @@
%CPP cpp
%FC mpifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpifort
%LDFLAGS
......
# compiler options for AA (using INTEL compiler & OpenMPI)
#
# module purge
# module use /home/ar0s/modules
# module load prgenv/intel intel/2021.4.0 openmpi/4.1.1.1 hdf5-parallel/1.10.6 netcdf4-parallel/4.7.4 xios/trunk/rev2320-nmpi
#
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
# All NETCDF and HDF paths are empty as they are automatically defined through environment
# variables by the load of modules
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
#
#
%NCDF_INC ${NETCDF4_INCLUDE}
%NCDF_LIB ${NETCDF4_LIB} -L${HDF5_DIR}/lib -Wl,-rpath,${HDF5_DIR}/lib -lhdf5_hl -lhdf5 -lz
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++
%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpifort
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC mpicc
%CFLAGS -O0
......@@ -55,7 +55,8 @@
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
......
# compiler options for BELENOS/TARANIS (using INTEL compiler)
#
# --------------------------------
# INTEL_IMPI (NEMO 4.0 + XIOS-2.5)
# --------------------------------
# module use /home/ext/mr/smer/samsong/modules
# module load intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/2.5/rev1903
#
# ----------------------------------
# INTEL_IMPI (NEMO 4.2 + XIOS-TRUNK)
# ----------------------------------
# module use /home/ext/mr/smer/samsong/modules
# module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/rev2134
#
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
# All NETCDF and HDF paths are empty as they are automatically defined through environment
# variables by the load of modules
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
#
#
%NCDF_INC -I${NETCDF_INC}
%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++
%OASIS_INC -I${OASIS_DIR}/include
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC mpiicc
%CFLAGS -O0
......@@ -50,14 +50,15 @@
%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++
%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1
%OASIS_INC -I${OASIS_DIR}/include
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%FC mpiifort -c -cpp
%PROD_FCFLAGS -march=core-avx2 -i4 -r8 -O3 -fp-model strict -fno-alias -align array64byte
%DEBUG_FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpifort
%LD mpiifort
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
......@@ -66,5 +67,5 @@
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC mpicc
%CC mpiicc
%CFLAGS -O0
# compiler options for BELENOS/TARANIS (using INTEL compiler + Intel MPI)
#
# --------------------------------
# INTEL_IMPI (NEMO 4.0 + XIOS-2.5)
# --------------------------------
# module use /home/ext/mr/smer/samsong/modules
# module load intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/2.5/rev1903
#
# ----------------------------------
# INTEL_IMPI (NEMO 4.2 + XIOS-TRUNK)
# ----------------------------------
# module use /home/ext/mr/smer/samsong/modules
# module load gcc/9.2.0 intel/2018.5.274 intelmpi/2018.5.274 phdf5/1.8.18 netcdf_par/4.7.1_V2 xios/trunk/rev2134
#
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
# All NETCDF and HDF paths are empty as they are automatically defined through environment
# variables by the load of modules
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
#
#
%NCDF_INC -I${NETCDF_INC}
%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${PHDF5_LIB_DIR} -lhdf5_hl -lhdf5
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios -lstdc++
%OASIS_INC -I${OASIS_DIR}/include
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp
%FC mpiifort -c -cpp
%FCFLAGS -march=core-avx2 -i4 -r8 -g -O0 -debug all -traceback -fp-model strict -ftrapuv -check all,noarg_temp_created -fpe-all0 -ftz -init=arrays,snan,huge
%FFLAGS %FCFLAGS
%LD mpiifort
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC mpiicc
%CFLAGS -O0
arch-X64_BELENOS_INTEL_IMPI_DEBUG.fcm
\ No newline at end of file
......@@ -49,8 +49,9 @@
%CPP cpp -Dkey_nosignedzero
%FC mpif90 -c -cpp
#%FCFLAGS -fdefault-real-8 -O2 -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs
%FCFLAGS -fdefault-real-8 -O1 -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs
#%PROD_FCFLAGS -fdefault-real-8 -O2 -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs
%PROD_FCFLAGS -fdefault-real-8 -O1 -march=skylake-avx512 -ffree-line-length-none -Wno-missing-include-dirs
%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -fcheck=all -finit-real=snan -Wno-missing-include-dirs -ffpe-trap=invalid,zero,overflow
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS -lstdc++
......
# compiler options for KARA (using GNU compiler)
#
# GNU_OMPI (NEMO-4.0 + XIOS-2.5)
# gcc/9.3.0 openmpi/4.0.5_gcc9.3.0 hdf5/1.8.18_gcc9.3.0 netcdf/4.7.1_gcc9.3.0 xios/2.5_rev1903_gcc9.3.0
#
# GNU_OMPI (NEMO-4.2 + XIOS-TRUNK)
# gcc/9.3.0 openmpi/4.0.5_gcc9.3.0 hdf5/1.8.18_gcc9.3.0 netcdf/4.7.1_gcc9.3.0 xios/trunk_rev2136_gcc9.3.0
#
#
# NCDF_INC netcdf4 include file
# NCDF_LIB netcdf4 library
# XIOS_INC xios include file (taken into accound only if key_xios is activated)
# XIOS_LIB xios library (taken into accound only if key_xios is activated)
# OASIS_INC oasis include file (taken into accound only if key_oasis3 is activated)
# OASIS_LIB oasis library (taken into accound only if key_oasis3 is activated)
#
# FC Fortran compiler command
# FCFLAGS Fortran compiler flags
# FFLAGS Fortran 77 compiler flags
# LD linker
# LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries
# FPPFLAGS pre-processing flags
# AR assembler
# ARFLAGS assembler flags
# MK make
# USER_INC complete list of include files
# USER_LIB complete list of libraries to pass to the linker
# CC C compiler used to compile conv for AGRIF
# CFLAGS compiler flags used with CC
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
# All NETCDF and HDF paths are empty as they are automatically defined through environment
# variables by the load of modules
#---------------------------------------------------------------------------------------------
#---------------------------------------------------------------------------------------------
#
#
%NCDF_INC -I${NETCDF_INC}
%NCDF_LIB -L${NETCDF_LIB} -lnetcdff -lnetcdf -L${HDF5_LIB} -lhdf5_hl -lhdf5
%XIOS_INC -I${XIOS_INC}
%XIOS_LIB -L${XIOS_LIB} -lxios
%OASIS_INC -I${OASIS_DIR}/build/lib/mct -I${OASIS_DIR}/build/lib/psmile.MPI1
%OASIS_LIB -L${OASIS_DIR}/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp -Dkey_nosignedzero
%FC mpif90 -c -cpp
%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -ftree-vectorize -funroll-all-loops -march=skylake-avx512 -ffree-line-length-none -fcheck=all -finit-real=snan -Wno-missing-include-dirs -ffpe-trap=invalid,zero,overflow
%FFLAGS %FCFLAGS
%LD mpif90
%LDFLAGS -lstdc++
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK gmake
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC gcc
%CFLAGS -O0
......@@ -35,7 +35,8 @@
%CPP cpp -Dkey_nosignedzero
%FC mpif90
%FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -fallow-argument-mismatch
%PROD_FCFLAGS -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -fallow-argument-mismatch
%DEBUG_FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan
%FFLAGS %FCFLAGS
%LD %FC
%LDFLAGS
......
# generic gfortran compiler options for OSX installed with macport, http://www.macports.org/
#
# Prerequisite softwares installed with MacPorts :
# Prerequisite softwares installed with MacPorts :
# sudo port install gcc9
# sudo port install gcc_select
# sudo port select --set gcc mp-gcc9
# sudo port install mpich-gcc9
# sudo port install mpi_select
# sudo port select --set mpi mpich-gcc9-fortran
# sudo port install hdf5 +gcc9 +mpich +szip
# sudo port install netcdf +gcc9 +mpich
# sudo port install netcdf-fortran +gcc9 +mpich
# sudo port install p5.30-uri
#
# $ port select --show mpi
# The currently selected version for 'mpi' is 'mpich-gcc9-fortran'.
# $ port select --show gcc
# The currently selected version for 'gcc' is 'mp-gcc9'.
#
# Note that:
# - unix variables "$..." are accpeted and will be evaluated before calling fcm.
# - fcm variables are starting with a % (and not a $)
#
%NCDF_HOME /opt/local
%HDF5_HOME /opt/local
%XIOS_HOME /Users/$( whoami )/xios-trunk
%OASIS_HOME /not/defined
%NCDF_INC -I%NCDF_HOME/include -I%HDF5_HOME/include
%NCDF_LIB -L%NCDF_HOME/lib -lnetcdff -lnetcdf
%XIOS_INC -I%XIOS_HOME/inc
%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++
%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1
%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip
%CPP cpp -Dkey_nosignedzero
%FC mpif90
%FCFLAGS -fdefault-real-8 -O0 -g -fbacktrace -funroll-all-loops -fcray-pointer -ffree-line-length-none -fcheck=all -finit-real=nan
%FFLAGS %FCFLAGS
%LD %FC
%LDFLAGS
%FPPFLAGS -P -traditional
%AR ar
%ARFLAGS rs
%MK make
%USER_INC %XIOS_INC %OASIS_INC %NCDF_INC
%USER_LIB %XIOS_LIB %OASIS_LIB %NCDF_LIB
%CC cc
%CFLAGS -O0
......@@ -84,9 +84,8 @@ set -o posix
#-
##- Initialization of the options ---
x_d=''; x_h=''; x_n=''; x_r='';
x_u=''; x_a=''; x_m=''; x_t='';
x_c='';
x_d=''; x_h=''; x_n=''; x_r=''; x_c='';
x_u=''; x_a=''; x_m=''; x_t=''; x_b='';
x_j='1'; x_e='none'; x_s='src'; x_v='1'
##- Local variables ---
......@@ -112,7 +111,7 @@ export PATH=${MAIN_DIR}/ext/FCM/bin:$PATH
#-
#- Choice of the options ---
while getopts :hd:n:r:u:a:m:j:e:s:v:t:k: option; do
while getopts :hd:n:r:u:a:m:j:e:s:v:t:k:b option; do
case $option in
('h') cat <<EOF
......@@ -132,6 +131,7 @@ Mandatory
Optional
-d New set of sub-components (subfolders from ./src directory)
-b Compile Nemo in debug mode (if %DEBUG_FCFLAGS is defined in arch file)
-e Path for alter patch location (default: 'MY_SRC' in configuration folder)
-h Print this help
-j Number of processes to compile (0: dry run with no build)
......@@ -151,12 +151,12 @@ Examples
Removal : ./makenemo -n ... clean_config
EOF
exit 0 ;;
('d') x_d=${OPTARG};; ('n') x_n=${OPTARG};; ('r') x_r=${OPTARG};; ('u') x_u=${OPTARG};;
('a') x_a=${OPTARG};; ('m') x_m=${OPTARG};; ('j') x_j=${OPTARG};; ('t') x_t=${OPTARG};;
('e') x_e=(${OPTARG});; ('s') x_s=${OPTARG};; ('v') x_v=${OPTARG} ;;
('k') chk_key=${OPTARG} ;;
(':') echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; exit 2 ;;
('?') echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2; exit 2 ;;
('b') x_b="True" ;; ('n') x_n=${OPTARG};; ('r') x_r=${OPTARG};; ('u') x_u=${OPTARG};;
('a') x_a=${OPTARG};; ('m') x_m=${OPTARG};; ('j') x_j=${OPTARG};; ('t') x_t=${OPTARG};;
('e') x_e=(${OPTARG});; ('s') x_s=${OPTARG};; ('v') x_v=${OPTARG};; ('d') x_d=${OPTARG};;
('k') chk_key=${OPTARG} ;;
(':') echo ${b_n}" : -"${OPTARG}" option : missing value" 1>&2; exit 2 ;;
('?') echo ${b_n}" : -"${OPTARG}" option : not supported" 1>&2; exit 2 ;;
esac
done
......@@ -189,6 +189,7 @@ DEMO_CONF=${x_a}
RMT_CONF=${x_u}
TML_CONF=${REF_CONF}
export NEMO_DIR=${MAIN_DIR}/${x_s}
NEMO_DBG=${x_b}
[ "${CMP_NAM}" == 'all' ] && . ${COMPIL_DIR}/Flist_archfile.sh all && exit
......
......@@ -74,7 +74,8 @@ EOF
done < $1
}
# cleaning related to the old version
rm -f $( find ${COMPIL_DIR} -type l -name $1 -print )
rm -f $( find ${COMPIL_DIR} -type f -name $1 -print )
#
if [ ${#3} -eq 0 ]; then # arch not specified
if [ ! -f ${COMPIL_DIR}/arch.history ]; then
......@@ -213,3 +214,18 @@ do
fi
done
# Nemo debug ?
if [ -n "${NEMO_DBG}" ]; then
if [ $( grep -c "^%DEBUG_FCFLAGS" ${COMPIL_DIR}/$1 ) -eq 0 ]; then
echo "ERROR: You must defined '%DEBUG_FCFLAGS' in your arch file if you want to compile Nemo in debug mode using '-d' option"
exit 1
fi
# duplicate the lines starting with %DEBUG_XXX and replace, in the duplicated line, %DEBUG_XXX by %XXX
sed -i "/^%DEBUG_/{p;s/^%DEBUG_\([^ ]*\)/%\1/;}" ${COMPIL_DIR}/$1
else
if [ $( grep -q "^%PROD_FCFLAGS" ${COMPIL_DIR}/$1 ) -eq 0 ]; then
echo "WARNING: '%PROD_FCFLAGS' not defined in your arch file, makenemo will use '%FCFLAGS' instead"
fi
# duplicate the lines starting with %PROD_XXX and replace, in the duplicated line, %PROD_XXX by %XXX
sed -i "/^%PROD_/{p;s/^%PROD_\([^ ]*\)/%\1/;}" ${COMPIL_DIR}/$1
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment