New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7686 for branches/UKMO/dev_r7681_rebuild_nemo/NEMOGCM/TOOLS/REBUILD_NEMO/rebuild_nemo – NEMO

Ignore:
Timestamp:
2017-02-16T11:10:51+01:00 (6 years ago)
Author:
timgraham
Message:

Added code to increase permitted number of open files

File:
1 edited

Legend:

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

    r7685 r7686  
    6969MEMORY=${MEMORY:-10Gb} 
    7070 
     71#Find out the maximum number of files that can be opened and increase if necessary) 
     72nopen=$(ulimit -n) 
     73if [[ $ndomain -gt $nopen ]] ; then 
     74  nopen=$((ndomain+2)) 
     75fi 
     76 
    7177if [[ -n ${DIM1} && -n ${DIM2} ]] ; then 
    7278   dim_str=" dims '${DIM1}','${DIM2}'" 
     
    104110      -e"s/MEMORY/${MEMORY}/" \ 
    105111      -e"s:INDIR:${script_dir}:" \ 
     112      -e"s/NOPEN/${nopen}/" \ 
    106113      -e"s/NAMELIST/${nam_rebuild}/" > ${batch_file}_$$.sh 
    107114    
     
    110117 
    111118else 
     119   ulimit -n $nopen 
    112120   ${script_dir}/rebuild_nemo.exe $nam_rebuild 
    113121fi 
Note: See TracChangeset for help on using the changeset viewer.