<!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>Memory E cient Algorithm for Solving the Inverse Problem of Finding a Density in a Curvilinear Layer</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Elena N. Akimova</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>(ORCID</string-name>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladimir E. Misilov</string-name>
          <email>v.e.misilov@urfu.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
          <xref ref-type="aff" rid="aff1">1</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maxim S. Arguchinsky</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Krasovskii Institute of Mathematics and Mechanics, Ural Branch of RAS</institution>
          ,
          <addr-line>Ekaterinburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
        <aff id="aff1">
          <label>1</label>
          <institution>Ural Federal University</institution>
          ,
          <addr-line>Ekaterinburg</addr-line>
          ,
          <country country="RU">Russia</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>A memory e cient algorithm is constructed and implemented for solving the inverse problem of nding a variable density in a curvilinear layer using gravitational data. The algorithm is based on the stabilized biconjugated gradient method. The modi cation based on approximation of the SLAE matrix by Toeplitz-block-Toeplitz one signi cantly reduces memory requirements. The parallel algoritms were implemented for the Uran supercomputer using the hybrid MPI+OpenMP technology. A model problem with synthetic data was solved.</p>
      </abstract>
      <kwd-group>
        <kwd>density reconstruction problem</kwd>
        <kwd>linear inverse problem</kwd>
        <kwd>illposed problems</kwd>
        <kwd>SLAE</kwd>
        <kwd>Toeplitz matrix</kwd>
        <kwd>BiCGSTAB method</kwd>
        <kwd>parallel computing</kwd>
        <kwd>MPI</kwd>
        <kwd>OpenMP</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>The problem of nding a density in a horizontal or curvilinear layer between
given depths was studied in works [1{7]. Solution process consists in two
separate steps. The rst one is to extract approximately anomalous e ect of the
considered layer from the observed gravitational eld using special technique [3].
This technique was implemented for various multiprocessor systems [5, 6]. The
extracted eld is the right part of an integral equation of the desired density.
After discretization of the area and approximation of the integral operator, both
of these steps are reduced to solving ill-conditioned systems of linear algebraic
equations.</p>
      <p>In work [7], a parallel algoritm for solving density reconstruction problem was
created on the basis of the stabilized biconjugate gradient (BiCGSTAB) method
and implemented for multicore processor using the OpenMP technology.</p>
      <p>In this work, this algorithm is implemented using the hybrid MPI+OpenMP
technology for the Uran supercomputer installed at the Krasovskii Institute of
Mathematics and Mechanics.</p>
      <p>The memory e cient algoritm for solving this problem is constructed and
implemented for multicore processor. The modi cation based on approximation
of the SLAE matrix by Toeplitz-block-Toeplitz one signi cantly reduces memory
requirements.</p>
    </sec>
    <sec id="sec-2">
      <title>Statement of density reconstruction problem</title>
      <p>Let us assume a Cartesian coordinate system where plane x0y coincides with
the Earth's surface, and axis z is directed downwards.</p>
      <p>The vertical attraction of gravity g(x; y; 0) generated by the layer
= f(x; y; z) : H1(x; y) 6 z 6 H2(x; y)g is given by the following equation [7]:
f</p>
      <p>Z1 Z1
1 1
p(x
p(x
x0)2
x0)2</p>
      <p>1
(y</p>
      <p>1
(y
y0)2</p>
      <p>H12(x; y)
y0)2</p>
      <p>
        H22(x; y)
(x0; y0)dx0dy0 =
g(x; y; 0);
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        )
where f is the gravitational constant, (x; y) is the density distribution in the
layer.
      </p>
      <p>Let us assume that the boundary surfaces H1(x; y) and H2(x; y) satisfy the
conditions H1(x; y) &lt; H2(x; y), 8(x; y) 2 R2, lim Hi(x; y) = const, and
x;y! 1
the density is constant in areas (x; y; z) : H1 6 z 6 H1(x; y) and (x; y; z) :
H2(x; y) 6 z 6 H2 , where H1 = min H1(x; y) and H2 = max H2(x; y).</p>
      <p>x;y x;y</p>
      <p>
        Problem (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) is a linear two-dimensional Fredholm integral equation of the
rst kind of (x; y); thus, the problem is ill-posed.
      </p>
      <p>
        After discretization on a grid n = M N and approximation of the integral
operator using quadrature formulae, expression (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) takes the following form
      </p>
      <p>N M
f X X
u 2 [1::M ]; v 2 [1::N ]:
is the regularization parameter.</p>
    </sec>
    <sec id="sec-3">
      <title>Algorithms for solving the problem and their parallel implementation</title>
      <p>
        BiCGSTAB algoritm. For solving system (
        <xref ref-type="bibr" rid="ref3">3</xref>
        ), we use BiCGSTAB algoritm
(Fig.1) [8]. In work [7], we showed that this method is the most e cient of
iterative gravient methods for solving SLAE with nonsymmetric matrix.
r0 = b Az0; r = r0;
for(k = 0; k + +; )do
k = hr; r(k
1)i;
      </p>
      <p>k =
qk = rk 1 +
k(qk 1
!k 1vk 1)
k</p>
      <p>k 1
k 1 !k</p>
      <p>1
0 =
0 = !0 = 1;
v0 = q0 = 0
vk = Aqk;
sk = rk 1
tk = Ask;
zk = zk 1 + !ksk +
enddo
k =
kvk</p>
      <p>k
hr; vki
! = htk; ski
htk; tki
k k
q ;
rk = sk</p>
      <p>k k
! t</p>
      <p>The initial estimate is z0 = 0. The condition Azk b = kbk &lt; " for some
su ciently small " is taken as a termination criterion.</p>
      <p>For large ne grids, storing of coe cient matrix A can take large memory
space. E.g., for the 29 29 grid, the matrix would be of 218 218 dimension. Full
storage of this matrix with double precision requires 512 GB of memory, which
is more than one node of the Uran supercomputer has.</p>
      <p>For solving the density reconstruction problem using the BiCGSTAB method,
a parallel algoritm was developed utilizing the MPI technology. The coe cient
matrix A is divided by a number of horizontal bars with respect to the number
of used nodes, and each bar is stored and processed on its own node. The
hybrid MPI+OpenMP technology was used to parallelize the algoritm for nodes'
multicore processors.</p>
      <p>Memory e cient algoritm. In work [6], the memory-e cient algoritm for
solving the density reconstrustion problem in a horizontal layer was proposed
and implemented for multicore processor. This algoritm is based on exploiting
the Toeplitz-block-Toeplitz structure of the coe cient matrix.</p>
      <p>
        The elements of matrix can be written in the following form:
ak;p;l;q =
x y
p(xk
p(xk
1
1
xl)2 + (yp
xl)2 + (yp
yq)2 + H12
yq)2 + H22
;
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        )
where k; l = 1::M are the block indices and p; q = 1::N are the indices of elements
inside each block.
      </p>
      <p>Apparently, the matrix elements depend only on the terms (xk xl)2 + (yp
yq)2. Note that ak;p;l;q = ak;p+1;l;q+1 and ak;p;l;q = ak+1;p;l+1;q. The former
equation means that in each block each descending diagonal from left to right is
constant. The latter one means that each block diagonal is constant as well. In
other words, the matrix is symmetric Toeplitz-block-Toeplitz.</p>
      <p>The matrix structure for a 6 4 grid is shown in Fig. 2. The matrix has 4 4
