diff --git a/examples/basic_example.jl b/examples/basic_example.jl index d327dd0..b96aed7 100644 --- a/examples/basic_example.jl +++ b/examples/basic_example.jl @@ -34,8 +34,8 @@ chunksizes = isroot ? distribute_evenly(size(csr, 1), nprow * npcol) : nothing # SuperLUDIST.superlu_set_num_threads(Int64, 1) # If constructing from existing per-node data the following constructors will help: -# A = DistributedSuperMatrix(store::CSRStore, firstrow, globalsize::NTuple{2, Int}) # store = CSRStore(ptrs, indices, values, localsize::NTuple{2, Int}) +# A = DistributedSuperMatrix(store::CSRStore, firstrow, globalsize::NTuple{2, Int}) # @show iam csr A = Communication.scatterstore!( DistributedSuperMatrix{Float64, Int64}(grid), csr, chunksizes; root); diff --git a/src/lowlevel.jl b/src/lowlevel.jl index e5a9144..8677786 100644 --- a/src/lowlevel.jl +++ b/src/lowlevel.jl @@ -62,17 +62,17 @@ L = Symbol(String(:SuperLU_) * String(I)) !MPI.Finalized() && ScalePermstructFree(x) end end - function LUstructFree(r::Base.RefValue{$(prefixname(T, :LUstruct_t)){$I}}) + function LUstructFree(r::$(prefixname(T, :LUstruct_t)){$I}) $L.$(prefixname(T, :LUstructFree))(r) end - function Destroy_LU(r::Base.RefValue{$(prefixname(T, :LUstruct_t)){$I}}, n, grid) + function Destroy_LU(r::$(prefixname(T, :LUstruct_t)){$I}, n, grid) $L.$(prefixname(T, :Destroy_LU))(n, grid, r) # why do I have to grid.grid here?! end function LUstructInit(r::$(prefixname(T, :LUstruct_t)){$I}, n, grid) $L.$(prefixname(T, :LUstructInit))(n, r) return finalizer(r) do x - # !MPI.Finalized() && Destroy_LU(x, n, grid) - # !MPI.Finalized() && LUstructFree(x) + !MPI.Finalized() && Destroy_LU(x, n, grid) + !MPI.Finalized() && LUstructFree(x) end end end