Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
df11d02
Started moving things to extensions
JordiManyer Oct 28, 2024
de0f05d
Merge branch 'main' of github.com:gridap/GridapSolvers.jl into extens…
JordiManyer Dec 5, 2024
ece5735
Bugfixes
JordiManyer Dec 5, 2024
2429ff0
MInor
JordiManyer Dec 6, 2024
18c6d3a
Merge branch 'main' of github.com:gridap/GridapSolvers.jl into extens…
JordiManyer Dec 15, 2024
32c0e5c
Merge branch 'main' of github.com:gridap/GridapSolvers.jl into extens…
JordiManyer Jan 6, 2025
a679789
Merge branch 'main' of github.com:gridap/GridapSolvers.jl into extens…
JordiManyer Apr 10, 2025
b4f8564
Fixes
JordiManyer Apr 10, 2025
50ae059
Split tests for P4est and PETSc
JordiManyer Apr 10, 2025
d8a35af
Minor
JordiManyer Apr 10, 2025
04e6b74
Fixes
JordiManyer Apr 10, 2025
e1c61a1
More fixes
JordiManyer Apr 10, 2025
7236459
Cache julia during ci
JordiManyer Apr 10, 2025
ef2f9dc
Bugfixes
JordiManyer Apr 10, 2025
2ef3c25
Minor
JordiManyer Apr 10, 2025
aeb2e72
Minor
JordiManyer Apr 10, 2025
3915521
Fixes
JordiManyer Apr 10, 2025
ea6305e
Fixes
JordiManyer Apr 10, 2025
c10b102
Fixes
JordiManyer Apr 10, 2025
dd2be70
Minor
JordiManyer Apr 10, 2025
f899b6c
Minor
JordiManyer Apr 10, 2025
30c8a55
Bugfixes
JordiManyer Apr 10, 2025
7f9a6cd
Moved documentation for extensions
JordiManyer Apr 11, 2025
414cafa
Changes to docs
JordiManyer Apr 11, 2025
0565a28
Fixes
JordiManyer Apr 11, 2025
efe8722
Doc s fixes
JordiManyer Apr 11, 2025
076b702
Fixes
JordiManyer Apr 11, 2025
e3c4163
Minor
JordiManyer Apr 11, 2025
9163a69
More tests
JordiManyer Apr 11, 2025
edeb5ac
Minor
JordiManyer Apr 11, 2025
bcdac79
Minor
JordiManyer Apr 11, 2025
6e6bf7e
Minor
JordiManyer Apr 11, 2025
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
115 changes: 36 additions & 79 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,103 +11,60 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
test-sequential:
name: Sequential - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
env:
P4EST_ROOT_DIR: "/opt/p4est/2.8.5/"
JULIA_PETSC_LIBRARY: "/opt/petsc/3.18/lib/libpetsc"
strategy:
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- name: Cache p4est
id: cache-p4est
uses: actions/cache@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
path: ${{env.P4EST_ROOT_DIR}}
key: ${{ runner.os }}-build-${{ env.P4EST_ROOT_DIR }}-
restore-keys: |
${{ runner.os }}-build-${{ env.P4EST_ROOT_DIR }}-
${{ runner.os }}-build-
${{ runner.os }}-
file: lcov.info
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
test-mpi:
name: MPI - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: Install p4est/petsc dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget gfortran g++ openmpi-bin libopenmpi-dev
- name: Install p4est
if: steps.cache-p4est.outputs.cache-hit != 'true'
run: |
# Install p4est 2.8.5 from sources
CURR_DIR=$(pwd)
PACKAGE=p4est
VERSION=2.8.5
INSTALL_ROOT=/opt
P4EST_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION
TAR_FILE=$PACKAGE-$VERSION.tar.gz
URL="https://github.com/p4est/p4est.github.io/raw/master/release"
ROOT_DIR=/tmp
SOURCES_DIR=$ROOT_DIR/$PACKAGE-$VERSION
BUILD_DIR=$SOURCES_DIR/build
wget -q $URL/$TAR_FILE -O $ROOT_DIR/$TAR_FILE
mkdir -p $SOURCES_DIR
tar xzf $ROOT_DIR/$TAR_FILE -C $SOURCES_DIR --strip-components=1
cd $SOURCES_DIR
./configure --prefix=$P4EST_INSTALL --without-blas --without-lapack --enable-mpi -disable-dependency-tracking
make --quiet
make --quiet install
rm -rf $ROOT_DIR/$TAR_FILE $SOURCES_DIR
cd $CURR_DIR
- name: Install petsc
##if: steps.cache-petsc.outputs.cache-hit != 'true'
run: |
CURR_DIR=$(pwd)
PACKAGE=petsc
VERSION=3.18
INSTALL_ROOT=/opt
PETSC_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION
TAR_FILE=$PACKAGE-$VERSION.tar.gz
URL="https://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
ROOT_DIR=/tmp
SOURCES_DIR=$ROOT_DIR/$PACKAGE-$VERSION
BUILD_DIR=$SOURCES_DIR/build
wget -q $URL/$TAR_FILE -O $ROOT_DIR/$TAR_FILE
mkdir -p $SOURCES_DIR
tar xzf $ROOT_DIR/$TAR_FILE -C $SOURCES_DIR --strip-components=1
cd $SOURCES_DIR
./configure --prefix=$PETSC_INSTALL --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 \
--download-mumps --download-scalapack --download-parmetis --download-metis \
--download-fblaslapack --download-ptscotch --with-debugging --with-x=0 --with-shared=1 \
--with-mpi=1 --with-64-bit-indices
make
make install
- name: add MPIPreferences
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.add("MPIPreferences")
- name: use MPI system binary
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-buildpkg@latest
- run: echo $PWD
- run: julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.precompile()'
- run: julia --project=. --color=yes --check-bounds=yes test/runtests.jl
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- run: julia --project=. --color=yes -e 'using Pkg; Pkg.add("IterativeSolvers")'
- run: julia --project=. --color=yes test/runtests_mpi.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
file: lcov.info
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
docs:
name: Documentation
Expand Down
103 changes: 103 additions & 0 deletions .github/workflows/CI_libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: CI-External-Libraries
on:
push:
branches:
- main
tags: ['*']
pull_request:
concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: only if it is a pull request build.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
name: External Libraries - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
env:
P4EST_ROOT_DIR: "/opt/p4est/2.8.5/"
JULIA_PETSC_LIBRARY: "/opt/petsc/3.22.4/lib/libpetsc"
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
steps:
- name: Install p4est/petsc dependencies
run: |
sudo apt-get update
sudo apt-get install -y wget gfortran g++ openmpi-bin libopenmpi-dev
- name: Install p4est
run: |
# Install p4est 2.8.5 from sources
CURR_DIR=$(pwd)
PACKAGE=p4est
VERSION=2.8.5
INSTALL_ROOT=/opt
P4EST_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION
TAR_FILE=$PACKAGE-$VERSION.tar.gz
URL="https://github.com/p4est/p4est.github.io/raw/master/release"
ROOT_DIR=/tmp
SOURCES_DIR=$ROOT_DIR/$PACKAGE-$VERSION
BUILD_DIR=$SOURCES_DIR/build
wget -q $URL/$TAR_FILE -O $ROOT_DIR/$TAR_FILE
mkdir -p $SOURCES_DIR
tar xzf $ROOT_DIR/$TAR_FILE -C $SOURCES_DIR --strip-components=1
cd $SOURCES_DIR
./configure --prefix=$P4EST_INSTALL --without-blas --without-lapack --enable-mpi -disable-dependency-tracking
make --quiet
make --quiet install
rm -rf $ROOT_DIR/$TAR_FILE $SOURCES_DIR
cd $CURR_DIR
- name: Install petsc
run: |
CURR_DIR=$(pwd)
PACKAGE=petsc
VERSION=3.22.4
INSTALL_ROOT=/opt
PETSC_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION
TAR_FILE=$PACKAGE-$VERSION.tar.gz
URL="https://web.cels.anl.gov/projects/petsc/download/release-snapshots/"
ROOT_DIR=/tmp
SOURCES_DIR=$ROOT_DIR/$PACKAGE-$VERSION
BUILD_DIR=$SOURCES_DIR/build
wget -q $URL/$TAR_FILE -O $ROOT_DIR/$TAR_FILE
mkdir -p $SOURCES_DIR
tar xzf $ROOT_DIR/$TAR_FILE -C $SOURCES_DIR --strip-components=1
cd $SOURCES_DIR
./configure --prefix=$PETSC_INSTALL --with-cc=mpicc --with-cxx=mpicxx --with-fc=mpif90 \
--download-mumps --download-scalapack --download-parmetis --download-metis \
--download-fblaslapack --download-ptscotch --with-debugging --with-x=0 --with-shared=1 \
--with-mpi=1 --with-64-bit-indices
make
make install
cd $CURR_DIR
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v2
- name: add MPIPreferences and external packages
shell: julia --color=yes --project=. {0}
run: |
using Pkg
Pkg.add("MPIPreferences")
Pkg.add("GridapP4est")
Pkg.add("GridapPETSc")
- name: use MPI system binary
shell: julia --color=yes --project=. {0}
run: |
using MPIPreferences
MPIPreferences.use_system_binary()
- uses: julia-actions/julia-buildpkg@latest
- run: echo $PWD
- run: ls .
- run: ls test
- run: ls test/ExtLibraries
- run: julia --project=. -e 'using Pkg; Pkg.instantiate(); Pkg.build(); Pkg.precompile()'
- run: julia --project=. --color=yes test/ExtLibraries/runtests.jl
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Added `RichardsonLinearSolver`. Since PR[#87](https://github.com/gridap/GridapSolvers.jl/pull/87).
- Added `NullspaceSolver` for serial. Since PR[#88](https://github.com/gridap/GridapSolvers.jl/pull/88).

### Changed

- **BREAKING:** Moved GridapP4est, GridapPETSc and IterativeSolvers into extensions (i.e weak dependencies). Since PR[#76](https://github.com/gridap/GridapSolvers.jl/pull/76).

## Previous versions

A changelog is not maintained for older versions than 0.4.0.
17 changes: 12 additions & 5 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ BlockArrays = "8e7c35d0-a365-5155-bbbb-fb81a777f24e"
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
Gridap = "56d4f2e9-7ea1-5844-9cf6-b9c51ca7ce8e"
GridapDistributed = "f9701e48-63b3-45aa-9a63-9bc6c271f355"
GridapP4est = "c2c8e14b-f5fd-423d-9666-1dd9ad120af9"
GridapPETSc = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LineSearches = "d3d80556-e9d4-5f37-9878-2ab0fcc64255"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
Expand All @@ -21,6 +18,16 @@ Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1"

[weakdeps]
GridapP4est = "c2c8e14b-f5fd-423d-9666-1dd9ad120af9"
GridapPETSc = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"

[extensions]
GridapP4estExt = "GridapP4est"
GridapPETScExt = "GridapPETSc"
IterativeSolversExt = "IterativeSolvers"

[compat]
AbstractTrees = "0.4"
BlockArrays = "1"
Expand All @@ -35,11 +42,11 @@ MPI = "0.20"
NLsolve = "4.3.0"
PartitionedArrays = "0.3"
SparseMatricesCSR = "0.6.7"
julia = "1.7"
julia = "1.9"

[extras]
MPIPreferences = "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
test = ["Test","IterativeSolvers"]
3 changes: 3 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
GridapP4est = "c2c8e14b-f5fd-423d-9666-1dd9ad120af9"
GridapPETSc = "bcdc36c2-0c3e-11ea-095a-c9dadae499f1"
GridapSolvers = "6d3209ee-5e3c-4db7-a716-942eb12ed534"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
3 changes: 2 additions & 1 deletion docs/examples.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ for file in readdir(src_dir)
out_file = string(out_dir,file)

Literate.markdown(
in_file, out_dir
in_file, out_dir;
codefence = "````julia " => "````"
)
end
26 changes: 19 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,29 +1,40 @@
using GridapSolvers
using GridapPETSc, GridapP4est, IterativeSolvers
using Documenter

include("examples.jl")

extensions = map(
ext -> Base.get_extension(GridapSolvers,ext),
(:GridapP4estExt,:GridapPETScExt,:IterativeSolversExt)
)

DocMeta.setdocmeta!(GridapSolvers, :DocTestSetup, :(using GridapSolvers); recursive=true)

makedocs(;
modules=[GridapSolvers,GridapSolvers.BlockSolvers],
authors="Santiago Badia <santiago.badia@monash.edu>, Jordi Manyer <jordi.manyer@monash.edu>, Alberto F. Martin <alberto.martin@monash.edu>",
repo="https://github.com/gridap/GridapSolvers.jl/blob/{commit}{path}#{line}",
sitename="GridapSolvers.jl",
format=Documenter.HTML(;
modules = [GridapSolvers,extensions...],
authors = "Santiago Badia <santiago.badia@monash.edu>, Jordi Manyer <jordi.manyer@monash.edu>, Alberto F. Martin <alberto.martin@monash.edu>",
repo = "https://github.com/gridap/GridapSolvers.jl/blob/{commit}{path}#{line}",
sitename = "GridapSolvers.jl",
format = Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
canonical="https://gridap.github.io/GridapSolvers.jl",
edit_link="main",
assets=String[],
),
pages=[
pages = [
"Home" => "index.md",
"SolverInterfaces" => "SolverInterfaces.md",
"MultilevelTools" => "MultilevelTools.md",
"LinearSolvers" => "LinearSolvers.md",
"NonlinearSolvers" => "NonlinearSolvers.md",
"BlockSolvers" => "BlockSolvers.md",
"PatchBasedSmoothers" => "PatchBasedSmoothers.md",
"Extensions" => [
"GridapP4est.jl" => "Extensions/GridapP4est.md",
"GridapPETSc.jl" => "Extensions/GridapPETSc.md",
"IterativeSolvers.jl" => "Extensions/IterativeSolvers.md",
],
"Examples" => [
"Stokes" => "Examples/Stokes.md",
"Navier-Stokes" => "Examples/NavierStokes.md",
Expand All @@ -32,7 +43,8 @@ makedocs(;
"Darcy (GMG)" => "Examples/DarcyGMG.md",
],
],
warnonly=[:doctest,:example_block,:eval_block]
warnonly=[:doctest,:example_block,:eval_block],
clean=true,
)

deploydocs(;
Expand Down
3 changes: 1 addition & 2 deletions docs/src/BlockSolvers.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# GridapSolvers.BlockSolvers

```@meta
CurrentModule = GridapSolvers.BlockSolvers
```

# GridapSolvers.BlockSolvers

Many scalable preconditioners for multiphysics problems are based on (possibly partial) block factorizations. This module provides a simple interface to define and use block solvers for block-assembled systems.

## Block types
Expand Down
Loading
Loading