Skip to content
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

P4est migration #3

Merged
merged 103 commits into from
Mar 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
8b55ce4
Added some packages, Manifest.toml is required.
JordiManyer Oct 5, 2022
7d11644
First draft of ModelHierarchy
JordiManyer Oct 5, 2022
6fa137e
Scope fixes
JordiManyer Oct 5, 2022
1ce2c0e
Added some extensions to PartitionedArrays
JordiManyer Oct 5, 2022
a494a37
Now tracking GridapP4est#p4est-migration
JordiManyer Oct 5, 2022
f7c0d8b
ModelHierarchy tests working
JordiManyer Oct 5, 2022
86c633b
Fixes to CI.yml
JordiManyer Oct 6, 2022
0e5f03d
Changed variable name
JordiManyer Oct 17, 2022
5b6cbe2
MPIData changed by AbstractPData
JordiManyer Oct 17, 2022
5bb325a
Removed free_model()
JordiManyer Oct 17, 2022
695a38d
Redistribution functions
JordiManyer Oct 19, 2022
15f3e4d
Added LinearAlgebra to Project.toml
JordiManyer Oct 19, 2022
5ee89d6
Added InterGridTransferOperators
JordiManyer Oct 19, 2022
1540777
Added exports
JordiManyer Oct 19, 2022
53680ac
Tracking Gridap#refined-discrete-models
JordiManyer Oct 20, 2022
1788cc8
Bugfix
JordiManyer Oct 20, 2022
3a77a54
Bugfix
JordiManyer Oct 20, 2022
fafd484
Added tests for FESpaceHierarchies
JordiManyer Oct 20, 2022
abe468b
Added RedistributeToolsTests
JordiManyer Oct 20, 2022
23a43bc
Added RefinementTools, enhanced Transfer ops
JordiManyer Oct 26, 2022
5f93db3
Added DistributedRefinedDiscreteModels
JordiManyer Nov 1, 2022
3ada68f
Debugging
JordiManyer Nov 3, 2022
57231ac
more fixes
JordiManyer Nov 7, 2022
c0cb84d
Added void management
JordiManyer Nov 10, 2022
6f00b56
Added Gridap fixes for degenerate cases
JordiManyer Nov 15, 2022
bf0dbd9
Started adding support for empty parts
JordiManyer Nov 15, 2022
efa31ee
Continued dealing with void
JordiManyer Nov 16, 2022
518a24d
Propagated changes in Gridap
JordiManyer Nov 24, 2022
671fec4
Fixed tests
JordiManyer Nov 28, 2022
d959a6f
Updating Manifest.toml package versions
amartinhuertas Dec 11, 2022
65db042
Updated dependencies
JordiManyer Dec 13, 2022
b0ddd21
Changed how parts are handled in hierarchy
JordiManyer Dec 13, 2022
0119909
Continued implementing TransferOperators
JordiManyer Dec 13, 2022
fdb1275
TransferOperators are now working
JordiManyer Dec 13, 2022
77c6183
Moved code around, created submodules
JordiManyer Dec 13, 2022
2216aba
bugfix in runtests.jl
JordiManyer Dec 13, 2022
6e8aaa3
Removed OctreeDistributedDiscreteModelsTests.jl. It does not belong h…
amartinhuertas Dec 13, 2022
bf7d842
Added RichardsonSmoothers
JordiManyer Dec 14, 2022
781962f
Added GMGLinearSolver
JordiManyer Dec 14, 2022
fc55b1b
Added solution/residual mode for TransferOperators
JordiManyer Dec 14, 2022
0bdc89d
Added Poisson test
JordiManyer Dec 14, 2022
6169860
Added VectorLaplacian Tests
JordiManyer Dec 14, 2022
48e77f0
Added HDiv-RT tests, do not work (missing Patch-based smoothers)
JordiManyer Dec 14, 2022
3cc0e9b
Minor convenience change
JordiManyer Dec 15, 2022
719cd2f
Activated all tests
JordiManyer Dec 15, 2022
4d74d0c
We now export GMG solver
JordiManyer Dec 16, 2022
53862c5
bugfix in tests
JordiManyer Dec 16, 2022
9361f9d
Added MUMPS as coarsest solver test
JordiManyer Dec 19, 2022
e68e129
Fixed MUMPS tests
JordiManyer Dec 20, 2022
4252953
Refactored ModelHierarchies constructor to include coarsening option
JordiManyer Dec 20, 2022
1f0e545
bugfix
JordiManyer Dec 20, 2022
10bc579
Added option to be able to interpolate in both direction
JordiManyer Dec 24, 2022
11e9d53
Changed number of mpi procs in tests
JordiManyer Dec 26, 2022
effc132
Added caches for redistribute_cell_dofs()
JordiManyer Dec 27, 2022
bcc7072
Added more caches for projection rhs
JordiManyer Dec 27, 2022
fa3c473
Added dof restriction for transfer ops
JordiManyer Dec 30, 2022
396e5c3
Bugfix
JordiManyer Dec 30, 2022
7ff613b
Updated Manifest.toml
JordiManyer Jan 8, 2023
c3c18fe
Added GMG spetialisation for PETScLinearSolvers.
JordiManyer Jan 12, 2023
c308139
Added finest level cache to reduce allocations
JordiManyer Jan 12, 2023
512f24a
Copied over patch-based smoothers from GridapP4est
JordiManyer Jan 14, 2023
8cf70df
Added tests, everything working.
JordiManyer Jan 14, 2023
ef23790
Updated with latest changes to PA, GP4est, GDist
JordiManyer Jan 20, 2023
8280cb6
Merge pull request #4 from gridap/patch-based-smoothers
JordiManyer Jan 20, 2023
1316c04
Added ModelHierarchies without adaptivity
JordiManyer Feb 3, 2023
252caaf
FESpaceHierarchies and TransferOps now accept different degrees for e…
JordiManyer Feb 3, 2023
1717f3f
Removed PMGLinearSolvers
JordiManyer Feb 3, 2023
67c97cb
Added tests for P-refinement GMG
JordiManyer Feb 3, 2023
ddd0b69
Minor changes
JordiManyer Feb 3, 2023
d45cfcc
Merge pull request #5 from gridap/pmg-gmg-integration
JordiManyer Feb 3, 2023
b8b7fee
Limited PartitionedArrays compatibility to v0.2.15
JordiManyer Feb 3, 2023
01a8a8a
Minor fix
JordiManyer Feb 3, 2023
09db08d
Minor changes
JordiManyer Feb 14, 2023
90e4db8
Weights and contributions are now redistributed
JordiManyer Feb 15, 2023
13003bf
Adapted the PatchBasedLinearSolvers
JordiManyer Feb 15, 2023
2e4f9e6
Modifications to solver
JordiManyer Feb 16, 2023
3d96def
Bugfix when using TransferOperators in solution mode
JordiManyer Feb 20, 2023
5b7fbf6
Introduced new changes from Gridap.Adaptivity
JordiManyer Feb 21, 2023
ffc047a
Cleanup
JordiManyer Feb 21, 2023
6725b13
Small bugfix
JordiManyer Feb 21, 2023
8425d6f
Merge pull request #9 from gridap/bugfix-parallel-precision-loss
JordiManyer Feb 22, 2023
814c5d3
Merge branch 'p4est-migration' of github.com:gridap/GridapSolvers.jl …
JordiManyer Feb 22, 2023
bd6d8cc
Fixed distributed Patch-Based smoothers
JordiManyer Feb 22, 2023
7b73cf4
Bugfix: TransferOps not working for VectorValued FEFunctions
JordiManyer Feb 23, 2023
c64b505
Added PatchBased methods for multilevel
JordiManyer Feb 23, 2023
17b2c13
Adapted HDiv test to new patch based solvers
JordiManyer Feb 23, 2023
3f5077d
Updated to GridapDistributed v0.2.7
JordiManyer Feb 27, 2023
fc08b74
Merge branch 'p4est-migration' into patch-based-smoothers
JordiManyer Feb 28, 2023
31f58b9
Fix Project.toml
JordiManyer Feb 28, 2023
0fb4b12
Updated to GridapDistributed 0.2.7
JordiManyer Feb 28, 2023
ee6d28e
Removed Manifest.toml
JordiManyer Feb 28, 2023
ffa839a
Bugfix: Edge-based patch-based smoothers
JordiManyer Mar 3, 2023
3c132d7
Merge branch 'p4est-migration' of github.com:gridap/GridapSolvers.jl …
JordiManyer Mar 3, 2023
fffaeaf
Small bugfix
JordiManyer Mar 3, 2023
c013438
Small bugfix in tests
JordiManyer Mar 3, 2023
5d7ce21
Minor bugfix
JordiManyer Mar 3, 2023
11a9e9a
Merge pull request #7 from gridap/patch-based-smoothers
JordiManyer Mar 3, 2023
226dda7
Export PatchBasedSmoothers
JordiManyer Mar 10, 2023
f5f1808
Optimized injection for patch-based fespaces
JordiManyer Mar 10, 2023
2b18131
Removed unnecessary caches in the solver
JordiManyer Mar 10, 2023
442f008
Further optimized patch-based injection
JordiManyer Mar 10, 2023
86a0af7
Optimized weights for distributed
JordiManyer Mar 10, 2023
a7e5699
Merge pull request #10 from gridap/optimizing-patch-based-smoothers
JordiManyer Mar 11, 2023
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
77 changes: 70 additions & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,92 @@ jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
env:
JULIA_MPI_BINARY: "system"
P4EST_ROOT_DIR: "/opt/p4est/2.2/"
JULIA_PETSC_LIBRARY: "/opt/petsc/3.18/lib/libpetsc"
strategy:
fail-fast: false
matrix:
version:
- '1.7'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- name: Cache p4est
id: cache-p4est
uses: actions/cache@v2
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 }}-
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: julia-actions/cache@v1
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v2
- 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.2 from sources
CURR_DIR=$(pwd)
PACKAGE=p4est
VERSION=2.2
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-ptscotch --with-debugging --with-x=0 --with-shared=1 \
--with-mpi=1 --with-64-bit-indices
make
make install
- 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: codecov/codecov-action@v1
with:
files: lcov.info
file: lcov.info
docs:
name: Documentation
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.vscode
Manifest.toml
19 changes: 18 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
authors = ["Santiago Badia <[email protected]>", "Jordi Manyer <[email protected]>", "Alberto F. Martin <[email protected]>", "Javier Principe <[email protected]>"]
name = "GridapSolvers"
uuid = "6d3209ee-5e3c-4db7-a716-942eb12ed534"
authors = ["Santiago Badia <[email protected]>", "Jordi Manyer <[email protected]>", "Alberto F. Martin <[email protected]>", "Javier Principe <[email protected]>"]
version = "0.1.0"

