<!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>
      <journal-title-group>
        <journal-title>CPU FFPP</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>A GPU-enabled Black-box Optimization in Application to Dispersion-based Geoacoustic Inversion</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Vadim Bulavintsev Matrosov Institute for System Dynamics and Control Theory SB RAS Irkutsk, Russia Pavel Petrov Il'ichev Paci c Oceanological Institute FEB RAS, Far Eastern Federal University Vladivostok, Russia Mikhail Posypkin Dorodnicyn Computing Centre FRC CS RAS Moscow, Russia Oleg Zaikin Matrosov Institute for System Dynamics and Control Theory SB RAS Irkutsk</institution>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>3624</year>
      </pub-date>
      <volume>00</volume>
      <fpage>95</fpage>
      <lpage>100</lpage>
      <abstract>
        <p>In this study, a GPU-enabled implementation of an algorithm for the solution of a real-life optimization problem arising in the geoacoustic inversion is proposed. In the inversion algorithm, a single-hydrophone recording of a pulse acoustic signal is used for the estimation of the waveguide parameters from the dispersion data. We devised and implemented a hierarchical optimization scheme where and efficient GPUenabled implementation of the objective function calculation is combined with the CPU implementation of the search algorithm. The GPU-enabled implementation turned out to be several dozen times faster than the pure CPU one. Exploiting this advantage we were able to successfully solve the considered problem in reasonable time.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        Black-box optimization methods can be employed to solve real-life problems from different areas
        <xref ref-type="bibr" rid="ref7 ref8">(e.g., see
[Evtushenko et al., 2016, Gornov et al., 2016])</xref>
        . In this study, we apply black-box optimization for solving one
problem arising in geoacoustic inversion. The notion of geoacoustic inversion refers to a collection of
techniques that can be used for the reconstruction of geoacoustical waveguide structure from the sound pressure
measurements [Katsnelson et al., 2012]. A typical geoacoustical waveguide in a shallow sea is comprised by
a water column and several layers of bottom sediments. Normally measurements for the geoacoustic
inversion are performed using expensive receiver arrays. However, recently it was shown that single-hydrophone
recording of a broadband pulse signal can be also successfully used for estimating the acoustical parameters
of sea bottom [Bonnel &amp; Chapman, 2011, Bonnel et al., 2012, Bonnel et al., 2013]. The implementation of the
method from [Bonnel &amp; Chapman, 2011] in practice can be thought of as a solution of an minimization
problem, where every evaluation of the objective function requires numerous solutions of an acoustic spectral
problem [Petrov, 2014, Zaikin &amp; Petrov, 2016]. In the present paper we use GPU-enabled black-box optimization to
solve the inversion problem mentioned above.
      </p>
      <p>Let us give a brief outline of the paper. In Section 2 we describe an black-box optimization algorithm, used
to solve the problem. In Section 3 we describe a problem of geoacoustic inversion. In Section 4 we describe
two implementations of the proposed algorithm, and show the results of computational experiments on the test
problem. In the rest of the paper we draw conclusions.
2</p>
    </sec>
    <sec id="sec-2">
      <title>New Black-box Optimization Algorithm</title>
      <p>In black-box optimization problems derivatives are either unavailable or very hard to compute. Thus, solution
methods should not rely on derivatives. There are a lot of local search techniques which can be used for this
purpose: Hooke-Jeeves method [Hooke &amp; Jeeves, 1961], pseudo-gradient approaches [Evtushenko et al., 2016]
and a variety of coordinate descent techniques. We developed a simple modification of the coordinate descent
method presented in Fig. 1.
1 while maxi=1;:::;n i &gt; " do
2 for i = 1 to n do
3 x′ = x + iei
4 if f (x′) &lt; f (x) then
5 x := x′
6 i := i</p>
    </sec>
    <sec id="sec-3">
      <title>Test Problem</title>
      <p>The algorithm suggested in Section 2 is now applied to the solution of the following (synthetic) problem of
geoacoustic inversion.</p>
      <p>
        Consider a homogeneous 2D geoacoustic waveguide f(r; z)jz &gt; 0g [Jensen et al., 2011], where the sound speed
and density depend on the depth z but do not depend on r
        <xref ref-type="bibr" rid="ref10">(the range of the receiver [Jensen et al., 2011])</xref>
        .
