Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

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

Aperta
#231 6 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
r
Ambito
hpc

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
R
Stelle
69
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Bioconductor/BiocParallel

Tutte le issue di Bioconductor/BiocParallel

Issue simili

Altre issue su R

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.