paralign: with openmp peter reetz. overview n simple algorithm for finding un-gapped alignments n 4...
TRANSCRIPT
ParAlign: with OpenMPParAlign: with OpenMP
Peter ReetzPeter Reetz
OverviewOverview
Simple algorithm for finding un-Simple algorithm for finding un-gapped alignmentsgapped alignments
4 to 5 times faster than Smith-4 to 5 times faster than Smith-Waterman algorithm & almost as Waterman algorithm & almost as sensitivesensitive
Easy to see the data parallelismEasy to see the data parallelism OpenMP is an obvious choiceOpenMP is an obvious choice
DesignDesign parAlign( int sub[], int sLen, int que[], int qLen )parAlign( int sub[], int sLen, int que[], int qLen )
Calculation along diagonals is based Calculation along diagonals is based on previous (row-1, col-1) value and on previous (row-1, col-1) value and the substitution matrixthe substitution matrix
Splitting up the diagonals across the Splitting up the diagonals across the processor elements = load balancingprocessor elements = load balancing
Shared memory: Substitution Matrix, Shared memory: Substitution Matrix, Protein sequencesProtein sequences
……DesignDesign
Starting position of diagonals are Starting position of diagonals are based on the index that each based on the index that each thread is working onthread is working on
Parallelizing the final loop to get Parallelizing the final loop to get the result had no affectthe result had no affect
SpeedupSpeedup
0
0.5
1
1.5
2
2.5
3
1 2 3 4
Processor Elements
Spee
dup
20K50K100K1000K
……SpeedupSpeedup
Only able to test with 4 PEOnly able to test with 4 PE After initial speedup, each After initial speedup, each
successive PE had only a small successive PE had only a small impactimpact
1000x1000 is pushing it for protein 1000x1000 is pushing it for protein sequences!sequences!
Pause… for reflectionPause… for reflection
Lesson I have still NOT learned:Lesson I have still NOT learned:– waiting until the last minute to waiting until the last minute to
complete a projectcomplete a project Lesson I HAVE learned:Lesson I HAVE learned:
– don’t be too ambitious and get into don’t be too ambitious and get into something I won’t be able to finish something I won’t be able to finish
– I probably could have done more with I probably could have done more with thisthis
New LessonsNew Lessons
Look at documentation FIRST when Look at documentation FIRST when a problem comes up - especially a problem comes up - especially when doing reduction in OpenMPwhen doing reduction in OpenMP
Pay close attention to what I am Pay close attention to what I am learning the first time aroundlearning the first time around
Always initialize variables in Always initialize variables in OpenMPOpenMP
If If only only I had more timeI had more time
Implement a parallel version of the Implement a parallel version of the Smith-Waterman algorithm to compare Smith-Waterman algorithm to compare speedspeed
Implement the confusing aspect of Implement the confusing aspect of ParAlign that will account for gapped ParAlign that will account for gapped alignmentalignment
Implement the function in assembly Implement the function in assembly language to see how parallelism can language to see how parallelism can work at a low levelwork at a low level
SummarySummary
Implementing ParAlign was a Implementing ParAlign was a straight forward problem easily straight forward problem easily lending itself to parallelization with lending itself to parallelization with OpenMPOpenMP
There isn’t much information There isn’t much information available concerning speed issues available concerning speed issues of this algorithm to compare my of this algorithm to compare my results toresults to