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

Changeset 3021


Ignore:
Timestamp:
2011-10-28T12:07:09+02:00 (12 years ago)
Author:
cetlod
Message:

branch dev_LOCEAN_2011:Merge in changes between rev 2757:3020 of branch 2011/dev_r2855_LOCEAN7_SETTE/NEMOGCM/SETTE subdirectory, see ticket #877

Location:
branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE
Files:
7 edited
5 copied

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/README

    r2757 r3021  
    1111               COMPILER    : compiler among those available in NEMOGCM/ARCH, needed for makenemo (see below) 
    1212                             can also be pass as an argument, e.g. ./sette.sh ifort_osx 
     13          BATCH_COMMAND : command for job submission in batch mode 
     14          MPI_INTERACT : "yes" if you want to run in interactive mode for MPI run 
     15                     "no" if you want to run in batch mode for MPI run 
     16               NOTE : every job using only 1 proc is run in interactive mode 
     17 
    1318               makenemo -m : machine (compilator); see ./makenemo -m help (in NEMOGCM/CONFIG directory) 
    1419                        -n : config name (in examples config_name_nproci_nprocj), see ./makenemo -n help 
     
    1722                        del_key : to del list of keys 
    1823               and for more details and options of makenemo see ./makenemo -h 
     24 
    1925          set_namelist : to set namelist values  
    2026         (example : to set 75 time steps for one test : namelist nn_itend 75) 
    2127         (        : to change cn_icerst_in name : namelist_ice cn_icerst_in  \"test_00101231_restart_icemod\") 
    2228         (      : to activate control print : namelist ln_ctl false ) 
    23           copy_original : to namelist of reference configuration in configuration directory in which tests are done 
     29          prepare_exe_dir.sh creates execution directory for each test 
     30                    : NOTE for EACH JOB EXECUTION it is needed to set TEST_NAME variable 
     31                TEST_NAME variable gives name to execution directory (created in prepare_exe_dir.sh) 
     32                IT is mandatory to have different TEST_NAME for each job run if not existing files are re-written (for example namelist) 
     33 
    2434               fcm_job.sh needs input: input_CONFIG_NAME TOTAL_NUMBER_OF_PROCS_used TEST_NAME 
    2535         (for example if you compile ORCA2_LIM with key_mpp_mpi  
    2636         and only run short test ===> ./fcm_job input_ORCA2_LIM.cfg 4 SHORT) 
     37 
    2738 in param.cfg : 
    28                EXE_DIR           : directory in which job s executed (by default CONFIG_DIR) 
    2939               FORCING_DIR       : directory in which will be found input.tar file (same name in input_CONFIG_NAME.cfg) 
    30                INPUT_DIR         : directory in which store input files 
     40               INPUT_DIR         : directory in which store input files (tar file) 
    3141               TMPDIR            : temporary directory NEEDED ONLY FOR IBM machines (put EXP00 directory) 
    32                OUTPUT_DIR        : directory in which store output files 
    33           NEMO_VALIDATION_DIR : directory in which create NEMO_VALIDATION tree, and store restart, solver.stat and ocean.output files in 
     42          NEMO_VALIDATION_DIR : directory in which create NEMO_VALIDATION tree, and store restart, solver.stat, tracer.stat and ocean.output files in 
    3443                            tree NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
    3544 in fcm_job.sh : 
    3645               IMPORTANT : control that name of tar file in FORCING directory 
    3746               is the same of that in input_REF_CONFIG.cfg, if not change one. 
    38                change in "RUN OPA" part the command line (some examples are already written) 
    39           TEST_NAME by convention is LONG: 10 days run or SHORT: 5 days run 
    40           so NEMO_VALIDATION tree is coherent, 
    41           but user can choise a TEST_NAME that represent his own test. 
     47 
     48               change in "RUN OPA" if [ ${MPI_INTERACT} == "yes" ] mpirun command line (some examples are already written) 
     49          NOTE: if MPI_INTERACT="no" it is neede a batch_file (see below to create a new one) 
    4250 
    4351NOTE: 
     
    62701. add arch-compiler.fcm in NEMOGCM/ARCH directory 
    63712. makenemo -m new_compiler  (see makenemo -h for help) 
     72 
     73TO ADD NEW BATCH-FILE: 
     741. see in SETTE/BATCH_TEMPLATE directory existing examples 
     752. create you own batch file like: batch-${COMPILER} 
     76(note: sette.sh will copy it in job_batch_template if you run tests in MPI_INTERACT="no") 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/all_functions.sh

    r2756 r3021  
    3131# 
    3232#  $ ./set_namelist INPUT_NAMELIST VARIABLE VALUE  
    33 #  $ ./copy_original INPUT_NAMELIST  
     33#  $ post_test_tidyup  
    3434# 
    3535# 
     
    3939# function superegrep 
    4040#   input variable value 
    41 # 
    42 # function copy_original 
    43 #   input namelist_name 
    44 #   output namelist  
    4541# 
    4642# function set_namelist 
     
    4844#   output namelist 
    4945# 
     46# function post_test_tidyup 
     47#   creates nemo_validation tree, and save output & debug files 
     48#   this function creates tree of validation in NEMO_VALIDATION_DIR as follows :  
     49# 
     50# NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/REVISION_NUMBER(or DATE)/TEST_NAME 
     51#  
     52# NEMO_VALIDATION_DIR           : is choosen in param.cfg 
     53# 
     54# WCONFIG_NAME                  : set by makenemo at the moment of compilation 
     55# 
     56# WCOMPILER_NAME                : set by makenemo at the moment of compilation 
     57# 
     58# REVISION_NUMBER(or DATE)      : revision number by svn info, if problems with svn date is taken 
     59# 
     60# TEST_NAME                     : set in sette.sh for each configuration to be tested (directory TEST_NAME is created under ${NEW_CONF} directory ) 
     61# 
    5062# EXAMPLES 
    5163# ======== 
     
    5365# :: 
    5466# 
    55 #  $ ./copy_original namelist_pisces          
    5667#  $ ./set_namelist namelist          nn_itend        75 
    5768#  $ ./set_namelist namelist_ice_lim2 cn_icerst_in  \"00101231_restart_ice\" 
     69#  $ post_test_tidyup  
    5870# 
    5971# 
     
    7183#   * creation 
    7284#- 
    73 # 
    74  
    75  
    76 # function to copy original namelists in ORIGINAL_namelist directory in ${INPUT_DIR} directory 
    77 # to allow re-run same tests in same directory and start with all correct values of namelist 
    78 copy_original () { 
    79         `mkdir -p ${INPUT_DIR}/ORIGINAL_namelist` 
    80    if [ -d ${INPUT_DIR}/ORIGINAL_namelist ] ; then 
    81            echo "created ${INPUT_DIR}/ORIGINAL_namelist directory in ${INPUT_DIR}"   >> ${SETTE_DIR}/output.sette 
    82    else 
    83            echo "problems in creating ${INPUT_DIR}/ORIGINAL_namelist directory"   >> ${SETTE_DIR}/output.sette 
    84            echo "EXIT," 
    85            exit 1 
    86    fi 
    87         `cp ${CONFIG_DIR}/${REF_CONF}/EXP00/$1 ${INPUT_DIR}/ORIGINAL_namelist/$1.ori` 
    88    if [ -n "$(ls ${INPUT_DIR}/ORIGINAL_namelist/$1.ori)" ] ; then 
    89       echo "copied namelist of reference configuration in ${INPUT_DIR}/ORIGINAL_namelist/$1.ori " >> ${SETTE_DIR}/output.sette 
    90    else 
    91       echo "problem in copying namelist of reference configuration in ${INPUT_DIR}/ORIGINAL_namelist/$1.ori " >> ${SETTE_DIR}/output.sette 
    92            echo "EXIT," 
    93            exit 1 
    94    fi 
    95         `cp ${INPUT_DIR}/ORIGINAL_namelist/$1.ori ${INPUT_DIR}/$1` 
    96    if [ -n "$(ls ${INPUT_DIR}/$1)" ] ; then 
    97       echo "copied original namelist in ${INPUT_DIR} directory " >> ${SETTE_DIR}/output.sette 
    98    else 
    99            echo "problem in copying  original namelist in ${INPUT_DIR} directory"  >> ${SETTE_DIR}/output.sette 
    100            echo "EXIT," 
    101            exit 1 
    102    fi 
    103 } 
    104  
    10585# function to find namelists parameters 
    10686supergrep () { 
     
    128108        echo "################" >> ${SETTE_DIR}/output.sette 
    129109       
    130    VAR_NAME=$( supergrep $2 ${INPUT_DIR}/$1 ) 
     110   VAR_NAME=$( supergrep $2 ${EXE_DIR}/$1 ) 
    131111   if [ ${#VAR_NAME} -eq 0 ]  
    132112   then 
    133113      echo "doing \"set_namelist $@\". " 
    134114      echo "variable: \"$2\" is empty" 
    135       echo "control that variable $2 is in \"${INPUT_DIR}/$1\" " 
     115      echo "control that variable $2 is in \"${EXE_DIR}/$1\" " 
    136116      echo "exit" 
    137117      echo "error in executing script : set_namelist $@" >> ${SETTE_DIR}/output.sette 
     
    139119      exit 1 
    140120   fi 
    141         sed -e "s/${VAR_NAME}.*/${VAR_NAME}/" ${INPUT_DIR}/$1 > ${INPUT_DIR}/$1.tmp 
    142         mv ${INPUT_DIR}/$1.tmp ${INPUT_DIR}/$1 
    143         sed -e "s/${VAR_NAME}/$2=$3/"  ${INPUT_DIR}/$1 > ${INPUT_DIR}/$1.tmp 
    144         mv ${INPUT_DIR}/$1.tmp ${INPUT_DIR}/$1 
     121        sed -e "s/${VAR_NAME}.*/${VAR_NAME}/" ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     122        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
     123        sed -e "s/${VAR_NAME}/$2=$3/"  ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp 
     124        mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
    145125 
    146126        echo "finished script : set_namelist $@" >> ${SETTE_DIR}/output.sette 
     
    148128        echo "                " >> ${SETTE_DIR}/output.sette 
    149129} 
     130 
     131# function to tidy up after each test and populate the NEMO_VALIDATION store 
     132post_test_tidyup () { 
     133# 
     134# requires the following variables defined and exported from the calling script: 
     135#  SETTE_DIR 
     136#  INPUT_DIR 
     137#  EXE_DIR 
     138#  CONFIG_DIR 
     139#  NEMO_VALIDATION_DIR 
     140#  NEW_CONF 
     141#  CMP_NAM 
     142#  TEST_NAME 
     143echo "SETTE directory is : ${SETTE_DIR}" 
     144echo "INPUT directory is : ${INPUT_DIR}" 
     145echo "EXECUTION directory is : ${EXE_DIR}" 
     146echo "CONFIG directory is : ${CONFIG_DIR}" 
     147echo "VALIDATION directory is : ${NEMO_VALIDATION_DIR}" 
     148echo "NEW CONFIGURATION is : ${NEW_CONF}" 
     149echo "COMPILER is : ${CMP_NAM}" 
     150echo "TEST is : ${TEST_NAME}" 
     151################################################################ 
     152# SMALL DEBUG 
     153    if [ ! -r ${EXE_DIR}/time.step ] 
     154        then 
     155        echo "file time.step does not exist"   >> ${SETTE_DIR}/output.sette 
     156        echo "some problems during execution of model"  >> ${SETTE_DIR}/output.sette  
     157        exit 1 
     158    else 
     159        echo "file time.step exists"  >> ${SETTE_DIR}/output.sette 
     160        echo "ok model run"   >> ${SETTE_DIR}/output.sette 
     161    fi 
     162################################################################ 
     163 
     164################################################################ 
     165# Creation of NEMO_VALIDATION tree 
     166    export LANG=en_US  
     167    cd ${CONFIG_DIR} 
     168    cd ../ 
     169    REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2` 
     170    if [ ${#REVISION_NB} -eq 0 ] 
     171    then 
     172      echo "some problems with svn info command" 
     173      echo "some problems with svn info command" >> ${SETTE_DIR}/output.sette 
     174      REVISION_NB=`date +%Y%m%d` 
     175      echo "put in ${REVISION_NB} date" 
     176      echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette 
     177    else 
     178    echo "value of revision number of NEMOGCM: ${REVISION_NB}" 
     179    fi 
     180    cd ${NEMO_VALIDATION_DIR} 
     181    `mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}` 
     182    NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME} 
     183    if [ -d ${NEMO_VALID} ] ; then 
     184   echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     185    else  
     186   echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
     187   echo "EXIT," 
     188   exit 1 
     189    fi 
     190    # Save output & debug files in NEMO_VALIDATION tree 
     191    echo "saving ocean & ice output, solver.stat, tracer.stat files ...." >> ${SETTE_DIR}/output.sette 
     192    echo "            " >> ${SETTE_DIR}/output.sette 
     193    [ -f ${EXE_DIR}/*ocean.output ] && cp ${EXE_DIR}/*ocean.output ${NEMO_VALID}/. 
     194    [ -f ${EXE_DIR}/*solver.stat ] && cp ${EXE_DIR}/*solver.stat ${NEMO_VALID}/. 
     195    [ -f ${EXE_DIR}/*tracer.stat ] && cp ${EXE_DIR}/*tracer.stat ${NEMO_VALID}/. 
     196    if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then 
     197   echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     198   echo "moved solver.stat in ${NEMO_VALID} directory"   
     199    else 
     200   echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     201   echo "solver.stat IS NOT in ${NEMO_VALID} directory"  
     202    fi 
     203    if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then 
     204   echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     205   echo "moved ocean.output in ${NEMO_VALID} directory"  
     206    else 
     207   echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     208   echo "ocean.output IS NOT in ${NEMO_VALID} directory"  
     209    fi 
     210    if [ -n "$(ls ${NEMO_VALID}/*tracer.stat*)" ] ; then 
     211        echo "moved tracer.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     212        echo "moved tracer.stat in ${NEMO_VALID} directory" 
     213    else 
     214        echo "problem in looking for tracer.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
     215        echo "tracer.stat IS NOT in ${NEMO_VALID} directory" 
     216    fi 
     217} 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/fcm_job.sh

    r2687 r3021  
    3131# =========== 
    3232# 
    33 # 
    3433# Simple job for SET TESTS for NEMO (SETTE) 
    35 # 
    36 # this job creates tree of validation in NEMO_VALIDATION_DIR as follows :  
    37 # 
    38 # NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
    3934#  
    40 # NEMO_VALIDATION_DIR      : is choosen in param.cfg 
    41 # 
    42 # WCONFIG_NAME       : set by makenemo at the moment of compilation 
    43 # 
    44 # WCOMPILER_NAME     : set by makenemo at the moment of compilation 
    45 # 
    46 # TEST_NAME       : convention is LONG=10 days run, SHORT=5 days run 
    47 # 
    48 # REVISION_NUMBER(or DATE) : revision number by svn info, if problems with svn date is taken 
     35#   get input files (if needed) : tar file   
     36#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name) 
     37# 
     38#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
     39# 
     40#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
     41# 
     42#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output) 
    4943# 
    5044# EXAMPLES 
     
    5549#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME 
    5650# 
    57 #  run a job of config GYRE with 1 processor test REPRODUCTINILITY 
     51#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) 
    5852#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT 
    5953# 
     
    8175 
    8276usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME" 
    83 usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 RUN" 
     77usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT" 
    8478 
    8579 
     
    9791   fi 
    9892        
     93# 
     94# set and export TEST_NAME. It will be used within the post_test_tidyup function 
     95# 
     96export TEST_NAME=$3 
     97 
     98# export EXE_DIR. This directory is used to execute model  
     99# 
     100export EXE_DIR 
     101# 
     102# 
    99103echo "date: `date`" >> ${SETTE_DIR}/output.sette 
    100104echo "" >> ${SETTE_DIR}/output.sette 
     
    117121   echo "            " >> ${SETTE_DIR}/output.sette 
    118122   cp ${FORCING_DIR}/${tar_file} ${INPUT_DIR}/. 
     123   echo "file in ${INPUT_DIR}" 
    119124   if [ ! -f ${INPUT_DIR}/${tar_file} ] ; then  
    120125      echo "PROBLEM during copy of tar file" >> ${SETTE_DIR}/output.sette 
     
    124129      exit 1 
    125130   else   
    126       cd ${INPUT_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz 
     131      cd ${EXE_DIR} ; tar xvof ${INPUT_DIR}/*.tar ; gunzip -f *gz 
    127132   fi 
    128133fi  
    129134 
    130 if [ -f ${INPUT_DIR}/namelist_ice_lim2 ] ; then  
     135if [ ! -f ${EXE_DIR}/namelist_ice ] ; then  
     136if [ -f ${EXE_DIR}/namelist_ice_lim2 ] ; then  
    131137   echo "choosing for namelist ice " >> ${SETTE_DIR}/output.sette 
    132138   echo "            " >> ${SETTE_DIR}/output.sette 
    133    cp ${INPUT_DIR}/namelist_ice_lim2 ${INPUT_DIR}/namelist_ice 
    134 elif  [ -f ${INPUT_DIR}/namelist_ice_lim3 ] ; then  
    135    cp ${INPUT_DIR}/namelist_ice_lim3 ${INPUT_DIR}/namelist_ice 
     139   cp ${EXE_DIR}/namelist_ice_lim2 ${EXE_DIR}/namelist_ice 
     140elif  [ -f ${EXE_DIR}/namelist_ice_lim3 ] ; then  
     141   cp ${EXE_DIR}/namelist_ice_lim3 ${EXE_DIR}/namelist_ice 
     142fi 
    136143fi 
    137144 
     
    141148      echo "choosing for namelist for AGRIF" >> ${SETTE_DIR}/output.sette 
    142149      echo "            " >> ${SETTE_DIR}/output.sette 
    143    cp ${INPUT_DIR}/1_namelist_ice_lim2 ${INPUT_DIR}/1_namelist_ice  
     150   cp ${EXE_DIR}/1_namelist_ice_lim2 ${EXE_DIR}/1_namelist_ice  
    144151fi 
    145152################################################################ 
     
    147154################################################################ 
    148155# RUN OPA 
    149 cd ${INPUT_DIR} 
     156cd ${EXE_DIR} 
    150157NB_PROC=$2 
    151 if [ ! -r ${INPUT_DIR}/opa ] 
     158if [ ! -r ${EXE_DIR}/opa ] 
    152159    then 
    153160    echo "executable opa does not exist" 
     
    159166    echo "            " >> ${SETTE_DIR}/output.sette 
    160167    ./opa 
     168# 
     169# Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree 
     170# 
     171    post_test_tidyup 
    161172else 
    162173    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette 
    163174    echo "            " >> ${SETTE_DIR}/output.sette 
    164 # example for brodie (NEC SX8) machine 
    165 #  mpirun -np ${NB_PROC} opa 
    166 # example for dedale machine 
    167 #  mpirun --mca btl self,tcp -np ${NB_PROC} opa 
    168 # example for vargas (IBM Power6) machine 
    169     mpiexec -n ${NB_PROC} opa 
    170 fi 
    171 ################################################################ 
    172 # SMALL DEBUG 
    173 # echo "control that time.step exists 
    174 if [ ! -r ${INPUT_DIR}/time.step ] 
    175     then 
    176     echo "file time.step does not exist"   >> ${SETTE_DIR}/output.sette 
    177     echo "some problems during execution of model"  >> ${SETTE_DIR}/output.sette  
    178     exit 1 
    179 else 
    180     echo "file time.step exists"  >> ${SETTE_DIR}/output.sette 
    181     echo "ok model run"   >> ${SETTE_DIR}/output.sette 
    182 fi 
    183 ################################################################ 
    184  
    185 ################################################################ 
    186 # SAVE OUTPUT, DEBUG & RESTART FILES 
    187 echo "saving ocean & ice output, debug & restart files" >> ${SETTE_DIR}/output.sette 
    188 echo "            " >> ${SETTE_DIR}/output.sette 
    189 [ ! -d ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR} 
    190 [ -f *ocean.output ] && mv *ocean.output ${OUTPUT_DIR}/. 
    191 [ -f *solver.stat ] && mv *solver.stat ${OUTPUT_DIR}/. 
    192 [ -n "$(ls *_grid_*)" ] && mv *_grid_*.nc ${OUTPUT_DIR}/. 
    193 [ -n "$(ls *_ptrc_*)" ] && mv *_ptrc_*.nc ${OUTPUT_DIR}/. 
    194 [ -n "$(ls *_diad_*)" ] && mv *_diad_*.nc ${OUTPUT_DIR}/. 
    195 [ -n "`ls *restart*`" ] && cp *restart*.nc ${OUTPUT_DIR}/. 
    196 [ -f ice_evolu ] && mv ice_evolu ${OUTPUT_DIR}/. 
    197 [ -n "`ls *icemod*`" ] && mv *icemod* ${OUTPUT_DIR}/. 
    198 #- Save ftrace file 
    199 [ -f ftrace.out* ] && cp ftrace.out* ${OUTPUT_DIR}/. 
    200 ################################################################ 
    201  
    202 ################################################################ 
    203 # SAVE IN NEMO_VALIDATION tree 
    204 export LANG=en_US  
    205 cd ${CONFIG_DIR} 
    206 cd ../ 
    207 REVISION_NB=`svn info | grep -i "Revision:" | sed -e "s/ //" | cut -d ":" -f 2` 
    208 if [ ${#REVISION_NB} -eq 0 ] 
    209 then 
    210    echo "some problems with svn info command" 
    211    echo "some problems with svn info command" >> ${SETTE_DIR}/output.sette 
    212    REVISION_NB=`date +%Y%m%d` 
    213    echo "put in ${REVISION_NB} date" 
    214    echo "put in ${REVISION_NB} date" >> ${SETTE_DIR}/output.sette 
    215 else 
    216 echo "value of revision number of NEMOGCM: ${REVISION_NB}" 
    217 fi 
    218 cd ${NEMO_VALIDATION_DIR} 
    219 export TEST_NAME=$3 
    220 `mkdir -p ${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME}` 
    221 NEMO_VALID=${NEMO_VALIDATION_DIR}/W${NEW_CONF}/${CMP_NAM}/${REVISION_NB}/${TEST_NAME} 
    222 if [ -d ${NEMO_VALID} ] ; then 
    223    echo "created ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
    224 else  
    225    echo "problems in creating ${NEMO_VALID} directory"   >> ${SETTE_DIR}/output.sette 
    226    echo "EXIT," 
    227    exit 1 
    228 fi 
    229 [ -f ${OUTPUT_DIR}/*ocean.output ] && mv ${OUTPUT_DIR}/*ocean.output ${NEMO_VALID}/. 
    230 [ -f ${OUTPUT_DIR}/*solver.stat ] && mv ${OUTPUT_DIR}/*solver.stat ${NEMO_VALID}/. 
    231 [ -n "`ls ${OUTPUT_DIR}/*restart*`" ] && mv ${OUTPUT_DIR}/*restart* ${NEMO_VALID}/. 
    232 [ -f ${OUTPUT_DIR}/ice_evolu ] && mv ${OUTPUT_DIR}/ice_evolu ${NEMO_VALID}/. 
    233 if [ -n "$(ls ${NEMO_VALID}/*solver*)" ] ; then 
    234    echo "moved solver.stat in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    235    echo "moved solver.stat in ${NEMO_VALID} directory"   
    236 else 
    237    echo "problem in looking for solver.stat file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    238    echo "solver.stat IS NOT in ${NEMO_VALID} directory"  
    239 fi 
    240 if [ -n "$(ls ${NEMO_VALID}/*ocean.output*)" ] ; then 
    241    echo "moved ocean.output in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    242    echo "moved ocean.output in ${NEMO_VALID} directory"  
    243 else 
    244    echo "problem in looking for ocean.output file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    245    echo "ocean.output IS NOT in ${NEMO_VALID} directory"  
    246 fi 
    247 if [ -n "`ls ${NEMO_VALID}/*restart*`" ] ; then 
    248    echo "moved restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    249    echo "moved restart files in ${NEMO_VALID} directory"  
    250 else 
    251    echo "problem in looking for restart files in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    252    echo "restart files ARE NOT in ${NEMO_VALID} directory"  
    253 fi 
    254 if [ -n "$(ls ${NEMO_VALID}/ice_evolu)" ] ; then 
    255         echo "moved ice_evolu in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    256         echo "moved ice_evolu in ${NEMO_VALID} directory" 
    257 else 
    258         echo "problem looking for ice_evolu file in ${NEMO_VALID} directory"  >> ${SETTE_DIR}/output.sette 
    259         echo "ice_evolu IS NOT in ${NEMO_VALID} directory" 
    260 fi 
    261 ################################################################ 
     175 
     176    if [ ${MPI_INTERACT} == "yes" ] ; then 
     177   # 
     178   # example for brodie (NEC SX8) machine 
     179   #  mpirun -np ${NB_PROC} opa 
     180   # example for dedale machine 
     181   #  mpirun --mca btl self,tcp -np ${NB_PROC} opa 
     182   # example for vargas (IBM Power6) machine 
     183   mpiexec -n ${NB_PROC} opa 
     184   # 
     185   post_test_tidyup 
     186    fi 
     187# 
     188# example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file) 
     189# 
     190    if [ ${MPI_INTERACT} == "no" ] ; then 
     191      case ${COMPILER} in  
     192         ALTIX_NAUTILUS_MPT) 
     193               if [ ${NB_REM} == 0 ] ; then 
     194               # number of processes required is an integer multiple of 4 
     195               # 
     196               NB_NODES=$( echo $NB_PROC | awk '{print $1 / 4}') 
     197            else 
     198               # 
     199               # number of processes required is not an integer multiple of 4 
     200               # round up the number of nodes required. 
     201               # 
     202               NB_NODES=$( echo $NB_PROC | awk '{printf("%d",$1 / 4 + 1 )}') 
     203                  fi 
     204            ;; 
     205         *) 
     206            NB_NODES=${NB_PROC} 
     207            ;; 
     208 
     209      esac 
     210# 
     211# Pass settings into job file by using sed to edit predefined strings 
     212# 
     213        cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \ 
     214             -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \ 
     215             -e"s:DEF_EXE_DIR:${EXE_DIR}:" \ 
     216             -e"s:DEF_CONFIG_DIR:${CONFIG_DIR}:" \ 
     217             -e"s:DEF_NEMO_VALIDATION:${NEMO_VALIDATION_DIR}:" -e"s:DEF_NEW_CONF:${NEW_CONF}:" \ 
     218             -e"s:DEF_CMP_NAM:${CMP_NAM}:" -e"s:DEF_TEST_NAME:${TEST_NAME}:" > run_sette_test.job 
     219# 
     220# submit job to batch system  
     221   ${BATCH_COMMAND} run_sette_test.job  
     222    fi 
     223 
     224fi 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/param.cfg

    r2675 r3021  
    1 #- execution directory  
    2 EXE_DIR=${CONFIG_DIR}      
    31#- forcing files storing  
    42FORCING_DIR=~/FORCING 
     
    64INPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    75#- only for IBM 
    8 # TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    9 #- output files storing  
    10 OUTPUT_DIR=${CONFIG_DIR}/${NEW_CONF}/EXP00/OUTPUT 
     6#TMPDIR=${CONFIG_DIR}/${NEW_CONF}/EXP00 
    117#- VALIDATION files storing  
    128NEMO_VALIDATION_DIR=~/NEMO_VALIDATION 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/sette.sh

    r2756 r3021  
    3535# =========== 
    3636# 
    37 # principal script is sette.sh, that calls  
     37# Variables to be checked by user: 
     38# 
     39# COMPILER : name of compiler as defined in NEMOGCM/ARCH directory  
     40# 
     41# BATCH_COMMAND :  name of the command for batch submission 
     42# 
     43# MPI_INTERACT :   
     44# 
     45#         for MPP tests, "no" for batch execution, "yes" for interactive execution  
     46# 
     47#         NOTE: for run with 1 process tests are run always in MPI_INTERACT="yes" 
     48# 
     49# Principal script is sette.sh, that calls  
    3850# 
    3951#  makenemo  
    4052# 
    41 #   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  
    42 # 
    43 #   (and its link opa in ${CONFIG_NAME}/EXP00) 
    44 # 
    45 #   param.cfg : sets and loads following directories 
    46 # 
    47 #   Executing directory (EXE_DIR) 
    48 # 
    49  
    50 # 
    51 #   Input files storing (INPUT_DIR) 
    52 # 
    53 #   Temporary directory (if needed) (TMPDIR) 
     53#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00) 
     54# 
     55#  param.cfg : sets and loads following directories: 
     56# 
     57#   FORCING_DIR : is the directory for forcing files (tarfile) 
     58# 
     59#   INPUT_DIR : is the directory for input files storing  
     60# 
     61#   TMPDIR : is the temporary directory (if needed) 
    5462#  
    55 #   Validation directory (NEMO_VALIDATION_DIR) 
    56 # 
    57 #   (note: this file is the same for all configrations to be tested with sette) 
     63#   NEMO_VALIDATION_DIR : is the validation directory 
     64# 
     65#   (NOTE: this file is the same for all configrations to be tested with sette) 
     66# 
    5867# 
    5968#  all_functions.sh : loads functions used by sette (note: new functions can be added here) 
    6069# 
    61 #  set_namelist : function declared in all_functions that set namelist parameters for tests 
     70#   set_namelist : function declared in all_functions that set namelist parameters for tests 
     71# 
     72#   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test. 
     73# 
     74#   Tree of VALIDATION is: 
     75# 
     76#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
     77# 
     78# 
     79#  prepare_exe_dir.sh : defines and creates directory where the test is executed 
     80# 
     81#       execution directory takes name of TEST_NAME defined in every test in sette.sh 
     82# 
     83#       ( each test in executed in its own directory ) 
     84# 
    6285# 
    6386#  fcm_job.sh  
    6487# 
    65 #   runs job and saves output files (grid_files, restarts, ice_evolu, ftrace.out) 
    66 # 
    67 #   and it creates tree of VALIDATION, in which there are restart files, solver.stat and ocean.output 
    68 # 
    69 #   Tree of VALIDATION is: 
    70 # 
    71 #   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE) 
     88#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are 
     89# 
     90#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory 
     91# 
     92#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file) 
    7293#  
    73  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file) 
    74 # 
    75  (note other files can be saved adding at the end of fcm_job list of saved files) 
     94NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory 
     95# 
     96NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00 
    7697#  
    77 #  NOTE: if job is not launched for some problems you have executable ready in ${CONFIG_NAME}/EXP00 directory 
    78 # 
    79 #  NOTE: the changed namelists are leaved in ${CONFIG_NAME}/EXP00 directory 
    80 #  
    81 #  in ${SETTE_DIR} is created output.sette with the echo of commands run 
     98#  in ${SETTE_DIR} is created output.sette with the echo of executed commands 
    8299# 
    83100#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh 
     
    112129#- 
    113130# Compiler among those in NEMOGCM/ARCH 
    114 COMPILER=PW6_VARGAS 
     131COMPILER=X64_TITANE 
     132export BATCH_COMMAND=ccc_msub 
     133export MPI_INTERACT="no" 
    115134 
    116135# Directory to run the tests 
     
    122141 
    123142CMP_NAM=${1:-$COMPILER} 
    124 ## NBTEST=8 
    125 ## echo "TOTAL NUMBER OF TEST" ${NBTEST} 
    126 ## for (( config=2; config<=${NBTEST}; config++ )) 
    127  
    128 for config in 1 2 3 4 5 6 7 8 
     143# Copy job_batch_COMPILER file for specific compiler into job_batch_template 
     144cd ${SETTE_DIR} 
     145cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
     146 
     147for config in 1 2 3 4 5 6 7 8 9 10 
    129148do 
    130149 
    131150if [ ${config} -eq 1 ] ;  then 
    132151    # Restartability tests for GYRE_LOBSTER 
    133     cd ${SETTE_DIR} 
    134     . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER del_key "key_diatrc" 
    135     cd ${SETTE_DIR} 
    136     . param.cfg 
    137     . all_functions.sh 
    138     copy_original namelist  
    139     copy_original namelist_top 
     152    export TEST_NAME="LONG" 
     153    cd ${SETTE_DIR} 
     154    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER  -j 8 
     155    cd ${SETTE_DIR} 
     156    . param.cfg 
     157    . all_functions.sh 
     158    . prepare_exe_dir.sh 
     159    cd ${EXE_DIR} 
    140160    set_namelist namelist cn_exp \"GYRELOB_LONG\" 
    141161    set_namelist namelist nn_it000 1 
     
    143163    set_namelist namelist nn_stock 60 
    144164    set_namelist namelist ln_clobber .true. 
    145     set_namelist namelist_top ln_trcrad .false. 
    146     cd ${SETTE_DIR} 
    147     . ./fcm_job.sh input_GYRE.cfg 1 LONG 
    148      
    149     cd ${SETTE_DIR} 
    150     copy_original namelist 
    151     copy_original namelist_top 
     165    set_namelist namelist nn_solv 2 
     166    set_namelist namelist_top ln_diatrc .false. 
     167    cd ${SETTE_DIR} 
     168    . ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME} 
     169 
     170    cd ${SETTE_DIR} 
     171    export TEST_NAME="SHORT" 
     172    . prepare_exe_dir.sh 
     173    cd ${EXE_DIR} 
    152174    set_namelist namelist cn_exp \"GYRELOB_SHORT\" 
    153175    set_namelist namelist nn_it000 61 
     
    157179    set_namelist namelist nn_rstctl 2 
    158180    set_namelist namelist ln_clobber .true. 
    159     set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart.nc\" 
    160     set_namelist namelist_top ln_trcrad .false. 
     181    set_namelist namelist nn_solv 2 
     182    cp ..\/LONG\/GYRELOB_LONG_00000060_restart.nc . 
     183    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\" 
     184    set_namelist namelist_top ln_diatrc .false. 
    161185    set_namelist namelist_top ln_rsttr .true. 
    162186    set_namelist namelist_top nn_rsttr 2 
     187    cp ..\/LONG\/GYRELOB_LONG_00000060_restart_trc.nc . 
    163188    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\" 
    164189    cd ${SETTE_DIR} 
    165     . ./fcm_job.sh input_GYRE.cfg 1 SHORT 
     190    . ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME} 
    166191fi 
    167192 
    168193if [ ${config} -eq 2 ] ;  then 
    169194# Restartability tests for ORCA2_LIM_PISCES 
    170     cd ${SETTE_DIR} 
    171     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES del_key "key_dtatrc key_diatrc" 
    172     cd ${SETTE_DIR} 
    173     copy_original namelist 
    174     copy_original namelist_top 
    175     copy_original namelist_pisces 
    176     . param.cfg 
    177     . all_functions.sh 
     195    export TEST_NAME="LONG" 
     196    cd ${SETTE_DIR} 
     197    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8  
     198    cd ${SETTE_DIR} 
     199    . param.cfg 
     200    . all_functions.sh 
     201    . prepare_exe_dir.sh 
     202    cd ${EXE_DIR} 
    178203    set_namelist namelist cn_exp \"O2LP_LONG\" 
    179204    set_namelist namelist nn_it000 1 
     
    181206    set_namelist namelist nn_stock 75 
    182207    set_namelist namelist ln_clobber .true. 
    183     set_namelist namelist_top ln_trcrad .false. 
    184     # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false 
    185     # if not you need input files, and for tests is not necessary 
    186     set_namelist namelist_pisces ln_pisdmp .false. 
    187     set_namelist namelist_pisces ln_dustfer .false. 
    188     set_namelist namelist_pisces ln_river .false. 
    189     set_namelist namelist_pisces ln_ndepo .false. 
    190     set_namelist namelist_pisces ln_sedinput .false. 
    191     cd ${SETTE_DIR} 
    192     . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 LONG 
     208    set_namelist namelist nn_solv 2 
     209    set_namelist namelist_top ln_trcdta .false. 
     210    set_namelist namelist_top ln_diatrc .false. 
     211    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     212    # if not you need input files, and for tests is not necessary 
     213    set_namelist namelist_pisces ln_pisdmp .false. 
     214    set_namelist namelist_pisces ln_ironsed .false. 
     215    set_namelist namelist_pisces ln_river .false. 
     216    set_namelist namelist_pisces ln_ndepo .false. 
     217    set_namelist namelist_pisces ln_dust .false. 
     218    set_namelist namelist_pisces ln_presatm .false. 
     219    cd ${SETTE_DIR} 
     220    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 ${TEST_NAME} 
    193221     
    194222    cd ${SETTE_DIR} 
    195     copy_original namelist 
    196     copy_original namelist_ice 
    197     copy_original namelist_top 
    198     copy_original namelist_pisces 
     223    export TEST_NAME="SHORT" 
     224    . prepare_exe_dir.sh 
     225    cd ${EXE_DIR} 
    199226    set_namelist namelist cn_exp \"O2LP_SHORT\" 
    200227    set_namelist namelist nn_it000 76 
     
    204231    set_namelist namelist nn_rstctl 2 
    205232    set_namelist namelist ln_clobber .true. 
    206     set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart.nc\" 
    207     set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice.nc\" 
    208     set_namelist namelist_top ln_trcrad .false. 
     233    set_namelist namelist nn_solv 2 
     234    cp ../LONG/O2LP_LONG_00000075_restart*nc . 
     235    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\" 
     236    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\" 
     237    set_namelist namelist_top ln_diatrc .false. 
    209238    set_namelist namelist_top ln_rsttr .true. 
    210239    set_namelist namelist_top nn_rsttr 2 
    211240    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\" 
    212     # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput 
    213     # if not you need input files, and for tests is not necessary 
    214     set_namelist namelist_pisces ln_pisdmp .false. 
    215     set_namelist namelist_pisces ln_dustfer .false. 
    216     set_namelist namelist_pisces ln_river .false. 
    217     set_namelist namelist_pisces ln_ndepo .false. 
    218     set_namelist namelist_pisces ln_sedinput .false. 
    219     cd ${SETTE_DIR} 
    220     . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 SHORT 
     241    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust 
     242    # if not you need input files, and for tests is not necessary 
     243    set_namelist namelist_pisces ln_pisdmp .false. 
     244    set_namelist namelist_pisces ln_ironsed .false. 
     245    set_namelist namelist_pisces ln_river .false. 
     246    set_namelist namelist_pisces ln_ndepo .false. 
     247    set_namelist namelist_pisces ln_dust .false. 
     248    set_namelist namelist_pisces ln_presatm .false. 
     249    cd ${SETTE_DIR} 
     250    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 1 ${TEST_NAME} 
    221251fi 
    222252 
    223253if [ ${config} -eq 3 ] ;  then 
    224254    ## Restartability tests for POMME 
    225     cd ${SETTE_DIR} 
    226     . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME 
    227     cd ${SETTE_DIR} 
    228     . param.cfg 
    229     . all_functions.sh 
    230     copy_original namelist 
     255    export TEST_NAME="LONG" 
     256    cd ${SETTE_DIR} 
     257    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_LONG -r POMME -j 8 
     258    cd ${SETTE_DIR} 
     259    . param.cfg 
     260    . all_functions.sh 
     261    . prepare_exe_dir.sh 
     262    cd ${EXE_DIR} 
    231263    set_namelist namelist cn_exp \"POMME_LONG\" 
    232264    set_namelist namelist nn_it000 1 
     265    set_namelist namelist nn_stock 300 
    233266    set_namelist namelist nn_itend 600 
    234267    set_namelist namelist ln_clobber .true. 
    235     cd ${SETTE_DIR} 
    236     . ./fcm_job.sh input_POMME.cfg 1 LONG 
     268    set_namelist namelist nn_solv 2 
     269    cd ${SETTE_DIR} 
     270    . ./fcm_job.sh input_POMME.cfg 1 ${TEST_NAME} 
    237271     
    238272    cd ${SETTE_DIR} 
    239     copy_original namelist 
     273    export TEST_NAME="SHORT" 
     274    . prepare_exe_dir.sh 
     275    cd ${EXE_DIR} 
    240276    set_namelist namelist cn_exp \"POMME_SHORT\" 
    241277    set_namelist namelist nn_it000 301 
    242278    set_namelist namelist nn_itend 600 
    243     set_namelist namelist nn_stock 300 
    244279    set_namelist namelist ln_rstart .true. 
    245280    set_namelist namelist nn_rstctl 2 
    246281    set_namelist namelist ln_clobber .true. 
    247     set_namelist namelist cn_ocerst_in \"POMME_LONG_00000075_restart.nc\" 
    248     mv ${OUTPUT_DIR}/restart.obc.output ${OUTPUT_DIR}/restart.obc 
    249     cd ${SETTE_DIR} 
    250     . ./fcm_job.sh input_POMME.cfg 1 SHORT 
     282    set_namelist namelist nn_solv 2 
     283    cp ../LONG/POMME_LONG_00000300_restart*.nc . 
     284    set_namelist namelist cn_ocerst_in \"POMME_LONG_00000300_restart\" 
     285    cp ../LONG/restart.obc.output restart.obc 
     286    #mv restart.obc.output restart.obc 
     287    cd ${SETTE_DIR} 
     288    . ./fcm_job.sh input_POMME.cfg 1 ${TEST_NAME} 
    251289fi 
    252290 
    253291if [ ${config} -eq 4 ] ;  then 
    254     ## Reproducilibity tests for GYRE_LOBSTER 
    255     cd ${SETTE_DIR} 
    256     . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_diatrc" 
    257     cd ${SETTE_DIR} 
    258     . param.cfg 
    259     . all_functions.sh 
    260     copy_original namelist 
     292    ## Repropducilibity tests for GYRE_LOBSTER 
     293    export TEST_NAME="REPRO_1_4" 
     294    cd ${SETTE_DIR} 
     295    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER -j 8 add_key "key_mpp_rep key_mpp_mpi"  
     296    cd ${SETTE_DIR} 
     297    . param.cfg 
     298    . all_functions.sh 
     299    . prepare_exe_dir.sh 
     300    cd ${EXE_DIR} 
    261301    set_namelist namelist cn_exp \"GYRELOB_14\" 
    262302    set_namelist namelist nn_it000 1 
    263     set_namelist namelist nn_itend 75 
    264     set_namelist namelist nn_fwb 0 
    265     set_namelist namelist nn_bench 0 
    266     set_namelist namelist ln_ctl .false. 
    267     set_namelist namelist ln_clobber .true. 
     303    set_namelist namelist nn_itend 60 
     304    set_namelist namelist ln_clobber .true. 
     305    set_namelist namelist nn_solv 2 
     306    set_namelist namelist_top ln_diatrc .false. 
    268307    set_namelist namelist jpni 1 
    269308    set_namelist namelist jpnj 4 
    270309    set_namelist namelist jpnij 4 
    271310    cd ${SETTE_DIR} 
    272     . ./fcm_job.sh input_GYRE.cfg 4 REPRO_1_4 
     311    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME} 
    273312     
    274313    cd ${SETTE_DIR} 
    275     copy_original namelist 
     314    export TEST_NAME="REPRO_2_2" 
     315    . prepare_exe_dir.sh 
     316    cd ${EXE_DIR} 
    276317    set_namelist namelist cn_exp \"GYRELOB_22\" 
    277318    set_namelist namelist nn_it000 1 
    278     set_namelist namelist nn_itend 75 
    279     set_namelist namelist nn_fwb 0 
    280     set_namelist namelist ln_ctl .false. 
    281     set_namelist namelist ln_clobber .true. 
     319    set_namelist namelist nn_itend 60 
     320    set_namelist namelist ln_clobber .true. 
     321    set_namelist namelist nn_solv 2 
     322    set_namelist namelist_top ln_diatrc .false. 
    282323    set_namelist namelist jpni 2 
    283324    set_namelist namelist jpnj 2 
    284325    set_namelist namelist jpnij 4 
    285326    cd ${SETTE_DIR} 
    286     . ./fcm_job.sh input_GYRE.cfg 4 REPRO_2_2 
     327    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME} 
    287328fi 
    288329 
    289330if [ ${config} -eq 5 ] ;  then 
    290331    ## Repropducilibity tests for ORCA2_LIM_PISCES 
    291     cd ${SETTE_DIR} 
    292     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES add_key "key_mpp_mpi key_mpp_rep" del_key "key_vectopt_loop key_dtatrc key_diatrc"  
    293     cd ${SETTE_DIR} 
    294     . param.cfg 
    295     . all_functions.sh 
    296     copy_original namelist 
    297     copy_original namelist_pisces 
     332    export TEST_NAME="REPRO_4_4" 
     333    cd ${SETTE_DIR} 
     334    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi" 
     335    cd ${SETTE_DIR} 
     336    . param.cfg 
     337    . all_functions.sh 
     338    . prepare_exe_dir.sh 
     339    cd ${EXE_DIR} 
    298340    set_namelist namelist nn_it000 1 
    299341    set_namelist namelist nn_itend 75 
    300342    set_namelist namelist nn_fwb 0 
    301     set_namelist namelist ln_ctl .false. 
    302343    set_namelist namelist ln_clobber .true. 
    303344    set_namelist namelist jpni 4 
    304345    set_namelist namelist jpnj 4 
    305     set_namelist namelist jpnij 16  
    306     # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false 
    307     # if not you need input files, and for tests is not necessary 
    308     set_namelist namelist_pisces ln_pisdmp .false. 
    309     set_namelist namelist_pisces ln_dustfer .false. 
    310     set_namelist namelist_pisces ln_river .false. 
    311     set_namelist namelist_pisces ln_ndepo .false. 
    312     set_namelist namelist_pisces ln_sedinput .false. 
    313     cd ${SETTE_DIR} 
    314     . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_4_4 
    315      
    316     cd ${SETTE_DIR} 
    317     copy_original namelist 
    318     copy_original namelist_pisces 
     346    set_namelist namelist jpnij 16 
     347    set_namelist namelist nn_solv 2 
     348    set_namelist namelist_top ln_trcdta .false. 
     349    set_namelist namelist_top ln_diatrc .false. 
     350    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     351    # if not you need input files, and for tests is not necessary 
     352    set_namelist namelist_pisces ln_pisdmp .false. 
     353    set_namelist namelist_pisces ln_ironsed .false. 
     354    set_namelist namelist_pisces ln_river .false. 
     355    set_namelist namelist_pisces ln_ndepo .false. 
     356    set_namelist namelist_pisces ln_dust .false. 
     357    set_namelist namelist_pisces ln_presatm .false. 
     358    cd ${SETTE_DIR} 
     359    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 ${TEST_NAME} 
     360 
     361    cd ${SETTE_DIR} 
     362    export TEST_NAME="REPRO_2_8" 
     363    . prepare_exe_dir.sh 
     364    cd ${EXE_DIR} 
    319365    set_namelist namelist nn_it000 1 
    320366    set_namelist namelist nn_itend 75 
    321367    set_namelist namelist nn_fwb 0 
    322     set_namelist namelist ln_ctl .false. 
    323368    set_namelist namelist ln_clobber .true. 
    324369    set_namelist namelist jpni 2 
    325370    set_namelist namelist jpnj 8 
    326371    set_namelist namelist jpnij 16 
    327     # put ln_pisdmp, ln_dustfer, ln_river, ln_ndepo, ln_sedinput to false 
    328     # if not you need input files, and for tests is not necessary 
    329     set_namelist namelist_pisces ln_pisdmp .false. 
    330     set_namelist namelist_pisces ln_dustfer .false. 
    331     set_namelist namelist_pisces ln_river .false. 
    332     set_namelist namelist_pisces ln_ndepo .false. 
    333     set_namelist namelist_pisces ln_sedinput .false. 
    334     cd ${SETTE_DIR} 
    335     . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 REPRO_2_8 
     372    set_namelist namelist nn_solv 2 
     373    set_namelist namelist_top ln_trcdta .false. 
     374    set_namelist namelist_top ln_diatrc .false. 
     375    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     376    # if not you need input files, and for tests is not necessary 
     377    set_namelist namelist_pisces ln_pisdmp .false. 
     378    set_namelist namelist_pisces ln_ironsed .false. 
     379    set_namelist namelist_pisces ln_river .false. 
     380    set_namelist namelist_pisces ln_ndepo .false. 
     381    set_namelist namelist_pisces ln_dust .false. 
     382    set_namelist namelist_pisces ln_presatm .false. 
     383    cd ${SETTE_DIR} 
     384    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 ${TEST_NAME} 
    336385fi 
    337386 
    338387if [ ${config} -eq 6 ] ;  then 
    339388    ## Reproductibility tests for POMME 
    340     cd ${SETTE_DIR} 
    341     . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_4 -r POMME add_key "key_mpp_mpi key_mpp_rep" 
    342     cd ${SETTE_DIR} 
    343     . param.cfg 
    344     . all_functions.sh 
    345     copy_original namelist 
     389    export TEST_NAME="REPRO_1_4" 
     390    cd ${SETTE_DIR} 
     391    . ../CONFIG/makenemo -m ${CMP_NAM} -n POMME_4 -r POMME -j 8 add_key "key_mpp_rep key_mpp_mpi" 
     392    cd ${SETTE_DIR} 
     393    . param.cfg 
     394    . all_functions.sh 
     395    . prepare_exe_dir.sh 
     396    cd ${EXE_DIR} 
    346397    set_namelist namelist nn_it000 1 
    347398    set_namelist namelist nn_itend 300 
     
    349400    set_namelist namelist ln_ctl .false. 
    350401    set_namelist namelist ln_clobber .true. 
     402    set_namelist namelist nn_solv 2 
    351403    set_namelist namelist jpni 1 
    352404    set_namelist namelist jpnj 4 
    353405    set_namelist namelist jpnij 4 
    354406    cd ${SETTE_DIR} 
    355     . ./fcm_job.sh input_POMME.cfg 4 REPRO_1_4 
    356      
    357     cd ${SETTE_DIR} 
    358     copy_original namelist 
     407    . ./fcm_job.sh input_POMME.cfg 4 ${TEST_NAME} 
     408 
     409    cd ${SETTE_DIR} 
     410    export TEST_NAME="REPRO_2_2" 
     411    . prepare_exe_dir.sh 
     412    cd ${EXE_DIR} 
    359413    set_namelist namelist nn_it000 1 
    360414    set_namelist namelist nn_itend 300 
     
    362416    set_namelist namelist ln_ctl .false. 
    363417    set_namelist namelist ln_clobber .true. 
     418    set_namelist namelist nn_solv 2 
    364419    set_namelist namelist jpni 2 
    365420    set_namelist namelist jpnj 2 
    366421    set_namelist namelist jpnij 4 
    367422    cd ${SETTE_DIR} 
    368     . ./fcm_job.sh input_POMME.cfg 4 REPRO_2_2 
     423    . ./fcm_job.sh input_POMME.cfg 4 ${TEST_NAME} 
    369424fi 
    370425 
    371426if [ ${config} -eq 7 ] ;  then 
     427# Restartability tests for ORCA2_OFF_PISCES 
     428    export TEST_NAME="LONG" 
     429    cd ${SETTE_DIR} 
     430    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8  
     431    cd ${SETTE_DIR} 
     432    . param.cfg 
     433    . all_functions.sh 
     434    . prepare_exe_dir.sh 
     435    cd ${EXE_DIR} 
     436    set_namelist namelist cn_exp \"OFFP_LONG\" 
     437    set_namelist namelist nn_it000 1 
     438    set_namelist namelist nn_itend 40 
     439    set_namelist namelist nn_stock 20 
     440    set_namelist namelist ln_clobber .true. 
     441    set_namelist namelist_top ln_trcdta .false. 
     442    set_namelist namelist_top ln_diatrc .false. 
     443    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     444    # if not you need input files, and for tests is not necessary 
     445    set_namelist namelist_pisces ln_pisdmp .false. 
     446    set_namelist namelist_pisces ln_ironsed .false. 
     447    set_namelist namelist_pisces ln_river .false. 
     448    set_namelist namelist_pisces ln_ndepo .false. 
     449    set_namelist namelist_pisces ln_dust .false. 
     450    set_namelist namelist_pisces ln_presatm .false. 
     451    cd ${SETTE_DIR} 
     452    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 1 ${TEST_NAME} 
     453     
     454    cd ${SETTE_DIR} 
     455    export TEST_NAME="SHORT" 
     456    . prepare_exe_dir.sh 
     457    cd ${EXE_DIR} 
     458    set_namelist namelist cn_exp \"OFFP_SHORT\" 
     459    set_namelist namelist nn_it000 21 
     460    set_namelist namelist nn_itend 40 
     461    set_namelist namelist nn_stock 20 
     462    set_namelist namelist ln_clobber .true. 
     463    cp ../LONG/OFFP_LONG_00000020_restart*nc  
     464    set_namelist namelist_top ln_diatrc .false. 
     465    set_namelist namelist_top ln_rsttr .true. 
     466    set_namelist namelist_top nn_rsttr 2 
     467    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\" 
     468    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust 
     469    # if not you need input files, and for tests is not necessary 
     470    set_namelist namelist_pisces ln_pisdmp .false. 
     471    set_namelist namelist_pisces ln_ironsed .false. 
     472    set_namelist namelist_pisces ln_river .false. 
     473    set_namelist namelist_pisces ln_ndepo .false. 
     474    set_namelist namelist_pisces ln_dust .false. 
     475    set_namelist namelist_pisces ln_presatm .false. 
     476    cd ${SETTE_DIR} 
     477    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 1 ${TEST_NAME} 
     478fi 
     479 
     480if [ ${config} -eq 8 ] ;  then 
     481    ## Repropducilibity tests for ORCA2_OFF_PISCES 
     482    export TEST_NAME="REPRO_4_4" 
     483    cd ${SETTE_DIR} 
     484    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi" 
     485    cd ${SETTE_DIR} 
     486    . param.cfg 
     487    . all_functions.sh 
     488    . prepare_exe_dir.sh 
     489    cd ${EXE_DIR} 
     490    set_namelist namelist nn_it000 1 
     491    set_namelist namelist nn_itend 40 
     492    set_namelist namelist ln_clobber .true. 
     493    set_namelist namelist jpni 4 
     494    set_namelist namelist jpnj 4 
     495    set_namelist namelist jpnij 16 
     496    set_namelist namelist_top ln_trcdta .false. 
     497    set_namelist namelist_top ln_diatrc .false. 
     498    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     499    # if not you need input files, and for tests is not necessary 
     500    set_namelist namelist_pisces ln_pisdmp .false. 
     501    set_namelist namelist_pisces ln_ironsed .false. 
     502    set_namelist namelist_pisces ln_river .false. 
     503    set_namelist namelist_pisces ln_ndepo .false. 
     504    set_namelist namelist_pisces ln_dust .false. 
     505    set_namelist namelist_pisces ln_presatm .false. 
     506    cd ${SETTE_DIR} 
     507    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 16 ${TEST_NAME} 
     508 
     509    cd ${SETTE_DIR} 
     510    export TEST_NAME="REPRO_2_8" 
     511    . prepare_exe_dir.sh 
     512    cd ${EXE_DIR} 
     513    set_namelist namelist nn_it000 1 
     514    set_namelist namelist nn_itend 40 
     515    set_namelist namelist ln_clobber .true. 
     516    set_namelist namelist jpni 2 
     517    set_namelist namelist jpnj 8 
     518    set_namelist namelist jpnij 16 
     519    set_namelist namelist_top ln_trcdta .false. 
     520    set_namelist namelist_top ln_diatrc .false. 
     521    # put ln_pisdmp, ln_ironsed, ln_river, ln_ndepo, ln_dust to false 
     522    # if not you need input files, and for tests is not necessary 
     523    set_namelist namelist_pisces ln_pisdmp .false. 
     524    set_namelist namelist_pisces ln_ironsed .false. 
     525    set_namelist namelist_pisces ln_river .false. 
     526    set_namelist namelist_pisces ln_ndepo .false. 
     527    set_namelist namelist_pisces ln_dust .false. 
     528    set_namelist namelist_pisces ln_presatm .false. 
     529    cd ${SETTE_DIR} 
     530    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 16 ${TEST_NAME} 
     531fi 
     532 
     533 
     534if [ ${config} -eq 9 ] ;  then 
    372535    ## ORCA2_LIM with Agulhas AGRIF zoom 
    373     cd ${SETTE_DIR} 
    374     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM add_key "key_agrif" del_key "key_vectopt_loop key_zdftmx"  
    375     cd ${SETTE_DIR} 
    376     . param.cfg 
    377     . all_functions.sh 
    378     copy_original namelist 
    379     copy_original 1_namelist 
     536    export TEST_NAME="SHORT" 
     537    cd ${SETTE_DIR} 
     538    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL -r ORCA2_LIM  -j 8 add_key "key_agrif" del_key "key_zdftmx" 
     539    cd ${SETTE_DIR} 
     540    . param.cfg 
     541    . all_functions.sh 
     542    . prepare_exe_dir.sh 
     543    cd ${EXE_DIR} 
    380544    set_namelist namelist nn_it000 1 
    381545    set_namelist namelist nn_itend 75 
     
    387551    set_namelist 1_namelist ln_clobber .true. 
    388552    cd ${SETTE_DIR} 
    389     . ./fcm_job.sh input_ORCA2_LIM.cfg 1 SHORT 
    390 fi 
    391  
    392 if [ ${config} -eq 8 ] ;  then 
     553    . ./fcm_job.sh input_ORCA2_LIM_AGRIF.cfg 1 ${TEST_NAME} 
     554fi 
     555 
     556if [ ${config} -eq 10 ] ;  then 
    393557    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI 
    394     cd ${SETTE_DIR} 
    395     . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM add_key "key_mpp_mpi key_agrif" del_key "key_vectopt_loop key_zdftmx"  
    396     cd ${SETTE_DIR} 
    397     . param.cfg 
    398     . all_functions.sh 
    399     copy_original namelist 
    400     copy_original 1_namelist 
     558    export TEST_NAME="SHORT" 
     559    cd ${SETTE_DIR} 
     560    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_mpp_mpi key_agrif" del_key "key_zdftmx" 
     561    cd ${SETTE_DIR} 
     562    . param.cfg 
     563    . all_functions.sh 
     564    . prepare_exe_dir.sh 
     565    cd ${EXE_DIR} 
    401566    set_namelist namelist nn_it000 1 
    402567    set_namelist namelist nn_itend 75 
     
    405570    set_namelist namelist jpni 1 
    406571    set_namelist namelist jpnj 2 
    407     set_namelist namelist jpnij 2  
     572    set_namelist namelist jpnij 2 
    408573    set_namelist 1_namelist nn_it000 1 
    409574    set_namelist 1_namelist nn_itend 150 
     
    411576    set_namelist 1_namelist ln_clobber .true. 
    412577    cd ${SETTE_DIR} 
    413     . ./fcm_job.sh input_ORCA2_LIM.cfg 2 SHORT 
    414 fi 
     578    . ./fcm_job.sh input_ORCA2_LIM_AGRIF.cfg 2 ${TEST_NAME} 
     579fi 
     580 
     581 
    415582 
    416583done 
  • branches/2011/dev_LOCEAN_2011/NEMOGCM/SETTE/sette_beginner.sh

    r2754 r3021  
    3838# 
    3939# Compiler among those in NEMOGCM/ARCH 
    40 COMPILER=gfortran_linux 
     40COMPILER=PW6_VARGAS 
     41export BATCH_COMMAND=llsubmit 
     42export MPI_INTERACT="no" 
    4143 
    4244# Directory to run the tests 
     
    4850 
    4951CMP_NAM=${1:-$COMPILER} 
     52# Copy job_batch_COMPILER file for specific compiler into job_batch_template 
     53cd ${SETTE_DIR} 
     54cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit 
    5055 
    5156# Run for GYRE CONFIG 
    5257# small test to start 
    5358# compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file :  
     59export TEST_NAME="TEST01" 
    5460cd ${SETTE_DIR} 
    5561. ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE 
     
    5763. param.cfg  
    5864. all_functions.sh 
     65# creation of execution directory 
     66. prepare_exe_dir.sh 
     67cd ${EXE_DIR} 
    5968# setting namelist parameters 
    6069# experience name 
     
    6877cd ${SETTE_DIR} 
    6978# run job, with 1 processor, test named SHORT (= 60 time steps) 
    70 . ./fcm_job.sh input_GYRE.cfg 1 SHORT 
     79. ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME} 
Note: See TracChangeset for help on using the changeset viewer.