Skip to content

Commit 6ee5fd4

Browse files
committed
doc - document CI information
1 parent 1c3bacf commit 6ee5fd4

1 file changed

Lines changed: 48 additions & 0 deletions

File tree

doc/sphinx/source/libCEEDdev.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Developer Notes
22

3+
34
## Library Design
45

56
LibCEED has a single user facing API for creating and using the libCEED objects ({ref}`CeedVector`, {ref}`CeedBasis`, etc).
@@ -19,6 +20,7 @@ If there are no performance specific considerations, it is generally recommended
1920
Any new functions must be well documented and tested.
2021
Once the user facing API and the default implementation are in place and verified correct via tests, then the developer can focus on hardware specific implementations (AVX, CUDA, HIP, etc.) as necessary.
2122

23+
2224
## Backend Inheritance
2325

2426
A Ceed backend is not required to implement all libCEED objects or {ref}`CeedOperator` methods.
@@ -40,11 +42,13 @@ There are three mechanisms by which a Ceed backend can inherit implementations f
4042
If an unimplemented method is called, then the parent `/gpu/cuda/gen` {ref}`Ceed` object uses its fallback `/gpu/cuda/ref` {ref}`Ceed` object to create a clone of the {ref}`CeedOperator`.
4143
This clone {ref}`CeedOperator` is then used for the unimplemented preconditioning support methods.
4244

45+
4346
## Backend Families
4447

4548
There are 4 general 'families' of backend implementations.
4649
As internal data layouts are specific to backend families, it is generally not possible to delegate between backend families.
4750

51+
4852
### CPU Backends
4953

5054
The basic CPU with the simplest implementation is `/cpu/self/ref/serial`.
@@ -63,6 +67,7 @@ The `/cpu/self/memcheck/*` backends delegate to the `/cpu/self/ref/*` backends.
6367
These backends replace many of the implementations with methods that include more verification checks and a memory management model that more closely matches the memory management for GPU backends.
6468
These backends rely upon the [Valgrind](https://valgrind.org/) Memcheck tool and Valgrind headers.
6569

70+
6671
### GPU Backends
6772

6873
The CUDA, HIP, and SYCL backend families all follow similar designs.
@@ -86,6 +91,7 @@ This kernel is compiled at runtime via NVRTC, HIPRTC, or OpenCL RTC.
8691
The `/gpu/*/magma` backends delegate to the corresponding `/gpu/cuda/ref` and `/gpu/hip/ref` backends.
8792
These backends provide better performance for {ref}`CeedBasis` kernels but do not have the improvements from the `/gpu/*/gen` backends for {ref}`CeedOperator`.
8893

94+
8995
## Internal Layouts
9096

9197
Ceed backends are free to use any E-vector and Q-vector data layout (including never fully forming these vectors) so long as the backend passes the `t5**` series tests and all examples.
@@ -111,6 +117,7 @@ There are several common layouts for L-vectors, E-vectors, and Q-vectors, detail
111117
- When the {ref}`CeedQFunction` field has `emode` `CEED_EVAL_GRAD`, data for quadrature point `i`, component `j`, derivative `k` can be found in the Q-vector at index `i + Q*j + Q*num_comp*k`.
112118
- Backend developers must take special care to ensure that the data in the Q-vectors for a field with `emode` `CEED_EVAL_NONE` is properly ordered when the backend uses different layouts for E-vectors and Q-vectors.
113119

120+
114121
## CeedVector Array Access
115122

116123
Backend implementations are expected to separately track 'owned' and 'borrowed' memory locations.
@@ -146,6 +153,7 @@ All backends may assume that array access will conform to these guidelines:
146153
Data synchronization is not required for the memory location returned by {c:func}`CeedVectorGetArrayWrite`.
147154
The caller should assume that all data at the memory location returned by {c:func}`CeedVectorGetArrayWrite` is *invalid*.
148155

156+
149157
## Shape
150158

151159
Backends often manipulate tensors of dimension greater than 2.
@@ -182,11 +190,13 @@ and
182190

183191
are purely implicit -- one just indexes the same array using the appropriate convention.
184192

193+
185194
## `restrict` Semantics
186195

187196
QFunction arguments can be assumed to have `restrict` semantics.
188197
That is, each input and output array must reside in distinct memory without overlap.
189198

199+
190200
## Style Guide
191201

192202
Please check your code for style issues by running
@@ -209,13 +219,18 @@ Single line `if` statements are acceptable, but if `clang-format` forces it to b
209219
This is enforced automatically for all enabled backends via `make format`, with the exception of header files in the `include/ceed/jit-source` directory.
210220
These files cannot be automatically formatted by `clang-tidy`, as they cannot be compiled as standalone sources.
211221

222+
212223
## Function Conventions
213224

225+
214226
### Naming
227+
215228
All functions in the libCEED library should be prefixed by `Ceed` and generally take a `Ceed` object as its first argument.
216229
If a function takes, for example, a `CeedOperator` as its first argument, then it should be prefixed with `CeedOperator`.
217230

231+
218232
### Style
233+
219234
Functions should adhere mostly to the PETSc function style, specifically:
220235

221236
1. All local variables of a particular type (for example, `CeedInt`) should be listed on the same line if possible; otherwise, they should be listed on adjacent lines. For example,
@@ -265,6 +280,7 @@ int CeedInit(const char *resource, Ceed *ceed) {
265280
All other functions should have their *declarations* prefixed with `CEED_INTERN`.
266281
Function *definitions* should have neither.
267282
283+
268284
## Clang-tidy
269285
270286
Please check your code for common issues by running
@@ -280,6 +296,7 @@ To run on a single file, use
280296
for example.
281297
All issues reported by `make tidy` should be fixed.
282298
299+
283300
## Include-What-You-Use
284301
285302
Header inclusion for source files should follow the principal of 'include what you use' rather than relying upon transitive `#include` to define all symbols.
@@ -299,3 +316,34 @@ The `ceed-f64.h` and `ceed-f32.h` headers should only be included in `ceed.h`.
299316
#include <string.h>
300317
#include "ceed-avx.h"
301318
```
319+
320+
321+
## Updating CI
322+
323+
There are two main types of CI for libCEED - GitHub Actions and GitLab Runners.
324+
325+
The GitHub Actions focus on CPU based tests without any external dependencies, for the C, Fortran, Rust, Python, and Julia interfaces.
326+
The GitHub Actions can be updated as required by editing the appropriate `.yml` file in `.github/workflows`.
327+
328+
The GitLab Runners focus on GPU based tests and external dependencies.
329+
The GitLab Runners can be updated as required by editing `.gitlab-ci.yml` and updating the dependencies installed on Noether.
330+
331+
The following dependencies are installed on Noether:
332+
333+
* MAGMA: `/projects/MAGMA` and `/projects/hipMAGMA`
334+
335+
* PETSc: `/projects/petsc`
336+
337+
* deal.II: `/projects/dealii`
338+
339+
The following dependencies are built on the fly and cached:
340+
341+
* LIBXSMM
342+
343+
* Nek5000
344+
345+
When managing the installed dependencies, use the `phypid` account.
346+
347+
Note: PETSc commit `7ada2a5134eeb4113b6693316dd2660902f08a96` must be reverted for libCEED fluid dynamics examples to pass (see [issue 1686](https://github.com/CEED/libCEED/issues/1686)).
348+
349+
* MFEM

0 commit comments

Comments
 (0)