Changeset 1811 for LMDZ5/trunk


Ignore:
Timestamp:
Jul 24, 2013, 11:42:06 AM (11 years ago)
Author:
Ehouarn Millour
Message:

Small fix in makelmdz to enable linking with orchidee2.0 library. Added same handling of library dependencies in makelmdz_fcm.
EM

Location:
LMDZ5/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/makelmdz

    r1810 r1811  
    363363   fi
    364364   if [[ "$veget" == "orchidee2.0" ]] ; then
    365       listlibs=orchidee
     365      orch_libs=orchidee
    366366   else
    367       listlibs="sechiba parameters stomate parallel orglob"
     367      orch_libs="sechiba parameters stomate parallel orglob"
    368368   fi
    369369   LIB="${LIB} -L${ORCH_LIBDIR}"
    370    for lib in sechiba parameters stomate parallel orglob ; do
     370   for lib in ${orch_libs} ; do
    371371      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
    372372         LIB="${LIB} -l${LIBPREFIX}$lib "
  • LMDZ5/trunk/makelmdz_fcm

    r1802 r1811  
    256256fi
    257257
    258 if [[ "$veget" == "orchidee2.0" ]]
    259 then
    260 # orchidee2.0 :
    261 # Compile with ORCHIDEE 2.0 (or more recent)
     258if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
     259then
     260#NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
     261#    For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
     262#    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
     263   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    262264   CPP_KEY="$CPP_KEY CPP_VEGET"
    263    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    264    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
    265 elif [[ "$veget" == "orchidee1.9" ]]
    266 then
    267 # orchidee1.9 :
    268 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
    269    CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
    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" == "true" ]]
    273 then
    274 # true :
    275 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
    276 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    277    CPP_KEY="$CPP_KEY CPP_VEGET"
    278    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    279    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    280 elif [[ "$veget" != "false" ]]
    281 then
     265# temporary, for Orchidee versions 1.9.* (before openmp activation)
     266   if [[ "$veget" == "orchidee1.9" ]] ; then
     267      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
     268   fi
     269   if [[ "$veget" == "orchidee2.0" ]] ; then
     270      orch_libs=orchidee
     271   else
     272      orch_libs="sechiba parameters stomate parallel orglob"
     273   fi
     274   LIB="${LIB} -L${ORCH_LIBDIR}"
     275   for lib in ${orch_libs} ; do
     276      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
     277         LIB="${LIB} -l${LIBPREFIX}$lib "
     278      fi
     279   done
     280elif [[ "$veget" != "false" ]] ; then
    282281   echo "Option -v $veget does not exist"
    283282   echo "Use ./makelmdz_fcm -h for more information"
Note: See TracChangeset for help on using the changeset viewer.