The layer 0 z h represents the water colum, where the sound speed c(z) is a continuous function of depth,
while the density is w = 1 g/cm3. The halfspace x &gt; h is a penetrable (liquid) bottom, where the sound speed
and density are cb and b respectively. In this study, the value cb; b are considered unknown media parameters
(i.e. we have no data about the acoustic properties of the bottom). Our goal is to estimate these quantities by
analyzing some acoustic data.
      </p>
      <p>
        Assume that a pulse acoustic signal is emitted by a point source located at R = 0; z = zs and
received by a hydrophone at the distance R from the source. The exact value of the receiver range
R is also considered unknown. Performing some time-frequency analysis of the received signal
        <xref ref-type="bibr" rid="ref10 ref11 ref12 ref13 ref3 ref5 ref7 ref8">(see e.g.
[Bonnel &amp; Chapman, 2011, Bonnel et al., 2012, Petrov, 2014, Zaikin &amp; Petrov, 2016])</xref>
        , we can obtain the arrival
times of different modal components of the signal exp(f; m) as the functions of frequency f
        <xref ref-type="bibr" rid="ref10 ref3">(here m is the mode
number [Jensen et al., 2011, Bonnel &amp; Chapman, 2011])</xref>
        .
      </p>
      <p>Using the mode theory of sound propagation in shallow-water waveguides we can also compute the theoretical
arrival times th(f; m) for any given set A = (cb; b; R) of the values of the unknown parameters. Introducing a
fitness that quantifies the agreement between the theoretical and experimental arrival times
E(A) =
∑M
m=1
∑Nm
n=1</p>
      <p>
        mth(fn; A)
∑M
m=1 Nm
mexp(fn) 2
;
(1)
we turn the geoacoustic inversion problem into a global minimization problem
        <xref ref-type="bibr" rid="ref10">(note that in practice we use
the discrete set of frequencies ff1; f2 : : : ; fNm g and take into account M trapped modes [Jensen et al., 2011])</xref>
        .
Indeed, the vector Amin which denotes the solution of the problem E(A) ! min for certain search space, contains
such values of unknown parameters that make the best match with experimental data.
      </p>
      <p>For our test case we simulated the signal at the receiver using the mode theory, then we applied a warping-based
algorithm to the resulting time series, and subsequently used the resulting syntetic dispersion data exp(f; m) as
the input for our inversion algorithm. The sound speed profile in the water column and the pulse signal emitted
by the source was the same as in [Zaikin &amp; Petrov, 2017]. The true values of the unknown parameters and the
search space (a cuboid) are presented in Table 1.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Computational Experiments</title>
      <p>
        For many classes of computational problems, graphics processing units (GPUs) show significant speedup over
central processing units (CPUs). In particular, GPUs can help to solve global optimization problems
        <xref ref-type="bibr" rid="ref1">(e.g.,
see [Barkalov &amp; Gergel, 2016])</xref>
        . However, to actually obtain this speed-up, the implementation of an algorithm
should be thoroughly adapted for GPU architecture [Bulavintsev, 2015]. Fortunately, in our approach to
geoacoustic inversion problem the base algorithms are well fit for a GPU. The complete process of solving the
geoacoustic inversion problem could be represented as a hierarchy of the subproblems solved by the corresponding
sub-algorithms (see Table 2).
      </p>
      <p>In our computational experiments we considered the geoacoustic inversion problem described in Section 3.
So, the ASN search was applied for minimizing the objective function (1).</p>
      <p>The GPU programming model is based on data parallelism. To achieve peak efficiency, modern GPUs should
simultaneously run about 10 000 computational threads [Corporation, 2017, Bulavintsev, 2015]. In the
GPUbased implementation of our search procedure, we exploit data parallelism found in the parallel calculation of</p>
      <sec id="sec-4-1">
        <title>Platform GPU (FP32)</title>
      </sec>
      <sec id="sec-4-2">
        <title>Stage I Final residue 0.0215154</title>
        <p>modal group velocities for a single point. Level 1 sub-algorithm executes on the CPU, while level 2-4
subalgorithms execute on the GPU (Table 2). A typical residue calculation for a single search space point requires
calculation of modal group velocities for thousands of frequencies. Thus, data parallelism exposed in this way
should be enough to efficiently exploit modern GPUs.</p>
        <p>Traditionally, geoacoustics computations are performed in double precision floating point arithmetics (FP64).
