Skip to content

Commit

Permalink
RuntimeDependency doesn't work with top-level (#6417)
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Mar 20, 2023
1 parent a988819 commit c4069bf
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion M/MPICH/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ products = [

dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"), v"0.5.2"),
RuntimeDependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267");
Dependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267");
compat="0.1", top_level=true),
]

Expand Down
4 changes: 2 additions & 2 deletions M/MPItrampoline/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ products = [

# MPICH
ExecutableProduct("mpiexec", :mpich_mpiexec, "lib/mpich/bin"),

# MPIwrapper
ExecutableProduct("mpiwrapperexec", :mpiwrapperexec),
# `libmpiwrapper` is a plugin, not a library, and thus has the
Expand All @@ -270,7 +270,7 @@ products = [
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="CompilerSupportLibraries_jll", uuid="e66e0078-7015-5450-92f7-15fbd957f2ae"), v"0.5.2"),
RuntimeDependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267");
Dependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267");
compat="0.1", top_level=true),
]

Expand Down
1 change: 0 additions & 1 deletion P/P4est/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ products = [
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a")),
RuntimeDependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"); compat="0.1", top_level=true),
]
append!(dependencies, platform_dependencies)

Expand Down
1 change: 0 additions & 1 deletion T/t8code/build_tarballs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ products = [
# Dependencies that must be installed before this package can be built
dependencies = [
Dependency(PackageSpec(name="Zlib_jll", uuid="83775a58-1f1d-513f-b197-d71354ab007a")),
RuntimeDependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"); compat="0.1", top_level=true),
]
append!(dependencies, platform_dependencies)

Expand Down
16 changes: 8 additions & 8 deletions platforms/mpi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -53,23 +53,23 @@ mpi_abis = (
"""
augment_platforms(platforms; MPICH_compat = nothing, OpenMPI_compat = nothing, MicrosoftMPI_compat=nothing, MPItrampoline_compat=nothing)
This augments the platforms with different MPI versions. Compatibilities with different versions can be specified
This augments the platforms with different MPI versions. Compatibilities with different versions can be specified
"""
function augment_platforms(platforms;
MPICH_compat = nothing,
OpenMPI_compat = nothing,
MicrosoftMPI_compat=nothing,
function augment_platforms(platforms;
MPICH_compat = nothing,
OpenMPI_compat = nothing,
MicrosoftMPI_compat=nothing,
MPItrampoline_compat=nothing)
all_platforms = AbstractPlatform[]
dependencies = []
for (abi, pkg, compat, f) in mpi_abis

# set specific versions of MPI packages
if (abi=="OpenMPI" && !isnothing(OpenMPI_compat)) compat = OpenMPI_compat; end
if (abi=="MPICH" && !isnothing(MPICH_compat)) compat = MPICH_compat; end
if (abi=="MicrosoftMPI" && !isnothing(MicrosoftMPI_compat)) compat = MicrosoftMPI_compat; end
if (abi=="MPItrampoline" && !isnothing(MPItrampoline_compat)) compat = MPItrampoline_compat; end

pkg_platforms = deepcopy(filter(f, platforms))
foreach(pkg_platforms) do p
p[tag_name] = abi
Expand All @@ -79,7 +79,7 @@ function augment_platforms(platforms;
end
# NOTE: packages using this platform tag, must depend on MPIPreferences otherwise
# they will not be invalidated when the Preference changes.
push!(dependencies, Dependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"); compat="0.1"))
push!(dependencies, Dependency(PackageSpec(name="MPIPreferences", uuid="3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"); compat="0.1", top_level=true))
return all_platforms, dependencies
end

Expand Down

0 comments on commit c4069bf

Please sign in to comment.