<!-- Piwik -->
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "http://www.piwik.tuncbahcecioglu.com/" : "http://www.piwik.tuncbahcecioglu.com/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 1);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://www.piwik.tuncbahcecioglu.com/piwik.php?idsite=1" style="border:0" alt=""/></p></noscript>

<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Tunç Bahçecioğlu &#187; parallel</title>
	<atom:link href="http://www.tuncbahcecioglu.com/posts/category/coding/parallel-coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tuncbahcecioglu.com</link>
	<description>carpe omnium</description>
	<lastBuildDate>Wed, 25 Nov 2009 06:51:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>MPI Debugging with Visual Studio</title>
		<link>http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/#comments</comments>
		<pubDate>Mon, 17 Aug 2009 15:16:40 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[mpishim]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/</guid>
		<description><![CDATA[Quick article about debugging your parallel applications with Visual Studio Open your project properties, and go to Configuration Properties-&#62;Debugging &#160; All we have to do is to fill 3 textboxes: MPIRun Command is the path + filename of your mpirun applcation(usually mpiexec.exe or mpirun.exe), In my case it is &#34;c:\Program Files\MPICH2\bin\mpiexec.exe&#34; (do not forget the [...]]]></description>
			<content:encoded><![CDATA[<p>Quick article about debugging your parallel applications with Visual Studio</p>
<p>Open your project properties, and go to Configuration Properties-&gt;Debugging</p>
<p>&#160;<a href="http://www.tuncbahcecioglu.com/wp-content/uploads/2009/08/mpi_debugging.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mpi_debugging" border="0" alt="mpi_debugging" src="http://www.tuncbahcecioglu.com/wp-content/uploads/2009/08/mpi_debugging_thumb.jpg" width="485" height="339" /></a></p>
<p> <span id="more-68"></span>
<p>All we have to do is to fill 3 textboxes:</p>
<ol>
<li><strong>MPIRun Command</strong> is the path + filename of your mpirun applcation(usually mpiexec.exe or mpirun.exe), In my case it is <em><u>&quot;c:\Program Files\MPICH2\bin\mpiexec.exe&quot;</u></em> (do not forget the “”). </li>
<li><strong>MPIRun Arguments</strong> are the arguments we want to pass to the mPIRun command, at very least we have to tell mpi the number processes to spawn, so we use <u><em>–n 2</em> </u>for 2 processes (change 2 as you wish). </li>
<li><strong>MPIShim Loacation </strong>is the path + filename of your mpishim.exe file. Mpishim.exe is diffrent for every release of visual studio and platform you have. For example its location for Visual Studio 2005 for 32bit platforms should be <u><em>“C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger\x86”</em></u> </li>
</ol>
<p><em><u><a href="http://www.tuncbahcecioglu.com/wp-content/uploads/2009/08/mpi_debugging_filled.jpg"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="mpi_debugging_filled" border="0" alt="mpi_debugging_filled" src="http://www.tuncbahcecioglu.com/wp-content/uploads/2009/08/mpi_debugging_filled_thumb.jpg" width="500" height="347" /></a></u></em></p>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/" title="send std::string with mpi">send std::string with mpi</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/installing-boost-for-visual-studio/" title="Installing boost for visual studio">Installing boost for visual studio</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>delphi and mpi, closer look 2</title>
		<link>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 11:11:42 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[mpi]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/</guid>
		<description><![CDATA[It is pretty simple to install and use MPI with Delphi, fortunately for us programming the MPI is no bother too. The second part is about calling MPI functions from Delphi. Name Convention No change here. Since we are using a direct translation of the original MPI header, all the original names are there. Sending, [...]]]></description>
			<content:encoded><![CDATA[<p>It is pretty simple to install and use MPI with Delphi, fortunately for us programming the MPI is no bother too.</p>
<p>The second part is about calling MPI functions from Delphi.</p>
<p><span id="more-56"></span></p>
<h3>Name Convention</h3>
<p>No change here. Since we are using a direct translation of the original MPI header, all the original names are there.</p>
<h3>Sending, Receiving Data</h3>
<p>No surprise here too, here are some pointers:</p>
<h5>Variables</h5>
<p>Since MPI needs pointers to variables, use @ operator to get the pointer to your variables.</p>
<p>MPI_Comm_rank(MPI_COMM_WORLD,@myid);</p>
<p>For getting the size of variables use the sizeoff function.</p>
<h5>Arrays</h5>
<p>Again we need the starting address of the arrays.</p>
<p>Lets say we have an array named as “sizeArray”</p>
<p>For dynamic arrays use @(sizeArray[0])</p>
<p>For static arrays use  @(sizeArray[1]) //  assuming the array starts from 1</p>
<h5>Strings</h5>
<p>Since no one knows the memory map of a Delphi string you cannot use them with MPI. You have to go with short strings.</p>
<h3>Debugging</h3>
<p>Bad news here, Delphi has no support for parallel debugging. You have to go with displaying data to screen, or using a log file.</p>
<p>I was going to write a 3rd article about creating parallel applications with GUI, but since it is a general subject I decided to write the article separately, so this series and here.</p>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/" title="send std::string with mpi">send std::string with mpi</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/pugg/" title="pugg">pugg</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/installing-boost-for-visual-studio/" title="Installing boost for visual studio">Installing boost for visual studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/what-i-need-from-delphi-2010/" title="what i need from delphi 2010">what i need from delphi 2010</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>DELPHI and MPI, closer look 1</title>
		<link>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 13:39:45 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[bindings]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[lazarus]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[mpich2]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/</guid>
		<description><![CDATA[Since my small article Delphi and MPI in 4 steps has its own fan base (almost everyday a coder lost in the world wide web visits this page), I decided to give the subject a closer look. In this first part I will take a closer look at the installation process. 1. Install an MPI [...]]]></description>
			<content:encoded><![CDATA[<p>Since my small article <a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/">Delphi and MPI in 4 steps</a> has its own fan base (almost everyday a coder lost in the world wide web visits this page), I decided to give the subject a closer look.</p>
<p>In this first part I will take a closer look at the installation process.</p>
<p><span id="more-42"></span></p>
<p><strong>1. Install an MPI library</strong></p>
<p>MPI itself is not a library but an interface. So you have to find an implementation suiting your needs. <a href="http://www.mcs.anl.gov/research/projects/mpich2/index.php">MPICH2</a> is a long time favorite of mine, as it is free, well developed and documented.</p>
<p>All you have to do download and install the library on every computer of your cluster.</p>
<p><strong>2.Get a Binding</strong></p>
<p>Unfortunately, MPICH2 does not include bindings for Delphi. Fortunately <a href="http://wiki.lazarus.freepascal.org/MPICH">Lazarus</a> people created a pascal file  from the c include files that we can use.</p>
<p>You can find the slightly changed version of this file here <a class="downloadlink" href="http://www.tuncbahcecioglu.com/files/mpi.pas" title="Version1.0 downloaded 65 times" >Delphi mpi bindings (65)</a>.  All you need to do is download the file and insert it into your project. Since the dll files from MPICH2 will be in a path where Windows can find no other action is necessary.</p>
<p><strong>3.Code!</strong></p>
<p>Add uses MPI; to your code, that’s it. Here is a small example:</p>
<pre class="delphi" name="code">
program MPIExample;
uses  MPI;

var myid: integer;
begin
  MPI_Init(nil,nil);
  MPI_Comm_rank(MPI_COMM_WORLD,@myid);
  writeln('id=',myid);
  MPI_Finalize;

end.</pre>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/" title="send std::string with mpi">send std::string with mpi</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/what-i-need-from-delphi-2010/" title="what i need from delphi 2010">what i need from delphi 2010</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</title>
		<link>http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 02:46:21 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[parallel]]></category>
		<category><![CDATA[publication]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[civil-comp]]></category>
		<category><![CDATA[direct solution]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[mumps]]></category>
		<category><![CDATA[pareng]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/</guid>
		<description><![CDATA[This is my latest publication A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems T. Bahcecioglu, S. Ozmen and O. Kurc This paper was presented in PARENG2009 Pecs, Hungary. doi:10.4203/ccp.90.40 Web Page Civil-Comp Proceedings ISSN 1759-3433 CCP: 90 PROCEEDINGS OF THE FIRST INTERNATIONAL CONFERENCE ON PARALLEL, DISTRIBUTED AND GRID COMPUTING FOR [...]]]></description>
			<content:encoded><![CDATA[<p>This is my latest publication</p>
<p>A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</p>
<p>T. Bahcecioglu, S. Ozmen and O. Kurc </p>
<p>This paper was presented in <a href="http://www.civil-comp.com/conf/pareng2009.htm"><span style="text-decoration: underline"><span style="color: #0066cc">PARENG2009</span></span></a> Pecs, Hungary.     <br />doi:10.4203/ccp.90.40     <br /><a href="http://dx.doi.org/10.4203/ccp.90.40"><span style="text-decoration: underline"><span style="color: #800080">Web Page </span></span></a></p>
<p> <span id="more-27"></span><span style="text-decoration: underline"><span style="color: #800080"></span></span>
</p>
<p><span style="text-decoration: underline"><span style="color: #800080"></span></span></p>
<table style="width: 650px" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="500">
<div>Civil-Comp Proceedings
<p>ISSN 1759-3433</p>
</p></div>
<div>CCP: 90
<p>PROCEEDINGS OF THE FIRST INTERNATIONAL CONFERENCE ON PARALLEL, DISTRIBUTED AND GRID COMPUTING FOR ENGINEERING</p>
</p></div>
<div>Edited by: B.H.V. Topping and P. Iványi</div>
<div>Paper 40
<p>A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</p>
</p></div>
<div>T. Bahcecioglu, S. Ozmen and O. Kurc
<p>Department of Civil Engineering, Middle East Technical University, Ankara, Turkey</p>
</p></div>
<div><a href="http://dx.doi.org/10.4203/ccp.90.40"><span style="text-decoration: underline"><span style="color: #800080">doi:10.4203/ccp.90.40</span></span></a></div>
<div><a href="http://www.ctresources.info/ccp/pdf.html?id=5217"><span style="text-decoration: underline"><span style="color: #800080">purchase the full-text of this paper</span></span></a></div>
<div>Full Bibliographic Reference for this paper</div>
<div>T. Bahcecioglu, S. Ozmen, O. Kurc, &quot;A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems&quot;, in B.H.V. Topping, P. Iványi, (Editors), &quot;Proceedings of the First International Conference on Parallel, Distributed and Grid Computing for Engineering&quot;, Civil-Comp Press, Stirlingshire, UK, Paper 40, 2009. doi:10.4203/ccp.90.40</div>
<div>
<div><strong>Keywords:</strong> parallel solution, multi-frontal, substructure, large-scale, PC cluster.</div>
<div>Summary</div>
<div>Parallel solution methods are being implemented in various commercial finite element analysis programs as a consequence of having large-scale structural models and increased affordability and availability of parallel computing environments. The current research on the parallel solution methods based on direct solution mainly focuses on two different kinds of solution strategies: global and domain-by-domain. Global solution strategies focus on the efficient solution of the system of linear equations. They require the entire stiffness matrix to be assembled and distributed to the computers. The domain-by-domain strategies, on the other hand, perform partitioning at the structural level and as a result they parallelize not only the equation solution but also the stiffness matrix generation, assembly, element force and stress computations.
<p>This paper presents a comparative study on two different direct parallel solution strategies for the linear solution of large scale finite element models: global and domain-by-domain. The global solution strategy was examined by utilizing the parallel multi-frontal equation solver, MUMPS [<a href="http://www.ctresources.info/ccp/paper.html?id=5217#bahcecio:1"><span style="text-decoration: underline"><span style="color: #0066cc">1</span></span></a>], together with a finite element program. In a similar manner a substructure based parallel solution framework [<a href="http://www.ctresources.info/ccp/paper.html?id=5217#bahcecio:2"><span style="text-decoration: underline"><span style="color: #0066cc">2</span></span></a>] was utilized for investigating the domain-by-domain strategy.</p>
<p>Various large-scale structural models were solved with both global and domain-by-domain solution strategies in order to illustrate the efficiencies and weaknesses of each solution strategy. The test runs were performed using Windows XP running, a homogeneous PC cluster connected with an ordinary 1 GBit network switch.</p>
<p>The test runs performed for this study indicate that the global solution strategy was more efficient and faster than the domain-by-domain strategy for symmetric and uniform structural models but its efficiency was decreased as the symmetry and uniformity of the models diminished. The performance of the domain-by-domain strategy improved in non-uniform models and produced competitive solution times when compared to the times of the global solution strategy.</p>
<div>References</div>
<dl><a title="bahcecio:1" name="bahcecio:1"></a>1
<dd>P.R. Amestoy, I.S. Duff, J.-Y. L&#8217;Excellent, &quot;Multifrontal parallel distributed symmetric and unsymmetric Solvers&quot;, Comput. Methods Appl. Engrg., 184, 501-520, 2000. <a href="http://dx.doi.org/10.1016/S0045-7825%2899%2900242-X" target="_blank"><span style="text-decoration: underline"><span style="color: #0066cc">doi:10.1016/S0045-7825(99)00242-X</span></span></a> </dd>
<dt><a title="bahcecio:2" name="bahcecio:2"></a>2 </dt>
<dd>O. Kurc, &quot;Parallel Computing in Structural Engineering&quot;, VDM Verlag, Germany, 2008. </dd>
</dl>
</div></div>
</td>
</tr>
</tbody>
</table>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/" title="send std::string with mpi">send std::string with mpi</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>send std::string with mpi</title>
		<link>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 02:12:45 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[std]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/</guid>
		<description><![CDATA[The idea is to send the size of the string first and then allocate the storage on the reciever. Here is an example with broadcast. string s = "before"; int size = 0; if (myRank == 0) { s = "after"; size = s.size(); } BroadCast(&#38;size,1); if (myRank != 0) s.resize(size); BroadCast(s.data(),size); delphi and mpi, [...]]]></description>
			<content:encoded><![CDATA[<p>The idea is to send the size of the string first and then allocate the storage on the reciever. Here is an example with broadcast.</p>
<pre class="brush:cpp">string s = "before";
int size = 0;
if (myRank == 0)
{
   s = "after";
   size = s.size();
}
BroadCast(&amp;size,1);
if (myRank != 0) s.resize(size);
BroadCast(s.data(),size);</pre>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/" title="Delphi and mpi in 4 steps">Delphi and mpi in 4 steps</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/pugg/" title="pugg">pugg</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/installing-boost-for-visual-studio/" title="Installing boost for visual studio">Installing boost for visual studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delphi and mpi in 4 steps</title>
		<link>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/</link>
		<comments>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/#comments</comments>
		<pubDate>Sun, 02 Aug 2009 01:31:28 +0000</pubDate>
		<dc:creator>tunc</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[parallel]]></category>
		<category><![CDATA[delphi]]></category>
		<category><![CDATA[lazarus]]></category>
		<category><![CDATA[mpi]]></category>
		<category><![CDATA[mpich2]]></category>
		<category><![CDATA[pascal]]></category>

		<guid isPermaLink="false">http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/</guid>
		<description><![CDATA[Download and install MPICH2 Download mpi.pas from lazarus site and put it in your project. http://wiki.lazarus.freepascal.org/MPICH Comment out any code that gives error in MPI.pas (Lazarus pascal is a little bit different than Delphi object pascal) Write your code! program HelloWorld1; uses&#160; MPI; var myid: integer; begin MPI_Init(nil,nil); MPI_Comm_rank(MPI_COMM_WORLD,@myid); writeln('id=',myid); MPI_Finalize; end. DELPHI and MPI, [...]]]></description>
			<content:encoded><![CDATA[<ol>
<li>Download and install <a href="http://www.mcs.anl.gov/research/projects/mpich2/index.php"><span style="text-decoration: underline"><span style="color: #0066cc">MPICH2 </span></span></a></li>
<li>Download mpi.pas from lazarus site and put it in your project. <a href="http://wiki.lazarus.freepascal.org/MPICH"><span style="text-decoration: underline"><span style="color: #0066cc">http://wiki.lazarus.freepascal.org/MPICH</span></span></a> </li>
<li>Comment out any code that gives error in MPI.pas (Lazarus pascal is a little bit different than Delphi object pascal) </li>
<li>Write your code! </li>
</ol>
<pre class="delphi" name="code">program HelloWorld1;

uses&#160; MPI;

var myid: integer;
begin
MPI_Init(nil,nil);
MPI_Comm_rank(MPI_COMM_WORLD,@myid);
writeln('id=',myid);
MPI_Finalize;

end.</pre>
<ul class="related_post"><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-1/" title="DELPHI and MPI, closer look 1">DELPHI and MPI, closer look 1</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-closer-look-2/" title="delphi and mpi, closer look 2">delphi and mpi, closer look 2</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/optimum-design-of-high-rise-steel-buildings-using-an-evolution-strategy-integrated-parallel-algorithm/" title="Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm">Optimum Design of High-Rise Steel Buildings using an Evolution Strategy Integrated Parallel Algorithm</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/send-stdstring-with-mpi/" title="send std::string with mpi">send std::string with mpi</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/mpi-debugging-with-visual-studio/" title="MPI Debugging with Visual Studio">MPI Debugging with Visual Studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/a-comparative-study-on-two-different-direct-parallel-solution-strategies-for-large-scale-problems/" title="A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems">A Comparative Study on Two Different Direct Parallel Solution Strategies for Large-Scale Problems</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/pugg/" title="pugg">pugg</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/installing-boost-for-visual-studio/" title="Installing boost for visual studio">Installing boost for visual studio</a></li><li><a href="http://www.tuncbahcecioglu.com/posts/what-i-need-from-delphi-2010/" title="what i need from delphi 2010">what i need from delphi 2010</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.tuncbahcecioglu.com/posts/delphi-and-mpi-in-4-steps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
