<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>VM BASED EVALUATION OF THE SCALABLE PARALLEL MINIMUM SPANNING TREE ALGORITHM FOR PGAS MODEL</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>V. Bejanyan</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>H. Astsatryan</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>E-mail:</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>bejanyan.vahag@protonmail.com</string-name>
        </contrib>
        <contrib contrib-type="editor">
          <string-name>Vahag Bejanyan, Hrachya Astsatryan</string-name>
        </contrib>
      </contrib-group>
      <pub-date>
        <year>2021</year>
      </pub-date>
      <fpage>5</fpage>
      <lpage>9</lpage>
      <abstract>
        <p>The minimum spanning tree problem has influential importance in computer science, network analysis, and engineering. However, the sequential algorithms become unable to process the given problem as the volume of the data representing graph instances overgrowing. Instead, the highperformance computational resources pursue to simulate large-scale graph instances in a distributed manner. Generally, the standard shared or distributed memory models like OpenMP and Message Passing Interface are applied to address the parallelization. Nevertheless, as an emerging alternative, the Partitioned Global Address Space model communicates in the form of asynchronous remote procedure calls to access distributed-shared memory, positively affecting the performance using overlapping communications and locality-aware structures. The paper presents a modification of the Kruskal algorithm for MST problems based on performance and energy-efficiency evaluation relying on emerging technologies. The algorithm evaluation shows great scalability within the server up to 16 vCPU and between the physical servers coupled with a connected weighted graph using different vertices, edges, and densities.</p>
      </abstract>
      <kwd-group>
        <kwd>Minimum spanning tree</kwd>
        <kwd>PGAS model</kwd>
        <kwd>parallel algorithms</kwd>
        <kwd>large-scale graphs</kwd>
        <kwd>Kruskal</kwd>
        <kwd>VM</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        Large scale graph analysis has tremendous importance in network science, social network
