Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CUDA build instructions #1335

Merged
merged 2 commits into from
Jul 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 23 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,18 @@ requirements of the [HL-LHC upgrade][HLLHC].
# Documentation

Most of the Celeritas documentation is readable through the codebase through a
combination of [static RST documentation](doc/index.rst) and Doxygen-markup
combination of [static RST documentation][inline-docs] and Doxygen-markup
comments in the source code itself. The full [Celeritas user
documentation][user-docs] (including selected code documentation incorporated
by Breathe) and the [Celeritas code documentation][dev-docs] are mirrored on
our GitHub pages site. You can generate these yourself (if the necessary
prerequisites are installed) by
setting the `CELERITAS_BUILD_DOCS=ON` configuration option and running `ninja
doc` (user) or `ninja doxygen` (developer). A continuously updated version of
the [static Celeritas user documentation][rtd] (without API documentation) is
hosted on `readthedocs.io`.
doc` (user) or `ninja doxygen` (developer).

[inline-docs]: doc/index.rst
[user-docs]: https://celeritas-project.github.io/celeritas/user/index.html
[dev-docs]: https://celeritas-project.github.io/celeritas/dev/index.html
[rtd]: https://celeritas.readthedocs.io/en/latest/

# Installation for applications

Expand All @@ -31,11 +29,20 @@ The easiest way to install Celeritas as a library/app is with Spack:
- Install Celeritas with `spack install celeritas`
- Use `spack load celeritas` to add the installation to your `PATH`.

To install a GPU-enabled Celeritas build, you might have to make sure that VecGeom is also built with CUDA
support if installing `celeritas+vecgeom`, which is the default geometry.
To do so, set the following configuration:
```console
# Replace cuda_arch=80 with your target architecture
$ spack config add packages:vecgeom:variants:"cxxstd=17 +cuda cuda_arch=80"
$ spack install celeritas +cuda cuda_arch=80
```

Then see the "Downstream usage as a library" section of the [installation
documentation][install] for how to use Celeritas in your application or framework.

[spack-start]: https://spack.readthedocs.io/en/latest/getting_started.html
[install]: doc/main/installation.rst
[install]: https://celeritas-project.github.io/celeritas/user/main/installation.html

# Installation for developers

Expand Down Expand Up @@ -94,24 +101,29 @@ The full set of configurations is viewable on CI platforms ([Jenkins][jenkins] a
Compatibility fixes that do not cause newer versions to fail are welcome.

[spack]: https://github.com/spack/spack
[install]: doc/main/installation.rst
[install]: https://celeritas-project.github.io/celeritas/user/main/installation.html
[jenkins]: https://cloud.cees.ornl.gov/jenkins-ci/job/celeritas/job/develop
[gha]: https://github.com/celeritas-project/celeritas/actions

# Development

See the [contribution guide](CONTRIBUTING.rst) for the contribution process,
[the development guidelines](doc/appendix/development.rst) for further
details on coding in Celeritas, and [the administration guidelines](doc/appendix/administration.rst) for community standards and roles.
See the [contribution guide][contributing-guidelines] for the contribution process,
[the development guidelines][development-guidelines] for further
details on coding in Celeritas, and [the administration guidelines][administration-guidelines] for community standards and roles.

[contributing-guidelines]: https://celeritas-project.github.io/celeritas/user/appendix/development.html#contributing-to-celeritas
[development-guidelines]: https://celeritas-project.github.io/celeritas/user/appendix/development.html#code-development-guidelines
[administration-guidelines]: https://celeritas-project.github.io/celeritas/user/appendix/administration.html

# Directory structure

| **Directory** | **Description** |
| ------------- | --------------- |
|---------------|-------------------------------------------------------|
| **app** | Source code for installed executable applications |
| **cmake** | Implementation code for CMake build configuration |
| **doc** | Code documentation and manual |
| **example** | Example applications and input files |
| **external** | Automatically fetched external CMake dependencies |
| **interface** | Wrapper interfaces to Celeritas library functions |
| **scripts** | Development and continuous integration helper scripts |
| **src** | Library source code |
Expand Down