blocks of 6 6 dimension. Equal elements are marked by the same colors.</p>
      <p>The obvious way of storing this matrix is to store the rst row only. Each
subsequent row is obtained by double cycle shifting of elements. This method
requires storing M N elements, whilst full storage requires M 2 N 2.</p>
      <p>In the case of a curvilinear layer, the matrix elements will have the form
ak;p;l;q =
x y
q(xk
q(xk
1
1
xl)2 + (yp</p>
      <p>
        yq)2 + H12;(p 1)M+k
xl)2 + (yp
yq)2 + H22;(p 1)M+k
;
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        )
where H1;(p 1)M+k and H2;(p 1)M+k are the values of depth of the boundary
surfaces at the grid nodes. Obviously, these values vary, thus, matrix A will not
be Toeplitz-block-Toeplitz.
      </p>
      <p>
        In this work, we propose the following way to store this matrix approximately.
Note that the farther the matrix element is from the main diagonal, the lower
its value is. We compute the elements of the main block diagonal (i.e., elements
that has p = q) using formula (
        <xref ref-type="bibr" rid="ref5">5</xref>
        ), and the rest of the elements are replaced by
their approximations computed by using formula (
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) with some constant values
      </p>
      <p>MN
H1 and H2. The mean values Hw = P Hw;i=M N can be used.</p>
      <p>i=1</p>
      <p>The number of stored elements will be M (N 2 + 1). E.g, to store the 218 218
