Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#231 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
r
領域
hpc

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
R
スター
69
フォーク
32
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Bioconductor/BiocParallel のほかの issue

Bioconductor/BiocParallel の issue をすべて見る

似ている issue

R の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。