opencilk/v2.0
Release notes for OpenCilk version 2.0
Major changes
OpenCilk 2.0 features the following major changes from OpenCilk 1.1.
- [Beta] Cilk reducer hyperobjects (a.k.a. reducers) are now supported through a new language syntax and implementation. A local or global variable in C or C++ can be made into a reducer by adding
cilk_reducer(I,R)
to its type, whereI
andR
designate the identity and reduce functions for the reducer. For example, here is how a simple integer-summation reducer can be implemented using the new reducer syntax:
#include<cilk/cilk.h>
void zero(void *v) {
*(int*)v = 0;
}
void plus(void *l, void *r) {
*(int *)l += *(int *)r;
}
int foo(int *A, int n) {
int cilk_reducer(zero, plus) sum = 0;
cilk_for (int i = 0; i < n; ++i)
sum += A[i];
return sum;
}
- Support for the Intel Cilk Plus reducer library has been removed.
- The compiler has been upgraded to be based on LLVM 14.0.6.
- Support for pedigrees and built-in deterministic parallel random-number generation has been improved and optimized. In particular, pedigrees are now correctly updated at both spawns and syncs.
- Support for pedigrees has been streamlined. To enable pedigree support, simply link the Cilk program with the pedigree library,
-lopencilk-pedigrees
. - Many bug fixes and performance improvements have been included compared to the previous version.
Known limitations
- We are writing new documentation for OpenCilk and posting it on the new website, https://www.opencilk.org/.
- With the compiler now based on LLVM 14, the default DWARF version is now DWARFv5. If you encounter an error when using a tool such as
unhandled dwarf2 abbrev form code 0x25
, then the tool does not support DWARFv5. You can opt back into using the old DWARF version by passing either-gdwarf-4
or-fdebug-default-version=4
toclang
when you compile the program. - The default setting of floating-point contraction is now
-ffp-contract=on
. As a result, floating-point computation may behave differently with this version of OpenCilk. You can opt back into the old floating-point-contraction behavior by passing the compiler flag-ffp-contract=off
. See here for more details. - There are some standard library functions and LLVM intrinsic functions that Cilksan does not recognize. When Cilksan fails to recognize such a function, it may produce a link-time error of the form,
undefined reference to '__csan_FUNC'
for some function name__csan_FUNC
.- Please report these missing functions as issues on the OpenCilk issue tracker.
- [Beta] You can work around this issue by passing the additional flag
-mllvm -cilksan-bc-path=`find /path/to/opencilk/ -name "libcilksan.bc"`
when compiling the Cilk program.
Acknowledgments
Thanks to everyone who contributed to the development of OpenCilk 2.0, via code contributions, testing, or in other ways, including:
- Brian Wheatman
- Teo Collin
- William Luo