Skip to content

Commit e53715d

Browse files
authored
Merge pull request #17527 from Maxrimus/release/1.24
Release/1.24 [reviewed by @ronawho and @mppf ] Cherry-Picked merges to be merged into release for version 1.24.1
2 parents 797b9a8 + 0b100c4 commit e53715d

File tree

237 files changed

+19019
-7893
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

237 files changed

+19019
-7893
lines changed

Diff for: CHANGES.md

+53-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,52 @@
11
Release Changes List
22
====================
33

4+
version 1.24.1
5+
==============
6+
7+
Update to the twenty-seventh public release of Chapel, April 2021
8+
(see also changes below for 1.24.0)
9+
10+
Highlights
11+
----------
12+
* significant performance improvements for InfiniBand systems
13+
* improved support for computing with `enum` ranges
14+
* closed all known memory leaks
15+
16+
Feature Improvements
17+
--------------------
18+
* extended `param` for-loops to support `enum` ranges
19+
* added support for open-interval `enum` ranges
20+
21+
Performance Optimizations / Improvements
22+
----------------------------------------
23+
* improved performance on InfiniBand systems by upgrading GASNet-EX
24+
* improved NUMA affinity and startup times when using a fixed heap
25+
26+
Memory Improvements
27+
-------------------
28+
* closed a memory leak related to tuple coercions
29+
* closed a memory leak in `list.insert()`
30+
* closed a memory leak in constrained generic interfaces
31+
32+
Third-Party Software Changes
33+
----------------------------
34+
* upgraded GASNet-EX to version 2021.3.0
35+
36+
Portability
37+
-----------
38+
* improved the portability of the code base to HPE Cray EX
39+
40+
Bug Fixes for Libraries
41+
-----------------------
42+
* fixed a bug in which `indexOf()` on an empty list halted
43+
* fixed bugs in binary operations for sets with `parSafe=true`
44+
45+
Developer-oriented changes: Runtime improvements
46+
------------------------------------------------
47+
* improved our approach to polling when communicating using GASNet over `ucx`
48+
49+
450
version 1.24.0
551
==============
652

@@ -869,7 +915,7 @@ Developer-oriented changes: Testing System
869915
version 1.22.1
870916
==============
871917

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

875921
Portability
@@ -2909,7 +2955,7 @@ Developer-oriented changes: Tool improvements
29092955
version 1.17.1
29102956
==============
29112957

2912-
Update to twentieth public release of Chapel, April 2018
2958+
Update to twentieth public release of Chapel, April 2018
29132959
(see also changes below for 1.17.0)
29142960

29152961
Bug Fixes
@@ -4759,7 +4805,7 @@ Developer-oriented changes: Third-party improvements
47594805
version 1.13.1
47604806
==============
47614807

4762-
Update to sixteenth public release of Chapel, June 2016
4808+
Update to sixteenth public release of Chapel, June 2016
47634809
(see also changes below for 1.13.0)
47644810

47654811
Bug Fixes
@@ -8360,7 +8406,7 @@ Internal
83608406
version 1.1.2
83618407
=============
83628408

8363-
Update to fourth public release of Chapel, September, 2010
8409+
Update to fourth public release of Chapel, September, 2010
83648410
(see also changes below for 1.1.1 and 1.1)
83658411

83668412
Platform-specific notes
@@ -8373,7 +8419,7 @@ Platform-specific notes
83738419
version 1.1.1
83748420
=============
83758421

8376-
Update to fourth public release of Chapel, July 8, 2010
8422+
Update to fourth public release of Chapel, July 8, 2010
83778423
(see also changes below for 1.1)
83788424

83798425
Platform-specific notes
@@ -8717,7 +8763,7 @@ Internal
87178763
version 1.02
87188764
============
87198765

8720-
Update to third public release of Chapel, November 12, 2009
8766+
Update to third public release of Chapel, November 12, 2009
87218767
(see also changes below for version 1.01 and 1.0)
87228768

87238769
High-Level Themes
@@ -8785,7 +8831,7 @@ Internal
87858831
version 1.01
87868832
============
87878833

8788-
Update to third public release of Chapel, October 30, 2009
8834+
Update to third public release of Chapel, October 30, 2009
87898835
(see also changes for version 1.0)
87908836

87918837
High-Level Themes

Diff for: CONTRIBUTORS.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ Chapel Contributors
22
===================
33

44
The following people have contributed to the implementation of the
5-
Chapel release:
5+
most recent Chapel releases:
66

