From e35a21fdcc0c6aca0543caafde37b2ff74a4e264 Mon Sep 17 00:00:00 2001 From: Erik Schnetter Date: Wed, 27 Jul 2005 20:18:00 +0000 Subject: CarpetLib: Output memory statistics, and limit maximum memory usage Introduce a new parameter print_memstats_every. When non-zero, output the current and total allocated amount of memory (per process). Introduce a new parameter max_allowed_memory_MB. When more than that amount should be allocated on the current processor, abort the run. Only memory for grid variables counts; memory for administrative overhead is ignored. darcs-hash:20050727201851-891bb-c1ff9fc30ff949d576d500fbf70ad7fb5084836a.gz --- Carpet/CarpetLib/param.ccl | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Carpet/CarpetLib/param.ccl') diff --git a/Carpet/CarpetLib/param.ccl b/Carpet/CarpetLib/param.ccl index 6966e1282..75b183e14 100644 --- a/Carpet/CarpetLib/param.ccl +++ b/Carpet/CarpetLib/param.ccl @@ -26,6 +26,22 @@ BOOLEAN save_memory_during_regridding "Save some memory during regridding at the { } "no" + + +INT print_memstats_every "Report periodically how much memory is used per process" STEERABLE=always +{ + 0 :: "don't report" + 1:* :: "report every so many iterations" +} 0 + +INT max_allowed_memory_MB "Maximum allowed amount of memory per process (in Megabytes)" STEERABLE=always +{ + 0 :: "no maximum" + 1:* :: "abort if more memory is used" +} 0 + + + # Options to tune MPI communication INT max_mpi_tags "Maximum number of MPI tags to use" -- cgit v1.2.3