From b262bb454642eeb54827e2055aeb2bf834ec69a1 Mon Sep 17 00:00:00 2001 From: Engin Kayraklioglu Date: Wed, 28 Aug 2024 13:34:46 -0700 Subject: [PATCH 1/3] Disable ALA for DR by default Signed-off-by: Engin Kayraklioglu --- modules/internal/DefaultRectangular.chpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/internal/DefaultRectangular.chpl b/modules/internal/DefaultRectangular.chpl index d218b0a3ec31..0281d08e25bf 100644 --- a/modules/internal/DefaultRectangular.chpl +++ b/modules/internal/DefaultRectangular.chpl @@ -56,7 +56,7 @@ module DefaultRectangular { config param earlyShiftData = true; config param usePollyArrayIndex = false; - config param defaultRectangularSupportsAutoLocalAccess = true; + config param defaultRectangularSupportsAutoLocalAccess = false; enum ArrayStorageOrder { RMO, CMO } config param defaultStorageOrder = ArrayStorageOrder.RMO; From 7ee02b31eaaeed3f5cb88627287a04e332ecc346 Mon Sep 17 00:00:00 2001 From: Engin Kayraklioglu Date: Wed, 28 Aug 2024 15:16:33 -0700 Subject: [PATCH 2/3] Adjust some tests Signed-off-by: Engin Kayraklioglu --- .../autoAggregation/localArrays.bad | 65 +++++++++++++++++++ .../autoAggregation/localArrays.future | 4 ++ .../autoLocalAccess/localArrays.notest | 6 ++ 3 files changed, 75 insertions(+) create mode 100644 test/optimizations/autoAggregation/localArrays.bad create mode 100644 test/optimizations/autoAggregation/localArrays.future create mode 100644 test/optimizations/autoLocalAccess/localArrays.notest diff --git a/test/optimizations/autoAggregation/localArrays.bad b/test/optimizations/autoAggregation/localArrays.bad new file mode 100644 index 000000000000..abaebedabc60 --- /dev/null +++ b/test/optimizations/autoAggregation/localArrays.bad @@ -0,0 +1,65 @@ +Start analyzing forall for automatic aggregation [static only ALA clone] (localArrays.chpl:49) +| Found an aggregation candidate (localArrays.chpl:50) +| Potential source aggregation (localArrays.chpl:50) +End analyzing forall for automatic aggregation [static only ALA clone] (localArrays.chpl:49) + +Start analyzing forall for automatic aggregation [no ALA clone] (localArrays.chpl:49) +End analyzing forall for automatic aggregation [no ALA clone] (localArrays.chpl:49) + +Aggregation candidate has confirmed local child [static only ALA clone] (localArrays.chpl:50) +LHS is local, RHS is nonlocal. Will use source aggregation [static only ALA clone] (localArrays.chpl:50) +Aggregation candidate has confirmed local child [static only ALA clone] (localArrays.chpl:50) +LHS is local, RHS is nonlocal. Will use source aggregation [static only ALA clone] (localArrays.chpl:50) +Aggregation candidate has confirmed local child [static only ALA clone] (localArrays.chpl:50) +LHS is local, RHS is nonlocal. Will use source aggregation [static only ALA clone] (localArrays.chpl:50) +Aggregation candidate has confirmed local child [static only ALA clone] (localArrays.chpl:50) +LHS is local, RHS is nonlocal. Will use source aggregation [static only ALA clone] (localArrays.chpl:50) +Aggregation candidate has confirmed local child [static only ALA clone] (localArrays.chpl:50) +LHS is local, RHS is nonlocal. Will use source aggregation [static only ALA clone] (localArrays.chpl:50) +Replaced assignment with aggregation [static only ALA clone] (localArrays.chpl:50) +Replaced assignment with aggregation [static only ALA clone] (localArrays.chpl:50) +Testing 1D DR +0 0 0 0 0 0 0 0 0 0 +End testing 1D DR + +Testing 2D DR +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +0 0 0 0 0 0 0 0 0 0 +End testing 2D DR + +Testing 1D COO +SrcAggregator.copy is called +SrcAggregator.copy is called +0 0 +End testing 1D COO + +Testing 2D COO +0 +0 + +End testing 2D COO + +Testing CSR +0 +0 + +End testing CSR + +Testing CSC +0 +0 + +End testing CSC + +Testing associative domain with string keys +0 0 +End testing associative domain with string keys + diff --git a/test/optimizations/autoAggregation/localArrays.future b/test/optimizations/autoAggregation/localArrays.future new file mode 100644 index 000000000000..0bd81b051297 --- /dev/null +++ b/test/optimizations/autoAggregation/localArrays.future @@ -0,0 +1,4 @@ +Locality of DRs can't be determined statically. + +Context 1: https://github.com/chapel-lang/chapel/pull/25754#issuecomment-2316297947 +Context 2: https://github.com/chapel-lang/chapel/issues/25351 diff --git a/test/optimizations/autoLocalAccess/localArrays.notest b/test/optimizations/autoLocalAccess/localArrays.notest new file mode 100644 index 000000000000..bc30b4efa9ee --- /dev/null +++ b/test/optimizations/autoLocalAccess/localArrays.notest @@ -0,0 +1,6 @@ +We are disabling ALA for DR due to some challenges. + +See https://github.com/chapel-lang/chapel/pull/25754#issuecomment-2316297947 + +The symmetric of this test is in autoAggregation/localArrays.chpl. That test +will be futurized. From 7ded4c974d7675601e5b6103f25013816dd68413 Mon Sep 17 00:00:00 2001 From: Engin Kayraklioglu Date: Wed, 28 Aug 2024 15:47:08 -0700 Subject: [PATCH 3/3] Adjust tests that had multiple outputs of error messages/warnings Signed-off-by: Engin Kayraklioglu --- test/parallel/forall/checks/const-indices-blc.good | 1 - test/users/alvaradoo/refToSubclassInternalError-shared.good | 2 -- test/users/alvaradoo/refToSubclassInternalError.good | 2 -- 3 files changed, 5 deletions(-) diff --git a/test/parallel/forall/checks/const-indices-blc.good b/test/parallel/forall/checks/const-indices-blc.good index 78168c42d726..c2e71ef37355 100644 --- a/test/parallel/forall/checks/const-indices-blc.good +++ b/test/parallel/forall/checks/const-indices-blc.good @@ -1,3 +1,2 @@ const-indices-blc.chpl:5: error: cannot assign to const variable const-indices-blc.chpl:11: error: cannot assign to const variable -const-indices-blc.chpl:11: error: cannot assign to const variable diff --git a/test/users/alvaradoo/refToSubclassInternalError-shared.good b/test/users/alvaradoo/refToSubclassInternalError-shared.good index dbc93111dc3b..9abffc9040fc 100644 --- a/test/users/alvaradoo/refToSubclassInternalError-shared.good +++ b/test/users/alvaradoo/refToSubclassInternalError-shared.good @@ -1,8 +1,6 @@ refToSubclassInternalError-shared.chpl:17: In function 'populate': -refToSubclassInternalError-shared.chpl:23: error: initializing a reference using an expression whose type 'shared GenProperty?' is not an instantiation of the declared type 'shared Property' refToSubclassInternalError-shared.chpl:23: error: initializing a reference using an expression whose type 'shared GenProperty?' is not an instantiation of the declared type 'shared Property' refToSubclassInternalError-shared.chpl:87: called as populate(dataArray: [domain(1,int(64),one)] int(64), inputVertices: [domain(1,int(64),one)] int(64), vertexProps: [BlockDom(2,int(64),one,unmanaged DefaultDist)] shared GenProperty?, dataTypeMap: [domain(1,int(64),one)] string, colId: int(64)) refToSubclassInternalError-shared.chpl:17: In function 'populate': -refToSubclassInternalError-shared.chpl:23: error: initializing a reference using an expression whose type 'shared GenProperty?' is not an instantiation of the declared type 'shared Property' refToSubclassInternalError-shared.chpl:23: error: initializing a reference using an expression whose type 'shared GenProperty?' is not an instantiation of the declared type 'shared Property' refToSubclassInternalError-shared.chpl:88: called as populate(dataArray: [domain(1,int(64),one)] bool, inputVertices: [domain(1,int(64),one)] int(64), vertexProps: [BlockDom(2,int(64),one,unmanaged DefaultDist)] shared GenProperty?, dataTypeMap: [domain(1,int(64),one)] string, colId: int(64)) diff --git a/test/users/alvaradoo/refToSubclassInternalError.good b/test/users/alvaradoo/refToSubclassInternalError.good index b19750f0203b..4c9983e23a6d 100644 --- a/test/users/alvaradoo/refToSubclassInternalError.good +++ b/test/users/alvaradoo/refToSubclassInternalError.good @@ -1,8 +1,6 @@ refToSubclassInternalError.chpl:17: In function 'populate': -refToSubclassInternalError.chpl:23: error: initializing a reference using an expression whose type 'unmanaged GenProperty?' is not an instantiation of the declared type 'unmanaged Property' refToSubclassInternalError.chpl:23: error: initializing a reference using an expression whose type 'unmanaged GenProperty?' is not an instantiation of the declared type 'unmanaged Property' refToSubclassInternalError.chpl:87: called as populate(dataArray: [domain(1,int(64),one)] int(64), inputVertices: [domain(1,int(64),one)] int(64), vertexProps: [BlockDom(2,int(64),one,unmanaged DefaultDist)] unmanaged GenProperty?, dataTypeMap: [domain(1,int(64),one)] string, colId: int(64)) refToSubclassInternalError.chpl:17: In function 'populate': -refToSubclassInternalError.chpl:23: error: initializing a reference using an expression whose type 'unmanaged GenProperty?' is not an instantiation of the declared type 'unmanaged Property' refToSubclassInternalError.chpl:23: error: initializing a reference using an expression whose type 'unmanaged GenProperty?' is not an instantiation of the declared type 'unmanaged Property' refToSubclassInternalError.chpl:88: called as populate(dataArray: [domain(1,int(64),one)] bool, inputVertices: [domain(1,int(64),one)] int(64), vertexProps: [BlockDom(2,int(64),one,unmanaged DefaultDist)] unmanaged GenProperty?, dataTypeMap: [domain(1,int(64),one)] string, colId: int(64))