Ignore:
Timestamp:
03/22/12 18:02:50 (12 years ago)
Author:
mafoipsl
Message:

Second merge of libIGCM_MPI_OpenMP branch with libIGCM trunk, revision 591.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/libIGCM_MPI_OpenMP/libIGCM_sys/libIGCM_sys_titane.ksh

    r577 r592  
    9292. /home/cont003/p86ipsl/.atlas_env_titane_ksh 
    9393 
    94 module switch nco/4.0.8 nco/3.9.4_netcdf4 
     94module switch nco/3.9.4 nco/3.9.4_netcdf4 
    9595 
    9696#==================================================== 
     
    102102# Host specific DIRECTORIES 
    103103#==================================================== 
    104  
    105 #==================================================== 
    106 #- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin ) 
    107 typeset -r R_EXE="${MODIPSL}/bin" 
    108  
    109 #==================================================== 
    110 #- SUBMIT_DIR : submission dir 
    111 typeset SUBMIT_DIR=${SUBMIT_DIR:=${LS_SUBCWD}} 
    112  
    113 #==================================================== 
    114 #- ARCHIVE 
    115 typeset -r ARCHIVE=${DMFDIR} 
    116104 
    117105# ============ CESIUM START ============ # 
     
    146134 
    147135#==================================================== 
     136#- R_EXE   (==> BIN_DIR = ${MODIPSL}/bin ) 
     137typeset -r R_EXE="${MODIPSL}/bin" 
     138 
     139#==================================================== 
     140#- SUBMIT_DIR : submission dir 
     141typeset SUBMIT_DIR=${SUBMIT_DIR:=${LS_SUBCWD}} 
     142 
     143#==================================================== 
     144#- ARCHIVE (dedicated to large files) 
     145typeset -r ARCHIVE=${CCCSTOREDIR} 
     146 
     147#- ARCHIVE (dedicated to small/medium files) 
     148typeset -r STORAGE=${CCCWORKDIR} 
     149 
     150#==================================================== 
    148151#- IN 
    149152typeset -r R_IN=${R_IN:=/ccc/work/cont003/dsm/p86ipsl/IGCM} 
     
    153156#- R_OUT 
    154157typeset -r R_OUT=${ARCHIVE}/IGCM_OUT 
     158 
     159#==================================================== 
     160#- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
     161typeset -r R_FIG=${STORAGE}/IGCM_OUT 
    155162 
    156163#==================================================== 
     
    10381045    # USUAL WAY 
    10391046    # add dmfind/dmget (to demigrate all offline files) : 
    1040     dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget 
     1047    #dmfind $1 -state MIG -o -state OFL -o -state PAR | dmget 
    10411048    \cp -r $1 $2 > out_rsync 2>&1 
    10421049    RET=$? 
     
    13511358    fi 
    13521359 
    1353     dmget ${dm_liste[*]} > out_rsync 2>&1 
     1360    #dmget ${dm_liste[*]} > out_rsync 2>&1 
     1361    ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 
    13541362    RET=$? 
    13551363    if [ ${RET} -gt 0 ] ; then 
     
    13651373    #   sleep 30 
    13661374    #   echo "We try another time" 
    1367     #   dmget ${dm_liste[*]} > out_rsync 2>&1 
     1375    ##  dmget ${dm_liste[*]} > out_rsync 2>&1 
     1376    #   ccc_hsm get ${dm_liste[*]} > out_rsync 2>&1 
    13681377    #   RET=$? 
    13691378    #   if [ ${RET} -gt 0 ] ; then 
     
    15141523  RET=0 
    15151524  if [ $DRYRUN = 0 ]; then 
    1516     if [ ! -d /dmnfs/cont003/dods/public/${LOGIN}/${R_DODS}/${1} ] ; then 
    1517       echo "WARNING : IGCM_sys_Dods_Rm /dmnfs/cont003/dods/public/${LOGIN}/${R_DODS}/${1} DOES NOT EXIST ." 
    1518       echo "Nothing has been done." 
    1519       return 
    1520     fi 
    1521     dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
     1525 
     1526#    if [ ! -d /dmnfs/cont003/dods/public/${LOGIN}/${R_DODS}/${1} ] ; then 
     1527#      echo "WARNING : IGCM_sys_Dods_Rm /dmnfs/cont003/dods/public/${LOGIN}/${R_DODS}/${1} DOES NOT EXIST ." 
     1528#      echo "Nothing has been done." 
     1529#      return 
     1530#    fi 
     1531 
     1532    /ccc/cont003/home/dsm/p86maf/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
    15221533    RET=$? 
    15231534     
     
    15481559  RET=0 
    15491560  if [ $DRYRUN = 0 ]; then 
    1550     if [ ! -d ${R_SAVE}/${1} ] ; then 
    1551       echo "WARNING : IGCM_sys_Dods_Cp ${R_SAVE}/${1} DOES NOT EXIST ." 
    1552       echo "Nothing has been done." 
    1553       return 
    1554     fi 
    1555     # 
    1556     dods_cp ${1} public/${LOGIN}/${R_DODS} # > out_dods_cp 2>&1 
     1561 
     1562#    if [ ! -d ${R_SAVE}/${1} ] ; then 
     1563#      echo "WARNING : IGCM_sys_Dods_Cp ${R_SAVE}/${1} DOES NOT EXIST ." 
     1564#      echo "Nothing has been done." 
     1565#      return 
     1566#    fi 
     1567 
     1568    /ccc/cont003/home/dsm/p86maf/bin/dods_cp ${1} public/${LOGIN}/${R_DODS} # > out_dods_cp 2>&1 
    15571569    RET=$? 
    15581570 
     
    15811593    echo "IGCM_sys_Put_Dods :" $@ 
    15821594  fi 
     1595  set -vx 
     1596  typeset RET 
    15831597  if [ $DRYRUN = 0 ]; then 
    1584     if [ ! -d ${R_SAVE}/${1} ] ; then 
    1585       echo "WARNING : IGCM_sys_Put_Dods ${R_SAVE}/${1} DOES NOT EXIST ." 
     1598    if ( [ ! -d ${R_SAVE}/${1} ] && [ ! -d ${R_FIGR}/${1} ] ) ; then 
     1599      echo "WARNING IGCM_sys_Put_Dods : None of the following directories exist. Exactly one should." 
     1600      echo "WARNING IGCM_sys_Put_Dods : ${R_SAVE}/${1} DOES NOT EXIST." 
     1601      echo "WARNING IGCM_sys_Put_Dods : ${R_FIGR}/${1} DOES NOT EXIST." 
    15861602      IGCM_debug_PopStack "IGCM_sys_Put_Dods" 
    15871603      return 
    15881604    fi 
    15891605 
    1590     typeset RET 
    1591         # 
    1592     cd ${R_SAVE} 
     1606    if ( [ -d ${R_SAVE}/${1} ] && [ -d ${R_FIGR}/${1} ] ) ; then 
     1607      echo "WARNING IGCM_sys_Put_Dods : Both of the following directories exist. Exactly one should." 
     1608      echo "WARNING IGCM_sys_Put_Dods : ${R_SAVE}/${1} EXISTS." 
     1609      echo "WARNING IGCM_sys_Put_Dods : ${R_FIGR}/${1} EXISTS." 
     1610      IGCM_debug_PopStack "IGCM_sys_Put_Dods" 
     1611      return 
     1612    fi 
     1613    # 
     1614    if [ -d ${R_SAVE}/${1} ] ; then 
     1615      cd ${R_SAVE} 
     1616    elif [ -d ${R_FIGR}/${1} ] ; then 
     1617      cd ${R_FIGR} 
     1618    fi 
     1619 
    15931620    IGCM_sys_Dods_Rm ${1} 
    15941621    IGCM_sys_Dods_Cp ${1} 
     
    20862113    echo "IGCM_sys_ncrcat :" $@ 
    20872114  fi 
    2088   ncrcat $@ 
     2115  ncrcat --omp_num_threads 2 $@ 
    20892116  if [ $? -gt 0 ] ; then 
    20902117    echo "IGCM_sys_ncrcat : erreur ${@}." 
Note: See TracChangeset for help on using the changeset viewer.