However, modern consumer-grade GPUs suffer a great (for some devices, up to 32 times [Corporation, 2017])
drop in performance when using FP64 instructions instead of their single-precision (FP32) counterparts. This
fact led us to investigate the consequences of changing the algorithm to FP32. We considered the model problem
of geoacoustic inversion with 3 parameters (R; b; cb) (see Section 3). The results are presented in Table 3. All
experiments were conducted on the Intel Core i7 930 CPU and the Nvidia GTX 1050 GPU, with the use of CUDA
8.0 SDK and GCC 5.4.0 compiler. The NVCC compiler was forced to produce native Compute Capability 6.1
code. Both NVCC and GCC compilers were run with -O3 optimization flag.</p>
        <p>The most computationally intensive part of our algorithm is the bisection sub-algorithm at level no. 4 in
Table 2. We implemented it as described in [Demmel, 1997]) and [Corporation, 2017], producing single- and
double-precision versions, algorithmically identical on both GPU and CPU platforms. For reference, we provide
the double-precision version based on the AlgLib library [Bochkanov &amp; Bystritsky, 2016], that we used in our
previous work [Zaikin et al., press]. The AlgLib library includes a state-of-the-art implementation of the bisection
algorithm, thoroughly tuned to produce the most accurate results possible with the modern CPUs floating point
units (FPUs). Our CPU-based implementation of bisection algorithm can not boast such accuracy. However, it
is notably faster than AlgLib due to its simplicity. That is why, our and AlgLib-based algorithm’s results are
different. The discrepancy between the outputs (residue) of the same algorithm on the CPU and GPU is the
result of the different implementations of floating-point units on these platforms.</p>
        <p>Table 3 clearly indicates the superiority of the GPU performance, even in FP64. The FP32 mode of the GPU
is 150 times faster than the FP64 mode, though the former’s final residue (0.0215154) is much worse than the
latter one’s (0.0131284). However, recomputation of this final point in FP64 gives the result (0.0134315, see
Table 4) that is on par with that of the FP64 CPU implementation.</p>
        <p>
          This leads us to suggest the mixed-mode, two-stage algorithm, that uses the ”coarse” FP32 computation mode
during Stage I, and then refines its result in Stage II by resuming the search in the ”fine” FP64 computation
mode. The performance of this algorithm is presented in Table 4. For reference, the ”Initial residue” column of
Table 4 shows residue of the best point found by Stage I recomputed by various Stage II algorithms. It is easy to
see that the GPU-based FP32 algorithm for Stage I is best complemented for Stage II by the GPU-based FP64
algorithm. The total runtime of this mixed-mode algorithm is 127 seconds. This is faster than runtime of the
pure GPU-based FP64 algorithm (777 seconds), and its final residue (0.0130635) is almost equal to that of the
pure CPU-based FP64
          <xref ref-type="bibr" rid="ref2">(alglib [Bochkanov &amp; Bystritsky, 2016])</xref>
          algorithm (0.0130471). The coordinates of the
points found in our experiments are available in Table 5.
        </p>
        <p>The FP64 performance of our GPU-based algorithm is only 2,5 times lower than the performance of our
FP32 algorithm on the same GPU (see Table 3). However, according to [Corporation, 2017] this performance
drop should be at least 4x times for the GTX1050 GPU used in our experiments. This means that the GPU
performance is likely to be bottlenecked by suboptimal multiprocessor occupancy [Corporation, 2017] and/or
excessive memory transfers, rather than the FP64 FPUs of the device. The higher GPU performance we perceived
in our previous experiments with the parallelization scheme based on the simultaneous computing of residues
for many search space points supports this theory. This means that a thorough optimization of the GPU code
could increase the GPU performance of our geoacoustic inversion algorithm at least 2-3 times.</p>
        <p>The source code of our application is available online1.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusions</title>
      <p>In the present paper, we suggested a modification of a coordinate descent algorithm. This algorithm was
