Changeset 1485 for trunk


Ignore:
Timestamp:
06/17/19 17:41:07 (5 years ago)
Author:
jgipsl
Message:

Do for other hosts what already was done for irene: now read EnvFile? from config.card and source this file if it exists, otherwise source default file. Also some homogenization.

Location:
trunk/libIGCM/libIGCM_sys
Files:
5 edited

Legend:

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

    r1459 r1485  
    9090 
    9191#==================================================== 
     92# Access to module command 
     93#==================================================== 
     94source /smplocal/pub/Modules/default/init/ksh 
     95 
     96#==================================================== 
    9297# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    9398#==================================================== 
    94 source /smplocal/pub/Modules/default/init/ksh 
    95 if ( [ "X${LOADL_STEP_TYPE}" = "XPARALLEL" ] || [ "X${LOADL_STEP_TYPE}" = "XSERIAL" ] ) ; then 
    96   module load python/2.7.10 > /dev/null 2>&1 
    97   . /smphome/rech/psl/rpsl035/.atlas_env_ada_intel_2013_0_bash > /dev/null 2>&1 
     99if [ X${TaskType} = Xcomputing ] ; then 
     100    IGCM_debug_Print 1 "Modules will be loaded later in IGCM_sys_activ_variables." 
    98101else 
    99   module load python/2.7.10 > /dev/null 2>&1 
    100   module unload intel > /dev/null 2>&1 
    101   module load intel/2016.2 > /dev/null 2>&1 
    102   . /smphome/rech/psl/rpsl035/.atlas_env_ada_bash > /dev/null 2>&1 
    103   export PCMDI_MP=/workgpfs/rech/psl/rpsl035/PCMDI-MP 
    104   export UVCDAT_ANONYMOUS_LOG=no 
     102    if ( [ "X${LOADL_STEP_TYPE}" = "XPARALLEL" ] || [ "X${LOADL_STEP_TYPE}" = "XSERIAL" ] ) ; then 
     103        . /smphome/rech/psl/rpsl035/.atlas_env_ada_intel_2013_0_bash > /dev/null 2>&1 
     104    else 
     105        module unload intel > /dev/null 2>&1 
     106        module load intel/2016.2 > /dev/null 2>&1 
     107        . /smphome/rech/psl/rpsl035/.atlas_env_ada_bash > /dev/null 2>&1 
     108        export PCMDI_MP=/workgpfs/rech/psl/rpsl035/PCMDI-MP 
     109        export UVCDAT_ANONYMOUS_LOG=no 
     110    fi 
    105111fi 
     112 
     113# Load python 
     114module load python/2.7.10 > /dev/null 2>&1 
     115 
    106116[ ! X${TaskType} = Xchecking ] && IGCM_debug_Print 1 "List of loaded modules:" 
    107117[ ! X${TaskType} = Xchecking ] && module list 
     
    923933    echo "IGCM_sys_activ_variables" 
    924934  fi 
     935 
     936# -------------------------------------------------------------------- 
     937#D- MODULE specifications 
     938# -------------------------------------------------------------------- 
     939  # Source the file EnvFile containing all module load needed to run the model. 
     940  # EnvFile can be specified in config.card. If this is the case and if the file exists,  
     941  # it will be used. Otherwise a default file will be used. 
     942  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
     943      # EnvFile is set in config.card and the file exists 
     944      IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
     945      EnvFile=${config_UserChoices_EnvFile} 
     946  else 
     947      IGCM_debug_Print 1 "IGCM_sys_active_variables : Default modules will be used" 
     948      EnvFile=/smphome/rech/psl/rpsl035/.atlas_env_ada_intel_2013_0_bash > /dev/null 2>&1 
     949  fi 
     950  IGCM_debug_Print 1 "IGCM_sys_active_variables : Following EnvFile will be used :"  
     951  IGCM_debug_Print 1 ${EnvFile} 
     952  . ${EnvFile} 
     953 
     954  IGCM_debug_Print 1 "IGCM_sys_active_variables : Now loaded modules for Ada. " 
     955  module list 
    925956 
    926957# -------------------------------------------------------------------- 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_ciclad.ksh

    r1459 r1485  
    9696# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    9797#==================================================== 
    98 if [ $CENTER == IPSL-ciclad ] ; then 
    99     # At ciclad 
    100     export PATH=${PATH}:/home/igcmg/rebuild/src_X64_CICLAD/modipsl_v2_2_3_netcdf4.2/bin/ 
    101     module load python/2.7-anaconda > /dev/null 2>&1 
    102     . /home/igcmg/.atlas_env_ciclad_ksh 
     98if [ X${TaskType} = Xcomputing ] ; then 
     99    IGCM_debug_Print 1 "Modules will be loaded later in IGCM_sys_activ_variables." 
    103100else 
    104     # At climserv use the same files stored at ciclad but adapt the path 
    105     export PATH=${PATH}:/ciclad-home/igcmg/rebuild/src_X64_CICLAD/modipsl_v2_2_3_netcdf4.2/bin/ 
    106     module load python/2.7-anaconda > /dev/null 2>&1 
    107     . /ciclad-home/igcmg/.atlas_env_ciclad_ksh 
     101    if [ $CENTER == IPSL-ciclad ] ; then 
     102        # At ciclad 
     103        . /home/igcmg/.atlas_env_ciclad_ksh  
     104    else 
     105        # At climserv use the same files stored at ciclad but adapt the path 
     106        . /ciclad-home/igcmg/.atlas_env_ciclad_ksh 
     107    fi 
    108108fi 
     109 
     110# Load python 
     111module load python/2.7-anaconda > /dev/null 2>&1 
    109112 
    110113[ ! X${TaskType} = Xchecking ] && IGCM_debug_Print 1 "List of loaded modules:" 
     
    114117# Host specific DIRECTORIES 
    115118#==================================================== 
    116  
     119# For rebuild 
     120if [ $CENTER == IPSL-ciclad ] ; then 
     121    export PATH=${PATH}:/home/igcmg/rebuild/src_X64_CICLAD/modipsl_v2_2_3_netcdf4.2/bin/ 
     122else 
     123    export PATH=${PATH}:/ciclad-home/igcmg/rebuild/src_X64_CICLAD/modipsl_v2_2_3_netcdf4.2/bin/ 
     124fi 
    117125#==================================================== 
    118126#- MirrorlibIGCM for frontend 
     
    771779    echo "IGCM_sys_activ_variables" 
    772780  fi 
     781 
     782# -------------------------------------------------------------------- 
     783#D- MODULE specifications 
     784# -------------------------------------------------------------------- 
     785  # Source the file EnvFile containing all module load needed to run the model. 
     786  # EnvFile can be specified in config.card. If this is the case and if the file exists,  
     787  # it will be used. Otherwise a default file will be used. 
     788  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
     789      # EnvFile is set in config.card and the file exists 
     790      IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
     791      EnvFile=${config_UserChoices_EnvFile} 
     792  else 
     793      IGCM_debug_Print 1 "IGCM_sys_active_variables : Default modules will be used" 
     794      if [ $CENTER == IPSL-ciclad ] ; then 
     795          # At ciclad 
     796          EnvFile=/home/igcmg/.atlas_env_ciclad_ksh  
     797      else 
     798          # At climserv use the same files stored at ciclad but adapt the path 
     799          EnvFile=/ciclad-home/igcmg/.atlas_env_ciclad_ksh 
     800      fi 
     801  fi 
     802  IGCM_debug_Print 1 "IGCM_sys_active_variables : Following EnvFile will be used :"  
     803  IGCM_debug_Print 1 ${EnvFile} 
     804  . ${EnvFile} 
     805 
     806  IGCM_debug_Print 1 "IGCM_sys_active_variables : Now loaded modules for ciclad/climserv. " 
     807  module list 
    773808 
    774809# -------------------------------------------------------------------- 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_default.ksh

    r1484 r1485  
    9393#. /home/${LOGIN}/.atlas_env_${HOST}_ksh 
    9494#export PATH=${PATH}:/home/${LOGIN}/rebuild/bin/ 
     95IGCM_debug_Print 1 "Modules will be loaded later in IGCM_sys_activ_variables." 
    9596 
    9697#==================================================== 
     
    711712    echo "IGCM_sys_activ_variables" 
    712713  fi 
     714 
     715# -------------------------------------------------------------------- 
     716#D- MODULE specifications 
     717# -------------------------------------------------------------------- 
     718  # Source the file EnvFile containing all module load needed to run the model. 
     719  # EnvFile can be specified in config.card. If this is the case and if the file exists,  
     720  # it will be used. Otherwise at default host, no file will be used. 
     721  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
     722      # EnvFile is set in config.card and the file exists 
     723      IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
     724      EnvFile=${config_UserChoices_EnvFile} 
     725 
     726      IGCM_debug_Print 1 "IGCM_sys_active_variables : Following EnvFile will be used :"  
     727      IGCM_debug_Print 1 ${EnvFile} 
     728      . ${EnvFile} 
     729  else 
     730      IGCM_debug_Print 1 "IGCM_sys_active_variables : No modules will be loaded in default set up."  
     731  fi 
     732 
     733  IGCM_debug_Print 1 "IGCM_sys_active_variables : Now loaded modules for default system. " 
     734  module list 
    713735 
    714736# -------------------------------------------------------------------- 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_irene.ksh

    r1482 r1485  
    9393#==================================================== 
    9494if [ X${TaskType} = Xcomputing ] ; then 
    95   IGCM_debug_Print 1 "Module will be loaded once we know the compiler version" 
     95  IGCM_debug_Print 1 "Modules will be loaded later in IGCM_sys_activ_variables." 
    9696else 
    9797  module purge > /dev/null 2>&1 
     
    10801080# -------------------------------------------------------------------- 
    10811081  # Source the file EnvFile containing all module load needed to run the model. 
    1082   # Use default a default file on the shared account or use an optional file specified in config.card. 
     1082  # EnvFile can be specified in config.card. If this is the case and if the file exists,  
     1083  # it will be used. Otherwise a default file will be used. 
    10831084  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
    10841085      # EnvFile is set in config.card and the file exists 
     
    11021103  IGCM_debug_Print 1 "IGCM_sys_active_variables : Now loaded modules for Irene. " 
    11031104  module list 
    1104  
    1105   # Keep track of this 
    1106   [ ! X${TaskType} = Xchecking ] && IGCM_debug_Print 1 "List of loaded modules:" 
    1107   [ ! X${TaskType} = Xchecking ] && module list 
    11081105 
    11091106# -------------------------------------------------------------------- 
  • trunk/libIGCM/libIGCM_sys/libIGCM_sys_obelix.ksh

    r1481 r1485  
    8989 
    9090#==================================================== 
     91# Access to module command 
     92#==================================================== 
     93. /usr/share/Modules/init/ksh 
     94 
     95#==================================================== 
    9196# Set environment tools (ferret, nco, cdo, rebuild, ...) 
    9297#==================================================== 
    93 . /usr/share/Modules/init/ksh  
     98if [ X${TaskType} = Xcomputing ] ; then 
     99    IGCM_debug_Print 1 "Modules will be loaded later in IGCM_sys_activ_variables." 
     100else 
     101    . /home/orchideeshare/igcmg/MachineEnvironment/obelix/env_atlas_obelix 
     102fi 
     103 
     104[ ! X${TaskType} = Xchecking ] && IGCM_debug_Print 1 "List of loaded modules:" 
     105[ ! X${TaskType} = Xchecking ] && module list 
     106 
     107# Load python 
    94108module load python/2.7.5 
    95 . /home/orchideeshare/igcmg/MachineEnvironment/obelix/env_atlas_obelix 
     109 
     110#==================================================== 
     111# Host specific DIRECTORIES 
     112#==================================================== 
     113# For rebuild 
    96114export PATH=${PATH}:/home/orchideeshare/igcmg/IOIPSL_PLUS/modipsl.tagv2_2_4/bin/ 
    97  
    98 #==================================================== 
    99 # Host specific DIRECTORIES 
    100 #==================================================== 
    101115 
    102116#==================================================== 
     
    733747    echo "IGCM_sys_activ_variables" 
    734748  fi 
     749 
     750# -------------------------------------------------------------------- 
     751#D- MODULE specifications 
     752# -------------------------------------------------------------------- 
     753  # Source the file EnvFile containing all module load needed to run the model. 
     754  # EnvFile can be specified in config.card. If this is the case and if the file exists,  
     755  # it will be used. Otherwise a default file will be used. 
     756  if [ ! X${config_UserChoices_EnvFile} = X ] && [ -f ${config_UserChoices_EnvFile} ] ; then 
     757      # EnvFile is set in config.card and the file exists 
     758      IGCM_debug_Print 1 "EnvFile set in config.card will be used" 
     759      EnvFile=${config_UserChoices_EnvFile} 
     760  else 
     761      IGCM_debug_Print 1 "IGCM_sys_active_variables : Default modules will be used" 
     762      EnvFile=/home/orchideeshare/igcmg/MachineEnvironment/obelix/env_atlas_obelix 
     763  fi 
     764  IGCM_debug_Print 1 "IGCM_sys_active_variables : Following EnvFile will be used :"  
     765  IGCM_debug_Print 1 ${EnvFile} 
     766  . ${EnvFile} 
     767 
     768  IGCM_debug_Print 1 "IGCM_sys_active_variables : Now loaded modules for obelix. " 
     769  module list 
    735770 
    736771# -------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.