Skip to content

Commit

Permalink
Merge branch 'jgfouca/cime/core_file_support' into master (PR #1353)
Browse files Browse the repository at this point in the history
Add better support for core files

Use python resource library, similar to ulimit for bash, to
try to remove any size limits on core files.

Fixes #1308

[BFB]

* jgfouca/cime/core_file_support:
  Add better support for core files
  • Loading branch information
jgfouca committed Mar 29, 2017
2 parents 16e850d + a4e1d6d commit 62c2630
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion utils/python/CIME/case_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from CIME.provenance import save_prerun_provenance, save_postrun_provenance
from CIME.preview_namelists import create_namelists

import shutil, time, sys, os, glob
import shutil, time, sys, os, glob, resource

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -200,6 +200,13 @@ def case_run(case):
"Please submit your run using the submit script like so:"
" ./case.submit")

# If we need to produce core files, we need to try to ensure that the
# system will support them
try:
resource.setrlimit(resource.RLIMIT_CORE, (resource.RLIM_INFINITY, resource.RLIM_INFINITY))
except resource.error:
pass

data_assimilation = case.get_value("DATA_ASSIMILATION")
data_assimilation_cycles = case.get_value("DATA_ASSIMILATION_CYCLES")
data_assimilation_script = case.get_value("DATA_ASSIMILATION_SCRIPT")
Expand Down

0 comments on commit 62c2630

Please sign in to comment.