@@ -73,39 +73,44 @@ istest(f) = endswith(f, ".jl") && startswith(f, "test_") && !in(f, excludefiles)
7373testfiles = sort (filter (istest, readdir (testdir)))
7474
7575@testset " $f " for f in testfiles
76- mpiexec () do mpirun
77- cmd (n= nprocs) = ` $mpirun -n $n $(Base. julia_cmd ()) --startup-file=no $(joinpath (testdir, f)) `
78- if f == " test_spawn.jl"
79- # Some command as the others, but always use a single process
80- run (cmd (1 ))
81- elseif f == " test_threads.jl"
76+ cmd (n= nprocs) = ` $(mpiexec ()) -n $n $(Base. julia_cmd ()) --startup-file=no $(joinpath (testdir, f)) `
77+ if f == " test_spawn.jl"
78+ # Some command as the others, but always use a single process
79+ run (cmd (1 ))
80+ elseif f == " test_threads.jl"
81+ # Legacy Intel MPI (before 2020) crashes threads tests:
82+ # <https://github.com/JuliaParallel/MPI.jl/issues/725>. These tests fail also on
83+ # 32-bit Windows: <https://github.com/JuliaParallel/MPI.jl/issues/711>.
84+ if (MPI. MPI_LIBRARY == " IntelMPI" && MPI. MPI_LIBRARY_VERSION < v " 2020" ) || (Sys. iswindows () && Sys. WORD_SIZE == 32 )
85+ @test_broken false
86+ else
8287 withenv (" JULIA_NUM_THREADS" => " 4" ) do
8388 run (cmd ())
8489 end
85- elseif f == " test_error.jl"
86- r = run (ignorestatus (cmd ()))
87- @test ! success (r)
88- elseif f == " test_errorhandler.jl" && MPI. MPI_LIBRARY in (" unknown" , " FujitsuMPI" )
89- # Fujitsu MPI is known to not work with custom error handlers. Also
90- # unknown implementations may fail for the same reason.
91- try
92- run (cmd ())
93- catch e
94- @error """
95- $(f) tests failed. This may due to the fact this implementation of MPI doesn't support custom error handlers.
96- See the full error message for more details. Some messages may have been written above.
97- """ exception= (e, catch_backtrace ())
98- @test_broken false
99- end
100- else
101- # MPI_Reduce with MPICH 3.4.2 on macOS when root != 0 and
102- # when recvbuf == C_NULL segfaults
103- # <https://github.com/pmodels/mpich/issues/5700>
104- if get (ENV , " JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE" , " " ) != " " && Sys. isapple () && f == " test_reduce.jl"
105- return
106- end
90+ end
91+ elseif f == " test_error.jl"
92+ r = run (ignorestatus (cmd ()))
93+ @test ! success (r)
94+ elseif f == " test_errorhandler.jl" && MPI. MPI_LIBRARY in (" unknown" , " FujitsuMPI" )
95+ # Fujitsu MPI is known to not work with custom error handlers. Also
96+ # unknown implementations may fail for the same reason.
97+ try
10798 run (cmd ())
99+ catch e
100+ @error """
101+ $(f) tests failed. This may due to the fact this implementation of MPI doesn't support custom error handlers.
102+ See the full error message for more details. Some messages may have been written above.
103+ """ exception= (e, catch_backtrace ())
104+ @test_broken false
105+ end
106+ else
107+ # MPI_Reduce with MPICH 3.4.2 on macOS when root != 0 and
108+ # when recvbuf == C_NULL segfaults
109+ # <https://github.com/pmodels/mpich/issues/5700>
110+ if get (ENV , " JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE" , " " ) != " " && Sys. isapple () && f == " test_reduce.jl"
111+ return
108112 end
109- @test true
113+ run ( cmd ())
110114 end
115+ @test true
111116end
0 commit comments