Dear All,

I have a large array like this 1:1000, but I would like to process 5  of
them at a time because I have only 5 processors.

I am trying

L = 1:1000
stride = 5

function dowork(i)
    if i < 1000:
        sleep(5)
    else
        break
    end

i = 1
@sync @parallel for i in  i:i+stride
      dowork(i)
     i += 1
end

does not  work!


Regards
Krishna

Reply via email to