Changeset 1569 for trunk/libIGCM/AA_job


Ignore:
Timestamp:
12/15/22 11:08:40 (19 months ago)
Author:
aclsce
Message:

Added fonctionality to create RUN_DIR and Job_debug to be launched directly in the RUN_DIR directory.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/AA_job

    r1568 r1569  
    244244#R_IN=/u/rech/por/rpor111/DATA 
    245245 
    246 #D- Turn in dry run mode ? (0,1,2,3) 
     246#D- Turn in dry run mode ? (0,1,2,3,4) 
    247247#D- Default=0 
    248248#D- 
    249 #DRYRUN=3 
     249DRYRUN=0 
    250250#D-# YOU HAVE TO COMPILE YOUR EXE FILES to USE DRYRUN MODE ! 
    251251#D-# ------------------------------------------------------------------------------------- 
     
    262262#D-# |    3     |       yes           |    no      |  no     |      no                   | 
    263263#D-# ------------------------------------------------------------------------------------- 
    264  
     264#D-# |    4     |       yes           |    yes     |  creation of RUN_DIR and Job_debug  | 
     265#D-# ------------------------------------------------------------------------------------- 
    265266#D- 
    266267# --------------------------------------------------------------------------------------------------# 
     
    532533 
    533534  echo "========================================================================" 
    534   if [ ${DRYRUN} -le 1 ] ; then 
    535     REAL_DATE_INIT=$( date ) 
    536     echo                                                                                   > ${Exe_Output} 
    537     echo "#######################################"                                        >> ${Exe_Output} 
    538     echo "EXECUTION of : ${EXECUTION}" 
    539     echo "EXECUTION of : ${EXECUTION}"                                                    >> ${Exe_Output} 
    540     echo                                                                                  >> ${Exe_Output} 
    541     typeset RET 
    542     RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) 
    543     ${EXECUTION}  >> ${Exe_Output} 2>&1 
    544     RET=$? 
    545     RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' ) 
    546     if [ ${RET} -gt 0 ] ; then 
    547       echo "Return code of executable :" ${RET} 
    548       IGCM_debug_Exit "EXECUTABLE" 
    549       IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug 
    550       IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error 
    551       ExecutionFail=true 
    552     fi 
    553     echo                                            >> ${Exe_Output} 
    554     echo "#######################################"  >> ${Exe_Output} 
    555     echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}"   >> ${Exe_Output} 
    556     echo "libIGCM RunDateEnd=${RUN_DATE_END}"       >> ${Exe_Output} 
    557     echo                                            >> ${Exe_Output} 
     535  if [ ${DRYRUN_DEBUG} = 4 ] ; then 
     536      IGCM_sys_create_run_dir  
    558537  else 
    559     echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN 
    560     echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output} 
    561     if ( $DEBUG_debug ) ; then 
    562       echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack 
    563     fi 
     538      if [ ${DRYRUN} -le 1 ] ; then 
     539          REAL_DATE_INIT=$( date ) 
     540          echo                                                                                   > ${Exe_Output} 
     541          echo "#######################################"                                        >> ${Exe_Output} 
     542          echo "EXECUTION of : ${EXECUTION}" 
     543          echo "EXECUTION of : ${EXECUTION}"                                                    >> ${Exe_Output} 
     544          echo                                                                                  >> ${Exe_Output} 
     545          typeset RET 
     546          RUN_DATE_BEGIN=$( date '+%Y-%m-%dT%H:%M:%S' ) 
     547          ${EXECUTION}  >> ${Exe_Output} 2>&1 
     548          RET=$? 
     549          RUN_DATE_END=$( date '+%Y-%m-%dT%H:%M:%S' ) 
     550          if [ ${RET} -gt 0 ] ; then 
     551              echo "Return code of executable :" ${RET} 
     552              IGCM_debug_Exit "EXECUTABLE" 
     553              IGCM_sys_Mkdir ${SUBMIT_DIR}/Debug 
     554              IGCM_sys_Cp ${Exe_Output} ${SUBMIT_DIR}/Debug/${PREFIX}_${Exe_Output}_error 
     555              ExecutionFail=true 
     556          fi 
     557          echo                                            >> ${Exe_Output} 
     558          echo "#######################################"  >> ${Exe_Output} 
     559          echo "libIGCM RunDateBegin=${RUN_DATE_BEGIN}"   >> ${Exe_Output} 
     560          echo "libIGCM RunDateEnd=${RUN_DATE_END}"       >> ${Exe_Output} 
     561          echo                                            >> ${Exe_Output} 
     562      else 
     563          echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN 
     564          echo "EXECUTION of : ${EXECUTION} simulated for DRYRUN = " $DRYRUN > ${Exe_Output} 
     565          if ( $DEBUG_debug ) ; then 
     566              echo "FOR EXECUTION DRYRUN mode = " $DRYRUN >> stack 
     567          fi 
     568      fi 
    564569  fi 
    565570  echo "========================================================================" 
Note: See TracChangeset for help on using the changeset viewer.