7-
Contributors to the Chapel 1.24 release
8-
---------------------------------------
7+
Contributors to the Chapel 1.24.x releases
8+
------------------------------------------
99
* Souris Ash, individual contributor
1010
* Ben Albrecht, [HPE]
1111
* Paul Cassella, [HPE]
@@ -17,6 +17,7 @@ Contributors to the Chapel 1.24 release
1717
* Lydia Duncan, [HPE]
1818
* Prashanth Duvvuri, individual contributor
1919
* Michael Ferguson, [HPE]
20+
* Piyush Gupta, individual contributor
2021
* David Iten, [HPE]
2122
* Engin Kayraklioglu, [HPE] (former [GSoC 2017] mentor, [Cray Inc.] intern from [George Washington University])
2223
* Lee Killough, [HPE]

Diff for: compiler/AST/ParamForLoop.cpp

+126-9
Original file line numberDiff line numberDiff line change
@@ -410,25 +410,26 @@ CallExpr* ParamForLoop::foldForResolve()
410410
SymExpr* hse = highExprGet();
411411
SymExpr* sse = strideExprGet();
412412

413+
CallExpr* noop = new CallExpr(PRIM_NOOP);
414+
415+
Symbol* idxSym = idxExpr->symbol();
416+
Type* idxType = indexType();
417+
418+
bool emptyLoop = true;
419+
Symbol* continueSym = continueLabelGet();
420+
421+
if (!is_enum_type(idxType)) {
413422
VarSymbol* lvar = toVarSymbol(lse->symbol());
414423
VarSymbol* hvar = toVarSymbol(hse->symbol());
415424
VarSymbol* svar = toVarSymbol(sse->symbol());
416425

417-
CallExpr* noop = new CallExpr(PRIM_NOOP);
418-
419426
validateLoop(lvar, hvar, svar);
420-
421-
Symbol* idxSym = idxExpr->symbol();
422-
Symbol* continueSym = continueLabelGet();
423-
Type* idxType = indexType();
424427
IF1_int_type idxSize = (is_bool_type(idxType) || get_width(idxType) == 32)
425428
? INT_SIZE_32 : INT_SIZE_64;
426429

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

430-
bool emptyLoop = true;
431-
432433
if (is_int_type(idxType))
433434
{
434435
int64_t low = lvar->immediate->to_int();
@@ -499,6 +500,106 @@ CallExpr* ParamForLoop::foldForResolve()
499500
}
500501
}
501502
}
503+
} else {
504+
EnumSymbol* lvar = toEnumSymbol(lse->symbol());
505+
EnumSymbol* hvar = toEnumSymbol(hse->symbol());
506+
VarSymbol* svar = toVarSymbol(sse->symbol());
507+
508+
validateLoop(lvar, hvar, svar);
509+
510+
int64_t stride = svar->immediate->to_int();
511+
512+
// Insert an "insertion marker" for loop unrolling
513+
insertAfter(noop);
514+
515+
bool foundLow = false;
516+
bool foundHigh = false;
517+
bool degenRange = false;
518+
519+
EnumType* et = toEnumType(lvar->type);
520+
521+
// Check to make sure the range is valid
522+
for_enums(constant, et) {
523+
if (constant->sym == lvar) {
524+
foundLow = true;
525+
if (foundHigh == true) {
526+
degenRange = true;
527+
break;
528+
}
529+
}
530+
if (constant->sym == hvar) {
531+
foundHigh = true;
532+
if (foundLow == true) {
533+
break;
534+
}
535+
}
536+
}
537+
538+
if (!degenRange) {
539+
// Handle cases with positive strides
540+
if (stride >= 1) {
541+
bool foundFirst = false; // have we found our first enum bound yet?
542+
int i = 0;
543+
int strcount = 0; // used to count off strides
544+
for_enums(constant, et) {
545+
if (constant->sym == lvar) { // found the starting point
546+
foundFirst = true;
547+
strcount = 0; // start counting the stride from here
548+
}
549+
550+
// stamp out a copy of the loop body
551+
if (foundFirst && strcount == 0) {
552+
SymbolMap map;
553+
554+
map.put(idxSym, constant->sym);
555+
copyBodyHelper(noop, i, &map, this, continueSym);
556+
emptyLoop = false;
557+
}
558+
559+
// advance the stride
560+
strcount++;
561+
if (strcount == stride) {
562+
strcount = 0;
563+
}
564+
if (constant->sym == hvar) { // quit when we find the stopping bound
565+
break;
566+
}
567+
i++;
568+
}
569+
} else {
570+
// Handle cases with negative strides
571+
bool foundFirst = false; // have we found our first enum bound yet?
572+
int i = 0;
573+
int strcount = 0; // used to count off strides
574+
for_enums_backward(constant, et) {
575+
if (constant->sym == hvar) { // found the starting point
576+
foundFirst = true;
577+
strcount = 0; // start counting the stride from here
578+
}
579+
580+
// stamp out a copy of the loop body
581+
if (foundFirst && strcount == 0) {
582+
SymbolMap map;
583+
584+
map.put(idxSym, constant->sym);
585+
copyBodyHelper(noop, i, &map, this, continueSym);
586+
emptyLoop = false;
587+
}
588+
589+
// advance the stride
590+
strcount++;
591+
if (strcount == -stride) {
592+
strcount = 0;
593+
}
594+
if (constant->sym == lvar) { // quit when we find the stopping bound
595+
break;
596+
}
597+
i++;
598+
}
599+
}
600+
}
601+
}
602+
502603

