Skip to content

Commit 8fb431b

Browse files
authored
Merge pull request #110 from prj-/jolivet/pchpddm
PC-HPDDM interface
2 parents 6daeb96 + 96fb6f5 commit 8fb431b

File tree

15 files changed

+311
-192
lines changed

15 files changed

+311
-192
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ jobs:
2525
- uses: julia-actions/julia-processcoverage@v1
2626
- uses: codecov/codecov-action@v5
2727
with:
28-
file: lcov.info
2928
verbose: true
3029
token: ${{ secrets.CODECOV_TOKEN }}
3130
docs:

.github/workflows/ci_extra.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
arch:
1818
- x64
1919
petsc_version:
20-
- '3.23.0'
20+
- '3.23.4'
2121
steps:
2222
- uses: actions/checkout@v4
2323
- name: Cache petsc
@@ -29,13 +29,12 @@ jobs:
2929
restore-keys: |
3030
${{ runner.os }}-build-${{ env.JULIA_PETSC_LIBRARY }}-
3131
${{ runner.os }}-build-
32-
${{ runner.os }}-
32+
${{ runner.os }}-
3333
- name: Install petsc dependencies
3434
run: |
35-
sudo apt-get update
36-
sudo apt-get install -y wget gfortran g++ openmpi-bin libopenmpi-dev
35+
sudo apt-get update
36+
sudo apt-get install -y wget gfortran g++ openmpi-bin libopenmpi-dev
3737
- name: Install petsc
38-
##if: steps.cache-petsc.outputs.cache-hit != 'true'
3938
run: |
4039
CURR_DIR=$(pwd)
4140
PACKAGE=petsc

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ LocalPreferences.toml
77
/dev/
88
/docs/build/
99
/docs/site/
10-
deps/build.log
10+
deps/build.log
1111
deps/deps.jl
1212
deps/PetscDataTypes.jl

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@
99

1010
## Documentation
1111

