<?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>Silveira Neto &#187; hpc</title>
	<atom:link href="http://silveiraneto.net/tag/hpc/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description>the world is a pixel</description>
	<lastBuildDate>Sun, 08 Jan 2012 05:17:57 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Parallel Build Benchmark</title>
		<link>http://silveiraneto.net/2008/11/14/parallel-build-benchmark/</link>
		<comments>http://silveiraneto.net/2008/11/14/parallel-build-benchmark/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 19:12:59 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[hpc]]></category>
		<category><![CDATA[Inkscape]]></category>
		<category><![CDATA[jobs]]></category>
		<category><![CDATA[Make]]></category>
		<category><![CDATA[Makefile]]></category>
		<category><![CDATA[Parallel]]></category>
		<category><![CDATA[Parallel Build]]></category>
		<category><![CDATA[Parallelism]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=1732</guid>
		<description><![CDATA[You can optimizing your building times using a parallel build process. The GNU Make supports it using the parameter &#8211;jobs=N (or -j=N), where N is the maximum number of jobs that can be realized at the same time, usually compilation jobs. By default, Make will perform just a job per time. Using -j without arguments [...]]]></description>
			<content:encoded><![CDATA[<p>You can optimizing your building times using a parallel build process.</p>
<p>The <a title="GNU Make" href="http://www.gnu.org/software/make/manual/make.html">GNU Make</a> supports it using the parameter &#8211;jobs=N (or -j=N), where N is the maximum number of jobs that can be realized at the same time, usually compilation jobs. By default, Make will perform just a job per time. Using -j without arguments imposes no limits on job number. There&#8217;s also the load approach using <em>&#8211;load-average</em>.<em><br />
</em></p>
<p>Here&#8217;s a benchmark I did showing four different complete builds of the <a title="Inkscape Project" href="http://inkscape.org">Inkscape</a> project, from one to four jobs at the same time. I used a Intel (Yonah FSB667 Mhz/2MbL2) Dual Core with 2 Gb of Ram with a common Ubuntu 8.10 and default build parameters and no additional optimizations.</p>
<p style="text-align: center;"><img class="size-full wp-image-1741 aligncenter" title="inkscape parallel build chart" src="http://silveiraneto.net/wp-content/uploads/2008/11/inkscape_parallel_build_chart.png" alt="chart" /><a href="http://silveiraneto.net/wp-content/uploads/2008/11/inkscape_parallel_build.ods">inkscape_parallel_build.ods</a></p>
<p>Just compiling with <em>make &#8211;jobs=2</em> instead of just <em>make</em>, almost doubles the speed of the build. As I&#8217;m using a dual core processor and the heavy compilations dominate the build process, the best result was with 2 jobs.</p>
<p>I had no trouble with those builds but it&#8217;s known that you can have problems such implicit dependencies among targets or memory exhaustion. There&#8217;s a good article, <a title="By Morgan Herrington" href="http://developers.sun.com/solaris/articles/parallel_make.html">Optimizing Build Times Using Parallel &#8220;make&#8221;</a>, on this subject. On the Make manual, there&#8217;s also a section on <a title="Make Parallel" href="http://www.gnu.org/software/make/manual/make.html#Parallel">parallel excetution</a>.</p>
<p>So, next time you try a <em>make</em>, try using <em>make &#8211;jobs=2</em> and see the results. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/11/14/parallel-build-benchmark/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Event Review: Comsolid</title>
		<link>http://silveiraneto.net/2008/06/30/event-review-comsolid/</link>
		<comments>http://silveiraneto.net/2008/06/30/event-review-comsolid/#comments</comments>
		<pubDate>Mon, 30 Jun 2008 04:06:37 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[comsolid]]></category>
		<category><![CDATA[Event Review]]></category>
		<category><![CDATA[hpc]]></category>
		<category><![CDATA[Maracanaú]]></category>
		<category><![CDATA[Opensolaris]]></category>
		<category><![CDATA[presentation]]></category>
		<category><![CDATA[zfs]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=949</guid>
		<description><![CDATA[This week I did another presentation outside my city. This time it was at Maracanau in the Comsolid, a open source and digital inclusion event. My first presentation was about ZFS filesystem and how you can take benefits from it like pooling storage and self healing. I used as base for examples my last post [...]]]></description>
			<content:encoded><![CDATA[<p>This week I did another presentation outside my city. This time it was at <a title="Wikipedia, english" href="http://en.wikipedia.org/wiki/Maracanau">Maracanau</a> in the <a title="COMSOLID" href="http://www.comsolid.cefetce.br/">Comsolid</a>, a open source and digital inclusion event.</p>
<p style="text-align: center;"><a title="IMG_0080 by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2581772916/"><img class="aligncenter" src="http://farm4.static.flickr.com/3039/2581772916_fc18b1de60.jpg" alt="IMG_0080" width="500" height="375" /></a></p>
<p>My first presentation was about ZFS filesystem and how you can take benefits from it like pooling storage and self healing. I used as base for examples my last post on it, <a title="ZFS article" href="http://silveiraneto.net/2008/05/28/trying-to-corrupt-data-in-a-zfs-mirror/">Trying to corrupt data in a ZFS mirror</a>.</p>
<table border="0" cellpadding="3">
<tbody>
<tr>
<th rowspan="3">
<p style="text-align: center;"><a title="Eu by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2581758706/"><img class="aligncenter" src="http://farm4.static.flickr.com/3133/2581758706_828548591f.jpg" alt="Eu" width="375" height="500" /></a></p>
</th>
<td><a title="IMG_0112 by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2580937127/"><img src="http://farm3.static.flickr.com/2387/2580937127_85324828dc_m.jpg" alt="IMG_0112" width="240" height="180" /></a></td>
</tr>
<tr>
<td><a title="Eu by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2581762042/"><img src="http://farm4.static.flickr.com/3079/2581762042_2c30ba31be_m.jpg" alt="Eu" width="240" height="180" /></a></td>
</tr>
<tr>
<td><a title="IMG_0114 by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2581763136/"><img src="http://farm4.static.flickr.com/3176/2581763136_1abb117415_m.jpg" alt="IMG_0114" width="240" height="180" /></a></td>
</tr>
</tbody>
</table>
<p>My next talk was about <a title="OpenSolaris.org" href="http://opensolaris.org/index.html">OpenSolaris</a>. We had a lot of questions and interesting about this. We burned some cds with OpenSolaris 2008.5 and also distributed others versions of OpenSolaris like Solaris 10.</p>
<p style="text-align: center;"><a title="IMG_0120 by Silveira Neto, on Flickr" href="http://www.flickr.com/photos/silveiraneto/2581759416/"><img class="aligncenter" src="http://farm4.static.flickr.com/3105/2581759416_cf4e0311fa.jpg" alt="IMG_0120" width="500" height="375" /></a></p>
<p>And my last presentation was a quick talk about high performance computing, a short version on that I already <a href="http://silveiraneto.net/2008/05/10/fisl-2008/">did before</a>.</p>
<p>Was a interesting event mainly because the public was composed primarily by young students with few background on TI. It was a challenge to present some new concepts like pooling storage for those who aren&#8217;t familiar with filesystems management. I tried to keep my talk as simpler as I could and focus on daily problems and showing that you can avoid them with some open source technologies.</p>
<p>The full album is available at <a title="Flickr Album" href="http://flickr.com/photos/silveiraneto/sets/72157605632001295/">http://flickr.com/photos/silveiraneto/sets/72157605632001295/</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/06/30/event-review-comsolid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>International Free Software Forum 2008</title>
		<link>http://silveiraneto.net/2008/05/10/fisl-2008/</link>
		<comments>http://silveiraneto.net/2008/05/10/fisl-2008/#comments</comments>
		<pubDate>Sat, 10 May 2008 05:50:43 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Bruno Cavaler Ghisi]]></category>
		<category><![CDATA[FISL]]></category>
		<category><![CDATA[Francois Orsini]]></category>
		<category><![CDATA[Gary Thompson]]></category>
		<category><![CDATA[Geir Magnusson]]></category>
		<category><![CDATA[High-Performance Computing and OpenSolaris]]></category>
		<category><![CDATA[hpc]]></category>
		<category><![CDATA[International Free Software Forum]]></category>
		<category><![CDATA[Ken Drachnik]]></category>
		<category><![CDATA[Lucas Bortolaso Torri]]></category>
		<category><![CDATA[Marcelo D Elia Branco]]></category>
		<category><![CDATA[Pat Patterson]]></category>
		<category><![CDATA[Phillip (Flip) Russel]]></category>
		<category><![CDATA[Porto Alegre]]></category>
		<category><![CDATA[Rafael David Tinoco]]></category>
		<category><![CDATA[Ray Gans]]></category>
		<category><![CDATA[Rich Sands]]></category>
		<category><![CDATA[Rio Grande do Sul]]></category>
		<category><![CDATA[Roberto Andrade]]></category>
		<category><![CDATA[ruby on rails]]></category>
		<category><![CDATA[Sérgio Amadeu da Silveira]]></category>
		<category><![CDATA[Sun]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=837</guid>
		<description><![CDATA[Every year in Porto Alegre, Brazil, is placed the biggest free software event in the world. Is the International Forum on Free Software, FISL. This year the event counted with 21 countries, 257 presentations and more than 7 thousands hackers, students, developers and entrepreneurs together sharing knowledge and making friends. Just a few hours after [...]]]></description>
			<content:encoded><![CDATA[<p>Every year in Porto Alegre, Brazil, is placed the biggest free software event in the world. Is the International Forum on Free Software, FISL. This year the event counted with 21 countries, <a title="talk grid" href="http://fisl.softwarelivre.org/9.0/papers/pub/programacao/">257 presentations</a> and more than 7 thousands hackers, students, developers and entrepreneurs together sharing knowledge and making friends.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3006/2434861862_de6c2b3b0a.jpg" alt="FISL 2008 Theater" width="500" height="375" /></p>
<p>Just a few hours after <a title="NetBeans Day Fortaleza" href="http://silveiraneto.net/2008/04/21/netbeans-day-fortaleza-with-gregg-sporar/">NetBeans in Fortaleza</a>. I was flying to a long trip to Porto Alegre (almost a entire day) to join in three events, the <a title="FISL 9.0" href="http://fisl.softwarelivre.org/9.0/www/">FISL 9.0</a> itself and also <a title="OpenSolaris Day Porto Alegre" href="http://www.opensolaris.org/jive/thread.jspa?messageID=223678">OpenSolaris Day Porto Alegre</a> and <a title="Javali International Meeting 2008" href="http://www.soujava.org.br/display/v/Javali+2008">Javali 2008</a>.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2032/2432686551_3bc849f1d8.jpg" alt="Solaris Express and Coffee express" width="500" height="375" /><br />
<small>I like my coffee like my Solaris, Express. :P Installing a newer version during a free time in the airport.</small></p>
<p>At OpenSolaris Day I presented <a title="HPC and OpenSolaris Slides" href="http://silveiraneto.net/2008/04/16/hpc-and-opensolaris/">High Performance Computing and OpenSolaris</a> showing an introduction about parallel computing concepts and a little bit about how to take advantage of <a title="OpenSolaris Community: HPC Developer" href="http://opensolaris.org/os/community/hpcdev/">OpenSolaris for HPC</a>, using tools like ZFS and Dtrace for OpenMPI. Was a good presentation and I got good questions.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2077/2435839856_d66d73171e.jpg" alt="Audience" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2196/2435028047_3a7487e2eb.jpg" alt="Me on OpenSolaris Day" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3145/2435029671_355378f67d.jpg" alt="Me on OpenSolaris Day" width="500" height="375" /></p>
<p>After the OpenSolaris Day/Javali 2008 we all had a pizza party. I was really sick during my presentation, I&#8217;m not familiar with temperatures beyond 25° and that day was 8°.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2260/2436161428_0ba06e31a9_o.jpg" alt="Pizza party" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2013/2435343901_d1f9f9cbcf.jpg" alt="Some Sun Campus Ambassadors" /></p>
<p>The presentation I prepared for FISL was &#8220;NetBeans: Beyond Java&#8221; showing a little bit how you can use NetBeans to develop using Ruby, C, C++ and others languages. I&#8217;d like to show that NetBeans is more than a Java IDE. I showed more about the Ruby and Ruby and Rails integration.</p>
<p>Some photos:</p>
<p style="margin-bottom: 0cm; text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2190/2436021614_8d1faac144.jpg" alt="NetBeans on FISL" width="500" height="375" /></p>
<p style="margin-bottom: 0cm; text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3216/2435190857_2714e8a9db.jpg" alt="NetBeans on FISL" width="500" height="375" /></p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm3.static.flickr.com/2100/2436031488_9b00354176.jpg" alt="NetBeans at FISL" width="500" height="375" /></p>
<p style="margin-bottom: 0cm;" lang="en-US">My second presentation on FISL was about JavaFX. This presentation was not really planned and I have just a couple of days to organize it. Fortunately I contacted the JavaFX community from <a href="http://openjfx.dev.java.net">openjfx project</a> and immediately I got a lot of help to build some material. A very sincerely and special thanks for <a href="http://learnjavafx.typepad.com/about.html">James L. Weaver</a> who helped me immediately a lot. Thanks too to the <a href="http://jfx.wikia.com/wiki/Main_Page">Planet JFX community</a> and their material.</p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm4.static.flickr.com/3179/2436099800_2101c723b1.jpg" alt="JavaFX on FISL" width="375" height="500" /></p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm4.static.flickr.com/3084/2436104204_e5de603247.jpg" alt="JavaFX on FISL" width="500" height="375" /></p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm3.static.flickr.com/2283/2435280709_a9edd40849.jpg" alt="JavaFX on FISL" width="500" height="375" /></p>
<p>Was really a good demo. I was more relaxed than in my Netbeans presentation and also I got a excellent feedback.</p>
<p>More photos:</p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm3.static.flickr.com/2122/2435335011_9004d3dac8.jpg" alt="OpenSolaris User Group" width="500" height="375" /></p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img class="aligncenter" src="http://farm4.static.flickr.com/3021/2435270696_7b7d6aebfa.jpg" alt="OLPC XO" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3075/2435896604_f17024de70.jpg" alt="OpenSolaris" width="500" height="375" /><br />
<small><a href="http://blogs.sun.com/tirthankar/">Thirtankar Das</a> talked about project Indiana.</small></p>
<p style="margin-bottom: 0cm; text-align: center;" lang="en-US"><img src="http://farm4.static.flickr.com/3258/2435993454_91b340b827.jpg" alt="Man and child using their laptops" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3095/2435866960_12970e8f34.jpg" alt="Rafael Vanoni talking about OpenSolaris Kernel" width="500" height="375" /><br />
<small><a title="Rafael Vononi post" href="http://blogs.sun.com/rv/entry/opensolaris_day_round_up">Rafael Vanoni</a> talking about OpenSolaris kernel scheduling.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2117/2435238364_483318dbdc.jpg" alt="Roger Brinkley" /><br />
<small><a title="Roger Brinkley's Blog" href="http://weblogs.java.net/blog/brinkley/">Roger Brinkley</a> talking about <a title="Phone ME" href="https://phoneme.dev.java.net/">PhoneME</a>.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3138/2434989522_b3b162eb03.jpg" alt="high 5" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3295/2435060318_a6631408c8.jpg" alt="Fracois Orsini, Silveira Neto and Ted Goddard" /><br />
<small><a href="http://blogs.sun.com/FrancoisOrsini/">Fracois Orsini</a>, me and <a href="http://blog.icefaces.org/blojsom/blog/default/Ted%20Goddard/">Ted Goddard</a>.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3064/2434917412_e8480aefd3.jpg" alt="Gregg Sporar" /><br />
<small><a href="http://weblogs.java.net/blog/gsporar/">Gregg Sporar</a> on Java memory leaks.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2005/2434832904_60f3890424.jpg" alt="Raghavan " width="375" height="500" /><br />
<small><a href="http://weblogs.java.net/blog/rags/">Raghavan &#8220;Rags&#8221; Srinivas</a> on Java runtime.</small></p>
<p style="text-align: center;"><img src="http://farm4.static.flickr.com/3188/2434785892_236cb3a3b8.jpg" alt="Louis Suarez-Potts and Vitorio. Furusho" /><br />
<small><a href="http://www.openoffice.org/lspintro.html">Louis Suarez-Potts</a> and Vitorio Y. Furusho talking. See also <a href="http://www.youtube.com/watch?v=UANbb2oA_jw">this excellent interview with Louis</a>.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3147/2432705393_65dfe6621c.jpg" alt="Ray Gans" width="500" height="375" /><br />
<small><a href="http://java.net/blog/ray_gans/">Ray Gans</a> on OpenJDK.</small></p>
<p style="text-align: center;"><img src="http://farm3.static.flickr.com/2019/2432724089_d21d590652.jpg" alt="Rich Sands on OpenJDK" width="500" height="375" /><br />
<small><a href="http://blogs.sun.com/rsands/">Rich Sands</a> also on OpenJDK.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2265/2433946449_56a08fec38.jpg" alt="Meet Sun SPOT" width="500" height="375" /><br />
<small>Gary Thompson showing a <a href="http://www.sunspotworld.com/">Sun SPOT</a> vehicle.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm4.static.flickr.com/3019/2435314651_947052235f.jpg" alt="Rafael David Tinoco" width="500" height="375" /><br />
<small><a href="http://fisl.softwarelivre.org/9.0/papers/pub/programacao/714">Rafael David Tinoco</a> on UltraSparc and OpenSparc.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2135/2435362166_9a5c55e10e.jpg" alt="Campus Party on FISL" width="500" height="375" /><br />
<small><a href="http://samadeu.blogspot.com/">Sérgio Amadeu da Silveira</a>, <a href="http://www.campus-party.com.br/blogoficial/">Roberto Andrade</a> e <a href="http://twiki.softwarelivre.org/bin/view/Blogs/MarceloBranco">Marcelo D&#8217;Elia Branco</a> in a informal retrospective about Campus Party.</small></p>
<p style="text-align: center;"><img src="http://farm4.static.flickr.com/3089/2435265491_2a4c11407e.jpg" alt="Marge" width="500" height="375" /><br />
<small><a title="Lucas' blog" href="http://weblogs.java.net/blog/lucastorri/">Lucas Bortolaso Torri</a> and <a title="Bruno Ghisi's blog" href="http://weblogs.java.net/blog/brunogh/">Bruno Cavaler Ghisi</a> talking about <a title="Bluetooth Marge Framework" href="https://marge.dev.java.net/">Marge Framework</a>.</small></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2137/2435070326_f8d9d3ce9c.jpg" alt="Rich Sands, me and Eduardo Lima" width="500" height="375" /><br />
<small>Rich Sands, me and Eduardo Lima</small></p>
<p>Be at FISL was a dream for me for a long time and finally I could achieve this year, and more specially participating as speaker. In the other hand, I spent lot of time finishing and preparing my demos and could not completely enjoy the event itself, but was a really good event, I meet a lot of people I only knew by mails lists and also meet a lot of people from Sun&#8217;s staff.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2302/2432699293_deb73d6aac.jpg" alt="Porto Alegre" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2260/2433512082_d00e00dbde.jpg" alt="Porto Alegre" width="500" height="375" /></p>
<p style="text-align: center;"><img class="aligncenter" src="http://farm3.static.flickr.com/2024/2434273461_f11dd6c5fe.jpg" alt="Dinner" width="500" height="375" /></p>
<p>Porto Alegre is also a very beautiful and well preserved city though I had almost no time to see it. And if during the daytime I almost don&#8217;t ate, during the night I went to very good restaurants and <a title="Wikipedia for Churrascaria" href="http://en.wikipedia.org/wiki/Churrascaria">churrascarias</a>. I went back to home some kilos fatter. :P</p>
<ul>
<li><strong>ps.: </strong>I took hundreds of photos. There a <a title="FISL 9.0" href="http://flickr.com/photos/silveiraneto/sets/72157604683194487/">set of them in my Flickr</a>.</li>
<li><strong>ps. 2: </strong>I tried  to put the name of all who appeared in my photos. If I did a mistake, let me know, please.</li>
<li><strong>ps. 3: </strong>I had a problem with my file system and I lose those slides I presented in FISL. :( The only available is <a title="HPC and OpenSolaris Slides" href="http://silveiraneto.net/2008/04/16/hpc-and-opensolaris/">High Performance Computing and OpenSolaris</a>.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/05/10/fisl-2008/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>High-performance Computing and Opensolaris</title>
		<link>http://silveiraneto.net/2008/04/16/hpc-and-opensolaris/</link>
		<comments>http://silveiraneto.net/2008/04/16/hpc-and-opensolaris/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 19:59:54 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[code examples]]></category>
		<category><![CDATA[codes]]></category>
		<category><![CDATA[Containers]]></category>
		<category><![CDATA[gcc]]></category>
		<category><![CDATA[high-performance computing]]></category>
		<category><![CDATA[hpc]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[openMP]]></category>
		<category><![CDATA[Opensolaris]]></category>
		<category><![CDATA[Posix Threads]]></category>
		<category><![CDATA[Pthreads]]></category>
		<category><![CDATA[zfs]]></category>
		<category><![CDATA[Zones]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/?p=830</guid>
		<description><![CDATA[Slides from the talk I did at OpenSolaris Day in Porto Alegre. &#124; View &#124; Upload your own Download: hpc_and_OpenSolaris.odp]]></description>
			<content:encoded><![CDATA[<p>Slides from the talk I did at <a href="http://www.opensolaris.org/jive/thread.jspa?messageID=223678&#038;tstart=0">OpenSolaris</a> Day in Porto Alegre.</p>
<p><center>
<div style="width:425px;text-align:left" id="__ss_357019"><object style="margin:0px" width="425" height="355"><param name="movie" value="http://static.slideshare.net/swf/ssplayer2.swf?doc=hpcandopensolaris-1208375162036270-8"/><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slideshare.net/swf/ssplayer2.swf?doc=hpcandopensolaris-1208375162036270-8" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="font-size:11px;font-family:tahoma,arial;height:26px;padding-top:2px;"><a href="http://www.slideshare.net/?src=embed"><img src="http://static.slideshare.net/swf/logo_embd.png" style="border:0px none;margin-bottom:-5px" alt="SlideShare"/></a> | <a href="http://www.slideshare.net/silveiraneto/highperformance-computing-and-opensolaris?src=embed" title="View 'High-Performance Computing and OpenSolaris' on SlideShare">View</a> | <a href="http://www.slideshare.net/upload?src=embed">Upload your own</a></div>
</div>
<p></center></p>
<p><strong>Download:</strong> <a href="/downloads/hpc_and_OpenSolaris.odp">hpc_and_OpenSolaris.odp</a> </p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/04/16/hpc-and-opensolaris/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Olá Mundo Paralelo com MPI</title>
		<link>http://silveiraneto.net/2007/08/29/ola-mundo-paralelo-com-mpi/</link>
		<comments>http://silveiraneto.net/2007/08/29/ola-mundo-paralelo-com-mpi/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 13:53:12 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[português]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[CAD]]></category>
		<category><![CDATA[Computação Paralela]]></category>
		<category><![CDATA[hpc]]></category>
		<category><![CDATA[MPI]]></category>
		<category><![CDATA[mpicc]]></category>
		<category><![CDATA[mpirun]]></category>
		<category><![CDATA[OpenMPI]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[Troca de mensagens]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/2007/08/29/ola-mundo-paralelo-com-mpi/</guid>
		<description><![CDATA[MPI é a sigla para Message Passing Interface, um padrão de comunicação de dados para computação paralela. O MPI oferece diversas abstracções que facilitam e padronizam o desenvolvimento de aplicações paralelas. Por exemplo, você pode programar para vários processadores, nós de um cluster, supercomputadores ou Internet utilizando a mesma infraestrutura transparentemente. Cluster Columbia da NASA, [...]]]></description>
			<content:encoded><![CDATA[<p>MPI é a sigla para <em>Message Passing Interface</em>, um padrão de comunicação de dados para computação paralela. O MPI oferece diversas abstracções que facilitam e padronizam o desenvolvimento de aplicações paralelas. Por exemplo, você pode programar para vários processadores, nós de um cluster, supercomputadores ou Internet utilizando a mesma infraestrutura transparentemente.</p>
<p><img src="http://silveiraneto.net/wp-content/uploads/2007/08/cluster_columbia_nasa.jpg" alt="Supercomputador Nasa" /><br />
<small>Cluster <a href="http://www.nas.nasa.gov/News/Images/columbia_3.html">Columbia da NASA</a>, com 1024 nós.</small></p>
<p>Como MPI é um padrão, existem vários padrões de implementação, abertas, fechadas, comerciais ou gratuitas. MPI é definido a princípio para C e Fortran, mas há implementações em outras linguagens como Java ou Python, por exemplo. A implementação que eu vou utilizar nesse exemplo é a <a href="http://www.open-mpi.org/">OpenMPI</a>.</p>
<p>A notícia boa é que você não precisa ter um supercomputador em casa para aprender e praticar computação paralela, uma máquina doméstica serve. Se você tiver uma máquina com múltiplos processadores, melhor ainda.</p>
<h3>Instalação</h3>
<p>Para instalar um ambiente de desenvolvimento para MPI no <a href="http://www.ubuntu.org">Ubuntu Linux</a> basta um comando:</p>
<blockquote><p>sudo apt-get install build-essential openmpi-dev</p></blockquote>
<p>Isso vai instalar um conjunto básico de compiladores e o ambiente OpenMPI.</p>
<h3>O código</h3>
<p>Vamos criar um arquivo chamado <em>ola.c</em> com o conteúdo:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java java" style="font-family:monospace;">#include
#include
<span style="color: #000066; font-weight: bold;">int</span> size, rank;
<span style="color: #000066; font-weight: bold;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> argc, <span style="color: #000066; font-weight: bold;">char</span> <span style="color: #339933;">*</span>argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   MPI_Init<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp;argc,<span style="color: #339933;">&amp;</span>amp;argv<span style="color: #009900;">&#41;</span>;
   MPI_Comm_size<span style="color: #009900;">&#40;</span>MPI_COMM_WORLD,<span style="color: #339933;">&amp;</span>amp;size<span style="color: #009900;">&#41;</span>;
   MPI_Comm_rank<span style="color: #009900;">&#40;</span>MPI_COMM_WORLD,<span style="color: #339933;">&amp;</span>amp;rank<span style="color: #009900;">&#41;</span>;
   printf<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Oi. Eu sou o processo %d de %d<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, rank, size<span style="color: #009900;">&#41;</span>;
   MPI_Finalize<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<h3>Compilação</h3>
<p>Para compilar esse código vamos usar o comando mpicc que foi instalado junto com o pacote openmpi-dev. Ele é uma interface para o gcc, e vai cuidar de toda a linkagem com as bibliotecas do MPI. Você pode usar os parâmetros do gcc com o mpicc.</p>
<blockquote><p>mpicc ola.c -o ola</p></blockquote>
<p>Se tudo der certo esse comando vai criar o binário ola.</p>
<h3>Execução</h3>
<p>Outra ferramenta importante é o mpirun, que levantar o mpi nos diversos nós e mandar cada nó executar o binário. O mpirun não precisa de um programa mpi para rodar, por exemplo, se dermos esse comando:</p>
<blockquote><p>mpirun -np 4 echo oi</p></blockquote>
<p>Você vai ter essa saída:</p>
<blockquote><p>oi<br />
oi<br />
oi<br />
oi</p></blockquote>
<p>Você mandou 4 nós (<em>-np 4</em>) executar o comando <em>echo oi</em> (imprime oi). Para mandar 5 nós executarem nosso binário ola:</p>
<blockquote><p>mpirun -np 5 ola</p></blockquote>
<p>E vamos ter uma saída mais ou menos assim:</p>
<blockquote><p>Oi. Eu sou o processo 1 de 5<br />
Oi. Eu sou o processo 4 de 5<br />
Oi. Eu sou o processo 0 de 5<br />
Oi. Eu sou o processo 2 de 5<br />
Oi. Eu sou o processo 3 de 5</p></blockquote>
<p>Por que as saídas sairam desordenadas? Porque elas rodaram em paralelo e não temos como saber qual foi sua ordem de execução. Assim cada nó entrou no printf em um momento diferente e imprimiu seu <em>rank</em> e seu <em>size</em> naquele momento. Você pode experimentar usar o parâmetro -np com outros números maiores ou menores que 5.</p>
<h3>Troca de Mensagens</h3>
<p>Até aqui não há muita graça porque não há troca de mensagens. Há muito o que se dizer sobre como trocar mensagens do MPI mas a maneira mais fácil de se começar é com a função <em>mpi_send</em>.</p>
<p>Vamos fazer um programa bem simples onde o nó 0 vai mandar uma mensagem para o nó 1. A mensagem vai ser um número, <a href="http://desciclo.pedia.ws/wiki/42">42</a>. Criemos um arquivo chamado msg.c com o código:</p>
<div class="wp_syntax">
<div class="code">
<pre class="java java" style="font-family:monospace;">#include
#include
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> size, rank, msg, source, dest, tag;
&nbsp;
<span style="color: #000066; font-weight: bold;">int</span> main<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> argc, <span style="color: #000066; font-weight: bold;">char</span> <span style="color: #339933;">*</span>argv<span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   MPI_Status stat;
&nbsp;
   MPI_Init<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp;argc,<span style="color: #339933;">&amp;</span>amp;argv<span style="color: #009900;">&#41;</span>;
   MPI_Comm_size<span style="color: #009900;">&#40;</span>MPI_COMM_WORLD,<span style="color: #339933;">&amp;</span>amp;size<span style="color: #009900;">&#41;</span>;
   MPI_Comm_rank<span style="color: #009900;">&#40;</span>MPI_COMM_WORLD,<span style="color: #339933;">&amp;</span>amp;rank<span style="color: #009900;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>rank<span style="color: #339933;">==</span>0<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
   	msg <span style="color: #339933;">=</span> <span style="color: #cc66cc;">42</span>; dest <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span>; tag <span style="color: #339933;">=</span> 0;
   	MPI_Send<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp;msg, <span style="color: #cc66cc;">1</span>, MPI_INT, dest, tag, MPI_COMM_WORLD<span style="color: #009900;">&#41;</span>;
   	printf<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Processo %d enviou %d para %d.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, rank, msg, dest<span style="color: #009900;">&#41;</span>;
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>rank<span style="color: #339933;">==</span><span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
		source <span style="color: #339933;">=</span> 0; tag <span style="color: #339933;">=</span> 0;
		MPI_Recv<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span>amp;msg, <span style="color: #cc66cc;">1</span>, MPI_INT, source, tag, MPI_COMM_WORLD, <span style="color: #339933;">&amp;</span>amp;stat<span style="color: #009900;">&#41;</span>;
		printf<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Processo %d recebeu %d de %d.<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>, rank, msg, source<span style="color: #009900;">&#41;</span>;
	<span style="color: #009900;">&#125;</span>
&nbsp;
   MPI_Finalize<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #009900;">&#125;</span></pre>
</div>
</div>
<p>No processo de rank 0 vamos enviar o conteúdo da variável inteira msg para o processo de rank 1. Note que no processo de rank 1, o valor de msg não está definido. O comando MPI_Send vai receber 6 parâmetros.</p>
<blockquote><p>int MPI_Send( void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)</p></blockquote>
<ul>
<li><strong>void *buf</strong>, um ponteiro para a mensagem que você vai mandar. No nosso caso a variável inteira msg.</li>
<li><strong>int count</strong>, a quantidade de elementos que tem nessa mensagem. No nossa caso só 1. Se quisemos mandar um vetor de dois inteiros, seria 2.</li>
<li><strong>MPI_Datatype datatype</strong>, uma constante que define o tipo de dados que você está enviando. No nosso caso MPI_INT. Isso evita que ajam incompatibilidade no tamanho de inteiros entre arquiteturas diferentes.</li>
<li><strong>int dest</strong>, o rank do nó destino, o destinatário. No nosso caso o nó 1.</li>
<li><strong>int tag</strong>, a tag seria num email o assunto da mensagem. Estamos mandando tag 0 então no outro lado tem que estar esperando uma tag 0, caso contrário não há comunicação.</li>
<li><strong>MPI_Comm comm</strong>, o comunicador. Nesse e na maioria dos casos  a constante MPI_COMM_WORLD.</li>
</ul>
<p>Do outro lado, no processo 1 vamos usar o MPI_recv, que recebe 7 parâmetros.</p>
<blockquote><p>int MPI_Recv( void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)</p></blockquote>
<ul>
<li><strong>void *buf</strong>, um ponteiro para onde vai ser guardada a mensagem que vamos receber. No nosso caso a variável msg, que no processo 1 está vazia.</li>
<li><strong>int count</strong>, a quantidade de elementos que vem nessa mensagem.</li>
<li><strong>MPI_Datatype datatype</strong>, a mesma constante do MPI_send.</li>
<li><strong>int source</strong>, o rank do nó remetente. No nosso caso o nó 0.</li>
<li><strong>int tag</strong>, a tag da mensagem conforme explicado no MPI_send.</li>
<li><strong>MPI_Comm comm</strong>, o comunicador.</li>
<li><strong>MPI_Status *status</strong>, uma estrutura para que depois que a função for executada você possa inspecionar detalhes da transmissão. No nosso caso ela é inútil.</li>
</ul>
<p>Para compilar esse exemplo usamos novamente o mpicc.</p>
<blockquote><p>mpicc msg.c -o msg</p></blockquote>
<p>E para executa-lo o mpirun.</p>
<blockquote><p>mpirun -np 2 msg</p></blockquote>
<p>O programa vai escrever essa mensagem:</p>
<blockquote><p>Processo 0 enviou 42 para 1.<br />
Processo 1 recebeu 42 de 0</p></blockquote>
<p>No processo 1 a msg estava inicialmente vazia e no processo 0 havia 42, mas depois do MPI_recv o processo 1 pode escrever o conteúdo 42 de msg. Logo, houve comunicação.</p>
<h3>Dicas</h3>
<p>Por um problema no empacotamento do mpich no Ubuntu toda vez que você executa o MPI você recebe umas mensagens horrorosas de erro, que na verdade são só um aviso que ele não encontrou uma placa de rede Infiniband.</p>
<p>Para você silenciar na unha essa chatice use o mpirun assim:</p>
<blockquote><p>mpiexec &#8211;mca btl ^openib -np 1 executável</p></blockquote>
<p>Onde -np 1 deve ser substituido pelo seu número de processos e executável pelo seu executável.</p>
<p>Outra dica é que você pode utilizar uma distribuição Linux que já venha com o MPI instalado. Por exemplo o<a href="https://www.scientificlinux.org/download"> Scientific Linux</a> ou o <a href="http://pareto.uab.es/mcreel/ParallelKnoppix/">Parallel Knoppix</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2007/08/29/ola-mundo-paralelo-com-mpi/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

