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 13055 – NEMO

Changeset 13055


Ignore:
Timestamp:
2020-06-07T12:44:20+02:00 (5 years ago)
Author:
rblod
Message:

ticket #2129 : capability to compile tools (domaincfg) with key_agrif

Location:
utils
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • utils/build/mk/agrifpp.sh

    r9573 r13055  
    5555# 
    5656#- 
    57 MYFILE=$(basename "$1") 
     57MYDIR=$1 
     58MYFILE=$(basename "$2") 
    5859if [ "$MYFILE" == "agrif2model.f90" ];then 
    59    \cp ${NEMO_TDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE 
     60   if [ -d ${MYDIR}/${NEW_CONF}/WORK ]; then 
     61      \cp ${MYDIR}/${NEW_CONF}/WORK/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE 
     62   else 
     63      \cp ${MYDIR}/${NEW_CONF}/src/${MYFILE/.f90/.F90} ${MYDIR}/${NEW_CONF}/NEMOFILES/obj/$MYFILE 
     64   fi    
    6065else 
    61 cd ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/conv ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${NEMO_TDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null  
     66cd ${MYDIR}/${NEW_CONF}/NEMOFILES/ppsrc/nemo ; ${MYDIR}/${NEW_CONF}/NEMOFILES/conv ${MYDIR}/${NEW_CONF}/NEMOFILES/agrif_oce.in -rm -incdir ${MYDIR}/${NEW_CONF}/NEMOFILES/inc -comdirout ${MYDIR}/${NEW_CONF}/NEMOFILES/obj -convfile ${MYFILE} > /dev/null  
    6267fi 
  • utils/build/mk/bld_preproagr.cfg

    r9573 r13055  
    2121bld::tool::fc_compile 
    2222bld::tool::fc_include 
    23 bld::tool::fc        $COMPIL_DIR/agrifpp.sh  
     23bld::tool::fc        $COMPIL_DIR/agrifpp.sh ${NEMO_TDIR} 
    2424bld::tool::fflags     
    2525bld::tool::ld        
  • utils/build/mk/bld_tools.cfg

    r12415 r13055  
    1313search_src           1 
    1414 
    15 src::nemo            $TOOLS_DIR/$NEW_CONF/src 
     15src::agrif           $MAIN_DIR/ext/AGRIF/AGRIF_FILES 
     16src::nemo            $TOOLS_DIR/$NEW_CONF/NEMOFILES/obj 
     17 
     18 
     19bld::target  make_domain_cfg.exe 
     20bld::exe_dep 
     21 
    1622 
    1723dir::root            $TOOLS_DIR/$NEW_CONF/BLD 
     24 
    1825 
    1926bld::tool::cpp       %CPP 
     
    2936# Pre-process code before analysing dependencies 
    3037bld::pp::nemo     1 
     38bld::pp::agrif    1 
    3139bld::tool::fppflags::nemo      %FPPFLAGS -I$TOOLS_DIR/$NEW_CONF/NEMOFILES/inc 
     40bld::tool::fppflags::agrif     %FPPFLAGS -include ${MAIN_DIR}/ext/AGRIF/nemo_mpi.h 
     41 
     42 
     43 
    3244 
    3345# Ignore the following dependencies 
     
    4153bld::excl_dep        use::mod_oasis 
    4254 
     55 
     56 
    4357# Don't generate interface files 
    4458bld::tool::geninterface none 
  • utils/tools_dev_r12970_AGRIF_CMEMS/maketools

    r12681 r13055  
    159159. ${COMPIL_DIR}/Fcheck_archfile.sh arch_tools.fcm cpp_tools.fcm ${CMP_NAM} || exit 
    160160 
     161#- At this stage the configuration has beeen chosen 
     162#- We coose the default light file 
     163export USEBLD=bldxag_tools.cfg 
     164 
     165#- We look after agrif 
     166grep key_agrif ${COMPIL_DIR}/cpp_tools.fcm && export AGRIFUSE=1 && export USEBLD=${USEBLD/xag/} 
     167 
     168. ${COMPIL_DIR}/Fprep_agrif.sh ${NEW_CONF} ${TOOLS_DIR} || exit 3 
     169 
     170 
    161171#- 
    162172#_ END OF CONFIGURATION PHASE 
     
    167177 
    168178if [ "${NBR_PRC}" -gt 0 ]; then 
    169 cd ${NEMO_TDIR}/${NEW_CONF} || cd - 
    170  
    171 fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/bld_tools.cfg || cd - 
    172 if [ -n "$(ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe)" ]; then 
    173 for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe` 
    174    do 
    175       ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/. 
    176    done 
    177 fi 
     179cd ${TOOLS_DIR}/${NEW_CONF} || cd - 
     180 
     181   ## if AGRIF we do a first preprocessing 
     182   if [[ ${#x_c} -eq 0 && "$AGRIFUSE" -eq 1 ]]; then 
     183      fcm build --ignore-lock -j 1 ${COMPIL_DIR}/bld_preproagr_tools.cfg ||{ cd - ; exit 1 ;} 
     184      echo '' 
     185      echo "---------------------------------" 
     186      echo "CONV preprocessing successfull !!" 
     187      echo "---------------------------------" 
     188      echo '' 
     189   fi 
     190 
     191   fcm build ${x_c} --ignore-lock -v 1 -j ${NBR_PRC} ${COMPIL_DIR}/${USEBLD} || cd - 
     192   if [ -n "$(ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe)" ]; then 
     193      for i in `ls ${NEMO_TDIR}/${NEW_CONF}/BLD/bin/*.exe` 
     194      do 
     195         ln -sf ${i}  ${TOOLS_DIR}/${NEW_CONF}/. 
     196      done 
     197   fi 
    178198fi 
    179199#- 
Note: See TracChangeset for help on using the changeset viewer.