aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-09-12 16:03:17 +0000
committertradke <tradke@b61c5cb5-eaca-4651-9a7a-d64986f99364>2001-09-12 16:03:17 +0000
commitbdd9ee6669ade2e01be8f219bad0837f398fdec9 (patch)
tree9266b23dcb08ea88a032cda6c638450d85a95721 /src
parent64cfbb459bda999fc1153ec2a1995fb8dfab1515 (diff)
Removed restriction in processor topology setup which
was limited to work for 1D, 2D, and 3D arrays only. Now arrays of arbitrary dimensions can be managed by PUGH with automatic topology setup. git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGH/trunk@344 b61c5cb5-eaca-4651-9a7a-d64986f99364
Diffstat (limited to 'src')
-rw-r--r--src/LoadAware.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/LoadAware.c b/src/LoadAware.c
index ea01efd..fcff53d 100644
--- a/src/LoadAware.c
+++ b/src/LoadAware.c
@@ -166,7 +166,7 @@ int PUGH_SetPartitionInfo (int dim, const char *partition_info[])
int PUGH_GetBounds (int dim, int *bounds[], int nprocs[], int nsize[])
{
DECLARE_CCTK_PARAMETERS
- int retval, manual, external_manual;
+ int i, retval, manual, external_manual;
const char *partition_info;
@@ -208,8 +208,18 @@ int PUGH_GetBounds (int dim, int *bounds[], int nprocs[], int nsize[])
}
else
{
- CCTK_WARN (1, "Only 1D, 2D, and 3D supported");
- retval = -1;
+ if (manual)
+ {
+ CCTK_WARN (1, "Only 1D, 2D, and 3D supported in manual topology setup");
+ retval = -1;
+ }
+ else
+ {
+ for (i = 0; i < dim; i++)
+ {
+ PUGH_GetSliceSizes (nprocs[i], nsize[i], NULL, &bounds[i], 0);
+ }
+ }
}
return (retval);