Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

WISH: Support also SnowParam(type = "PSOCK")

Đang mở
#231 6 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ó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
65/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
r
Lĩnh vực
hpc

Hướng nghiên cứu

Start at the SnowParam() entry point and trace how its type argument is passed to parallel::makeCluster(). Compare the existing SOCK, MPI, and FORK handling with the PSOCK option, then run the relevant SnowParam tests if available. Done means type = "PSOCK" is accepted and uses the intended parallel cluster behavior without breaking existing types.

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

Mô tả

Background

SnowParam() supports type = "SOCK" (default), type = "MPI", and type = "FORK". The former two stems from the days of snow package and the latter was introduced with the parallel package. The type argument is passed to parallel::makeCluster() as-is;

> parallel::makeCluster
function (spec, type = getClusterOption("type"), ...) 
{
    switch(type, PSOCK = makePSOCKcluster(names = spec, ...), 
        FORK = makeForkCluster(nnodes = spec, ...), SOCK = snow::makeSOCKcluster(names = spec, 
            ...), MPI = snow::makeMPIcluster(count = spec, ...), 
        stop("unknown cluster type"))
}
<environment: namespace:parallel>

Wish

Please add support also for type = "PSOCK", which is the default for parallel::makeCluster() [since day one back in 2014, I think]. It looks like it would be quite straightforward to do this.

Why add this? Because, PSOCK clusters have undergone lots of improvements since snow was incorporated into parallel. For example, in R (>= 4.0.0), the nodes ("workers") of PSOCK cluster is set up in parallel, instead of sequentially. This makes the setup much faster, e,g.

image

Source: https://www.jottr.org/2021/06/10/parallelly-1.26.0/

In addition, this parallel setup strategy avoids port clashes that we saw in parallel (< 4.0.0), and still in snow (since it's deprecated and not improved on), e.g.

  Error in `socketConnection(port = port, server = TRUE, blocking = TRUE, 
      open = "a+b")`: cannot open the connection

FYI, I haven't seen those type of errors since R (< 4.0.0), except from revdep checking packages relying on snow. More recently while revdep checking Bioconductor package DMCFB that uses SnowParam in it's package tests.

Ngôn ngữ chính
R
Star
69
Fork
32
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

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 Bioconductor/BiocParallel

Tất cả issue của Bioconductor/BiocParallel

Issue tương tự

Thêm issue về R

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.