TheFighters / Smith-Waterman

Parallel implementation of Smith–Waterman using OpenMP
MIT License
8 stars 16 forks source link

data races in the OpenMP version code #2

Closed chunhualiao closed 4 years ago

chunhualiao commented 4 years ago

maxPos is read in the if-condition expression. The read is not protected.

    //Updates maximum score to be used as seed on backtrack
    if (max > H[*maxPos]) {
        #pragma omp critical
        *maxPos = index;
    }
danielholanda commented 4 years ago

Please submit a pull request and I will be happy to accept it.

chunhualiao commented 4 years ago

See https://github.com/TheFighters/Smith-Waterman/pull/3 Thanks a lot for contributing this code to the community.

danielholanda commented 4 years ago

Merged! Thanks for your contribution!