Skip to content

Commit 6946312

Browse files
authored
Merge pull request #68 from wcwitt/main
Sync with main
2 parents be05309 + 274f002 commit 6946312

File tree

4 files changed

+28
-5
lines changed

4 files changed

+28
-5
lines changed

libsymmetrix/external/kokkos

Submodule kokkos updated 1443 files
Submodule kokkos-kernels updated 1480 files

symmetrix/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,29 @@ cd symmetrix/symmetrix
88
pip install .
99
```
1010

11+
If CUDA is not detected, the defaults will build a CPU-only version, and the `use_kokkos`
12+
flag to the ASE calculator will switch between non-Kokkos-serial and Kokkkos-OpenMP
13+
CPU implementations.
14+
15+
If CUDA is available at build time, the defaults should produce a Kokkos-CUDA GPU version
16+
of the package. The `use_kokkos` flag to the ASE calculator
17+
will then switch between non-Kokkos CPU and Kokkos-CUDA GPU implementations.
18+
19+
For other build types, `CMake` settings need to be specified explicitly, and
20+
they can be passed as arguments to the `pip install` command, e.g.
21+
```
22+
pip install --verbose . \
23+
--config-settings=cmake.define.CMAKE_BUILD_TYPE=Release \
24+
--config-settings=cmake.define.CMAKE_CXX_FLAGS="-march=native -ffast-math" \
25+
--config-settings=cmake.define.CMAKE_INTERPROCEDURAL_OPTIMIZATION=OFF \
26+
--config-settings=cmake.define.Kokkos_ENABLE_SERIAL=ON \
27+
--config-settings=cmake.define.Kokkos_ENABLE_CUDA=ON \
28+
--config-settings=cmake.define.Kokkos_ARCH_NATIVE=ON \
29+
--config-settings=cmake.define.Kokkos_ENABLE_AGGRESSIVE_VECTORIZATION=ON \
30+
--config-settings=cmake.define.SYMMETRIX_KOKKOS=ON \
31+
--config-settings=cmake.define.SYMMETRIX_SPHERICART_CUDA=ON
32+
```
33+
1134
### Generating Symmetrix `.json` model files
1235

1336
Once the Python package is installed, use

symmetrix/test/test_lammpslib.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def test_lammpslib_map(model_cache):
2929

3030
for map_type in [None, "yes", "array", "hash"]:
3131
lammpslib_kwargs = dict(lmpcmds = [ "pair_style symmetrix/mace",
32-
f"pair_coeff * * {model_cache["mace-mp-0b3-medium-1-8.json"]} " + " ".join(species)],
32+
f"pair_coeff * * {model_cache['mace-mp-0b3-medium-1-8.json']} " + " ".join(species)],
3333
atom_types = {sp: sp_i+1 for sp_i, sp in enumerate(species)},
3434
lammps_header = ['units metal', 'atom_style atomic', 'atom_modify sort 0 0'])
3535
if map_type is None:
@@ -53,14 +53,14 @@ def test_lammpslib_default_header(model_cache):
5353

5454
# use default lammps_header, should do "atom_modify map array sort 0 0"
5555
lammpslib_kwargs = dict(lmpcmds = [ "pair_style symmetrix/mace",
56-
f"pair_coeff * * {model_cache["mace-mp-0b3-medium-1-8.json"]} " + " ".join(species)],
56+
f"pair_coeff * * {model_cache['mace-mp-0b3-medium-1-8.json']} " + " ".join(species)],
5757
atom_types = {sp: sp_i+1 for sp_i, sp in enumerate(species)})
5858

5959
compare_lammpslib_symmetrix(calc_symmetrix, lammpslib_kwargs)
6060

6161
# confirm that without "atom_modify sort 0 0" it fails
6262
lammpslib_kwargs = dict(lmpcmds = [ "pair_style symmetrix/mace",
63-
f"pair_coeff * * {model_cache["mace-mp-0b3-medium-1-8.json"]} " + " ".join(species)],
63+
f"pair_coeff * * {model_cache['mace-mp-0b3-medium-1-8.json']} " + " ".join(species)],
6464
atom_types = {sp: sp_i+1 for sp_i, sp in enumerate(species)},
6565
lammps_header = ['units metal', 'atom_style atomic', 'atom_modify map yes'])
6666

0 commit comments

Comments
 (0)