503604
if (emptyLoop)
504605
addMentionToEndOfStatement(this, NULL);
@@ -519,7 +620,7 @@ CallExpr* ParamForLoop::foldForResolve()
519620
void ParamForLoop::validateLoop(VarSymbol* lvar,
520621
VarSymbol* hvar,
521622
VarSymbol* svar) {
522-
if (!lvar || !hvar || !svar)
623+
if (!lvar || !hvar || !svar)
523624
USR_FATAL(this,
524625
"param for-loops must be defined over a bounded param range");
525626

@@ -532,6 +633,22 @@ void ParamForLoop::validateLoop(VarSymbol* lvar,
532633
}
533634
}
534635

636+
void ParamForLoop::validateLoop(EnumSymbol* lvar,
637+
EnumSymbol* hvar,
638+
VarSymbol* svar) {
639+
if (!lvar || !hvar || !svar)
640+
USR_FATAL(this,
641+
"param for-loops must be defined over a bounded param range");
642+
643+
if (!svar->immediate)
644+
USR_FATAL(this,
645+
"param for-loops must be defined over a bounded param range");
646+
647+
if (!is_int_type(svar->type) && !is_uint_type(svar->type)) {
648+
USR_FATAL(this, "Range stride must be an int");
649+
}
650+
}
651+
535652
//
536653
// Determine the index type for a ParamForLoop.
537654
//

Diff for: compiler/AST/build.cpp

+4-13
Original file line numberDiff line numberDiff line change
@@ -2510,36 +2510,27 @@ BlockStmt* handleConfigTypes(BlockStmt* blk) {
25102510
return blk;
25112511
}
25122512

2513-
static VarSymbol* one = NULL;
2514-
2515-
static SymExpr* buildOneExpr() {
2516-
if (one == NULL) {
2517-
one = new_IntSymbol(1);
2518-
}
2519-
return new SymExpr(one);
2520-
}
2521-
25222513
CallExpr* buildBoundedRange(Expr* low, Expr* high,
25232514
bool openlow, bool openhigh) {
25242515
if (openlow) {
2525-
low = new CallExpr("+", low, buildOneExpr());
2516+
low = new CallExpr("chpl__nudgeLowBound", low);
25262517
}
25272518
if (openhigh) {
2528-
high = new CallExpr("-", high, buildOneExpr());
2519+
high = new CallExpr("chpl__nudgeHighBound", high);
25292520
}
25302521
return new CallExpr("chpl_build_bounded_range",low, high);
25312522
}
25322523

25332524
CallExpr* buildLowBoundedRange(Expr* low, bool open) {
25342525
if (open) {
2535-
low = new CallExpr("+", low, buildOneExpr());
2526+
low = new CallExpr("chpl__nudgeLowBound", low);
25362527
}
25372528
return new CallExpr("chpl_build_low_bounded_range", low);
25382529
}
25392530

25402531
CallExpr* buildHighBoundedRange(Expr* high, bool open) {
25412532
if (open) {
2542-
high = new CallExpr("-", high, buildOneExpr());
2533+
high = new CallExpr("chpl__nudgeHighBound", high);
25432534
}
25442535
return new CallExpr("chpl_build_high_bounded_range", high);
25452536
}

Diff for: compiler/include/ParamForLoop.h

+3
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ class ParamForLoop final : public LoopStmt
8585
void validateLoop(VarSymbol* lvar,
8686
VarSymbol* hvar,
8787
VarSymbol* svar);
88+
void validateLoop(EnumSymbol* lvar,
89+
EnumSymbol* hvar,
90+
VarSymbol* svar);
8891

8992
//
9093
// NOAKES 2014/12/11

0 commit comments

Comments
 (0)