Changeset 1242 for trunk/libIGCM


Ignore:
Timestamp:
10/06/15 09:34:04 (9 years ago)
Author:
sdipsl
Message:
  • IGCM_config_ConfigureExecution was buggy
  • Fix Ada headers edition
  • typo
  • has been tested
Location:
trunk/libIGCM
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/ins_job

    r1238 r1242  
    108108. ${libIGCM}/libIGCM_date/libIGCM_date.ksh 
    109109. ${libIGCM}/libIGCM_sys/libIGCM_sys.ksh 
     110. ${libIGCM}/libIGCM_config/libIGCM_config.ksh 
    110111if [ $x_e = 'true' ] ; then 
    111112  . ${libIGCM}/libIGCM_ensemble/libIGCM_ensemble.ksh 
     
    161162F_CFG_ENS='ensemble.card'; 
    162163SUBMIT_DIR_ENS=$( pwd ) 
    163 for i in $(find ${d_n}/.. -name ${F_CFG} -print) 
     164#for i in $(find ${d_n}/.. -name ${F_CFG} -print) 
     165for i in $(find $( pwd ) -name ${F_CFG} -print) 
    164166do 
    165167  j=$(cd ${i%/*};/bin/pwd;) 
     
    189191  IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} UserChoices 
    190192  # Set default values 
    191   config_UserChoices_JobNumProcTot=1 
    192193  config_UserChoices_ExpType="" 
    193194  RESOL_ATM_3D=this_is_a_test_string 
     
    257258    \cp ${F_RCI} ${j}; 
    258259   } 
    259    
     260 
     261  #================================== 
     262  # Read ListOfComponents section: 
     263  #echo 
     264  #IGCM_debug_Print 1 "DefineArrayFromSection : ListOfComponents" 
     265 
     266  IGCM_card_DefineArrayFromSection  ${j}'/'${F_CFG} ListOfComponents 
     267  for comp in ${config_ListOfComponents[*]} ; do 
     268    IGCM_card_DefineArrayFromOption  ${j}'/'${F_CFG} ListOfComponents ${comp} 
     269  done 
     270  #IGCM_debug_Print 3 ${config_ListOfComponents[*]} 
     271 
    260272  #================================== 
    261273  # Read Executable section: 
    262   IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} Executable   
     274  IGCM_card_DefineArrayFromSection ${j}'/'${F_CFG} Executable 
    263275 
    264276  # Define the execution context (MPMD, SPMD, MPI/OMP ...) 
    265   IGCM_config_ConfigureExexution 
     277  IGCM_config_ConfigureExecution ${j}'/'${F_CFG} 
    266278 
    267279  # coreNumber    : TOTAL NUMBER OF CORES 
     
    277289      -e "s%::modipsl::%${F_MOD}%" \ 
    278290      -e "s/::Jobname::/${JobName}/" \ 
    279       -e "s/::JobNumProcTot::/${config_UserChoices_JobNumProcTot}/" \ 
    280291      -e "s/::default_project::/${ProjectID}/" \ 
    281292      ${F_JOB} > ${j}'/'${n_f} 
  • trunk/libIGCM/libIGCM_config/libIGCM_config.ksh

    r1238 r1242  
    2222 
    2323  # config.card path 
    24   configPath=$1 
     24  configCardPath=$1 
    2525 
    2626  #================================== 
     
    2929  #================================== 
    3030  # Read libIGCM compatibility version in config.card 
    31   IGCM_card_DefineVariableFromOption ${configPath} Compatibility libIGCM 
     31  IGCM_card_DefineVariableFromOption ${configCardPath} Compatibility libIGCM 
    3232  CompatibilityTag=${config_Compatibility_libIGCM} 
    3333 
     
    4141  IGCM_debug_Print 1 "DefineArrayFromOption  : config_UserChoices" 
    4242 
    43   IGCM_card_DefineArrayFromSection ${configPath} UserChoices 
     43  IGCM_card_DefineArrayFromSection ${configCardPath} UserChoices 
    4444  for option in ${config_UserChoices[*]} ; do 
    45     IGCM_card_DefineVariableFromOption ${configPath} UserChoices ${option} 
     45    IGCM_card_DefineVariableFromOption ${configCardPath} UserChoices ${option} 
    4646    eval auxprint=\${config_UserChoices_${option}} 
    4747    IGCM_debug_Print 3 "${option} : ${auxprint}" 
     
    5353  IGCM_debug_Print 1 "DefineArrayFromOption  : config_Ensemble" 
    5454 
    55   IGCM_card_DefineArrayFromSection ${configPath} Ensemble 
     55  IGCM_card_DefineArrayFromSection ${configCardPath} Ensemble 
    5656  for option in ${config_Ensemble[*]} ; do 
    57     IGCM_card_DefineVariableFromOption ${configPath} Ensemble ${option} 
     57    IGCM_card_DefineVariableFromOption ${configCardPath} Ensemble ${option} 
    5858    eval auxprint=\${config_Ensemble_${option}} 
    5959    IGCM_debug_Print 3 "${option} : ${auxprint}" 
     
    6565  IGCM_debug_Print 1 "DefineArrayFromOption : config_Post" 
    6666 
    67   IGCM_card_DefineArrayFromSection ${configPath} Post 
     67  IGCM_card_DefineArrayFromSection ${configCardPath} Post 
    6868  for option in ${config_Post[*]} ; do 
    69     IGCM_card_DefineVariableFromOption ${configPath} Post ${option} 
     69    IGCM_card_DefineVariableFromOption ${configCardPath} Post ${option} 
    7070    eval auxprint=\${config_Post_${option}} 
    7171    IGCM_debug_Print 3 "${option} : ${auxprint}" 
     
    571571 
    572572#=================================== 
    573 function IGCM_config_ConfigureExexution 
     573function IGCM_config_ConfigureExecution 
    574574{ 
    575   IGCM_debug_PushStack " IGCM_config_ConfigureExexution" 
    576  
    577   echo 
    578   IGCM_debug_Print 1 " IGCM_config_ConfigureExexution" 
    579   echo 
    580  
    581   typeset ExeNameIn ExeNameFirst CompNameFirst comp i 
     575  IGCM_debug_PushStack " IGCM_config_ConfigureExecution" 
     576 
     577  echo 
     578  IGCM_debug_Print 1 " IGCM_config_ConfigureExecution" 
     579  echo 
     580 
     581  typeset ExeNameIn ExeNameFirst CompNameFirst configCardPath comp i 
    582582  typeset tempvar tempvarMPI tempvarNOD NbElts NbExec 
     583 
     584  # config.card path 
     585  configCardPath=$1 
    583586 
    584587  coreNumber=0 
     
    595598 
    596599    IGCM_debug_Print 1 ${comp} 
     600 
     601    # Manage component executable 
     602    IGCM_card_DefineArrayFromOption ${configCardPath} Executable ${comp} 
    597603 
    598604    eval ExeNameIn=\${config_Executable_${comp}[0]} 
     
    722728 
    723729  IGCM_debug_Print 1 "MPI/OMP treatment coreNumber = ${coreNumber}" 
    724  
    725   IGCM_debug_PopStack "IGCM_config_ConfigureExexution" 
     730  IGCM_debug_Print 1 "MPI/OMP treatment mpiTasks = ${mpiTasks}" 
     731  IGCM_debug_Print 1 "MPI/OMP treatment openMPthreads = ${openMPthreads}" 
     732  IGCM_debug_Print 1 "MPI/OMP treatment executionType = ${executionType}" 
     733 
     734  IGCM_debug_PopStack "IGCM_config_ConfigureExecution" 
    726735} 
    727736 
     
    958967  if [ ${Period} -eq 1 ]; then 
    959968    # Define the execution context (MPMD, SPMD, MPI/OMP ...) 
    960     IGCM_config_ConfigureExexution 
     969    IGCM_config_ConfigureExecution ${SUBMIT_DIR}/config.card 
    961970    # Create the execution script for the current context 
    962971    IGCM_sys_build_execution_scripts 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ada.ksh

    r1240 r1242  
    939939    # MPMD + MPI + OMP 
    940940    sed -e "s/::openMPthreads::/${openMPthreads}/" \ 
    941         -e "s/::JobNumProcTot::/${coreNumber}/"    \ 
     941        -e "s/::JobNumProcTot::/${mpiTasks}/"    \ 
    942942      ${file} > ${file}.tmp 
    943943 
Note: See TracChangeset for help on using the changeset viewer.