<!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>Solving the Structural Inverse Gravimetry Problem in the Case of Multilayered Medium Using GPU?</article-title>
      </title-group>
      <contrib-group>
        <aff id="aff0">
          <label>0</label>
          <institution>Akhmet Yassawi International Kazakh-Turkish University</institution>
          ,
          <addr-line>Turkistan</addr-line>
          ,
          <country country="KZ">Kazakhstan</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Krasovskii Institute of Mathematics and Mechanics</institution>
          ,
          <addr-line>Ekaterinburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff2">
          <label>2</label>
          <institution>Ural Federal University</institution>
          ,
          <addr-line>Ekaterinburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <fpage>33</fpage>
      <lpage>39</lpage>
      <abstract>
        <p>An optimized parallel algorithm is constructed for solving the nonlinear inverse gravimetry problem of nding several boundary surfaces between layers in multilayered medium. The algorithm is based on the modi ed nonlinear conjugate gradient method with weighting factors. The e cient implementation for GPU was developed. A model problem with synthetic gravitational data was solved.</p>
      </abstract>
      <kwd-group>
        <kwd>Inverse gravimetry problem</kwd>
        <kwd>GPU</kwd>
        <kwd>Conjugate gradient method</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        The problem considered in this paper is nding several interfaces between layers
in a multilayered medium using known gravitational data [
        <xref ref-type="bibr" rid="ref1 ref2">1, 2</xref>
        ]. This problem
is described by a nonlinear integral Fredholm equation of the rst kind; so, it
is ill-posed. The real gravity measurements are carried out over a large area
producing the large-scale grids. Processing the gravitational data is a time
consuming process and requires a lot of memory. So, it is necessary to develop
parallel algorithms for parallel computing systems.
      </p>
      <p>
        In works [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ], for solving the structural gravimetry problem, e cient parallel
algorithms based on the modi ed conjugate gradient method were proposed and
implemented multicore CPUs. The modi cation is based on approximation of the
Jacobian matrix by calculating only signi cant elements. This method reduces
the computation time in comparison with the full calculation approach.
      </p>
      <p>Here, we construct a parallel algorithm on the basis of this method and
implement it for GPUs using the CUDA technology.</p>
      <p>We compare the CPU and GPU implementations in terms of computation
time in solving the model problem with synthetic gravitational data.
? This work was nancially supported by the Ministry of Education and Science of
the Republic of Kazakhstan (project AP 05133873).</p>
    </sec>
    <sec id="sec-2">
      <title>Statement of the Inverse Gravity Problem for the</title>
    </sec>
    <sec id="sec-3">
      <title>Model of Multilayered Medium</title>
      <p>We assume that the lower half-space is composed of several layers with constant
densities, which are separated by the sought surfaces Sl; l = 1::L, where L is the
number of boundary surfaces (see, Fig. 1).</p>
      <p>
        The gravitational eld due to this half-space is equal to the sum of the
