diff options
author | Erik Schnetter <schnetter@gmail.com> | 2013-07-11 15:14:41 -0400 |
---|---|---|
committer | Erik Schnetter <schnetter@gmail.com> | 2013-07-11 15:14:41 -0400 |
commit | c024f7e97655c2daf25fdcd18ddc8ee48b7bd412 (patch) | |
tree | 8cea1fc9a15d45b959122d14cb9fab74d9fcb674 | |
parent | fb8888e0a686e1cec2351cd52631d2c838f4a87a (diff) |
LoopControl: Turn hard-coded parameters into Cactus parameters
-rw-r--r-- | Carpet/LoopControl/param.ccl | 22 | ||||
-rw-r--r-- | Carpet/LoopControl/src/loopcontrol.cc | 5 |
2 files changed, 22 insertions, 5 deletions
diff --git a/Carpet/LoopControl/param.ccl b/Carpet/LoopControl/param.ccl index 33535f703..6bbd1abd5 100644 --- a/Carpet/LoopControl/param.ccl +++ b/Carpet/LoopControl/param.ccl @@ -95,3 +95,25 @@ INT loopsize_k "Size of each thread's loop in k direction (in grid points) for m { 1:* :: "" } 8 + + + +CCTK_INT max_size_factor "Maximum size for modifying loop sizes" STEERABLE=always +{ + 1:* :: "" +} 4 + +CCTK_REAL very_expensive_factor "Params worse than the current-best by more than this factor are ignored more quickly" STEERABLE=always +{ + 1.0:* :: "" +} 1.5 + +CCTK_INT tryout_iterations "Try out new params for this many iterations before judging them" STEERABLE=always +{ + 1:* :: "" +} 1 + +CCTK_REAL random_jump_probability "Probability of a random jump to begin exploring a very different param" STEERABLE=always +{ + 0.0:1.0 :: "" +} 0.1 diff --git a/Carpet/LoopControl/src/loopcontrol.cc b/Carpet/LoopControl/src/loopcontrol.cc index 2915f922d..fab467f28 100644 --- a/Carpet/LoopControl/src/loopcontrol.cc +++ b/Carpet/LoopControl/src/loopcontrol.cc @@ -638,11 +638,6 @@ void lc_control_init(lc_control_t *restrict const control, lc_setup_t& setup = *descr->current_setup; - const int max_size_factor = 4; - const double very_expensive_factor = 1.5; - const int tryout_iterations = 1; // 10; - const double random_jump_probability = 0.1; - enum choices_t { choice_set_default, choice_keep_current, |