Parallel Computing with Threads.@threads in HPC is slow?

Hello!

Welcome to the forum :blush:

Perhaps you could post a more detailed example following the guide here Please read: make it easier to help you ?

Looking at your code I am guessing that one reason could be that your problem is so small, that it is not gaining the full advantage of 256 threads due to communcation overhead, perhaps you are not re-using memory correctly, so each iteration is allocating a lot, slowing down the code and perhaps the way you index into FE.edofMat[e,:] is not efficient and you should use a @view.

1 Like