analysis, and many other fields. However, due to limitations of memory and computational
performance of a single physical server, large scale graph problems often tend to be solved on
HighPerformance Computational (HPC) clusters. The parallel programming models may address this
challenge, such as Message Passing Interface (MPI) or OpenMP for distributed memory and shared
memory systems [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. However, traditional models are limited to relying on emerging technologies
such as portable, open-source, high-performance communication GASNet-EX library to address
networking requirements of runtime systems [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. As an alternative to traditional parallelization
approaches, the Partitioned Global Address Space (PGAS) is a distributed memory programming
model providing asynchronous peer-to-peer communication and shared distributed memory
capabilities and bases on GASNet-EX [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ]. In such a framework, the PGAS model may export a
portion of the process address space into a global heap. Therefore, the model simplified access to the
distributed memory, leverage better locality via locale affinity, and perform remote procedure calls
(RPC) on the data structures stored in a distributed shared memory, for instance, large scale graphs
transmission in distributed memory infrastructures.
      </p>
      <p>
        Several parallel minimum spanning tree (MST) algorithms are available using traditional or emerging
parallel programming models [
        <xref ref-type="bibr" rid="ref5 ref6 ref7">5, 6, 7</xref>
        ] with the limited performance and energy efficiency evaluations.
The paper aims to present a modification of the Kruskal [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ] algorithm for MST problems based on
performance evaluation relying on emerging technologies. In the first step of Kruskal's algorithm, a
pair of rates with the nearest distance and a line proportional to the distance is selected. Then a pair
with the second closest distance connects the nearest pair that is not connected by the same tree. The
suggested algorithm focuses on a high-performance C++ UPCXX framework [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ] for enabling
highperformance simulations through the asynchronous communication framework. The algorithm has
been implemented in the scope of the open-source PGAS based graph algorithms library [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>In Section 2, the methodology of the experiments and algorithms are presented. Then, the
experimental results are discussed in Section 3, while the conclusion is presented in Section 4.</p>
    </sec>
    <sec id="sec-2">
      <title>2. Methodology</title>
      <p>The graph analysis, HPC communication middleware, PGAS, and HPC over cloud framework
(see figure 1) are the layers of the suggested methodology for parallel implementation of MST
algorithm for large graphs.</p>
      <p>
        The HPC over cloud layer depends on the IaaS (Infrastructure as a Service) cloud service of
the Armenian hybrid research computing platform [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. The PGAS programming model constructs a
global memory address space combining the local memories of VMs of IaaS cloud infrastructure
without any memory allocation or pinning. As a single program multiple data technique, UPCXX
binary code predetermines several single program copies for distributing among processes located on
different physical and virtual machines. Each process is identified by a unique rank to organize the
computations and communicates between the physical and virtual machines. The asynchronous RPCs
provided by UPCXX are critical to executing arbitrary functions inside RPC given destination rank. It
is possible to achieve better simulation time considering the communication overlapping and waiting
on the future returned by RPC only when there is no current work to finish. An example of such
communication is a transfer of the candidate MST tree portion between ranks.
      </p>
      <p>The distributed objects provided by UPCXX have been implemented for graph algorithms to
store structures necessary for inter-rank communication, such as edge lists. The graph data structures
are stored in processes private memory in consecutive memory locations to avoid the overhead caused
by RPC. It is assumed that G=(V, E) is a connected graph with distinct edge weights and a unique
MST. Besides, it is required unique id assigned to each graph vertex. A slightly modified adjacency
list stores the graph data structure internally. Instead of keeping pointers to the neighbors, each vertex
stores list of unique ids of the neighbors. Such id is then used to retrieve the pointer to that neighbor
from the vertex store. Vertices are distributed among all the computation nodes in a vector to store
vertex id as key and private pointer as a value. Such distribution provides more significant locality and
better performance for memory operations because computation with each vertex is done on the
vertex's node to which the vertex has an affinity.</p>
    </sec>
    <sec id="sec-3">
      <title>3. Experiments</title>
      <p>The graph generation and MST simulations are evaluated for the experiments. The complexity
of the graph generation algorithm depends on the sizes of the vertices and the percentage of graph
connectivity input parameters. The suggested graph generation algorithm is divided into three phases.
Instance size
am32.2xmedium
am16.2xmicro
am32.2xlarge
am16.small
am32.4xlarge
16
32
16
32
16
32
16
32
16
32
1
1
2
2
4
4
8
8
16
16
First, the core of the graph is generated to ensure that the graph will remain connected at later stages.
Secondly, the algorithm starts to generate edges inside the current connected component by uniformly
choosing vertices. And at the final third phase, various connected components assigned to different
processes or machines are connected by randomly adding edges between vertices inside different
connected components and adding an edge between them.</p>
      <p>The experiments have been carried out with a fixed number of vertices and increasing
densities, enabling to benchmark both graph generation and MST algorithm for sparse and dense
graphs incrementally. Both algorithms have been evaluated using VMs with different configurations
(see table 1).</p>
      <p>Figure 2 presents the behavior of the suggested graph generation algorithm delivering great
runtime for the one and two vCPUs cases. However, in later cases, communication and
synchronization costs are getting higher during the third phase. The high cost incurred by the third
phase is caused by repeatedly accessing the memory of other processes.</p>
      <p>Figure 3 shows the behavior of the presented MST algorithm. The algorithm delivers high
scalability over 16 share memory vCPUs, which is mainly achieved by localizing computations and
reducing communication only to transfer the small portion of the MST between processes of ranks and
overlapping the communication. For example, running on the experimental setup described in table 1,
the shared memory algorithm achieves runtime equal to 2.46 seconds for 0.5 million edges with 1
vCPU while for 16 vCPUs runtimes are equal to 0.73 seconds, which means that even for small graph
instances the algorithm has scalability over multiple processes. Therefore, the speed up for 16 vCPUs
is 3.36 times. At the same time, on the graph with 27.5 million edges, the runtime of the algorithm is
78.73 seconds for one vCPU, while for 16 vCPUs runtimes are nearly equal to 9.18 seconds for each
process and speed up is equal to 8.6 times.</p>
      <p>After each step of the merging process, half of the computational nodes are done with their
work, and hence memory related to the MST algorithm execution is freed to save space in a global
heap. The overview of the utilization of the memory and vCPU are presented in Table 2.
Feature</p>
      <sec id="sec-3-1">
        <title>Memory (GiB) CPU (%)</title>
        <p>Figure 4 presents the behavior of the suggested graph generation algorithm for VMs over two
physical servers. The algorithm delivers great runtime for the one node benchmark with nearly
identical two the shared memory case with execution time. However, in a two-node case, runtime
increases because of communication and synchronization costs.</p>
        <p>The algorithm achieves a great scalability over two VMs even though communication and
synchronization costs in a distributed case are much higher than shared memory vCPUs. For example,
running on the experimental setup described in table 1, the distributed memory algorithm achieves
runtime equal to 2.72 seconds for 0.5 million edges with 1 VM while for 2 VMs runtimes are equal to
1.17 seconds, which is higher than for the shared memory case because of additional costs incurred by
inter-node communication. The speed up is equal to 2.42 times. Simultaneously, on the graph with 20
million edges, the runtime of the algorithm is 91.28 seconds for 1 VM, while for 2 VMs runtimes are
nearly equal to 44.53 seconds for VM and speed is equal to 2 times.</p>
      </sec>
      <sec id="sec-3-2">
        <title>Memory, vCPU and network utilization are shown in Table 3.</title>
        <p>VM 1</p>
      </sec>
      <sec id="sec-3-3">
        <title>Memory (GiB) CPU (%) Net In Net Out</title>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The article presents a distributed algorithm for finding MST in a PGAS model. The suggested
algorithm is a modification of Kruskal's algorithm. An in-depth evaluation of the proposed MST
performance has been performed in the cloud on a connected weighted graph with different vertices,
edges, and densities modeling sparse and dense graphs. The experimental results show that the
algorithm has high scalability over 16 threads for MST problem in a shared memory setup. However,
random graph generation time tends to increase due to communication and synchronization costs
incurred by multiprocessing. During the distributed run, MST has again shown high scalability over
two VMs where communication and synchronization costs are much higher compared to the shared
memory case, even for small graphs instances. Still, graph generation's run-time and scalability have
suffered due to irregular access patterns at the third phase of the graph generation algorithm.</p>
      <p>
        It is planned to study and develop algorithms for distributed large graphs in the PGAS model
considering chunk-sizes, communication costs and network optimizations [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ], as well as to develop
graph algorithms for centrality, shortest paths, and link analysis using emerging distributed
programming languages and HPC technologies like Chapel, InfiniBand or Remote Direct Memory
Access [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
      </p>
    </sec>
    <sec id="sec-5">
      <title>5. Acknowledgement</title>
      <p>The paper is supported by the European Union's Horizon 2020 research infrastructures
programme under grant agreement No 857645, project NI4OS Europe (National Initiatives for Open
Science in Europe).</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Diaz</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Muñoz-Caro</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Niño</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>A Survey of Parallel Programming Models and Tools in the Multi and Many-Core Era</article-title>
          .
          <source>IEEE Transactions on Parallel and Distributed Systems</source>
          ,
          <volume>23</volume>
          ,
          <fpage>1369</fpage>
          -
          <lpage>1386</lpage>
          . doi:
          <volume>10</volume>
          .1109/TPDS.
          <year>2011</year>
          .308
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Bonachea</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Hargrove</surname>
            ,
            <given-names>P. H.</given-names>
          </string-name>
          (
          <year>2019</year>
          ).
          <article-title>GASNet-EX: A High-Performance, Portable Communication Library for Exascale</article-title>
          . In M. Hall, &amp; H.
          <string-name>
            <surname>Sundar</surname>
          </string-name>
          (Ed.),
          <source>Languages and Compilers for Parallel Computing</source>
          (pp.
          <fpage>138</fpage>
          -
          <lpage>158</lpage>
          ). Cham: Springer International Publishing.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Bejanyan</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Astsatryan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          (
          <year>2021</year>
          ).
          <article-title>MST PGAS algorithm</article-title>
          .
          <article-title>MST PGAS algorithm</article-title>
          . Retrieved from https://github.com/lnikon/pgas-graph
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Yelick</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bonachea</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
          </string-name>
          , W.-Y.,
          <string-name>
            <surname>Colella</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Datta</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Duell</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , . . .
          <string-name>
            <surname>Wen</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          (
          <year>2007</year>
          ).
          <article-title>Productivity and Performance Using Partitioned Global Address Space Languages</article-title>
          . (pp.
          <fpage>24</fpage>
          -
          <lpage>32</lpage>
          ). New York, NY, USA:
          <article-title>Association for Computing Machinery</article-title>
          .
          <source>doi:10.1145/1278177</source>
          .1278183
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Bader</surname>
            ,
            <given-names>D. A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Cong</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          (
          <year>2006</year>
          ).
          <article-title>Fast shared-memory algorithms for computing the minimum spanning forest of sparse graphs</article-title>
          .
          <source>Journal of Parallel and Distributed Computing</source>
          ,
          <volume>66</volume>
          ,
          <fpage>1366</fpage>
          -
          <lpage>1378</lpage>
          . doi:https://doi.org/10.1016/j.jpdc.
          <year>2006</year>
          .
          <volume>06</volume>
          .001
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Cong</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Almasi</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Saraswat</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          (
          <year>2010</year>
          ).
          <article-title>Fast PGAS Implementation of Distributed Graph Algorithms</article-title>
          .
          <source>SC '10: Proceedings of the 2010 ACM/IEEE International Conference for High Performance Computing, Networking, Storage and Analysis</source>
          , (pp.
          <fpage>1</fpage>
          -
          <lpage>11</lpage>
          ). doi:
          <volume>10</volume>
          .1109/SC.
          <year>2010</year>
          .26
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Gallager</surname>
            ,
            <given-names>R. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Humblet</surname>
            ,
            <given-names>P. A.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Spira</surname>
            ,
            <given-names>P. M.</given-names>
          </string-name>
          (
          <year>1983</year>
          ,
          <article-title>January). A Distributed Algorithm for Minimum-Weight Spanning Trees</article-title>
          .
          <source>ACM Trans. Program. Lang. Syst., 5</source>
          ,
          <fpage>66</fpage>
          -
          <lpage>77</lpage>
          . doi:
          <volume>10</volume>
          .1145/357195.357200
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>West</surname>
            ,
            <given-names>D. B.</given-names>
          </string-name>
          (
          <year>2000</year>
          ,
          <article-title>September)</article-title>
          . Introduction to Graph Theory (
          <volume>2</volume>
          <fpage>ed</fpage>
          .). Prentice Hall.
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Shoukourian</surname>
            ,
            <given-names>Y. H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sahakyan</surname>
            ,
            <given-names>V. G.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Astsatryan</surname>
            ,
            <given-names>H. V.</given-names>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>E-Infrastructures in Armenia: Virtual research environments</article-title>
          .
          <source>Ninth International Conference on Computer Science and Information Technologies Revised Selected Papers</source>
          , (pp.
          <fpage>1</fpage>
          -
          <lpage>7</lpage>
          ). doi:
          <volume>10</volume>
          .1109/CSITechnol.
          <year>2013</year>
          .6710360
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Astsatryan</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Narsisian</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kocharyan</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Da</surname>
            <given-names>Costa</given-names>
          </string-name>
          ,
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Hankel</surname>
          </string-name>
          ,
          <string-name>
            <given-names>A.</given-names>
            , &amp;
            <surname>Oleksiak</surname>
          </string-name>
          ,
          <string-name>
            <surname>A.</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Energy optimization methodology for e-infrastructure providers</article-title>
          .
          <source>Concurrency and Computation: Practice and Experience</source>
          ,
          <volume>29</volume>
          ,
          <year>e4073</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Jenkins</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Firoz</surname>
            ,
            <given-names>J. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zalewski</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Joslyn</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          , &amp;
          <string-name>
            <surname>Raugas</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2019</year>
          ,
          <article-title>September)</article-title>
          .
          <article-title>Graph Algorithms in PGAS: Chapel and UPC++</article-title>
          .
          <source>In 2019 IEEE High Performance Extreme Computing Conference (HPEC)</source>
          (pp.
          <fpage>1</fpage>
          -
          <lpage>6</lpage>
          ). IEEE.
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>