Comments (7)
I think SnowParam should be a generic, SnowParam(cl) creating a SnowParam appropriate populated.
from biocparallel.
What about starting/stopping such a SnowParam object? If SnowParam is handed an already-running cluster, it can't know how to restart it. And also, stopping such a cluster would have external effects, since that cluster might be used elsewhere. Should we have a subclass that makes bpstart/bpstop into no-ops?
from biocparallel.
The analogy is with file connections, where if you're given an open connection then you return an open collection, otherwise you're free to do with it what you will.
if (!bpisup(param)) {
param = bpstart(param)
on.exit(bpstop(param))
}
## else do nothing
from biocparallel.
Yes, but I'm saying that if a SnowParam is created with an already-running cluster, stopping that cluster via bpstop should not be allowed at all. Maybe BiocParallel functions will handle it correctly by never trying to call bpstop unless the cluster was initially stopped, but the user could still call bpstop manually on the SnowParam object, in which case it should do nothing, perhaps with a warning. Because otherwise you could stop a cluster that might still be in use elsewhere.
Or, to put things more simply, bpstop should only work on a cluster if that cluster was started via bpstart.
from biocparallel.
I understand and wouldn't object to a flag that says 'don't stop me' but we are starting to second guess the user, making work for us and putting obstacles up for them.
from biocparallel.
I guess I'm working from the principle that any operation on a BiocParallel object should not have effects outside of BiocParallel. So if the cluster was created externally and passed to SnowParam, then SnowParam should not modify it, but only use it.
from biocparallel.
OK I added a .controlled
field to BiocParallelParam and check that it is TRUE in bpstart / bpstop on SnowParam; this is meant for internal, read-only use. I also added a coerce method so as(cl, "SnowParam")
creates a SnowParam instance from a previously established SOCKcluster, setting .controlled=FALSE
.
from biocparallel.
Related Issues (20)
- Error in serialize(data, node$con, xdr = FALSE) : ignoring SIGPIPE signal HOT 5
- Performance (speed) degradation in MulticoreParam with default force.G = TRUE HOT 3
- Nested parallellization question HOT 6
- stop.on.error = FALSE for DoParam doesn't work as expected HOT 2
- Troubles with bplapply within function (using SnowParam on Windows) HOT 6
- MulticoreParam bplapply unable to restart upon interrupt HOT 1
- Increase depth of traceback beyond `tryCatch()` for bp* functions - possible enhancement HOT 1
- The running time isn't reduced when using bplapply()? HOT 3
- BiocParallel errors HOT 4
- Handle worker abort better HOT 1
- move Rmpi to Enhances: HOT 1
- "foreach" %in% loadedNamespaces() instead of "package:foreach" %in% search()? HOT 1
- BiocParallel errors:could not find function ".OLD_read_block" HOT 11
- I meet a error when I use BiocParallel HOT 6
- BiocParallel : long vectors are not supported in .C() HOT 5
- BiocParallel for parallelization in BEER: Error and GPU Compatibility HOT 8
- BatchtoolsParam fails to propagate errors in bpiterate HOT 2
- Extremely minor: typo in docs? man/MulticoreParam-class.Rd HOT 1
- BiocParallel socketConnection error HOT 5
- strategy of tasks in MulticoreParam HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from biocparallel.