<!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>PROPERTIES OF THE PARALLEL DISCRETE EVENT SIMULATION ALGORITHMS ON SMALL-WORLD COMMUNICATION NETWORKS</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Lilii</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>nurov</string-name>
          <email>ziganurova@gmail.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
          <xref ref-type="aff" rid="aff2">2</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>3 Landau Institute for Theoretical Physics</institution>
          ,
          <addr-line>142432, Chernogolovka, Moscow region</addr-line>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>National Research University Higher School of Economics</institution>
          ,
          <addr-line>101000, Moscow</addr-line>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Science Center in Chernogolovka</institution>
          ,
          <addr-line>142432, Chernogolovka, Moscow region</addr-line>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2018</year>
      </pub-date>
      <fpage>70</fpage>
      <lpage>75</lpage>
      <abstract>
        <p>Synchronization aspects in the method of large-scale simulation, known as parallel discrete event simulation (PDES), analyzed using the models of the time profile evolutions. Time profile is formed with the local virtual times of the processes. Time profile evolution in the simplest cases reminds the growth of the surface in the models of statistical physics. This simplest case considers only local dependences, the message exchange with the nearest neighbors. In the real simulations, the exchange can be with any of the processes, and we can consider the communication network of messages forms the small-world network. We found the enhancement of synchronization with the growing average shortest path of the small-world network. At the same time, the utilization drops down, although on the moderate level. We present the preliminary results of our study. The work is supported by grant 14-21-00158 of the Russian Science Foundation.</p>
      </abstract>
      <kwd-group>
        <kwd>parallel discrete event simulation</kwd>
        <kwd>conservative algorithm</kwd>
        <kwd>optimistic algorithm</kwd>
        <kwd>virtual times</kwd>
        <kwd>local times profile</kwd>
        <kwd>synchronization</kwd>
        <kwd>small-world networks</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1. Introduction</title>
      <p>
        The computational platforms for simulations have undergone dramatic changes in recent
