Groups 34 of 99+ julia-users › parallel for loop for list of vectors 6 posts by 2 authors Dupont Aug 3 Dear Users, I need a small hint to perform the following parallel for loop. I know that this work: res = @parallel (hcat) for i=1:10 zeros(2) endEnter code here... but what I need is res = @parallel (hcat) for i=1:10 zeros(i) end Thank you for your help Best regards, Andre Bieler Aug 4 this does not work as serial code either. the hcat needs vectors of same length. Andre Bieler Aug 4 Do you want something like this in the end? res = [zeros(i) for i in 1:10] Dupont Aug 4 Yes ! res = [zeros(i) for i in 1:10] would do for me. Also, if it simplifies things, the order does not matter. Andre Bieler Aug 4 you can do: res = pmap(zeros, 1:10) but probably you want to replace "zeros" with a more expensive function to take advantage of the parallelism. Andre Bieler Aug 4 pmap(zeros, 1:10)