Ignore:
Timestamp:
2017-02-15T17:24:10+01:00 (4 years ago)
Author:
timgraham
Message:

Added option to specify required memory for jobs submitted to a compute node

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r7681_rebuild_nemo/NEMOGCM/TOOLS/REBUILD_NEMO/rebuild_nemo

    r7683 r7685  
    1818   echo "            -d deflate_level   deflate level for output files (key_netcdf4 only)" 
    1919   echo "            -n namelist        full path to namelist file to be created (otherwise default nam_rebuild+_process_id is used)" 
     20   echo "            -r memory          Memory to request on compute node including units (Default = 10Gb)" 
    2021   echo 
    2122   exit 1 
    2223} 
    2324 
    24 while getopts c:n:t:d:lm opt 
     25while getopts c:n:t:d:r:lm opt 
    2526do 
    2627  case ${opt} in 
     
    3940      m)  
    4041         NMASK="TRUE" 
     42         echo "mask" 
    4143      ;; 
    4244      d) 
     
    4547      n) 
    4648         nam_rebuild=${OPTARG} 
     49      ;; 
     50      r) 
     51         MEMORY=${OPTARG} 
    4752      ;; 
    4853  esac 
     
    6267export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} 
    6368nam_rebuild=${nam_rebuild:-nam_rebuild_$$} 
     69MEMORY=${MEMORY:-10Gb} 
    6470 
    6571if [[ -n ${DIM1} && -n ${DIM2} ]] ; then 
     
    96102   #The process ID is appended to the end of the file name so it is unique 
    97103   cat ${script_dir}/BATCH_TEMPLATES/${batch_file} | sed -e"s/NTHREADS/${OMP_NUM_THREADS}/" \ 
     104      -e"s/MEMORY/${MEMORY}/" \ 
    98105      -e"s:INDIR:${script_dir}:" \ 
    99106      -e"s/NAMELIST/${nam_rebuild}/" > ${batch_file}_$$.sh 
Note: See TracChangeset for help on using the changeset viewer.