Skip to content

Commit

Permalink
Fixes in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed Mar 21, 2024
1 parent 40a7fd2 commit ae298c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 4 additions & 2 deletions src/Algebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,11 @@ function i_am_in(comm::MPIVoidVector)
end

function change_parts(x::Union{MPIArray,DebugArray,Nothing,MPIVoidVector}, new_parts; default=nothing)
x_new = map(new_parts) do _p
if isa(x,MPIArray) || isa(x,DebugArray)
x_new = map(new_parts) do p
if isa(x,MPIArray)
PartitionedArrays.getany(x)
elseif isa(x,DebugArray) && (p <= length(x.items))
x.items[p]
else
default
end
Expand Down
7 changes: 0 additions & 7 deletions test/PLaplacianTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ using PartitionedArrays
using Test
using SparseArrays

# Overload required for the tests below
function Base.copy(a::PSparseMatrix)
a_matrix_partition = similar(a.matrix_partition)
copy!(a_matrix_partition, a.matrix_partition)
PSparseMatrix(a_matrix_partition,a.row_partition,a.col_partition)
end

function main(distribute,parts)
main(distribute,parts,FullyAssembledRows(),SparseMatrixCSR{0,Float64,Int})
main(distribute,parts,SubAssembledRows(),SparseMatrixCSC{Float64,Int})
Expand Down
2 changes: 1 addition & 1 deletion test/StokesOpenBoundaryTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module StokesOpenBoundaryTests
using Gridap
using LinearAlgebra
using Test
using Gridap.ODEs
using Gridap.ODEs, Gridap.Algebra
using GridapDistributed
using PartitionedArrays

Expand Down

0 comments on commit ae298c8

Please sign in to comment.