Skip to content
This repository has been archived by the owner on Apr 7, 2022. It is now read-only.

Commit

Permalink
Vast amount of changes in order to adapt the project to Julia v1.4.
Browse files Browse the repository at this point in the history
Some features of the old project could not be recovered (so far)
in the adapted project, in particular those which involve user-level C
call-back functions called within the kernel of PETSc and to be
implemented in Julia (e.g., MatShell or TS solvers).
  • Loading branch information
amartinhuertas committed Jun 15, 2020
1 parent 3d8c46a commit 347b9c7
Show file tree
Hide file tree
Showing 29 changed files with 2,224 additions and 2,054 deletions.
137 changes: 137 additions & 0 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# This file is machine-generated - editing it directly is not advised

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "48c20c43e157c6eab6cf88326504ec042b05e456"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.10.0"

[[CompilerSupportLibraries_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "7c4f882c41faa72118841185afc58a2eb00ef612"
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.3.3+0"

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

[[DelimitedFiles]]
deps = ["Mmap"]
uuid = "8bb1440f-4735-579b-a4ab-409b98df4dab"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[DocStringExtensions]]
deps = ["LibGit2", "Markdown", "Pkg", "Test"]
git-tree-sha1 = "88bb0edb352b16608036faadcc071adda068582a"
uuid = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
version = "0.8.1"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[LinearAlgebra]]
deps = ["Libdl"]
uuid = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[MPI]]
deps = ["Distributed", "DocStringExtensions", "Libdl", "MPICH_jll", "MicrosoftMPI_jll", "OpenMPI_jll", "Pkg", "Random", "Requires", "Serialization", "Sockets"]
git-tree-sha1 = "0fc37a7feb384b51bd6e841ea6cfc424623aab74"
uuid = "da04e1cc-30fd-572f-bb4f-1f8673147195"
version = "0.14.3"

[[MPICH_jll]]
deps = ["CompilerSupportLibraries_jll", "Libdl", "Pkg"]
git-tree-sha1 = "4d37f1e07b4e2a74462eebf9ee48c626d15ffdac"
uuid = "7cb0a576-ebde-5e09-9194-50597f1243b4"
version = "3.3.2+10"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MicrosoftMPI_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "720de13004e416f2864c92593d3839e062703985"
uuid = "9237b28f-5490-5468-be7b-bb81f5f5e6cf"
version = "10.1.2+3"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[OpenMPI_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "41b983e26a7ab8c9bf05f7d70c274b817d541b46"
uuid = "fe0851c0-eecd-5654-98d4-656369965a5c"
version = "4.0.2+2"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "d37400976e98018ee840e0ca4f9d20baa231dc6b"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.0.1"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[SharedArrays]]
deps = ["Distributed", "Mmap", "Random", "Serialization"]
uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SparseArrays]]
deps = ["LinearAlgebra", "Random"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
13 changes: 13 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name = "PETSc"
uuid = "743b6f9b-fae8-55fc-a981-4e9a2885e829"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
julia = "1.0"
2 changes: 2 additions & 0 deletions deps/build.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
using DelimitedFiles

# deps.jl is created at the end of a successful build, so rm
# to ensure that failed builds are missing this file.
if isfile("deps.jl")
Expand Down
4 changes: 2 additions & 2 deletions deps/build_petscs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const build_names = ["RealDouble", "RealSingle", "ComplexDouble"]
build_control = Dict() # dirname => whether or not to build it
arches = Dict() # dict of dirname => (PETSC_DIR, PETSC_ARCH)
build_any = false # whether or not to build anything
have_petsc = Array{Bool}(3) # whether or not each version of Petsc is usable
have_petsc = fill(false,3) # whether or not each version of Petsc is usable
for (i, name) in enumerate(build_names)
if haskey(ENV, string("JULIA_PETSC_", name, "_DIR")) || haskey(ENV, string("JULIA_PETSC_", name, "_ARCH"))
if !(haskey(ENV, string("JULIA_PETSC_", name, "_DIR")) && haskey(ENV, string("JULIA_PETSC_", name, "_DIR")))
Expand Down Expand Up @@ -124,7 +124,7 @@ end

for scalar_type in ("real", "complex"), precision in ("double", "single")
# extract the tarfile into a new directory:
name_i = ucfirst(scalar_type) * ucfirst(precision)
name_i = uppercasefirst(scalar_type) * uppercasefirst(precision)
name_i == "ComplexSingle" && continue # PETSc doesn't support this (weird!)
!build_control[name_i] && continue # skip if the user said not to build this one
println("****************************************************************")
Expand Down
4 changes: 4 additions & 0 deletions src/PETSc.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ using .C
include("petsc_com.jl")
include("options.jl")
include("is.jl")

using LinearAlgebra
include("vec.jl")
using SparseArrays
include("mat.jl")

include("vec_scatter.jl")
include("pc.jl")
include("ksp.jl")
Expand Down
Loading

0 comments on commit 347b9c7

Please sign in to comment.