Skip to content

Commit 71881b6

Browse files
committed
Add test JLL
1 parent 7c4f715 commit 71881b6

File tree

60 files changed

+2163
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+2163
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
using Base.BinaryPlatforms
2+
using Preferences
3+
4+
function known_abis()
5+
return (:MicrosoftMPI, :MPICH, :MPItrampoline)
6+
end
7+
8+
const LAMMPS_UUID = parse(Base.UUID, "5b3ab26d-9607-527c-88ea-8fe5ba57cafe")
9+
10+
const abi = load_preference(LAMMPS_UUID, "abi", Sys.iswindows() ? :MicrosoftMPI : :MPICH)
11+
12+
function set_abi(abi)
13+
if abi known_abis()
14+
error("""
15+
The MPI ABI $abi is not supported.
16+
Please set the MPI ABI to one of the following:
17+
$(known_abis())
18+
""")
19+
end
20+
set_preferences!(LAMMPS_UUID, "abi" => string(abi), force=true)
21+
@warn "The MPI abi has changed, you will need to restart Julia for the change to take effect" abi
22+
return abi
23+
end
24+
25+
function augment_platform!(platform)
26+
if !haskey(platform, "mpi")
27+
platform["mpi"] = string(abi)
28+
end
29+
return platform
30+
end
31+
32+
33+
34+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Note: This file is executed from `Pkg` in an isolated environment.
2+
# We add the current package and stdlib to the load path so that
3+
# `platform_augmentation.jl` can use the dependencies of the project,
4+
# and `select_artifacts.jl` needs TOML, and Artifacts.
5+
# Warn: Since this is executed in a sandbox, the current preferences are not
6+
# propagated and thus no decision can be made based on them.
7+
# Use LazyArtifacts in this case.
8+
9+
push!(Base.LOAD_PATH, "@stdlib")
10+
push!(Base.LOAD_PATH, dirname(@__DIR__))
11+
12+
using TOML, Artifacts, Base.BinaryPlatforms
13+
include("./platform_augmentation.jl")
14+
artifacts_toml = joinpath(dirname(@__DIR__), "Artifacts.toml")
15+
16+
# Get "target triplet" from ARGS, if given (defaulting to the host triplet otherwise)
17+
target_triplet = get(ARGS, 1, Base.BinaryPlatforms.host_triplet())
18+
19+
# Augment this platform object with any special tags we require
20+
platform = augment_platform!(HostPlatform(parse(Platform, target_triplet)))
21+
22+
# Select all downloadable artifacts that match that platform
23+
artifacts = select_downloadable_artifacts(artifacts_toml; platform, include_lazy = true)
24+
25+
#Output the result to `stdout` as a TOML dictionary
26+
TOML.print(stdout, artifacts)
27+

0 commit comments

Comments
 (0)