Changeset 1624


Ignore:
Timestamp:
01/26/24 09:27:27 (3 months ago)
Author:
jgipsl
Message:

Added possibility to declare a restart file as optional which means that libIGCM want stop if the file is not found. Only a warning will be written.

For example, in the following case, if the routing_restart file is not available when starting the model or if it is not produced, libIGCM will not stop. But if the file sechiba_rest is not available, libIGCM will stop as usual.

[RestartFiles]
List=   (sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc) ,\
        (routing_restart.nc, routing_restart.nc, routing_start.nc, OPTIONAL)
  • Read optional argument OPTIONAL on the line where the restart file is declared.
  • Each time when a restart file is not found for coping in or out, if the argument OPTIONAL is set, then just continue. If not set, the file is considered as MANDATORY and libIGCM will exist if it is missing as before.
  • on irene-amd and jean-zay, corrected a bug for the case in config.card DataProject?=DEFAULT


Location:
trunk/libIGCM
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_comp/libIGCM_comp.ksh

    r1603 r1624  
    752752            eval file_out=${file_out_} 
    753753 
     754            (( i_ = i+2 )) 
     755            eval is_opt=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     756            if [ X${is_opt} = XOPTIONAL ] ; then 
     757                echo ${file_in} is optional 
     758                (( i=i+4 )) 
     759            else 
     760                is_opt="MANDATORY" 
     761                echo ${file_in} is mandatory 
     762                (( i=i+3 )) 
     763            fi 
     764            IGCM_debug_Print 3 "Now search for restart file ${file_in} which is ${is_opt} (in section do_start=y)" 
     765 
    754766            eval Date_tmp=\${config_${comp}_RestartDate} 
    755767            Date_r=$( IGCM_date_ConvertFormatToGregorian ${Date_tmp} ) 
     
    810822                  IGCM_debug_Print 3 "Restart files have been searched for in buffer and archive directory." 
    811823                  IGCM_debug_Print 3 "They have been searched for in packed and unpacked format." 
    812                   IGCM_debug_Exit "Please double check restart settings in config.card" 
    813                   IGCM_debug_Verif_Exit 
     824                  if [ ${is_opt} = 'OPTIONAL' ] ; then 
     825                    IGCM_debug_Print 3 "The restart file is optional. Now continue." 
     826                    nb_restart_file=0 
     827                    Tared=false 
     828                  else 
     829                    IGCM_debug_Exit "Please double check restart settings in config.card" 
     830                    IGCM_debug_Verif_Exit 
     831                  fi 
     832                fi       
     833              fi 
     834 
     835              if [ X${Tared} = Xtrue ] ; then 
     836                # The tar file exist but not sure all files are inside  
     837                IGCM_sys_PrepareTaredRestart ${TarFileFound} 
     838                TarFileLocation=$( basename ${TarFileFound} ) 
     839                nb_files=$( tar tvf ${TarFileLocation} | grep ${comp}_${generic_restart_file_name_in}*.${extension_in} | wc -l ) 
     840                if [ ${nb_files} -gt 0 ] ; then 
     841                    IGCM_debug_Print 1 "tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in}" 
     842                    tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in} 
     843                    nb_restart_file=$( IGCM_sys_CountFileBuffer ${comp}_${generic_restart_file_name_in}_????.${extension_in} ) 
     844                else 
     845                    # No file was found 
     846                    if [ ${is_opt} = 'OPTIONAL' ] ; then 
     847                        IGCM_debug_Print 3 "The restart file is not found in the tar file but it is optional. Now continue." 
     848                        nb_restart_file=0 
     849                        Tared=false 
     850                    else 
     851                        IGCM_debug_Print 3 "The restart file was not found in the tar file but it is mandatory." 
     852                        IGCM_debug_Exit "Please double check restart settings in config.card" 
     853                        IGCM_debug_Verif_Exit 
     854                    fi 
    814855                fi 
    815               fi 
    816               IGCM_sys_PrepareTaredRestart ${TarFileFound} 
    817               TarFileLocation=$( basename ${TarFileFound} ) 
    818               IGCM_debug_Print 1 "tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in}" 
    819               tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in} 
    820               nb_restart_file=$( IGCM_sys_CountFileBuffer ${comp}_${generic_restart_file_name_in}_????.${extension_in} ) 
     856              fi 
    821857            fi 
    822  
     858             
    823859            if [ ${nb_restart_file} -gt 1 ] ; then 
    824860              j=0                                      # BASH LINE NOT NEEDED 
     
    849885                IGCM_sys_Get ${Path_r}/${file_in_Name} ${file_out} 
    850886              elif [ X${Tared} = Xtrue ] ; then 
    851                 IGCM_sys_Mv ${comp}_${file_in_Name} ${file_out} 
     887                if [ -f ${comp}_${file_in_Name} ] ; then 
     888                   # The file exixt 
     889                   IGCM_sys_Mv ${comp}_${file_in_Name} ${file_out} 
     890                elif [ ${is_opt} = 'OPTIONAL' ] ; then 
     891                   IGCM_debug_Print 3 "The restart file is not found in the tar file but it is optional. Now continue." 
     892                else 
     893                   IGCM_debug_Print 3 "The restart file was not found in the tar file but it is mandatory." 
     894                   IGCM_debug_Exit "Please double check restart settings in config.card" 
     895                   IGCM_debug_Verif_Exit 
     896                fi 
    852897              fi 
    853898            fi 
    854             (( i=i+3 )) 
    855899          done 
    856900        else 
     
    874918          eval file_in_=\${${ListFilesName}[$i]} > /dev/null 2>&1 
    875919          eval file_in=${file_in_} 
     920 
    876921          (( i_ = i+1 )) 
    877922          eval file_out_=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
    878923          eval file_out=${file_out_} 
     924 
     925          (( i_ = i+2 )) 
     926          eval is_opt=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     927          if [ X${is_opt} = XOPTIONAL ] ; then 
     928              # Read a forth argument 
     929              echo ${file_in} is optional 
     930              (( i=i+4 )) 
     931          else 
     932              is_opt="MANDATORY" 
     933              echo ${file_in} is mandatory 
     934              (( i=i+3 )) 
     935          fi 
     936 
     937          IGCM_debug_Print 3 "Now search for restart file ${file_in} which is ${is_opt} (in section do_start=n)" 
    879938 
    880939          file_in_Name=${config_UserChoices_JobName}_${LastPeriodDateEnd}_${file_in} 
     
    922981              IGCM_debug_Print 3 "Restart files have been searched for in buffer and archive directory." 
    923982              IGCM_debug_Print 3 "They have been searched for in packed and unpacked format." 
    924               IGCM_debug_Exit "Please double check restart settings in config.card" 
    925               IGCM_debug_Verif_Exit 
     983              if [ ${is_opt} = 'OPTIONAL' ] ; then 
     984                 IGCM_debug_Print 3 "The restart file is optional. Now continue." 
     985                 nb_restart_file=0 
     986                 Tared=false 
     987              else 
     988                 IGCM_debug_Print 3 "The restart file is mandatory." 
     989                 IGCM_debug_Exit "Please double check restart settings in config.card" 
     990                 IGCM_debug_Verif_Exit 
     991              fi 
     992            else 
     993              # The tar file exist but not sure all files are inside  
     994              IGCM_sys_PrepareTaredRestart ${TarFileFound} 
     995              TarFileLocation=$( basename ${TarFileFound} ) 
     996              nb_files=$( tar tvf ${TarFileLocation} | grep ${comp}_${generic_restart_file_name_in}*.${extension_in} | wc -l ) 
     997              if [ ${nb_files} -gt 0 ] ; then 
     998                IGCM_debug_Print 1 "tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in}" 
     999                tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in} 
     1000                nb_restart_file=$( IGCM_sys_CountFileBuffer ${comp}_${generic_restart_file_name_in}_????.${extension_in} ) 
     1001              else 
     1002                # No file was found 
     1003                if [ ${is_opt} = 'OPTIONAL' ] ; then 
     1004                  IGCM_debug_Print 3 "The restart file is not found in the tar file but it is optional. Now continue." 
     1005                  nb_restart_file=0 
     1006                  Tared=false 
     1007                else 
     1008                  IGCM_debug_Print 3 "The restart file was not found in the tar file but it is mandatory." 
     1009                  IGCM_debug_Exit "Please double check restart settings in config.card" 
     1010                  IGCM_debug_Verif_Exit 
     1011                fi 
     1012              fi 
     1013 
    9261014            fi 
    927             IGCM_sys_PrepareTaredRestart ${TarFileFound} 
    928             TarFileLocation=$( basename ${TarFileFound} ) 
    929             IGCM_debug_Print 1 "tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in}" 
    930             tar xvf ${TarFileLocation} ${comp}_${generic_restart_file_name_in}*.${extension_in} 
    931             nb_restart_file=$( IGCM_sys_CountFileBuffer ${comp}_${generic_restart_file_name_in}_????.${extension_in} ) 
    9321015          fi 
    9331016 
     
    9551038            fi 
    9561039          fi 
    957           (( i=i+3 )) 
    9581040        done 
    9591041      else 
     
    17321814    ListFilesName=${compname}_RestartFiles_List 
    17331815    eval FileName0=\${${ListFilesName}[0]} > /dev/null 2>&1 
    1734  
     1816     
    17351817    if ( [ X${FileName0} != X${NULL_STR} ] && [ X${FileName0} != XNONE ] ) ; then 
    17361818      eval NbFiles=\${#${ListFilesName}[@]} > /dev/null 2>&1 
    1737  
    17381819      (( i=0 )) 
    17391820      until [ $i -ge $NbFiles ]; do 
     
    17491830        eval file_outin=${file_outin_} 
    17501831 
     1832        (( i_ = i+3 )) 
     1833        eval is_opt=\${${ListFilesName}[$i_]} > /dev/null 2>&1 
     1834        if [ X${is_opt} = XOPTIONAL ] ; then 
     1835            echo ${file_in} is optional 
     1836            (( i=i+4 )) 
     1837        else 
     1838            is_opt="" 
     1839            echo ${file_in} is mandatory 
     1840            (( i=i+3 )) 
     1841        fi 
     1842         
    17511843        generic_restart_file_name_in=$(    basename ${file_in} .nc ) 
    17521844        generic_restart_file_name_out=$(   basename ${config_UserChoices_JobName}_${PeriodDateEnd}_${file_out} .nc ) 
     
    17601852            j4=${j}                               # BASH LINE NOT NEEDED 
    17611853            if [ X${Pack} = Xtrue ] ; then 
    1762               eval IGCM_sys_PutBuffer_Rest ${generic_restart_file_name_in}_${j4}.nc \${R_BUF_${comp}_R}/${generic_restart_file_name_out}_${j4}.nc 
     1854              eval IGCM_sys_PutBuffer_Rest ${generic_restart_file_name_in}_${j4}.nc \${R_BUF_${comp}_R}/${generic_restart_file_name_out}_${j4}.nc ${is_opt} 
    17631855            else 
    1764               eval IGCM_sys_Put_Rest ${generic_restart_file_name_in}_${j4}.nc \${R_OUT_${comp}_R}/${generic_restart_file_name_out}_${j4}.nc 
     1856              eval IGCM_sys_Put_Rest ${generic_restart_file_name_in}_${j4}.nc \${R_OUT_${comp}_R}/${generic_restart_file_name_out}_${j4}.nc ${is_opt} 
    17651857            fi 
    1766             if [ ! ${file_in} = ${file_outin} ] ; then 
    1767               if ( ${ExitFlag} ) ; then 
    1768                 echo "IGCM_sys_Mv ${generic_restart_file_name_in}_${j4}.nc ${generic_restart_file_name_outin}_${j4}.nc not executed." 
    1769               else 
    1770                 IGCM_sys_Mv ${generic_restart_file_name_in}_${j4}.nc ${generic_restart_file_name_outin}_${j4}.nc 
    1771               fi 
    1772             fi 
     1858 
     1859            if [ -f  ${generic_restart_file_name_in}_${j4}.nc ] ; then 
     1860                if [ ! ${file_in} = ${file_outin} ] ; then 
     1861                    if ( ${ExitFlag} ) ; then 
     1862                        echo "IGCM_sys_Mv ${generic_restart_file_name_in}_${j4}.nc ${generic_restart_file_name_outin}_${j4}.nc not executed." 
     1863                    else 
     1864                        IGCM_sys_Mv ${generic_restart_file_name_in}_${j4}.nc ${generic_restart_file_name_outin}_${j4}.nc 
     1865                    fi 
     1866                fi 
     1867            else 
     1868                # This is the case where the restart file no not exist. 
     1869                # It has already been checked if the model should stop for this case. 
     1870                IGCM_debug_Print 1 "Restart file does not exist, no move in RUN_DIR done :  ${generic_restart_file_name_in}_${j4}.nc" 
     1871            fi 
    17731872            (( j=j+1 ))                           # BASH LINE NOT NEEDED 
    17741873          done 
    17751874        else 
    17761875          if [ X${Pack} = Xtrue ] ; then 
    1777             eval IGCM_sys_PutBuffer_Rest ${file_in} \${R_BUF_${comp}_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_${file_out} 
     1876            eval IGCM_sys_PutBuffer_Rest ${file_in} \${R_BUF_${comp}_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_${file_out} ${is_opt} 
    17781877          else 
    1779             eval IGCM_sys_Put_Rest ${file_in} \${R_OUT_${comp}_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_${file_out} 
     1878            eval IGCM_sys_Put_Rest ${file_in} \${R_OUT_${comp}_R}/${config_UserChoices_JobName}_${PeriodDateEnd}_${file_out} ${is_opt} 
    17801879          fi 
    1781           if [ ! ${file_in} = ${file_outin} ] ; then 
    1782             if ( ${ExitFlag} ) ; then 
    1783               echo "IGCM_sys_Mv ${file_in} ${file_outin} not executed." 
    1784             else 
    1785               IGCM_sys_Mv ${file_in} ${file_outin} 
    1786             fi 
    1787           fi 
     1880 
     1881          if [ -f ${file_in} ] ; then 
     1882              if [ ! ${file_in} = ${file_outin} ] ; then 
     1883                  if ( ${ExitFlag} ) ; then 
     1884                      echo "IGCM_sys_Mv ${file_in} ${file_outin} not executed." 
     1885                  else 
     1886                      IGCM_sys_Mv ${file_in} ${file_outin} 
     1887                  fi 
     1888              fi 
     1889          else 
     1890              # This is the case where the restart file no not exist. 
     1891              # It has already been checked if the model should stop for this case. 
     1892              IGCM_debug_Print 1 "Restart file does not exist, no move in RUN_DIR done :   ${file_in}" 
     1893          fi 
    17881894        fi 
    17891895 
    1790         (( i=i+3 )) 
    17911896      done 
    17921897    else 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys.ksh

    r1574 r1624  
    677677    echo "IGCM_sys_PutBuffer_Rest :" $@ 
    678678  fi 
     679 
    679680  if [ $DRYRUN = 0 ]; then 
    680681    if [ ! -f ${1} ] ; then 
    681       echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ." 
    682       IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 
    683     fi 
    684  
    685     typeset status 
    686     # 
    687     # USUAL WAY 
    688     \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
    689     status=$? 
    690  
    691     if [ ${status} -gt 0 ] ; then 
    692       echo "IGCM_sys_PutBuffer_Rest : error code ${status}" 
    693       [ -f ${2} ] && ls -l ${2} 
    694       [ -f ${2}/${1} ] && ls -l ${2}/${1} 
    695       cat ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
    696       IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 
    697     else 
    698  
    699       if [ X${JobType} = XRUN ] ; then 
    700         [ -f ${2} ] && IGCM_sys_Chmod 444 ${2} 
    701         [ -f ${2}/${1} ] && IGCM_sys_Chmod 444 ${2}/${1} 
     682      # The file is missing 
     683      if [ X${3} = X'OPTIONAL' ] ; then 
     684        echo "WARINING : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ." 
     685        IGCM_debug_Print 1 "IGCM_sys_PutBuffer_Rest: Optional restart file ${1} is missing, now continue." 
     686      else  
     687        echo "ERROR : IGCM_sys_PutBuffer_Rest ${1} DOES NOT EXIST ." 
     688        IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 
    702689      fi 
    703  
    704       \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     690     
     691    else 
     692      # The file exist 
     693      typeset status 
     694      # 
     695      # USUAL WAY 
     696      \cp $1 $2 > ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 2>&1 
     697      status=$? 
     698 
     699      if [ ${status} -gt 0 ] ; then 
     700        echo "IGCM_sys_PutBuffer_Rest : error code ${status}" 
     701        [ -f ${2} ] && ls -l ${2} 
     702        [ -f ${2}/${1} ] && ls -l ${2}/${1} 
     703        cat ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     704        IGCM_debug_Exit "IGCM_sys_PutBuffer_Rest" 
     705      else 
     706        if [ X${JobType} = XRUN ] ; then 
     707          [ -f ${2} ] && IGCM_sys_Chmod 444 ${2} 
     708          [ -f ${2}/${1} ] && IGCM_sys_Chmod 444 ${2}/${1} 
     709        fi 
     710        \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     711      fi 
    705712    fi 
    706713  fi 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r1485 r1624  
    491491  if [ $DRYRUN = 0 ]; then 
    492492    if [ ! -f ${1} ] ; then 
    493       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    494       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    495     fi 
    496  
     493        # The file is missing 
     494        if [ X${3} = X'OPTIONAL' ] ; then 
     495            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     496            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     497        else 
     498            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     499            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     500        fi 
     501        
     502    else 
     503      # The file exist     
    497504    typeset status 
    498505    # 
     
    530537 
    531538      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     539    fi 
    532540    fi 
    533541  fi 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_irene-amd.ksh

    r1593 r1624  
    223223 
    224224  # Load dfldatadir depending on the project used for submission (default) or set in config.card (optional) 
    225   if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = DEFAULT ]; then 
     225  if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = XDEFAULT ]; then 
    226226    # Default option: Change the dfldatadir according to the project used for submission 
    227227    # The variable DataProject in section UserChoices in config.card is not set or is set to DEFAULT 
     
    613613  if [ $DRYRUN = 0 ]; then 
    614614    if [ ! -f ${1} ] ; then 
    615       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    616       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    617     fi 
     615        # The file is missing      
     616        if [ X${3} = X'OPTIONAL' ] ; then 
     617            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     618            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     619        else 
     620            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     621            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     622        fi 
     623 
     624    else 
     625      # The file exist 
    618626 
    619627    typeset status 
     
    652660 
    653661      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     662    fi 
    654663    fi 
    655664  fi 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_irene.ksh

    r1598 r1624  
    616616  if [ $DRYRUN = 0 ]; then 
    617617    if [ ! -f ${1} ] ; then 
    618       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    619       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    620     fi 
     618      # The file is missing        
     619      if [ X${3} = X'OPTIONAL' ] ; then 
     620          echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     621          IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     622      else 
     623          echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     624          IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     625      fi 
     626       
     627    else 
     628      # The file exist 
    621629 
    622630    typeset status 
     
    656664      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
    657665    fi 
     666     
     667    fi 
     668     
    658669  fi 
    659670  IGCM_debug_PopStack "IGCM_sys_Put_Rest" 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_jeanzay.ksh

    r1569 r1624  
    205205 
    206206  # Load dfldatadir depending on the project used for submission (default) or set in config.card (optional) 
    207   if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = DEFAULT ]; then 
     207  if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = XDEFAULT ]; then 
    208208    # The variable DataProject is not set in in section UserChoices in config.card or it is set to DEFAULT 
    209209    # Default option: Set DataProject according to the project used for submission 
     
    620620  if [ $DRYRUN = 0 ]; then 
    621621    if [ ! -f ${1} ] ; then 
    622       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    623       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    624     fi 
     622        # The file is missing 
     623        if [ X${3} = X'OPTIONAL' ] ; then 
     624            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     625            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     626        else 
     627            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     628            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     629        fi 
     630 
     631    else 
     632      # The file exist 
    625633 
    626634    typeset status 
     
    659667 
    660668      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     669    fi 
    661670    fi 
    662671  fi 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_mesoipsl.ksh

    r1569 r1624  
    566566  if [ $DRYRUN = 0 ]; then 
    567567    if [ ! -f ${1} ] ; then 
    568       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    569       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    570     fi 
     568        # The file is missing      
     569        if [ X${3} = X'OPTIONAL' ] ; then 
     570            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     571            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     572        else 
     573            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     574            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     575        fi 
     576 
     577    else 
     578      # The file exist 
    571579 
    572580    typeset status 
     
    605613 
    606614      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     615    fi 
    607616    fi 
    608617  fi 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r1601 r1624  
    548548  fi 
    549549  if [ $DRYRUN = 0 ]; then 
     550       
    550551    if [ ! -f ${1} ] ; then 
    551       echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
    552       IGCM_debug_Exit "IGCM_sys_Put_Rest" 
    553     fi 
     552        # The file is missing      
     553        if [ X${3} = X'OPTIONAL' ] ; then 
     554            echo "WARINING : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     555            IGCM_debug_Print 1 "IGCM_sys_Put_Rest: Optional restart file ${1} is missing, now continue for the next" 
     556        else 
     557            echo "ERROR : IGCM_sys_Put_Rest ${1} DOES NOT EXIST ." 
     558            IGCM_debug_Exit "IGCM_sys_Put_Rest" 
     559        fi 
     560 
     561    else 
     562      # The file exist 
    554563 
    555564    typeset status 
     
    588597 
    589598      \rm ${OUTCOMMAND_PATH}/out_command_${LOGIN}.$$ 
     599    fi 
    590600    fi 
    591601  fi 
Note: See TracChangeset for help on using the changeset viewer.