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 to Julia 1.10 and ensure BLAS lp64 compatibility #70

Merged
merged 2 commits into from
Nov 22, 2024
Merged
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
4 changes: 1 addition & 3 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@ jobs:
fail-fast: false
matrix:
version:
- "1.8"
- "1.9"
- "1.10"
- "~1.11.0-0"
- "1.11"
- "nightly"
os:
- ubuntu-latest
Expand Down
8 changes: 5 additions & 3 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ version = "0.7.2"
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
LAMMPS_jll = "5b3ab26d-9607-527c-88ea-8fe5ba57cafe"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
OpenBLAS32_jll = "656ef2d0-ae68-5445-9ca0-591084a874a2"
Preferences = "21216c6a-2e73-6563-6e65-726566657250"

[compat]
CEnum = "0.4, 0.5"
LAMMPS_jll = "2.6.0"
Preferences = "1"
MPI = "0.20"
julia = "1.8"
Preferences = "1"
julia = "1.10"
9 changes: 9 additions & 0 deletions src/LAMMPS.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
module LAMMPS
import MPI
import LinearAlgebra
import OpenBLAS32_jll

include("api.jl")

export LMP, command, create_atoms, get_natoms, extract_atom, extract_compute, extract_global,
Expand Down Expand Up @@ -84,6 +87,12 @@ const TAGINT = API.lammps_extract_setting(C_NULL, "tagint") == 4 ? Int32 : Int64
const IMAGEINT = API.lammps_extract_setting(C_NULL, "imageint") == 4 ? Int32 : Int64

function __init__()
# LAMMPS requires using LP64, default to OpenBLAS32 if not already available
config = LinearAlgebra.BLAS.lbt_get_config()
if !any(lib -> lib.interface == :lp64, config.loaded_libs)
LinearAlgebra.BLAS.lbt_forward(OpenBLAS32_jll.libopenblas_path)
end

BIGINT != (API.lammps_extract_setting(C_NULL, "bigint") == 4 ? Int32 : Int64) &&
error("The size of the LAMMPS integer type BIGINT has changed! To fix this, you need to manually invalidate the LAMMPS.jl cache.")
TAGINT != (API.lammps_extract_setting(C_NULL, "tagint") == 4 ? Int32 : Int64) &&
Expand Down
Loading