libceed 0.12.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {libceed-0.12.0 → libceed-1.0.1}/LICENSE +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/PKG-INFO +17 -3
- {libceed-0.12.0 → libceed-1.0.1}/README.md +119 -87
- {libceed-0.12.0 → libceed-1.0.1}/libceed.egg-info/PKG-INFO +17 -3
- {libceed-0.12.0 → libceed-1.0.1}/pyproject.toml +2 -6
- {libceed-0.12.0 → libceed-1.0.1}/python/__init__.py +2 -2
- {libceed-0.12.0 → libceed-1.0.1}/python/build_ceed_cffi.py +27 -10
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_basis.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_constants.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_elemrestriction.py +28 -7
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_operator.py +3 -3
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_qfunction.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_qfunctioncontext.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/python/ceed_vector.py +24 -1
- {libceed-0.12.0 → libceed-1.0.1}/setup.py +1 -1
- {libceed-0.12.0 → libceed-1.0.1}/libceed.egg-info/SOURCES.txt +0 -0
- {libceed-0.12.0 → libceed-1.0.1}/libceed.egg-info/dependency_links.txt +0 -0
- {libceed-0.12.0 → libceed-1.0.1}/libceed.egg-info/requires.txt +0 -0
- {libceed-0.12.0 → libceed-1.0.1}/libceed.egg-info/top_level.txt +0 -0
- {libceed-0.12.0 → libceed-1.0.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
BSD 2-Clause License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2017-
|
|
3
|
+
Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
|
|
4
4
|
All rights reserved.
|
|
5
5
|
|
|
6
6
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: libceed
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: libCEED: Code for Efficient Extensible Discretization
|
|
5
5
|
Home-page: https://libceed.org
|
|
6
6
|
Download-URL: https://github.com/CEED/libCEED/releases
|
|
@@ -15,7 +15,6 @@ Platform: POSIX
|
|
|
15
15
|
Classifier: Development Status :: 4 - Beta
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: Intended Audience :: Science/Research
|
|
18
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
19
18
|
Classifier: Operating System :: POSIX
|
|
20
19
|
Classifier: Programming Language :: C
|
|
21
20
|
Classifier: Programming Language :: C++
|
|
@@ -34,6 +33,21 @@ Requires-Dist: cffi
|
|
|
34
33
|
Requires-Dist: numpy
|
|
35
34
|
Provides-Extra: cuda
|
|
36
35
|
Requires-Dist: numba; extra == "cuda"
|
|
36
|
+
Dynamic: author
|
|
37
|
+
Dynamic: author-email
|
|
38
|
+
Dynamic: classifier
|
|
39
|
+
Dynamic: description
|
|
40
|
+
Dynamic: description-content-type
|
|
41
|
+
Dynamic: download-url
|
|
42
|
+
Dynamic: home-page
|
|
43
|
+
Dynamic: keywords
|
|
44
|
+
Dynamic: license
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
Dynamic: platform
|
|
47
|
+
Dynamic: project-url
|
|
48
|
+
Dynamic: provides-extra
|
|
49
|
+
Dynamic: requires-dist
|
|
50
|
+
Dynamic: summary
|
|
37
51
|
|
|
38
52
|
|
|
39
53
|
libCEED: Code for Efficient Extensible Discretization
|
|
@@ -27,7 +27,7 @@ The CEED research is supported by the [Exascale Computing Project](https://exasc
|
|
|
27
27
|
|
|
28
28
|
For more details on the CEED API see the [user manual](https://libceed.org/en/latest/).
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
<!-- getting-started-inclusion -->
|
|
31
31
|
|
|
32
32
|
## Building
|
|
33
33
|
|
|
@@ -59,9 +59,18 @@ or:
|
|
|
59
59
|
$ make AVX=0
|
|
60
60
|
```
|
|
61
61
|
|
|
62
|
+
Similarly, the library attempts to automatically detect support for SVE and SME instructions.
|
|
63
|
+
Support may be manually specified via `SVE=1` and `SME=1` as above.
|
|
64
|
+
|
|
62
65
|
if your compiler does not support gcc-style options, if you are cross compiling, etc.
|
|
63
66
|
|
|
64
67
|
To enable CUDA support, add `CUDA_DIR=/opt/cuda` or an appropriate directory to your `make` invocation.
|
|
68
|
+
To target one or more CUDA architectures, pass a space-separated `CUDA_TARGETS` list:
|
|
69
|
+
|
|
70
|
+
```console
|
|
71
|
+
$ make CUDA_DIR=/opt/cuda CUDA_TARGETS='sm_80 sm_90'
|
|
72
|
+
```
|
|
73
|
+
|
|
65
74
|
To enable HIP support, add `ROCM_DIR=/opt/rocm` or an appropriate directory.
|
|
66
75
|
To enable SYCL support, add `SYCL_DIR=/opt/sycl` or an appropriate directory.
|
|
67
76
|
Note that SYCL backends require building with oneAPI compilers as well:
|
|
@@ -122,7 +131,7 @@ Rust users can include libCEED via `Cargo.toml`:
|
|
|
122
131
|
|
|
123
132
|
```toml
|
|
124
133
|
[dependencies]
|
|
125
|
-
libceed = "0.
|
|
134
|
+
libceed = "1.0.1"
|
|
126
135
|
```
|
|
127
136
|
|
|
128
137
|
See the [Cargo documentation](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories) for details.
|
|
@@ -145,51 +154,44 @@ $ make prove
|
|
|
145
154
|
|
|
146
155
|
There are multiple supported backends, which can be selected at runtime in the examples:
|
|
147
156
|
|
|
148
|
-
| CEED resource | Backend
|
|
149
|
-
|
|
|
150
|
-
|
|
151
|
-
|
|
|
152
|
-
| `/cpu/self/ref/
|
|
153
|
-
| `/cpu/self/
|
|
154
|
-
| `/cpu/self/opt/
|
|
155
|
-
| `/cpu/self/
|
|
156
|
-
| `/cpu/self/
|
|
157
|
-
|
|
|
158
|
-
|
|
159
|
-
| **CPU
|
|
160
|
-
| `/cpu/self/
|
|
161
|
-
|
|
162
|
-
| **CPU
|
|
163
|
-
| `/cpu/self/
|
|
164
|
-
| `/cpu/self/
|
|
165
|
-
|
|
166
|
-
|
|
|
167
|
-
|
|
|
168
|
-
| `/
|
|
169
|
-
| `/
|
|
170
|
-
|
|
171
|
-
|
|
|
172
|
-
| `/gpu/
|
|
173
|
-
| `/gpu/
|
|
174
|
-
|
|
|
175
|
-
|
|
176
|
-
|
|
|
177
|
-
| `/gpu/
|
|
178
|
-
|
|
|
179
|
-
|
|
180
|
-
|
|
|
181
|
-
|
|
|
182
|
-
| `/gpu/cuda/magma
|
|
183
|
-
| `/gpu/
|
|
184
|
-
| `/gpu/hip/magma
|
|
185
|
-
|
|
186
|
-
| **OCCA** |
|
|
187
|
-
| `/*/occa` | Selects backend based on available OCCA modes | Yes |
|
|
188
|
-
| `/cpu/self/occa` | OCCA backend with serial CPU kernels | Yes |
|
|
189
|
-
| `/cpu/openmp/occa` | OCCA backend with OpenMP kernels | Yes |
|
|
190
|
-
| `/cpu/dpcpp/occa` | OCCA backend with DPC++ kernels | Yes |
|
|
191
|
-
| `/gpu/cuda/occa` | OCCA backend with CUDA kernels | Yes |
|
|
192
|
-
| `/gpu/hip/occa` | OCCA backend with HIP kernels | Yes |
|
|
157
|
+
| CEED resource | Backend | Deterministic Capable |
|
|
158
|
+
| :------------------------- | :----------------------------------------------------- | :-------------------- |
|
|
159
|
+
| **CPU Native** | | |
|
|
160
|
+
| `/cpu/self/ref/serial` | Serial reference implementation | Yes |
|
|
161
|
+
| `/cpu/self/ref/blocked` | Blocked reference implementation | Yes |
|
|
162
|
+
| `/cpu/self/opt/serial` | Serial optimized C implementation | Yes |
|
|
163
|
+
| `/cpu/self/opt/blocked` | Blocked optimized C implementation | Yes |
|
|
164
|
+
| `/cpu/self/gen/serial` | Optimized serial implementation using code generation | Yes |
|
|
165
|
+
| `/cpu/self/gen/blocked` | Optimized blocked implementation using code generation | Yes |
|
|
166
|
+
| **CPU Valgrind** | | |
|
|
167
|
+
| `/cpu/self/memcheck/*` | Memcheck backends, undefined value checks | Yes |
|
|
168
|
+
| **CPU AVX Intrinsics** | | |
|
|
169
|
+
| `/cpu/self/avx/serial` | Serial AVX implementation | Yes |
|
|
170
|
+
| `/cpu/self/avx/blocked` | Blocked AVX implementation | Yes |
|
|
171
|
+
| **CPU ARM Intrinsics** | | |
|
|
172
|
+
| `/cpu/self/sve/serial` | Serial ARM SVE implementation | Yes |
|
|
173
|
+
| `/cpu/self/sve/blocked` | Blocked ARM SVE implementation | Yes |
|
|
174
|
+
| `/cpu/self/sme/serial` | Serial ARM SME implementation | Yes |
|
|
175
|
+
| `/cpu/self/sme/blocked` | Blocked ARM SME implementation | Yes |
|
|
176
|
+
| **CPU LIBXSMM** | | |
|
|
177
|
+
| `/cpu/self/xsmm/serial` | Serial LIBXSMM implementation | Yes |
|
|
178
|
+
| `/cpu/self/xsmm/blocked` | Blocked LIBXSMM implementation | Yes |
|
|
179
|
+
| **CUDA Native** | | |
|
|
180
|
+
| `/gpu/cuda/ref` | Reference pure CUDA kernels | Yes |
|
|
181
|
+
| `/gpu/cuda/shared` | Optimized pure CUDA kernels using shared memory | Yes |
|
|
182
|
+
| `/gpu/cuda/gen` | Optimized pure CUDA kernels using code generation | No |
|
|
183
|
+
| **HIP Native** | | |
|
|
184
|
+
| `/gpu/hip/ref` | Reference pure HIP kernels | Yes |
|
|
185
|
+
| `/gpu/hip/shared` | Optimized pure HIP kernels using shared memory | Yes |
|
|
186
|
+
| `/gpu/hip/gen` | Optimized pure HIP kernels using code generation | No |
|
|
187
|
+
| **SYCL Native** | | |
|
|
188
|
+
| `/gpu/sycl/ref` | Reference pure SYCL kernels | Yes |
|
|
189
|
+
| `/gpu/sycl/shared` | Optimized pure SYCL kernels using shared memory | Yes |
|
|
190
|
+
| **MAGMA** | | |
|
|
191
|
+
| `/gpu/cuda/magma` | CUDA MAGMA kernels | No |
|
|
192
|
+
| `/gpu/cuda/magma/det` | CUDA MAGMA kernels | Yes |
|
|
193
|
+
| `/gpu/hip/magma` | HIP MAGMA kernels | No |
|
|
194
|
+
| `/gpu/hip/magma/det` | HIP MAGMA kernels | Yes |
|
|
193
195
|
|
|
194
196
|
The `/cpu/self/*/serial` backends process one element at a time and are intended for meshes with a smaller number of high order elements.
|
|
195
197
|
The `/cpu/self/*/blocked` backends process blocked batches of eight interlaced elements and are intended for meshes with higher numbers of elements.
|
|
@@ -198,15 +200,24 @@ The `/cpu/self/ref/*` backends are written in pure C and provide basic functiona
|
|
|
198
200
|
|
|
199
201
|
The `/cpu/self/opt/*` backends are written in pure C and use partial e-vectors to improve performance.
|
|
200
202
|
|
|
201
|
-
The `/cpu/self/
|
|
203
|
+
The `/cpu/self/gen/*` backends use code generation to write a function to perform the action of the Operator and compile it at runtime.
|
|
204
|
+
You can configure the compiler and optimization options at compile or runtime with the options `CEED_CPU_JIT_CXX` and `CEED_CPU_JIT_OPT`, respectively.
|
|
202
205
|
|
|
203
206
|
The `/cpu/self/memcheck/*` backends rely upon the [Valgrind](https://valgrind.org/) Memcheck tool to help verify that user QFunctions have no undefined values.
|
|
204
207
|
To use, run your code with Valgrind and the Memcheck backends, e.g. `valgrind ./build/ex1 -ceed /cpu/self/ref/memcheck`.
|
|
205
208
|
A 'development' or 'debugging' version of Valgrind with headers is required to use this backend.
|
|
206
209
|
This backend can be run in serial or blocked mode and defaults to running in the serial mode if `/cpu/self/memcheck` is selected at runtime.
|
|
207
210
|
|
|
211
|
+
The `/cpu/self/avx/*` backends rely upon AVX instructions to provide vectorized CPU performance.
|
|
212
|
+
|
|
213
|
+
The `/cpu/self/sve/*` backends use vector-length-agnostic ARM SVE instructions for tensor contractions, delegating other operations to the corresponding `/cpu/self/opt/*` backend.
|
|
214
|
+
They are built when the active compiler target supports SVE.
|
|
215
|
+
|
|
216
|
+
The `/cpu/self/sme/*` backends use vector-length-agnostic ARM Scalable Matrix Extension (SME) outer-product instructions for tensor contractions in single or double precision, delegating other operations to the corresponding `/cpu/self/opt/*` backend.
|
|
217
|
+
These backends are built when the configured compiler and target can compile the required SME intrinsics and streaming/ZA attributes.
|
|
218
|
+
|
|
208
219
|
The `/cpu/self/xsmm/*` backends rely upon the [LIBXSMM](https://github.com/libxsmm/libxsmm) package to provide vectorized CPU performance.
|
|
209
|
-
|
|
220
|
+
The LIBXSMM version 2.0 or newer is required.
|
|
210
221
|
|
|
211
222
|
The `/gpu/cuda/*` backends provide GPU performance strictly using CUDA.
|
|
212
223
|
|
|
@@ -214,6 +225,10 @@ The `/gpu/hip/*` backends provide GPU performance strictly using HIP.
|
|
|
214
225
|
They are based on the `/gpu/cuda/*` backends.
|
|
215
226
|
ROCm version 4.2 or newer is required.
|
|
216
227
|
|
|
228
|
+
The `/gpu/hip/*` backends can also run on non-AMD GPUs (e.g., Intel) via [chipStar](https://github.com/CHIP-SPV/chipStar), which implements HIP on top of SPIR-V through Level Zero or OpenCL.
|
|
229
|
+
To build against chipStar, set `HIP_DIR` to the chipStar install prefix (in place of `ROCM_DIR`); libCEED's Makefile detects chipStar by inspecting `hipconfig` and automatically enables the required code paths.
|
|
230
|
+
At runtime, chipStar's own environment variables (e.g., `CHIP_BE=level0` or `CHIP_BE=opencl`, `CHIP_DEVICE_TYPE`, `CHIP_PLATFORM`) select the backend and device — see the chipStar documentation for details.
|
|
231
|
+
|
|
217
232
|
The `/gpu/sycl/*` backends provide GPU performance strictly using SYCL.
|
|
218
233
|
They are based on the `/gpu/cuda/*` and `/gpu/hip/*` backends.
|
|
219
234
|
|
|
@@ -229,31 +244,24 @@ For example:
|
|
|
229
244
|
|
|
230
245
|
> - `/gpu/cuda/gen:device_id=1`
|
|
231
246
|
|
|
232
|
-
The `/*/occa` backends rely upon the [OCCA](http://github.com/libocca/occa) package to provide cross platform performance.
|
|
233
|
-
To enable the OCCA backend, the environment variable `OCCA_DIR` must point to the top-level OCCA directory, with the OCCA library located in the `${OCCA_DIR}/lib` (By default, `OCCA_DIR` is set to `../occa`).
|
|
234
|
-
OCCA version 1.4.0 or newer is required.
|
|
235
|
-
|
|
236
|
-
Users can pass specific OCCA device properties after setting the CEED resource.
|
|
237
|
-
For example:
|
|
238
|
-
|
|
239
|
-
> - `"/*/occa:mode='CUDA',device_id=0"`
|
|
240
|
-
|
|
241
247
|
Bit-for-bit reproducibility is important in some applications.
|
|
242
248
|
However, some libCEED backends use non-deterministic operations, such as `atomicAdd` for increased performance.
|
|
243
249
|
The backends which are capable of generating reproducible results, with the proper compilation options, are highlighted in the list above.
|
|
244
250
|
|
|
251
|
+
<!-- getting-started-exclusion -->
|
|
252
|
+
|
|
245
253
|
## Examples
|
|
246
254
|
|
|
247
255
|
libCEED comes with several examples of its usage, ranging from standalone C codes in the `/examples/ceed` directory to examples based on external packages, such as MFEM, PETSc, and Nek5000.
|
|
248
256
|
Nek5000 v18.0 or greater is required.
|
|
249
257
|
|
|
250
|
-
To build the examples, set the `MFEM_DIR`, `PETSC_DIR
|
|
258
|
+
To build the examples, set the `MFEM_DIR`, `PETSC_DIR` (and optionally `PETSC_ARCH`), and `NEK5K_DIR` variables and run:
|
|
251
259
|
|
|
252
260
|
```console
|
|
253
261
|
$ cd examples/
|
|
254
262
|
```
|
|
255
263
|
|
|
256
|
-
|
|
264
|
+
<!-- running-examples-inclusion -->
|
|
257
265
|
|
|
258
266
|
```console
|
|
259
267
|
# libCEED examples on CPU and GPU
|
|
@@ -336,7 +344,7 @@ The above code assumes a GPU-capable machine with the CUDA backends enabled.
|
|
|
336
344
|
Depending on the available backends, other CEED resource specifiers can be provided with the `-ceed` option.
|
|
337
345
|
Other command line arguments can be found in [examples/petsc](https://github.com/CEED/libCEED/blob/main/examples/petsc/README.md).
|
|
338
346
|
|
|
339
|
-
|
|
347
|
+
<!-- running-examples-exclusion -->
|
|
340
348
|
|
|
341
349
|
## Benchmarks
|
|
342
350
|
|
|
@@ -406,7 +414,7 @@ Most build systems have support for pkg-config.
|
|
|
406
414
|
|
|
407
415
|
## Contact
|
|
408
416
|
|
|
409
|
-
You can reach the libCEED team by
|
|
417
|
+
You can reach the libCEED team by leaving an issue in the [issue tracker](https://github.com/CEED/libCEED/issues).
|
|
410
418
|
|
|
411
419
|
## How to Cite
|
|
412
420
|
|
|
@@ -414,7 +422,22 @@ If you utilize libCEED please cite:
|
|
|
414
422
|
|
|
415
423
|
```bibtex
|
|
416
424
|
@article{libceed-joss-paper,
|
|
417
|
-
author = {
|
|
425
|
+
author = {
|
|
426
|
+
Brown, Jed and
|
|
427
|
+
Abdelfattah, Ahmad and
|
|
428
|
+
Barra, Valeria and
|
|
429
|
+
Beams, Natalie and
|
|
430
|
+
Camier, Jean-Sylvain and
|
|
431
|
+
Dobrev, Veselin and
|
|
432
|
+
Dudouit, Yohann and
|
|
433
|
+
Ghaffari, Leila and
|
|
434
|
+
Kolev, Tzanio and
|
|
435
|
+
Medina, David and
|
|
436
|
+
Pazner, Will and
|
|
437
|
+
Ratnayaka, Thilina and
|
|
438
|
+
Thompson, Jeremy L. and
|
|
439
|
+
Tomov, Stan
|
|
440
|
+
},
|
|
418
441
|
title = {{libCEED}: Fast algebra for high-order element-based discretizations},
|
|
419
442
|
journal = {Journal of Open Source Software},
|
|
420
443
|
year = {2021},
|
|
@@ -431,37 +454,46 @@ To cite the user manual:
|
|
|
431
454
|
|
|
432
455
|
```bibtex
|
|
433
456
|
@misc{libceed-user-manual,
|
|
434
|
-
author = {
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
457
|
+
author = {
|
|
458
|
+
Abdelfattah, Ahmad and
|
|
459
|
+
Atkins, Zachary R. and
|
|
460
|
+
Barra, Valeria and
|
|
461
|
+
Beams, Natalie and
|
|
462
|
+
Brown, Jed and
|
|
463
|
+
Camier, Jean-Sylvain and
|
|
464
|
+
Dobrev, Veselin and
|
|
465
|
+
Dudouit, Yohann and
|
|
466
|
+
Ghaffari, Leila and
|
|
467
|
+
Grimberg, Sebastian and
|
|
468
|
+
Kolev, Tzanio and
|
|
469
|
+
Medina, David and
|
|
470
|
+
Pazner, Will and
|
|
471
|
+
Ratnayaka, Thilina and
|
|
472
|
+
Shakeri, Rezgar and
|
|
473
|
+
Thompson, Jeremy L. and
|
|
474
|
+
Tomov, Stanimire and
|
|
475
|
+
Wright III, James
|
|
476
|
+
},
|
|
450
477
|
title = {{libCEED} User Manual},
|
|
451
|
-
month =
|
|
452
|
-
year =
|
|
478
|
+
month = oct,
|
|
479
|
+
year = 2026,
|
|
453
480
|
publisher = {Zenodo},
|
|
454
|
-
version = {0.
|
|
455
|
-
doi = {10.5281/zenodo.
|
|
481
|
+
version = {1.0.1},
|
|
482
|
+
doi = {10.5281/zenodo.4302736}
|
|
456
483
|
}
|
|
457
484
|
```
|
|
458
485
|
|
|
459
486
|
For libCEED's Python interface please cite:
|
|
460
487
|
|
|
461
488
|
```bibtex
|
|
462
|
-
@InProceedings{libceed-
|
|
463
|
-
author = {
|
|
464
|
-
|
|
489
|
+
@InProceedings{libceed-scipy,
|
|
490
|
+
author = {
|
|
491
|
+
Barra, Valeria and
|
|
492
|
+
Brown, Jed and
|
|
493
|
+
Thompson, Jeremy L. and
|
|
494
|
+
Dudouit, Yohann
|
|
495
|
+
},
|
|
496
|
+
title = {{H}igh-performance operator evaluations with ease of use: {libCEED}'s {P}ython interface},
|
|
465
497
|
booktitle = {{P}roceedings of the 19th {P}ython in {S}cience {C}onference},
|
|
466
498
|
pages = {85 - 90},
|
|
467
499
|
year = {2020},
|
|
@@ -476,7 +508,7 @@ The BibTeX entries for these references can be found in the `doc/bib/references.
|
|
|
476
508
|
|
|
477
509
|
The following copyright applies to each file in the CEED software suite, unless otherwise stated in the file:
|
|
478
510
|
|
|
479
|
-
> Copyright (c) 2017-
|
|
511
|
+
> Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors.
|
|
480
512
|
> All rights reserved.
|
|
481
513
|
|
|
482
514
|
See files LICENSE and NOTICE for details.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: libceed
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 1.0.1
|
|
4
4
|
Summary: libCEED: Code for Efficient Extensible Discretization
|
|
5
5
|
Home-page: https://libceed.org
|
|
6
6
|
Download-URL: https://github.com/CEED/libCEED/releases
|
|
@@ -15,7 +15,6 @@ Platform: POSIX
|
|
|
15
15
|
Classifier: Development Status :: 4 - Beta
|
|
16
16
|
Classifier: Intended Audience :: Developers
|
|
17
17
|
Classifier: Intended Audience :: Science/Research
|
|
18
|
-
Classifier: License :: OSI Approved :: BSD License
|
|
19
18
|
Classifier: Operating System :: POSIX
|
|
20
19
|
Classifier: Programming Language :: C
|
|
21
20
|
Classifier: Programming Language :: C++
|
|
@@ -34,6 +33,21 @@ Requires-Dist: cffi
|
|
|
34
33
|
Requires-Dist: numpy
|
|
35
34
|
Provides-Extra: cuda
|
|
36
35
|
Requires-Dist: numba; extra == "cuda"
|
|
36
|
+
Dynamic: author
|
|
37
|
+
Dynamic: author-email
|
|
38
|
+
Dynamic: classifier
|
|
39
|
+
Dynamic: description
|
|
40
|
+
Dynamic: description-content-type
|
|
41
|
+
Dynamic: download-url
|
|
42
|
+
Dynamic: home-page
|
|
43
|
+
Dynamic: keywords
|
|
44
|
+
Dynamic: license
|
|
45
|
+
Dynamic: license-file
|
|
46
|
+
Dynamic: platform
|
|
47
|
+
Dynamic: project-url
|
|
48
|
+
Dynamic: provides-extra
|
|
49
|
+
Dynamic: requires-dist
|
|
50
|
+
Dynamic: summary
|
|
37
51
|
|
|
38
52
|
|
|
39
53
|
libCEED: Code for Efficient Extensible Discretization
|
|
@@ -7,10 +7,6 @@ max_line_length = 80
|
|
|
7
7
|
|
|
8
8
|
[tool.cibuildwheel]
|
|
9
9
|
build-verbosity = "1"
|
|
10
|
-
test-requires = ["pytest"]
|
|
10
|
+
test-requires = ["pytest", "setuptools"]
|
|
11
11
|
test-command = "bash {project}/python/test-wheel.sh {project}"
|
|
12
|
-
skip = "
|
|
13
|
-
|
|
14
|
-
[tool.cibuildwheel.linux]
|
|
15
|
-
manylinux-x86_64-image = "manylinux2014"
|
|
16
|
-
manylinux-aarch64-image = "manylinux2014"
|
|
12
|
+
skip = "*-manylinux_i686 *_ppc64le *_s390x *-musllinux*"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -33,6 +33,6 @@ __all__ = ["Ceed",
|
|
|
33
33
|
"GAUSS", "GAUSS_LOBATTO", "quad_modes",
|
|
34
34
|
"LINE", "TRIANGLE", "QUAD", "TET", "PYRAMID", "PRISM", "HEX", "elem_topologies",
|
|
35
35
|
"REQUEST_IMMEDIATE", "REQUEST_ORDERED",
|
|
36
|
-
"VECTOR_ACTIVE", "VECTOR_NONE", "ELEMRESTRICTION_NONE", "
|
|
36
|
+
"VECTOR_ACTIVE", "VECTOR_NONE", "ELEMRESTRICTION_NONE", "BASIS_NONE"]
|
|
37
37
|
|
|
38
38
|
# ------------------------------------------------------------------------------
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -13,6 +13,29 @@ ffibuilder = FFI()
|
|
|
13
13
|
ceed_version_ge = re.compile(r'\s+\(!?CEED_VERSION.*')
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
# Checks to see if a c line is part of the lines we have to exclude (macros)
|
|
17
|
+
def is_valid_line(line):
|
|
18
|
+
if (line.startswith("#") and not line.startswith("#include")):
|
|
19
|
+
return False
|
|
20
|
+
if (line.startswith("#include \"deprecated.h\"")):
|
|
21
|
+
return False
|
|
22
|
+
if (line.startswith(" CEED_QFUNCTION_ATTR")):
|
|
23
|
+
return False
|
|
24
|
+
if (line.startswith(" static const char")):
|
|
25
|
+
return False
|
|
26
|
+
if (line.endswith('\\\n')):
|
|
27
|
+
return False
|
|
28
|
+
if ("CeedErrorImpl" in line):
|
|
29
|
+
return False
|
|
30
|
+
if (r'const char *, ...);' in line):
|
|
31
|
+
return False
|
|
32
|
+
if (line.startswith("CEED_EXTERN const char *const")):
|
|
33
|
+
return False
|
|
34
|
+
if (ceed_version_ge.match(line)):
|
|
35
|
+
return False
|
|
36
|
+
return True
|
|
37
|
+
|
|
38
|
+
|
|
16
39
|
def get_ceed_dirs():
|
|
17
40
|
here = os.path.dirname(os.path.abspath(__file__))
|
|
18
41
|
prefix = os.path.dirname(here)
|
|
@@ -31,14 +54,7 @@ ceed_dir, ceed_libdir = get_ceed_dirs()
|
|
|
31
54
|
lines = []
|
|
32
55
|
for header_path in ["include/ceed/types.h", "include/ceed/ceed.h"]:
|
|
33
56
|
with open(os.path.abspath(header_path)) as f:
|
|
34
|
-
lines += [line.strip() for line in f if
|
|
35
|
-
not (line.startswith("#") and not line.startswith("#include")) and
|
|
36
|
-
not line.startswith(" static") and
|
|
37
|
-
not line.startswith(" CEED_QFUNCTION_ATTR") and
|
|
38
|
-
"CeedErrorImpl" not in line and
|
|
39
|
-
"const char *, ...);" not in line and
|
|
40
|
-
not line.startswith("CEED_EXTERN const char *const") and
|
|
41
|
-
not ceed_version_ge.match(line)]
|
|
57
|
+
lines += [line.strip() for line in f if is_valid_line(line)]
|
|
42
58
|
lines = [line.replace("CEED_EXTERN", "extern") for line in lines]
|
|
43
59
|
|
|
44
60
|
# Find scalar type inclusion line and insert definitions
|
|
@@ -62,7 +78,8 @@ lines = [line for line in lines if not line.startswith("#include")]
|
|
|
62
78
|
header = '\n'.join(lines)
|
|
63
79
|
header = header.split("static inline CeedInt CeedIntPow", 1)[0]
|
|
64
80
|
header += '\nextern int CeedVectorGetState(CeedVector, uint64_t*);'
|
|
65
|
-
header += '\nextern int
|
|
81
|
+
header += '\nextern int CeedElemRestrictionGetLLayout(CeedElemRestriction, CeedInt layout[3]);'
|
|
82
|
+
header += '\nextern int CeedElemRestrictionGetELayout(CeedElemRestriction, CeedInt layout[3]);'
|
|
66
83
|
|
|
67
84
|
# Note: cffi cannot handle vargs
|
|
68
85
|
header = re.sub("va_list", "const char *", header)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -122,8 +122,30 @@ class _ElemRestrictionBase(ABC):
|
|
|
122
122
|
# Return
|
|
123
123
|
return mult
|
|
124
124
|
|
|
125
|
-
# Get ElemRestrition Layout
|
|
126
|
-
def
|
|
125
|
+
# Get ElemRestrition L-vector Layout
|
|
126
|
+
def get_l_layout(self):
|
|
127
|
+
"""Get the local vector layout of an ElemRestriction.
|
|
128
|
+
|
|
129
|
+
Returns:
|
|
130
|
+
layout: Vector containing layout array, stored as [nodes, components, elements].
|
|
131
|
+
The data for node i, component j, element k in the element
|
|
132
|
+
vector is given by i*layout[0] + j*layout[1] + k*layout[2]."""
|
|
133
|
+
|
|
134
|
+
# Create output array
|
|
135
|
+
layout = np.zeros(3, dtype="int32")
|
|
136
|
+
layout_pointer = ffi.cast("const CeedInt *",
|
|
137
|
+
layout.__array_interface__['data'][0])
|
|
138
|
+
|
|
139
|
+
# libCEED call
|
|
140
|
+
err_code = lib.CeedElemRestrictionGetLLayout(
|
|
141
|
+
self._pointer[0], layout_pointer)
|
|
142
|
+
self._ceed._check_error(err_code)
|
|
143
|
+
|
|
144
|
+
# Return
|
|
145
|
+
return layout
|
|
146
|
+
|
|
147
|
+
# Get ElemRestrition E-vector Layout
|
|
148
|
+
def get_e_layout(self):
|
|
127
149
|
"""Get the element vector layout of an ElemRestriction.
|
|
128
150
|
|
|
129
151
|
Returns:
|
|
@@ -133,13 +155,12 @@ class _ElemRestrictionBase(ABC):
|
|
|
133
155
|
|
|
134
156
|
# Create output array
|
|
135
157
|
layout = np.zeros(3, dtype="int32")
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
layout.__array_interface__['data'][0])
|
|
158
|
+
layout_pointer = ffi.cast("const CeedInt *",
|
|
159
|
+
layout.__array_interface__['data'][0])
|
|
139
160
|
|
|
140
161
|
# libCEED call
|
|
141
162
|
err_code = lib.CeedElemRestrictionGetELayout(
|
|
142
|
-
self._pointer[0],
|
|
163
|
+
self._pointer[0], layout_pointer)
|
|
143
164
|
self._ceed._check_error(err_code)
|
|
144
165
|
|
|
145
166
|
# Return
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -331,7 +331,7 @@ class CompositeOperator(_OperatorBase):
|
|
|
331
331
|
# Reference to Ceed
|
|
332
332
|
self._ceed = ceed
|
|
333
333
|
# libCEED call
|
|
334
|
-
err_code = lib.
|
|
334
|
+
err_code = lib.CeedOperatorCreateComposite(
|
|
335
335
|
self._ceed._pointer[0], self._pointer)
|
|
336
336
|
self._ceed._check_error(err_code)
|
|
337
337
|
|
|
@@ -343,7 +343,7 @@ class CompositeOperator(_OperatorBase):
|
|
|
343
343
|
subop: sub-operator Operator"""
|
|
344
344
|
|
|
345
345
|
# libCEED call
|
|
346
|
-
err_code = lib.
|
|
346
|
+
err_code = lib.CeedOperatorCompositeAddSub(
|
|
347
347
|
self._pointer[0], subop._pointer[0])
|
|
348
348
|
self._ceed._check_error(err_code)
|
|
349
349
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright (c) 2017-
|
|
1
|
+
# Copyright (c) 2017-2026, Lawrence Livermore National Security, LLC and other CEED contributors
|
|
2
2
|
# All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
|
|
3
3
|
#
|
|
4
4
|
# SPDX-License-Identifier: BSD-2-Clause
|
|
@@ -101,6 +101,29 @@ class Vector():
|
|
|
101
101
|
self._pointer[0], memtype, cmode, array_pointer)
|
|
102
102
|
self._ceed._check_error(err_code)
|
|
103
103
|
|
|
104
|
+
# Take Vector's data array
|
|
105
|
+
def take_array(self, memtype=MEM_HOST):
|
|
106
|
+
"""Take ownership of the array set by set_array with USE_POINTER and remove the array from the Vector
|
|
107
|
+
|
|
108
|
+
Args:
|
|
109
|
+
**memtype: memory type of the array being taken, default CEED_MEM_HOST
|
|
110
|
+
|
|
111
|
+
Returns:
|
|
112
|
+
*array: array passed to set_array"""
|
|
113
|
+
|
|
114
|
+
# Setup the pointer's pointer
|
|
115
|
+
array_pointer = ffi.new("CeedScalar **")
|
|
116
|
+
|
|
117
|
+
# libCEED call
|
|
118
|
+
err_code = lib.CeedVectorTakeArray(
|
|
119
|
+
self._pointer[0], memtype, array_pointer)
|
|
120
|
+
self._ceed._check_error(err_code)
|
|
121
|
+
|
|
122
|
+
# Return array
|
|
123
|
+
array = self._array_reference
|
|
124
|
+
self._array_reference = None
|
|
125
|
+
return array
|
|
126
|
+
|
|
104
127
|
# Get Vector's data array
|
|
105
128
|
def get_array(self, memtype=MEM_HOST):
|
|
106
129
|
"""Get read/write access to a Vector via the specified memory type.
|
|
@@ -53,6 +53,7 @@ class libceed_build_ext(build_ext):
|
|
|
53
53
|
'-j{}'.format(nproc),
|
|
54
54
|
'--always-make',
|
|
55
55
|
'install',
|
|
56
|
+
'OPT=$(MARCHFLAG) $(OPT.$(CC_VENDOR)) $(OMP_SIMD_FLAG) -O3',
|
|
56
57
|
'prefix=' + prefix,
|
|
57
58
|
'FC=', # Don't try to find Fortran (unused library build/install)
|
|
58
59
|
])
|
|
@@ -79,7 +80,6 @@ classifiers = """
|
|
|
79
80
|
Development Status :: 4 - Beta
|
|
80
81
|
Intended Audience :: Developers
|
|
81
82
|
Intended Audience :: Science/Research
|
|
82
|
-
License :: OSI Approved :: BSD License
|
|
83
83
|
Operating System :: POSIX
|
|
84
84
|
Programming Language :: C
|
|
85
85
|
Programming Language :: C++
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|