Ignore:
Timestamp:
Nov 8, 2016, 4:31:57 PM (8 years ago)
Author:
ymipsl
Message:

Update LMDZ5 configuration environnement for ADA

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dynamico_lmdz/aquaplanet/LMDZ5/makelmdz_fcm

    r3832 r3965  
    3535full=''
    3636nodyn=false
     37
     38arch_defined="FALSE"
     39arch_path="arch"
     40arch_default_path="arch"
    3741
    3842LMDGCM=`/bin/pwd`
     
    180184
    181185      "-arch")
    182           arch=$2 ; shift ; shift ;;
    183 
     186          arch=$2 ; arch_defined="TRUE"; shift ; shift ;;
     187
     188      "-arch_path")
     189          arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;;
    184190      *)
    185191          code="$1" ; shift ;;
     
    210216rm -rf .void_dir
    211217mkdir .void_dir
    212 rm -f arch.path
    213 ln -s arch/arch-${arch}.path ./arch.path
    214 source arch.path
     218
     219if [[ "$arch_defined" == "TRUE" ]]
     220then
     221  rm -f arch.path
     222  rm -f arch.fcm
     223  rm -f arch.env
     224
     225  if test -f $arch_path/arch-${arch}.path
     226  then
     227    ln -s $arch_path/arch-${arch}.path arch.path
     228  elif test -f $arch_default_path/arch-${arch}.path
     229  then
     230    ln -s $arch_default_path/arch-${arch}.path arch.path
     231  fi
     232       
     233  if test -f $arch_path/arch-${arch}.fcm
     234  then
     235    ln -s $arch_path/arch-${arch}.fcm arch.fcm
     236  elif test -f $arch_default_path/arch-${arch}.fcm
     237  then
     238    ln -s $arch_default_path/arch-${arch}.fcm arch.fcm
     239  fi
     240
     241  if test -f $arch_path/arch-${arch}.env
     242  then
     243    ln -s $arch_path/arch-${arch}.env arch.env
     244  elif test -f $arch_default_path/arch-${arch}.env
     245  then
     246    ln -s $arch_default_path/arch-${arch}.env arch.env
     247  else
     248    ln -s .void_file arch.env
     249  fi
     250  source arch.env
     251  source arch.path
     252else
     253  echo "Veuillez definir une architecture cible"
     254  exit 1
     255fi
    215256
    216257########################################################################
     
    261302then
    262303   CPP_KEY="$CPP_KEY INCA"
    263    INCLUDE="$INCLUDE -I${INCA_INCDIR}"
    264    LIB="$LIB -L${INCA_LIBDIR} -lchimie"
     304   INCLUDE="$INCLUDE ${INCA_INCDIR}"
     305   LIB="$LIB ${INCA_LIBDIR} ${INCA_LIB}"
    265306fi
    266307
     
    272313        export OASIS_INCDIR=$LMDGCM/../../prism/X64/build/lib/psmile.MPI1
    273314        export OASIS_LIBDIR=$LMDGCM/../../prism/X64/lib
    274         INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
    275         LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lmpp_io"
     315        INCLUDE="$INCLUDE ${OASIS_INCDIR}"
     316        LIB="$LIB ${OASIS_LIBDIR} ${OASIS_LIB}"
    276317    else
    277318        CPP_KEY="$CPP_KEY CPP_COUPLE CPP_OMCT"
    278         INCLUDE="$INCLUDE -I${OASIS_INCDIR}"
    279         LIB="$LIB -L${OASIS_LIBDIR} -lpsmile.MPI1 -lscrip -lmct -lmpeu"
     319        INCLUDE="$INCLUDE ${OASIS_INCDIR}"
     320        LIB="$LIB ${OASIS_LIBDIR} ${OASIS_LIB}"
    280321    fi
    281322fi
     
    310351#    For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    311352#    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
    312    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
     353   INCLUDE="${INCLUDE} ${ORCHIDEE_INCDIR}"
    313354   CPP_KEY="$CPP_KEY CPP_VEGET"
    314355# temporary, for Orchidee versions 1.9.* (before openmp activation)
     
    321362      orch_libs="sechiba parameters stomate parallel orglob"
    322363   fi
    323    LIB="${LIB} -L${ORCH_LIBDIR}"
    324    for lib in ${orch_libs} ; do
    325       if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
    326          LIB="${LIB} -l${LIBPREFIX}$lib "
    327       fi
    328    done
     364   LIB="${LIB} ${ORCHIDEE_LIBDIR} ${ORCHIDEE_LIB}"
    329365elif [[ "$veget" != "false" ]] ; then
    330366   echo "Option -v $veget does not exist"
     
    348384then
    349385   CPP_KEY="$CPP_KEY CPP_IOIPSL"
    350    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR}"
    351    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl"
     386   INCLUDE="$INCLUDE ${IOIPSL_INCDIR}"
     387   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB}"
    352388elif [[ $io == mix ]]
    353389then
    354390   # For now, xios implies also using ioipsl
    355391   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS"
    356    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    357    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
     392   INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}"
     393   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}"
    358394elif [[ $io == xios ]]
    359395then
    360396   # For now, xios implies also using ioipsl
    361397   CPP_KEY="$CPP_KEY CPP_IOIPSL CPP_XIOS CPP_IOIPSL_NO_OUTPUT"
    362    INCLUDE="$INCLUDE -I${IOIPSL_INCDIR} -I${XIOS_INCDIR}"
    363    LIB="$LIB -L${IOIPSL_LIBDIR} -l${LIBPREFIX}ioipsl -L${XIOS_LIBDIR} -l${LIBPREFIX}stdc++ -l${LIBPREFIX}xios"
     398   INCLUDE="$INCLUDE ${IOIPSL_INCDIR} ${XIOS_INCDIR}"
     399   LIB="$LIB ${IOIPSL_LIBDIR} ${IOIPSL_LIB} ${XIOS_LIBDIR} ${XIOS_LIB}"
    364400fi
    365401
Note: See TracChangeset for help on using the changeset viewer.