Skip to content

Commit

Permalink
Fixed tests for artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
JordiManyer committed May 9, 2024
1 parent b27a8dc commit 44e500d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
*.jl.mem
.DS_Store
/Manifest.toml
/LocalPreferences.toml
/deps/build.log
/deps/deps.jl
/dev/
/docs/build/
/docs/site/
/gen/Manifest.toml

/gen/LocalPreferences.toml
3 changes: 3 additions & 0 deletions test/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*.vtu
*.pvtu
*.visit
2 changes: 1 addition & 1 deletion test/example_1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const search_point_fn_c = @cfunction(search_point_fn, Cint, (Ptr{p4est_t}, p4est
# Main program
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD

# Create a connectivity structure for the unit square.
unitsquare_connectivity = p4est_connectivity_new_unitsquare()
Expand Down
2 changes: 1 addition & 1 deletion test/example_2.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const my_refine_c = @cfunction(my_refine, Cint, (Ptr{p4est_t}, p4est_topidx_t, P
# Main program
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD

# Create a connectivity structure for the unit square.
unitsquare_connectivity = p4est_connectivity_new_unitsquare()
Expand Down
2 changes: 1 addition & 1 deletion test/example_3.jl
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ end
# Main program
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD
sc_init(mpicomm, Cint(true), Cint(true), C_NULL, P4est_wrapper.SC_LP_DEFAULT)
p4est_init(C_NULL, P4est_wrapper.SC_LP_DEFAULT)

Expand Down
2 changes: 1 addition & 1 deletion test/example_lnodes_2d+1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ end
# # Main program
# #############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD
sc_init(mpicomm, Cint(true), Cint(true), C_NULL, P4est_wrapper.SC_LP_VERBOSE)
p4est_init(C_NULL, P4est_wrapper.SC_LP_VERBOSE)

Expand Down
2 changes: 1 addition & 1 deletion test/example_lnodes_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ end
# Main program
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD
sc_init(mpicomm, Cint(true), Cint(true), C_NULL, P4est_wrapper.SC_LP_DEFAULT)
p4est_init(C_NULL, P4est_wrapper.SC_LP_DEFAULT)

Expand Down
2 changes: 1 addition & 1 deletion test/example_lnodes_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ end
# Main program
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD
sc_init(mpicomm, Cint(true), Cint(true), C_NULL, P4est_wrapper.SC_LP_DEFAULT)
p4est_init(C_NULL, P4est_wrapper.SC_LP_DEFAULT)

Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using Test
# Skip tests if library was not properly loaded
if P4est_wrapper.P4EST_FOUND
repodir = normpath(joinpath(@__DIR__,".."))
nprocs = min(Sys.CPU_THREADS, 2)
nprocs = P4est_wrapper.P4EST_ENABLE_MPI ? min(Sys.CPU_THREADS, 2) : 1
dir = dirname(@__FILE__)
julia = Base.julia_cmd()
mpiexec = MPI.mpiexec()
Expand All @@ -16,7 +16,7 @@ if P4est_wrapper.P4EST_FOUND
extra_args = ``
end
@testset "Test SC bindings" begin
cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "test_sc_bindings.jl"))`
cmd = `$mpiexec -n $nprocs $(extra_args) $(julia) --project=$repodir $(joinpath(dir, "test_sc_bindings.jl"))`
@show cmd
run(cmd)
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_p4est_bindings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ end
# Definition of data structures and function callbacks
#############################################################################

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD

# Dummy callback
dummy_callback( ::Ptr{p4est_t}, which_tree::p4est_topidx_t, quadrant::Ptr{p4est_quadrant_t}) = Cint(0)
Expand Down
2 changes: 1 addition & 1 deletion test/test_p8est_bindings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ end
#############################################################################
# Definition of data structures and function callbacks
#############################################################################
mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD

# Dummy callback
dummy_callback( ::Ptr{p8est_t}, which_tree::p4est_topidx_t, quadrant::Ptr{p8est_quadrant_t}) = Cint(0)
Expand Down
2 changes: 1 addition & 1 deletion test/test_sc_bindings.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if !MPI.Initialized()
MPI.Init()
end

mpicomm = P4est_wrapper.P4EST_ENABLE_MPI ? MPI.COMM_WORLD : Cint(0)
mpicomm = MPI.COMM_WORLD

# SC library initialization
sc_init(mpicomm, Cint(true), Cint(true), C_NULL, P4est_wrapper.SC_LP_DEFAULT)
Expand Down

0 comments on commit 44e500d

Please sign in to comment.