Skip to content

Commit 72f6a5f

Browse files
committed
Add test JLL
1 parent b68dc44 commit 72f6a5f

File tree

60 files changed

+2100
-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

+2100
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+
BinaryPlatforms.add_tag!(platform.tags, "mpi", string(abi))
27+
return platform
28+
end
29+
30+
31+
32+
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
empty!(Base.LOAD_PATH)
2+
pushfirst!(Base.LOAD_PATH, "@stdlib")
3+
pushfirst!(Base.LOAD_PATH, dirname(@__DIR__))
4+
5+
using TOML, Artifacts, Base.BinaryPlatforms
6+
include("./platform_augmentation.jl")
7+
artifacts_toml = joinpath(dirname(@__DIR__), "Artifacts.toml")
8+
9+
# Get "target triplet" from ARGS, if given (defaulting to the host triplet otherwise)
10+
target_triplet = get(ARGS, 1, Base.BinaryPlatforms.host_triplet())
11+
12+
# Augment this platform object with any special tags we require
13+
platform = augment_platform!(HostPlatform(parse(Platform, target_triplet)))
14+
15+
# Select all downloadable artifacts that match that platform
16+
artifacts = select_downloadable_artifacts(artifacts_toml; platform)
17+
18+
#Output the result to `stdout` as a TOML dictionary
19+
TOML.print(stdout, artifacts)
20+

0 commit comments

Comments
 (0)