New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 2815 – NEMO

Changeset 2815


Ignore:
Timestamp:
2011-07-28T19:00:06+02:00 (13 years ago)
Author:
rblod
Message:

branch dev_r2802_LOCEAN10_agrif_lim2: avoid to recompile everything with key_agrif, allow parallel compilation with agrif etc

Location:
branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM
Files:
1 added
13 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/CONFIG/makenemo

    r2731 r2815  
    9090export COMPIL_DIR=${MAIN_DIR}/TOOLS/COMPILE 
    9191export NEMO_DIR=${MAIN_DIR}/NEMO 
    92 export AGRIFUSE=10 
     92export AGRIFUSE="" 
    9393 
    9494declare -a TAB 
     
    269269 
    270270#- We look after agrif 
    271 grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE=1 && export USEBLD=${USEBLD/xag/} 
     271grep key_agrif ${COMPIL_DIR}/cpp.fcm && export AGRIFUSE="WITH_AGRIF" && export USEBLD=${USEBLD/xag/} 
    272272. ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${NEMO_TDIR} || exit 
    273273 
     
    284284if [ "${NBR_PRC}" -gt 0 ]; then 
    285285    cd ${NEMO_TDIR}/${NEW_CONF} || cd - 
    286  
    287 #if AGRIF we do a first preprocessing 
    288     if [ ${#x_c} -eq 0 ]; then 
    289         [ "$AGRIFUSE" == 1 ] && fcm build --ignore-lock -s 2 ${COMPIL_DIR}/$USEBLD 
    290         [ "$AGRIFUSE" == 1 ] && rm -rf  ${NEMO_TDIR}/${NEW_CONF}/BLD/* 
    291     fi 
    292286    fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/$USEBLD || cd - 
    293287    [ -f ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe ] && ln -sf ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/nemo.exe  ${CONFIG_DIR}/${NEW_CONF}/EXP00/opa 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/NST_SRC/agrif2model.F90

    r2528 r2815  
    11#if defined key_agrif 
     2 
    23   !!---------------------------------------------------------------------- 
    34   !! NEMO/NST 3.3 , NEMO Consortium (2010) 
     
    56   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    67   !!---------------------------------------------------------------------- 
    7  
     8!$AGRIF_DO_NOT_TREAT 
    89   SUBROUTINE Agrif_Set_numberofcells(Agrif_Gr) 
    910      !!--------------------------------------------- 
     
    1112      !!---------------------------------------------  
    1213      USE Agrif_Types 
     14      USE nemogcm 
    1315      IMPLICIT NONE 
    1416 
     
    9294 
    9395   END SUBROUTINE Agrif_comm_def 
     96!$AGRIF_END_DO_NOT_TREAT 
    9497#else 
    9598   SUBROUTINE Agrif2Model 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/OPA_SRC/BDY/bdy_oce.F90

    r2715 r2815  
    88   !!            3.3  !  2010-09  (D. Storkey) add ice boundary conditions 
    99   !!---------------------------------------------------------------------- 
     10   USE par_oce         ! ocean parameters 
     11   USE lib_mpp         ! distributed memory computing 
    1012#if defined key_bdy  
    1113   !!---------------------------------------------------------------------- 
    1214   !!   'key_bdy'                      Unstructured Open Boundary Condition 
    1315   !!---------------------------------------------------------------------- 
    14    USE par_oce         ! ocean parameters 
    1516   USE bdy_par         ! Unstructured boundary parameters 
    16    USE lib_mpp         ! distributed memory computing 
    1717 
    1818   IMPLICIT NONE 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90

    r2528 r2815  
    99   !!            3.3  !  2010-09  (D.Storkey and E.O'Dea)  bug fixes 
    1010   !!---------------------------------------------------------------------- 
     11   USE oce             ! ocean dynamics and tracers  
     12   USE dom_oce         ! ocean space and time domain 
     13   USE iom 
     14   USE in_out_manager  ! I/O units 
     15   USE phycst          ! physical constants 
     16   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     17   USE bdy_par         ! Unstructured boundary parameters 
     18   USE bdy_oce         ! ocean open boundary conditions 
     19   USE daymod          ! calendar 
    1120#if defined key_bdy 
    1221   !!---------------------------------------------------------------------- 
     
    2433   !!      vset          :/ 
    2534   !!---------------------------------------------------------------------- 
    26    USE oce             ! ocean dynamics and tracers  
    27    USE dom_oce         ! ocean space and time domain 
    28    USE iom 
    29    USE in_out_manager  ! I/O units 
    30    USE phycst          ! physical constants 
    31    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    32    USE bdy_par         ! Unstructured boundary parameters 
    33    USE bdy_oce         ! ocean open boundary conditions 
    34    USE daymod          ! calendar 
    3535 
    3636   IMPLICIT NONE 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/OPA_SRC/OBS/obs_sla_types.F90

    r2287 r2815  
    1212   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    1313   !!---------------------------------------------------------------------- 
     14   USE par_oce 
    1415 
    1516   IMPLICIT NONE 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/OPA_SRC/OBS/obs_types.F90

    r2358 r2815  
    2727   !!        !  06-10  (A. Weaver) Cleanup 
    2828   !!--------------------------------------------------------------------- 
     29 
     30   USE par_oce  
    2931 
    3032   IMPLICIT NONE 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/NEMO/OPA_SRC/par_oce.F90

    r2715 r2815  
    99   !!---------------------------------------------------------------------- 
    1010   USE par_kind          ! kind parameters 
     11#if defined key_agrif 
     12   USE agrif_util 
     13   USE agrif_types 
     14#endif  
    1115 
    1216   IMPLICIT NONE 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/Fprep_agrif.sh

    r2520 r2815  
    5656 
    5757#- AGRIF conv 
    58 if [ "$AGRIFUSE" == 1 ]; then 
     58if [ "$AGRIFUSE" == "WITH_AGRIF" ]; then 
    5959 
    6060#- CONV 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/agrifpp.sh

    r2520 r2815  
    1010# ========== 
    1111# 
    12 # ---------------------------- 
    13 # Preform AGrif pre-processing 
    14 # ---------------------------- 
     12# --------------------------- 
     13# Preform  CPP pre-processing 
     14# --------------------------- 
    1515# 
    1616# SYNOPSIS 
     
    2626# 
    2727# 
    28 # Look after key agrif, if yes the conv is used, otherwise standard pre-processing is performed. 
     28# Look after key agrif, if yes agrif2model is not yet pre-pocessed, otehrwise we use 
     29# standard cpp. 
    2930# 
    3031# EXAMPLES 
     
    3334# :: 
    3435# 
    35 #  $ ./agrifpp.sh 1 -Dkey 
     36#  $ ./agrifpp.sh -Dkey    
    3637#  
    37 #  or 
    38 # 
    39 #  $ ./agrifpp.sh -Dkey 
    4038# 
    4139# TODO 
     
    5654#- 
    5755 
    58 if [ "$1" == "1" ]; then 
    59    shift 
    60    MYFILE=`echo $* |awk -F" " '{print $NF}' `   
    61    FPP_OPT=` echo $* |awk '{  for (i=1 ; i<NF ; i++ )  { printf " %s",  $i } }'` 
     56MYFILE=`echo $* |awk -F" " '{print $NF}' `   
     57FPP_OPT=` echo $* |awk '{  for (i=1 ; i<NF ; i++ )  { printf " %s",  $i } }'` 
     58AGRIF_ACTIVATED=$( echo  $FPP_OPT | grep key_agrif ) 
    6259 
    63  
    64    if [ "${MYFILE}" != "par_oce.F90" -a  ! -f ${NEMO_TDIR}/${NEW_CONF}}/OPAFILES/param_done ]; then 
    65       cpp ${FPP_OPT} ${CONFIG_DIR}/${NEW_CONF}/WORK/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90 
    66       (cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile par_oce.F90 > /dev/null ) 
    67       cpp ${FPP_OPT}  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_MODELFILES/par_oce.F90 > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/par_oce.F90 
    68       touch ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done 
    69    elif  [ "${MYFILE}" == "par_oce.F90" -a -f ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/param_done ] ; then 
    70       cd  ${NEMO_TDIR}/${NEW_CONF}/OPAFILES 
    71       cpp ${FPP_OPT} -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC ${MYFILE} 
    72       exit 
    73    fi 
    74  
    75    if [ "${MYFILE}" == agrif2model.F90 ]; then 
    76       cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ 
    77       exit 
    78    fi  
    79  
    80    cpp  -I${NEMO_TDIR}/${NEW_CONF}/OPAFILES/AGRIF_INC $@ > ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/${MYFILE} 
    81    ( cd ${NEMO_TDIR}/${NEW_CONF}/OPAFILES ; ${NEMO_TDIR}/${NEW_CONF}/OPAFILES/conv agrif_opa.in -rm -comdirin ./ -comdirout AGRIF_MODELFILES/ -convfile ${MYFILE} > /dev/null ) 
    82    cd  ${NEMO_TDIR}/${NEW_CONF} 
    83    sed 's/[    ]*$//' OPAFILES/AGRIF_MODELFILES/${MYFILE}> OPAFILES/${MYFILE} 
    84    cpp ${FPP_OPT} -IOPAFILES/AGRIF_INC OPAFILES/${MYFILE}  
     60if [ "$MYFILE" == "agrif2model.F90" -a "${#AGRIF_ACTIVATED}" -gt 0 ]; then 
     61   cat  $MYFILE 
    8562else 
    86    shift 
    8763   cpp $@ 
    8864fi 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/bld.cfg

    r2437 r2815  
    2525src::nemo                 $CONFIG_DIR/$NEW_CONF/WORK 
    2626 
    27 #bld::lib::xmlf90           xmlf90 
    28 #bld::lib::xmlio            xmlio 
    29 #bld::lib::ioserver         ioserver 
    30 #bld::lib::ioipsl           ioipsl 
    31 #bld::lib::agrif            agrif 
    32 #bld::lib::nemo             nemo 
    33 #bld::target libxmlf90.a libioserver.a libxmlio.a libioipsl.a libagrif.a libnemo.a server.exe nemo.exe 
    3427bld::target  server.exe nemo.exe 
    3528bld::exe_dep 
     
    3932 
    4033 
    41 bld::tool::fc        %FC  
     34bld::tool::fc        $TOOLS_DIR/COMPILE/agriffc.sh %FC  
    4235bld::tool::fflags    %FCFLAGS %USER_INC 
    43 bld::tool::fflags::agrif   %FFLAGS %USER_INC 
     36bld::tool::fflags::nemo     $AGRIFUSE %FCFLAGS %USER_INC  
     37bld::tool::fflags::agrif    %FFLAGS %USER_INC 
    4438bld::tool::ld        %LD 
    4539bld::tool::ldflags   %LDFLAGS %USER_LIB 
     
    5549bld::pp::agrif    1 
    5650bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    57 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    58 bld::tool::fppflags::xmlio    0 %FPPFLAGS 
    59 bld::tool::fppflags::ioserver 0 %FPPFLAGS 
    60 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
    61 bld::tool::fppflags::agrif    0 %FPPFLAGS 
     51bld::tool::fppflags::nemo     %FPPFLAGS 
     52bld::tool::fppflags::xmlio    %FPPFLAGS 
     53bld::tool::fppflags::ioserver %FPPFLAGS 
     54bld::tool::fppflags::ioipsl    %FPPFLAGS 
     55bld::tool::fppflags::agrif    %FPPFLAGS 
    6256 
    6357# Ignore the following dependencies 
     
    7771bld::excl_dep        use::mod_comprism_proto 
    7872bld::excl_dep        use::mkl_dfti 
     73bld::excl_dep        h::setnumberofcells.h 
     74bld::excl_dep        h::getnumberofcells.h 
     75bld::excl_dep        h::include_use_alloc_agrif.h 
     76bld::excl_dep        h::allocations_calls_agrif.h 
     77bld::excl_dep        h::modtype_agrif.h 
     78bld::excl_dep        h::probdim_agrif.h 
     79bld::excl_dep        h::keys_agrif.h 
     80 
    7981# Don't generate interface files 
    8082bld::tool::geninterface none 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/bldxag.cfg

    r2734 r2815  
    3131 
    3232 
    33 bld::tool::fc        %FC  
     33bld::tool::fc        $TOOLS_DIR/COMPILE/agriffc.sh %FC  
     34bld::tool::fflags::nemo     $AGRIFUSE %FCFLAGS %USER_INC  
    3435bld::tool::fflags    %FCFLAGS %USER_INC 
    3536bld::tool::ld        %LD 
     
    4546bld::pp::nemo     1 
    4647bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    47 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    48 bld::tool::fppflags::xmlio    0 %FPPFLAGS 
    49 bld::tool::fppflags::ioserver 0 %FPPFLAGS 
    50 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
     48bld::tool::fppflags::nemo     %FPPFLAGS 
     49bld::tool::fppflags::xmlio    %FPPFLAGS 
     50bld::tool::fppflags::ioserver %FPPFLAGS 
     51bld::tool::fppflags::ioipsl    %FPPFLAGS 
    5152 
    5253# Ignore the following dependencies 
     
    6667bld::excl_dep        use::mod_comprism_proto 
    6768bld::excl_dep        use::mkl_dfti 
     69bld::excl_dep        h::setnumberofcells.h 
     70bld::excl_dep        h::getnumberofcells.h 
     71bld::excl_dep        h::include_use_alloc_agrif.h 
     72bld::excl_dep        h::allocations_calls_agrif.h 
     73bld::excl_dep        h::modtype_agrif.h 
     74bld::excl_dep        h::probdim_agrif.h 
     75bld::excl_dep        h::keys_agrif.h 
     76 
    6877# Don't generate interface files 
    6978bld::tool::geninterface none 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/bldxio.cfg

    r2437 r2815  
    1111inc $COMPIL_DIR/cpp.fcm 
    1212 
    13 search_src           1 
     13#search_src           1 
    1414 
    1515src::ioipsl               $MAIN_DIR/EXTERNAL/IOIPSL/src 
     
    2424 
    2525 
    26 bld::tool::fc        %FC  
    27 bld::tool::fflags    %FCFLAGS %USER_INC 
    28 bld::tool::fflags::agrif   %FFLAGS %USER_INC 
     26bld::tool::fc    $TOOLS_DIR/COMPILE/agriffc.sh %FC     
     27bld::tool::fflags      %FCFLAGS %USER_INC 
     28bld::tool::fflags::nemo     $AGRIFUSE %FCFLAGS %USER_INC  
     29bld::tool::fflags::agrif    %FFLAGS %USER_INC 
    2930bld::tool::ld        %LD 
    3031bld::tool::ldflags   %LDFLAGS %USER_LIB 
     
    3738bld::pp::nemo     1 
    3839bld::pp::agrif    1 
    39 bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    40 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    41 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
    42 bld::tool::fppflags::agrif    0 %FPPFLAGS 
     40bld::tool::fpp       $TOOLS_DIR/COMPILE/agrifpp.sh 
     41bld::tool::fppflags::nemo  %FPPFLAGS 
     42bld::tool::fppflags::ioipsl    %FPPFLAGS 
     43bld::tool::fppflags::agrif     %FPPFLAGS 
     44 
    4345 
    4446# Ignore the following dependencies 
     
    5860bld::excl_dep        use::mod_comprism_proto 
    5961bld::excl_dep        use::mkl_dfti 
     62bld::excl_dep        h::setnumberofcells.h 
     63bld::excl_dep        h::getnumberofcells.h 
     64bld::excl_dep        h::include_use_alloc_agrif.h 
     65bld::excl_dep        h::allocations_calls_agrif.h 
     66bld::excl_dep        h::modtype_agrif.h 
     67bld::excl_dep        h::probdim_agrif.h 
     68bld::excl_dep        h::keys_agrif.h 
     69 
     70 
    6071# Don't generate interface files 
    6172bld::tool::geninterface none 
  • branches/2011/dev_r2802_LOCEAN10_agrif_lim/NEMOGCM/TOOLS/COMPILE/bldxioxag.cfg

    r2734 r2815  
    2323 
    2424 
    25 bld::tool::fc        %FC  
    26 bld::tool::fflags    %FCFLAGS %USER_INC 
     25bld::tool::fc               $TOOLS_DIR/COMPILE/agriffc.sh %FC     
     26bld::tool::fflags           %FCFLAGS %USER_INC 
     27bld::tool::fflags::nemo     $AGRIFUSE %FCFLAGS %USER_INC  
    2728bld::tool::ld        %LD 
    2829bld::tool::ldflags   %LDFLAGS %USER_LIB 
     
    3536bld::pp::nemo     1 
    3637bld::tool::fpp       $COMPIL_DIR/agrifpp.sh 
    37 bld::tool::fppflags::nemo ${AGRIFUSE} %FPPFLAGS 
    38 bld::tool::fppflags::ioipsl   0 %FPPFLAGS 
     38bld::tool::fppflags::nemo     %FPPFLAGS 
     39bld::tool::fppflags::ioipsl   %FPPFLAGS 
    3940 
    4041# Ignore the following dependencies 
     
    5455bld::excl_dep        use::mod_comprism_proto 
    5556bld::excl_dep        use::mkl_dfti 
     57bld::excl_dep        h::setnumberofcells.h 
     58bld::excl_dep        h::getnumberofcells.h 
     59bld::excl_dep        h::include_use_alloc_agrif.h 
     60bld::excl_dep        h::allocations_calls_agrif.h 
     61bld::excl_dep        h::modtype_agrif.h 
     62bld::excl_dep        h::probdim_agrif.h 
     63bld::excl_dep        h::keys_agrif.h 
     64 
    5665# Don't generate interface files 
    5766bld::tool::geninterface none 
Note: See TracChangeset for help on using the changeset viewer.