From edd44c983cfc6e8761292f129dc6cdd99ba81f89 Mon Sep 17 00:00:00 2001 From: JordiManyer Date: Sun, 22 Oct 2023 12:59:33 +1100 Subject: [PATCH 1/8] Changes to constants --- src/bindings/p8est_common.jl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/bindings/p8est_common.jl b/src/bindings/p8est_common.jl index 0e405bc..9cec8ec 100644 --- a/src/bindings/p8est_common.jl +++ b/src/bindings/p8est_common.jl @@ -1,8 +1,11 @@ # Automatically generated using Clang.jl -const P8EST_MAXLEVEL = 19 -const P8EST_QMAXLEVEL = 18 +const P8EST_OLD_MAXLEVEL = 19 +const P8EST_OLD_QMAXLEVEL = 18 + +const P8EST_MAXLEVEL = 30 +const P8EST_QMAXLEVEL = 29 # Skipping MacroDefinition: P8EST_ROOT_LEN ( ( p4est_qcoord_t ) 1 << P8EST_MAXLEVEL ) # Skipping MacroDefinition: P8EST_QUADRANT_LEN ( l ) ( ( p4est_qcoord_t ) 1 << ( P8EST_MAXLEVEL - ( l ) ) ) @@ -26,7 +29,7 @@ struct p8est_tree first_desc::p8est_quadrant_t last_desc::p8est_quadrant_t quadrants_offset::p4est_locidx_t - quadrants_per_level::NTuple{20, p4est_locidx_t} + quadrants_per_level::NTuple{31, p4est_locidx_t} maxlevel::Int8 end @@ -106,7 +109,7 @@ const p8est_refine_t = Ptr{Cvoid} const p8est_coarsen_t = Ptr{Cvoid} const p8est_weight_t = Ptr{Cvoid} const P8EST_DIM = 3 -const P8EST_FACES = 2P8EST_DIM +const P8EST_FACES = 2*P8EST_DIM const P8EST_CHILDREN = 8 const P8EST_HALF = P8EST_CHILDREN / 2 const P8EST_EDGES = 12 From cbd21fe3233a44e4d3da477563c809c5d3d3a91f Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 21:23:44 +1100 Subject: [PATCH 2/8] Renaming. Adding lnodes tests to runtests. --- test/{example_lnodes.jl => example_lnodes_2d.jl} | 0 test/runtests.jl | 11 +++++++++++ 2 files changed, 11 insertions(+) rename test/{example_lnodes.jl => example_lnodes_2d.jl} (100%) diff --git a/test/example_lnodes.jl b/test/example_lnodes_2d.jl similarity index 100% rename from test/example_lnodes.jl rename to test/example_lnodes_2d.jl diff --git a/test/runtests.jl b/test/runtests.jl index cd51cdf..960f66f 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -45,4 +45,15 @@ if P4est_wrapper.P4EST_FOUND @show cmd run(cmd) end + @testset "Example lnodes 2D" begin + cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes.jl"))` + @show cmd + run(cmd) + end + @testset "Example lnodes 3D" begin + cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes_3d.jl"))` + @show cmd + run(cmd) + end + end From 521f0bf2080793a882cd2d4f2088affb25c0add3 Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 21:26:42 +1100 Subject: [PATCH 3/8] adding 2D+1D tests --- test/runtests.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 960f66f..7e5ecee 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -55,5 +55,9 @@ if P4est_wrapper.P4EST_FOUND @show cmd run(cmd) end - + @testset "Example lnodes 2D+1D" begin + cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes_2d+1d.jl"))` + @show cmd + run(cmd) + end end From 782329b1d727dfacc2218af5607cc14db61f51bf Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 21:56:49 +1100 Subject: [PATCH 4/8] Bump p4est version --- .github/workflows/ci.yml | 6 +++--- Project.toml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed48c2e..5b66881 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} env: - P4EST_ROOT_DIR: "/opt/p4est/2.2/" + P4EST_ROOT_DIR: "/opt/p4est/2.3/" strategy: fail-fast: false matrix: @@ -37,10 +37,10 @@ jobs: sudo apt-get install -y wget gfortran g++ openmpi-bin openmpi-common libopenmpi-dev - name: Install p4est run: | - # Install p4est 2.2 from sources + # Install p4est 2.3 from sources CURR_DIR=$(pwd) PACKAGE=p4est - VERSION=2.2 + VERSION=2.3 INSTALL_ROOT=/opt P4EST_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION TAR_FILE=$PACKAGE-$VERSION.tar.gz diff --git a/Project.toml b/Project.toml index 5e3f99f..0c2d8ea 100644 --- a/Project.toml +++ b/Project.toml @@ -1,12 +1,12 @@ authors = ["Victor Sande ", "Alberto F. Martin "] name = "P4est_wrapper" uuid = "3743d7c0-8adf-11ea-380b-7d33b0ecc1da" -version = "0.2.1" +version = "0.2.2" [compat] CEnum = "0.4" MPI = "0.20" -P4est_jll = "2.2.0" +P4est_jll = "2.3.0" julia = "1.0" [deps] From 8c145eb083628d5d67f92265416525a5786d48f4 Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 22:03:27 +1100 Subject: [PATCH 5/8] Replacing 2.3 by 2.3.6, as 2.3 does not exist --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b66881..8ec7a82 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,10 +37,10 @@ jobs: sudo apt-get install -y wget gfortran g++ openmpi-bin openmpi-common libopenmpi-dev - name: Install p4est run: | - # Install p4est 2.3 from sources + # Install p4est 2.3.6 from sources CURR_DIR=$(pwd) PACKAGE=p4est - VERSION=2.3 + VERSION=2.3.6 INSTALL_ROOT=/opt P4EST_INSTALL=$INSTALL_ROOT/$PACKAGE/$VERSION TAR_FILE=$PACKAGE-$VERSION.tar.gz From 637f22089d2e917867c15d5a4b634a80fa894317 Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 22:15:56 +1100 Subject: [PATCH 6/8] typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8ec7a82..936ebb0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ jobs: name: Tests ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} env: - P4EST_ROOT_DIR: "/opt/p4est/2.3/" + P4EST_ROOT_DIR: "/opt/p4est/2.3.6/" strategy: fail-fast: false matrix: From 59f5f021dd2a940d999bbdc448d27e893bc5a8fc Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 22:20:38 +1100 Subject: [PATCH 7/8] Typo --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index 7e5ecee..d26fe83 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -46,7 +46,7 @@ if P4est_wrapper.P4EST_FOUND run(cmd) end @testset "Example lnodes 2D" begin - cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes.jl"))` + cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes_2d.jl"))` @show cmd run(cmd) end From b9e1600c3910095290fc319e0cb880e6ee89add8 Mon Sep 17 00:00:00 2001 From: "Alberto F. Martin" Date: Wed, 27 Mar 2024 22:27:04 +1100 Subject: [PATCH 8/8] lnodes 3d can only be run with a single proc --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index d26fe83..3e4622c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -51,7 +51,7 @@ if P4est_wrapper.P4EST_FOUND run(cmd) end @testset "Example lnodes 3D" begin - cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes_3d.jl"))` + cmd = `$mpiexec -n 1 $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "example_lnodes_3d.jl"))` @show cmd run(cmd) end