Interference with Distributed.jl on Windows

Đang mở
#205 23 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
julia
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Bắt đầu với bản tái hiện Windows được cung cấp bằng cách sử dụng Distributed.addprocs, Pkg.activate và @everywhere import ReverseDiff, sau đó so sánh với Ubuntu và macOS. Kiểm tra nhật ký lỗi GitHub Actions được liên kết để tìm lỗi đầu tiên và xác định liệu việc import ReverseDiff có gây ra lỗi đó hay không; hoàn thành khi thiết lập worker và các bài kiểm thử Windows bị ảnh hưởng đều vượt qua mà không làm hỏng các nền tảng khác.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Following some detective work with the help of @rikhuijzer and @ChrisRackauckas on https://discourse.julialang.org/t/github-action-mysteriously-starts-breaking-on-windows/86048, it seems as though ReverseDiff.jl is interfering with Distributed.jl and causing some issues.

When I import ReverseDiff.jl into SymbolicRegression.jl (either directly, or if it is imported in a dependency of a dependency) the unit tests on Windows break. These unit tests use Distributed.jl to dynamically allocate worker processes. No other operating systems are affected.

This bug can reproduced with the following code, which dynamically allocates some worker processes, activates the current environment on each, and then imports ReverseDiff.jl on each.

using Pkg
using Distributed
import ReverseDiff
procs = addprocs(4)

# Activate env on workers:
project_path = splitdir(Pkg.project().path)[1]
@everywhere procs begin
    Base.MainInclude.eval(
        quote
            using Pkg
            Pkg.activate($$project_path)
        end,
    )
end

# Import package on workers:
@everywhere procs begin
    Base.MainInclude.eval(import ReverseDiff)
end

This code will work on Ubuntu and macOS, and works for every other package I've tested it on (all the dependencies of SymbolicRegression.jl are loaded this way). It is just the combination of Windows + ReverseDiff.jl that produce an error for some weird reason. You can see the error log here: https://github.com/MilesCranmer/SymbolicRegression.jl/runs/7943853737?check_suite_focus=true#step:6:232.

I really have no idea what could be causing this. Any clue? Does ReverseDiff.jl change any core functions in any way that would impact this?

Thanks!
Miles

Ngôn ngữ chính
Julia
Star
397
Fork
62
Merge trung bình
8 giờ 9 phút
Pull request đã merge (30 ngày)
4

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaDiff/ReverseDiff.jl

Tất cả issue của JuliaDiff/ReverseDiff.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.