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

Update Readme and Contributing doc #1532

Merged
merged 13 commits into from
Dec 4, 2024
3 changes: 3 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
# doi = {10.1051/epjconf/202429511005}
# }
#
# Note: This information is also present in the README.md and needs to
# kept in sync.
#
# (CFF):

cff-version: 1.2.0
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ Congratulations!

.. [resol] When you've fully implemented the reviewer's comment, you may mark
it as resolved without commenting. Do not resolve a conversation if you
disagree with the feed: instead, post your view in a follow-on comment and
disagree with the feedback: instead, post your view in a follow-on comment and
wait for the reviewer to respond. If you comment, whether to supplement your
change or to iterate with the reviewer, please do not resolve the
conversation since that makes it hard to find your comment.
Expand Down
51 changes: 40 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,47 @@ doc` (user) or `ninja doxygen` (developer).
# Installation for applications

The easiest way to install Celeritas as a library/app is with Spack:
- Follow the first two steps above to install [Spack][spack-start] and set up its CUDA usage.
- Install Celeritas with `spack install celeritas`
- Use `spack load celeritas` to add the installation to your `PATH`.
- Follow these steps to install [Spack][spack-start].
```console
# Install Spack
git clone -c feature.manyFiles=true --depth=2 https://github.com/spack/spack.git
# Add Spack to the shell environment
# For bash/zsh/sh (See [spack-start] for other shell)
```
- Install Celeritas with
```console
spack install celeritas
```console
- Add the Celeritas installation to your `PATH` with:
```console
spack load celeritas
```

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:
To do so, set Spack up its CUDA usage:
```console
. spack/share/spack/setup-env.sh
# Set up CUDA
$ spack external find cuda
# Optionally set the default configuration. Replace "cuda_arch=80"
# with your target architecture
$ spack config add packages:all:variants:"cxxstd=17 +cuda cuda_arch=80"
```
and install Celeritas with this configuration:
```console
$ spack install celeritas
```
If Celeritas was installed with a different configuration do
```console
$ spack install --fresh celeritas
```
If you need to set a default 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.

Expand All @@ -62,7 +90,7 @@ $ spack external find cuda
# Install celeritas dependencies
$ spack env create celeritas scripts/spack.yaml
$ spack env activate celeritas
$ spack config add packages:all:variants:"cxxstd=17 +cuda cuda_arch=70"
$ spack config add packages:all:variants:"cxxstd=17 +cuda cuda_arch=80"
$ spack install
# Configure, build, and test
$ ./build.sh base
Expand Down Expand Up @@ -97,12 +125,11 @@ Geant4:

Since we compile with extra warning flags and avoid non-portable code, most
other compilers *should* work.
The full set of configurations is viewable on CI platforms ([Jenkins][jenkins] and [GitHub Actions][gha]).
The full set of configurations is viewable on CI platform [GitHub Actions][gha]).
Compatibility fixes that do not cause newer versions to fail are welcome.

[spack]: https://github.com/spack/spack
[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
Expand All @@ -111,8 +138,8 @@ See the [contribution guide][contributing-guidelines] for the contribution proce
[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
[contributing-guidelines]: https://celeritas-project.github.io/celeritas/user/development/contributing.html
[development-guidelines]: https://celeritas-project.github.io/celeritas/user/development/coding.html
pcanal marked this conversation as resolved.
Show resolved Hide resolved
[administration-guidelines]: https://celeritas-project.github.io/celeritas/user/appendix/administration.html

# Directory structure
Expand All @@ -130,6 +157,8 @@ details on coding in Celeritas, and [the administration guidelines][administrati

# Citing Celeritas

<!-- This section should be kept in sync with the CITATIONS.cff file -->

If using Celeritas in your work, we ask that you cite the following article:

> Johnson, Seth R., Amanda Lund, Philippe Canal, Stefano C. Tognini, Julien Esseiva, Soon Yung Jun, Guilherme Lima, et al. 2024. “Celeritas: Accelerating Geant4 with GPUs.” EPJ Web of Conferences 295:11005. https://doi.org/10.1051/epjconf/202429511005.
Expand Down
Loading