@@ -73,39 +73,43 @@ istest(f) = endswith(f, ".jl") && startswith(f, "test_") && !in(f, excludefiles)
73
73
testfiles = sort (filter (istest, readdir (testdir)))
74
74
75
75
@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
+ if MPI. MPI_LIBRARY == " IntelMPI" && MPI. MPI_LIBRARY_VERSION < v " 2020"
82
+ # Legacy Intel MPI (before 2020) crashes threads tests:
83
+ # <https://github.com/JuliaParallel/MPI.jl/issues/725>.
84
+ @test_broken false
85
+ else
82
86
withenv (" JULIA_NUM_THREADS" => " 4" ) do
83
87
run (cmd ())
84
88
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
89
+ end
90
+ elseif f == " test_error.jl"
91
+ r = run (ignorestatus (cmd ()))
92
+ @test ! success (r)
93
+ elseif f == " test_errorhandler.jl" && MPI. MPI_LIBRARY in (" unknown" , " FujitsuMPI" )
94
+ # Fujitsu MPI is known to not work with custom error handlers. Also
95
+ # unknown implementations may fail for the same reason.
96
+ try
107
97
run (cmd ())
98
+ catch e
99
+ @error """
100
+ $(f) tests failed. This may due to the fact this implementation of MPI doesn't support custom error handlers.
101
+ See the full error message for more details. Some messages may have been written above.
102
+ """ exception= (e, catch_backtrace ())
103
+ @test_broken false
104
+ end
105
+ else
106
+ # MPI_Reduce with MPICH 3.4.2 on macOS when root != 0 and
107
+ # when recvbuf == C_NULL segfaults
108
+ # <https://github.com/pmodels/mpich/issues/5700>
109
+ if get (ENV , " JULIA_MPI_TEST_DISABLE_REDUCE_ON_APPLE" , " " ) != " " && Sys. isapple () && f == " test_reduce.jl"
110
+ return
108
111
end
109
- @test true
112
+ run ( cmd ())
110
113
end
114
+ @test true
111
115
end
0 commit comments