Changeset 1616 for trunk/libIGCM/ins_job


Ignore:
Timestamp:
01/12/24 12:26:28 (4 months ago)
Author:
falletti
Message:

Check OMP threds number (JeanZay? only) before the creation of simulation directory (previously: the check was done at the beginning of the simulation).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/ins_job

    r1615 r1616  
    491491  [[ ${x_v} = 'verbose' ]] && echo "JobName=${JobName}" 
    492492 
     493  #================================== 
     494  # Read ListOfComponents section: 
     495  IGCM_card_DefineArrayFromSection  ${j}'/'${F_CFG} ListOfComponents 
     496  for comp in ${config_ListOfComponents[*]} ; do 
     497    IGCM_card_DefineArrayFromOption  ${j}'/'${F_CFG} ListOfComponents ${comp} 
     498  done 
     499 
     500  # Read Executable section: 
     501  IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} Executable 
     502  # Define the execution context (MPMD, SPMD, MPI/OMP ...) 
     503  IGCM_config_ConfigureExecution ${j}'/'${F_CFG} 
     504 
     505  # coreNumber    : TOTAL NUMBER OF CORES 
     506  # mpiTasks      : TOTAL NUMBER OF MPI TASKS 
     507  # openMPthreads : NUMBER OF OpenMP THREADS 
     508 
     509  #================================== 
     510  ### Check if the number of OMP is good before the creaction of submit directory  
     511  ### (JeanZay only) 
     512  if [ X"${SYSTEM}" == "Xjeanzay" ] ; then 
     513    for comp in ${config_ListOfComponents[*]} ; do 
     514      eval comp_proc_omp_loc=\${${comp}_PROC_OMP} 
     515      if [ ${comp_proc_omp_loc} -gt 1 ] ; then 
     516        # Check if the number of threads is correct 
     517        case ${comp_proc_omp_loc} in 
     518          2|4|5|10|20) 
     519            #IGCM_debug_Print 1 "You use ${comp_proc_omp_loc} OMP threads" 
     520            ;; 
     521          *) 
     522            print "\n################## ERROR with OMP parameters ##################" 
     523            print "${comp_proc_omp_loc} is not possible as number of OMP threads." 
     524            print "Only 2,4,5,10,20 as number of OMP threads are possible in JeanZay."  
     525            print "Please change config.card.\n" 
     526            exit 
     527            ;; 
     528        esac 
     529      fi 
     530    done 
     531  fi   
     532 
     533  #================================== 
    493534  # Add specific treatment for new type of directory structure 
    494535  if [ ${new_struct} == yes ] ; then 
     
    531572    \cp ${F_RCI} ${j}; 
    532573   } 
    533  
    534   #================================== 
    535   # Read ListOfComponents section: 
    536   #echo 
    537   #IGCM_debug_Print 1 "DefineArrayFromSection : ListOfComponents" 
    538  
    539   IGCM_card_DefineArrayFromSection  ${j}'/'${F_CFG} ListOfComponents 
    540   for comp in ${config_ListOfComponents[*]} ; do 
    541     IGCM_card_DefineArrayFromOption  ${j}'/'${F_CFG} ListOfComponents ${comp} 
    542   done 
    543   #IGCM_debug_Print 3 ${config_ListOfComponents[*]} 
    544  
    545   #================================== 
    546   # Read Executable section: 
    547   IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} Executable 
    548  
    549   # Define the execution context (MPMD, SPMD, MPI/OMP ...) 
    550   IGCM_config_ConfigureExecution ${j}'/'${F_CFG} 
    551  
    552   # coreNumber    : TOTAL NUMBER OF CORES 
    553   # mpiTasks      : TOTAL NUMBER OF MPI TASKS 
    554   # openMPthreads : NUMBER OF OpenMP THREADS 
    555574 
    556575  # File name for Job_debug 
Note: See TracChangeset for help on using the changeset viewer.