Changeset 1165 for trunk/libIGCM


Ignore:
Timestamp:
01/30/15 16:18:22 (9 years ago)
Author:
sdipsl
Message:

Add a /bin/sync after the rebuild sequence (only active for curie). Should solve (all?) file corruption observed recently. See #245

File:
1 edited

Legend:

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

    r1156 r1165  
    13591359  typeset comp compname comptagname card ListFilesName FileName0 NbFiles SaveOnArchive 
    13601360  typeset i i_ file_in file_in_ file_out file_out_ file_outin file_outin_ generic_file_name nb_rebuild_file 
    1361   typeset -Z4 j4 
    1362   #BASH declare j4 
     1361  typeset -Z4 j4 #BASH declare j4 
    13631362  typeset list_file nlist_file 
    13641363  typeset compactoutputs 
    13651364 
     1365  # Initialize array hosting list of rebuilded files to copy 
     1366  unset rebuildedActionsList 
     1367 
     1368  # Text compacting options 
    13661369  compactoutputs=false 
    13671370  if [ X${JobType} != XRUN ] ; then 
     
    16291632            if [ $DRYRUN -le 1 ]; then 
    16301633              if [ X${Pack} = Xtrue ] ; then 
    1631                 echo "IGCM_sys_PutBuffer_Out ${file_in} ${file_out}     " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1634                rebuildedActionsList[${#rebuildedActionsList[*]}]="IGCM_sys_PutBuffer_Out ${file_in} ${file_out}" 
    16321635              else 
    1633                 echo "IGCM_sys_Put_Out ${file_in} ${file_out}           " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1636                rebuildedActionsList[${#rebuildedActionsList[*]}]="IGCM_sys_Put_Out ${file_in} ${file_out}" 
    16341637              fi 
    1635               echo "IGCM_debug_Verif_Exit_Post                          " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
    1636               echo "IGCM_sys_Rm ${generic_file_name}_[0-9]*.nc          " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1638              rebuildedActionsList[${#rebuildedActionsList[*]}]="IGCM_debug_Verif_Exit_Post" 
     1639              rebuildedActionsList[${#rebuildedActionsList[*]}]="IGCM_sys_Rm ${generic_file_name}_[0-9]*.nc" 
    16371640            fi 
    16381641            SaveOnArchive=false 
     
    16881691    echo 
    16891692  done 
     1693  # Append the sync call and the copy sequence to the IGCM_FlushRebuild function if needed 
     1694  if [ ${#rebuildedActionsList[*]} -ne 0 ] ; then 
     1695    echo "IGCM_sys_sync         " >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1696    i=0 
     1697    until [ ${i} -ge ${#rebuildedActionsList[*]} ]; do 
     1698      echo ${rebuildedActionsList[$i]} >> ${RUN_DIR}/REBUILD_${PeriodDateBegin}/rebuild.ksh 
     1699      (( i=i+1 )) 
     1700    done 
     1701  fi 
    16901702  IGCM_debug_PopStack "IGCM_comp_Finalize" 
    16911703} 
Note: See TracChangeset for help on using the changeset viewer.