<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article  PUBLIC "-//NLM//DTD Journal Publishing DTD v3.0 20080202//EN" "http://dtd.nlm.nih.gov/publishing/3.0/journalpublishing3.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" dtd-version="3.0" xml:lang="en" article-type="research article"><front><journal-meta><journal-id journal-id-type="publisher-id">IJG</journal-id><journal-title-group><journal-title>International Journal of Geosciences</journal-title></journal-title-group><issn pub-type="epub">2156-8359</issn><publisher><publisher-name>Scientific Research Publishing</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="doi">10.4236/ijg.2015.68070</article-id><article-id pub-id-type="publisher-id">IJG-58874</article-id><article-categories><subj-group subj-group-type="heading"><subject>Articles</subject></subj-group><subj-group subj-group-type="Discipline-v2"><subject>Earth&amp;Environmental Sciences</subject></subj-group></article-categories><title-group><article-title>
 
 
  A study on Parallel Computation Based on Finite Element Forward Modeling of 2D Magnetotelluric
 
</article-title></title-group><contrib-group><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>ao</surname><given-names>Wang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref><xref ref-type="corresp" rid="cor1"><sup>*</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Handong</surname><given-names>Tan</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Changhong</surname><given-names>Lin</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Xiao</surname><given-names>Liu</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib><contrib contrib-type="author" xlink:type="simple"><name name-style="western"><surname>Zhiyong</surname><given-names>Zhang</given-names></name><xref ref-type="aff" rid="aff1"><sup>1</sup></xref></contrib></contrib-group><aff id="aff1"><addr-line>School of Geophysics and Geoinformation Technology, China University of Geosciences, Beijing, China</addr-line></aff><author-notes><corresp id="cor1">* E-mail:<email>wangmao@cugb.edu.cn(AW)</email>;</corresp></author-notes><pub-date pub-type="epub"><day>07</day><month>08</month><year>2015</year></pub-date><volume>06</volume><issue>08</issue><fpage>863</fpage><lpage>868</lpage><history><date date-type="received"><day>13</day>	<month>June</month>	<year>2015</year></date><date date-type="rev-recd"><day>accepted</day>	<month>16</month>	<year>August</year>	</date><date date-type="accepted"><day>19</day>	<month>August</month>	<year>2015</year></date></history><permissions><copyright-statement>&#169; Copyright  2014 by authors and Scientific Research Publishing Inc. </copyright-statement><copyright-year>2014</copyright-year><license><license-p>This work is licensed under the Creative Commons Attribution International License (CC BY). http://creativecommons.org/licenses/by/4.0/</license-p></license></permissions><abstract><p>
 
 
  Magnetotelluric sounding method based on the difference of the rock’s resistivity is an exploration method about doing research in earth’s resistivity and phase using the native electromagnetic field. The paper adopts 2D finite element method as the magnetotelluric forward method and calculates the total field by primary field (also named background field) plus secondary field. We can
   
  get more accurate forward result through the finite element method and we can get the result effected by the dense degree of grid slightly by the total field. But the method is not effective
   
  enough when the model is divided into relative big grid. When the frequency changes, program solves relevant equation separately. According to the feature of the algorithm, we apply MPI parallel method in the algorithm. Every process solves relevant equation. The account of frequency
   
  that a process needs to solve in parallel computation is less than the account that the process
   
  needs to solve in serial algorithm. We can see that the forward result is the same with the serial algorithm and proves the correctness of algorithm. We do statistics about the efficiency of the parallel algorithm. When the account of processes is from 2 to 8, the speedup is from 1.63 to 2.64. It proves the effectiveness of the parallel algorithm.
 
