Skip to content
Draft
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions lammps/00-clone.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

set -euo pipefail

source "$(dirname "$0")"/../util/git.sh

do_clone lammps https://github.com/lammps/lammps.git "$(get_version lammps)"
48 changes: 48 additions & 0 deletions lammps/01-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/bin/bash

set -euo pipefail

# native PKG_GPU path fails due to missing -fatbin in SCALE nvcc

# cmake \
# -S "lammps/cmake" \
# -B "build" \
# -D CMAKE_BUILD_TYPE=Release \
# -D BUILD_MPI=off \
# -D PKG_GPU=on \
# -D GPU_API=cuda \
# -D CUDA_BUILD_MULTIARCH=off \ # nvcc: error: unsupported CUDA gpu architecture: all
# -D GPU_ARCH="sm_${CUDAARCHS}" \
# -D CMAKE_CUDA_ARCHITECTURES="${CUDAARCHS}"

# soooooo trying to build with PKG_KOKKOS=on + Kokkos_ENABLE_CUDA instead:
# (which seems to work)

# this is cursed, but unfortunately what KOKKOS requires? :p
KOKKOS_ARCH="NATIVE"
case "${CUDAARCHS:-}" in
70) KOKKOS_ARCH="VOLTA70" ;;
72) KOKKOS_ARCH="VOLTA72" ;;
75) KOKKOS_ARCH="TURING75" ;;
80) KOKKOS_ARCH="AMPERE80" ;;
86) KOKKOS_ARCH="AMPERE86" ;;
87) KOKKOS_ARCH="AMPERE87" ;;
89) KOKKOS_ARCH="ADA89" ;;
90) KOKKOS_ARCH="HOPPER90" ;;
120) KOKKOS_ARCH="BLACKWELL120" ;;
esac

cmake \
-S "lammps/cmake" \
-B "build" \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_STANDARD=17 \
-D BUILD_MPI=off \
-D BUILD_OMP=off \
-D PKG_KOKKOS=on \
-D Kokkos_ENABLE_SERIAL=on \
-D Kokkos_ENABLE_CUDA=on \
-D Kokkos_ARCH_${KOKKOS_ARCH}=on \
-D CMAKE_CXX_COMPILER="$(realpath "lammps/lib/kokkos/bin/nvcc_wrapper")"

cmake --build "build" -j"$(nproc)"
5 changes: 5 additions & 0 deletions lammps/02-smoke.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

./build/lmp -h >/dev/null 2>&1
1 change: 1 addition & 0 deletions versions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ hashinator 34cf188
heraclespp a925d6a
hypre v2.33.0
jitify master
lammps stable_22Jul2025_update4
llama.cpp b9522
llm.c 7ecd8906afe6ed7a2b2cdb731c042f26d525b820
MAGMA v2.9.0
Expand Down