Commit 294807b
committed
OpDiLib release v2.0.0
Interface changes
Macros
- OPDI_CRITICAL_NAME macro no longer accepts arguments other than name
- new OPDI_CRITICAL_NAME_ARGS macro
- new OPDI_MASKED, OPDI_END_MASKED macros
- new OPDI_SINGLE_COPYPRIVATE, OPDI_SINGLE_COPYPRIVATE_NOWAIT macros
Layer interfaces
- introduce OmpLogicInterface::beginSkippedParallelRegion, OmpLogicInterface::endSkippedParallelRegion
- refactor OmpLogicInterface::resetTask -> OmpLogicInterface::resetImplicitTask
- changed offset in enums OmpLogicInterface::ScopeEndpoint and OmpLogicInterface::SyncRegionKind
- introduce BackendInterface::getCriticalIdentifier, BackendInterface::getReductionIdentifier, BackendInterface::getOrderedIdentifier
- refactor BackendInterface::getNestedLockIdentifier -> BackendInterface::getNestLockIdentifier
- refactor BackedInterface::getTaskData -> BackendInterface::getImplicitTaskData
Compiler options
- introduce OPDI_BACKEND_GENERATE_MASKED_EVENTS, OPDI_BACKEND_GENERATE_WORK_EVENTS, OPDI_OMPT_BACKEND_IMPLICIT_TASK_END_SOURCE, OPDI_OMPT_BACKEND_BARRIER_IMPLEMENTATION_BEHAVIOUR, OPDI_OMP_LOGIC_CLEAR_ADJOINTS, OPDI_SYNC_REGION_BARRIER_BEHAVIOUR, OPDI_SYNC_REGION_BARRIER_IMPLICIT_BEHAVIOUR, OPDI_SYNC_REGION_BARRIER_EXPLICIT_BEHAVIOUR, OPDI_SYNC_REGION_BARRIER_IMPLEMENTATION_BEHAVIOUR, OPDI_SYNC_REGION_BARRIER_REVERSE_BEHAVIOUR
Instrumentation
- all functions in OmpLogicInstrumentInterface receive AD data as parameters
- calls to instrumentation occur under the same conditions as AD treatment, like tape activity
Features
- support for custom mutexes
- support for masked construct
- support for broadcasts via single copyprivate
- provide EmptyTool as a default tool layer implementation
- support for disabling OpDiLib at runtime: set opdi::tool to an instance of EmptyTool (preferred) or nullptr
- endpoints of sync regions that result in reverse barriers become configurable
- optionally use the implicit barriers at the end of parallel regions to produce ImplicitTaskEnd events of non-primary threads
- expose mechanism to skip AD treatment of parallel regions
- backend-independent solution for copy operations at the beginning of parallel regions
- optionally clear adjoints as part of tape resets
- the OMPT backend's implementation of opdi_* functions can be included as a default runtime implementation
- syntax checking supports local enablind/disabling via // opdi-syntax-on, // opdi-syntax-off
- additions to syntax definition
- modernize declaration of custom reductions
- faster tests, extended test suite and CI pipeline (see below)
- changes of OmpLogicOutputInstrument in accordance with other changes in OpDiLib
Performance improvements
- implicit barriers on parallel regions do not produce reverse barriers
- generating events for masked constructs and worksharing constructs becomes optional
- MutexOmpLogic::onMutexReleased no longer acquires an internal mutex
- reductions in the macro backend no longer require additional internal locks, address of parallel data as wait identifier
- ordered constructs in the macro backend no longer share their wait identifier, use address of parallel data as wait identifier
Refactoring and code quality
- refactor MutexOmpLogic, more expressive names and reduced boilerplate, comments regarding thread-safety
- refactor ParallelOmpLogic and ImplicitTaskOmpLogic, more expressive names and fewer void* pointers
- transition from master to masked throughout OpDiLib
- remove ProbeScopeStatus, resolve order of ImplicitTaskProbe and ReductionProbe via omp_get_level
- dedicated header file for macros related to thread sanitizer
- refactoring of further smaller aspects throughout OpDiLib
- add warnings, errors, and assertions throughout OpDiLib
Fixes
- ensure that setAdjointAccessMode has no effect when called in the reverse pass
- address compiler warnings
- fix bug in application of syntax checking to a single file
- fix ranges in TestExternalFunctionLocal for small data and/or many threads
- fix memory leak: implicit tasks free allocated tape positions
Tests
Test suite
- test suite moves from C++11 to C++17
- testing with strict warning levels
- updated image versions
- new tests: TestCriticalNameHint, TestExternalFunctionLogicCalls, TestCustomMutex, TestSingleCopyprivate, TestSingleCopyprivateNowait, TestParallelCopyin, TestParallelFirstprivate, TestParallelFirstprivate2, TestParallelForLastprivate, TestOrderedMultiple, TestOrderedNowait, TestOrderedReduction, TestLock2
- new drivers
- DriverPrimal for primal computations in the presence of OpDiLib
- DriverFirstOrderForward for the tapeless forward mode of AD in the presence of OpDiLib
- DriverFirstOrderReverseVector for vector mode tests
- drivers specify associated tests explicitly
- introduce driver-specific flags
- where possible, prefer OpDiLib's tool interface over direct interaction with the OO AD tool
- faster tests
- smaller internal data sets
- default to -O1
- automatic deduction of appropriate parallelism
- tests do not use atomics for reversal of serial parts
- instrumentation no longer tied to debug mode
- support for excluding specific tests and drivers from testing
- container file for thread sanitizer tests
CI pipeline
- test different configurations of OpDiLib
- source of ImplicitTaskEnd events
- generation of events for masked constructs, worksharing constructs
- automated syntax checking
- tests with address sanitizer
- tests with thread sanitizer
Miscellaneous
- parallel regions suspend recording on the encountering task's tape
- barriers always produce events for both endpoints
- backend layer becomes responsible for producing events for both reduction-related barriers
- new newsletter address
- Zenodo publication
Merge branch 'develop'748 files changed
Lines changed: 15061 additions & 8745 deletions
File tree
- containers
- include/opdi
- backend
- macro
- ompt
- helpers
- logic
- omp
- instrument
- misc
- tool
- syntax
- tests
- drivers
- results
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
6 | | - | |
7 | | - | |
| 6 | + | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
| 30 | + | |
27 | 31 | | |
28 | 32 | | |
29 | | - | |
30 | | - | |
31 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
32 | 38 | | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
37 | 43 | | |
38 | 44 | | |
| 45 | + | |
39 | 46 | | |
| 47 | + | |
40 | 48 | | |
41 | 49 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 50 | + | |
| 51 | + | |
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
| |||
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
54 | 96 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
11 | 13 | | |
12 | 14 | | |
13 | | - | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
135 | | - | |
136 | 137 | | |
| 138 | + | |
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
| |||
156 | 158 | | |
157 | 159 | | |
158 | 160 | | |
159 | | - | |
| 161 | + | |
160 | 162 | | |
161 | 163 | | |
162 | 164 | | |
| |||
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
225 | | - | |
226 | 227 | | |
| 228 | + | |
227 | 229 | | |
228 | 230 | | |
229 | 231 | | |
| |||
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
250 | | - | |
| 252 | + | |
251 | 253 | | |
252 | 254 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
43 | 46 | | |
44 | 47 | | |
45 | | - | |
| 48 | + | |
46 | 49 | | |
47 | 50 | | |
48 | 51 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
| 57 | + | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
62 | | - | |
| 62 | + | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
| 65 | + | |
| 66 | + | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | | - | |
| 70 | + | |
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
40 | 41 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 42 | + | |
| 43 | + | |
48 | 44 | | |
49 | 45 | | |
50 | 46 | | |
| |||
69 | 65 | | |
70 | 66 | | |
71 | 67 | | |
72 | | - | |
73 | | - | |
| 68 | + | |
| 69 | + | |
74 | 70 | | |
75 | 71 | | |
76 | 72 | | |
| |||
82 | 78 | | |
83 | 79 | | |
84 | 80 | | |
85 | | - | |
86 | | - | |
| 81 | + | |
| 82 | + | |
87 | 83 | | |
88 | 84 | | |
89 | 85 | | |
| |||
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
99 | | - | |
100 | | - | |
| 95 | + | |
| 96 | + | |
101 | 97 | | |
102 | 98 | | |
103 | 99 | | |
| |||
114 | 110 | | |
115 | 111 | | |
116 | 112 | | |
117 | | - | |
118 | | - | |
| 113 | + | |
| 114 | + | |
119 | 115 | | |
120 | 116 | | |
121 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
58 | 57 | | |
59 | 58 | | |
60 | 59 | | |
61 | | - | |
62 | | - | |
63 | 60 | | |
64 | 61 | | |
65 | 62 | | |
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 66 | + | |
80 | 67 | | |
81 | 68 | | |
82 | 69 | | |
83 | 70 | | |
84 | 71 | | |
85 | 72 | | |
86 | | - | |
87 | | - | |
| 73 | + | |
| 74 | + | |
88 | 75 | | |
89 | 76 | | |
90 | 77 | | |
91 | | - | |
| 78 | + | |
92 | 79 | | |
93 | 80 | | |
94 | 81 | | |
| |||
0 commit comments