-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
2,100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using Base.BinaryPlatforms | ||
using Preferences | ||
|
||
function known_abis() | ||
return (:MicrosoftMPI, :MPICH, :MPItrampoline) | ||
end | ||
|
||
const LAMMPS_UUID = parse(Base.UUID, "5b3ab26d-9607-527c-88ea-8fe5ba57cafe") | ||
|
||
const abi = load_preference(LAMMPS_UUID, "abi", Sys.iswindows() ? :MicrosoftMPI : :MPICH) | ||
|
||
function set_abi(abi) | ||
if abi ∉ known_abis() | ||
error(""" | ||
The MPI ABI $abi is not supported. | ||
Please set the MPI ABI to one of the following: | ||
$(known_abis()) | ||
""") | ||
end | ||
set_preferences!(LAMMPS_UUID, "abi" => string(abi), force=true) | ||
@warn "The MPI abi has changed, you will need to restart Julia for the change to take effect" abi | ||
return abi | ||
end | ||
|
||
function augment_platform!(platform) | ||
BinaryPlatforms.add_tag!(platform.tags, "mpi", string(abi)) | ||
return platform | ||
end | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
empty!(Base.LOAD_PATH) | ||
pushfirst!(Base.LOAD_PATH, "@stdlib") | ||
pushfirst!(Base.LOAD_PATH, dirname(@__DIR__)) | ||
|
||
using TOML, Artifacts, Base.BinaryPlatforms | ||
include("./platform_augmentation.jl") | ||
artifacts_toml = joinpath(dirname(@__DIR__), "Artifacts.toml") | ||
|
||
# Get "target triplet" from ARGS, if given (defaulting to the host triplet otherwise) | ||
target_triplet = get(ARGS, 1, Base.BinaryPlatforms.host_triplet()) | ||
|
||
# Augment this platform object with any special tags we require | ||
platform = augment_platform!(HostPlatform(parse(Platform, target_triplet))) | ||
|
||
# Select all downloadable artifacts that match that platform | ||
artifacts = select_downloadable_artifacts(artifacts_toml; platform) | ||
|
||
#Output the result to `stdout` as a TOML dictionary | ||
TOML.print(stdout, artifacts) | ||
|
Oops, something went wrong.