matrix, we need only 256 MB instead of 512 GB needed for full storage. Thus,
to solve the problem using this algorithm, we need only one node with multicore
processor. The algorithm was implemented utilizing the OpenMP technology
4</p>
    </sec>
    <sec id="sec-4">
      <title>Numerical experiments</title>
      <p>Let us demonstrate application of the constructed algorithms to solving the
model density reconstruction problem on a large grid.</p>
      <p>The model problem of reconstructing the density distribution in a curvilinear
layer between the depths H1 = 9:5 km and H2 = 11:5 km is considered.</p>
      <p>The boundary surfaces are shown in Fig. 3.</p>
      <p>
        Figure 4 shows the model gravitational eld. This eld was obtained by
solving the forward problem (
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) using the model density distribution (x; y).
      </p>
      <p>The inverse problem was solved on 29 29 grid by the BiCGSTAB algorithm
and the memory e cient algorithm as described above.</p>
      <p>Figure 5b shows the reconstructed density distribution ^. The regularization
parameter was = 0:1, " = 0:005 was used as termination criterion.</p>
      <p>Solution by the memory e cient algorithm has a relative error k^ k = k k
not greater than the error of solution by the unmodi ed BiCGSTAB. Both errors
are lower than 0:05.</p>
      <p>Table 1 shows the computing times for solving the problem by the
BiCGSTAB method using the MPI technology with the Uran supercomputer. Each of
supercomputer's nodes has Intel E5-2650 CPU and 192 GB of RAM. One core
was used on each node. The coe cient matrix requires 512 GB for full storage.
Thus, to solve the problem, we need at least 4 nodes.</p>
      <p>The last table line contains the time to solve the problem utilizing the
hybrid MPI+OpenMP technology with 8 cores at each node. The computing time
reduces to 20 seconds and the e ciency of this technology was 70 %.</p>
      <p>The memory e cient algorithm requires 256 MB to store matrix; thus, to
solve the problem, we need only one node with multicore processor.</p>
      <p>Table 2 shows computing times, parallel speedup, and e ciency for solving
