Friday, October 9, 2009

Thoughts on ReLooper: Refactoring for Loop Parallelism

Like the Concurrencer paper that I've posted a review on this week, this paper also presents a semi-automatic tool in Eclipse for refactoring Java program. It has a similar approach and philosophy as the Concurrencer paper. Just like the previous paper, it thinks the programmer knows that best and should make the ultimate call. It also has the same flow as the last paper which provides analysis on the underlying refactoring, presents a tool to retrofit parallelism into sequential Java programs semi-automatically, and gives empirical data to prove its accuracy and usefulness. In this paper it takes advantage of Java's ParalleArray framework and provides a tool, Relooper, that refactors loops on arrays and vectors acting on each element per iteration into parallel loops.

The tool should be a nice addition to the Eclipse refactoring toolkit. Looking at the results, it provides relatively few false positives except in one case. The authors have manually verified that there are no false negatives. Having no false negatives should be one of the most important characteristic this tool out to have to be really useful. Unfortunately it seems there is not a good way to test this thoroughly except by manual verification of the results after running Relooper on test programs.

The paper also outlines the characteristics of a loop that can be made parallel. It is a good idea to note down these so we can make sure our future programs can easily be parallel. What I gathered from this paper is that a loop should have these three characteristics:
1. A loop traverses all elements of an array.
2. No loop-carried dependencies.
3. Memory update in loop iterations are not conflicting.

No comments:

Post a Comment