From bdd9ee6669ade2e01be8f219bad0837f398fdec9 Mon Sep 17 00:00:00 2001 From: tradke Date: Wed, 12 Sep 2001 16:03:17 +0000 Subject: 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 --- src/LoadAware.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'src') 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); -- cgit v1.2.3