Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Different resources for individual jobs #57

Open
MalgorzataOles opened this issue Oct 29, 2014 · 8 comments
Open

Different resources for individual jobs #57

MalgorzataOles opened this issue Oct 29, 2014 · 8 comments
Assignees

Comments

@MalgorzataOles
Copy link

Dear BatchJobs Developers,
the jobs I am submitting require different memory size, therefore it is inefficient for me to submit them at once with the current version of the 'submitJobs' function. I would really appreciate if there was an opportunity to change the elements of the 'resources' list to vectors.
I would find it very useful.
Best wishes,
Gosia

@berndbischl
Copy link
Contributor

Hi, yeah I know.
I had the same issue, I wrote a small wrapper around submitJobs to do this.
But I agree, we could offer that out of the box.

Can you write down how your preferred call would look like?

@MalgorzataOles
Copy link
Author

The example call to the function would be:
submitJobs(reg, ids=c(1:4), resources=list(ncpus=c(2,4), memory=seq(10000,4000,-2000), queue="research-rh6"))
This submits 4 jobs with different memory and number of cpus requirements. Please note that vectors (here ncpus) are recycled in a regular R's fashion.

@berndbischl
Copy link
Contributor

This does not really work. Because we cannot really assume further structure on the "resources" list, as this is completely cluster dependent.

The only option would be have a reources list with as many elements as "ids".
Which begins to look bit clumsy?

@berndbischl
Copy link
Contributor

I might allow this:

resources can be a data.frame alternatively. nrows = length(ids).
If you do that, every row will be converted to a list and set as the actual resources of the job it corresponds to.

Would that be ok?

@berndbischl
Copy link
Contributor

I also want the opinion of @mllg here

@mllg
Copy link
Member

mllg commented Nov 18, 2014

Are you sure you have a problem where every job requires a different amount of memory? Or do you have a few "classes"? We could go with a list, as Bernd suggested.

@berndbischl
Copy link
Contributor

I will implement the data.frame option now. This seems most flexible and simple

@MalgorzataOles
Copy link
Author

Thank you. data.frame with specified options per job will be great!
So far I was indeed dividing jobs into classes depending on the amount of memory they were using. However, I have a function that calculates this memory requirement for every job separately and this is unique for each of them. That is why having the data.frame with parameters would be very appreciated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants