Diferencia entre revisiones de «ORcompDCAO DCAO»
(Creación página de compilación en sala compus DCAO) |
|||
| Línea 29: | Línea 29: | ||
** IOIPSL: 3379 | ** IOIPSL: 3379 | ||
** XIOS: 1043 | ** XIOS: 1043 | ||
* Preparing compilation environment for <code>hydra</code>. One need to add into <code>AA_make.gdef</code> specifications for <code> | * Preparing compilation environment for <code>hydra</code>. One need to add into <code>AA_make.gdef</code> specifications for <code>DCAO_gfortran</code> (at the end of file): | ||
<pre> | <pre> | ||
#-Q- | #-Q- DCAO_gfortran #- Global definitions for DCAO, mpi gfortran | ||
#-Q- | #-Q- DCAO_gfortran LIB_MPI = MPI1 | ||
#-Q- | #-Q- DCAO_gfortran LIB_MPI_BIS = MPI1 | ||
#-Q- | #-Q- DCAO_gfortran FCM_ARCH = DCAO_gfortran | ||
#-Q- | #-Q- DCAO_gfortran M_K = make | ||
#-Q- | #-Q- DCAO_gfortran P_C = cpp | ||
#-Q- | #-Q- DCAO_gfortran P_O = -fpreprocessed -P -C -traditional $(P_P) | ||
#-Q- | #-Q- DCAO_gfortran F_C = gfortran -c -cpp | ||
#-Q- | #-Q- DCAO_gfortran #-D- MD F_D = -g -Wall -fbounds-check -pedantic -finit-real=nan | ||
#-Q- | #-Q- DCAO_gfortran #-D- MN F_D = | ||
#-Q- | #-Q- DCAO_gfortran #-P- I4R4 F_P = | ||
#-Q- | #-Q- DCAO_gfortran #-P- I4R8 F_P = -fdefault-real-8 | ||
#-Q- | #-Q- DCAO_gfortran #-P- I8R8 F_P = -fdefault-integer-8 -fdefault-real-8 | ||
#-Q- | #-Q- DCAO_gfortran w_w = -O3 -funroll-all-loops $(F_D) $(F_P) -I$(MODDIR) | ||
#-Q- | #-Q- DCAO_gfortran F_O = $(w_w) -J$(MODDIR) | ||
#-Q- | #-Q- DCAO_gfortran F_L = gfortran | ||
#-Q- | #-Q- DCAO_gfortran M_M = 0 | ||
#-Q- | #-Q- DCAO_gfortran L_X = 0 | ||
#-Q- | #-Q- DCAO_gfortran L_O = | ||
#-Q- | #-Q- DCAO_gfortran A_C = ar -rs | ||
#-Q- | #-Q- DCAO_gfortran A_G = ar -x | ||
#-Q- | #-Q- DCAO_gfortran C_C = cc -c | ||
#-Q- | #-Q- DCAO_gfortran C_O = | ||
#-Q- | #-Q- DCAO_gfortran C_L = cc | ||
#-Q- | #-Q- DCAO_gfortran #- | ||
#-Q- | #-Q- DCAO_gfortran NCDF_INC = /usr/include | ||
#-Q- | #-Q- DCAO_gfortran NCDF_LIB = -L/usr/lib/x86_64-linux-gnu -lnetcdf | ||
#-Q- DCAO_gfortran #- | |||
</pre> | </pre> | ||
* Creation of the configuration \verb+arch+ files for the compilation of each component | * Creation of the configuration \verb+arch+ files for the compilation of each component | ||
| Línea 63: | Línea 64: | ||
** going there: | ** going there: | ||
<pre>$ cd ../modeles/XIOS/arch</pre> | <pre>$ cd ../modeles/XIOS/arch</pre> | ||
** Using | ** Using generic gcc compilation as reference | ||
<pre>$ cp arch- | <pre>$ cp arch-GCC_LINUX.fcm arch-DCAO_gfortran.fcm</pre> | ||
<pre>################################################################################ | |||
<pre> | ################### Projet XIOS ################### | ||
################################################################################ | |||
% | %CCOMPILER /usr/bin/mpicc | ||
%FCOMPILER /usr/bin/mpif90 | |||
% | %LINKER /usr/bin/mpif90 -nofor-main | ||
% | |||
%BASE_FFLAGS -D__NONE__ | %BASE_CFLAGS -ansi -w | ||
%PROD_FFLAGS -O3 | %PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS | ||
%DEV_FFLAGS -g -O2 | %DEV_CFLAGS -g -O2 | ||
%DEBUG_FFLAGS -g | %DEBUG_CFLAGS -g | ||
%BASE_FFLAGS -D__NONE__ -ffree-line-length-none | |||
%PROD_FFLAGS -O3 | |||
%DEV_FFLAGS -g -O2 | |||
%DEBUG_FFLAGS -g | |||
%BASE_INC -D__NONE__ | %BASE_INC -D__NONE__ | ||
%BASE_LD -lstdc++ | %BASE_LD -lstdc++ | ||
%CPP | %CPP cpp | ||
%FPP cpp -P | %FPP cpp -P | ||
%MAKE gmake</pre> | %MAKE gmake</pre> | ||
** Getting paths: | ** Getting paths: | ||
<pre>$ cp arch- | <pre>$ cp arch-GCC_LINUX.path arch-DCAO_gfortran.path</pre> | ||
** Adapting values: | |||
<pre>NETCDF_INCDIR="-I $NETCDF_INC_DIR" | |||
NETCDF_LIBDIR="-L $NETCDF_LIB_DIR" | |||
NETCDF_LIB="-lnetcdff -lnetcdf" | |||
MPI_INCDIR="" | |||
MPI_LIBDIR="" | |||
MPI_LIB="-lcurl" | |||
HDF5_INCDIR="-I $HDF5_INC_DIR" | |||
HDF5_LIBDIR="-L $HDF5_LIB_DIR" | |||
HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz" | |||
#OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1" | |||
#OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib" | |||
#OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"</pre> | |||
** Getting environment: | |||
<pre>$ cp arch-GCC_LINUX.env arch-DCAO_gfortran.env</pre> | |||
** Adapting values: | ** Adapting values: | ||
<pre> | <pre>export HDF5_INC_DIR=/usr/include | ||
export HDF5_LIB_DIR=/usr/lib/x86_64-linux-gnu | |||
export NETCDF_INC_DIR=/usr/include | |||
export NETCDF_LIB_DIR=/usr/lib/x86_64-linux-gnu</pre> | |||
* ORCHIDEE | * ORCHIDEE | ||
** Going there | ** Going there | ||
<pre>$ cd ../../ORCHIDEE/arch</pre> | <pre>$ cd ../../ORCHIDEE/arch</pre> | ||
** Using | ** Using gfotran compilation as reference | ||
<pre>$ cp arch- | <pre>$ cp arch-gfortran.fcm arch-DCAO_gfortran.fcm</pre> | ||
** Adapting values: | ** Adapting values: | ||
<pre>%COMPILER /usr | <pre>%COMPILER /usr/bin/mpicc | ||
%LINK /usr | %LINK /usr/bin/mpif90 | ||
%AR ar | %AR ar | ||
%MAKE | %MAKE make | ||
%FPP_FLAGS -P -traditional | %FPP_FLAGS -P -C -traditional -nostdinc | ||
%FPP_DEF | %FPP_DEF | ||
%BASE_FFLAGS - | %BASE_FFLAGS -fdefault-real-8 | ||
%PROD_FFLAGS -O3 | %PROD_FFLAGS -O3 -funroll-all-loops | ||
%DEV_FFLAGS - | %DEV_FFLAGS -O | ||
%DEBUG_FFLAGS - | %DEBUG_FFLAGS -ffpe-trap=invalid,zero,overflow -Wall -fbounds-check -g3 -O0 -fstack-protector-all | ||
%MPI_FFLAGS | %MPI_FFLAGS | ||
%OMP_FFLAGS -openmp -openmp-threadprivate compat | %OMP_FFLAGS -openmp -openmp-threadprivate compat | ||
%BASE_LD | %BASE_LD | ||
%MPI_LD | %MPI_LD | ||
%OMP_LD -openmp</pre> | %OMP_LD -openmp</pre> | ||
** getting paths | ** getting paths | ||
<pre>$ cp arch- | <pre>$ cp arch-gfortran.path arch-DCAO_gfortran.path</pre> | ||
** Adapting values: | ** Adapting values: | ||
<pre>NETCDF_LIBDIR="/usr/ | <pre>NETCDF_INCDIR="-I/usr/include" | ||
NETCDF_LIBDIR="-L/usr/lib/x86_64-linux-gnu" | |||
IOIPSL_INCDIR=../../../ | NETCDF_LIB="-lnetcdf -lnetcdff" | ||
IOIPSL_LIBDIR=../../../lib | |||
XIOS_INCDIR=${ORCHDIR}/../XIOS/inc | IOIPSL_INCDIR="-I${ORCHDIR}/../../lib -I${ORCHDIR}/../IOIPSL/inc" | ||
XIOS_LIBDIR="${ORCHDIR}/../XIOS/lib -lxios"</pre> | IOIPSL_LIBDIR="-L${ORCHDIR}/../../lib -L${ORCHDIR}/../IOIPSL/lib" | ||
IOIPSL_LIB="-lioipsl" | |||
XIOS_INCDIR="-I${ORCHDIR}/../XIOS/inc" | |||
XIOS_LIBDIR="-L${ORCHDIR}/../XIOS/lib" | |||
XIOS_LIB="-lxios"</pre> | |||
** Going back to <code>util</code> to proceed | ** Going back to <code>util</code> to proceed | ||
<pre>$ cd ../../../util</pre> | <pre>$ cd ../../../util</pre> | ||
** Installing the code: | ** Installing the code: | ||
<pre>$ ./ins_make -t | <pre>$ ./ins_make -t DCAO_gfortran >& run_ins_make.log</pre> | ||
** Going there: | ** Going there: | ||
<pre>$ cd ../config/ORCHIDEE_OL</pre> | <pre>$ cd ../config/ORCHIDEE_OL</pre> | ||
| Línea 139: | Línea 166: | ||
** Compiling: | ** Compiling: | ||
<pre>$ gmake >& run_gmake.log</pre> | <pre>$ gmake >& run_gmake.log</pre> | ||
<pre>$ gmake without_xios >& run_gmake.log</pre> | |||
** Checking if everything went fine: | ** Checking if everything went fine: | ||
<pre>$ cat -n run_gmake.log | grep Error | <pre>$ cat -n run_gmake.log | grep Error | ||
Revisión del 14:16 28 jun 2019
Compilation at DCAO's computational classroom
Installation steps using modipsl
- Go to the installation directory
[INSTALLDIR](for hydra[INSTALLDIR]=/share)
$ cd [INSTALLDIR]
- Getting the IPSL-models suite
$ svn co https://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl
- Going to the
utilfolder:
$ cd modipsl/util
- Getting the off-line version of ORCHIDEE
$ ./model ORCHIDEE_trunk >& run_get_model.log
- We got some issues with the ports, thus, it needs to be manually done:
$ cd ../modeles
- Getting IOIPSL:
$ mkdir -p IOIPSL/src $ svn co https://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/tags/v2_2_2/src IOIPSL/src
- Getting XIOS library
$ svn co -r 1043 https://forge.ipsl.jussieu.fr/ioserver/svn/XIOS/trunk XIOS
- By the end one should have:
$ ls IOIPSL ORCHIDEE XIOS
- Going back to
utilto proceed
$ cd ../util
- These are the final versions of the codes
- ORCHIDEE: 4622
- ORCHIDEE_OL: 4622
- IOIPSL: 3379
- XIOS: 1043
- Preparing compilation environment for
hydra. One need to add intoAA_make.gdefspecifications forDCAO_gfortran(at the end of file):
#-Q- DCAO_gfortran #- Global definitions for DCAO, mpi gfortran #-Q- DCAO_gfortran LIB_MPI = MPI1 #-Q- DCAO_gfortran LIB_MPI_BIS = MPI1 #-Q- DCAO_gfortran FCM_ARCH = DCAO_gfortran #-Q- DCAO_gfortran M_K = make #-Q- DCAO_gfortran P_C = cpp #-Q- DCAO_gfortran P_O = -fpreprocessed -P -C -traditional $(P_P) #-Q- DCAO_gfortran F_C = gfortran -c -cpp #-Q- DCAO_gfortran #-D- MD F_D = -g -Wall -fbounds-check -pedantic -finit-real=nan #-Q- DCAO_gfortran #-D- MN F_D = #-Q- DCAO_gfortran #-P- I4R4 F_P = #-Q- DCAO_gfortran #-P- I4R8 F_P = -fdefault-real-8 #-Q- DCAO_gfortran #-P- I8R8 F_P = -fdefault-integer-8 -fdefault-real-8 #-Q- DCAO_gfortran w_w = -O3 -funroll-all-loops $(F_D) $(F_P) -I$(MODDIR) #-Q- DCAO_gfortran F_O = $(w_w) -J$(MODDIR) #-Q- DCAO_gfortran F_L = gfortran #-Q- DCAO_gfortran M_M = 0 #-Q- DCAO_gfortran L_X = 0 #-Q- DCAO_gfortran L_O = #-Q- DCAO_gfortran A_C = ar -rs #-Q- DCAO_gfortran A_G = ar -x #-Q- DCAO_gfortran C_C = cc -c #-Q- DCAO_gfortran C_O = #-Q- DCAO_gfortran C_L = cc #-Q- DCAO_gfortran #- #-Q- DCAO_gfortran NCDF_INC = /usr/include #-Q- DCAO_gfortran NCDF_LIB = -L/usr/lib/x86_64-linux-gnu -lnetcdf #-Q- DCAO_gfortran #-
- Creation of the configuration \verb+arch+ files for the compilation of each component
- XIOS
- going there:
$ cd ../modeles/XIOS/arch
- Using generic gcc compilation as reference
$ cp arch-GCC_LINUX.fcm arch-DCAO_gfortran.fcm
################################################################################ ################### Projet XIOS ################### ################################################################################ %CCOMPILER /usr/bin/mpicc %FCOMPILER /usr/bin/mpif90 %LINKER /usr/bin/mpif90 -nofor-main %BASE_CFLAGS -ansi -w %PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS %DEV_CFLAGS -g -O2 %DEBUG_CFLAGS -g %BASE_FFLAGS -D__NONE__ -ffree-line-length-none %PROD_FFLAGS -O3 %DEV_FFLAGS -g -O2 %DEBUG_FFLAGS -g %BASE_INC -D__NONE__ %BASE_LD -lstdc++ %CPP cpp %FPP cpp -P %MAKE gmake
- Getting paths:
$ cp arch-GCC_LINUX.path arch-DCAO_gfortran.path
- Adapting values:
NETCDF_INCDIR="-I $NETCDF_INC_DIR" NETCDF_LIBDIR="-L $NETCDF_LIB_DIR" NETCDF_LIB="-lnetcdff -lnetcdf" MPI_INCDIR="" MPI_LIBDIR="" MPI_LIB="-lcurl" HDF5_INCDIR="-I $HDF5_INC_DIR" HDF5_LIBDIR="-L $HDF5_LIB_DIR" HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz" #OASIS_INCDIR="-I$PWD/../../oasis3-mct/BLD/build/lib/psmile.MPI1" #OASIS_LIBDIR="-L$PWD/../../oasis3-mct/BLD/lib" #OASIS_LIB="-lpsmile.MPI1 -lscrip -lmct -lmpeu"
- Getting environment:
$ cp arch-GCC_LINUX.env arch-DCAO_gfortran.env
- Adapting values:
export HDF5_INC_DIR=/usr/include export HDF5_LIB_DIR=/usr/lib/x86_64-linux-gnu export NETCDF_INC_DIR=/usr/include export NETCDF_LIB_DIR=/usr/lib/x86_64-linux-gnu
- ORCHIDEE
- Going there
$ cd ../../ORCHIDEE/arch
- Using gfotran compilation as reference
$ cp arch-gfortran.fcm arch-DCAO_gfortran.fcm
- Adapting values:
%COMPILER /usr/bin/mpicc %LINK /usr/bin/mpif90 %AR ar %MAKE make %FPP_FLAGS -P -C -traditional -nostdinc %FPP_DEF %BASE_FFLAGS -fdefault-real-8 %PROD_FFLAGS -O3 -funroll-all-loops %DEV_FFLAGS -O %DEBUG_FFLAGS -ffpe-trap=invalid,zero,overflow -Wall -fbounds-check -g3 -O0 -fstack-protector-all %MPI_FFLAGS %OMP_FFLAGS -openmp -openmp-threadprivate compat %BASE_LD %MPI_LD %OMP_LD -openmp
- getting paths
$ cp arch-gfortran.path arch-DCAO_gfortran.path
- Adapting values:
NETCDF_INCDIR="-I/usr/include"
NETCDF_LIBDIR="-L/usr/lib/x86_64-linux-gnu"
NETCDF_LIB="-lnetcdf -lnetcdff"
IOIPSL_INCDIR="-I${ORCHDIR}/../../lib -I${ORCHDIR}/../IOIPSL/inc"
IOIPSL_LIBDIR="-L${ORCHDIR}/../../lib -L${ORCHDIR}/../IOIPSL/lib"
IOIPSL_LIB="-lioipsl"
XIOS_INCDIR="-I${ORCHDIR}/../XIOS/inc"
XIOS_LIBDIR="-L${ORCHDIR}/../XIOS/lib"
XIOS_LIB="-lxios"
- Going back to
utilto proceed
- Going back to
$ cd ../../../util
- Installing the code:
$ ./ins_make -t DCAO_gfortran >& run_ins_make.log
- Going there:
$ cd ../config/ORCHIDEE_OL
- No need to loading the right environment since in
hydraits by default - Compiling XIOS in sequential (in
Makefile, adding no-parallel compilation):
- No need to loading the right environment since in
./make_xios --netcdf_lib netcdf4_seq (...)
- Compiling:
$ gmake >& run_gmake.log
$ gmake without_xios >& run_gmake.log
- Checking if everything went fine:
$ cat -n run_gmake.log | grep Error $ cat -n run_gmake.log | grep undefined $ ls ../../bin/ orchidee_ol xios_server.exe