Skip to content

Commit eab5212

Browse files
committed
Fixed MPI tests that were missed in #226
1 parent 1645ea3 commit eab5212

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/auxiliary/test_mpi.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ end
3535
job = Job(body, ts; path, freq=10)
3636
submit(job)
3737
"""
38-
cmd = `$(Peridynamics.MPI.mpiexec()) -n 2 $(Base.julia_cmd()) --project -e $(mpi_cmd)`
38+
mpiexec = Peridynamics.MPI.mpiexec()
39+
jlcmd = Base.julia_cmd()
40+
pdir = normpath(joinpath(@__DIR__, "..", ".."))
41+
cmd = `$(mpiexec) -n 2 $(jlcmd) --project=$(pdir) -e $(mpi_cmd)`
3942
@test success(cmd) # does not print anything
4043
# for debugging use the run command:
4144
# run(cmd)

test/auxiliary/test_process_each_export.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@
7272
return nothing
7373
end
7474
"""
75-
run(`$(Peridynamics.MPI.mpiexec()) -n 3 $(Base.julia_cmd()) --project -e $(mpi_cmd)`)
75+
mpiexec = Peridynamics.MPI.mpiexec()
76+
jlcmd = Base.julia_cmd()
77+
pdir = normpath(joinpath(@__DIR__, "..", ".."))
78+
run(`$(mpiexec) -n 2 $(jlcmd) --project=$(pdir) -e $(mpi_cmd)`)
7679
file_1_mpi = joinpath(root_post_mpi, "max_displacement_1.txt")
7780
@test isfile(file_1_mpi)
7881
@test contains(read(file_1_mpi, String), "maximum displacement x: 0.0")

0 commit comments

Comments
 (0)