Skip to content

Commit

Permalink
Merge pull request #17527 from Maxrimus/release/1.24
Browse files Browse the repository at this point in the history
Release/1.24

[reviewed by @ronawho and @mppf ]

Cherry-Picked merges to be merged into release for version 1.24.1
  • Loading branch information
Maxrimus authored Apr 5, 2021
2 parents 797b9a8 + 0b100c4 commit e53715d
Show file tree
Hide file tree
Showing 237 changed files with 19,019 additions and 7,893 deletions.
60 changes: 53 additions & 7 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,52 @@
Release Changes List
====================

version 1.24.1
==============

Update to the twenty-seventh public release of Chapel, April 2021
(see also changes below for 1.24.0)

Highlights
----------
* significant performance improvements for InfiniBand systems
* improved support for computing with `enum` ranges
* closed all known memory leaks

Feature Improvements
--------------------
* extended `param` for-loops to support `enum` ranges
* added support for open-interval `enum` ranges

Performance Optimizations / Improvements
----------------------------------------
* improved performance on InfiniBand systems by upgrading GASNet-EX
* improved NUMA affinity and startup times when using a fixed heap

Memory Improvements
-------------------
* closed a memory leak related to tuple coercions
* closed a memory leak in `list.insert()`
* closed a memory leak in constrained generic interfaces

Third-Party Software Changes
----------------------------
* upgraded GASNet-EX to version 2021.3.0

Portability
-----------
* improved the portability of the code base to HPE Cray EX

Bug Fixes for Libraries
-----------------------
* fixed a bug in which `indexOf()` on an empty list halted
* fixed bugs in binary operations for sets with `parSafe=true`

Developer-oriented changes: Runtime improvements
------------------------------------------------
* improved our approach to polling when communicating using GASNet over `ucx`


version 1.24.0
==============

Expand Down Expand Up @@ -869,7 +915,7 @@ Developer-oriented changes: Testing System
version 1.22.1
==============

Update to twenty-fifth public release of Chapel, June 2020
Update to twenty-fifth public release of Chapel, June 2020
(see also changes below for 1.22.0)

Portability
Expand Down Expand Up @@ -2909,7 +2955,7 @@ Developer-oriented changes: Tool improvements
version 1.17.1
==============

Update to twentieth public release of Chapel, April 2018
Update to twentieth public release of Chapel, April 2018
(see also changes below for 1.17.0)

Bug Fixes
Expand Down Expand Up @@ -4759,7 +4805,7 @@ Developer-oriented changes: Third-party improvements
version 1.13.1
==============

Update to sixteenth public release of Chapel, June 2016
Update to sixteenth public release of Chapel, June 2016
(see also changes below for 1.13.0)

Bug Fixes
Expand Down Expand Up @@ -8360,7 +8406,7 @@ Internal
version 1.1.2
=============

Update to fourth public release of Chapel, September, 2010
Update to fourth public release of Chapel, September, 2010
(see also changes below for 1.1.1 and 1.1)

Platform-specific notes
Expand All @@ -8373,7 +8419,7 @@ Platform-specific notes
version 1.1.1
=============

Update to fourth public release of Chapel, July 8, 2010
Update to fourth public release of Chapel, July 8, 2010
(see also changes below for 1.1)

Platform-specific notes
Expand Down Expand Up @@ -8717,7 +8763,7 @@ Internal
version 1.02
============

Update to third public release of Chapel, November 12, 2009
Update to third public release of Chapel, November 12, 2009
(see also changes below for version 1.01 and 1.0)

High-Level Themes
Expand Down Expand Up @@ -8785,7 +8831,7 @@ Internal
version 1.01
============

Update to third public release of Chapel, October 30, 2009
Update to third public release of Chapel, October 30, 2009
(see also changes for version 1.0)

High-Level Themes
Expand Down
7 changes: 4 additions & 3 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ Chapel Contributors
===================

The following people have contributed to the implementation of the
Chapel release:
most recent Chapel releases:

Contributors to the Chapel 1.24 release
---------------------------------------
Contributors to the Chapel 1.24.x releases
------------------------------------------
* Souris Ash, individual contributor
* Ben Albrecht, [HPE]
* Paul Cassella, [HPE]
Expand All @@ -17,6 +17,7 @@ Contributors to the Chapel 1.24 release
* Lydia Duncan, [HPE]
* Prashanth Duvvuri, individual contributor
* Michael Ferguson, [HPE]
* Piyush Gupta, individual contributor
* David Iten, [HPE]
* Engin Kayraklioglu, [HPE] (former [GSoC 2017] mentor, [Cray Inc.] intern from [George Washington University])
* Lee Killough, [HPE]
Expand Down
135 changes: 126 additions & 9 deletions compiler/AST/ParamForLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,25 +410,26 @@ CallExpr* ParamForLoop::foldForResolve()
SymExpr* hse = highExprGet();
SymExpr* sse = strideExprGet();

CallExpr* noop = new CallExpr(PRIM_NOOP);

Symbol* idxSym = idxExpr->symbol();
Type* idxType = indexType();

bool emptyLoop = true;
Symbol* continueSym = continueLabelGet();