gravitational elds due to each surface. Let the boundary surfaces be speci ed
by the functions z = l(x; y), let the density contrasts on them be l, and
let the surfaces have the horizontal asymptotic planes z = Hl. The eld g
produced by the superposition of the boundary surfaces and measured on the
Earth's surface z = 0 is found by the following equation (with accuracy up to a
constant term of summation) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]:
f X
l=1::L
p(x
l
      </p>
      <p>Z1 Z1
where f is the gravitational constant.</p>
      <p>This equation is the Fredholm nonlinear equation of the rst kind of functions
l and is ill-posed: it has a nonunique solution which unstably depends on the
initial data.</p>
      <p>After the discretization of equation (1) on the rectangular grid n = M N ,
where the right-hand side g(x; y; 0) is given, and the approximation of the
left-side integral operator A( 1; :::; l) by the quadrature rules, we obtain the
vector of the right-hand side F with the length n, the combined surfaces vector
z = [ 1(x1; y1); :::; 1(xM ; yN ); :::; 2(x1; y1); :::; 2(xM ; yN ); :::; L(xM ; yN )] with
the length Ln, and the system of nonlinear equations having the form
A(z) = F:
(2)
(3)
(4)
3</p>
    </sec>
    <sec id="sec-4">
      <title>Algorithm for Solving the Inverse Problem</title>
      <p>
        In this work, to solve problem (2), we use the approach based on the modi ed
linearized conjugate gradient method with weighting factors [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
      <p>This method has the following form:
zk+1 = zk
pk = vk +</p>
      <p>kpk 1; p0 = v0;
k = max hvk; vk vk 1
kvk 1k</p>
      <p>i ; 0
v =</p>
      <p>S(z);
S(z) = A0(z) (A(z)</p>
      <p>F );
hpk; S(zk) k
kA0(zk) pkk p ;
where zk is the solution estimate at kth iteration, is the damping factor, is
the vector of weighting factors, A0(z) is the Jacobean matrix of the discretized
integral operator A(z), is operation of componentwise vector multiplication.</p>
      <p>In this work, we propose the following rules for selection of the weighting
factors:
[F1; :::; FL] ! [f1; :::; fLn] ! [ 1; :::; Ln];
Fl ! [ n(l 1); n(l 1)+1; :::; nl];
l =</p>
      <p>pfi2 +
im=1a::xnfpfi2 +
g
; 0 &lt;
&lt; 1;
where is the smoothing parameter.</p>
      <p>
        The elds Fl are extracted from the total eld F using heightwise
transformation technique from [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ].
      </p>
      <p>The condition kA(z) F k = kF k &lt; " for su ciently small " is used as the
termination criterion for the iterative process.</p>
    </sec>
    <sec id="sec-5">
      <title>Numerical Implementation</title>
      <p>
        In works [
        <xref ref-type="bibr" rid="ref3 ref4">3, 4</xref>
        ], the e cient technique for reducing the computing time was
proposed and implemented. The main idea is to drop out small elements and replace
matrix A0 with the block-band matrix A0 as shown in Fig. 2. The elements inside
each square block depend on terms (x x0) and (y y0). Thus, the farther the
matrix element is from the main diagonal of block, the less its value is. For each
block, we get the bandwidth parameter 0 &lt; l 1 by automatic adjustment
procedure. First, we nd the maximal element almax of the block. To nd it, we
just need to look over the main diagonal of the block. Then, we set the
parameter l in such way that the resulting band matrix elements would be larger then
some threshold, i.e. aij &gt; almax for the threshold parameter .
For solving the inverse problem, the parallel algorithm was developed for graphics
processor utilizing the CUDA technology.
      </p>
      <p>Most expensive part is calculation of the Jacobian matrix A0 and vector A(zk)
at each iteration. The matrix and vector are divided into a number of fragments,
and each fragment is processed by its own thread. The elements of the Jacobian
matrix are calculated on-the- y, which means that the value of an element is
computed when calling this element, without storing it in memory.</p>
      <p>
        The adjustment of the kernel execution parameters for the grid size is an
important problem. In previous works [
        <xref ref-type="bibr" rid="ref7 ref8">7, 8</xref>
        ], we implemented the original method
for automatic adjustment of parameters. For the reference 128 128 grid and
M2090 GPUs, the optimal parameters were found manually. For the grid sizes
divisible by 128, the reference parameters are multiplied by the coe cient. When
using multiple GPUs, the x dimension is divided by the number of GPUs; i.e.,
the number of threads in the block is reduced while number of blocks in the grid
remains constant.
      </p>
      <p>This imposes some constraints on the input data and GPUs con guration:
grid size should be divisible by 128 (128, 256, 512, 1024 ...) and GPUs number
should be a power of 2 (1, 2, 4, 8, ...).</p>
    </sec>
    <sec id="sec-6">
      <title>Numerical Experiments</title>
      <p>To test the constructed modi ed algorithm and to compare it with the
unmodied one in terms of execution time, we use the model problem of reconstructing
three boundary surfaces on a large grid (512 512 nodes) using the quasi-real
data.</p>
      <p>
        The model gravitational eld shown in Fig. 3 was obtained by solving the
forward problem using three surfaces S1; S2; S3 (see, Fig. 4a) with asymprotic
planes H1 = 10km; H2 = 20km; H3 = 30km from work [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] and density contrasts
1 = 2 = 3 = 0:2g=cm3. This surfaces were obtained from gravity
maps [
        <xref ref-type="bibr" rid="ref9">9</xref>
        ] for an area of 600x600 km near Ekaterinburg, Russia.
      </p>
      <p>The inverse problem was solved using the eight-core Intel Xeon E5-2650
processor and NVIDIA Tesla M2090 GPUs) incorporated in Uran parallel computing
system. The Jacobian matrix for this problem is 262144 786432. The threshold
parameter = 0:1 was used, which gives the bandwidth parameters 1 = 0:078,
2 = 0:094, 3 = 0:1. The smoothing parameter was = 0:2. For the stopping
criterion, " = 0:1 was used. The algorithm took 90 iterations.</p>
      <p>The reconstructed surfaces S1; S2; S3 are shown in Fig. 4b. The relative errors</p>
      <p>Sl = kSlk are lower than 1%.</p>
      <p>The table contains the execution times Tm for various number m of Tesla
M2090 GPUs, relative speedup Sm = T1=Tm and e ciency Em = Sm=m. It also
contains computation time for eight-core CPU.</p>
      <p>The implementation for multiple GPU demonstrates an excellent scaling; the
e ciency is more than 90% for eight GPUs.
For solving the inverse gravimetry problem of nding several boundary surfaces
in multilayered medium, the parallel algorithm was constructed and implemented
for multiple GPUs using the CUDA technology. The algorithm is based on the
nonlinear conjugate gradient method and on the approach with weighting
factors previously proposed by authors. The numerical implementation uses the
modi cation based on approximation the Jacobian matrix by dropping out the
less signi cant elements and to replacing the matrix by a block-band one.</p>
      <p>The model problem of reconstructing three surfaces using the quasi-real
gravitational data was solved on a large grid. The GPU implementation reduces the
computation time by two orders of magnitude in comparison with CPU. The
multi-GPU implementation demonstrates an excellent scaling and nearly 90%
e ciency.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Akimova</surname>
            <given-names>E. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martyshko</surname>
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            <given-names>V. E.</given-names>
          </string-name>
          :
          <article-title>Algorithms for solving the structural gravity problem in a multilayer medium</article-title>
          .
          <source>Doklady Earth Sciences</source>
          <volume>453</volume>
          (
          <issue>2</issue>
          ),
          <volume>1278</volume>
          {
          <fpage>1281</fpage>
          (
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Akimova</surname>
            <given-names>E. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Martyshko</surname>
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            <given-names>V. E.</given-names>
          </string-name>
          :
          <article-title>Parallel algorithms for solving structural inverse magnetometry problem on multicore and graphigs processors</article-title>
          . In: International Multidisciplinary Scienti c
          <article-title>GeoConference Surveying Geology and Mining Ecology Management SGEM 2014</article-title>
          . Vol.
          <volume>2</volume>
          . Issue 2, pp.
          <volume>713</volume>
          {
          <issue>720</issue>
          (
          <year>2014</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Akimova</surname>
            <given-names>E. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            <given-names>V. E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klimov</surname>
            <given-names>M. V.</given-names>
          </string-name>
          :
          <article-title>Modi ed Conjugate Gradient Method for Solving the Nonlinear Inverse Gravimetry Problem in the Case of Multilayered Medium</article-title>
          .
          <source>In: 18th International Multidisciplinary Scienti c Geoconference SGEM</source>
          <year>2018</year>
          , Vol.
          <volume>18</volume>
          .
          <string-name>
            <surname>Issue</surname>
          </string-name>
          .
          <volume>1</volume>
          .
          <issue>1</issue>
          , pp.
          <volume>893</volume>
          {
          <issue>900</issue>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Akimova</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klimov</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Modi ed parallel algorithm for solving the inverse structural gravity problem</article-title>
          .
          <source>In: 17th International Conference on Geoinformatics - Theoretical and Applied Aspects</source>
          ,
          <string-name>
            <surname>EAGE</surname>
          </string-name>
          (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Martyshko</surname>
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akimova</surname>
            <given-names>E. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            <given-names>V. E.</given-names>
          </string-name>
          :
          <article-title>Solving the structural inverse gravity problem by the modi ed gradient methods</article-title>
          .
          <source>Izvestiya, Physics of the Solid Earth</source>
          <volume>2</volume>
          (
          <issue>5</issue>
          ),
          <volume>704</volume>
          {
          <fpage>708</fpage>
          (
          <year>2016</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Martyshko</surname>
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fedorova</surname>
            <given-names>N. V.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Akimova</surname>
            <given-names>E. N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Gemaidinov</surname>
            <given-names>D. V.</given-names>
          </string-name>
          :
          <article-title>Studying the structural features of the lithospheric magnetic and gravity elds with the use of parallel algorithms</article-title>
          .
          <source>Izvestiya, Physics of the Solid Earth</source>
          <volume>50</volume>
          (
          <issue>4</issue>
          ),
          <volume>508</volume>
          {
          <fpage>513</fpage>
          (
          <year>2014</year>
          ).
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Akimova</surname>
            ,
            <given-names>E.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            ,
            <given-names>V.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tretyakov</surname>
            ,
            <given-names>A.I.</given-names>
          </string-name>
          :
          <article-title>Optimized algorithms for solving structural inverse gravimetry and magnetometry problems on GPUs</article-title>
          . In: Sokolinsky,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Zymbler</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. (eds.) PCT</surname>
          </string-name>
          <year>2017</year>
          .
          <article-title>CCIS</article-title>
          , vol.
          <volume>753</volume>
          , pp.
          <volume>144</volume>
          {
          <fpage>155</fpage>
          . Springer (
          <year>2017</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Akimova</surname>
            ,
            <given-names>E.N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
            ,
            <given-names>V.E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tretyakov</surname>
            ,
            <given-names>A.I.</given-names>
          </string-name>
          :
          <article-title>Modi ed Componentwise Gradient Method for Solving Structural Magnetic Inverse Problem</article-title>
          . In: Sokolinsky,
          <string-name>
            <given-names>L.</given-names>
            ,
            <surname>Zymbler</surname>
          </string-name>
          ,
          <string-name>
            <surname>M. (eds.) PCT</surname>
          </string-name>
          <year>2018</year>
          .
          <article-title>CCIS</article-title>
          , vol.
          <volume>910</volume>
          , pp.
          <volume>162</volume>
          {
          <fpage>173</fpage>
          . Springer (
          <year>2018</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Bonvalot</surname>
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Balmino</surname>
            <given-names>G.</given-names>
          </string-name>
          ,
          <article-title>Briais A</article-title>
          .,
          <string-name>
            <given-names>M.</given-names>
            <surname>Kuhn</surname>
          </string-name>
          , Peyre tte
          <string-name>
            <given-names>A.</given-names>
            ,
            <surname>Vales</surname>
          </string-name>
          <string-name>
            <given-names>N.</given-names>
            ,
            <surname>Biancale</surname>
          </string-name>
          <string-name>
            <given-names>R.</given-names>
            ,
            <surname>Gabalda</surname>
          </string-name>
          <string-name>
            <given-names>G.</given-names>
            ,
            <surname>Reinquin</surname>
          </string-name>
          <string-name>
            <given-names>F.</given-names>
            ,
            <surname>Sarrailh</surname>
          </string-name>
          <string-name>
            <surname>M.</surname>
          </string-name>
          : World Gravity Map.
          <article-title>Commission for the Geological Map of the World, Eds. BGI-CGMW-CNES-</article-title>
          <string-name>
            <surname>IRD</surname>
          </string-name>
          , Paris (
          <year>2012</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>