12-
Take a look at this [tutorial](https://gridap.github.io/Tutorials/dev/pages/t016_poisson_distributed/#Tutorial-16:-Poisson-equation-on-parallel-distributed-memory-computers-1) for learning how to use `GridapPETSc` in distributed-memory simulations of PDEs.
12+
Take a look at this [tutorial](https://gridap.github.io/Tutorials/dev/pages/t016_poisson_distributed/#Tutorial-16:-Poisson-equation-on-parallel-distributed-memory-computers-1) for learning how to use `GridapPETSc` in distributed-memory simulations of PDEs.
1313

1414
It can also be used in the serial case, as shown in this [test](https://github.com/gridap/GridapPETSc.jl/blob/master/test/sequential/PoissonDriver.jl).
1515

1616
## Installation
1717

18-
`GridapPETSc` julia package requires the `PETSC` library ([Portable, Extensible Toolkit for Scientific Computation](https://www.mcs.anl.gov/petsc/)) and `MPI` to work correctly. You have two main options to install these dependencies.
18+
`GridapPETSc` julia package requires the `PETSC` library ([Portable, Extensible Toolkit for Scientific Computation](https://www.mcs.anl.gov/petsc/)) and `MPI` to work correctly. You have two main options to install these dependencies.
1919

2020
- **Do nothing [recommended in most cases].** Use the default precompiled `MPI` installation provided by [`MPI.jl`](https://github.com/JuliaParallel/MPI.jl) and the pre-compiled `PETSc` library provided by [`PETSc_jll`](https://github.com/JuliaBinaryWrappers/PETSc_jll.jl). This will happen under the hood when you install `GridapPETSc`. In the case of `GridapPETSc`, you can also force the installation of these default dependencies by setting the environment variable `JULIA_PETSC_LIBRARY` to an empty value.
2121

@@ -27,5 +27,5 @@ It can also be used in the serial case, as shown in this [test](https://github.c
2727
## Notes
2828

2929
* `GridapPETSc` default sparse matrix format is 0-based compressed sparse row. This type of sparse matrix storage format can be described by the `SparseMatrixCSR{0,PetscReal,PetscInt}` and `SymSparseMatrixCSR{0,PetscReal,PetscInt}` Julia types as implemented in the [SparseMatricesCSR](https://gridap.github.io/SparseMatricesCSR.jl/stable/) Julia package.
30-
* **When running in MPI parallel mode** (i.e., with a MPI communicator different from `MPI.COMM_SELF`), `GridapPETSc` implements a sort of limited garbage collector in order to automatically deallocate PETSc objects. This garbage collector can be manually triggered by a call to the function `GridapPETSc.gridap_petsc_gc()`. `GridapPETSc` automatically calls this function inside at different strategic points, and **this will be sufficient for most applications**. However, for some applications, with a very frequent allocation of PETSc objects, it might be needed to call this function from application code. This need will be signaled by PETSc via the following internal message error `PETSC ERROR: No more room in array, limit 256
30+
* **When running in MPI parallel mode** (i.e., with a MPI communicator different from `MPI.COMM_SELF`), `GridapPETSc` implements a sort of limited garbage collector in order to automatically deallocate PETSc objects. This garbage collector can be manually triggered by a call to the function `GridapPETSc.gridap_petsc_gc()`. `GridapPETSc` automatically calls this function inside at different strategic points, and **this will be sufficient for most applications**. However, for some applications, with a very frequent allocation of PETSc objects, it might be needed to call this function from application code. This need will be signaled by PETSc via the following internal message error `PETSC ERROR: No more room in array, limit 256
3131
recompile src/sys/objects/destroy.c with larger value for MAXREGDESOBJS`

deps/build.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,19 +105,19 @@ open(joinpath(@__DIR__,"PetscDataTypes.jl"),"w") do f
105105
println(f)
106106
println(f,:("\"\"\""))
107107
println(f, "Julia alias for `PetscReal` C type.\n")
108-
println(f, "See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscReal.html).")
108+
println(f, "See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscReal/).")
109109
println(f,:("\"\"\""))
110110
println(f,:(const PetscReal = $(PetscReal)))
111111
println(f)
112112
println(f,:("\"\"\""))
113113
println(f, "Julia alias for `PetscScalar` C type.\n")
114-
println(f, "See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscScalar.html).")
114+
println(f, "See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscScalar/).")
115115
println(f,:("\"\"\""))
116116
println(f,:(const PetscScalar = $(PetscScalar)))
117117
println(f)
118118
println(f,:("\"\"\""))
119119
println(f, "Julia alias for `PetscInt` C type.\n")
120-
println(f, "See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscInt.html).")
120+
println(f, "See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscInt/).")
121121
println(f,:("\"\"\""))
122122
println(f,:(const PetscInt = $(PetscInt)))
123123
end

src/Config.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22
"""
33
Julia alias to `PetscErrorCode` C type.
44
5-
See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscErrorCode.html).
5+
See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscErrorCode/).
66
"""
77
const PetscErrorCode = Cint
88

99
"""
1010
Julia alias to `PetscBool` C enum.
1111
12-
See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscBool.html).
12+
See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscBool/).
1313
"""
1414
@enum PetscBool PETSC_FALSE PETSC_TRUE
1515

1616
"""
1717
Julia alias to `PetscDataType` C enum.
1818
19-
See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscDataType.html).
19+
See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscDataType/).
2020
"""
2121
@enum PetscDataType begin
2222
PETSC_DATATYPE_UNKNOWN = 0
@@ -42,7 +42,7 @@ end
4242
"""
4343
PetscDataTypeFromString(name,ptype,found)
4444
45-
See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscDataTypeFromString.html).
45+
See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscDataTypeFromString/).
4646
"""
4747
function PetscDataTypeFromString(name,ptype,found)
4848
ccall(
@@ -54,7 +54,7 @@ end
5454
"""
5555
PetscDataTypeGetSize(ptype,size)
5656
57-
See [PETSc manual](https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscDataTypeGetSize.html).
57+
See [PETSc manual](https://petsc.org/release/manualpages/Sys/PetscDataTypeGetSize/).
5858
"""
5959
function PetscDataTypeGetSize(ptype,size)
6060
ccall(

src/GridapPETSc.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,19 @@ end
6969
include("PETSC.jl")
7070

7171
using GridapPETSc.PETSC: @check_error_code
72-
using GridapPETSc.PETSC: PetscBool, PetscInt, PetscReal, PetscScalar, Vec, Mat, KSP, PC, SNES
73-
#export PETSC
72+
using GridapPETSc.PETSC: PetscBool, PetscInt, PetscReal, PetscScalar, Vec, Mat, KSP, PC, SNES, IS
73+
7474
export @check_error_code
7575
export PetscBool, PetscInt, PetscReal, PetscScalar, Vec, Mat, KSP, PC, SNES
7676

7777
include("Environment.jl")
7878

7979
export PETScVector
8080
export PETScMatrix
81+
export PETScIndexSet
8182
export petsc_sparse
8283
include("PETScArrays.jl")
84+
include("PETScIndexSets.jl")
8385
include("PartitionedArrays.jl")
8486

8587
export PETScLinearSolver

0 commit comments

Comments
 (0)