-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dholladay00/robust_JWL
- Loading branch information
Showing
66 changed files
with
3,624 additions
and
2,432 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,135 +9,6 @@ A collection of closure models and tools useful for multiphysics codes. | |
|
||
More complete documentation is available [here](https://lanl.github.io/singularity-eos/). | ||
|
||
## Components | ||
|
||
- `eos` contains the analytic and tabular equation of state infrastructure | ||
- `eospac-wrapper` is a wrapper for eospac | ||
- `closure` contains mixed cell closure models. Currently pressure-temperature equilibrium is supported. Requires `eos`. | ||
- `sesame2spiner` converts sesame tables to spiner tables | ||
- `stellarcollaspe2spiner` converts tables found on stellarcollapse.org to spiner tables | ||
|
||
## To Build | ||
|
||
At its most basic: | ||
```bash | ||
git clone --recursive [email protected]:lanl/singularity-eos.git | ||
cd singularity-eos | ||
mkdir bin | ||
cd bin | ||
cmake .. | ||
make | ||
``` | ||
|
||
### To Make tests | ||
|
||
Then, in the singularity-eos root directory: | ||
```bash | ||
mkdir -p bin | ||
cd bin | ||
cmake -DSINGULARITY_BUILD_TESTS=ON .. | ||
make -j | ||
make test | ||
``` | ||
|
||
### Build Options | ||
|
||
A number of options are avaialable for compiling: | ||
|
||
| Option | Default | Comment | | ||
| --------------------------------- | ------- | ------------------------------------------------------------------------------------ | | ||
| SINGULARITY_USE_HDF5 | ON | Enables HDF5. Required for SpinerEOS, StellarCollapseEOS, and sesame2spiner | | ||
| SINGULARITY_USE_FORTRAN | ON | Enable Fortran API for equation of state | | ||
| SINGULARITY_USE_KOKKOS | OFF | Uses Kokkos as the portability backend. Currently only Kokkos is supported for GPUs. | | ||
| SINGULARITY_USE_EOSPAC | OFF | Link against EOSPAC. Needed for sesame2spiner and some tests. | | ||
| SINGULARITY_USE_CUDA | OFF | Target nvidia GPUs via cuda. Currently requires Kokkos. | | ||
| SINGULARITY_USE_KOKKOSKERNELS | OFF | Use Kokkos Kernels for linear algebra. Needed for mixed cell closure models on GPU | | ||
| SINGULARITY_BUILD_CLOSURE | ON | Builds mixed cell closure machinery for multi-material problems | | ||
| SINGULARITY_BUILD_TESTS | OFF | Build test infrastructure. | | ||
| SINGULARITY_BUILD_PYTHON | OFF | Build Python bindings | | ||
| SINGULARITY_TEST_SESAME | OFF | Test the Sesame table readers | | ||
| SINGULARITY_TEST_STELLAR_COLLAPSE | OFF | Test the Stellar Collapse table readers | | ||
| SINGULARITY_TEST_PYTHON | OFF | Test the Python bindings | | ||
| SINGULARITY_BUILD_SESAME2SPINER | OFF | Builds the conversion tool sesame2spiner which makes files readable by SpinerEOS | | ||
| SINGULARITY_BUILD_STELLARCOLLAPSE2SPINER | OFF | Builds the conversion tool stellarcollapse2spiner which optionally makes stellar collapse files faster to read | | ||
| SINGULARITY_INVERT_AT_SETUP | OFF | For tests, pre-invert eospac tables. | | ||
| SINGULARITY_BETTER_DEBUG_FLAGS | ON | Enables nicer GPU debug flags. May interfere with in-tree builds as a submodule | | ||
| SINGULARITY_HIDE_MORE_WARNINGS | OFF | Makes warnings less verbose. May interfere with in-tree builds as a submodule | | ||
| SINGULARITY_SUBMODULE_MODE | OFF | Sets cmake flags for in-tree builds | | ||
|
||
#### Dependency overriding | ||
|
||
`singularity-eos` will do it's utmost to import all it's dependencies with as little user prompts as possible. | ||
However, there may be situations where `singularity-eos` cannot find either an install or a source tree of a dependency. | ||
Furthermore, users may wish to use a modified dependency that `singularity-eos` lacks the foreknowledge to know how to find or otherwise does not utilize. | ||
Therefore the `singularity-eos` build system provides an "override" option for dependencies. | ||
|
||
| Option | Default | Comment | | ||
| --------------------------------- | ------- | ------------------------------------------------------------------------------------ | | ||
| SINGULARITY_PKG_INSTALL_DIR | empty | Specifies a path where a CMake install of `PKG` is located | | ||
| SINGULARITY_PKG_IMPORT_DIR | empty | Specifies a path where a CMake source tree of `PKG` is located | | ||
|
||
Notes on using these options: | ||
|
||
- These options are intended for `singularity-eos` developers. Users are encouraged to let `singularity-eos` use it's own build system to find and configure dependencies | ||
- `PKG` should be in all uppercase, for example `-DSINGULARITY_KOKKOSKERNELS_IMPORT_DIR=...` | ||
- Dashes in package names should be given as underscores, e.g. for `ports-of-call`, use `-DSINGULARITY_PORTS_OF_CALL_INSTALL_DIR=...` | ||
- `_INSTALL_DIR` points to a directory where the package has been installed by CMake. It expects to find a CMake configuration file in a standard location. If this option is specified and the configuration file cannot be found at that location, the build will produce and error and halt | ||
- `_IMPORT_DIR` points to a directory that is the top-level of a source-tree of `PKG`. The directory will be imported into the build "as-though" it was an "in-tree" directory | ||
- using `_IMPORT_DIR` will only check for the existence of a top-level `CMakeLists.txt` file. It does no other evaluation on the directory (e.g. there is no check that this path points to the "correct" package source) | ||
- `_INSTALL_DIR` and `_IMPORT_DIR` cannot be used for the same package | ||
|
||
### Building on Darwin power9 nodes with the IBM xl compiler | ||
|
||
```bash | ||
git clone --recursive https://gitlab.lanl.gov/singularity/singularity-eos.git | ||
cd singularity-eos | ||
mkdir bin && cd bin | ||
source /usr/projects/eap/dotfiles/.bashrc xl reset | ||
module switch ibm/xlc-16.1.1.5-xlf-16.1.1.5 ibm/xlc-16.1.1.7-xlf-16.1.1.7-gcc-7.4.0 | ||
export FC="xlf_r -F/usr/projects/opt/ppc64le/ibm/xlf-16.1.1.7/xlf/16.1.1/etc/xlf.cfg.rhel.7.8.gcc.7.4.0.cuda.10.1" | ||
module load cmake/3.17.3 | ||
cd /build/directory | ||
cmake -DCMAKE_BUILD_TYPE=Release -DSINGULARITY_USE_KOKKOS=ON -DSINGULARITY_USE_HDF5=ON -DSINGULARITY_USE_EOSPAC=ON -DSINGULARITY_EOSPAC_INSTALL_DIR=/usr/projects/eap/spack/spack-develop_20191010/opt/spack/linux-rhel7-power9le/xl_r-16.1.1.7-plain/eospac-6.4.0beta.2-mp6hd267l4iokwr6ght2kp5ukk5zc6vq -DSINGULARITY_BUILD_TESTS=ON .. | ||
make -j | ||
make test | ||
``` | ||
|
||
## Formatting | ||
|
||
This project is formatted with `clang-format` using `clang-format` | ||
version 12. If contributing, please run clang-format on the files | ||
you modify. | ||
|
||
To run formatting automatically, call `make format_singularity-eos` | ||
at the build step. Cmake automatically makes a target. | ||
|
||
You can also call the bash script `format.sh` in the `utils/scripts` | ||
directory as | ||
```bash | ||
utils/scripts/format.sh | ||
``` | ||
The script optionally sets the `clang-format` binary from an | ||
environment variable, e.g., | ||
```bash | ||
CFM=clang-format=12 utils/scripts/format.sh | ||
``` | ||
|
||
## Units | ||
|
||
singularity-eos, prior to unit modifiers, always uses CGS units internally. For | ||
concreteness, the internal units of each quantity are: | ||
|
||
| Quantity | Alternate names | Units | | ||
| ------------------------- | -------------------- | ------------- | | ||
| Mass density | rho | g cm^-3 | | ||
| Temperature | temperature | K | | ||
| Specific Internal Energy | sie, Internal Energy | erg g^-1 | | ||
| Pressure | | erg cm^-3 | | ||
| Specific Heat | | erg g^-1 K^-1 | | ||
| Bulk Modulus | | erg cm^-3 | | ||
| Gruneisen Parameter | | | | ||
|
||
## Copyright | ||
|
||
© 2021-2023. Triad National Security, LLC. All rights reserved. This | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.