<!-- 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; example</title>
	<atom:link href="http://www.tuncbahcecioglu.com/posts/tag/example/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>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 66 times" >Delphi mpi bindings (66)</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>
	</channel>
</rss>
