I want to schedule 10 instances of a GPU-heavy script, using 10 different input parameters:
task1 = createTask(job1, @myscript, 0, {{1}, {2}, ... {10}})
I only have one GPU device and each script occupies it whole, therefore I would like the tasks to be executed one by one. How can I do this? An ugly workaround that I use now is to set parpool size to 1 and have 10 different jobs with one task each.
A second question, is that if I run my GPU script from Matlab's command line, it executes correctly, but if I launch it as a job using parallel pool, I get an error:
An unexpected error occurred during CUDA execution. The CUDA error was:
all CUDA-capable devices are busy or unavailable
