Changeset 1508 for trunk


Ignore:
Timestamp:
12/09/19 15:49:14 (4 years ago)
Author:
jgipsl
Message:

Correct switch of multi-project using variable DataProject? or by the project set in the main job:
Use full path instead of variable $STORE, $WORK and $SCRATCH.

/gpfsstore/rech/${DataProject?}/${LOGIN}
/gpfswork/rech/${DataProject?}/${LOGIN}
/gpfsscratch/rech/${DataProject?}/${LOGIN}

This is done because "eval $(idrenv -d xxx)" can not be used in a job on computing nodes.

File:
1 edited

Legend:

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

    r1507 r1508  
    194194  if [ X${config_UserChoices_DataProject} = X ] || [ X${config_UserChoices_DataProject} = DEFAULT ]; then 
    195195    # The variable DataProject is not set in in section UserChoices in config.card or it is set to DEFAULT 
    196     # Default option: Change IDRPROJ according to the project used for submission 
    197  
    198     # jg following line does not work in a submitted job: 
    199     eval $(idrenv -d ${PROJECT}) 
     196    # Default option: Set DataProject according to the project used for submission 
     197    DataProject=${PROJECT} 
    200198  else 
    201199    # Use the project set by the variable DataProject in section UserChoices in config.card 
    202     eval $(idrenv -d ${config_UserChoices_DataProject}) 
    203     IGCM_debug_Print 1 "Change DataProject red in config.card : ${config_UserChoices_DataProject}" 
    204   fi 
    205   IGCM_debug_Print 1 "Data project for output to be used: ${IDRPROJ}" 
     200    IGCM_debug_Print 1 "Use DataProject as set in config.card : ${config_UserChoices_DataProject}" 
     201    DataProject=${config_UserChoices_DataProject} 
     202  fi 
     203  IGCM_debug_Print 1 "Data project for output to be used: ${DataProject}" 
    206204 
    207205  #==================================================== 
    208206  #- RUN_DIR_PATH : Temporary working directory (=> TMP) 
    209   typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=${SCRATCH}/RUN_DIR/${SLURM_JOBID}_${$}} 
     207  typeset -r RUN_DIR_PATH=${RUN_DIR_PATH:=/gpfsscratch/rech/${DataProject}/${LOGIN}/RUN_DIR/${SLURM_JOBID}_${$}} 
    210208 
    211209  if [ ! X${config_UserChoices_ARCHIVE} = X ]; then 
     
    216214    #==================================================== 
    217215    #- ARCHIVE (dedicated to large files) 
    218     ARCHIVE=${STORE} 
     216    ARCHIVE=/gpfsstore/rech/${DataProject}/${LOGIN} 
    219217  fi 
    220218 
     
    226224    #==================================================== 
    227225    #- STORAGE (dedicated to small/medium files) 
    228     STORAGE=${WORK} 
     226    STORAGE=/gpfswork/rech/${DataProject}/${LOGIN} 
    229227  fi 
    230228 
     
    232230    #==================================================== 
    233231    #- R_OUT 
    234     R_OUT=${SCRATCH}/IGCM_OUT 
     232    R_OUT=/gpfsscratch/rech/${DataProject}/${LOGIN}/IGCM_OUT 
    235233 
    236234    #==================================================== 
    237235    #- R_FIG (hosting figures : monitoring and atlas, and/or small files) 
    238     R_FIG=${SCRATCH}/IGCM_OUT 
     236    R_FIG=/gpfsscratch/rech/${DataProject}/${LOGIN}/IGCM_OUT 
    239237 
    240238    IGCM_debug_Print 1 "SpaceName=TEST ==> OVERRULE destination path directories" 
     
    256254  #==================================================== 
    257255  #- R_BUF (ONLY FOR double copy an scratch) 
    258   R_BUF=${SCRATCH}/IGCM_OUT 
     256  R_BUF=/gpfsscratch/rech/${DataProject}/${LOGIN}/IGCM_OUT 
    259257 
    260258  IGCM_debug_Print 1 "R_OUT has been defined = ${R_OUT}" 
     
    14351433    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
    14361434    IGCM_debug_Exit "This will stop the job" 
     1435  elif ( [ X${RUN_DIR_PATH} = X${HOME} ] || [ X${RUN_DIR_PATH} = X/gpfswork/rech/${DataProject}/${LOGIN} ] || [ X${RUN_DIR_PATH} = X/gpfsscratch/rech/${DataProject}/${LOGIN} ] || [ X${RUN_DIR_PATH} = X/gpfsstore/rech/${DataProject}/${LOGIN} ] ) ; then 
     1436    IGCM_debug_Print 1 "Variable RUN_DIR_PATH is pointing to an important directory : ${RUN_DIR_PATH}" 
     1437    IGCM_debug_Print 1 "Please check the RUN_DIR_PATH definition in your Job : Job_${config_UserChoices_JobName}" 
     1438    IGCM_debug_Exit "This will stop the job" 
    14371439  fi 
    14381440  IGCM_debug_PopStack "IGCM_sys_check_path" 
Note: See TracChangeset for help on using the changeset viewer.