implemented in two versions. The first one is designed for launching on a CPU. In the second one, the algorithm
itself works on a CPU, while the calculation of the objective function is performed on a GPU. Both versions
were applied for solving one synthetic problem of geoacoustic inversion. Being little less accurate (in the sense
of found solutions), the GPU-based version turned out to be much faster, than the CPU one.
Acknowledgements
This study was partially supported by the Council for Grants of the President of the Russian Federation (grants
No. MK-2262.2017.5, No. NSh-8081.2016.9, No. NSh-8860.2016.1), the Russian Foundation for Basic research
(grants No. 16-05-01074 a, No. 16-07-00155 a and No. 17-07-00510 a), Presidium of RAS programs I.33, I.5, and
the POI FEB RAS Program “Nonlinear dynamical processes in the ocean and atmosphere”.
1https://github.com/mposypkin/acouwater/tree/f gpu
[Demmel, 1997] Demmel, J. W. (1997). Applied numerical linear algebra. SIAM.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          <source>[Barkalov &amp; Gergel</source>
          , 2016] Barkalov,
          <string-name>
            <given-names>K.</given-names>
            and
            <surname>Gergel</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Parallel global optimization on GPU</article-title>
          .
          <source>Journal of Global Optimization</source>
          ,
          <volume>66</volume>
          (
          <issue>1</issue>
          ):
          <fpage>3</fpage>
          -
          <lpage>20</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          <source>[Bochkanov &amp; Bystritsky</source>
          , 2016] Bochkanov,
          <string-name>
            <given-names>S.</given-names>
            and
            <surname>Bystritsky</surname>
          </string-name>
          ,
          <string-name>
            <surname>V.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Alglib - a cross-platform numerical analysis and data processing library</article-title>
          .
          <source>ALGLIB Project. Novgorod</source>
          , Russia.
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          <source>[Bonnel &amp; Chapman</source>
          , 2011] Bonnel,
          <string-name>
            <given-names>J.</given-names>
            and
            <surname>Chapman</surname>
          </string-name>
          ,
          <string-name>
            <surname>N. R.</surname>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Geoacoustic inversion in a dispersive waveguide using warping operators</article-title>
          .
          <source>The Journal of the Acoustical Society of America</source>
          ,
          <volume>130</volume>
          (
          <issue>2</issue>
          ):
          <fpage>EL101</fpage>
          -
          <lpage>EL107</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [Bonnel et al.,
          <year>2013</year>
          ] Bonnel,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Dosso</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. E.</given-names>
            , and
            <surname>Chapman</surname>
          </string-name>
          ,
          <string-name>
            <surname>N. R.</surname>
          </string-name>
          (
          <year>2013</year>
          ).
          <article-title>Bayesian geoacoustic inversion of single hydrophone light bulb data using warping dispersion analysis</article-title>
          .
          <source>The Journal of the Acoustical Society of America</source>
          ,
          <volume>134</volume>
          (
          <issue>1</issue>
          ):
          <fpage>120</fpage>
          -
          <lpage>130</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [Bonnel et al.,
          <year>2012</year>
          ] Bonnel,
          <string-name>
            <given-names>J.</given-names>
            ,
            <surname>Gervaise</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            ,
            <surname>Nicolas</surname>
          </string-name>
          ,
          <string-name>
            <given-names>B.</given-names>
            , and
            <surname>Mars</surname>
          </string-name>
          ,
          <string-name>
            <surname>J. I.</surname>
          </string-name>
          (
          <year>2012</year>
          ).
          <article-title>Single-receiver geoacoustic inversion using modal reversal</article-title>
          .
          <source>The Journal of the Acoustical Society of America</source>
          ,
          <volume>131</volume>
          (
          <issue>1</issue>
          ):
          <fpage>119</fpage>
          -
          <lpage>128</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          <source>[Bulavintsev</source>
          , 2015] Bulavintsev,
          <string-name>
            <surname>V.</surname>
          </string-name>
          (
          <year>2015</year>
          ).
          <article-title>An evaluation of CPU vs. GPU performance of some combinatorial algorithms for cryptoanalysis. Vestnik Yuzhno-Ural'skogo Gosudarstvennogo Universiteta</article-title>
          .
          <source>Seriya “Vychislitelnaya Matematika i Informatika”</source>
          ,
          <volume>4</volume>
          (
          <issue>3</issue>
          ):
          <fpage>67</fpage>
          -
          <lpage>84</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [Evtushenko et al.,
          <year>2016</year>
          ] Evtushenko,
          <string-name>
            <given-names>Y. G.</given-names>
            ,
            <surname>Lurie</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. A.</given-names>
            ,
            <surname>Posypkin</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. A.</given-names>
            , and
            <surname>Solyaev</surname>
          </string-name>
          ,
          <string-name>
            <surname>Y. O.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Application of optimization methods for finding equilibrium states of two-dimensional crystals</article-title>
          .
          <source>Computational Mathematics and Mathematical Physics</source>
          ,
          <volume>56</volume>
          (
          <issue>12</issue>
          ):
          <fpage>2001</fpage>
          -
          <lpage>2010</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [Gornov et al.,
          <year>2016</year>
          ] Gornov,
          <string-name>
            <given-names>A. Y.</given-names>
            ,
            <surname>Zarodnyuk</surname>
          </string-name>
          ,
          <string-name>
            <given-names>T. S.</given-names>
            ,
            <surname>Finkelstein</surname>
          </string-name>
          ,
          <string-name>
            <given-names>E. A.</given-names>
            , and
            <surname>Anikin</surname>
          </string-name>
          ,
          <string-name>
            <surname>A. S.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>The method of uniform monotonous approximation of the reachable set border for a controllable system</article-title>
          .
          <source>Journal of Global Optimization</source>
          ,
          <volume>66</volume>
          (
          <issue>1</issue>
          ):
          <fpage>53</fpage>
          -
          <lpage>64</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          <source>[Hooke &amp; Jeeves</source>
          , 1961] Hooke,
          <string-name>
            <surname>R.</surname>
          </string-name>
          and Jeeves,
          <string-name>
            <surname>T. A.</surname>
          </string-name>
          (
          <year>1961</year>
          ).
          <article-title>“ direct search” solution of numerical and statistical problems</article-title>
          .
          <source>J. ACM</source>
          ,
          <volume>8</volume>
          (
          <issue>2</issue>
          ):
          <fpage>212</fpage>
          -
          <lpage>229</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [Jensen et al.,
          <year>2011</year>
          ] Jensen,
          <string-name>
            <given-names>F. B.</given-names>
            ,
            <surname>Kuperman</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. A.</given-names>
            ,
            <surname>Porter</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M. B.</given-names>
            , and
            <surname>Schmidt</surname>
          </string-name>
          ,
          <string-name>
            <surname>H.</surname>
          </string-name>
          (
          <year>2011</year>
          ).
          <article-title>Computational ocean acoustics</article-title>
          . Springer, New-York et al.
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [Katsnelson et al.,
          <year>2012</year>
          ] Katsnelson,
          <string-name>
            <given-names>B. G.</given-names>
            ,
            <surname>Petnikov</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V. G.</given-names>
            , and
            <surname>Lynch</surname>
          </string-name>
          ,
          <string-name>
            <surname>J.</surname>
          </string-name>
          (
          <year>2012</year>
          ).
          <source>Fundamentals of Shallow Water Acoustics</source>
          . Springer US, New-York et al.
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          <source>[Petrov</source>
          , 2014] Petrov,
          <string-name>
            <surname>P. S.</surname>
          </string-name>
          (
          <year>2014</year>
          ).
          <article-title>A method for single-hydrophone geoacoustic inversion based on the modal group velocities estimation: Application to a waveguide with inhomogeneous bottom relief</article-title>
          .
          <source>In Proceedings of the International Conference Days on Diffraction</source>
          <year>2014</year>
          , pages
          <fpage>186</fpage>
          -
          <lpage>191</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          <source>[Zaikin &amp; Petrov</source>
          , 2016] Zaikin,
          <string-name>
            <given-names>O.</given-names>
            and
            <surname>Petrov</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          (
          <year>2016</year>
          ).
          <article-title>Algorithm of reconstruction of the sound speed profile in a shallow-water geoacoustic waveguide from modal dispersion data</article-title>
          .
          <source>Optoelectronics, Instrumentation and Data Processing</source>
          ,
          <volume>52</volume>
          (
          <issue>3</issue>
          ):
          <fpage>259</fpage>
          -
          <lpage>265</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          <source>[Zaikin &amp; Petrov</source>
          , 2017] Zaikin,
          <string-name>
            <given-names>O.</given-names>
            and
            <surname>Petrov</surname>
          </string-name>
          ,
          <string-name>
            <surname>P.</surname>
          </string-name>
          (
          <year>2017</year>
          ).
          <article-title>Application of iterative hill climbing to the sound speed profile inversion in underwater acoustics</article-title>
          .
          <source>In Proc. of The Fifth International Workshop on Mathematical Models and their Application</source>
          , volume
          <volume>173</volume>
          <source>of IOP Conf. Series: Materials Science and Engineering</source>
          , pages
          <fpage>1</fpage>
          -
          <lpage>8</lpage>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>