Ignore:
Timestamp:
03/30/12 16:57:50 (12 years ago)
Author:
sdipsl
Message:
  • adapt curie system for the pack
  • homogenize curie and titane system. Easier to maintain
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_titane.ksh

    r621 r623  
    1414#========================================================= 
    1515# The documentation of this file can be automatically generated 
    16 # if you use the prefix #D- for comments to be extracted.  
     16# if you use the prefix #D- for comments to be extracted. 
    1717# Extract with command: cat lib* | grep "^#D-" | cut -c "4-" 
    1818#========================================================= 
     
    2222#D-#================================================== 
    2323#D- 
    24 #D- This ksh library if a layer under some usefull  
     24#D- This ksh library if a layer under some usefull 
    2525#D-environment variables and shell commands. 
    2626#D-All those definitions depend on host particularities. 
     
    4242# YOU MUST COMPILE YOUR EXE FILES FOR DRYRUN MODE ! 
    4343# ------------------------------------------------------------------------------------- 
    44 # | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest | 
    45 # |          |  Cp/Exe param files |            |  Chmod  |                           | 
    46 # |          |      Qsub           |            |         |                           | 
     44# | DRYRUN=  |  Date computations, | sys_Get    |  Exe    | sys_Put_Out; sys_Put_Rest | 
     45# |          |  Cp/Exe param files |            |  Chmod  |                           | 
     46# |          |      Qsub           |            |         |                           | 
    4747# ------------------------------------------------------------------------------------- 
    48 # |    0     |       yes           |    yes     |  yes    |      yes                  | 
     48# |    0     |       yes           |    yes     |  yes    |      yes                  | 
    4949# ------------------------------------------------------------------------------------- 
    50 # |    1     |       yes           |    yes     |  yes    |      no                   | 
     50# |    1     |       yes           |    yes     |  yes    |      no                   | 
    5151# ------------------------------------------------------------------------------------- 
    52 # |    2     |       yes           |    yes     |  no     |      no                   | 
     52# |    2     |       yes           |    yes     |  no     |      no                   | 
    5353# ------------------------------------------------------------------------------------- 
    54 # |    3     |       yes           |    no      |  no     |      no                   | 
     54# |    3     |       yes           |    no      |  no     |      no                   | 
    5555# ------------------------------------------------------------------------------------- 
    5656 
     
    194194 
    195195NUM_COREPERNODE=8 
    196          
     196 
    197197#==================================================== 
    198198#- Default number of MPI task for IPSL coupled model 
     
    274274#  if [ "X$( grep rebuild_from tmp_IGCM_sys_RshPost_$$ )" != "X" ] ; then 
    275275#    #little hack so that rebuild submission is done on titane not an cesium 
    276 #     
     276# 
    277277#    libIGCM_POST_sed=$( echo $libIGCM_POST | sed 's/\//\\\//g' ) 
    278278#    POST_DIR_sed=$( echo ${POST_DIR} | sed 's/\//\\\//g' ) 
     
    282282#    sed "s/Script_Post_Output=/Script_Output=${POST_DIR_sed}\//g" tmp.txt > tmp_IGCM_sys_RshPost_$$ 
    283283#    \mv tmp.txt tmp_IGCM_sys_RshPost_$$ 
    284 #     
     284# 
    285285#    echo cat tmp_IGCM_sys_RshPost_$$ AFTER 
    286286#    cat tmp_IGCM_sys_RshPost_$$ 
     
    355355 
    356356    if [ ! -z ${config_UserChoices_MailName} ] ; then 
    357         mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail 
     357        mail -s "${config_UserChoices_JobName} ${status}" ${config_UserChoices_MailName} < job_end.mail 
    358358    elif [ -f ~/.forward ] ; then 
    359         mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
     359        mail -s "${config_UserChoices_JobName} ${status}" $( cat ~/.forward ) < job_end.mail 
    360360    fi 
    361361    sleep 10 
     
    405405  fi 
    406406  #- creation de repertoire sur le serveur fichier 
    407   if [ ! -d ${1} ]; then  
     407  if [ ! -d ${1} ]; then 
    408408    \mkdir -p $1 
    409409    if [ $? -gt 0 ] ; then 
     
    426426  fi 
    427427  #- creation de repertoire sur le serveur fichier 
    428   if [ ! -d ${1} ]; then  
     428  if [ ! -d ${1} ]; then 
    429429    \mkdir -p $1 
    430430    if [ $? -gt 0 ] ; then 
     
    716716#    fi 
    717717#    (( i = i + 1 )) 
    718 #  done  
     718#  done 
    719719# ============ CESIUM  END  ============ # 
    720720 
     
    727727 
    728728#D-************************* 
    729 #D- File transfer functions  
     729#D- File transfer functions 
    730730#D-************************* 
    731731#D- 
     
    796796  elif [ $MYLANG = "en" ] ; then 
    797797    case $RET in 
    798     0)  return;;                 
     798    0)  return;; 
    799799    1)  echo "rsync error : Syntax or usage error " 
    800800      return;; 
     
    969969 
    970970    typeset RET 
    971      
     971 
    972972    echo mv $@ > out_rsync 2>&1 
    973973    \mv $@ >> out_rsync 2>&1 
    974974    RET=$? 
    975      
     975 
    976976    if [ ${RET} -gt 0 ] ; then 
    977977      echo "IGCM_sys_Mv : error in mv." 
     
    11321132    RET=$? 
    11331133 
    1134 #       #RSYNC WITH NETWORK SSH CALL 
    1135 #       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1 
    1136 #       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1 
    1137  
    1138      #RSYNC WITH NFS USE 
    1139      echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1 
    1140      ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 
    1141  
    1142      RET=$? 
    1143      IGCM_sys_Rsync_out $RET 
    1144  
    1145      ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
    1146      (( RET=RET+$? )) 
     1134#       #RSYNC WITH NETWORK SSH CALL 
     1135#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1 
     1136#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1 
     1137 
     1138     #RSYNC WITH NFS USE 
     1139     echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1 
     1140     ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 
     1141 
     1142     RET=$? 
     1143     IGCM_sys_Rsync_out $RET 
     1144 
     1145     ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
     1146     (( RET=RET+$? )) 
    11471147 
    11481148    if [ ${RET} -gt 0 ] ; then 
     
    12291229    #    typeset WORKPATH FILEPATH 
    12301230    #    WORKPATH=$( dirname $2 | sed -e "s|${R_OUT}|${R_BUF}|" ) 
    1231     #    IGCM_sys_MkdirWork ${WORKPATH}  
     1231    #    IGCM_sys_MkdirWork ${WORKPATH} 
    12321232    #    FILEPATH=${WORKPATH}/$( basename $2 ) 
    12331233    #    # 
     
    12371237    if [ X${JobType} = XRUN ] ; then 
    12381238      if [ X${3} = X ] ; then 
    1239         IGCM_sys_Chmod 444 ${1} 
     1239        IGCM_sys_Chmod 444 ${1} 
    12401240      fi 
    12411241    fi 
     
    12451245    RET=$? 
    12461246 
    1247 #       #RSYNC WITH NETWORK SSH CALL 
    1248 #       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1 
    1249 #       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1 
    1250  
    1251      #RSYNC WITH NFS USE 
    1252      echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1 
    1253      ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 
    1254  
    1255      RET=$? 
    1256      IGCM_sys_Rsync_out $RET 
    1257  
    1258      ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
    1259      (( RET=RET+$? )) 
     1247#       #RSYNC WITH NETWORK SSH CALL 
     1248#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} > out_rsync 2>&1 
     1249#       ${RSYNC} ${RSYNC_opt} -e ssh ${RUN_DIR}/$1 ${STOREHOST}:${2} >> out_rsync 2>&1 
     1250 
     1251     #RSYNC WITH NFS USE 
     1252     echo ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} > out_rsync 2>&1 
     1253     ${RSYNC} ${RSYNC_opt} ${RUN_DIR}/$1 ${2} >> out_rsync 2>&1 
     1254 
     1255     RET=$? 
     1256     IGCM_sys_Rsync_out $RET 
     1257 
     1258     ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
     1259     (( RET=RET+$? )) 
    12601260 
    12611261    if [ ${RET} -gt 0 ] ; then 
     
    12961296    if [ X${JobType} = XRUN ] ; then 
    12971297      if [ X${3} = X ] ; then 
    1298         IGCM_sys_Chmod 444 ${1} 
     1298        IGCM_sys_Chmod 444 ${1} 
    12991299      fi 
    13001300    fi 
     
    13261326  IGCM_debug_PushStack "IGCM_sys_Get" $@ 
    13271327 
    1328   typeset DEST RET dm_liste ifile target file_work  
     1328  typeset DEST RET dm_liste ifile target file_work 
    13291329 
    13301330  if ( $DEBUG_sys ) ; then 
     
    13831383    #   RET=$? 
    13841384    #   if [ ${RET} -gt 0 ] ; then 
    1385     #       echo "ERROR IGCM_sys_Get : again demigration error :" 
    1386     #       cat out_rsync 
    1387     #       IGCM_debug_Exit "IGCM_sys_Get" 
     1385    #       echo "ERROR IGCM_sys_Get : again demigration error :" 
     1386    #       cat out_rsync 
     1387    #       IGCM_debug_Exit "IGCM_sys_Get" 
    13881388    #   fi 
    13891389    #    else 
     
    13981398      (( RET=0 )) 
    13991399      for target in ${dm_liste[*]} ; do 
    1400         local_file=$( basename ${target} ) 
    1401         \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
    1402         (( RET = RET + $? )) 
     1400        local_file=$( basename ${target} ) 
     1401        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
     1402        (( RET = RET + $? )) 
    14031403      done 
    14041404    else 
     
    14071407    fi 
    14081408 
    1409 #       #RSYNC WITH NETWORK SSH CALL 
    1410 #       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1 
    1411 #       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1 
    1412  
    1413      #RSYNC WITH NFS USE 
    1414      echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1 
    1415      ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1 
    1416  
    1417 #       RET=$? 
    1418      IGCM_sys_Rsync_out $RET 
    1419  
    1420      ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
    1421      (( RET=RET+$? )) 
     1409#       #RSYNC WITH NETWORK SSH CALL 
     1410#       echo ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} > out_rsync 2>&1 
     1411#       ${RSYNC} ${RSYNC_opt} -e ssh ${STOREHOST}:"${dm_liste}" ${STOREHOST}:${RUN_DIR}/${DEST} >> out_rsync 2>&1 
     1412 
     1413     #RSYNC WITH NFS USE 
     1414     echo ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} > out_rsync 2>&1 
     1415     ${RSYNC} ${RSYNC_opt} ${dm_liste} ${RUN_DIR}/${DEST} >> out_rsync 2>&1 
     1416 
     1417#       RET=$? 
     1418     IGCM_sys_Rsync_out $RET 
     1419 
     1420     ${libIGCM}/libIGCM_sys/IGCM_analyse_rsync_out.awk out_rsync 
     1421     (( RET=RET+$? )) 
    14221422 
    14231423    if [ ${RET} -gt 0 ] ; then 
     
    14421442  IGCM_debug_PushStack "IGCM_sys_GetBuffer" $@ 
    14431443 
    1444   typeset DEST RET buf_liste ifile target file_work  
     1444  typeset DEST RET buf_liste ifile target file_work 
    14451445 
    14461446  if ( $DEBUG_sys ) ; then 
     
    14601460      (( RET=0 )) 
    14611461      for target in ${buf_liste[*]} ; do 
    1462         local_file=$( basename ${target} ) 
    1463         \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
    1464         (( RET = RET + $? )) 
     1462        local_file=$( basename ${target} ) 
     1463        \cp ${target} ${DEST}/${local_file} >> out_rsync 2>&1 
     1464        (( RET = RET + $? )) 
    14651465      done 
    14661466    else 
     
    15021502#D-#================================================== 
    15031503#D-function IGCM_sys_GetDate_FichArchive 
    1504 #D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE  
     1504#D-* Purpose: donne la date filesys d'un fichier sur le filesystem ARCHIVE 
    15051505#D-* Examples: 
    15061506#D- 
     
    15381538    /ccc/cont003/home/dsm/p86maf/bin/dods_rm public/${LOGIN}/${R_DODS}/${1} # > out_dods_rm 2>&1 
    15391539    RET=$? 
    1540      
     1540 
    15411541#       if [ ${RET} -gt 0 ] ; then 
    1542 #           echo "IGCM_sys_Dods_Rm : error." 
    1543 #           cat out_dods_rm 
    1544 #           IGCM_debug_Exit "IGCM_sys_Dods_Rm" 
     1542#           echo "IGCM_sys_Dods_Rm : error." 
     1543#           cat out_dods_rm 
     1544#           IGCM_debug_Exit "IGCM_sys_Dods_Rm" 
    15451545#       else 
    1546 #           rm out_dods_rm 
     1546#           rm out_dods_rm 
    15471547#       fi 
    15481548 
     
    15751575    RET=$? 
    15761576 
    1577 #       if [ ${RET} -gt 0 ] ; then 
    1578 #           echo "IGCM_sys_Dods_Cp : error." 
    1579 #           cat out_dods_cp 
    1580 #           IGCM_debug_Exit "IGCM_sys_Dods_Cp" 
    1581 #       else 
    1582 #           rm out_dods_cp 
    1583 #       fi 
     1577#       if [ ${RET} -gt 0 ] ; then 
     1578#           echo "IGCM_sys_Dods_Cp : error." 
     1579#           cat out_dods_cp 
     1580#           IGCM_debug_Exit "IGCM_sys_Dods_Cp" 
     1581#       else 
     1582#           rm out_dods_cp 
     1583#       fi 
    15841584 
    15851585  else 
     
    16271627    IGCM_sys_Dods_Cp ${1} 
    16281628    RET=0 
    1629      
     1629 
    16301630    if [ ${RET} -gt 0 ] ; then 
    16311631      echo "IGCM_sys_Put_Dods : error." 
     
    16701670  (( max_omp = 0 )) 
    16711671  for comp in ${config_ListOfComponents[*]} ; do 
    1672          
     1672 
    16731673    eval ExeNameIn=\${config_Executable_${comp}[0]} 
    16741674    eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1675      
     1675 
    16761676    # Only if we really have an executable for the component : 
    16771677    if ( [ "X${ExeNameOut}" != X\"\" ] &&  [ "X${comp}" != "XCPL" ] ) ; then 
     
    17111711############################################################ 
    17121712# Build MPI/OMP scripts 
    1713 function IGCM_sys_build_execution_scripts  
     1713function IGCM_sys_build_execution_scripts 
    17141714{ 
    17151715  IGCM_debug_PushStack "IGCM_sys_build_execution_scripts" $@ 
     
    17171717    echo "IGCM_sys_build_execution_scripts " $@ 
    17181718  fi 
    1719   typeset nodes listnodes init_node start_num init_exec comp ExeNameIn ExeNameOut  
    1720   typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc  
     1719  typeset nodes listnodes init_node start_num init_exec comp ExeNameIn ExeNameOut 
     1720  typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc 
    17211721  typeset num_corempi nombre_restant_node nombre_restant_comp 
    17221722 
     
    17371737 
    17381738      ${HOST_MPIRUN_COMMAND} hostname | sort | uniq > hosts.tmp 
    1739          
     1739 
    17401740      i=0 
    17411741      rm -f hosts 
     
    17481748      done 
    17491749      rm -f hosts.tmp 
    1750              
     1750 
    17511751      listnodes=${host[*]} 
    1752              
    1753       EXECUTION="${HOST_MPIRUN_COMMAND} -hostfile hosts"  
    1754          
     1752 
     1753      EXECUTION="${HOST_MPIRUN_COMMAND} -hostfile hosts" 
     1754 
    17551755      # Initialisation 
    17561756 
     
    17611761 
    17621762      # Test : if oasis is there, we put it at the first position 
    1763              
     1763 
    17641764      for comp in ${config_ListOfComponents[*]} ; do 
    1765                  
     1765 
    17661766        if [ "X${comp}" = "XCPL" ]  ; then 
    1767                      
     1767 
    17681768          eval ExeNameIn=\${config_Executable_${comp}[0]} 
    17691769          eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1770                      
     1770 
    17711771          echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
    17721772          echo ""  >> script_${ExeNameOut}.ksh 
     
    17761776          echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err"  >> script_${ExeNameOut}.ksh 
    17771777          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    1778                      
     1778 
    17791779          init_node=n 
    1780                      
     1780 
    17811781          (( nombre_restant_node = NUM_COREPERNODE - 1 )) 
    17821782          node_num_current=0 
    17831783          node_current=${host[${node_num_current}]} 
    1784                      
    1785           EXECUTION="${EXECUTION} -H ${node_current} -np 1 ./script_${ExeNameOut}.ksh"  
    1786                      
     1784 
     1785          EXECUTION="${EXECUTION} -H ${node_current} -np 1 ./script_${ExeNameOut}.ksh" 
     1786 
    17871787          init_exec=y 
    17881788          start_num=1 
    1789                      
     1789 
    17901790        fi 
    1791                  
     1791 
    17921792      done 
    1793              
     1793 
    17941794      # Then loop on the components (except for oasis) 
    17951795 
    17961796      for comp in ${config_ListOfComponents[*]} ; do 
    1797                  
     1797 
    17981798        eval ExeNameIn=\${config_Executable_${comp}[0]} 
    17991799        eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1800                  
     1800 
    18011801        # Only if we really have an executable for the component : 
    18021802        if ( [ "X${ExeNameOut}" != X\"\" ] &&  [ "X${comp}" != "XCPL" ] ) ; then 
     
    18041804          eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
    18051805          eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    1806                      
     1806 
    18071807          echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
    18081808          # echo "set -vx" >> script_${ExeNameOut}.ksh 
     
    18151815          echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${MYMPIRANK} 2>out_${ExeNameOut}.err.\${MYMPIRANK}"  >> script_${ExeNameOut}.ksh 
    18161816          IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    1817                      
     1817 
    18181818          node_num=0 
    1819                      
    1820           # We define the number of MPI process to be assigned for the component  
     1819 
     1820          # We define the number of MPI process to be assigned for the component 
    18211821 
    18221822          nombre_restant_comp=${comp_proc_mpi_loc} 
    1823                      
     1823 
    18241824          # Loop on the allocated nodes 
    18251825 
     
    18291829            if [ ${node_num} = ${node_num_current} ] ; then 
    18301830 
    1831               node_current=${host[${node_num_current}]} 
    1832  
    1833               # If first time on the node : initialisation  
     1831              node_current=${host[${node_num_current}]} 
     1832 
     1833              # If first time on the node : initialisation 
    18341834 
    18351835              if [ ${init_node} = y ] ; then 
    18361836                nombre_restant_node=${NUM_COREPERNODE} 
    1837               fi 
    1838                              
     1837              fi 
     1838 
    18391839              # Test on the number of OMP threads 
    18401840 
    1841               if [ ${comp_proc_omp_loc} -gt ${nombre_restant_node} ] ; then 
     1841              if [ ${comp_proc_omp_loc} -gt ${nombre_restant_node} ] ; then 
    18421842                (( node_num = node_num + 1 )) 
    18431843                node_num_current=${node_num} 
     
    18491849 
    18501850              (( num_corempi = nombre_restant_node / comp_proc_omp_loc )) 
    1851                              
    1852               if [ ${num_corempi} -gt ${nombre_restant_comp} ] ; then 
     1851 
     1852              if [ ${num_corempi} -gt ${nombre_restant_comp} ] ; then 
    18531853                num_corempi=${nombre_restant_comp} 
    18541854              fi 
    18551855 
    18561856              (( nombre_restant_node = nombre_restant_node - num_corempi * comp_proc_omp_loc )) 
    1857               (( nombre_restant_comp = nombre_restant_comp - num_corempi )) 
    1858                              
    1859               if [ ${init_exec} = y ] ; then 
     1857              (( nombre_restant_comp = nombre_restant_comp - num_corempi )) 
     1858 
     1859              if [ ${init_exec} = y ] ; then 
    18601860                EXECUTION="${EXECUTION} : -H ${node_current} -np ${num_corempi} ./script_${ExeNameOut}.ksh" 
    1861               else       
     1861              else 
    18621862                EXECUTION="${EXECUTION} -H ${node_current} -np ${num_corempi} ./script_${ExeNameOut}.ksh" 
    18631863                init_exec=y 
     
    18651865 
    18661866              ((  start_num = num_corempi + start_num )) 
    1867                              
     1867 
    18681868            else 
    1869                              
    1870               (( node_num = node_num + 1 ))  
    1871               continue 
     1869 
     1870              (( node_num = node_num + 1 )) 
     1871              continue 
    18721872            fi 
    1873                          
    1874             # Test on the number of core/process remaining on the node/component  
    1875                          
     1873 
     1874            # Test on the number of core/process remaining on the node/component 
     1875 
    18761876            if [ ${nombre_restant_node} = 0 ] ; then 
    18771877              (( node_num = node_num + 1 )) 
    1878               node_num_current=${node_num} 
    1879               init_node=y 
     1878              node_num_current=${node_num} 
     1879              init_node=y 
    18801880 
    18811881              if [ ${nombre_restant_comp} = 0 ] ; then 
     
    18851885 
    18861886              node_num_current=${node_num} 
    1887               init_node=n 
    1888                              
    1889               if [ ${nombre_restant_comp} = 0 ] ; then 
    1890                 break 1 
    1891               fi 
     1887              init_node=n 
     1888 
     1889              if [ ${nombre_restant_comp} = 0 ] ; then 
     1890                break 1 
     1891              fi 
    18921892            fi 
    18931893          done 
    18941894        fi 
    18951895      done 
    1896              
     1896 
    18971897    else 
    18981898 
     
    19001900 
    19011901        ## the coupler ie oasis must be the first one 
    1902         for comp in ${config_ListOfComponents[*]} ; do 
    1903              
    1904             eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1905                  
    1906         # for CPL component only 
    1907             if [ "X${comp}" = "XCPL" ] ; then 
    1908                 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
    1909                 echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file  
    1910             fi 
    1911         done 
     1902        for comp in ${config_ListOfComponents[*]} ; do 
     1903 
     1904            eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1905 
     1906        # for CPL component only 
     1907            if [ "X${comp}" = "XCPL" ] ; then 
     1908                eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1909                echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
     1910            fi 
     1911        done 
    19121912 
    19131913        # Then second loop on the components 
    19141914 
    1915         for comp in ${config_ListOfComponents[*]} ; do 
    1916                  
    1917             eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1918                  
     1915        for comp in ${config_ListOfComponents[*]} ; do 
     1916 
     1917            eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1918 
    19191919            # Only if we really have an executable for the component and not the coupler ie oasis: 
    1920             if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then 
    1921                 eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
    1922                 echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file  
    1923             fi 
    1924         done 
    1925         IGCM_sys_Chmod u+x run_file 
    1926  
    1927         EXECUTION="${HOST_MPIRUN_COMMAND} --app ./run_file" 
    1928            
     1920            if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${comp}" != "XCPL" ] ) ; then 
     1921                eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1922                echo "-np ${comp_proc_mpi_loc} ./${ExeNameOut} " >> run_file 
     1923            fi 
     1924        done 
     1925        IGCM_sys_Chmod u+x run_file 
     1926 
     1927        EXECUTION="${HOST_MPIRUN_COMMAND} --app ./run_file" 
     1928 
    19291929    fi 
    19301930 
     
    19341934 
    19351935          # Only if we really have an executable for the component : 
    1936           eval ExeNameOut=\${config_Executable_${comp}[1]} 
    1937           if ( [ "X${ExeNameOut}" != X\"\" ] ) ; then    
    1938                  
    1939               echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
    1940               echo ""  >> script_${ExeNameOut}.ksh 
    1941               if ( ${OK_PARA_OMP} ) ; then  
    1942                   eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    1943                   echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh        
    1944               fi 
    1945               if  ( ${OK_PARA_MPI} ) ; then  
     1936          eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1937          if ( [ "X${ExeNameOut}" != X\"\" ] ) ; then 
     1938 
     1939              echo "#!/bin/ksh" > script_${ExeNameOut}.ksh 
     1940              echo ""  >> script_${ExeNameOut}.ksh 
     1941              if ( ${OK_PARA_OMP} ) ; then 
     1942                  eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
     1943                  echo "OMP_NUM_THREADS=${comp_proc_omp_loc}" >> script_${ExeNameOut}.ksh 
     1944              fi 
     1945              if  ( ${OK_PARA_MPI} ) ; then 
    19461946                  # Default : mpirun used if nb_proc gt 1 
    1947                   # pour sortie out/err par process 
    1948                   # echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${OMPI_COMM_WORLD_RANK} 2>out_${ExeNameOut}.err.\${OMPI_COMM_WORLD_RANK}"  >> script_${ExeNameOut}.ksh 
    1949                   echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
    1950                   IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    1951                   EXECUTION="${HOST_MPIRUN_COMMAND} ./script_${ExeNameOut}.ksh" 
    1952               else 
    1953                   # Default : mpirun is NOT used if nb_proc eq 1 
    1954                   # pour sortie out/err par process 
    1955                   # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh 
    1956                   echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
    1957                   IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
    1958                   EXECUTION="time ./script_${ExeNameOut}.ksh" 
    1959               fi 
    1960           fi 
     1947                  # pour sortie out/err par process 
     1948                  # echo "./${ExeNameOut} > out_${ExeNameOut}.out.\${OMPI_COMM_WORLD_RANK} 2>out_${ExeNameOut}.err.\${OMPI_COMM_WORLD_RANK}"  >> script_${ExeNameOut}.ksh 
     1949                  echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
     1950                  IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
     1951                  EXECUTION="${HOST_MPIRUN_COMMAND} ./script_${ExeNameOut}.ksh" 
     1952              else 
     1953                  # Default : mpirun is NOT used if nb_proc eq 1 
     1954                  # pour sortie out/err par process 
     1955                  # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh 
     1956                  echo "./${ExeNameOut}" >> script_${ExeNameOut}.ksh 
     1957                  IGCM_sys_Chmod u+x script_${ExeNameOut}.ksh 
     1958                  EXECUTION="time ./script_${ExeNameOut}.ksh" 
     1959              fi 
     1960          fi 
    19611961      done 
    1962        
     1962 
    19631963  fi 
    19641964 
Note: See TracChangeset for help on using the changeset viewer.