<?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">ellibs</journal-id><journal-title-group><journal-title xml:lang="ru">Электронные библиотеки</journal-title><trans-title-group xml:lang="en"><trans-title>Russian Digital Libraries Journal</trans-title></trans-title-group></journal-title-group><issn pub-type="epub">1562-5419</issn><publisher><publisher-name>Казанский (Приволжский) федеральный университет</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.26907/1562-5419-2020-23-3-473-493</article-id><article-id custom-type="elpub" pub-id-type="custom">ellibs-212</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></article-categories><title-group><article-title>Определение зависимостей по данным средствами динамического анализа системы SAPFOR</article-title><trans-title-group xml:lang="en"><trans-title>Investigation of Data Dependencies by Dynamic Analysis of Sapfor</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>Kataev</surname><given-names>N. A.</given-names></name></name-alternatives><email xlink:type="simple">kataev_nik@mail.ru</email><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>Smirnov</surname><given-names>A. A.</given-names></name></name-alternatives><email xlink:type="simple">smiraland@gmail.com</email><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>Zhukov</surname><given-names>A. D.</given-names></name></name-alternatives><email xlink:type="simple">andreyzkk@yandex.ru</email><xref ref-type="aff" rid="aff-2"/></contrib></contrib-group><aff-alternatives id="aff-1"><aff xml:lang="ru"><institution>Институт прикладной математики им. М.В. Келдыша РАН</institution></aff><aff xml:lang="en"><institution>Keldysh Institute of Applied Mathematic RAS</institution></aff></aff-alternatives><aff-alternatives id="aff-2"><aff xml:lang="ru"><institution>Московский государственный университет им. М.В. Ломоносова</institution></aff><aff xml:lang="en"><institution>Lomonosov Moscow State University</institution></aff></aff-alternatives><pub-date pub-type="collection"><year>2020</year></pub-date><pub-date pub-type="epub"><day>28</day><month>06</month><year>2020</year></pub-date><volume>23</volume><issue>3</issue><fpage>473</fpage><lpage>493</lpage><permissions><copyright-statement>Copyright &amp;#x00A9; Катаев Н.А., Смирнов А.А., Жуков А.Д., 2020</copyright-statement><copyright-year>2020</copyright-year><copyright-holder xml:lang="ru">Катаев Н.А., Смирнов А.А., Жуков А.Д.</copyright-holder><copyright-holder xml:lang="en">Kataev N.A., Smirnov A.A., Zhukov A.D.</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://ellibs.elpub.ru/jour/article/view/212">https://ellibs.elpub.ru/jour/article/view/212</self-uri><abstract><p>Использование указателей и косвенной адресации в программе, а также сложная структура графа потока управления являются одними из основных препятствий при выполнении статического анализа программ. Обнаруженные в результате такого анализа свойства программы слишком консервативно описывают ее поведение и часто оказываются недостаточными для принятия решений о возможности ее параллельного выполнения. Использование динамического анализа программ позволяет расширить возможности средств автоматизации распараллеливания. В системе SAPFOR (System FOR Automated Parallelization) реализован инструмент динамического анализа, опирающийся на инструментацию программ в представлении LLVM, что позволяет исследовать программы на языках C и Fortran. Чтобы снизить накладные расходы на время выполнения инструментированной программы, сохранив при этом полноту проводимого анализа, используются возможности статического анализа, реализованного в SAPFOR. В процессе динамического анализа часть обращений к памяти, информация о которых была получена в процессе статического анализа, может быть проигнорирована. Разработанный инструмент был протестирован на тестах производительности из пакета NAS Parallel Benchmarks для языков C и Fortran. В процессе динамического анализа кроме традиционных видов зависимостей (flow, anit, output) также определяются переменные, зависимость по которым может быть устранена за счет приватизации или конвейерного выполнения циклов. Совместно с возможностями DVM и OpenMP это существенно облегчает, в том числе, и ручное распараллеливание, облегчая задание соответствующих директив компилятора.</p></abstract><trans-abstract xml:lang="en"><p>The use of pointers and indirect memory accesses in the program, as well as the complex control flow are some of the main weaknesses of the static analysis of programs. The program properties investigated by this analysis are too conservative to accurately describe program behavior and hence they prevent parallel execution of the program.  The application of dynamic analysis allows us to expand the capabilities of semi-automatic parallelization. In the SAPFOR system (System FOR Automated Parallelization), a dynamic analysis tool has been implemented, based on on the instrumentation of the LLVM representation of an analyzed program, which allows the system to explore programs in both C and Fortran programming languages. The capabilities of the static analysis implemented in SAPFOR are used to reduce the overhead program execution, while maintaining the completeness of the analysis. The use of static analysis allows to reduce the number of analyzed memory accesses and to ignore scalar variables, which can be explored in a static way. The developed tool was tested on performance tests from the NAS Parallel Benchmarks package for C and Fortran languages. The implementation of dynamic analysis, in addition to traditional types of data dependencies (flow, anit, output), allows us to determine privitizable variables and a possibility of pipeline execution of loops. Together with the capabilities of DVM and OpenMP these greatly facilitates program parallelization and simplify insertion of the appropriate compiler directives.</p></trans-abstract><kwd-group xml:lang="ru"><kwd>анализ программ</kwd><kwd>динамический анализ</kwd><kwd>автоматизация распараллеливания</kwd></kwd-group><kwd-group xml:lang="en"><kwd>SAPFOR</kwd><kwd>DVM</kwd><kwd>LLVM</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">Клинов М.С., Крюков В.А. Автоматическое распараллеливание Фортран-программ. Отображение на кластер // Вестник Нижегородского университета им. Н.И. Лобачевского, 2009. № 2. С. 128&amp;ndash;134.</mixed-citation><mixed-citation xml:lang="en">Клинов М.С., Крюков В.А. Автоматическое распараллеливание Фортран-программ. Отображение на кластер // Вестник Нижегородского университета им. Н.И. Лобачевского, 2009. № 2. С. 128&amp;ndash;134.</mixed-citation></citation-alternatives></ref><ref id="cit2"><label>2</label><citation-alternatives><mixed-citation xml:lang="ru">Бахтин В.А., Жукова О.Ф., Катаев Н.А., Колганов А.С., Крюков В.А., Поддерюгина Н.В., Притула М.Н., Савицкая О.А., Смирнов А.А. Автоматизация распараллеливания программных комплексов // Труды XVIII Всероссийской научной конференции &amp;laquo;Научный сервис в сети Интернет&amp;raquo;, Новороссийск, Россия, 19&amp;ndash;24 сентября 2016 г. М.: ИПМ им. М.В. Келдыша, 2016. С. 76&amp;ndash;85. doi:10.20948/abrau-2016-31</mixed-citation><mixed-citation xml:lang="en">Бахтин В.А., Жукова О.Ф., Катаев Н.А., Колганов А.С., Крюков В.А., Поддерюгина Н.В., Притула М.Н., Савицкая О.А., Смирнов А.А. Автоматизация распараллеливания программных комплексов // Труды XVIII Всероссийской научной конференции &amp;laquo;Научный сервис в сети Интернет&amp;raquo;, Новороссийск, Россия, 19&amp;ndash;24 сентября 2016 г. М.: ИПМ им. М.В. Келдыша, 2016. С. 76&amp;ndash;85. doi:10.20948/abrau-2016-31</mixed-citation></citation-alternatives></ref><ref id="cit3"><label>3</label><citation-alternatives><mixed-citation xml:lang="ru">Konovalov N.A., Krukov V.A, Mikhajlov S.N., Pogrebtsov A.A. Fortan DVM: a Language for Portable Parallel Program Development // Programming and Computer Software. 1995. V. 21. No. 1. P. 35&amp;ndash;38.</mixed-citation><mixed-citation xml:lang="en">Konovalov N.A., Krukov V.A, Mikhajlov S.N., Pogrebtsov A.A. Fortan DVM: a Language for Portable Parallel Program Development // Programming and Computer Software. 1995. V. 21. No. 1. P. 35&amp;ndash;38.</mixed-citation></citation-alternatives></ref><ref id="cit4"><label>4</label><citation-alternatives><mixed-citation xml:lang="ru">Бахтин В.А., Клинов М.С., Крюков В.А., Поддерюгина Н.В., Притула М.Н., Сазанов Ю.Л. Расширение DVM-модели параллельного программирования для кластеров с гетерогенными узлами // Вестник Южно-Уральского государственного университета, серия &amp;laquo;Математическое моделирование и программирование&amp;raquo;, 2012. №18 (277), выпуск 12. Челябинск: Издательский центр ЮУрГУ. C. 82&amp;ndash;92.</mixed-citation><mixed-citation xml:lang="en">Бахтин В.А., Клинов М.С., Крюков В.А., Поддерюгина Н.В., Притула М.Н., Сазанов Ю.Л. Расширение DVM-модели параллельного программирования для кластеров с гетерогенными узлами // Вестник Южно-Уральского государственного университета, серия &amp;laquo;Математическое моделирование и программирование&amp;raquo;, 2012. №18 (277), выпуск 12. Челябинск: Издательский центр ЮУрГУ. C. 82&amp;ndash;92.</mixed-citation></citation-alternatives></ref><ref id="cit5"><label>5</label><citation-alternatives><mixed-citation xml:lang="ru">Kim M., Kim H., Luk C.K. Prospector: A dynamic data-dependence profiler to help parallel programming // HotPar&amp;rsquo;10: Proceedings of the USENIX workshop on Hot Topics in parallelism, 2010.</mixed-citation><mixed-citation xml:lang="en">Kim M., Kim H., Luk C.K. Prospector: A dynamic data-dependence profiler to help parallel programming // HotPar&amp;rsquo;10: Proceedings of the USENIX workshop on Hot Topics in parallelism, 2010.</mixed-citation></citation-alternatives></ref><ref id="cit6"><label>6</label><citation-alternatives><mixed-citation xml:lang="ru">Dorta A.J., Rodr&amp;iacute;guez C., de Sande F., Gonzalez-Escribano A. The OpenMP Source Code Repository // Parallel, Distributed, and Network-Based Processing, Euromicro Conference, 2005.</mixed-citation><mixed-citation xml:lang="en">Dorta A.J., Rodr&amp;iacute;guez C., de Sande F., Gonzalez-Escribano A. The OpenMP Source Code Repository // Parallel, Distributed, and Network-Based Processing, Euromicro Conference, 2005.</mixed-citation></citation-alternatives></ref><ref id="cit7"><label>7</label><citation-alternatives><mixed-citation xml:lang="ru">Kataev N.A. Application of the LLVM Compiler Infrastructure to the Program Analysis in SAPFOR // Voevodin V., Sobolev S. (eds) Supercomputing. RuSCDays 2018. Communications in Computer and Information Science, 2018. Vol 965. Springer, Cham. P. 487-499. doi:10.1007/978-3-030-05807-4_41</mixed-citation><mixed-citation xml:lang="en">Kataev N.A. Application of the LLVM Compiler Infrastructure to the Program Analysis in SAPFOR // Voevodin V., Sobolev S. (eds) Supercomputing. RuSCDays 2018. Communications in Computer and Information Science, 2018. Vol 965. Springer, Cham. P. 487-499. doi:10.1007/978-3-030-05807-4_41</mixed-citation></citation-alternatives></ref><ref id="cit8"><label>8</label><citation-alternatives><mixed-citation xml:lang="ru">NAS Parallel Benchmarks. UFL: https://www.nas.nasa.gov/publications/ npb.html</mixed-citation><mixed-citation xml:lang="en">NAS Parallel Benchmarks. UFL: https://www.nas.nasa.gov/publications/ npb.html</mixed-citation></citation-alternatives></ref><ref id="cit9"><label>9</label><citation-alternatives><mixed-citation xml:lang="ru">Seo S., Jo G., Lee J. Performance Characterization of the NAS Parallel Benchmarks in OpenCL // 2011 IEEE International Symposium on. Workload Characterization (IISWC), 2011. P. 137&amp;ndash;148.</mixed-citation><mixed-citation xml:lang="en">Seo S., Jo G., Lee J. Performance Characterization of the NAS Parallel Benchmarks in OpenCL // 2011 IEEE International Symposium on. Workload Characterization (IISWC), 2011. P. 137&amp;ndash;148.</mixed-citation></citation-alternatives></ref><ref id="cit10"><label>10</label><citation-alternatives><mixed-citation xml:lang="ru">Lattner C., Adve V. LLVM: A Compilation Framework for Lifelong Program Analysis &amp;amp; Transformation // Proc. of the 2004 International Symposium on Code Generation and Optimization (CGO&amp;rsquo;04). Palo Alto, California, 2004.</mixed-citation><mixed-citation xml:lang="en">Lattner C., Adve V. LLVM: A Compilation Framework for Lifelong Program Analysis &amp;amp; Transformation // Proc. of the 2004 International Symposium on Code Generation and Optimization (CGO&amp;rsquo;04). Palo Alto, California, 2004.</mixed-citation></citation-alternatives></ref><ref id="cit11"><label>11</label><citation-alternatives><mixed-citation xml:lang="ru">Intel Parallel Studio. URL: https://software.intel.com/en-us/parallel-studio-xe</mixed-citation><mixed-citation xml:lang="en">Intel Parallel Studio. URL: https://software.intel.com/en-us/parallel-studio-xe</mixed-citation></citation-alternatives></ref><ref id="cit12"><label>12</label><citation-alternatives><mixed-citation xml:lang="ru">Kim M., Kim H., Luk C.K. SD3: A Scalable Approach to Dynamic Data-Dependence Profiling // 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture. IEEE, 2011. doi:10.1109/MICRO.2010.49</mixed-citation><mixed-citation xml:lang="en">Kim M., Kim H., Luk C.K. SD3: A Scalable Approach to Dynamic Data-Dependence Profiling // 2010 43rd Annual IEEE/ACM International Symposium on Microarchitecture. IEEE, 2011. doi:10.1109/MICRO.2010.49</mixed-citation></citation-alternatives></ref><ref id="cit13"><label>13</label><citation-alternatives><mixed-citation xml:lang="ru">SAPFOR. URL: https://github.com/dvm-system.</mixed-citation><mixed-citation xml:lang="en">SAPFOR. URL: https://github.com/dvm-system.</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>
