Skip to content

Commit

Permalink
more comments (deactivate failing tests for now)
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus committed Oct 26, 2024
1 parent f8f9475 commit fe0debc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ if Sys.iswindows()
end

# Do the MPI tests first so we do not have mpi running inside MPI
# XXX: Currently not working on windows, not sure why
# XXX: Currently not working on windows (since we have no PETSc + MPI)
if do_mpi
cmd = `$(mpiexec()) -n 4 $(Base.julia_cmd()) --project dmda.jl`
run(cmd)
Expand All @@ -22,7 +22,7 @@ end
# Examples with the comment
# # INCLUDE IN MPI TEST
# will be run here
# XXX: Currently not working on windows reliably, not sure why
# XXX: Currently not working on windows (since we have no PETSc + MPI)
if do_mpi
include("mpi_examples.jl")
end
Expand Down
11 changes: 7 additions & 4 deletions test/test_dmstag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -369,16 +369,18 @@ end
corners = PETSc.getcorners(dm_2D)
ghost_corners = PETSc.getghostcorners(dm_2D)

# FIXME:
# the commented lines below result in a segfaulyt on linux
# ----
# FIXME:
# the commented lines below result in a segfault on linux
# To be checked whether this is still the case for the auto-wrapped library
for ix=corners.lower[1]:corners.upper[1]
for iy=corners.lower[2]:corners.upper[2]
local dof
# DOF at the center point
dof = 0;
posA = PETSc.DMStagStencil{PetscInt}(PETSc.DMSTAG_DOWN,ix,iy,0,dof)
value = PetscScalar(ix+10);
#PETSc.DMStagVecSetValuesStencil(dm_2D, vec_test_2D_global, posA, value, PETSc.INSERT_VALUES)
#PETSc.DMStagVecSetValuesStencil(dm_2D, vec_test_2D_global, 1, [posA], [value], PETSc.INSERT_VALUES)
dof = 0;
posB = PETSc.DMStagStencil{PetscInt}(PETSc.DMSTAG_LEFT,ix,iy,0,dof)
value = PetscScalar(33);
Expand All @@ -391,7 +393,6 @@ end
end

PETSc.assemble(vec_test_2D_global) # assemble global vector


# Add the global values to the local values
PETSc.update!(vec_test_2D_local, vec_test_2D_global,PETSc.INSERT_VALUES)
Expand All @@ -408,6 +409,8 @@ end
# @test X2D_dofs[4,4,2] ≈ PetscScalar(33.0)
# @test X2D_dofs[4,4,3] ≈ PetscScalar(44.0)

# ----

# Extract an array of a specific DOF (here a face velocity @ the left)
Xarray = PETSc.DMStagGetGhostArrayLocationSlot(dm_2D,vec_test_2D_local, PETSc.DMSTAG_LEFT, 0)
@test sum(X2D_dofs[:,:,2]-Xarray)==0 # check if the local array is identical to the full array
Expand Down
4 changes: 2 additions & 2 deletions test/test_snes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ MPI.Initialized() || MPI.Init()
S = PETSc.SNES{PetscScalar}(petsclib,comm;
ksp_rtol=1e-4,
pc_type="none",
ksp_monitor=true,
snes_monitor=true,
ksp_monitor=false,
snes_monitor=false,
snes_converged_reason=false,
ksp_converged_reason=false)

Expand Down

0 comments on commit fe0debc

Please sign in to comment.