[deps]
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"
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"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195"
PartitionedArrays = "5a9dfac6-5c52-46f7-8278-5e2210713be9"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[compat]
Gridap = "0.17.17"
GridapDistributed = "0.2.7"
PartitionedArrays = "0.2.15"
julia = "1.7"

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

[targets]
Expand Down
33 changes: 32 additions & 1 deletion src/GridapSolvers.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,36 @@
module GridapSolvers

# Write your package code here.
include("MultilevelTools/MultilevelTools.jl")
include("LinearSolvers/LinearSolvers.jl")
include("PatchBasedSmoothers/PatchBasedSmoothers.jl")

using GridapSolvers.MultilevelTools
using GridapSolvers.LinearSolvers
using GridapSolvers.PatchBasedSmoothers

# MultilevelTools
export get_parts, generate_level_parts, generate_subparts

export ModelHierarchy
export num_levels, get_level, get_level_parts
export get_model, get_model_before_redist

export FESpaceHierarchy
export get_fe_space, get_fe_space_before_redist
export compute_hierarchy_matrices

export DistributedGridTransferOperator
export RestrictionOperator, ProlongationOperator
export setup_transfer_operators

# LinearSolvers
export JacobiLinearSolver
export RichardsonSmoother
export GMGLinearSolver

# PatchBasedSmoothers
export PatchDecomposition
export PatchFESpace
export PatchBasedLinearSolver

end
Loading