Changeset 2071 for LMDZ5/branches/LMDZ5-DOFOCO
- Timestamp:
- Jun 23, 2014, 10:35:34 AM (11 years ago)
- Location:
- LMDZ5/branches/LMDZ5-DOFOCO
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_ADA.fcm
r1781 r2071 11 11 %MPI_FFLAGS 12 12 %OMP_FFLAGS -openmp 13 %BASE_LD - shared-intel -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -L/smplocal/pub/FFTW/3.3.3_dyn/lib -lfftw3 -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/lib:/smplocal/pub/HDF5/1.8.9/seq/lib:/smplocal/pub/FFTW/3.3.3_dyn/lib14 %MPI_LD 13 %BASE_LD -L/smplocal/pub/FFTW/3.3.3_dyn/lib -lfftw3 -shared-intel -lmkl_intel_lp64 -lmkl_sequential -lmkl_core -lpthread -Wl,-rpath=/smplocal/pub/NetCDF/4.1.3/mpi/lib:/smplocal/pub/HDF5/1.8.9/par/lib:/smplocal/pub/FFTW/3.3.3_dyn/lib 14 %MPI_LD 15 15 %OMP_LD -openmp 16 16 -
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_ADA.path
r1718 r2071 1 NETCDF_LIBDIR="${NETCDF_LDFLAGS:--L/smplocal/pub/NetCDF/4.1.3/ lib -lnetcdff -lnetcdf -L/smplocal/pub/HDF5/1.8.9/seq/lib -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5-lz}"2 NETCDF_INCDIR="${NETCDF_FFLAGS:--I/smplocal/pub/HDF5/1.8.9/ seq/include -I/smplocal/pub/NetCDF/4.1.3/include}"1 NETCDF_LIBDIR="${NETCDF_LDFLAGS:--L/smplocal/pub/NetCDF/4.1.3/mpi/lib -lnetcdff -lnetcdf -L/smplocal/pub/HDF5/1.8.9/par/lib -Bstatic -lhdf5hl_fortran -lhdf5_hl -lhdf5_fortran -lhdf5 -Bdynamic -lz}" 2 NETCDF_INCDIR="${NETCDF_FFLAGS:--I/smplocal/pub/HDF5/1.8.9/par/include -I/smplocal/pub/NetCDF/4.1.3/mpi/include}" 3 3 IOIPSL_INCDIR=$LMDGCM/../../lib 4 4 IOIPSL_LIBDIR=$LMDGCM/../../lib 5 XIOS_INCDIR=$LMDGCM/../XIOS/inc 6 XIOS_LIBDIR=$LMDGCM/../XIOS/lib 5 7 ORCH_INCDIR=$LMDGCM/../../lib 6 8 ORCH_LIBDIR=$LMDGCM/../../lib 7 OASIS_INCDIR=$LMDGCM/../../ prism/X64/build/lib/psmile.$couple8 OASIS_LIBDIR=$LMDGCM/../../ prism/X64/lib9 OASIS_INCDIR=$LMDGCM/../../oasis3-mct/BLD/build/lib/psmile.MPI1 10 OASIS_LIBDIR=$LMDGCM/../../oasis3-mct/BLD/lib 9 11 INCA_LIBDIR=$LMDGCM/../INCA/config/lib 10 12 INCA_INCDIR=$LMDGCM/../INCA/config/lib -
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_CURIE.fcm
r1725 r2071 5 5 %FPP_FLAGS -P -traditional 6 6 %FPP_DEF NC_DOUBLE BLAS SGEMV=DGEMV SGEMM=DGEMM FFT_MKL 7 %BASE_FFLAGS -i4 -r8 -auto -align all -I${MKLROOT}/include 7 #%BASE_FFLAGS -xHost -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64 8 %BASE_FFLAGS -i4 -r8 -auto -align all -I$(MKL_INC_DIR) -I$(MKL_INC_DIR)/intel64/lp64 8 9 %PROD_FFLAGS -O3 9 10 %DEV_FFLAGS -p -g -O2 -traceback -fp-stack-check -
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-X64_CURIE.path
r1640 r2071 5 5 ORCH_INCDIR=$LMDGCM/../../lib 6 6 ORCH_LIBDIR=$LMDGCM/../../lib 7 OASIS_INCDIR=$LMDGCM/../../ prism/X64/build/lib/psmile.$couple8 OASIS_LIBDIR=$LMDGCM/../../ prism/X64/lib7 OASIS_INCDIR=$LMDGCM/../../oasis3-mct/BLD/build/lib/psmile.MPI1 8 OASIS_LIBDIR=$LMDGCM/../../oasis3-mct/BLD/lib 9 9 INCA_LIBDIR=$LMDGCM/../INCA/config/lib 10 10 INCA_INCDIR=$LMDGCM/../INCA/config/lib 11 11 XIOS_INCDIR=$LMDGCM/../XIOS/inc 12 XIOS_LIBDIR=$LMDGCM/../XIOS/lib -
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-gfortran.fcm
r1936 r2071 3 3 %AR ar 4 4 %MAKE make 5 %FPP_FLAGS -P -traditional6 5 %FPP_DEF NC_DOUBLE 7 %BASE_FFLAGS - c -fdefault-real-86 %BASE_FFLAGS -fdefault-real-8 8 7 %PROD_FFLAGS -O3 9 %DEV_FFLAGS - O10 %DEBUG_FFLAGS - ffpe-trap=invalid,zero,overflow -fbounds-check -g3 -O0 -fstack-protector-all8 %DEV_FFLAGS -g -O1 9 %DEBUG_FFLAGS -g -O0 -ffpe-trap=invalid,zero,overflow -fbounds-check -fstack-protector-all 11 10 %MPI_FFLAGS 12 11 %OMP_FFLAGS 13 %BASE_LD 12 %BASE_LD 14 13 %MPI_LD 15 14 %OMP_LD -
LMDZ5/branches/LMDZ5-DOFOCO/arch/arch-gfortran.path
r1936 r2071 1 1 NETCDF_LIBDIR="-L/usr/local/lib -lnetcdf" 2 2 NETCDF_INCDIR=-I/usr/local/include 3 IOIPSL_INCDIR=$LMDGCM/../../lib 4 IOIPSL_LIBDIR=$LMDGCM/../../lib 3 #IOIPSL_INCDIR=$LMDGCM/../../lib 4 #IOIPSL_LIBDIR=$LMDGCM/../../lib 5 IOIPSL_INCDIR=/home/jgipsl/INSTALLSH/LMDZ20111103.trunk/modipsl/lib 6 IOIPSL_LIBDIR=/home/jgipsl/INSTALLSH/LMDZ20111103.trunk/modipsl/lib 5 7 ORCH_INCDIR=$LMDGCM/../../lib 6 8 ORCH_LIBDIR=$LMDGCM/../../lib -
LMDZ5/branches/LMDZ5-DOFOCO/bld.cfg
r1789 r2071 24 24 src::dyn %SRC_PATH/%DYN 25 25 src::phys %SRC_PATH/%PHYS 26 #src::sisvat %SRC_PATH/%PHYS/sisvat 27 #src::rrtm %SRC_PATH/%PHYS/rrtm 26 28 src::grid %SRC_PATH/grid 27 29 src::filtrez %SRC_PATH/filtrez 28 30 src::bibio %SRC_PATH/bibio 31 src::dyn3d_common %SRC_PATH/dyn3d_common 29 32 src::cosp %COSP 30 33 src::ext_src %EXT_SRC 31 34 32 bld::lib::dyn %DYN 33 bld::lib::phys %PHYS 34 bld::lib::grid grid 35 bld::lib::filtrez filtrez 36 bld::lib::bibio bibio 37 bld::lib::cosp cosp 38 bld::lib: ext_src ext_src 39 35 bld::lib lmdz 40 36 41 37 bld::outfile_ext::exe %SUFF_NAME.e 42 bld::target lib %{DYN}.a lib%{PHYS}.a libgrid.a libfiltrez.a libbibio.a libcosp.a libext_src.a38 bld::target liblmdz.a 43 39 bld::target %EXEC%SUFF_NAME.e 44 bld::exe_dep %{DYN} %{PHYS} grid filtrez bibio cosp ext_src40 bld::exe_dep 45 41 46 42 … … 64 60 65 61 62 # Example of how to set specific compiling options for a specific file 63 # -> this can be including in the arch.opt file 66 64 #bld::tool::fflags::phys::readaerosol %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt -pi auto 67 #bld::tool::fflags::phys::aeropt_2bands %BASE_FFLAGS %PROD_FFLAGS %INCDIR68 #bld::tool::fflags::phys::radiation_AR4 %BASE_FFLAGS %PROD_FFLAGS1 %INCDIR -C hopt -Wf,-O,extendreorder69 #bld::tool::fflags::phys::radiation_AR4_param %BASE_FFLAGS %PROD_FFLAGS1 %INCDIR -C hopt -f370 #bld::tool::fflags::phys::fisrtilp %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt71 #bld::tool::fflags::phys::cv30_routines %BASE_FFLAGS %PROD_FFLAGS %INCDIR -Wf,-O,extendreorder72 #bld::tool::fflags::phys::cvltr %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt73 #bld::tool::fflags::phys::clouds_gno %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt74 #bld::tool::fflags::dyn::vlsplt_p %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt75 #bld::tool::fflags::dyn::groupeun_p %BASE_FFLAGS %PROD_FFLAGS %INCDIR -C hopt76 65 77 66 … … 95 84 bld::excl_dep use::mod_prism_get_proto 96 85 bld::excl_dep use::mod_prism_put_proto 97 bld::excl_dep use::mkl_dfti 86 bld::excl_dep use::mod_prism 87 bld::excl_dep use::xios 88 bld::excl_dep use::iaxis 89 bld::excl_dep use::iaxis_attr 90 bld::excl_dep use::icontext_attr 91 bld::excl_dep use::idate 92 bld::excl_dep use::idomain_attr 93 bld::excl_dep use::ifield_attr 94 bld::excl_dep use::ifile_attr 95 bld::excl_dep use::ixml_tree 98 96 99 97 # Don't generate interface files … … 106 104 bld::outfile_ext::mod .mod 107 105 bld::tool::SHELL /bin/bash 106 bld::tool::SHELL /bin/ksh -
LMDZ5/branches/LMDZ5-DOFOCO/build_gcm
r1755 r2071 29 29 fi 30 30 31 job=1 31 32 dirname="" #path to where the fcm command will be found 32 33 if (( $# >= 1 )) ; then … … 39 40 # add a trailing "/" to $dirname 40 41 dirname=${dirname}"/" 42 shift; 41 43 fi 42 44 43 45 # run "fcm build" command 44 ${dirname}fcm build 46 ${dirname}fcm build $* 45 47 46 48 # cleanup -
LMDZ5/branches/LMDZ5-DOFOCO/create_make_gcm
r1714 r2071 5 5 #set -xv 6 6 7 rm -f create_make_gcm.log8 7 9 8 machine=`hostname` 10 9 os=`uname` 11 10 gcm=`pwd` 11 logfile=$gcm/create_make_gcm.log 12 rm -f $logfile ; touch -f $logfile 12 13 libf=$gcm/libf 13 14 libo=$gcm/libo … … 42 43 echo 'LIBF = $(GCM)/libf' 43 44 if [ "$CRAY" = '0' ] ; then 44 # echo 'LIBO = $(GCM)/libo/$(MACHINE)'45 45 echo 'LIBO = $(LIBOGCM)/$(MACHINE)' 46 46 else 47 47 echo 'LIBO = $(GCM)/libo' 48 48 fi 49 #echo 'LOCAL_DIR=$(GCM)'50 #echo $localdir51 49 echo "LOCAL_DIR=`echo $localdir`" 52 50 echo 'BIBIO = $(LIBF)/bibio' 53 51 echo "FILTRE = filtre" 54 52 echo "PHYS = " 55 echo "DYN = dyn "56 53 echo 'LIBPHY = $(LIBO)/libphy$(PHYS).a' 57 54 echo 'DIRMAIN=dyn$(DIM)d$(FLAG_PARA)' … … 61 58 echo 62 59 echo '# Les differentes librairies pour l"edition des liens:' 63 echo 64 echo 'dyn3d = $(LIBO)/libdyn3d.a $(LIBO)/lib$(FILTRE).a' 65 echo 'dyn3dpar = $(LIBO)/libdyn3dpar.a $(LIBO)/lib$(FILTRE).a' 66 echo 'dyn2d = $(LIBO)/libdyn2d.a' 67 echo 'dyn1d = $(LIBO)/libdyn1d.a' 68 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA)' 60 echo 'L_DYN = -ldyn$(DIM)d$(FLAG_PARA) -ldyn3d_common' 69 61 echo 'L_FILTRE = -l$(FILTRE)' 70 62 echo 'L_PHY = -lphy$(PHYS) ' … … 93 85 echo 94 86 echo "PROG = code" 87 echo 'DYN = dyn$(DIM)d' 95 88 echo 96 89 #echo 'main : chimie $(DYN) bibio phys $(OPTION_DEP) ' … … 99 92 echo ' cd $(LOCAL_DIR); \' 100 93 echo ' $(COMPILE90) $(LIBF)/$(DIRMAIN)/$(SOURCE) -o $(PROG).o ; \' 101 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_BIBIO) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o ' 102 echo 103 echo 'dyn : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(FILTRE)$(DIM)d' 94 echo ' $(LINK) $(PROG).o -L$(LIBO) $(L_DYN) $(L_ADJNT) $(L_COSP) $(L_PHY) $(L_DYN) $(L_DYN3D_COMMON) $(L_BIBIO) $(L_DYN3D_COMMON) $(L_PHY) $(L_DYN) $(L_FILTRE) $(OPLINK) $(OPTION_LINK) -o $(LOCAL_DIR)/$(PROG).e ; $(RM) $(PROG).o ' 104 95 echo 105 96 echo 'phys : $(LIBPHY)' 97 echo 'dyn3d : $(LIBO)/libdyn$(DIM)d$(FLAG_PARA).a $(LIBO)/lib$(FILTRE).a $(LIBO)/libdyn3d_common.a' 98 echo 'dyn2d : $(LIBO)/libdyn2d.a' 99 echo 'dyn1d :' 100 echo 106 101 echo 107 102 #echo 'chimie : $(LIBO)/libchimie.a' … … 143 138 done 144 139 echo 145 echo $listlib >> create_makeg_gcm.log140 echo $listlib >> $logfile 146 141 echo 147 142 echo "#==================================================================" … … 176 171 ########################################################################## 177 172 178 for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed - n "/\#include/s/\#include//p" | sed 's/\"//g' ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ') ` ; do179 echo $trufile $fili $stri >> create_make_gcm.log173 for stri in ` ( sed -e '/^[cC\!]/d' $trufile | sed -e "/\#include /s/\#include /XXnclude /" -e "/include /s/include /XXnclude /" -e "/INCLUDE /s/INCLUDE /XXnclude /" | sed -n "/XXnclude /s/XXnclude//p" | sed 's/\"//g' | sort | uniq ; sed -e '/^[cC\!]/d' $trufile | egrep -i '^ *use ' | sed -e 's/,/ /' | awk ' { print $2 } ' | sort | uniq ) ` ; do 174 echo $trufile $fili $stri >> $logfile 180 175 strj=`echo $stri | tr [A-Z] [a-z]` 181 176 str2="" 182 for dirinc in filtrez bibio grid dyn3d$diri $diri/*/ ; do177 for dirinc in filtrez bibio dyn3d_common grid dyn3d phydev $diri $diri/*/ ; do 183 178 # Recherche dans l'ordre hierarchique inverse car seule la derniere 184 179 # ligne est conservee 180 if [ $dirinc = phydev ] ; then 181 dirstr='$(PHYS)' 182 libstr='phy$(PHYS)' 183 else 184 dirstr=$dirinc 185 libstr=$dirinc 186 fi 187 echo dirinc $dirinc >> $logfile 185 188 if [ -f $dirinc/$stri ] ; then 186 str2='$(LIBF)/'$dir inc/$stri189 str2='$(LIBF)/'$dirstr/$stri 187 190 elif [ -f $dirinc/$strj ] ; then 188 str2='$(LIBF)/'$dir inc/$stri191 str2='$(LIBF)/'$dirstr/$stri 189 192 elif [ -f $dirinc/$strj.F90 ] || [ -f $dirinc/$strj.F ] ; then 190 strlib=`echo $ dirinc| awk -F/ ' { print $1 } '`193 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 191 194 str2='$(LIBO)/lib'$strlib'.a('$strj'.o)' 195 elif [ -f $dirinc/$stri.F90 ] || [ -f $dirinc/$stri.F ] ; then 196 strlib=`echo $libstr | awk -F/ ' { print $1 } '` 197 str2='$(LIBO)/lib'$strlib'.a('$stri'.o)' 192 198 fi 199 echo stri $stri >> $logfile 200 echo str2 $str2 >> $logfile 193 201 done 202 echo dernier str2 $str2 >> $logfile 194 203 if [ "$str2" = "" ] ; then 195 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $ gcm/create_make_gcm.log204 echo Warn: Include $diri $trufile $fili $stri pas trouve >> $logfile 196 205 elif [ "$str2" = "$str1" ] ; then 197 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $ gcm/create_make_gcm.log206 echo Warn: Include $diri $trufile $fili $stri $str1 trouve 2x >> $logfile 198 207 else 199 208 echo $str1 \\ -
LMDZ5/branches/LMDZ5-DOFOCO/makegcm
r1789 r2071 7 7 # options par defaut pour la commande make 8 8 ######################################################################## 9 10 echo ' ' 11 echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 12 echo 'Attention makegcm n est plus supporte par l equipe de developpement' 13 echo 'Il faut maintenant utiliser ./makelmdz ou ./makelmdz_fcm ' 14 echo 'Si vous tenez absolument a utiliser makegcm, editez le script et' 15 echo 'retirer ces lignes (a vos risques et perils)' 16 echo 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' 17 echo ' ' 18 19 exit 20 21 9 22 set dim="96x71x19" 10 23 set physique=lmd 11 24 set phys="PHYS=$physique" 12 set include='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/ filtrez -I. '25 set include='-I$(LIBF)/grid -I$(LIBF)/bibio -I$(LIBF)/dyn3d_common -I$(LIBF)/filtrez -I. ' 13 26 set filtre=filtrez 14 27 set grille=reg … … 23 36 set OPTIMI='-C debug -eC ' 24 37 set OPTIMI=' -ftrace ' 25 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 26 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 38 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 27 39 set io=ioipsl 28 40 set cosp=false 29 30 set FC_LINUX=g95 31 set FC_LINUX=g 9532 #set FC_LINUX=g95 33 if ( $FC_LINUX == g 95) then34 set OPT_LINUX="- i4 -O3 -r8 -DNC_DOUBLE"41 set sisvat=false 42 43 set FC_LINUX=gfortran 44 45 if ( $FC_LINUX == gfortran ) then 46 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 35 47 else if ( $FC_LINUX == gfortran ) then 36 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 37 # set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 38 set OPT_LINUX="-i4 -O3 -r8 -DNC_DOUBLE" 48 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 39 49 else 40 50 # pgf90 options 41 set OPT_LINUX="- i4 -O3 -r8 -DNC_DOUBLE"51 set OPT_LINUX="-O3 -fdefault-real-8 -DNC_DOUBLE" 42 52 endif 43 53 … … 54 64 setenv IOIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib 55 65 setenv MODIPSLDIR /tmpdir/fairhead/Aqua/LMDZ20120327.trunk/modipsl/lib 56 setenv NCDFINC /tmpdir/fairhead/ Aqua/LMDZ20120327.trunk/netcdf-4.0.1/include57 setenv NCDFLIB /tmpdir/fairhead/ Aqua/LMDZ20120327.trunk/netcdf-4.0.1/lib66 setenv NCDFINC /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/include 67 setenv NCDFLIB /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/lib 58 68 59 69 … … 107 117 if ( ! $?NCDFLIB ) then 108 118 echo You must initialize the variable NCDFLIB in your environnement 109 echo for instance: "setenv NCDFLIB / d3/idelkadi/MODELE_LMDZ/LMDZ20121005.trunk/netcdf-4.0.1/lib119 echo for instance: "setenv NCDFLIB /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/lib 110 120 exit 111 121 endif 112 122 if ( ! $?NCDFINC ) then 113 123 echo You must initialize the variable NCDFINC in your environnement 114 echo for instance: "setenv NCDFINC / d3/idelkadi/MODELE_LMDZ/LMDZ20121005.trunk/netcdf-4.0.1/include124 echo for instance: "setenv NCDFINC /tmpdir/fairhead/Test_install/LMDZtrunk/netcdf-4.0.1/include 115 125 exit 116 126 endif … … 262 272 else if $LINUX then 263 273 ################# 264 if ( $FC_LINUX == pgf90 || $FC_LINUX == g 95|| $FC_LINUX == gfortran ) then274 if ( $FC_LINUX == pgf90 || $FC_LINUX == gfortran || $FC_LINUX == gfortran ) then 265 275 set optim=" $OPT_LINUX " 266 276 set optim90=" $OPT_LINUX " … … 490 500 case -cosp 491 501 set cosp="$2"; shift ; shift ; goto top 502 503 case -sisvat 504 set sisvat="$2" ; shift ; shift ; goto top 492 505 493 506 case -filtre … … 519 532 set optim90="$optim90"" -g -ffpe-trap=invalid,zero,overflow -fbounds-check -Wall " 520 533 set optimtru90="$optimtru90"" -ffpe-trap=invalid,zero,overflow -g -fbounds-check -Wall " 521 else if ( $FC_LINUX == 'g 95' ) then534 else if ( $FC_LINUX == 'gfortran' ) then 522 535 set optim="$optim"" -g -fbounds-check -freal=nan -ftrace=full -Wall " 523 536 set optim90="$optim90"" -g -fbounds-check -freal=nan -ftrace=full -Wall " … … 566 579 endif 567 580 581 if ( "$sisvat" == 'true' ) then 582 set cppflags="$cppflags -DCPP_SISVAT" 583 endif 584 568 585 if ( "$physique" == 'nophys' ) then 569 586 set phys="L_PHY= LIBPHY=" … … 581 598 set cppflags="$cppflags -DCPP_VEGET" 582 599 # set link_veget=" -lsechiba -lparameters -lstomate " 583 set link_veget=" -lsechiba -lparameters -lstomate "600 set link_veget=" -lsechiba -lparameters -lstomate -lorchidee" 584 601 if ( $XNEC || $X8BRODIE || $X6NEC) then 585 602 # set link_veget=" -lsxsechiba -lsxparameters -lsxstomate -lsxorglob -lsxparallel" … … 841 858 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -L$NCDFLIB -lnetcdf " 842 859 endif 843 else if ($FC_LINUX == 'g 95' || $FC_LINUX == 'gfortran' ) then860 else if ($FC_LINUX == 'gfortran' || $FC_LINUX == 'gfortran' ) then 844 861 if ( $io == "ioipsl" ) then 845 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdff -lnetcdf -lioipsl -lnetcdff-lnetcdf "862 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf -lioipsl -lnetcdf " 846 863 else 847 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdff-lnetcdf "864 set opt_link="$opt_link -L$MODIPSLDIR $link_veget -lioipsl -L$NCDFLIB -lnetcdf " 848 865 endif 849 866 endif … … 1015 1032 set optimtru90=" $optimtru90 -module $libo " 1016 1033 set optim90=" $optim90 -module $libo " 1017 else if ( $FC_LINUX == 'g95' ) then 1018 set optimtru90=" $optimtru90 - fmod=$libo "1019 set optim90=" $optim90 - fmod=$libo "1020 1034 else if ( $FC_LINUX == 'gfortran' ) then 1035 set optimtru90=" $optimtru90 -I$libo " 1036 set optim90=" $optim90 -I$libo " 1037 else if ( $FC_LINUX == 'gfortran' ) then 1021 1038 set optimtru90=" $optimtru90 -M $libo " 1022 1039 set optim90=" $optim90 -M $libo " -
LMDZ5/branches/LMDZ5-DOFOCO/makelmdz
r1789 r2071 25 25 fcm_path=none 26 26 cosp=false 27 sisvat=false 28 rrtm=false 27 29 28 30 # guess a default 'arch' … … 30 32 ## try to recognise machine and infer arch from it 31 33 machine=`hostname` 32 if [[ "$machine" == "brodie" ]] 33 then 34 arch="SX8_BRODIE" 35 fi 36 if [[ "${machine:0:6}" == "vargas" ]] 37 then 38 arch="PW6_VARGAS" 39 fi 40 if [[ "${machine:0:6}" == "ciclad" ]] 41 then 42 arch="AMD64_CICLAD" 34 if [[ "${machine:0:3}" == "ada" ]] 35 then 36 arch="X64_ADA" 43 37 fi 44 38 if [[ "${machine:0:7}" == "platine" ]] … … 165 159 CPP_KEY="$CPP_KEY $2" ; shift ; shift ;; 166 160 167 "-adjnt")168 echo "not operational ... work to be done here ";exit169 opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "170 optim="$optim -Dadj" ; shift ;;171 172 161 "-cosp") 173 162 cosp="$2" ; shift ; shift ;; 163 164 "-sisvat") 165 sisvat="$2" ; shift ; shift ;; 166 167 "-rrtm") 168 rrtm="$2" ; shift ; shift ;; 174 169 175 170 "-mem") … … 276 271 LIB="$LIB ${archfileopt}" 277 272 273 # add Include files defined in arch.fcm file for pre-processing 274 archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm ) 275 for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done 276 278 277 if [[ "$physique" != "nophys" ]] 279 278 then … … 306 305 FLAG_PARA='' 307 306 else 308 FLAG_PARA=" par"307 FLAG_PARA="$paramem" 309 308 fi 310 309 … … 351 350 fi 352 351 353 if [[ "$veget" == "orchidee2.0" ]] 354 then 355 # orchidee2.0 : 356 # Compile with ORCHIDEE 2.0 (or more recent) 352 353 #============================================================================== 354 if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ] 355 then 356 357 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 357 358 CPP_KEY="$CPP_KEY CPP_VEGET" 358 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 359 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee " 360 elif [[ "$veget" == "orchidee1.9" ]] 361 then 362 # orchidee1.9 : 363 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 364 CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP" 365 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 366 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 367 elif [[ "$veget" == "true" ]] 368 then 369 # true : 370 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 371 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments 372 CPP_KEY="$CPP_KEY CPP_VEGET" 373 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 374 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 375 elif [[ "$veget" != "false" ]] 376 then 359 # temporary, for Orchidee versions 1.9.* (before openmp activation) 360 if [[ "$veget" == "orchidee1.9" ]] ; then 361 CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP" 362 fi 363 if [[ "$veget" == "orchidee2.0" ]] ; then 364 orch_libs="sechiba parameters stomate parallel orglob orchidee" 365 else 366 orch_libs="sechiba parameters stomate parallel orglob" 367 fi 368 LIB="${LIB} -L${ORCH_LIBDIR}" 369 for lib in ${orch_libs} ; do 370 if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then 371 LIB="${LIB} -l${LIBPREFIX}$lib " 372 fi 373 done 374 elif [[ "$veget" != "false" ]] ; then 377 375 echo "Option -v $veget does not exist" 378 376 echo "Use ./makelmdz -h for more information" … … 380 378 fi 381 379 380 #=============================================================================== 382 381 if [[ $io == ioipsl ]] 383 382 then … … 385 384 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" 386 385 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" 386 elif [[ $io == xios ]] 387 then 388 # For now, xios implies also using ioipsl 389 CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" 390 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" 391 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" 387 392 fi 388 393 … … 396 401 INCLUDE="$INCLUDE"' -I$(LIBF)/cosp' 397 402 fi 403 404 if [[ "$sisvat" == "true" ]] 405 then 406 CPP_KEY="$CPP_KEY CPP_SISVAT" 407 fi 408 409 if [[ "$rrtm" == "true" ]] 410 then 411 CPP_KEY="$CPP_KEY CPP_RRTM" 412 fi 413 398 414 399 415 INCLUDE="$INCLUDE ${NETCDF_INCDIR}" … … 453 469 ######################################################################## 454 470 455 dimension=`echo $dim | wc -w` 456 echo dimension $dimension 457 458 if (( $dimension == 3 )) 459 then 460 cd $LIBFGCM/grid 461 \rm fxyprim.h 462 cp -p fxy_${grille}.h fxyprim.h 471 if (( $dimc == 3 )) ; then 472 cd $LIBFGCM/grid 473 \rm fxyprim.h 474 cp -p fxy_${grille}.h fxyprim.h 475 filtre="FILTRE=$filtre" 476 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} -I$(LIBF)/dyn3d_common ' 477 elif (( $dimc == 2 )) ; then 478 filtre="FILTRE= L_FILTRE= " 479 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d' 480 elif (( $dimc == 1 )) ; then 481 CPP_KEY="$CPP_KEY CPP_1D" 482 filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique " 483 INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d -I$(LIBF)/dyn3d_common ' # Pas tres propre 463 484 else 464 echo "Probleme dans les dimensions de la dynamique !!" 465 echo "Non reactive pour l'instant !!!" 466 fi 467 468 ###################################################################### 469 # Gestion du filtre qui n'existe qu'en 3d. 470 ###################################################################### 471 472 if (( `expr $dimc \> 2` == 1 )) 473 then 474 filtre="FILTRE=$filtre" 475 else 476 filtre="FILTRE= L_FILTRE= " 477 fi 478 echo MACRO FILTRE $filtre 479 480 echo $dimc 481 482 ###################################################################### 483 # Creation du suffixe de la configuration 484 ###################################################################### 485 486 487 SUFF_NAME=_${dim_full} 488 SUFF_NAME=${SUFF_NAME}_phy${physique} 489 490 if [[ "$parallel" != "none" ]] 491 then 492 SUFF_NAME=${SUFF_NAME}_para 493 DYN=dyn${dimc}d${paramem} 494 if [[ "$paramem" == "mem" ]] 495 then 496 SUFF_NAME=${SUFF_NAME}_${paramem} 497 fi 498 else 499 SUFF_NAME=${SUFF_NAME}_seq 500 DYN=dyn${dimc}d 501 fi 502 503 if [[ $veget != "false" ]] 504 then 505 SUFF_NAME=${SUFF_NAME}_orch 506 fi 507 508 if [[ $couple != "false" ]] 509 then 510 SUFF_NAME=${SUFF_NAME}_couple 511 fi 512 513 if [[ $chimie == "INCA" ]] 514 then 515 SUFF_NAME=${SUFF_NAME}_inca 516 fi 485 echo Dimension dimc=$dimc pas prevu ; exit 486 fi 487 517 488 518 489 cd $LMDGCM … … 531 502 ######################################################################## 532 503 cd $LMDGCM 504 533 505 find libf -name '*.[Fh]' -print > tmp77 534 506 find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90 535 find libf -name '*. [Fh90]' -print >> tmp90507 find libf -name '*.F90' -print >> tmp90 536 508 537 509 if [[ ! ( -r makefile ) || ! ( -r liste_des_sources_f90 ) || ! ( -r liste_des_sources_f77 ) || ` diff tmp77 liste_des_sources_f77 | wc -w ` -ne 0 || ` diff tmp90 liste_des_sources_f90 | wc -w ` -ne 0 ]] … … 557 529 then 558 530 source_code=${code}.F90 531 elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then 532 source_code=${code}.F90 559 533 fi 560 534 561 535 # library directory name: 562 if [[ "$parallel" == "none" ]] 563 then 564 nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod} 565 else 566 nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_${FLAG_PARA} 567 fi 536 nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'` 537 echo $nomlib 568 538 569 539 if [[ ! -d "${LIBOGCM}/${nomlib}" ]] … … 585 555 INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique" 586 556 fi 587 INCLUDE="$INCLUDE"' -I $(LIBF)/dyn'${dimc}'d'$FLAG_PARA' -I'${LIBOGCM}/${nomlib}557 INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib} 588 558 589 559 # ranlib utility (check it exists or else default to ls) … … 645 615 DIM=$dimc \ 646 616 FLAG_PARA=$FLAG_PARA \ 647 L_ADJNT= "$adjnt"\617 L_ADJNT=$adjnt \ 648 618 L_COSP="$lcosp" \ 649 619 L_CHIMIE="$libchimie" \ … … 660 630 PROG=$code 661 631 632 662 633 if [[ -r $LIBFGCM/grid/dimensions.h ]] 663 634 then -
LMDZ5/branches/LMDZ5-DOFOCO/makelmdz_fcm
r1789 r2071 22 22 couple=false 23 23 veget=false 24 sisvat=false 25 rrtm=false 24 26 chimie=false 25 27 parallel=none … … 29 31 LIBPREFIX="" 30 32 cosp=false 33 job=1 34 full='' 31 35 32 36 LMDGCM=`/bin/pwd` … … 63 67 [-p PHYS] : set of physical parametrizations (in libf/phyPHYS), (default: lmd) 64 68 [-prod / -dev / -debug] : compilation mode production (default) / developement / debug 65 [-c false/MPI1/ MPI2] : coupling with ocean model : MPI1/MPI2/false (default: false)69 [-c false/MPI1/OMCT] : coupling with ocean model : MPI1/OMCT/false (default: false) 66 70 [-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false) 67 71 false : no vegetation model … … 79 83 [-filtre NOMFILTRE] : use filtre from libf/NOMFILTRE (default: filtrez) 80 84 [-link LINKS] : additional links with other libraries 85 [-j n] : active parallel compiling on ntask 86 [-full] : full recompiling 81 87 [-fcm_path path] : path to the fcm tool (default: tools/fcm/bin) 82 88 [-ext_src path] : path to an additional set of routines to compile with the model … … 113 119 veget="$2" ; shift ; shift ;; 114 120 121 "-sisvat") 122 sisvat="$2" ; shift ; shift ;; 123 124 "-rrtm") 125 rrtm="$2" ; shift ; shift ;; 126 115 127 "-chimie") 116 128 chimie="$2" ; shift ; shift ;; … … 147 159 "-ext_src") 148 160 EXT_SRC=$2 ; shift ; shift ;; 161 "-j") 162 job=$2 ; shift ; shift ;; 163 "-full") 164 full="-full" ; shift ;; 149 165 150 166 "-arch") … … 219 235 if [[ "$couple" != "false" ]] 220 236 then 221 CPP_KEY="$CPP_KEY CPP_COUPLE" 222 INCLUDE="$INCLUDE -I${OASIS_INCDIR}" 223 LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.${couple} -lmpp_io" 237 if [[ "$couple" == "MPI1" ]] 238 then 239 CPP_KEY="$CPP_KEY CPP_COUPLE" 240 export OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.MPI1 241 export OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib 242 INCLUDE="$INCLUDE -I${OASIS_INCDIR}" 243 LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lmpp_io" 244 else 245 CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT" 246 INCLUDE="$INCLUDE -I${OASIS_INCDIR}" 247 LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu" 248 fi 224 249 fi 225 250 … … 248 273 fi 249 274 250 if [[ "$veget" == "orchidee2.0" ]] 251 then 252 # orchidee2.0 : 253 # Compile with ORCHIDEE 2.0 (or more recent) 275 if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ] 276 then 277 #NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 278 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments 279 # option orchidee1.9 : Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 280 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 254 281 CPP_KEY="$CPP_KEY CPP_VEGET" 255 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 256 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee " 257 elif [[ "$veget" == "orchidee1.9" ]] 258 then 259 # orchidee1.9 : 260 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6 261 CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP" 262 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 263 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 264 elif [[ "$veget" == "true" ]] 265 then 266 # true : 267 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6 268 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments 269 CPP_KEY="$CPP_KEY CPP_VEGET" 270 INCLUDE="${INCLUDE} -I${ORCH_INCDIR}" 271 LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob" 272 elif [[ "$veget" != "false" ]] 273 then 282 # temporary, for Orchidee versions 1.9.* (before openmp activation) 283 if [[ "$veget" == "orchidee1.9" ]] ; then 284 CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP" 285 fi 286 if [[ "$veget" == "orchidee2.0" ]] ; then 287 orch_libs="sechiba parameters stomate parallel orglob orchidee" 288 else 289 orch_libs="sechiba parameters stomate parallel orglob" 290 fi 291 LIB="${LIB} -L${ORCH_LIBDIR}" 292 for lib in ${orch_libs} ; do 293 if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then 294 LIB="${LIB} -l${LIBPREFIX}$lib " 295 fi 296 done 297 elif [[ "$veget" != "false" ]] ; then 274 298 echo "Option -v $veget does not exist" 275 299 echo "Use ./makelmdz_fcm -h for more information" … … 277 301 fi 278 302 303 if [[ "$sisvat" == "true" ]] 304 then 305 CPP_KEY="$CPP_KEY CPP_SISVAT" 306 sed -e 's/^#src::sisvat/src::sisvat/' bld.cfg > bld.tmp 307 mv bld.tmp bld.cfg 308 fi 309 310 if [[ "$rrtm" == "true" ]] 311 then 312 CPP_KEY="$CPP_KEY CPP_RRTM" 313 sed -e 's/^#src::rrtm/src::rrtm/' bld.cfg > bld.tmp 314 mv bld.tmp bld.cfg 315 fi 316 279 317 if [[ $io == ioipsl ]] 280 318 then … … 282 320 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}" 283 321 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl" 284 fi 322 elif [[ $io == xios ]] 323 then 324 # For now, xios implies also using ioipsl 325 CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS" 326 INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}" 327 LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios" 328 fi 329 285 330 if [[ "$cosp" == "true" ]] 286 331 then … … 468 513 469 514 rm -f $LIBOGCM/${arch}${SUFF_NAME}/.config/fcm.bld.lock 470 ./build_gcm ${fcm_path} 515 ./build_gcm ${fcm_path} -j $job $full 471 516 472 517 rm -rf tmp_src … … 475 520 ln -s $LIBOGCM/${arch}${SUFF_NAME}/.config/tmp tmp_src 476 521 522 #eventual cleanup for SISVAT 523 sed -e 's/^src::sisvat/#src::sisvat/' bld.cfg > bld.tmp 524 mv bld.tmp bld.cfg 525 526 #eventual cleanup for RRTM 527 sed -e 's/^src::rrtm/#src::rrtm/' bld.cfg > bld.tmp 528 mv bld.tmp bld.cfg 529 530 477 531 if [[ -r $LIBFGCM/grid/dimensions.h ]] 478 532 then
Note: See TracChangeset
for help on using the changeset viewer.