Research Article
Performance Comparison of OpenMP, MPI, and MapReduce in Practical Problems
Algorithm 5
OpenMP pseudocode for the join problem.
| OMP_JOIN_PAGE(char* koFile, char* enFile, char* outFile) | | of threads | | size of English Wikipedia file to be read at a time | | of blocks in English Wikipedia file, enFile | | size of Korean Wikipedia file to be read at a time | | of blocks in Korean Wikipedia file, koFile | | for to eN | | th block of enFile | | for to | | th block of koFile | | parallel-start | | of thread | | for to | | text eBlock.nextLine() | | title searchTitle(text) | | url searchUrl(text) | | foreach text kBlock | | content searchContent(text) | | koUrl searchUrl(text) | | wordList | | foreach word wordList do | | if isMatched(word, title) then | | enUrl url | | else | | | | if enUrl | | write(title, koUrl, word, enUrl) | | parallel-end |
|