Skip to content

Commit

Permalink
Merge pull request #26002 from fredrikekre/fe/stdlib-deps
Browse files Browse the repository at this point in the history
break some stdlib dependencies
  • Loading branch information
KristofferC committed Feb 12, 2018
2 parents 11c08ad + dec6282 commit 2fcb086
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
1 change: 0 additions & 1 deletion stdlib/SharedArrays/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
[deps]
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Mmap = "a63ad114-7e13-5084-954f-fe012c677804"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
3 changes: 1 addition & 2 deletions stdlib/SharedArrays/src/SharedArrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ using Serialization: serialize_cycle_header, serialize_type, writetag, UNDEFREF_
import Serialization: serialize, deserialize
import Distributed: RRID, procs
import Base.Filesystem: JL_O_CREAT, JL_O_RDWR, S_IRUSR, S_IWUSR
using Printf: @sprintf

export SharedArray, SharedVector, SharedMatrix, sdata, indexpids, localindices

Expand Down Expand Up @@ -115,7 +114,7 @@ function SharedArray{T,N}(dims::Dims{N}; init=false, pids=Int[]) where {T,N}
local shmmem_create_pid
try
# On OSX, the shm_seg_name length must be <= 31 characters (including the terminating NULL character)
shm_seg_name = @sprintf("/jl%06u%s", getpid() % 10^6, randstring(20))
shm_seg_name = "/jl$(lpad(string(getpid() % 10^6), 6, "0"))$(randstring(20))"
if onlocalhost
shmmem_create_pid = myid()
s = shm_mmap_array(T, dims, shm_seg_name, JL_O_CREAT | JL_O_RDWR)
Expand Down
1 change: 0 additions & 1 deletion stdlib/SuiteSparse/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ uuid = "4607b0f0-06f3-5cda-b6b1-a6196a1729e9"
[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
14 changes: 7 additions & 7 deletions stdlib/SuiteSparse/src/cholmod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import LinearAlgebra: (\),
issuccess, issymmetric, ldltfact, ldltfact!, logdet

using SparseArrays
using Printf: @printf

import Libdl

export
Expand Down Expand Up @@ -1198,11 +1196,13 @@ end

function showfactor(io::IO, F::Factor)
s = unsafe_load(pointer(F))
@printf(io, "type: %12s\n", s.is_ll!=0 ? "LLt" : "LDLt")
@printf(io, "method: %10s\n", s.is_super!=0 ? "supernodal" : "simplicial")
@printf(io, "maxnnz: %10d\n", Int(s.nzmax))
@printf(io, "nnz: %13d\n", nnz(F))
@printf(io, "success: %9s\n", "$(s.minor == size(F, 1))")
print(io, """
type: $(s.is_ll!=0 ? "LLt" : "LDLt")
method: $(s.is_super!=0 ? "supernodal" : "simplicial")
maxnnz: $(Int(s.nzmax))
nnz: $(nnz(F))
success: $(s.minor == size(F, 1))
""")
end

# getindex not defined for these, so don't use the normal array printer
Expand Down
2 changes: 1 addition & 1 deletion stdlib/SuiteSparse/test/cholmod.jl
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ GC.gc()
@testset "Issue 11747 - Wrong show method defined for FactorComponent" begin
v = cholfact(sparse(Float64[ 10 1 1 1; 1 10 0 0; 1 0 10 0; 1 0 0 10])).L
for s in (sprint(show, MIME("text/plain"), v), sprint(show, v))
@test contains(s, "method: simplicial")
@test contains(s, "method: simplicial")
@test !contains(s, "#undef")
end
end
Expand Down

0 comments on commit 2fcb086

Please sign in to comment.