Skip to content

Commit

Permalink
Clang: use prologue file instead.
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Oct 4, 2022
1 parent f6da3ba commit 8fdeb09
Show file tree
Hide file tree
Showing 8 changed files with 3,784 additions and 3,772 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1"

[compat]
CEnum = "0.4"
MPI = "^0"
MPI = "0.19, 0.20"
PartitionedArrays = "0.2"
SparseMatricesCSR = "0.6"
julia = "1.6"
Expand Down
36 changes: 29 additions & 7 deletions gen/Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.7.2"
julia_version = "1.8.1"
manifest_format = "2.0"
project_hash = "cc39013dba1e9068883c1b156d3b25864ebc62f8"
project_hash = "73dec3da9a2b83da44795977b7b08c9614c03dd7"

[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"

[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
Expand All @@ -26,21 +27,26 @@ version = "0.16.3"

[[deps.Clang_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg", "Zlib_jll", "libLLVM_jll"]
git-tree-sha1 = "8cf7e67e264dedc5d321ec87e78525e958aea057"
git-tree-sha1 = "0dfffba1b32bb3e30cb0372bfe666a5ddffe37fb"
uuid = "0ee61d77-7f21-5576-8119-9fcc46b10100"
version = "12.0.1+3"
version = "13.0.1+3"

[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.5.2+0"

[[deps.Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[deps.Downloads]]
deps = ["ArgTools", "LibCURL", "NetworkOptions"]
deps = ["ArgTools", "FileWatching", "LibCURL", "NetworkOptions"]
uuid = "f43a241f-c20a-4ad4-852c-f6b1247861c6"
version = "1.6.0"

[[deps.FileWatching]]
uuid = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"

[[deps.HYPRE_jll]]
deps = ["Artifacts", "JLLWrappers", "LAPACK_jll", "LazyArtifacts", "Libdl", "MPICH_jll", "MPIPreferences", "MPItrampoline_jll", "MicrosoftMPI_jll", "OpenBLAS_jll", "OpenMPI_jll", "Pkg", "TOML"]
Expand All @@ -60,9 +66,9 @@ version = "1.4.1"

[[deps.LAPACK_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "Libdl", "Pkg", "libblastrampoline_jll"]
git-tree-sha1 = "b1cccaf9742bb82f2b3de81c510688e491d6e922"
git-tree-sha1 = "a539affa8228208f5a3396037165b04bff9a2ba6"
uuid = "51474c39-65e3-53ba-86ba-03b1b862ec14"
version = "3.9.0+0"
version = "3.10.0+1"

[[deps.LazyArtifacts]]
deps = ["Artifacts", "Pkg"]
Expand All @@ -71,10 +77,12 @@ uuid = "4af54fe1-eca0-43a8-85a7-787d91b784e3"
[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.3"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "7.84.0+0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
Expand All @@ -83,6 +91,7 @@ uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"
[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.10.2+0"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down Expand Up @@ -115,6 +124,7 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.0+0"

[[deps.MicrosoftMPI_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand All @@ -124,13 +134,16 @@ version = "10.1.3+2"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.2.1"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
version = "1.2.0"

[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.20+0"

[[deps.OpenMPI_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "JLLWrappers", "LazyArtifacts", "Libdl", "MPIPreferences", "Pkg", "TOML"]
Expand All @@ -141,6 +154,7 @@ version = "4.1.3+3"
[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.8.0"

[[deps.Preferences]]
deps = ["TOML"]
Expand All @@ -162,6 +176,7 @@ uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"
version = "0.7.0"

[[deps.Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
Expand All @@ -172,10 +187,12 @@ uuid = "6462fe0b-24de-5631-8697-dd941f90decc"
[[deps.TOML]]
deps = ["Dates"]
uuid = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
version = "1.0.0"

[[deps.Tar]]
deps = ["ArgTools", "SHA"]
uuid = "a4e569a6-e804-4fa4-b0f3-eef7a1d5b13e"
version = "1.10.0"

[[deps.UUIDs]]
deps = ["Random", "SHA"]
Expand All @@ -187,19 +204,24 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.12+3"

[[deps.libLLVM_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8f36deef-c2a5-5394-99ed-8e07531fb29a"
version = "13.0.1+3"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl", "OpenBLAS_jll"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.1.1+0"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.48.0+0"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
12 changes: 2 additions & 10 deletions gen/generator.jl
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
using Clang.Generators
using HYPRE_jll, MPIPreferences
using HYPRE_jll, MPICH_jll

cd(@__DIR__)

if MPIPreferences.binary == "MPICH_jll"
import MPICH_jll: artifact_dir
elseif MPIPreferences.binary == "OpenMPI_jll"
import OpenMPI_jll: artifact_dir
else
error("Unknown MPI binary: $(MPIPreferences.binary)")
end

hypre_include_dir = normpath(HYPRE_jll.artifact_dir, "include")
mpi_include_dir = normpath(artifact_dir, "include")
mpi_include_dir = normpath(MPICH_jll.artifact_dir, "include")

options = load_options(joinpath(@__DIR__, "generator.toml"))

Expand Down
4 changes: 2 additions & 2 deletions gen/generator.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[general]
library_name = "libHYPRE"
output_common_file_path = "../lib/LibHYPRECommon.jl"
output_api_file_path = "../lib/LibHYPREAPI.jl"
output_file_path = "../lib/LibHYPRE.jl"
jll_pkg_name = "HYPRE_jll"
export_symbol_prefixes = []
prologue_file_path = "./prologue.jl"
output_ignorelist = [
# Undefined values DBL_MAX, DBL_MIN, DBL_EPSILON, DBL_MIN_EXP
"HYPRE_REAL_MAX",
Expand Down
2 changes: 2 additions & 0 deletions gen/prologue.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
using MPI: MPI_Comm
using MPI.API: MPI_INT, MPI_DOUBLE
Loading

0 comments on commit 8fdeb09

Please sign in to comment.