Skip to content

Bugfix in MatCreateMPIAIJWithSplitArrays #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.2] - 2024-05-18

### Fixed

- Bug in `MatCreateMPIAIJWithSplitArrays_args`.

## [0.1.1] - 2024-02-28

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "PetscCall"
uuid = "1194c000-87c4-4102-b4a0-a6217ec4849e"
authors = ["Francesc Verdugo <[email protected]> and contributors"]
version = "0.1.1"
version = "0.1.2"

[deps]
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand Down
7 changes: 6 additions & 1 deletion src/ksp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,12 @@ function MatCreateMPIAIJWithSplitArrays_args(a::PSparseMatrix,petsc_comm,cols=re
end
end
if ! issorted
sort!(view(oj,pini:pend))
# TODO a more efficient way of doing this, or avoiding the need to sort
viewj = view(oj,pini:pend)
viewv = view(ov,pini:pend)
perm = sortperm(viewj) # Allocation here
viewj .= viewj[perm]
viewv .= viewv[perm]
end
end
(petsc_comm,m,n,M,N,i,j,v,oi,oj,ov)
Expand Down
Loading