years. A number of cores in modern supercomputers has grown up to millions, and computers have
become rather heterogeneous as they consist of a number of CPUs, GPGPUs, and numerical
accelerators [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Simulation now faces new computational challenges, concerning the complexity of
computing platforms [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. One of the methods which may be efficiently used in large-scale simulation
in parallel discrete event simulation (PDES) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ].
      </p>
      <p>
        Parallel discrete event simulation method can be viewed as an interacting set of sequential
simulations of parts of the simulated system, without changing the original dynamics of the simulated
system [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ]. Each sequential simulator is called logical process (LP) and may be executed by a single
thread, core, CPU, or node. Changes in the system state occur at discrete, typically irregular, points in
simulation time. These changes are therefore called discrete events. The LPs interact by exchanging
timestamped messages, which represent events, scheduled by one LP to another. The timestamp
represents a point is simulation time at which the state change occurs.
      </p>
      <p>
        The synchronization protocols [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] are based on the concept of virtual time [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. Each LP has its
local virtual time (LVT), which changes when LP handles an event or sends a message. The collection
of LVT of all LP constitutes LVT profile. The LVT profile is growing during the execution of the
simulation program. Understanding the dynamics of LVT profile helps in studying of properties of
synchronization algorithms. An average speed of the LVT profile characterizes the average utilization
of the processing elements. The average width of the profile (standard deviation) can be considered as
desynchronization between LPs. Moreover, simulation of LVT profile evolution for systems of
different sizes allows studying the scalability properties of the algorithms [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
      </p>
      <p>
        Model of the conservative algorithm was studied in references [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ]. The goal of the paper is
to study the properties of the conservative and optimistic PDES algorithms on small-world (SW)
networks [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. SW networks are characterized by the small length of the average shortest path and by
the large value of the clustering coefficient. In [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ] we found that the behavior of the LVT profile
mostly depends on the average shortest path in the network, and clustering coefficient does not play a
big role. For the simplest SW model, the long-range links are added above the 1-dimensional ring
(Figure 1).
      </p>
    </sec>
    <sec id="sec-2">
      <title>2. The models</title>
      <p>Consider a system of N logical processes. The communication between LPs is arranged in
small-world topology, schematically shown in Figure 1. We create the SW topology as follows. We
build a ring of  LPs (i.e. each LP has exactly two neighbors), and then randomly add  links
between different LPs above the regular lattice. The parameter  is responsible for the fraction of
long-range connections. The so build communication graph can be described by adjutancy matrix  ,
such that  ( ,  ) = 1, if LPi and LPj depend on each other’s state, and  ( ,  ) = 0, if LPi and LPj are
independent.</p>
      <p>
        Evolution of LVT profile {  },  = 1. .  is simulated in this communication topology. We start
from a flat profile: {  (0) = 0},  = 1. .  , and update it each computational step. After each update we
calculate observables. We average our results over 1000 independent realizations. In our simulation
program, we use library RNGAVXLIB [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] for the random number generation.
Proceedings of the VIII International Conference "Distributed Computing and Grid-technologies in Science and
      </p>
      <p>Education" (GRID 2018), Dubna, Moscow region, Russia, September 10 - 14, 2018</p>
      <sec id="sec-2-1">
        <title>2.1. The model for conservative algorithm</title>
        <p>Conservative synchronization algorithm is based on the idea of preserving all “insecure”
actions of LPs, i.e. the actions, which potentially may violate the causality of computation. It is usually
implemented with using “block-resume” constructions. The simplest conservative scheme is to let LP
processing events, only if its local virtual time is less or equal to the LVT of its neighbors. If the
condition is satisfied, this LP is called active, otherwise, the LP is idle. Assuming, that events are
Poisson arrivals, one may describe the evolution of LVT profile by the following rule.
  ( + 1) = {
  ( ) +   ,</p>
        <p>≤ {  ( )} ( , )=1 ,
  ( ),
otherwise,
where   is a random variable drawn from the Poisson distribution. At each update step  we calculate
the following observables:
1) Average speed:
2) Average width:

1</p>
        <p>∑
 =1

 ( ) = 〈</p>
        <p>[  ( ) −   ( − 1)]〉
 2( ) = 1
〈∑ =1(  ( ) −  ̅( ))2〉,
where  ̅is the average value of LVT:  ̅( ) =
the paper mean the average over independent copies of the simulation programs.</p>
        <p>∑

 =1   ( ). The triangular brackets here and further in</p>
      </sec>
      <sec id="sec-2-2">
        <title>2.2. The model for optimistic algorithm</title>
        <p>
          The fundamental synchronization primitive in the optimistic algorithm is a rollback, instead of
blocking constructions [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. In the optimistic algorithm, any LP may send messages to other LPs at
any time, without preservation of the causality. If the LP receives a message “from the past”, the
algorithm detects an error and recovers the events which were processed prematurely.
        </p>
        <p>The recovery is usually implemented by passing anti-messages. Message and anti-message
carry the same information and differ only by the sign. If both, message and anti-message, meet in the
same queue, they annihilate. For example, if an error has occurred at LPi, but it has already sent
erroneous messages to LP2, after detecting an error, the LPi sends anti-message to LP2, and rolls back
its LVT. But LP2, in its turn, may have already processed the erroneous message and sent the events
to others LPs. This causes the avalanche of rollbacks.
(1)
(2)
(3)</p>
        <p>Simulation of the behavior of the optimistic algorithm consists of two parts: simulation of
forwarding evolution of the LVT profile, and simulation of rollbacks. During the forward evolution,
each LPi updates its LVT   , increasing it by value   , taken from the Poisson distribution with unit
mean:
  ( + 1) =   +   , 
∀  = 1. .  .</p>
        <p>(4)</p>
        <p>To simulate rollbacks, we make each PEs decrease its LVT to the value of LVT of one of its
neighbor, chosen with equal probability. We assume that the avalanche length (i.e. number of
rollbacks) follows the Poisson distribution with mean  . The algorithm of simulation rollbacks is
presented by the following pseudocode:
 = Poisson( )
For  = 1 to  do:</p>
        <p>Choose random LPi
Choose random neighbor of LPi LPr</p>
        <p>If   ( ) &gt;   ( ), then   ( ): =   ( ),</p>
        <p>At each update step  , consisting of forwarding evolution and rollbacks, we calculate the
average speed (2) and the average time profile (3). The parameter of the model is  = 1/(1 +  ), the
ratio of the forward sub-steps to the total number of sub-steps, constituting the one step in  .</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>3. Simulation results</title>
      <p>We show how adding a small fraction of long-range links affects properties of the algorithm.</p>
      <sec id="sec-3-1">
        <title>3.1. Results of simulation for conservative algorithm</title>
        <p>
          The speed  of the profile for a conservative algorithm in case of regular topology ( = 0) is
approximately equal to ¼ [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ]. It means that only one-fourth of the LPs are working at one moment of
time, and other ¾ are waiting. Such low efficiency is a cost for safety of computations: LPs work only
when they are insured that the causality will not be violated. This is achieved by checking the
dependencies between LP before every portion of computation. Therefore, when we add more
communication links ( &gt; 0), the speed of the profile reduces (Figure 2, left). We found that for the
infinitely large system ( → ∞),  =  0 −  0.306(4).
        </p>
        <p>The width of the profile grows with time and saturates at value 〈 ∞2 〉. In case of regular
topology ( = 0) this saturation value 〈 ∞2 〉 increases with the number of LPs as  2 , with  = 1/2.
Adding even very small amount of long-range communication links between LPs suppress the
desynchronization: 〈 ∞2 〉 does not increase any more with the number of LPs (Figure 2, right).</p>
        <p>So, the conservative algorithm on SW networks becomes fully scalable.</p>
      </sec>
      <sec id="sec-3-2">
        <title>3.2. Results of simulation for optimistic algorithm</title>
        <p>We found the average speed of the profile increases as power of q:
u(q) = u0(q − qc)v
(6)</p>
        <p>The critical value qc and the exponent ν does depend on the parameter of SW network p. For
the regular lattice (p = 0) qc = 0.143(1) and ν = 1.66(1), and they increase with the number of
long-range connections. There is no qualitative difference in the behavior of the width profile (Figure
3, left).</p>
        <p>The behavior of the average width also does not change qualitatively with changing the
communicational topology. The desynchronization increases with time and saturates at value 〈w∞2〉.
The saturation value 〈w∞2〉 growth with the parameter q (Figure 3, right), that means that the higher
the progress rate, the less the LPs are synchronized.</p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>4. Conclusion</title>
      <p>The main results of the simulation of LVT profile for conservative algorithms on SW
networks are: 1) the speed of the profile is positive and reduces slowly with  ; 2) the profile width is
finite in the limit of infinite number of LP, i.e. the LPs are well synchronized.</p>
      <p>The main results of the simulation of LVT profile for optimistic algorithms on SW networks
are: 1) the behavior of the speed and the width of the LVT profile qualitatively does not change with
introducing of the long-range communicational links; 2) the average speed of the profile increases as
the power of the parameter q; 3) there is a critical value qc, below which the progress of simulation
fluctuates around zero; 4) the desynchronization degree grows with the progress rate q.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <surname>Carothers</surname>
            <given-names>C.</given-names>
          </string-name>
          , et al.
          <source>Computational Challenges in Modeling and Simulation. // Research Challenges in Modeling and Simulation for Engineering Complex Systems</source>
          . Springer, Cham,
          <year>2017</year>
          : P.
          <fpage>45</fpage>
          -
          <lpage>74</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <surname>Fujimoto</surname>
            <given-names>R. M.</given-names>
          </string-name>
          <article-title>Research challenges in parallel and distributed simulation</article-title>
          . // ACM Transactions on Modeling and
          <source>Computer Simulation</source>
          ,
          <year>2016</year>
          : Vol.
          <volume>26</volume>
          . - No. 4. - P.
          <year>22</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <surname>Fujimoto R.M.</surname>
          </string-name>
          <article-title>Parallel discrete event simulation</article-title>
          . // Comm. of the ACM,
          <year>1990</year>
          : Vol.
          <volume>33</volume>
          . P.
          <volume>30</volume>
          -
          <fpage>53</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <surname>Lubachevsky</surname>
            <given-names>B. D.</given-names>
          </string-name>
          <article-title>Efficient parallel simulations of asynchronous cellular arrays</article-title>
          . // Complex Systems 1,
          <year>1987</year>
          : pp.
          <fpage>1099</fpage>
          -
          <lpage>1123</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <surname>Shchur</surname>
            <given-names>L. N.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Novotny M.</surname>
          </string-name>
          <article-title>A. Evolution of time horizons in parallel and grid simulations</article-title>
          . // Physical Review E,
          <year>2004</year>
          : Vol.
          <volume>70</volume>
          . - No. 2. - p.
          <fpage>026703</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <surname>Jefferson</surname>
            <given-names>D. R.</given-names>
          </string-name>
          <article-title>Virtual time</article-title>
          .
          <source>// ACM Transactions on Programming Languages and Systems</source>
          ,
          <year>1985</year>
          : Vol.
          <volume>7</volume>
          . - No. 3. - pp.
          <fpage>404</fpage>
          -
          <lpage>425</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <surname>Korniss</surname>
            <given-names>G.</given-names>
          </string-name>
          , et al.
          <article-title>From massively parallel algorithms and fluctuating time horizons to nonequilibrium surface growth</article-title>
          . // Physical Review Letters,
          <year>2000</year>
          : Vol.
          <volume>84</volume>
          . - No. 6. - p.
          <fpage>1351</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <surname>Korniss</surname>
            <given-names>G.</given-names>
          </string-name>
          , et al.
          <article-title>Suppressing roughness of virtual times in parallel discrete-event simulations</article-title>
          . // Science 2003: Vol.
          <volume>299</volume>
          . - No.
          <fpage>5607</fpage>
          - pp.
          <fpage>677</fpage>
          -
          <lpage>679</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <surname>Watts</surname>
            <given-names>D. J.</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Strogatz</surname>
            <given-names>S. H.</given-names>
          </string-name>
          <article-title>Collective dynamics of “small-world” networks</article-title>
          . // Nature,
          <year>1998</year>
          : Vol.
          <volume>393</volume>
          . - No.
          <year>6684</year>
          . - p.
          <fpage>440</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <surname>Ziganurova</surname>
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>and Shchur L. N.</surname>
          </string-name>
          <article-title>Synchronization of conservative parallel discrete event simulations on a small-world network</article-title>
          . // Physical Review E,
          <year>2018</year>
          : Vol.
          <volume>98</volume>
          . - No. 2. - p.
          <fpage>022218</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <surname>Guskova</surname>
            ,
            <given-names>M.S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Barash</surname>
            ,
            <given-names>L.Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shchur</surname>
            ,
            <given-names>L.N.</given-names>
          </string-name>
          <article-title>RNGAVXLIB: Program library for random number generation, AVX realization</article-title>
          . // Computer Physics Communications,
          <year>2016</year>
          : Vol.
          <volume>200</volume>
          . - pp.
          <fpage>402</fpage>
          -
          <lpage>405</lpage>
          (
          <year>2016</year>
          ). doi:
          <volume>10</volume>
          .1016/j.cpc.
          <year>2015</year>
          .
          <volume>11</volume>
          .001.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <surname>Jefferson</surname>
            <given-names>D</given-names>
          </string-name>
          , and
          <string-name>
            <surname>Fujimoto R. M.</surname>
          </string-name>
          <article-title>A Brief History of Time Warp</article-title>
          . // Advances in Modeling and Simulation. Springer, Cham,
          <year>2017</year>
          : pp.
          <fpage>97</fpage>
          -
          <lpage>134</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>