Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid segmentation faults in threaded code when using Intel MPI #742

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
8 changes: 8 additions & 0 deletions docs/src/knownissues.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ ENV["UCX_ERROR_SIGNALS"] = "SIGILL,SIGBUS,SIGFPE"
```
at `__init__`. If set externally, it should be modified to exclude `SIGSEGV` from the list.

Similarly, Intel MPI would error if the above signal is raised ([#725](https://github.com/JuliaParallel/MPI.jl/issues/725)), resulting in a segmentation fault error like
```
[6950] signal (11.-6): Segmentation fault
in expression starting at /home/runner/work/MPI.jl/MPI.jl/test/test_threads.jl:18
ijl_gc_enable at /cache/build/default-amdci4-6/julialang/julia-release-1-dot-9/src/gc.c:3222
```
MPI.jl works around this problem by setting the environment variable `IPATH_NO_BACKTRACE` to `1`, unless already defined.

## CUDA-aware MPI

### Memory pool
Expand Down
4 changes: 4 additions & 0 deletions src/MPI.jl
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,10 @@ function __init__()
# default is "SIGILL,SIGSEGV,SIGBUS,SIGFPE"
ENV["UCX_ERROR_SIGNALS"] = "SIGILL,SIGBUS,SIGFPE"
end
# Similar problem with Intel MPI (issue #725).
if !haskey(ENV, "IPATH_NO_BACKTRACE")
ENV["IPATH_NO_BACKTRACE"] = "1"
end

if MPIPreferences.binary == "MPItrampoline_jll" && !haskey(ENV, "MPITRAMPOLINE_MPIEXEC")
ENV["MPITRAMPOLINE_MPIEXEC"] = API.MPItrampoline_jll.mpich_mpiexec_path
Expand Down