<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.3 20210610//EN" "JATS-journalpublishing1-3.dtd">
<article article-type="research-article" dtd-version="1.3" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xml:lang="ru"><front><journal-meta><journal-id journal-id-type="publisher-id">sapi</journal-id><journal-title-group><journal-title xml:lang="ru">Системный анализ и прикладная информатика</journal-title><trans-title-group xml:lang="en"><trans-title>«System analysis and applied information science»</trans-title></trans-title-group></journal-title-group><issn pub-type="ppub">2309-4923</issn><issn pub-type="epub">2414-0481</issn><publisher><publisher-name>Belarusian National Technical University</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.21122/2309-4923-2017-3-68-75</article-id><article-id custom-type="elpub" pub-id-type="custom">sapi-178</article-id><article-categories><subj-group subj-group-type="heading"><subject>Research Article</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="ru"><subject>Защита информации</subject></subj-group><subj-group subj-group-type="section-heading" xml:lang="en"><subject>Information security</subject></subj-group></article-categories><title-group><article-title>РАЗНОРОДНЫЙ БЛОЧНЫЙ АЛГОРИТМ ПОИСКА КРАТЧАЙШИХ ПУТЕЙ МЕЖДУ ВСЕМИ ПАРАМИ ВЕРШИН ГРАФА</article-title><trans-title-group xml:lang="en"><trans-title>HETEROGENIOUS BLOCKED ALL-PAIRS SHORTEST PATHS ALGORITHM</trans-title></trans-title-group></title-group><contrib-group><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Прихожий</surname><given-names>А. А.</given-names></name><name name-style="western" xml:lang="en"><surname>Prihozhy</surname><given-names>A. A.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Прихожий Анатолий Алексеевич – доктор технических наук, профессор, кафедра «Программное обеспечение вычислительной техники и автоматизированных систем»</p></bio><bio xml:lang="en"/><xref ref-type="aff" rid="aff-1"/></contrib><contrib contrib-type="author" corresp="yes"><name-alternatives><name name-style="eastern" xml:lang="ru"><surname>Карасик</surname><given-names>О. Н.</given-names></name><name name-style="western" xml:lang="en"><surname>Karasik</surname><given-names>O. N.</given-names></name></name-alternatives><bio xml:lang="ru"><p>Карасик Олег Николаевич – аспирант кафедры «Программное обеспечение вычислительной техники и автоматизированных систем» БНТУ, ведущий инженер программист компании «EPAM Systems»</p></bio><bio xml:lang="en"/><xref ref-type="aff" rid="aff-1"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Белорусский национальный технический университет</institution><country>Беларусь</country></aff><aff xml:lang="en"><institution>Belarusian National Technical University</institution><country>Belarus</country></aff></aff-alternatives><pub-date pub-type="collection"><year>2017</year></pub-date><pub-date pub-type="epub"><day>02</day><month>11</month><year>2017</year></pub-date><volume>0</volume><issue>3</issue><fpage>68</fpage><lpage>75</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Прихожий А.А., Карасик О.Н., 2017</copyright-statement><copyright-year>2017</copyright-year><copyright-holder xml:lang="ru">Прихожий А.А., Карасик О.Н.</copyright-holder><copyright-holder xml:lang="en">Prihozhy A.A., Karasik O.N.</copyright-holder><license xml:lang="ru" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>Данная работа распространяется под лицензией Creative Commons Attribution 4.0.</license-p></license><license xml:lang="en" license-type="creative-commons-attribution" xlink:href="https://creativecommons.org/licenses/by/4.0/" xlink:type="simple"><license-p>This work is licensed under a Creative Commons Attribution 4.0 License.</license-p></license></permissions><self-uri xlink:href="https://sapi.bntu.by/jour/article/view/178">https://sapi.bntu.by/jour/article/view/178</self-uri><abstract><p> </p><p>Рассматривается проблема поиска кратчайших путей между всеми парами вершин взвешенного ориентированного графа. Известны алгоритмы Дейкстры и Флойда-Уоршелла, однородные блочные и параллельные алгоритмы и другие алгоритмы решения этой проблемы. Предлагается новый разнородный блочный алгоритм, рассматривающий различные типы блоков и учитывающий разделяемую иерархическую организации памяти и многоядерность процессоров при вычислении блока каждого типа. На теоретическом и экспериментальном уровнях проводится сравнение предлагаемых разнородных алгоритмов вычисления блоков с общепринятым однородным универсальным алгоритмом пересчета блока. Основной акцент делается на использовании вариантов неоднородности, взаимодействия блоков во время вычислений и вариаций в размере блока, размере матрицы блоков и общего количества блоков с целью выявления возможности сокращения объема вычислений, производимых при расчете блока, сокращения активности работы с кэш памятью процессора и выявления влияния времени расчета каждого типа блока на общее время выполнения разнородного блочного алгоритма. Предложен рекуррентный ресинхронизированный алгоритм расчета диагонального блока (D0), улучшающий использование кэш памяти процессора и сокращающий количество итераций и размер данных, необходимых для расчёта диагонального блока до 3 раз, что дает ускорение в расчете диагонального блока до 60%. Для более эффективной работы с кэш памятью предложены варианты перестановки основных циклов k-i-j алгоритмов расчета блоков креста (C1, C2) и обновляемых блоков (U3), использование которых в комбинации с алгоритмом расчета диагонального блока сокращает общее время работы разнородного блочного алгоритма на 13% в среднем по сравнению с однородным блочным алгоритмом.</p></abstract><trans-abstract xml:lang="en"><p>The problem of finding the shortest paths between all pairs of vertices in a weighted directed graph is considered. The algorithms of Dijkstra and Floyd-Warshall, homogeneous block and parallel algorithms and other algorithms of solving this problem are known. A new heterogeneous block algorithm is proposed which considers various types of blocks and takes into account the shared hierarchical memory organization and multi-core processors for calculating each type of block. The proposed heterogeneous block computing algorithms are compared with the generally accepted homogeneous universal block calculation algorithm at theoretical and experimental levels. The main emphasis is on using the nature of the heterogeneity, the interaction of blocks during computation and the variation in block size, the size of the block matrix and the total number of blocks in order to identify the possibility of reducing the amount of computation performed during the calculation of the block, reducing the activity of the processor’s cache memory and determining the influence of the calculation time of each block type on the total execution time of the heterogeneous block algorithm. A recurrent resynchronized algorithm for calculating the diagonal block (D0) is proposed, which improves the use of the processor’s cache and reduces the number of iterations up to 3 times that are necessary to calculate the diagonal block, which implies the acceleration in calculating the diagonal block up to 60%. For more efficient work with the cache memory, variants of permutation of the basic loops k-i-j in the algorithms of calculating the blocks of the cross (C1 and C2) and the updated blocks (U3) are proposed. These permutations in combination with the proposed algorithm for calculating the diagonal block reduce the total runtime of the heterogeneous block algorithm to 13% on average against the homogeneous block algorithm.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>алгоритм Флойда-Уоршелла</kwd><kwd>кратчайший путь</kwd><kwd>разнородный блочный алгоритм</kwd><kwd>многоядерная система</kwd><kwd>разделяемая кэш память</kwd></kwd-group><kwd-group xml:lang="en"><kwd>Floyd-Warshall algorithm</kwd><kwd>all pairs shortest paths</kwd><kwd>heterogeneous block algorithm</kwd><kwd>multi-core system</kwd><kwd>shared cache memory</kwd></kwd-group></article-meta></front><back><ref-list><title>References</title><ref id="cit1"><label>1</label><citation-alternatives><mixed-citation xml:lang="ru">Floyd, R. W. Algorithm 97: Shortest path / R. W. Floyd // Communications of the ACM, 1962, 5(6), p. 345.</mixed-citation><mixed-citation xml:lang="en">Floyd, R. W. Algorithm 97: Shortest path / R. W. Floyd // Communications of the ACM, 1962, 5(6), p. 345.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Hofner, P. Dijkstra, Floyd and Warshall Meet Kleene/ P. Hofner and B. Moller // Formal Aspect of Computing, Vol.24, No.4, 2012, № 2, pp. 459–476.</mixed-citation><mixed-citation xml:lang="en">Hofner, P. Dijkstra, Floyd and Warshall Meet Kleene/ P. Hofner and B. Moller // Formal Aspect of Computing, Vol.24, No.4, 2012, № 2, pp. 459–476.</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Venkataraman, G. A Blocked All-Pairs Shortest Paths Algorithm / G. Venkataraman, S. Sahni, S. Mukhopadhyaya // Journal of Experimental Algorithmics (JEA), Vol 8, 2003, pp. 857–874</mixed-citation><mixed-citation xml:lang="en">Venkataraman, G. A Blocked All-Pairs Shortest Paths Algorithm / G. Venkataraman, S. Sahni, S. Mukhopadhyaya // Journal of Experimental Algorithmics (JEA), Vol 8, 2003, pp. 857–874</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Park, J. S. Optimizing graph algorithms for improved cache performance / J. S. Park, M. Penner, and V. K. Prasanna // IEEE Trans. on Parallel and Distributed Systems, 2004, 15(9), pp. 769–782.</mixed-citation><mixed-citation xml:lang="en">Park, J. S. Optimizing graph algorithms for improved cache performance / J. S. Park, M. Penner, and V. K. Prasanna // IEEE Trans. on Parallel and Distributed Systems, 2004, 15(9), pp. 769–782.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Albalawi, E. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0 / E. Albalawi, P. Thulasiraman, R. Thulasiram // 2ndInternational Conference on Advances in Computer Science and Engineering (CSE 2013), 2013, Los Angeles, CA, July 1–2, 2013, pp. 109–112.</mixed-citation><mixed-citation xml:lang="en">Albalawi, E. Task Level Parallelization of All Pair Shortest Path Algorithm in OpenMP 3.0 / E. Albalawi, P. Thulasiraman, R. Thulasiram // 2ndInternational Conference on Advances in Computer Science and Engineering (CSE 2013), 2013, Los Angeles, CA, July 1–2, 2013, pp. 109–112.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Tang, P. Rapid Development of Parallel Blocked All-Pairs Shortest Paths Code for Multi-Core Computers / P. Tang // IEEE SOUTHEASTCON 2014, pp. 1–7.</mixed-citation><mixed-citation xml:lang="en">Tang, P. Rapid Development of Parallel Blocked All-Pairs Shortest Paths Code for Multi-Core Computers / P. Tang // IEEE SOUTHEASTCON 2014, pp. 1–7.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Solomonik, E. Minimizing Communication in All Pairs Shortest Paths / E. Solomonik, A. Buluc, and J. Demmel // IEEE 27th International Symposium on Parallel &amp; Distributed Processing, 2013, pp. 548–559.</mixed-citation><mixed-citation xml:lang="en">Solomonik, E. Minimizing Communication in All Pairs Shortest Paths / E. Solomonik, A. Buluc, and J. Demmel // IEEE 27th International Symposium on Parallel &amp; Distributed Processing, 2013, pp. 548–559.</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">Singh, A. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm / A. Singh, P. K. Mishra // International Journal of Computer Applications, Vol.107, No.16, 2014, pp. 23–27.</mixed-citation><mixed-citation xml:lang="en">Singh, A. Performance Analysis of Floyd Warshall Algorithm vs Rectangular Algorithm / A. Singh, P. K. Mishra // International Journal of Computer Applications, Vol.107, No.16, 2014, pp. 23–27.</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Madduri, K. An Experimental Study of a Parallel Shortest Path Algorithm for Solving Large-Scale Graph Instances / K Madduri,. D. Bader, J. W. Berry, J. R. Crobak // Proceedings of the Ninth Workshop on Algorithm Engineering and Experiments (ALENEX), 2007, pp. 23–35.</mixed-citation><mixed-citation xml:lang="en">Madduri, K. An Experimental Study of a Parallel Shortest Path Algorithm for Solving Large-Scale Graph Instances / K Madduri,. D. Bader, J. W. Berry, J. R. Crobak // Proceedings of the Ninth Workshop on Algorithm Engineering and Experiments (ALENEX), 2007, pp. 23–35.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Prihozhy, A. Synthesis and Optimization of Pipelines for HW Implementations of Dataflow Programs / A. Prihozhy, E. Bezati, H. Rahman, M. Mattavelli // IEEE Trans. on CAD of Integrated Circuits and Systems, Vol. 34, No. 10, 2015, pp. 1613–1626.</mixed-citation><mixed-citation xml:lang="en">Prihozhy, A. Synthesis and Optimization of Pipelines for HW Implementations of Dataflow Programs / A. Prihozhy, E. Bezati, H. Rahman, M. Mattavelli // IEEE Trans. on CAD of Integrated Circuits and Systems, Vol. 34, No. 10, 2015, pp. 1613–1626.</mixed-citation></citation-alternatives></ref></ref-list><fn-group><fn fn-type="conflict"><p>The authors declare that there are no conflicts of interest present.</p></fn></fn-group></back></article>
