Ignore:
Timestamp:
Jun 23, 2014, 10:35:34 AM (11 years ago)
Author:
jghattas
Message:

Updated all compile envrionement with r2064 from the trunk.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/branches/LMDZ5-DOFOCO/makelmdz

    r1789 r2071  
    2525fcm_path=none
    2626cosp=false
     27sisvat=false
     28rrtm=false
    2729
    2830# guess a default 'arch'
     
    3032## try to recognise machine and infer arch from it
    3133machine=`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"
     34if [[ "${machine:0:3}" == "ada" ]]
     35then
     36  arch="X64_ADA"
    4337fi
    4438if [[ "${machine:0:7}" == "platine" ]]
     
    165159          CPP_KEY="$CPP_KEY $2" ; shift ; shift ;;
    166160
    167       "-adjnt")
    168           echo "not operational ... work to be done here ";exit
    169           opt_dep="$opt_dep adjnt" ; adjnt="-ladjnt -ldyn3d "
    170           optim="$optim -Dadj" ; shift ;;
    171 
    172161      "-cosp")
    173162          cosp="$2" ; shift ; shift ;;
     163     
     164      "-sisvat")
     165          sisvat="$2" ; shift ; shift ;;
     166     
     167      "-rrtm")
     168          rrtm="$2" ; shift ; shift ;;
    174169     
    175170      "-mem")
     
    276271LIB="$LIB  ${archfileopt}"
    277272
     273# add Include files defined in arch.fcm file for pre-processing
     274archfileline=$( grep -i '^%FPP_FLAGS' arch.fcm )
     275for inc in $archfileline ; do INCLUDE="$INCLUDE `echo $inc | grep '\-I'`" ; done
     276
    278277if [[ "$physique" != "nophys" ]]
    279278then
     
    306305  FLAG_PARA=''
    307306else
    308   FLAG_PARA="par"
     307  FLAG_PARA="$paramem"
    309308fi
    310309
     
    351350fi
    352351
    353 if [[ "$veget" == "orchidee2.0" ]]
    354 then
    355 # orchidee2.0 :
    356 # Compile with ORCHIDEE 2.0 (or more recent)
     352
     353#==============================================================================
     354if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
     355then
     356
     357   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    357358   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
     374elif [[ "$veget" != "false" ]] ; then
    377375   echo "Option -v $veget does not exist"
    378376   echo "Use ./makelmdz -h for more information"
     
    380378fi
    381379
     380#===============================================================================
    382381if [[ $io == ioipsl ]]
    383382then
     
    385384   INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    386385   LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
     386elif [[ $io == xios ]]
     387then
     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"
    387392fi
    388393
     
    396401   INCLUDE="$INCLUDE"' -I$(LIBF)/cosp'
    397402fi
     403
     404if [[ "$sisvat" == "true" ]]
     405then
     406   CPP_KEY="$CPP_KEY CPP_SISVAT"
     407fi
     408
     409if [[ "$rrtm" == "true" ]]
     410then
     411   CPP_KEY="$CPP_KEY CPP_RRTM"
     412fi
     413
    398414
    399415INCLUDE="$INCLUDE ${NETCDF_INCDIR}"
     
    453469########################################################################
    454470
    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
     471if (( $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 '
     477elif (( $dimc == 2 )) ; then
     478   filtre="FILTRE= L_FILTRE= "
     479   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
     480elif (( $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
    463484else
    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
     486fi
     487
    517488
    518489cd $LMDGCM
     
    531502########################################################################
    532503cd $LMDGCM
     504
    533505find libf -name '*.[Fh]' -print > tmp77
    534506find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
    535 find libf -name '*.[Fh90]' -print >> tmp90
     507find libf -name '*.F90' -print >> tmp90
    536508
    537509if [[ ! ( -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 ]]
     
    557529then
    558530  source_code=${code}.F90
     531elif [[ -r $LMDGCM/libf/phy$physique/${code}.F90 ]] ; then
     532  source_code=${code}.F90
    559533fi
    560534
    561535# 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
     536nomlib=`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'`
     537echo $nomlib
    568538
    569539if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
     
    585555  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
    586556fi
    587 INCLUDE="$INCLUDE"' -I$(LIBF)/dyn'${dimc}'d'$FLAG_PARA' -I'${LIBOGCM}/${nomlib}
     557INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
    588558
    589559# ranlib utility (check it exists or else default to ls)
     
    645615DIM=$dimc \
    646616FLAG_PARA=$FLAG_PARA \
    647 L_ADJNT="$adjnt" \
     617L_ADJNT=$adjnt \
    648618L_COSP="$lcosp" \
    649619L_CHIMIE="$libchimie" \
     
    660630PROG=$code
    661631
     632
    662633if [[ -r $LIBFGCM/grid/dimensions.h ]]
    663634then
Note: See TracChangeset for help on using the changeset viewer.