1# libCEED: the CEED API Library 2 3[](https://travis-ci.org/CEED/libCEED) 4[](https://opensource.org/licenses/BSD-2-Clause) 5 6## Code for Efficient Extensible Discretization 7 8This repository contains an initial low-level API library for the efficient 9high-order discretization methods developed by the ECP co-design [Center for 10Efficient Exascale Discretizations (CEED)](http://ceed.exascaleproject.org). 11While our focus is on high-order finite elements, the approach is mostly 12algebraic and thus applicable to other discretizations in factored form, see the 13[API documentation](doc/libCEED.md). 14 15One of the challenges with high-order methods is that a global sparse matrix is 16no longer a good representation of a high-order linear operator, both with 17respect to the FLOPs needed for its evaluation, as well as the memory transfer 18needed for a matvec. Thus, high-order methods require a new "format" that still 19represents a linear (or more generally non-linear) operator, but not through a 20sparse matrix. 21 22The goal of libCEED is to propose such a format, as well as supporting 23implementations and data structures, that enable efficient operator evaluation 24on a variety of computational device types (CPUs, GPUs, etc.). This new operator 25description is based on algebraically [factored form](doc/libCEED.md), which is 26easy to incorporate in a wide variety of applications, without significant 27refactoring of their own discretization infrastructure. 28 29The repository is part of the [CEED software 30suite](http://ceed.exascaleproject.org/software/), a collection of software 31benchmarks, miniapps, libraries and APIs for efficient exascale discretizations 32based on high-order finite element and spectral element methods. See 33http://github.com/ceed for more information and source code availability. 34 35The CEED research is supported by the [Exascale Computing Project](https://exascaleproject.org/exascale-computing-project) 36(17-SC-20-SC), a collaborative effort of two U.S. Department of Energy 37organizations (Office of Science and the National Nuclear Security 38Administration) responsible for the planning and preparation of a 39[capable exascale ecosystem](https://exascaleproject.org/what-is-exascale), 40including software, applications, hardware, advanced system engineering and early 41testbed platforms, in support of the nation’s exascale computing imperative. 42 43For more details on the CEED API see http://ceed.exascaleproject.org/ceed-code/. 44 45## Building 46 47The CEED library, `libceed`, is a C99 library with no external dependencies. 48It can be built using 49 50 make 51 52## Testing 53 54The test suite produces [TAP](https://testanything.org) output and is run by: 55 56 make test 57 58or, using the `prove` tool distributed with Perl (recommended) 59 60 make prove 61 62## Install 63 64To install libCEED, run 65 66 make install prefix=/usr/local 67 68or (e.g., if creating packages), 69 70 make install prefix=/usr DESTDIR=/packaging/path 71 72Note that along with the library, libCEED installs kernel sources, e.g. OCCA 73kernels are installed in `$prefix/lib/okl`. This allows the OCCA backend to 74build specialized kernels at run-time. In a normal setting, the kernel sources 75will be found automatically (relative to the library file `libceed.so`). 76However, if that fails (e.g. if `libceed.so` is moved), one can copy (cache) the 77kernel sources inside the user OCCA directory, `~/.occa` using 78 79 $(OCCA_DIR)/bin/occa cache ceed $(CEED_DIR)/lib/okl/*.okl 80 81This will allow OCCA to find the sources regardless of the location of the CEED 82library. 83 84### pkg-config 85 86In addition to library and header, libCEED provides a 87[pkg-config](https://en.wikipedia.org/wiki/Pkg-config) file that can be 88used to easily compile and link. 89[For example](https://people.freedesktop.org/~dbn/pkg-config-guide.html#faq), 90if `$prefix` is a standard location or you set the environment variable 91`PKG_CONFIG_PATH`, 92 93 cc `pkg-config --cflags --libs ceed` -o myapp myapp.c 94 95will build `myapp` with libCEED. This can be used with the source or 96installed directories. Most build systems have support for pkg-config. 97 98## Contact 99 100You can reach the libCEED team by emailing [ceed-users@llnl.gov](mailto:ceed-users@llnl.gov) 101or by leaving a comment in the [issue tracker](https://github.com/CEED/libCEED/issues). 102 103## Copyright 104 105The following copyright applies to each file in the CEED software suite, unless 106otherwise stated in the file: 107 108> Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at the 109> Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights reserved. 110 111See files LICENSE and NOTICE for details. 112