diff options
author | Erik Schnetter <schnetter@cct.lsu.edu> | 2009-11-10 14:31:35 -0600 |
---|---|---|
committer | Barry Wardell <barry.wardell@gmail.com> | 2011-12-14 16:45:13 +0000 |
commit | bd2df888ecaece594a886df8de14cdc75e125db2 (patch) | |
tree | e761c07432d34da56a3a311a0aa2dbb08688cd16 /Carpet/Carpet | |
parent | c0d002f006fbde6c8a3f5c6c189df615ffefecd3 (diff) |
Carpet: Add parameter no_split_direction
Add new parameter no_split_direction that ensures that a domain is not
split (distributed onto several processes) in a certain direction.
Diffstat (limited to 'Carpet/Carpet')
-rw-r--r-- | Carpet/Carpet/param.ccl | 8 | ||||
-rw-r--r-- | Carpet/Carpet/src/Recompose.cc | 3 |
2 files changed, 9 insertions, 2 deletions
diff --git a/Carpet/Carpet/param.ccl b/Carpet/Carpet/param.ccl index d221d2158..1c1f7f76f 100644 --- a/Carpet/Carpet/param.ccl +++ b/Carpet/Carpet/param.ccl @@ -398,11 +398,17 @@ CCTK_INT processor_topology_3d_z "Number of processors in z-direction" STEERABLE 1:* :: "must be positive" } 1 -CCTK_INT split_direction "Direction in which the domain should be split" STEERABLE=recover +CCTK_INT split_direction "Direction in which the domain should be split (for processor_topology=along-dir)" STEERABLE=recover { 0:* :: "0 for x, 1 for y, 2 for z, etc." } 2 +CCTK_INT no_split_direction "Direction in which the domain must not be split (for processor_topology=automatic)" STEERABLE=recover +{ + -1 :: "split in all directions" + 0:* :: "0 for x, 1 for y, 2 for z, etc." +} -1 + BOOLEAN constant_load_per_processor "Keep the load per processor constant -- this is meant for benchmarks" STEERABLE=recover { } "no" diff --git a/Carpet/Carpet/src/Recompose.cc b/Carpet/Carpet/src/Recompose.cc index f1f0b8834..65485d61d 100644 --- a/Carpet/Carpet/src/Recompose.cc +++ b/Carpet/Carpet/src/Recompose.cc @@ -1399,7 +1399,8 @@ namespace Carpet { // Choose a number of slices for this direction CCTK_REAL const mycost1 = mycost * pow(nprocs / totalcost, CCTK_REAL(1) / alldims); - int const nslices = min (nprocs, int (floor (mycost1 + CCTK_REAL(0.5)))); + int const nslices1 = min (nprocs, int (floor (mycost1 + CCTK_REAL(0.5)))); + int const nslices = mydim==no_split_direction ? 1 : nslices1; assert (nslices <= nprocs); if (recompose_verbose) cout << "SRMAR " << mydim << " nprocs " << nprocs << endl; if (recompose_verbose) cout << "SRMAR " << mydim << " nslices " << nslices << endl; |