Changeset 687


Ignore:
Timestamp:
06/18/12 17:21:40 (12 years ago)
Author:
mafoipsl
Message:

On Titane : verification of MPI/OpenMP performances. Header checks added. module load openmp/4thds validated to distribute tasks and threads on different nodes. More information on : wiki:IntegrationOpenMP/EnteteCommandesTitane?

File:
1 edited

Legend:

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

    r686 r687  
    17091709  unset MPI_PLACING_MODE 
    17101710 
     1711  # add module load nb of threads for core placement 
     1712  (( max_omp = 0 )) 
     1713 
     1714  for comp in ${config_ListOfComponents[*]} ; do 
     1715    eval ExeNameIn=\${config_Executable_${comp}[0]} 
     1716    eval ExeNameOut=\${config_Executable_${comp}[1]} 
     1717 
     1718    # Only if we really have an executable for the component : 
     1719    if ( [ "X${ExeNameOut}" != X\"\" ] &&  [ "X${comp}" != "XCPL" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 
     1720      eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
     1721      if [ ${comp_proc_omp_loc} -gt ${max_omp} ] ; then 
     1722        (( max_omp = comp_proc_omp_loc )) 
     1723      fi 
     1724    fi 
     1725  done 
     1726 
     1727  ( [ X${max_omp} = X4 ] || [ X${max_omp} = X8 ] ) &&  { module load openmp/${max_omp}thds ; IGCM_debug_Print 1 "module load openmp/${max_omp}thds" ; } 
     1728 
    17111729  IGCM_debug_PopStack "IGCM_sys_activ_variables" 
    17121730} 
     
    17431761  typeset node_num_current node_current comp_proc_mpi_loc comp_proc_omp_loc 
    17441762  typeset num_corempi nombre_restant_node nombre_restant_comp 
     1763  typeset IGCM_OMP 
    17451764 
    17461765  if [ ! -f ${SUBMIT_DIR}/Job_${config_UserChoices_JobName} ]  ; then 
     
    19521971    fi 
    19531972 
    1954   else # Only one executable. launch it. 
     1973  else # Only one executable. launch it after verifications. test done with : 
     1974      # Job : 
     1975      # #MSUB -n 8 # reservation des processeurs pour le job 
     1976      # #MSUB -N 4 # reservation des nodes pour le job 
     1977      # BATCH_NUM_PROC_TOT=32 
     1978      # 
     1979      # config.card : 
     1980      # ATM= (gcm.e, lmdz.x, 8MPI, 4OMP) 
    19551981 
    19561982      for comp in ${config_ListOfComponents[*]} ; do 
     
    19611987          if ( [ "X${ExeNameOut}" != X\"\" ] && [ "X${ExeNameOut}" != "Xinca.dat" ] ) ; then 
    19621988 
     1989              IGCM_OMP=1 
     1990 
    19631991              if ( ${OK_PARA_OMP} ) ; then 
    19641992                  eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
    19651993                  export OMP_NUM_THREADS=${comp_proc_omp_loc} 
     1994                  IGCMG_OMP=${comp_proc_omp_loc} 
    19661995              fi 
    19671996              if  ( ${OK_PARA_MPI} ) ; then 
    19681997                  eval comp_proc_mpi_loc=\${${comp}_PROC_MPI} 
     1998                  # Check if BATCH_NUM_PROC_TOT = (8*BRIDGE_MSUB_NNODE) 8 because we have 8 cores per node 
     1999                  (( VERIF_BATCH_NUM_PROC_TOT = 8 * BRIDGE_MSUB_NNODE )) 
     2000                  if ( [  ${VERIF_BATCH_NUM_PROC_TOT} -ne ${BATCH_NUM_PROC_TOT} ] ) ; then 
     2001                      IGCM_debug_Print 1 "sys Titane : BATCH_NUM_PROC_TOT <> 8 * BRIDGE_MSUB_NNODE : ${BATCH_NUM_PROC_TOT} <> 8 * ${BRIDGE_MSUB_NNODE} " 
     2002                      IGCM_debug_Print 1 "sys Titane : Check #MSUB -N xx into Job" 
     2003                      IGCM_debug_Exit "IGCM_sys_build_execution_scripts" 
     2004                  fi 
     2005                  # Check if BATCH_NUM_PROC_TOT = (OMP_NUM_THREADS*BRIDGE_MSUB_NPROC) 
     2006                  (( VERIF_BATCH_NUM_PROC_TOT = IGCMG_OMP * BRIDGE_MSUB_NPROC )) 
     2007                  if ( [  ${VERIF_BATCH_NUM_PROC_TOT} -ne ${BATCH_NUM_PROC_TOT} ] ) ; then 
     2008                      IGCM_debug_Print 1 "sys Titane : BATCH_NUM_PROC_TOT <> ${comp}_PROC_OMP * BRIDGE_MSUB_NPROC : ${BATCH_NUM_PROC_TOT} <> ${IGCMG_OMP} * ${BRIDGE_MSUB_NPROC} " 
     2009                      IGCM_debug_Print 1 "sys Titane : Check #MSUB -n xx into Job" 
     2010                      IGCM_debug_Exit "IGCM_sys_build_execution_scripts" 
     2011                  fi 
    19692012                  # Default : mpirun used if nb_proc gt 1 
    19702013                  # pour sortie out/err par process ? more test required 
     
    19722015                  EXECUTION="${HOST_MPIRUN_COMMAND} -np ${comp_proc_mpi_loc} ./${ExeNameOut}" 
    19732016              else 
     2017                  # Check if BATCH_NUM_PROC_TOT = IGCMG_OMP 
     2018                  if ( [  ${IGCM_OMP} -ne ${BATCH_NUM_PROC_TOT} ] ) ; then 
     2019                      IGCM_debug_Print 1 "sys Titane : BATCH_NUM_PROC_TOT <> ${comp}_PROC_OMP : ${BATCH_NUM_PROC_TOT} <> ${BRIDGE_MSUB_NPROC} " 
     2020                      IGCM_debug_Print 1 "sys Titane : Check #MSUB -n xx into Job" 
     2021                      IGCM_debug_Exit "IGCM_sys_build_execution_scripts" 
     2022                  fi 
    19742023                  # Default : mpirun is NOT used if nb_proc eq 1 
    19752024                  # pour sortie out/err par process ? more test required 
    19762025                  # echo "./${ExeNameOut} > out_${ExeNameOut}.out 2>out_${ExeNameOut}.err" >> script_${ExeNameOut}.ksh 
    1977                   EXECUTION="time ./${ExeNameOut}" 
     2026                  EXECUTION="/usr/bin/time ./${ExeNameOut}" 
    19782027              fi 
    19792028          fi 
Note: See TracChangeset for help on using the changeset viewer.