I tried many ways to parallelize the "while loop" dependent data algorithm but it seem no solution. The algorithm data flow is look like this:
while ( u <= u_end)
{
task_1 ( u, x, y, z );
task_2 ( x, y, z, a, b, c );
task_3 ( a, b, c, u_next );
task_4 ( u_next, d, e, f );
task_5 ( d, e, f, j, k, l);
}
task_1, task_2 and task_3 are running first using 1st processor using the first value of u. When it arrive at task_4 which is the next calculation of the value u, task_4 and task_5 are running by 1st processor while at the same time algorithm is going back to task_1, task_2 and task_3 which are running by using 2nd processor.
Hope anyone can help me with this matter. Thank you
