Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
79 changes: 40 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,75 +18,76 @@ on:
- 'NEWS.md'
workflow_dispatch: # Allow manual triggering of the workflow from the Actions tab

# Cancel redundant CI runs: always for PRs, never for pushes to master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}

jobs:
SequentialTests:
name: Serial Tests - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
prime-cache:
name: Prime cache - ${{ matrix.version }} - ubuntu-latest - x64
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
version: ['lts', '1']
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
arch: x64
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- run: julia --project=. -e 'using Pkg; Pkg.instantiate()'
- run: julia --project=. --color=yes --check-bounds=yes test/sequential/runtests.jl
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: sequential
MPITests:
name: MPI Tests - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}

test:
needs: [prime-cache]
name: ${{ matrix.testcase }} - ${{ matrix.version }} - ubuntu-latest - x64 - ${{ github.event_name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- '1.10'
os:
- ubuntu-latest
arch:
- x64
- 'lts'
- '1'
testcase:
- seq-geometry
- seq-fespaces
- seq-physics
- seq-transient
- seq-adaptivity
- seq-misc
- mpi-geometry
- mpi-fespaces
- mpi-physics
- mpi-transient
- mpi-adaptivity
- mpi-misc
steps:
- uses: actions/checkout@v6
- uses: julia-actions/cache@v2
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- run: |
julia --project=test/TestApp/ -e '
using Pkg
Pkg.develop(PackageSpec(path=pwd()))
Pkg.instantiate()'
- run: cd test/TestApp/compile; ./compile.sh
- run: julia --project=test/TestApp/ --color=yes --check-bounds=yes test/mpi/runtests.jl test/TestApp/compile/TestApp.so
arch: x64
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
env:
TESTCASE: ${{ matrix.testcase }}
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v5
with:
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: mpi
flags: ${{ matrix.testcase }}

docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: julia-actions/setup-julia@v2
with:
version: '1.10'
version: '1'
- run: |
julia --project=docs -e '
using Pkg
Expand All @@ -95,4 +96,4 @@ jobs:
- run: julia --project=docs docs/make.jl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
2 changes: 1 addition & 1 deletion test/CellDataTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function main(distribute,parts)
pvd[0.1] = createvtk(Ω,joinpath(output,"Ω_1"),cellfields=["f"=>f])
pvd[0.2] = createvtk(Ω,joinpath(output,"Ω_2"),cellfields=["f"=>f])
end
@test isfile(joinpath(output,"Ω_pvd")*".pvd")
i_am_main(ranks) && @test isfile(joinpath(output,"Ω_pvd")*".pvd")

x_Γ = get_cell_points(Γ)
@test isa(f(x_Γ),AbstractArray)
Expand Down
1 change: 0 additions & 1 deletion test/TestApp/.gitignore

This file was deleted.

16 changes: 0 additions & 16 deletions test/TestApp/Project.toml

This file was deleted.

34 changes: 0 additions & 34 deletions test/TestApp/compile/compile.jl

This file was deleted.

7 changes: 0 additions & 7 deletions test/TestApp/compile/compile.sh

This file was deleted.

26 changes: 0 additions & 26 deletions test/TestApp/src/TestApp.jl

This file was deleted.

26 changes: 9 additions & 17 deletions test/mpi/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,22 @@ module MPITests
using MPI
using Test

#Sysimage
sysimage=nothing
if length(ARGS)==1
@assert isfile(ARGS[1]) "$(ARGS[1]) must be a valid Julia sysimage file"
sysimage=ARGS[1]
end
mpidir = @__DIR__
testdir = joinpath(mpidir, "..")
repodir = joinpath(testdir, "..")

mpidir = @__DIR__
testdir = joinpath(mpidir,"..")
repodir = joinpath(testdir,"TestApp")
function run_driver(procs,file,sysimage)
function run_driver(procs, file)
mpiexec() do cmd
if sysimage!=nothing
extra_args="-J$(sysimage)"
run(`$cmd -n $procs $(Base.julia_cmd()) $(extra_args) --project=$repodir $(joinpath(mpidir,file))`)
if MPI.MPI_LIBRARY == "OpenMPI" || (isdefined(MPI, :OpenMPI) && MPI.MPI_LIBRARY == MPI.OpenMPI)
run(`$cmd -n $procs --oversubscribe $(Base.julia_cmd()) --code-coverage=user --project=$repodir $(joinpath(mpidir, file))`)
else
run(`$cmd -n $procs $(Base.julia_cmd()) --project=$repodir $(joinpath(mpidir,file))`)
run(`$cmd -n $procs $(Base.julia_cmd()) --code-coverage=user --project=$repodir $(joinpath(mpidir, file))`)
end
@test true
end
end

run_driver(4,"runtests_np4.jl",sysimage)
run_driver(1,"runtests_np4.jl",sysimage) # Check that the degenerated case works

run_driver(4, "runtests_np4.jl")
run_driver(1, "runtests_np4.jl") # Check that the degenerated case works

end # module
40 changes: 33 additions & 7 deletions test/mpi/runtests_np4.jl
Original file line number Diff line number Diff line change
@@ -1,27 +1,53 @@
module NP4
# All test running on 4 procs here

using TestApp
using GridapDistributed
using PartitionedArrays
const PArrays = PartitionedArrays
using MPI

if ! MPI.Initialized()
if !MPI.Initialized()
MPI.Init()
end

include("../CellDataTests.jl")
include("../FESpacesTests.jl")
include("../GeometryTests.jl")
include("../MultiFieldTests.jl")
include("../PLaplacianTests.jl")
include("../PoissonTests.jl")
include("../PeriodicBCsTests.jl")
include("../SurfaceCouplingTests.jl")
include("../TransientDistributedCellFieldTests.jl")
include("../TransientMultiFieldDistributedCellFieldTests.jl")
include("../ZeroMeanFESpacesTests.jl")
include("../HeatEquationTests.jl")
include("../StokesOpenBoundaryTests.jl")
include("../StokesHdivDGTests.jl")
include("../AdaptivityTests.jl")
include("../AdaptivityCartesianTests.jl")
include("../AdaptivityUnstructuredTests.jl")
include("../AdaptivityMultiFieldTests.jl")
include("../PolytopalCoarseningTests.jl")
include("../BlockSparseMatrixAssemblersTests.jl")
include("../BlockPartitionedArraysTests.jl")
include("../VisualizationTests.jl")
include("../AutodiffTests.jl")
include("../ConstantFESpacesTests.jl")
include("../MacroDiscreteModelsTests.jl")

include("runtests_np4_body.jl")

if MPI.Comm_size(MPI.COMM_WORLD) == 4
with_mpi() do distribute
all_tests(distribute,(2,2))
with_mpi() do distribute
all_tests(distribute, (2,2))
end
elseif MPI.Comm_size(MPI.COMM_WORLD) == 1
with_mpi() do distribute
all_tests(distribute,(1,1))
with_mpi() do distribute
all_tests(distribute, (1,1))
end
else
MPI.Abort(MPI.COMM_WORLD,0)
MPI.Abort(MPI.COMM_WORLD, 0)
end

end #module
Loading
Loading