if (!is_enum_type(idxType)) {
VarSymbol* lvar = toVarSymbol(lse->symbol());
VarSymbol* hvar = toVarSymbol(hse->symbol());
VarSymbol* svar = toVarSymbol(sse->symbol());

CallExpr* noop = new CallExpr(PRIM_NOOP);

validateLoop(lvar, hvar, svar);

Symbol* idxSym = idxExpr->symbol();
Symbol* continueSym = continueLabelGet();
Type* idxType = indexType();
IF1_int_type idxSize = (is_bool_type(idxType) || get_width(idxType) == 32)
? INT_SIZE_32 : INT_SIZE_64;

// Insert an "insertion marker" for loop unrolling
insertAfter(noop);

bool emptyLoop = true;

if (is_int_type(idxType))
{
int64_t low = lvar->immediate->to_int();
Expand Down Expand Up @@ -499,6 +500,106 @@ CallExpr* ParamForLoop::foldForResolve()
}
}
}
} else {
EnumSymbol* lvar = toEnumSymbol(lse->symbol());
EnumSymbol* hvar = toEnumSymbol(hse->symbol());
VarSymbol* svar = toVarSymbol(sse->symbol());

validateLoop(lvar, hvar, svar);

int64_t stride = svar->immediate->to_int();

// Insert an "insertion marker" for loop unrolling
insertAfter(noop);

bool foundLow = false;
bool foundHigh = false;
bool degenRange = false;

EnumType* et = toEnumType(lvar->type);

// Check to make sure the range is valid
for_enums(constant, et) {
if (constant->sym == lvar) {
foundLow = true;
if (foundHigh == true) {
degenRange = true;
break;
}
}
if (constant->sym == hvar) {
foundHigh = true;
if (foundLow == true) {
break;
}
}
}

if (!degenRange) {
// Handle cases with positive strides
if (stride >= 1) {
bool foundFirst = false; // have we found our first enum bound yet?
int i = 0;
int strcount = 0; // used to count off strides
for_enums(constant, et) {
if (constant->sym == lvar) { // found the starting point
foundFirst = true;
strcount = 0; // start counting the stride from here
}

// stamp out a copy of the loop body
if (foundFirst && strcount == 0) {
SymbolMap map;

map.put(idxSym, constant->sym);
copyBodyHelper(noop, i, &map, this, continueSym);
emptyLoop = false;
}

// advance the stride
strcount++;
if (strcount == stride) {
strcount = 0;
}
if (constant->sym == hvar) { // quit when we find the stopping bound
break;
}
i++;
}
} else {
// Handle cases with negative strides
bool foundFirst = false; // have we found our first enum bound yet?
int i = 0;
int strcount = 0; // used to count off strides
for_enums_backward(constant, et) {
if (constant->sym == hvar) { // found the starting point
foundFirst = true;
strcount = 0; // start counting the stride from here
}

// stamp out a copy of the loop body
if (foundFirst && strcount == 0) {
SymbolMap map;

map.put(idxSym, constant->sym);
copyBodyHelper(noop, i, &map, this, continueSym);
emptyLoop = false;
}

// advance the stride
strcount++;
if (strcount == -stride) {
strcount = 0;
}
if (constant->sym == lvar) { // quit when we find the stopping bound
break;
}
i++;
}
}
}
}


if (emptyLoop)
addMentionToEndOfStatement(this, NULL);
Expand All @@ -519,7 +620,7 @@ CallExpr* ParamForLoop::foldForResolve()
void ParamForLoop::validateLoop(VarSymbol* lvar,
VarSymbol* hvar,
VarSymbol* svar) {
if (!lvar || !hvar || !svar)
if (!lvar || !hvar || !svar)
USR_FATAL(this,
"param for-loops must be defined over a bounded param range");

Expand All @@ -532,6 +633,22 @@ void ParamForLoop::validateLoop(VarSymbol* lvar,
}
}

void ParamForLoop::validateLoop(EnumSymbol* lvar,
EnumSymbol* hvar,
VarSymbol* svar) {
if (!lvar || !hvar || !svar)
USR_FATAL(this,
"param for-loops must be defined over a bounded param range");

if (!svar->immediate)
USR_FATAL(this,
"param for-loops must be defined over a bounded param range");

if (!is_int_type(svar->type) && !is_uint_type(svar->type)) {
USR_FATAL(this, "Range stride must be an int");
}
}

//
// Determine the index type for a ParamForLoop.
//
Expand Down
17 changes: 4 additions & 13 deletions compiler/AST/build.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2510,36 +2510,27 @@ BlockStmt* handleConfigTypes(BlockStmt* blk) {
return blk;
}

static VarSymbol* one = NULL;

static SymExpr* buildOneExpr() {
if (one == NULL) {
one = new_IntSymbol(1);
}
return new SymExpr(one);
}

CallExpr* buildBoundedRange(Expr* low, Expr* high,
bool openlow, bool openhigh) {
if (openlow) {
low = new CallExpr("+", low, buildOneExpr());
low = new CallExpr("chpl__nudgeLowBound", low);
}
if (openhigh) {
high = new CallExpr("-", high, buildOneExpr());
high = new CallExpr("chpl__nudgeHighBound", high);
}
return new CallExpr("chpl_build_bounded_range",low, high);
}

CallExpr* buildLowBoundedRange(Expr* low, bool open) {
if (open) {
low = new CallExpr("+", low, buildOneExpr());
low = new CallExpr("chpl__nudgeLowBound", low);
}
return new CallExpr("chpl_build_low_bounded_range", low);
}

CallExpr* buildHighBoundedRange(Expr* high, bool open) {
if (open) {
high = new CallExpr("-", high, buildOneExpr());
high = new CallExpr("chpl__nudgeHighBound", high);
}
return new CallExpr("chpl_build_high_bounded_range", high);
}
Expand Down
3 changes: 3 additions & 0 deletions compiler/include/ParamForLoop.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ class ParamForLoop final : public LoopStmt
void validateLoop(VarSymbol* lvar,
VarSymbol* hvar,
VarSymbol* svar);
void validateLoop(EnumSymbol* lvar,
EnumSymbol* hvar,
VarSymbol* svar);

//
// NOAKES 2014/12/11
Expand Down
Loading

0 comments on commit e53715d

Please sign in to comment.