Skip to content

Convert VecSeq lengths to the library's PetscInt - #253

Merged
boriskaus merged 1 commit into
JuliaParallel:mainfrom
singhharsh1708:vecseq-petscint
Sep 9, 2026
Merged

Convert VecSeq lengths to the library's PetscInt#253
boriskaus merged 1 commit into
JuliaParallel:mainfrom
singhharsh1708:vecseq-petscint

Conversation

@singhharsh1708

Copy link
Copy Markdown

VecSeq(petsclib, 10) returns nothing on any library whose PetscInt isn't the platform Int, then fails at the finalizer with "objects of type Nothing cannot be finalized". The length was typed ::Int and handed straight to the ccall, so it missed the generated method and landed on the empty stub at Vec_wrappers.jl:4989. Same for the comm, x::Vector method.

The array constructor just above already converts through petsclib.PetscInt, so these do too now. Hit it with getlib(PetscScalar=Float64, PetscInt=Int32), or on 32-bit Julia where Int is Int32. The case added to the VecSeq testset errors without the fix.

@boriskaus
boriskaus merged commit d24ca59 into JuliaParallel:main Sep 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants