paralign: with openmp peter reetz. overview n simple algorithm for finding un-gapped alignments n 4...

10
ParAlign: with OpenMP ParAlign: with OpenMP Peter Reetz Peter Reetz

Upload: pamela-wilcox

Post on 11-Jan-2016

214 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

ParAlign: with OpenMPParAlign: with OpenMP

Peter ReetzPeter Reetz

Page 2: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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

Page 3: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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

Page 4: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

……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

Page 5: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

SpeedupSpeedup

0

0.5

1

1.5

2

2.5

3

1 2 3 4

Processor Elements

Spee

dup

20K50K100K1000K

Page 6: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

……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!

Page 7: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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

Page 8: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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

Page 9: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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

Page 10: ParAlign: with OpenMP Peter Reetz. Overview n Simple algorithm for finding un-gapped alignments n 4 to 5 times faster than Smith- Waterman algorithm &

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