</p></abstract><kwd-group><kwd>Magnetotelluric</kwd><kwd> 2D Forward Modeling</kwd><kwd> Finite Element</kwd><kwd> Parallel Algorithm</kwd><kwd> Total Field</kwd></kwd-group></article-meta></front><body><sec id="s1"><title>1. Introduction</title><p>Magnetotelluric sounding method is a natural electromagnetic field exploration method [<xref ref-type="bibr" rid="scirp.58874-ref1">1</xref>] . The natural field contains different frequencies from high to low and electromagnetic wave has different penetration depth with different frequencies [<xref ref-type="bibr" rid="scirp.58874-ref2">2</xref>] , so the method can explore the depth of the target [<xref ref-type="bibr" rid="scirp.58874-ref3">3</xref>] . Because the method has many advantages such as exploring deeply, avoiding the impact of high resistivity body and being sensitive to the low resistivity layer, more and more people do research on it [<xref ref-type="bibr" rid="scirp.58874-ref1">1</xref>] .</p><p>With the development of computer technology, 2D magnetotelluric forward modeling is becoming mature; 2D finite element [<xref ref-type="bibr" rid="scirp.58874-ref4">4</xref>] [<xref ref-type="bibr" rid="scirp.58874-ref5">5</xref>] magnetotelluric forward can get more accurate results and solve the rough terrains problem. Zeng has developed the algorithm of magnetotelluric forward modeling [<xref ref-type="bibr" rid="scirp.58874-ref3">3</xref>] in 2008. Xie has developed the algorithm of magnetotelluric forward modeling [<xref ref-type="bibr" rid="scirp.58874-ref6">6</xref>] with terrain in 2007. Liu has developed the algorithm of magnetotelluric forward modeling [<xref ref-type="bibr" rid="scirp.58874-ref7">7</xref>] based on second field. However, it costs more time when the 2D magnetotelluric program computes relatively big grid and the forward algorithm is called for dozens of times; thus, we need to develop an effective algorithm.</p><p>We have developed the parallel algorithm in order to solve the problem of forward modeling in the paper. I will introduce the algorithm.</p></sec><sec id="s2"><title>2. Methodology</title><p>2D finite element magn<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x5.png" xlink:type="simple"/></inline-formula> (1)</p><p>etotelluric forward modeling.</p><p>Maxwell equations</p><disp-formula id="scirp.58874-formula1074"><label>(2)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x6.png"  xlink:type="simple"/></disp-formula><p>X axis is parallel with the target, Y axis is vertical to the target, Z axis is vertical to the ground. When the angular frequency is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x7.png" xlink:type="simple"/></inline-formula> and time factor is <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x8.png" xlink:type="simple"/></inline-formula> [<xref ref-type="bibr" rid="scirp.58874-ref3">3</xref>] , the field equation is shown as follows [<xref ref-type="bibr" rid="scirp.58874-ref8">8</xref>] .</p><p>TE mode:</p><disp-formula id="scirp.58874-formula1075"><label>(3)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x9.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1076"><label>(4)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x10.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1077"><label>(5)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x11.png"  xlink:type="simple"/></disp-formula><p>TM mode:</p><disp-formula id="scirp.58874-formula1078"><label>(6)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x12.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1079"><label>(7)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x13.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1080"><label>(8)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x14.png"  xlink:type="simple"/></disp-formula><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x15.png" xlink:type="simple"/></inline-formula>is the electric field toward x direction, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x16.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x17.png" xlink:type="simple"/></inline-formula> are the magnetic field toward y direction and z direction.</p><p>I will introduce the theory in TE mode.</p><p>In theory of electromagnetic fields the electromagnetic fields is divided into the primary electromagnetic field and second electromagnetic field. The primary electromagnetic field is the field when there is no target in the ground. The second electromagnetic field is the field caused by the target. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x18.png" xlink:type="simple"/></inline-formula>is the primary electric field of x direction, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x19.png" xlink:type="simple"/></inline-formula>and <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x20.png" xlink:type="simple"/></inline-formula> is the primary magnetic field of y and z direction. When there is no target in the ground, the equation is shown as follows.</p><disp-formula id="scirp.58874-formula1081"><label>(9)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x21.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1082"><label>(10)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x22.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1083"><label>(11)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x23.png"  xlink:type="simple"/></disp-formula><p>When there is a target in the ground, total field equation minus primary field equation equals second field [<xref ref-type="bibr" rid="scirp.58874-ref9">9</xref>] equation. The resistivity of target minus the background resistivity equals<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula>. <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula>is the second electric field of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x26.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x27.png" xlink:type="simple"/></inline-formula>is the second magnetic field of<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x28.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x29.png" xlink:type="simple"/></inline-formula>is the second magnetic field of <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x24.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x25.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x26.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x27.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x28.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x29.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x30.png" xlink:type="simple"/></inline-formula></p><disp-formula id="scirp.58874-formula1084"><label>(12)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x31.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1085"><label>(13)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x32.png"  xlink:type="simple"/></disp-formula><disp-formula id="scirp.58874-formula1086"><label>(14)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x33.png"  xlink:type="simple"/></disp-formula><p>Substituting Equations (12) and (13) into Equation (14), we get the helmohoz equation.</p><disp-formula id="scirp.58874-formula1087"><label>(15)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x34.png"  xlink:type="simple"/></disp-formula><p>Multiply both side of the equation by v, integrate the equation.</p><disp-formula id="scirp.58874-formula1088"><label>(16)</label><graphic position="anchor" xlink:href="http://html.scirp.org/file/6-2801050x35.png"  xlink:type="simple"/></disp-formula><p>When there is no target in the ground , we solve the 1D magnetotelluric equation [<xref ref-type="bibr" rid="scirp.58874-ref10">10</xref>] and get<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x36.png" xlink:type="simple"/></inline-formula>.</p><p>Divide the ground into M &#215; N grid and every rectangle is divided into 4 triangles. Through isoparametric element transformation of the equation, we put the element into the matrix A [<xref ref-type="bibr" rid="scirp.58874-ref11">11</xref>] . We get the equation A</p><p><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x37.png" xlink:type="simple"/></inline-formula>and solve the equation, we get<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x38.png" xlink:type="simple"/></inline-formula>.<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x39.png" xlink:type="simple"/></inline-formula>. Substituting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x37.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x38.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x39.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x40.png" xlink:type="simple"/></inline-formula> into equation 3, 4,</p><p>5, we get<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x41.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x41.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x42.png" xlink:type="simple"/></inline-formula>and the apparent resistivity of every observed point.</p></sec><sec id="s3"><title>3. Experiment</title><sec id="s3_1"><title>3.1. The Overall Design of Parallel Computation of 2D Magnetotelluric</title><p>Through analyzing the algorithm of forward, for example 9 frequencies, because the frequency is different, the matrix A is different in equation Ax = b. We need to solve equation for 9 times. In parallel algorithm (such as 4 processes), every process needs to solve equation for 3 times at most. However, in serial algorithm (only 1 process) the process needs to solve equation for 9 times. The less the times (the process needs to solve equation) are, the program running time is less, the parallel efficiency is higher.</p><p>The 9 frequencies are from freq (1) to freq (9). The value is 100, 31.6, 10, 3.16, 1, 0.316, 0.1, 0.0316, 0.01 hz. The higher the frequency is, the less the time of solving the equation is. There are two kinds of processes in the algorithm. One type is the main process, the other type is subprocess. 0 process is the main process. It aims to distribute the tasks, broadcast the global data, gather the result and output the files. The subprocesses aims to receive data from the main process, perform tasks and send the result to the main process. In order to perform more tasks, the main process performs a small task. We will introduce the performing process.</p><p>1) MPI_INIT(), Init the parallel environment, the 0 process reads the frequency, model file and the observed data. MPI_Bcast() [<xref ref-type="bibr" rid="scirp.58874-ref12">12</xref>] , it broadcasts the data to the other processes.</p><p>2) <xref ref-type="table" rid="table1">Table 1</xref>, the relevant frequencies of a process, is shown as follows. All processes are assigned to calculate the data of the relevant frequencies separately. We get the primary field <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x43.png" xlink:type="simple"/></inline-formula> and Substitute <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x44.png" xlink:type="simple"/></inline-formula> into Equation (9) and (10) to get<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x45.png" xlink:type="simple"/></inline-formula>,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x43.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x44.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x45.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x46.png" xlink:type="simple"/></inline-formula>. Through isoparametric element transformation of the equation, we get the matrix A of the relevant frequencies.</p><table-wrap id="table1" ><label><xref ref-type="table" rid="table1">Table 1</xref></label><caption><title> The relevant frequencies of a process</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >Process ID</th><th align="center" valign="middle" >The frequency</th></tr></thead><tr><td align="center" valign="middle" >0</td><td align="center" valign="middle" >Freq (1), freq (7)</td></tr><tr><td align="center" valign="middle" >1</td><td align="center" valign="middle" >Freq (2), freq(3), freq (6)</td></tr><tr><td align="center" valign="middle" >2</td><td align="center" valign="middle" >Freq (4), freq (8)</td></tr><tr><td align="center" valign="middle" >3</td><td align="center" valign="middle" >Freq (5), freq (9)</td></tr></tbody></table></table-wrap><p>3) we solve the equation A<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula>by gauss method and we get the second electric field <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula> of every observed point. Substituting <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula> into Equation (12) and (13), we get<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula>,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x52.png" xlink:type="simple"/></inline-formula>.<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x53.png" xlink:type="simple"/></inline-formula>, <inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x53.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x54.png" xlink:type="simple"/></inline-formula>,<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x53.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x55.png" xlink:type="simple"/></inline-formula>. The apparent resistivity is<inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x47.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x48.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x49.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x50.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x51.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x52.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x53.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x54.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x55.png" xlink:type="simple"/></inline-formula><inline-formula><inline-graphic xlink:href="http://html.scirp.org/file/6-2801050x56.png" xlink:type="simple"/></inline-formula>, All processes are assigned to get apparent resistivity of the relevant frequencies separately. We get the value of m_mpi in each process. MPI_gatherv() [<xref ref-type="bibr" rid="scirp.58874-ref12">12</xref>] , 0 process gathers m_mpi of other processes in m_all, m_all has 9 m _mpi and the sequence is 1, 7, 2, 3, 6, 4, 8, 5, 9. We sort the m_all and get the m.</p><p>4) 0 process writes the resistivity data to the file, MPI_FINALIZE() finalize the MPI environment.</p></sec><sec id="s3_2"><title>3.2. The Program Is Developed in the Environment</title><p>OS: windows xp 64 bit;</p><p>CPU: intel core i7 3.2 GHz support 8 processes;</p><p>Memory: 8 GB;</p><p>Develop language: fortran;</p><p>Compiler: Compaq fortran;</p><p>Parallel environment: mpich2;</p><p>Command: Mpiexec-np N./mt2d N is the number of processes.</p></sec></sec><sec id="s4"><title>4. Result and Discussions</title><sec id="s4_1"><title>4.1. Low Resistivity Model</title><p>The depth of the target is 1000 m from the ground, the size is 500 m &#215; 250 m. Background resistivity is 100 W&#215;m. The resistivity of the target is 10 W&#215;m. The size of the model’s grid is 100 &#215; 100; the observed position is 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70 point on the ground. 9 frequencies are from 0.01 Hz to 100 Hz. We get the forward results from the parallel program and compare the forward result of two programs when the frequency is 10 hz in <xref ref-type="fig" rid="fig1">Figure 1</xref>.</p><p>In <xref ref-type="fig" rid="fig1">Figure 1</xref>, the horizontal axis is the serial number of observed point and the vertical axis is the apparent resistivity. express the result of parallel computation as o，express the result of normal computation as +, the result is the same.</p></sec><sec id="s4_2"><title>4.2. Validity of the Result</title><p>The parallel computation is based on the serial program. According to the characteristics, that program solves equation for different frequency separately; it distributes the tasks to all processes and never changes other algorithm, so the parallel computation result is the same with the serial program’s result. The study compares the forward result of two programs in <xref ref-type="fig" rid="fig1">Figure 1</xref>; the result is the same, so it proves the validity of the program.</p></sec><sec id="s4_3"><title>4.3. Discussions of Parallel Efficiency</title><p>In order to evaluate the efficiency of the parallel program for different account of processes, we calculate parallel speedup and parallel efficiency. The running time of serial program divided by the running time of parallel for N processes is Parallel speedup, parallel speedup devided by the number of processes N is parallel efficiency. <xref ref-type="table" rid="table2">Table 2</xref> is the statistics of the running time for the algorithm of 2D magnetotelluric forward modeling in TE</p><fig id="fig1"  position="float"><label><xref ref-type="fig" rid="fig1">Figure 1</xref></label><caption><title> Forward result figure</title></caption><graphic mimetype="image"   position="float"  xlink:type="simple"  xlink:href="http://html.scirp.org/file/6-2801050x57.png"/></fig><table-wrap id="table2" ><label><xref ref-type="table" rid="table2">Table 2</xref></label><caption><title> The statistics of the running time for the algorithm</title></caption><table><tbody><thead><tr><th align="center" valign="middle" >The mode of program</th><th align="center" valign="middle" >The amount of processes</th><th align="center" valign="middle" >The amount of the frequency distributed for process</th><th align="center" valign="middle" >The size of 2D grid</th><th align="center" valign="middle" >The running time of program(s)</th><th align="center" valign="middle" >Parallel speedup</th><th align="center" valign="middle" >Parallel efficiency</th></tr></thead><tr><td align="center" valign="middle" >Serial program</td><td align="center" valign="middle" >1</td><td align="center" valign="middle" >9</td><td align="center" valign="middle" >100 &#215; 100</td><td align="center" valign="middle" >94.7</td><td align="center" valign="middle" >empty</td><td align="center" valign="middle" >empty</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >2</td><td align="center" valign="middle" >4, 5</td><td align="center" valign="middle" >100 &#215; 100</td><td align="center" valign="middle" >64.8</td><td align="center" valign="middle" >1.46</td><td align="center" valign="middle" >73%</td></tr><tr><td align="center" valign="middle" >Parallel</td><td align="center" valign="middle" >4</td><td align="center" valign="middle" >2, 3, 2, 2</td><td align="center" valign="middle" >100 &#215; 100</td><td align="center" valign="middle" >44.7</td><td align="center" valign="middle" >2.12</td><td align="center" valign="middle" >53%</td></tr><tr><td align="center" valign="middle" >program</td><td align="center" valign="middle" >6</td><td align="center" valign="middle" >1, 2, 2, 2, 1, 1</td><td align="center" valign="middle" >100 &#215; 100</td><td align="center" valign="middle" >34.3</td><td align="center" valign="middle" >2.76</td><td align="center" valign="middle" >46%</td></tr><tr><td align="center" valign="middle" ></td><td align="center" valign="middle" >8</td><td align="center" valign="middle" >1, 2, 1, 1, 1, 1, 1, 1</td><td align="center" valign="middle" >100 &#215; 100</td><td align="center" valign="middle" >41.2</td><td align="center" valign="middle" >2.3</td><td align="center" valign="middle" >28.75%</td></tr></tbody></table></table-wrap><p>mode.</p><p>Analysis of <xref ref-type="table" rid="table2">Table 2</xref> shows that the efficiency is the highest when the number of processes is 2. The speedup changes slightly and the efficiency declines when the number of processes changes from 6 to 8. Because the communication of the processes occupy more time and both of the second process need to solve equation for 2 times when the number of processes increases from 6 to 8. We can see that the effect of parallel algorithm is very obvious. We will do further study for the efficiency of the algorithm.</p></sec></sec><sec id="s5"><title>5. Conclusion</title><p>The computation of 2D finite element magnetotelluric forward for relatively big grid spends much time and the forward algorithm is called for dozens of times, so the key to the problems is parallel computation. The study realizes the parallel algorithm for 2D finite element magnetotelluric forward in the MPI environment. The algorithm is proved correct and efficient. The study lays the foundation for the parallel computation for 2D finite element magnetotelluric forward and inversion.</p></sec><sec id="s6"><title>Cite this paper</title><p>MaoWang,HandongTan,ChanghongLin,XiaoLiu,ZhiyongZhang, (2015) A study on Parallel Computation Based on Finite Element Forward Modeling of 2D Magnetotelluric. International Journal of Geosciences,06,863-868. doi: 10.4236/ijg.2015.68070</p></sec></body><back><ref-list><title>References</title><ref id="scirp.58874-ref1"><label>1</label><mixed-citation publication-type="other" xlink:type="simple">Zhdanov, M.S. and Tolstaya, E. (2004) Minimum Support Nonlinear Parametrization in the Solution of a 3D Magnetotelluric Inverse Problem. Inverse Problems, 20, 937-952. http://dx.doi.org/10.1088/0266-5611/20/3/017</mixed-citation></ref><ref id="scirp.58874-ref2"><label>2</label><mixed-citation publication-type="other" xlink:type="simple">Tan, H.D., Yu, Q.F., Booker, J., et al. (2003) Three-Dimensional Rapid Relaxation Inversion for the Magnetotelluric Method. Chinese Journal of Geophysics, 46, 850-855. (In Chinese) http://dx.doi.org/10.1002/cjg2.442</mixed-citation></ref><ref id="scirp.58874-ref3"><label>3</label><mixed-citation publication-type="other" xlink:type="simple">Zeng, G. (2008) 2D Magnetotelluric Forward Modeling. Central South University, Changsha, 5-6.</mixed-citation></ref><ref id="scirp.58874-ref4"><label>4</label><mixed-citation publication-type="other" xlink:type="simple">Xu, S.Z. (1994) The Finite Element Method in Geophysics. Science Press, 15-52. (In Chinese)</mixed-citation></ref><ref id="scirp.58874-ref5"><label>5</label><mixed-citation publication-type="other" xlink:type="simple">Rodi, W.L. (1976) A Technique for Improve the Accuracy of Finite Element Solution for Magnetotelluric Data. Geophysical Journal International, 44, 483-506. http://dx.doi.org/10.1111/j.1365-246X.1976.tb03669.x</mixed-citation></ref><ref id="scirp.58874-ref6"><label>6</label><mixed-citation publication-type="other" xlink:type="simple">Xie, F. (2006) The Study of 2D Magnetotelluric Forward Modeling with Terrain. China University of Geosciences, Wuhan, 9-21.</mixed-citation></ref><ref id="scirp.58874-ref7"><label>7</label><mixed-citation publication-type="journal" xlink:type="simple"><name name-style="western"><surname>Liu</surname><given-names> X.J. </given-names></name>,<etal>et al</etal>. (<year>2007</year>)<article-title>The Study of Magnetotelluric Forward Modeling Based on Second Field</article-title><source> Journal of Tongji University</source><volume> 8</volume>,<fpage> 1113</fpage>-<lpage>1116</lpage>.<pub-id pub-id-type="doi"></pub-id></mixed-citation></ref><ref id="scirp.58874-ref8"><label>8</label><mixed-citation publication-type="other" xlink:type="simple">Nabighian (1998) Electromagnetic Methods. Theory Society of Exploration Geophysicists, 1, 123-143.</mixed-citation></ref><ref id="scirp.58874-ref9"><label>9</label><mixed-citation publication-type="other" xlink:type="simple">Liu, X.J. (2007) The Magnetotelluric Focusing Inversion. Tongji University, Shanghai, 1-42. (In Chinese)</mixed-citation></ref><ref id="scirp.58874-ref10"><label>10</label><mixed-citation publication-type="other" xlink:type="simple">Shi, Y.J. (1985) Magnetotelluric Sounding Method. School of Information Technology, Chengdu University of Technology, Chengdu, 50-53.</mixed-citation></ref><ref id="scirp.58874-ref11"><label>11</label><mixed-citation publication-type="other" xlink:type="simple">Zhou, X.X. (1986) The Numerical Simulation Technology of Electrical Prospecting. Sichuan Science and Technology Press, Chengdu, 57-85.</mixed-citation></ref><ref id="scirp.58874-ref12"><label>12</label><mixed-citation publication-type="other" xlink:type="simple">Du, Z.H. (2001) Parallel Computation Technology.</mixed-citation></ref></ref-list></back></article>