From 53fe4ed512099b43346e934eaeb92b2322897702 Mon Sep 17 00:00:00 2001 From: "Z J Wegert (Workstation)" Date: Mon, 1 Jul 2024 15:34:24 +1000 Subject: [PATCH 1/3] minor bug fix in `benchmark_forward_problem` --- src/Benchmarks.jl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Benchmarks.jl b/src/Benchmarks.jl index 342dcfed..87975a2b 100644 --- a/src/Benchmarks.jl +++ b/src/Benchmarks.jl @@ -1,8 +1,8 @@ """ benchmark(f, args, ranks; nreps, reset!) -Benchmark a function `f` that takes arguments `args`. - +Benchmark a function `f` that takes arguments `args`. + In MPI mode, benchmark will always return the maximum CPU time across all ranks. This behaviour can be changed by overwritting `process_timer`. @@ -14,7 +14,7 @@ set `ranks = nothing`. # Optional - `nreps = 10`: Number of benchmark repetitions -- `reset!= (x...) -> nothing`: Function for resetting inital data (e.g., level-set function ``\\varphi``). +- `reset!= (x...) -> nothing`: Function for resetting inital data (e.g., level-set function ``\\varphi``). """ function benchmark(f, args, ranks::Nothing; nreps = 10, reset! = (x...) -> nothing) t = zeros(Float64,nreps) @@ -93,7 +93,7 @@ function benchmark_single_iteration(m::Optimiser,ranks; nreps = 10) end φ0 = copy(get_free_dof_values(m.φ0)) - λ0 = copy(state.λ); Λ0 = copy(state.Λ) + λ0 = copy(state.λ); Λ0 = copy(state.Λ) dL0 = copy(state.dL) function opt_reset!(m::Optimiser) u = get_free_dof_values(get_state(m.problem)); @@ -112,7 +112,7 @@ end """ benchmark_forward_problem(m::AbstractFEStateMap, φh, ranks; nreps) -Benchmark the forward FE solve given `m::AbstractFEStateMap` and a level-set +Benchmark the forward FE solve given `m::AbstractFEStateMap` and a level-set function `φh`. See [`forward_solve!`](@ref) for input types. """ function benchmark_forward_problem(m::AbstractFEStateMap, φh, ranks; nreps = 10) @@ -123,14 +123,14 @@ function benchmark_forward_problem(m::AbstractFEStateMap, φh, ranks; nreps = 10 u = get_free_dof_values(get_state(m)); fill!(u,zero(eltype(u))) end - return benchmark(f, (m,φh), ranks; nreps) + return benchmark(f, (m,φh), ranks; nreps, reset!) end """ benchmark_advection(stencil::LevelSetEvolution, φ0, v0, γ, ranks; nreps) Benchmark solving the Hamilton-Jacobi evolution equation given a `stencil`, -level-set function `φ0`, velocity function `v0`, and time step coefficient `γ`. +level-set function `φ0`, velocity function `v0`, and time step coefficient `γ`. See [`evolve!`](@ref) for input types. """ function benchmark_advection(stencil::LevelSetEvolution, φ0, v0, γ, ranks; nreps = 10) @@ -183,7 +183,7 @@ end """ benchmark_hilbertian_projection_map(m::HilbertianProjectionMap, dV, C, dC, K, ranks; nreps) -Benchmark `update_descent_direction!` for `HilbertianProjectionMap` given a objective +Benchmark `update_descent_direction!` for `HilbertianProjectionMap` given a objective sensitivity `dV`, constraint values C, constraint sensitivities `dC`, and stiffness matrix `K` for the velocity-extension. """ From 48afd71be41c871cae73d1bb44953c9eb9cc88d5 Mon Sep 17 00:00:00 2001 From: Z J Wegert <60646897+zjwegert@users.noreply.github.com> Date: Sat, 23 Nov 2024 22:08:48 +1000 Subject: [PATCH 2/3] Update compats Gridap and other satellite packages recently updated their `compat` in the `Project.toml`. This broke the package compat in this repo. --- Project.toml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Project.toml b/Project.toml index d8f7db91..02b0c018 100755 --- a/Project.toml +++ b/Project.toml @@ -23,17 +23,17 @@ SparseMatricesCSR = "a0a7dd2c-ebf4-11e9-1f05-cf50bc540ca1" [compat] BenchmarkTools = "1" -BlockArrays = "0.16" +BlockArrays = "1" ChainRulesCore = "1" CircularArrays = "1" -FillArrays = "0.8.4,1" +FillArrays = "1" Gridap = "0.18" GridapDistributed = "0.4" GridapPETSc = "0.5" -GridapSolvers = "0.3" +GridapSolvers = "0.4" JLD2 = "0.4" -MPI = "0.19, 0.20" -PartitionedArrays = "0.3" +MPI = "0.16, 0.17, 0.18, 0.19, 0.20" +PartitionedArrays = "0.3.3" SparseMatricesCSR = "0.6.6" julia = "1.6.7" From ded39d8dd0f976d3c0830cde183b343236bcd7bb Mon Sep 17 00:00:00 2001 From: Z J Wegert <60646897+zjwegert@users.noreply.github.com> Date: Sun, 24 Nov 2024 06:55:51 +1000 Subject: [PATCH 3/3] bump version --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 02b0c018..8f0bf9cc 100755 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "GridapTopOpt" uuid = "27dd0110-1916-4fd6-8b4b-1bc109db1170" authors = ["Zach Wegert ", "JordiManyer "] -version = "0.1.1" +version = "0.1.2" [deps] BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"