mllg / batchtools

Tools for computation on batch systems
https://mllg.github.io/batchtools/
GNU Lesser General Public License v3.0
172 stars 51 forks source link

submitJobs(id = NULL) submits all #119

Closed HeidiSeibold closed 7 years ago

HeidiSeibold commented 7 years ago
> bla <- NULL
> submitJobs(ids = bla)
Submitting 51846 jobs in 51846 chunks using cluster functions 'Multicore' ...`

Maybe not the most intuituve behaviour :)

berndbischl commented 7 years ago

but well-documented behavior.....

berndbischl commented 7 years ago

NULL is the default, which implieds ids = findNotSubmitted

HeidiSeibold commented 7 years ago

You're right. I just had a typo somewhere and this lead to me submitting all jobs, so I thought this may frustrate people.

You can just ignore it if you want and close :monkey:

berndbischl commented 7 years ago

changing the defaults is always a bit bad lets wait what michel says

another option would be not submit nothing on NULL, thats more conservative (but changes behavior)

HenrikBengtsson commented 7 years ago

I think it's fairly common to have NULL be the place holder to pass whenever you want to get the default behavior. Also, the empty set can be represented by integer(0), i.e. it's important not to test for length(ids) == 0 but is.null(ids) when inferring the default. My $.02

berndbischl commented 7 years ago

I think it's fairly common to have NULL be the place holder to pass whenever you want to get the default behavior.

Thats the default in all of my projects now (because "missing()" in R is somewhat broken and bad)

mllg commented 7 years ago

I'll stick to NULL as default, missing is not working reliably. integer(0) and a zero-row data.frame can be used to express "no ids".