Skip to content

Commit

Permalink
Merge branch 'main' into natalie/multiprec-vec
Browse files Browse the repository at this point in the history
  • Loading branch information
nbeams committed May 26, 2022
2 parents df27fe0 + fe329bd commit ed90cc3
Show file tree
Hide file tree
Showing 170 changed files with 6,289 additions and 2,173 deletions.
1 change: 1 addition & 0 deletions .github/workflows/c-fortran-test-linux-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
CC: ${{ matrix.compiler }}
FC: gfortran-9
run: |
make -v
make info
make -j2
PROVE_OPTS=-v make prove -j2
7 changes: 3 additions & 4 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ noether-cpu:
- export COVERAGE=0
- cd .. && export NEK5K_VERSION=Nek5000-19.0 && { [[ -d $NEK5K_VERSION ]] || { git clone --depth 1 --branch v19.0 https://github.com/Nek5000/Nek5000.git $NEK5K_VERSION && cd $NEK5K_VERSION/tools && ./maketools genbox genmap reatore2 && cd ../..; }; } && export NEK5K_DIR=$PWD/$NEK5K_VERSION && export PATH=$NEK5K_DIR/bin:$PATH MPI=0 && cd libCEED
- echo "-------------- Nek5000 -------------" && git -C $NEK5K_DIR describe --tags
- make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=nek
- make -k -j$NPROC_CPU BACKENDS="$BACKENDS_CPU" JUNIT_BATCH="cpu" junit search=nek NEK5K_DIR=$NEK5K_DIR
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --exit-code
Expand Down Expand Up @@ -123,7 +123,7 @@ noether-rocm:
- export COVERAGE=0
- cd .. && export NEK5K_VERSION=Nek5000-19.0 && { [[ -d $NEK5K_VERSION ]] || { git clone --depth 1 --branch v19.0 https://github.com/Nek5000/Nek5000.git $NEK5K_VERSION && cd $NEK5K_VERSION/tools && ./maketools genbox genmap reatore2 && cd ../..; }; } && export NEK5K_DIR=$PWD/$NEK5K_VERSION && export PATH=$NEK5K_DIR/bin:$PATH MPI=0 && cd libCEED
- echo "-------------- Nek5000 -------------" && git -C $NEK5K_DIR describe --tags
- make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=nek
- make -k -j$NPROC_GPU BACKENDS="$BACKENDS_GPU" JUNIT_BATCH="hip" junit search=nek NEK5K_DIR=$NEK5K_DIR
# Clang-tidy
- echo "-------------- clang-tidy ----------" && clang-tidy --version
- TIDY_OPTS="-fix-errors" make -j$NPROC_CPU tidy && git diff --exit-code
Expand Down Expand Up @@ -240,8 +240,7 @@ lv-cuda:
# -- PETSc with CUDA (minimal)
- export PETSC_DIR=/home/jeth8984/petsc PETSC_ARCH=cuda-O && git -C $PETSC_DIR describe
- echo "-------------- PETSc ---------------" && make -C $PETSC_DIR info
# Note: Skipping fluids and solids due to CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES on RTX 2080 Super
- nice make -k -j$NPROC_GPU JUNIT_BATCH="cuda" junit BACKENDS="$BACKENDS_GPU" search="petsc"
- nice make -k -j$NPROC_GPU JUNIT_BATCH="cuda" junit BACKENDS="$BACKENDS_GPU" search="petsc fluids solids"
# Report status
- touch .SUCCESS
after_script:
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cff-version: 1.2.0
title: "libCEED: Efficient Extensible Discretization"
version: 0.10.0
version: 0.10.1
date-released: 2021-07-07
license: BSD-2-Clause
message: "Please cite the following works when using this software."
Expand Down
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = libCEED
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v0.10.0
PROJECT_NUMBER = v0.10.1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ CEED_LDFLAGS += $(if $(ASAN),$(AFLAGS))
CPPFLAGS += -I./include
CEED_LDLIBS = -lm
OBJDIR := build
LIBDIR := lib
for_install := $(filter install,$(MAKECMDGOALS))
LIBDIR := $(if $(for_install),$(OBJDIR),lib)


# Installation variables
prefix ?= /usr/local
Expand Down Expand Up @@ -180,7 +182,7 @@ libceed.so := $(LIBDIR)/libceed.$(SO_EXT)
libceed.a := $(LIBDIR)/libceed.a
libceed := $(if $(STATIC),$(libceed.a),$(libceed.so))
CEED_LIBS = -lceed
libceed.c := $(filter-out interface/ceed-cuda.c interface/ceed-hip.c, $(wildcard interface/ceed*.c backends/*.c gallery/*.c))
libceed.c := $(filter-out interface/ceed-cuda.c interface/ceed-hip.c interface/ceed-jit-source-root-$(if $(for_install),default,install).c, $(wildcard interface/ceed*.c backends/*.c gallery/*.c))
gallery.c := $(wildcard gallery/*/ceed*.c)
libceed.c += $(gallery.c)
libceeds = $(libceed)
Expand Down Expand Up @@ -624,9 +626,14 @@ $(OBJDIR)/ceed.pc : pkgconfig-prefix = $(prefix)
-e "s:%prefix%:$(pkgconfig-prefix):" \
-e "s:%libs_private%:$(pkgconfig-libs-private):" $< > $@

$(OBJDIR)/interface/ceed-jit-source-root-default.o : CPPFLAGS += -DCEED_JIT_SOUCE_ROOT_DEFAULT="\"$(abspath ./include)/\""
$(OBJDIR)/interface/ceed-jit-source-root-install.o : CPPFLAGS += -DCEED_JIT_SOUCE_ROOT_DEFAULT="\"$(abspath $(includedir))/\""

install : $(libceed) $(OBJDIR)/ceed.pc
$(INSTALL) -d $(addprefix $(if $(DESTDIR),"$(DESTDIR)"),"$(includedir)"\
"$(includedir)/ceed/" "$(libdir)" "$(pkgconfigdir)")
"$(includedir)/ceed/" "$(includedir)/ceed/jit-source/"\
"$(includedir)/ceed/jit-source/cuda/" "$(includedir)/ceed/jit-source/hip/"\
"$(includedir)/ceed/jit-source/gallery/" "$(libdir)" "$(pkgconfigdir)")
$(INSTALL_DATA) include/ceed/ceed.h "$(DESTDIR)$(includedir)/ceed/"
$(INSTALL_DATA) include/ceed/ceed-f32.h "$(DESTDIR)$(includedir)/ceed/"
$(INSTALL_DATA) include/ceed/ceed-f64.h "$(DESTDIR)$(includedir)/ceed/"
Expand All @@ -640,6 +647,9 @@ install : $(libceed) $(OBJDIR)/ceed.pc
$(INSTALL_DATA) $(OBJDIR)/ceed.pc "$(DESTDIR)$(pkgconfigdir)/"
$(INSTALL_DATA) include/ceed.h "$(DESTDIR)$(includedir)/"
$(INSTALL_DATA) include/ceedf.h "$(DESTDIR)$(includedir)/"
$(INSTALL_DATA) $(wildcard include/ceed/jit-source/cuda/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/cuda/"
$(INSTALL_DATA) $(wildcard include/ceed/jit-source/hip/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/hip/"
$(INSTALL_DATA) $(wildcard include/ceed/jit-source/gallery/*.h) "$(DESTDIR)$(includedir)/ceed/jit-source/gallery/"

.PHONY : all cln clean doxygen doc lib install par print test tst prove prv prove-all junit examples style style-c style-py tidy iwyu info info-backends info-backends-all

Expand Down Expand Up @@ -677,7 +687,7 @@ style : style-c style-py
CLANG_TIDY ?= clang-tidy

%.c.tidy : %.c
$(CLANG_TIDY) $(TIDY_OPTS) $^ -- $(CPPFLAGS) --std=c99 -I$(CUDA_DIR)/include -I$(HIP_DIR)/include
$(CLANG_TIDY) $(TIDY_OPTS) $^ -- $(CPPFLAGS) --std=c99 -I$(CUDA_DIR)/include -I$(HIP_DIR)/include -DCEED_JIT_SOUCE_ROOT_DEFAULT="\"$(abspath ./include)/\""

%.cpp.tidy : %.cpp
$(CLANG_TIDY) $(TIDY_OPTS) $^ -- $(CPPFLAGS) --std=c++11 -I$(CUDA_DIR)/include -I$(OCCA_DIR)/include -I$(HIP_DIR)/include
Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ For more details about the benchmarks, see the `benchmarks/README.md` file.
To install libCEED, run:

```
make install prefix=/usr/local
make install prefix=/path/to/install/dir
```

or (e.g., if creating packages):
Expand All @@ -384,6 +384,13 @@ or (e.g., if creating packages):
make install prefix=/usr DESTDIR=/packaging/path
```

To build and install in separate steps, run:

```
make for_install=1 prefix=/path/to/install/dir
make install prefix=/path/to/install/dir
```

The usual variables like `CC` and `CFLAGS` are used, and optimization flags
for all languages can be set using the likes of `OPT='-O3 -march=native'`. Use
`STATIC=1` to build static libraries (`libceed.a`).
Expand Down
10 changes: 6 additions & 4 deletions backends/cuda-ref/ceed-cuda-ref-basis.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,9 @@ int CeedBasisCreateTensorH1_Cuda(CeedInt dim, CeedInt P_1d, CeedInt Q_1d,
CeedInt num_comp;
ierr = CeedBasisGetNumComponents(basis, &num_comp); CeedChkBackend(ierr);
char *basis_kernel_path, *basis_kernel_source;
ierr = CeedPathConcatenate(ceed, __FILE__, "kernels/cuda-ref-basis-tensor.h",
&basis_kernel_path); CeedChkBackend(ierr);
ierr = CeedGetJitAbsolutePath(ceed,
"ceed/jit-source/cuda/cuda-ref-basis-tensor.h",
&basis_kernel_path); CeedChkBackend(ierr);
CeedDebug256(ceed, 2, "----- Loading Basis Kernel Source -----\n");
ierr = CeedLoadSourceToBuffer(ceed, basis_kernel_path, &basis_kernel_source);
CeedChkBackend(ierr);
Expand Down Expand Up @@ -335,8 +336,9 @@ int CeedBasisCreateH1_Cuda(CeedElemTopology topo, CeedInt dim,
CeedInt num_comp;
ierr = CeedBasisGetNumComponents(basis, &num_comp); CeedChkBackend(ierr);
char *basis_kernel_path, *basis_kernel_source;
ierr = CeedPathConcatenate(ceed, __FILE__, "kernels/cuda-ref-basis-nontensor.h",
&basis_kernel_path); CeedChkBackend(ierr);
ierr = CeedGetJitAbsolutePath(ceed,
"ceed/jit-source/cuda/cuda-ref-basis-nontensor.h",
&basis_kernel_path); CeedChkBackend(ierr);
CeedDebug256(ceed, 2, "----- Loading Basis Kernel Source -----\n");
ierr = CeedLoadSourceToBuffer(ceed, basis_kernel_path, &basis_kernel_source);
CeedChkBackend(ierr);
Expand Down
Loading

0 comments on commit ed90cc3

Please sign in to comment.