the problem by the memory e cient algorithm using the node with two
eightcore Intel E5-2650 CPUs. The parallel algoritm show good scaling.
1.5
{
1.9
3.7
7.4</p>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>The memory e cient parallel algoritm was constructed on the basis of the
BiCGSTAB method for solving the inverse problem of density reconstruction in a
curvilinear layer. The modi cation is based on approximation of matrix blocks
by the blocks of Toeplitz-block-Toeplitz matrix. Optimized method for matrix
storage signi cantly reduces the memory requirements.</p>
      <p>The parallel programs were developed for solving the inverse problem of
density reconstruction in a curvilinear layer on the Uran supercomputer.</p>
      <p>The rst program is based on BiCGSTAB algorithm with full matrix storage
using the hybrid MPI+OpenMP technology. The second program is based on the
memory e cient algorithm with optimized matrix storage utilizing the OpenMP
technology.</p>
      <p>The model problem with synthetic data was solved, the speedup and e
ciency of parallel algorithms was studied.</p>
    </sec>
    <sec id="sec-6">
      <title>Acknowledgments</title>
      <p>This work was partly supported by the Center of Excellence \Geoinformation
technologies and geophisical data complex interpretation" of the Ural Federal
University Program and by Ural Branch of RAS, project 18-1-1-8.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Lavrentiev</surname>
            ,
            <given-names>M. M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Romanov</surname>
            ,
            <given-names>V. G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Shishatskii</surname>
            ,
            <given-names>S. P.</given-names>
          </string-name>
          : Ill-Posed
          <source>Problems of Mathematical Physics and Analysis. Translations of Math. Monographs 64. Amer. Math. Soc.</source>
          ,
          <string-name>
            <surname>Providence</surname>
          </string-name>
          (
          <year>1986</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Novoselitskii</surname>
            ,
            <given-names>V. M.</given-names>
          </string-name>
          :
          <article-title>On the Theory of Determining Density Variations in a Horizontal Layer from Gravity Anomaly Data</article-title>
          .
          <source>Izv. Akad. Nauk SSSR, Fiz. Zemli</source>
          . Vol.
          <volume>5</volume>
          ,
          <issue>25</issue>
          {
          <fpage>32</fpage>
          (
          <year>1965</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Martyshko</surname>
            ,
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Prutkin</surname>
            ,
            <given-names>I. L.</given-names>
          </string-name>
          :
          <article-title>Technology of depth distribution of gravitational eld sources (in Russian)</article-title>
          .
          <source>Geophysicheskii Journal</source>
          . Vol.
          <volume>25</volume>
          (
          <issue>3</issue>
          ),
          <volume>159</volume>
          {
          <fpage>168</fpage>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Martyshko</surname>
            ,
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Koksharov</surname>
            ,
            <given-names>D. E.</given-names>
          </string-name>
          :
          <article-title>On nding the density in a layered medium using gravitational data (in Russian)</article-title>
          .
          <source>Geophysicheskii Journal</source>
          . Vol.
          <volume>27</volume>
          (
          <issue>4</issue>
          ),
          <volume>678</volume>
          {
          <fpage>684</fpage>
          (
          <year>2005</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>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>
          . Vol.
          <volume>50</volume>
          (
          <issue>4</issue>
          ),
          <volume>508</volume>
          {
          <fpage>513</fpage>
          (
          <year>2014</year>
          ) https://doi.org/10.1134/S1069351314040090
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <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>
          ,
          <string-name>
            <surname>Kosivets</surname>
            ,
            <given-names>R. A.</given-names>
          </string-name>
          :
          <article-title>An e cient numerical technique for solving the inverse gravity problem of nding a lateral density</article-title>
          .
          <source>Applied Mathematics and Information Sciences</source>
          . Vol.
          <volume>10</volume>
          ,
          <string-name>
            <surname>Iss</surname>
          </string-name>
          .
          <volume>5</volume>
          ,
          <issue>1681</issue>
          {
          <fpage>1688</fpage>
          (
          <year>2016</year>
          ) http://doi.org/10.18576/amis/100506
        </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>Martyshko</surname>
            ,
            <given-names>P. S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Misilov</surname>
          </string-name>
          , V. E.:
          <article-title>On nding a density in a curvilinear layer by biconjugate gradient type methods</article-title>
          .
          <source>AIP Conference Proceedings</source>
          . Vol.
          <year>1863</year>
          ,
          <volume>050009</volume>
          (
          <year>2017</year>
          ) https://doi.org/10.1063/1.4992206
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Van der Vorst</surname>
          </string-name>
          , H. A.:
          <article-title>Iterative Krylov methods for large linear systems</article-title>
          . Vol.
          <volume>13</volume>
          . Cambridge University Press (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>