Ignore:
Timestamp:
10/05/15 15:26:52 (9 years ago)
Author:
sdipsl
Message:
  • continuation of r1238 for ciclad, obelix, default and iitm.
  • correct typo
File:
1 edited

Legend:

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

    r1230 r1239  
    728728 
    729729#D-#================================================== 
    730 #D-function IGCM_sys_desactiv_variables 
     730#D-function IGCM_sys_activ_variables 
    731731#D-* Purpose: set environement variables prior to execution 
    732732#D-* Examples: 
     
    771771 
    772772  IGCM_debug_PopStack "IGCM_sys_desactiv_variables" 
     773} 
     774 
     775############################################################ 
     776# Update job headers to be used by the scheduler 
     777 
     778#D-#================================================== 
     779#D-function IGCM_sys_updateHeaders 
     780#D-* Purpose: Update job headers to be used by the scheduler 
     781#D-* Examples: IGCM_sys_updateHeaders /path/to/Job_MYEXP 
     782#D- 
     783function IGCM_sys_updateHeaders { 
     784  IGCM_debug_PushStack "IGCM_sys_updateHeaders" 
     785  if ( $DEBUG_sys ) ; then 
     786    echo "IGCM_sys_updateHeaders" 
     787  fi 
     788  typeset file 
     789  file=$1 
     790 
     791  if [ ${executionType} -eq 1 ] ; then 
     792    # MPMD + MPI 
     793    sed -e "/::openMPthreads::/d"                  \ 
     794        -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
     795      ${file} > ${file}.tmp 
     796 
     797  elif [ ${executionType} -eq 2 ] ; then 
     798    # MPMD + MPI + OMP 
     799    sed -e "s/::openMPthreads::/${openMPthreads}/" \ 
     800        -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
     801      ${file} > ${file}.tmp 
     802 
     803  elif [ ${executionType} -eq 3 ] ; then 
     804    # SPMD + MPI/OMP 
     805    sed -e "s/::openMPthreads::/${openMPthreads}/" \ 
     806        -e "s/::JobNumProcTot::/${mpiTasks}/"      \ 
     807      ${file} > ${file}.tmp 
     808 
     809  elif [ ${executionType} -eq 4 ] ; then 
     810    # SPMD + MPI only 
     811    sed -e "s/::JobNumProcTot::/${mpiTasks}/"      \ 
     812        -e "/::openMPthreads::/d"                  \ 
     813      ${file} > ${file}.tmp 
     814 
     815  elif [ ${executionType} -eq 5 ] ; then 
     816    # SPMD + OMP only 
     817    sed -e "s/::openMPthreads::/${openMPthreads}/" \ 
     818        -e "/::JobNumProcTot::/d"                  \ 
     819      ${file} > ${file}.tmp 
     820 
     821  elif [ ${executionType} -eq 6 ] ; then 
     822    # SEQUENTIAL THEN 
     823    sed -e "s/::JobNumProcTot::/1/"                \ 
     824        -e "/::openMPthreads::/d"                  \ 
     825      ${file} > ${file}.tmp 
     826 
     827  fi 
     828 
     829  IGCM_sys_Mv ${file}.tmp ${file} 
     830 
     831  IGCM_debug_PopStack "IGCM_sys_updateHeaders" 
    773832} 
    774833 
Note: See TracChangeset for help on using the changeset viewer.