<?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>manio</title>
	<atom:link href="http://www.manio.org/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.manio.org/blog</link>
	<description></description>
	<lastBuildDate>Fri, 03 Feb 2012 04:16:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>How to Add New System Calls to Minix 3.1.8</title>
		<link>http://www.manio.org/blog/how-to-add-new-system-calls-to-minix-3-1-8/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-add-new-system-calls-to-minix-3-1-8</link>
		<comments>http://www.manio.org/blog/how-to-add-new-system-calls-to-minix-3-1-8/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 04:16:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[3.1.8]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[minix]]></category>
		<category><![CDATA[operating systems]]></category>
		<category><![CDATA[system call]]></category>

		<guid isPermaLink="false">http://www.manio.org/blog/?p=879</guid>
		<description><![CDATA[There are some tutorials on the Internet. However, they are not up-to-date. Currently Minix has the latest version 3.1.8. It has some changes, say a virtual file system. So a  newer tutorial is necessary. This article also includes a part for adding system calls to servers that are not visible to users. For example, users [...]]]></description>
			<content:encoded><![CDATA[<p>There are some tutorials on the Internet. However, they are not up-to-date. Currently Minix has the latest version 3.1.8. It has some changes, say a virtual file system. So a  newer tutorial is necessary. This article also includes a part for adding system calls to servers that are not visible to users. For example, users can not call the functions in MFS directly because there is a middleware layer, VFS, between them. In order to call some function in MFS, one need to add a system call to MFS and then call it from VFS. The steps of adding system calls to MFS is slightly different.</p>
<p>I had an OSDI class last semester, which required us to do some Minix kernel modification. I learned a lot from it.</p>
<p>Here are the steps to add a new system call to Minix 3.1.8.</p>
<p>Suppose we need to add a system call, <em>setmgroup()</em>, to Process Manager(PM).</p>
<ol>
<li>Find an unused entry in <em></em>/usr/src/include/minix/callnr.h, add a line. For example
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#define SETMGROUP 70</div></div>
</li>
<li>In /usr/src/servers/pm/table.c, find the corresponding  entry (with same number) in the table and change its name to <em>setmgroup</em></li>
<li>Add
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">_PROTOTYPE( int do_setmgroup, (void) );</div></div>
<p>to /usr/src/servers/pm/proto.h</li>
<li>Add the function body of <em>do_setmgroup()</em> to /usr/src/servers/pm/misc.c</li>
<li>Go to /usr/src/servers/pm/, and
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$make</div></div>
<p>To check if it can pass the compilation.</li>
<li>create file mcastlib.h in /usr/include/<br />
add the <em>setmgroup(int, int)</em> to this file, which includes _syscall()</li>
<li>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">cd /usr/src/tools<br />
make hdboot<br />
reboot</div></div>
</li>
<li>Test it by using the system call.</li>
</ol>
<p>The mcastlib.h is like this:</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#include &lt;lib.h&gt;<br />
#include &lt;unistd.h&gt;<br />
#define setmgroup _setmgroup<br />
<br />
PUBLIC int setmgroup ( int _groupid )<br />
{<br />
message m;<br />
m.m1_i1 = _groupid;<br />
return( _syscall( PM_PROC_NR, SETMGROUP, &amp;m) );<br />
}</div></div>
<h2>Add a System Call to MFS</h2>
<p>Suppose we need to add a system call named <em>listblocknum()</em> to MFS.</p>
<ol>
<li>add an entry in /usr/src/include/minix/vfsif.h<br />
add a line:</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#define REQ_LISTBLOCKNUM (VFS_BASE + 33)</div></div>
<p>Add 1 to the number of request</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">#define NREQS 34</div></div>
</li>
<li>find the entry in the table and change its name to <em>fs_listblocknum</em> in /usr/src/servers/mfs/table.c</li>
<li>find the entry in the table and change its name to no_sys in /usr/src/servers/hgfs/table.c and other file systems like ext2, etc.<br />
If you already changed NREQS and still got the error “array size is negative”. Try to “$make includes” in /usr/src. Then try to make in hgfs again.</li>
<li>add
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">_PROTOTYPE( int fs_listblocknum, (void) );</div></div>
<p>to /usr/src/servers/mfs/proto.h</li>
<li>add the function body of <em>fs_listblocknum</em> () to /usr/src/servers/mfs/misc.c</li>
<li>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$cd /usr/src/servers/mfs/<br />
$make</div></div>
</li>
<li>go to /usr/src/tools,
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">$make hdboot</div></div>
</li>
</ol>
<p>After doing this, VFS can send message to MFS to call a function, just like USER can send a message to VFS to call a function. Refer to request.c in VFS to see how to call the functions in MFS.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/how-to-add-new-system-calls-to-minix-3-1-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Commonly used R commands (statistics)</title>
		<link>http://www.manio.org/blog/commonly-used-r-commands/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=commonly-used-r-commands</link>
		<comments>http://www.manio.org/blog/commonly-used-r-commands/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 02:48:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[math]]></category>
		<category><![CDATA[R]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[tool]]></category>

		<guid isPermaLink="false">http://www.manio.org/blog/?p=842</guid>
		<description><![CDATA[When I say Ease of Use Improved, I mean you can simply copy, paste and run the codes in this post, without referring to other places, without downloading a data file and read it from R. This is how I like a blog article to be. You don&#8217;t need to read the whole article. You [...]]]></description>
			<content:encoded><![CDATA[<p>When I say Ease of Use Improved, I mean you can simply copy, paste and run the codes in this post, without referring to other places, without downloading a data file and read it from R. This is how I like a blog article to be. You don&#8217;t need to read the whole article. You just need to Ctrl+F what your need and copy the codes there and run it.</p>
<p>I use R in Windows and sometimes Linux. The version is 2.13.0. The following scripts should be applicable to other versions.</p>
<h3>Read a File to a Table</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">congold&lt;-read.table(&quot;C:/Users/Jun/Dropbox/Research/LQCD/exp/96.24.24.24/congrad.old.txt&quot;, header=T)</div></div>
<p>Hmm.. You can&#8217;t copy and run this in your system, since you don&#8217;t have that file. <em>congold </em>is a table,  the first argument of read.table() is the path of the file. In Windows, you should use &#8220;/&#8221; in the path instead of &#8220;\&#8221;.</p>
<h3>Boxplot</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">d = rnorm(10)<br />
t = rep(c(1,2),c(5,5))<br />
boxplot(d~t)</div></div>
<h3>Get subset</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df = data.frame(col1=c(1,2,3,4),col2=c(1,1,2,2))<br />
subset(df,col2==2)</div></div>
<h3>Find out how many unique items in a  list</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">a = c(5,5,6,6,6)<br />
length(unique(a))</div></div>
<h3>Viewing Several Graphs</h3>
<p>In Windows</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">windows()</div></div>
<p>In Linux</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">X11()</div></div>
<p>In Mac</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">quartz()</div></div>
<h3> Delete Columns by Names</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
df &lt;- df[,-which(names(df) %in% c(&quot;z&quot;,&quot;t&quot;))]</div></div>
<p>An easier way:</p>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
df &lt;- subset(df, select=-c(z,t))</div></div>
<p>Actually, it is done by selecting the columns you want. So we have the following:</p>
<h3>Select Columns by Names</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
df[, c(&quot;x&quot;,&quot;y&quot;)]</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
subset(df, select=c(x,y))</div></div>
<h3>Print out Column Names</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
names(df)</div></div>
<h3>Change Column Names</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
names(df)[[1]]=&quot;newNameForColumn1&quot;</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
names(df)=c(&quot;newNameForColumn1&quot;, &quot;newNameForColumn2&quot;, &quot;newNameForColumn3&quot;,&quot;newNameForColumn4&quot;)</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
names(df)[which(names(df)==&quot;y&quot;)]= &quot;NewNameOf_y&quot;</div></div>
<h3>Reduction Plot</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">library(lattice)<br />
x = 1:100<br />
y = rnorm(100)<br />
xyplot(x~y, type=c(&quot;r&quot;,&quot;p&quot;))</div></div>
<h3>Finding out 95%th, 99%th of Each Category</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">library(doBy)<br />
x = rep(c(1,2),50)<br />
y = rnorm(100)<br />
summaryBy(y~x, data=df, FUN=function(x){quantile(x,c(0.95,0.99))})</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">x = rep(c(1,2),50)<br />
y = rnorm(100)<br />
aggregate(y~x, data = df, function(x){quantile(x,0.95)})<br />
aggregate(y~x, data = df, function(x){quantile(x,0.99)})</div></div>
<h3>Get Median of Each Factor in a data frame (each type has many rows)</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">x = rep(c(1,2),50)<br />
y = rnorm(100)<br />
aggregate(y~x, data = df, median)</div></div>
<h3>To count rows or columns</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
nrow(df)</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df &lt;- data.frame(x=rep(1,3), y=rep(2,3), z=rep(3,3), t=rep(4,3))<br />
ncol(df)</div></div>
<h3>Create empty matrix or vector</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">mymatrix &lt;- mat.or.vec(2,3)</div></div>
<h3>Replace data in data frame</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">tmp = data.frame(&quot;a&quot;=c(1,2,3,4))<br />
selected = tmp == 2<br />
selected<br />
tmp[selected] = 22<br />
tmp</div></div>
<h3>Convert Factor to Number</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">size &lt;- factor(c(55,44,33,22,11))<br />
size<br />
as.numeric(size)<br />
levels(size)[size]<br />
as.numeric(levels(size)[size])</div></div>
<h3>Change the order of colums</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df = data.frame(&quot;a&quot;=c(1,1), &quot;b&quot;=c(2,2), &quot;c&quot;=c(3,3))<br />
df<br />
df = subset(df, select=c(c,b,a))<br />
df</div></div>
<h3>Order Data Frame</h3>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df = data.frame(a=c(4,5,6),b=c(9,8,7))<br />
<br />
df = df[order(df$b),]</div></div>
<div class="codecolorer-container text default" style="border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">df = data.frame(a=c(4,5,6),b=c(9,8,7),c=c(11,12,12))<br />
df<br />
df[order(df$c,df$b),]</div></div>
<p>Too much to organize from my note&#8230;</p>
<p>Maybe I&#8217;ll pick it up later, nor not&#8230;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/commonly-used-r-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>David Ferrucci: why did IBM Watson believe Toronto was a US city?</title>
		<link>http://www.manio.org/blog/david-furracciwhy-did-ibm-watson-believe-toronto-was-a-us-city/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=david-furracciwhy-did-ibm-watson-believe-toronto-was-a-us-city</link>
		<comments>http://www.manio.org/blog/david-furracciwhy-did-ibm-watson-believe-toronto-was-a-us-city/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 05:59:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[How]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[David Ferrucci]]></category>
		<category><![CDATA[deep QA]]></category>
		<category><![CDATA[Fermi]]></category>
		<category><![CDATA[IBM]]></category>
		<category><![CDATA[Jeopardy!]]></category>
		<category><![CDATA[talk]]></category>
		<category><![CDATA[Watson]]></category>

		<guid isPermaLink="false">http://www.manio.org/blog/?p=834</guid>
		<description><![CDATA[On July 27th, Dr. David Ferrucci came to Fermi to give a talk about IBM Watson. He talked about the architecture of Watson, some technical details, how the team members cooperated with others. He says that Watson got its knowledge from only 100GB of data. After pre-processing for fast calculation in the game, it became [...]]]></description>
			<content:encoded><![CDATA[<p>On July 27th, Dr. David Ferrucci came to Fermi to give a talk about IBM Watson. He talked about the architecture of Watson, some technical details, how the team members cooperated with others.</p>
<p>He says that Watson got its knowledge from only 100GB of data. After pre-processing for fast calculation in the game, it became 800GB. It was all in the memory in the game, because disks are slow.</p>
<p>Knowledge was not strictly categorized. Like, cat is a kind of animal, pencil is a kind of tool. Watson did not do this. I think one of the reasons is that it is impossible to build categories for all the things in the world. It just had to be fuzzier to be general.</p>
<p>Regarding why Watson believes Toronto was  a US city, the explanations were:</p>
<ul>
<li>Even though the question belongs to a category about US cities, the answer does not have to be a US city, according to some previous questions of Jeopardy!.</li>
<li>The confidences on Chicago and Toronto were so close. (Chicago had a chance to win.)</li>
<li>Cities are not categorized as said before. So Toronto MIGHT be a US city. They even have a team in NBA&#8230; This is the way how Waston discovers the answer: get clues, connect them.</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p><a href="http://www.manio.org/blog/wp-content/uploads/2011/08/07272011361-e1314423161861.jpg"><img class="alignnone size-full wp-image-835" title="07272011361" src="http://www.manio.org/blog/wp-content/uploads/2011/08/07272011361-e1314423161861.jpg" alt="" width="500" height="375" /></a></p>
<p>My phone has to make loud sound when taking a picture. So I waited until everybody was laughing so it would cover the sound of my phone. Succeeded!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/david-furracciwhy-did-ibm-watson-believe-toronto-was-a-us-city/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Things Learned from This Summer Internship</title>
		<link>http://www.manio.org/blog/things-learned-from-this-summer-internship/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=things-learned-from-this-summer-internship</link>
		<comments>http://www.manio.org/blog/things-learned-from-this-summer-internship/#comments</comments>
		<pubDate>Thu, 25 Aug 2011 15:54:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[experience]]></category>
		<category><![CDATA[Fermi]]></category>
		<category><![CDATA[learning]]></category>

		<guid isPermaLink="false">http://www.manio.org/blog/?p=820</guid>
		<description><![CDATA[It is worth automating the procedures you will do a lot. For example, pulling out data for analysis from output files, data analysis procedure. It is worth learning the tool for a period of dedicated time. Otherwise, it would waste a lot time googling and you don&#8217;t even know some very useful knowledge/tricks to do [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>It is worth automating the procedures you will do a lot. For example, pulling out data for analysis from output files, data analysis procedure.</li>
<li>It is worth learning the tool for a period of dedicated time. Otherwise, it would waste a lot time googling and you don&#8217;t even know some very useful knowledge/tricks to do some basic things. The basic skills you know may make you creative when using the tools.</li>
<li>Ask people, discuss with people. It tides up your mind, gives you new ideas. Never ignore those things seems trivial. They might be very scary when you rethink them as you write the final report. The whole project can be worthless and you could have avoid it by sending an email to ask somebody.</li>
<li>Never believe you can finish all the jobs in one day. Things change. People make mistakes. Machines crash. Meetings.. Car breaks.. JUST PLAN IT WELL. Give yourself spare time.</li>
<li>Never sleep without a plan for the next day.</li>
<li>Keep clear log of what you have done every day. It is a MUST DO. Since you may forget what you have done and had a conclusion. Sometimes you can&#8217;t believe some conclusions you made are true. You need to check what you&#8217;ve done and your proof. Writing log everyday is also helpful when you write the report/paper. The log needs to be well structured.</li>
<li>Work hard.</li>
<li>Keep notes for things you learn. My R notes helped a lot.</li>
</ul>
<p><a href="http://www.manio.org/blog/wp-content/uploads/2011/08/IMG_8358.jpg"><img class="alignnone size-medium wp-image-824" title="IMG_8358" src="http://www.manio.org/blog/wp-content/uploads/2011/08/IMG_8358-300x225.jpg" alt="" width="300" height="225" /></a></p>
<p><a href="http://www.manio.org/blog/wp-content/uploads/2011/08/IMG_8357.jpg"><img class="alignnone size-medium wp-image-823" title="IMG_8357" src="http://www.manio.org/blog/wp-content/uploads/2011/08/IMG_8357-300x225.jpg" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/things-learned-from-this-summer-internship/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>The Tipping Point</title>
		<link>http://www.manio.org/blog/the-tipping-point/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=the-tipping-point</link>
		<comments>http://www.manio.org/blog/the-tipping-point/#comments</comments>
		<pubDate>Mon, 31 Jan 2011 03:54:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[I am thinking]]></category>
		<category><![CDATA[culture]]></category>
		<category><![CDATA[Malcolm Gladwell]]></category>
		<category><![CDATA[society]]></category>
		<category><![CDATA[tipping point]]></category>

		<guid isPermaLink="false">http://manio.org/?p=752</guid>
		<description><![CDATA[I have no strong feelings after reading Tipping Point. Gladwell kind of does not put the examples very close to his argument in some parts. He often goes out of track and pull it back at the end of the chapters. Or I should he does not state clearly the relation between the examples and theories. I distracted sometimes while reading.]]></description>
			<content:encoded><![CDATA[<p>I have no strong feelings after reading <em>Tipping Point</em>. Gladwell kind of does not put the examples very close to his argument in some parts. He often goes out of track and pull it back at the end of the chapters. Or I should say he does not state clearly the relation between the examples and theories. I distracted sometimes while reading.</p>
<p>It is not a bad book though. It introduces several theories that may help us understanding the world: the law of the few, the stickiness factor and the power of context. It is all about how things get popular and how/why they spread.</p>
<p>Here I only want to supply some supplementary interesting materials that mentioned in the book.</p>
<p><strong>The author&#8217;s website:</strong></p>
<p><a href="http://www.gladwell.com/" target="_blank">http://www.gladwell.com/</a></p>
<p><strong>The author&#8217;s talk on TED:</strong> <a href="http://www.ted.com/talks/malcolm_gladwell_on_spaghetti_sauce.html" target="_blank"></a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="446" height="326" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/MalcolmGladwell_2004-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/MalcolmGladwell-2004.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=20&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=malcolm_gladwell_on_spaghetti_sauce;year=2004;theme=unconventional_explanations;theme=not_business_as_usual;theme=what_makes_us_happy;theme=tales_of_invention;theme=food_matters;event=TED2004;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><param name="src" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="bgcolor" value="#ffffff" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="446" height="326" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" flashvars="vu=http://video.ted.com/talks/dynamic/MalcolmGladwell_2004-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/MalcolmGladwell-2004.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=20&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=malcolm_gladwell_on_spaghetti_sauce;year=2004;theme=unconventional_explanations;theme=not_business_as_usual;theme=what_makes_us_happy;theme=tales_of_invention;theme=food_matters;event=TED2004;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" bgcolor="#ffffff" wmode="transparent" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://www.ted.com/talks/malcolm_gladwell_on_spaghetti_sauce.html" target="_blank">http://www.ted.com/talks/malcolm_gladwell_on_spaghetti_sauce.html</a></p>
<p><strong>Stanford Prison Experiment:</strong></p>
<p><a href="http://www.prisonexp.org/" target="_blank">http://www.prisonexp.org/</a></p>
<p><strong>Phil Zimbardo&#8217;s website (the supervisor of Stanford Prison Experiment) :</strong></p>
<p><strong> </strong><a href="http://zimbardo.socialpsychology.org/" target="_blank"> http://zimbardo.socialpsychology.org/</a></p>
<p><strong>Phil Zimbardo&#8217;s TED talk</strong>, <em>Philip Zimbardo shows how people become monsters &#8230; or heroes</em>: <a href="http://www.ted.com/talks/philip_zimbardo_on_the_psychology_of_evil.html"></a><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="446" height="326" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="wmode" value="transparent" /><param name="bgColor" value="#ffffff" /><param name="flashvars" value="vu=http://video.ted.com/talks/dynamic/PhilZimbardo_2008-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/PhilZimbardo-2008.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=272&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=philip_zimbardo_on_the_psychology_of_evil;year=2008;theme=how_the_mind_works;theme=to_boldly_go;theme=war_and_peace;theme=how_we_learn;event=TED2008;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" /><param name="src" value="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" /><param name="bgcolor" value="#ffffff" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="446" height="326" src="http://video.ted.com/assets/player/swf/EmbedPlayer.swf" flashvars="vu=http://video.ted.com/talks/dynamic/PhilZimbardo_2008-medium.flv&amp;su=http://images.ted.com/images/ted/tedindex/embed-posters/PhilZimbardo-2008.embed_thumbnail.jpg&amp;vw=432&amp;vh=240&amp;ap=0&amp;ti=272&amp;introDuration=15330&amp;adDuration=4000&amp;postAdDuration=830&amp;adKeys=talk=philip_zimbardo_on_the_psychology_of_evil;year=2008;theme=how_the_mind_works;theme=to_boldly_go;theme=war_and_peace;theme=how_we_learn;event=TED2008;&amp;preAdTag=tconf.ted/embed;tile=1;sz=512x288;" bgcolor="#ffffff" wmode="transparent" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.ted.com/talks/philip_zimbardo_on_the_psychology_of_evil.html">http://www.ted.com/talks/philip_zimbardo_on_the_psychology_of_evil.html</a> Phil married the girl who stopped his prison experiment:)</p>
<p><strong>Documentary of Stanford Prison Experiment:</strong><br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/1GpuB_Q2RUw?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/1GpuB_Q2RUw?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.youtube.com/watch?v=1GpuB_Q2RUw" target="_blank">http://www.youtube.com/watch?v=1GpuB_Q2RUw</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/FHc5vX1m_zk?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/FHc5vX1m_zk?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object><br />
<a href="http://www.youtube.com/watch?v=FHc5vX1m_zk&amp;feature=related" target="_blank">http://www.youtube.com/watch?v=FHc5vX1m_zk&amp;feature=related</a></p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="480" height="385" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/kg37p1RxnSk?fs=1&amp;hl=en_US" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="480" height="385" src="http://www.youtube.com/v/kg37p1RxnSk?fs=1&amp;hl=en_US" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.youtube.com/watch?v=kg37p1RxnSk&amp;feature=related" target="_blank">http://www.youtube.com/watch?v=kg37p1RxnSk&amp;feature=related</a></p>
<p><strong>Recent movie based on Standford Prison Experiment:</strong></p>
<p><a href="http://www.imdb.com/title/tt0997152/" target="_blank">http://www.imdb.com/title/tt0997152/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/the-tipping-point/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Long after Deep Blue, IBM wants to beat human again</title>
		<link>http://www.manio.org/blog/long-after-deep-blue-ibm-wants-to-beat-human-again/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=long-after-deep-blue-ibm-wants-to-beat-human-again</link>
		<comments>http://www.manio.org/blog/long-after-deep-blue-ibm-wants-to-beat-human-again/#comments</comments>
		<pubDate>Fri, 28 Jan 2011 02:00:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[AI]]></category>
		<category><![CDATA[IBM]]></category>

		<guid isPermaLink="false">http://manio.org/?p=741</guid>
		<description><![CDATA[On this coming Feb 14, we are expecting the human-like IBM Watson to fight in the Jeopardy! show.]]></description>
			<content:encoded><![CDATA[<p>On this coming Feb 14, we are expecting the human-like IBM Watson to fight in the Jeopardy! show. It is going to be an interesting and exciting Machine vs. Human show. After two years of working, IBM&#8217;s scientists are hoping this new challenge will push AI to a new height. We know how hard to learn a language. But it&#8217;s even harder to understand those slang, joke and so on, which requires experience of the culture, the history&#8230;</p>
<p>IBM is so good at merging their research with marketing campaign. I missed the Deep Blue last time. This time, I am gonna watch it live.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="340" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/_1c7s7-3fXI&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="500" height="340" src="http://www.youtube.com/v/_1c7s7-3fXI&amp;hl=en_US&amp;feature=player_embedded&amp;version=3" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p><a href="http://www.technologyreview.com/blog/editors/26264/" target="_blank">Report from MIT Technology Review</a></p>
<p><a href="http://www-03.ibm.com/press/us/en/pressrelease/33233.wss" target="_blank">IBM&#8217;s introduction</a></p>
<p><a href="http://www-03.ibm.com/innovation/us/watson/" target="_blank">Watson project</a></p>
<p><a href="http://www.jeopardy.com/news/watsoncharities.php" target="_blank">Jeopardy! website</a></p>
<p><a href="http://www.nytimes.com/interactive/2010/06/16/magazine/watson-trivia-game.html" target="_blank">A tiny simulation to help you understand the game</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/long-after-deep-blue-ibm-wants-to-beat-human-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SESC Tutorial &#8211; TODO List</title>
		<link>http://www.manio.org/blog/sesc-tutorial-todo-list/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sesc-tutorial-todo-list</link>
		<comments>http://www.manio.org/blog/sesc-tutorial-todo-list/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 04:39:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SESC Tutorial]]></category>
		<category><![CDATA[sesc]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[todo]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://manio.org/?p=674</guid>
		<description><![CDATA[This is a TODO list, listing what should be done next for this tutorial, to help researchers understand and modify SESC.]]></description>
			<content:encoded><![CDATA[<p>This is a TODO list, listing what should be done next for this tutorial, to help researchers understand and modify SESC.</p>
<ul>
<li><strong>How to run a therm/temperature test step by step</strong> <br />
		<span style="color: rgb(255, 0, 0);">Any contributors?</span></li>
<li><strong>How to run a benchmark<br />
		</strong></li>
<li><strong>How to modify the simulater configuration (.conf)</strong> Started. By Jun He(jhe24[at]iit.edu).</li>
<li><strong>Illustration of the key classes</strong>. The illustration should show the main functions of the classes (I mean why these classes exsit.) and relationships among them. So the readers can get the a clear picture of SESC. <span style="color: rgb(255, 0, 0);">Any contributors?</span></li>
<li><strong>How to modify the cache replace policy</strong>. We believe a good example worth thousands of words. This cache task is simple, without too many relations to other objects. So it might be the best simple example to demostrate hacking. Started. By&nbsp; Jun He(jhe24[at]iit.edu), Yao Wang(Yao.Wang[at]tudelft.nl).</li>
<li><strong>Set up a wiki?</strong></li>
<li><strong>Even more&#8230;</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/sesc-tutorial-todo-list/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SESC Tutorial &#8211; 3. Prepare for Hacking</title>
		<link>http://www.manio.org/blog/sesc-tutorial-3-prepare-for-hacking/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sesc-tutorial-3-prepare-for-hacking</link>
		<comments>http://www.manio.org/blog/sesc-tutorial-3-prepare-for-hacking/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 09:26:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SESC Tutorial]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[heterogeneous]]></category>
		<category><![CDATA[Jose Renau]]></category>
		<category><![CDATA[MPSoC]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[sesc]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[uiuc]]></category>

		<guid isPermaLink="false">http://manio.org/?p=621</guid>
		<description><![CDATA[This chapter introduces you some tips to understand SESC. If you want to modify SESC for your research, this might be a good start.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://www.manio.org/blog/category/computer-science/sesc-tutorial" target="_blank">http://manio.org/blog/category/computer-science/sesc-tutorial</a></p>
<p style="text-align: center;">Written by <strong>Jun He</strong> (jhe24(at)iit.edu), June 2010.</p>
<p>This chapter introduces you some tips to understand SESC. If you want to modify SESC for your research, this might be a good start.</p>
<h3>Index</h3>
<ol>
<li><a href="#resources-for-learning-sesc">Resources for learning SESC</a></li>
<li><a href="#how-to-learn-sesc">How to Learn SESC?</a></li>
<li><a href="#pre-knowledge-for-hacking-sesc">Pre-knowledge for Hacking SESC</a></li>
<li><a href="#how-to-understand-sesc-and-start-hacking">How to Understand SESC and Start Hacking</a></li>
<li><a href="#the-illustration-of-sesc-source-code-tree">The Illustration of SESC Source Code Tree (mind map)</a></li>
<li><a href="#how-to-configure-a-heterogeneous-mpsoc">How to configure a heterogeneous MPSoC</a></li>
</ol>
<p><a name="resources-for-learning-sesc"></a></p>
<h3>Resources for learning SESC</h3>
<ul>
<li><a href="http://sesc.sourceforge.net/index.html" target="_blank">SESC website</a></li>
<li><strong><a href="http://sesc.sourceforge.net/sescdoc.pdf" target="_blank">sescdoc from SESC website</a></strong>, very very important for SESC hackers.</li>
<li><a href="http://sesc.sourceforge.net/slide1.pdf" target="_blank">slide1.pdf from SESC website</a></li>
<li><a href="https://lists.soe.ucsc.edu/mailman/listinfo/sesc" target="_blank">SESC maillist</a></li>
<li>README.xxx in src/docs</li>
<li>README in src subdirs</li>
<li>Comments in source files</li>
<li>The codes</li>
<li><a href="http://www.grid-appliance.org/wiki/index.php/Archer:SESC" target="_blank">Another howto for installing SESC</a></li>
</ul>
<h3><a name="how-to-learn-sesc"></a>How to Learn SESC?</h3>
<ol>
<li>Add http://sesc.sourceforge.net to your bookmark</li>
<li>Subscribe to sesc-news@lists.sourceforge.net</li>
<li>Read all the files in doc directory</li>
<li>See the ./src/main.cpp example</li>
<li>Understand the callbacks (DInst.h is easy)</li>
<li>Understand the configuration files (*.conf)</li>
</ol>
<p><em>From slide1.pdf</em> If someone wants to read the source codes of SESC, I think he/she should start from src/libcore/main.cpp Another tutorial is in the<strong> README.hacker</strong> in the src/<em>docs</em>. <strong>It&#8217;s very important for SESC hackers.</strong> <strong> </strong></p>
<h3><a name="pre-knowledge-for-hacking-sesc"></a>Pre-knowledge for Hacking SESC</h3>
<p>Get a <strong>thick book on computer architecture</strong> on hand. <strong>Wikipedia</strong> and <strong>Google</strong> every unkown term you see.</p>
<h3><a name="how-to-understand-sesc-and-start-hacking"></a>How to Understand SESC and Start Hacking</h3>
<p>The booting of SESC/the main() of SESC. This is a wonderful demonstration of SESC or any simulator system. The whole system is OOPed. Every part in a real architecture is represented as an object in C++. If we want to change something, just change the according object.</p>
<pre lang="cpp">int main(int argc, char **argv, char **envp) {
    DummyMemorySystem *cm[NPROC];
    MyProc *core[NPROC];
    osSim = new OSSim(argc, argv, envp);
    for(Pid_t i = 0; i &gt; NPROC; i ++) {
        cm[i] = new DummyMemorySystem(i);
        core[i] = new MyProc(cm[i], i);
    }
    osSim-&gt;boot();
    for(int i = 0; i &lt; NPROC; i ++) {
        delete core[i];
        delete cm[i];
    }
    delete osSim;
}</pre>
<p>from slide1.pdf The real code is in the src/libcore/main.cpp</p>
<h3><a name="the-illustration-of-sesc-source-code-tree"></a>The Illustration of SESC Source Code Tree (mind map)</h3>
<p><a href="http://www.manio.org/blog/wp-content/uploads/2010/06/IMG_0648.jpg"><img class="alignnone size-full wp-image-633" title="IMG_0648" src="http://www.manio.org/blog/wp-content/uploads/2010/06/IMG_0648-e1314422242990.jpg" alt="" width="500" height="375" /></a></p>
<h3><a name="how-to-configure-a-heterogeneous-mpsoc"></a>How to configure a heterogeneous MPSoC</h3>
<p>refer to <a href="https://lists.soe.ucsc.edu/pipermail/sesc/2007-February/000175.html">https://lists.soe.ucsc.edu/pipermail/sesc/2007-February/000175.html</a> Also refer to a UCLA student&#8217;s research progress using sesc: <a href="http://www.cs.ucla.edu/honors/UPLOADS/2006-07/salzman/progress.txt" target="_blank">http://www.cs.ucla.edu/honors/UPLOADS/2006-07/salzman/progress.txt</a>. It might give you some hints.</p>
<h3>To be continued…</h3>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/sesc-tutorial-3-prepare-for-hacking/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>SESC Tutorial &#8211; 2. Run HelloWorld</title>
		<link>http://www.manio.org/blog/sesc-tutorial-2-run-helloworld/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sesc-tutorial-2-run-helloworld</link>
		<comments>http://www.manio.org/blog/sesc-tutorial-2-run-helloworld/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 05:40:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SESC Tutorial]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Jose Renau]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[sesc]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[uiuc]]></category>

		<guid isPermaLink="false">http://manio.org/?p=600</guid>
		<description><![CDATA[In this chapter, we compile and run the first program on SESC. After that, we can get a report from SESC.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://manio.org/blog/category/computer-science/sesc-tutorial" target="_blank">http://manio.org/blog/category/computer-science/sesc-tutorial</a></p>
<p style="text-align: center;">Written by <strong>Jun He</strong> (jhe24(at)iit.edu), June 2010.</p>
<p>In this chapter, we compile and run the first program on SESC. After that, we can get a report from SESC and check the performance.</p>
<h3>Index</h3>
<ol>
<li><a href="#how-to-setup-building-environment">How to Setup Building Environment</a></li>
<li><a href="#how-to-compile-a-program-and-run-it-on-SESC">How to compile a program and run it on SESC</a></li>
<li><a href="#how-to-run-multi-thread-program">How to run multi-thread program</a></li>
<li><a href="#how-to-visualize-the-report-file">How to visualize the report file</a></li>
</ol>
<p><a name="how-to-setup-building-environment"></a></p>
<h3>How to Setup Building Environment</h3>
<ol>
<ol>
<li>$vim setupSescEnvironment</li>
</ol>
</ol>
<pre lang="bash">set +h

export PATH=$HOME/sescutils/install/bin:$HOME/sesc-build:$PATH

echo "Setup Finished!"</pre>
<ol>
<li>$source setupSescEnvironment</li>
</ol>
<h3><a name="how-to-compile-a-program-and-run-it-on-SESC"></a>How to compile a program and run it on SESC</h3>
<ol>
<ol>
<li>$vim hellosesc.c</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">#include &lt;stdio.h&gt;int main()<br />
{<br />
printf(&#8220;hello sescn&#8221;);<br />
return 0;<br />
}</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li>Compile hellosesc.c by mips gcc<br />
$mipseb-linux-gcc hellosesc.c</li>
</ol>
</ol>
<p>ERROR</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">/home/manio/sescutils/install/lib/gcc/mipseb-linux/3.4.4/../../../../mipseb-linux/bin/ld: /home/manio/sescutils/install/lib/gcc/mipseb-linux/3.4.4/crtend.o: warning: linking PIC files with non-PIC files/home/manio/sescutils/install/lib/gcc/mipseb-linux/3.4.4/../../../../mipseb-linux/bin/ld: /home/manio/sescutils/install/lib/gcc/mipseb-linux/3.4.4/../../../../mipseb-linux/lib/crtn.o: warning: linking PIC files with non-PIC files</td>
</tr>
</tbody>
</table>
<p><em>Note: This is because you do not compile the .c file with the same options of glibc. So refer to the build options of glibc (</em><em>build-3-glibc) and set the gcc options as follows:</em></p>
<ol>
<ol>
<li>$mipseb-linux-gcc -O2 -mips2 -mabi=32 -fno-PIC -mno-abicalls hellosesc.c</li>
<li>Success built, <strong>BUT THE OUTPUT EXECUTABLE CANNOT BE RUN IN SESC!</strong></li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sescworkdir$ <strong>sesc.tst -h0x800000 -c../esesc/confs/mem.conf ./a.out &lt;../esesc/tests/tt.in</strong><strong>ERROR</strong>: .ctors data sections not contiguousSegmentation fault</td>
</tr>
</tbody>
</table>
<p>The following references can help you understand this problem.</p>
<p><strong>Reference 1:</strong></p>
<p><a href="https://lists.soe.ucsc.edu/pipermail/sesc/2008-May/000466.html" target="_blank">https://lists.soe.ucsc.edu/pipermail/sesc/2008-May/000466.html</a></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">When you compile you need to use &#8220;-static -Wa,-non_shared&#8221;<br />
Also, when you link, make sure that all the sections are continues.<br />
You can do it<br />
adding this option to the linking process.<br />
-Wl,&#8211;script=$(XTOOLSPREFIX)/mipseb-linux/lib/ldscripts/mint.x,-static</td>
</tr>
</tbody>
</table>
<p><strong>Reference 2</strong></p>
<p><a href="https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000329.html" target="_blank">https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000329.html</a></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">I am not sure about the reason for the problem. My guess is that<br />
SESC/MINT interface<br />
requires continuous data sections (.bss,.data.text&#8230;.). Your program<br />
may have very large<br />
static data allocation and gcc may decide not to have continuous<br />
sections.<br />
If you use the &#8220;mipseb-linux-readelf -S foo&#8221; command where foo is<br />
your binary, it will<br />
tell you the sections.<br />
If you look at the mint.x file from gcc, it shows how to change it.<br />
Maybe your program<br />
uses some section not addressed on mint.x.</td>
</tr>
</tbody>
</table>
<p><strong>Reference 3</strong></p>
<p><a href="https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000328.html" target="_blank">https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000328.html</a></p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">/usr/local/bin/mipseb-linux-g++ -mips2 -mno-abicalls -mabi=32 -mtune=r6000<br />
-msplit-addresses -I. -Wa,-non_shared -I.<br />
-I/usr/local/mipseb-linux/include/c++/3.2<br />
-I/usr/local/mipseb-linux/include/c++/3.2/backward<br />
-I/usr/local/mipseb-linux/include/c++/3.2/mips-linux-gnu -static SOURCE<br />
FILES HERE -o test -Wl,&#8211;script=/usr/local/mipseb-linux/lib/ldscripts/mint.x</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li><strong>SOLUTION</strong></li>
</ol>
</ol>
<p>mint.x should be used to link the objects.</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sescworkdir$ mipseb-linux-gcc -mips2 -mabi=32 -static -Wa,-non_shared -mno-abicalls -Wl,&#8211;script=/home/manio/sescutils/install/mipseb-linux/lib/ldscripts/mint.x,-static hellosesc.c -o hellosesc.6manio@jun-desktop:~/sescworkdir$</td>
</tr>
</tbody>
</table>
<p>In this solution, gcc passes some options to the linker(ld) by -Wl.</p>
<p><strong>-Wl,option</strong></p>
<p>Pass option as an option to the linker.  If option contains commas, it is split into multiple options at the commas.</p>
<p><strong>&#8211;script=scriptfile</strong></p>
<p>Use  scriptfile as the linker script.  This script replaces ld’s default linker script (rather than adding            to it), so commandfile must specify everything necessary to describe the  output  file.     If  scriptfile does not exist in the current directory, &#8220;ld&#8221; looks for it in the directories specified by any preceding -L options.  Multiple -T options accumulate.</p>
<p><strong>-static</strong></p>
<p>Do not link against shared libraries.  This is only meaningful on platforms for which shared libraries are supported.  The different variants of this option are for compatibility with various systems.  You may use this  option  multiple times on the command line: it affects library searching for -l options which follow it. This option also implies &#8211;unresolved-symbols=report-all.  This option  can  be  used  with  -shared. Doing  so  means  that a shared library is being created but that all of the library’s external references must be resolved by pulling in entries from static libraries.</p>
<h3><a name="how-to-run-multi-thread-program"></a>How to run multi-thread program</h3>
<ol>
<ol>
<li>$cd $HOME/esesc/src/libapp</li>
<li>add #include &lt;stdint.h&gt; to sescapi.h</li>
<li>create object of sesc_thread.c</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/esesc/src/libapp$ mipseb-linux-gcc -g -mips2 -mabi=32 -Wa,-non_shared -mno-abicalls -c -o sesc_thread.o sesc_thread.c</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li>build executable. Please note: we should use mint.x, which is the elf for sesc mips.</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/esesc/src/libapp$ mipseb-linux-gcc -o hello.sesc hello.c -g -mips2 -mabi=32 -Wa,-non_shared -mno-abicalls sesc_thread.o -static -Wl,&#8211;script=/home/manio/sescutils/install/mipseb-linux/lib/ldscripts/mint.x,-static</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li>$cd ~/sesc-build</li>
<li>run the simulator</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sesc-build$ ./sesc.smp -c ../esesc/confs/smp.conf.hello.multithread ../esesc/src/libapp/hello.sesc</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li>show the report</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sesc-build$ ../esesc/scripts/report.pl -last</td>
</tr>
</tbody>
</table>
<p><strong>References:</strong></p>
<p><a href="https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000308.html">https://lists.soe.ucsc.edu/pipermail/sesc/2007-October/000308.html</a></p>
<p><a href="http://ce.et.tudelft.nl/%7Epepijn/doc/sesc.html">http://ce.et.tudelft.nl/~pepijn/doc/sesc.html</a></p>
<h3><a name="how-to-visualize-the-report-file"></a>How to visualize the report file</h3>
<p>Each line of the report file is consisted of:</p>
<p>Object which generated the data: field1 = value1: field2 = value2</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sesc-build$ ../esesc/scripts/report.pl sesc_hellosesc.6.uJN6k3</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/sesc-tutorial-2-run-helloworld/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>SESC Tutorial &#8211; 1. Install Whole SESC Step by Step</title>
		<link>http://www.manio.org/blog/sesc-tutorial-1-instaall-whole-sesc-step-by-step/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sesc-tutorial-1-instaall-whole-sesc-step-by-step</link>
		<comments>http://www.manio.org/blog/sesc-tutorial-1-instaall-whole-sesc-step-by-step/#comments</comments>
		<pubDate>Mon, 07 Jun 2010 16:45:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[SESC Tutorial]]></category>
		<category><![CDATA[System]]></category>
		<category><![CDATA[computer architecture]]></category>
		<category><![CDATA[Computer Science]]></category>
		<category><![CDATA[Jose Renau]]></category>
		<category><![CDATA[parallel computing]]></category>
		<category><![CDATA[research]]></category>
		<category><![CDATA[sesc]]></category>
		<category><![CDATA[simulator]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[uiuc]]></category>

		<guid isPermaLink="false">http://manio.org/?p=577</guid>
		<description><![CDATA[SESC is good. But after so many years, there are still few documents.  Researchers are often dragged by some tiny troubles. The research can really start, once they can run the hello world. This tutorial aims to reduce the time spending on setuping the evnironment. It lets the researchers pass the tedious evironment setuping process and get down to the exciting researches as soon as possible.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><a href="http://manio.org/blog/category/computer-science/sesc-tutorial" target="_blank">http://manio.org/blog/category/computer-science/sesc-tutorial</a></p>
<p style="text-align: center;">Written by <strong>Jun He</strong> (jhe24(at)iit.edu), June 2010.</p>
<p>SESC is good. But after so many years, there are still few documents.  Researchers are often dragged by some tiny troubles. The research can really start, after they can run the hello world. This tutorial aims to reduce the time spending on setuping the evnironment. It lets the researchers pass the tedious evironment setuping process and get down to the exciting researches as soon as possible.</p>
<p>This tutorial is written by <strong>Jun He</strong>. His e-mail is jhe24(AT)iit.edu. His homepage is <a href="http://manio.org" target="_blank">http://manio.org</a>. There may be some mistakes in this tutorial. Comments are appreciated. Also, <strong>I&#8217;ll be very glad if someone wants to work on this tutorial with me.</strong></p>
<p>In this tutorial, I also list the errors which might encounter, so the readers can find out what to do when they do something wrong.  The errors make the reader know more about SESC.</p>
<h2>Index</h2>
<ol>
<li><a href="#what-s-sesc">What&#8217;s SESC?</a></li>
<li><a href="#my-working-environment">My Working Environment</a></li>
<li><a href="#how-to-install-gcc34">How to Install Old GCC3.4 by deb package in Ubuntu 8.04</a></li>
<li><a href="#how-to-build-sese-utils">How to build SESC utils</a></li>
<li><a href="#how-to-build-sesc-source-code">How to Build SESC source code</a></li>
</ol>
<p><a name="what-s-sesc"></a></p>
<h3>What’s SESC ?</h3>
<p>Homepage: <a href="http://sesc.sourceforge.net/index.html">http://sesc.sourceforge.net/index.html</a></p>
<p><strong>SESC</strong> is a cycle accurate architectural simulator. It models a very wide set of architectures: single processors, CMPs, PIMs, and thread level speculation.</p>
<p>SESC started as the pet project of <a href="http://www.soe.ucsc.edu/%7Erenau">Jose Renau</a> while doing his PhD at Urbana-Champaign in the <a href="http://iacoma.cs.uiuc.edu/">IACOMA group</a>. Currently, he is a new faculty at <a href="http://www.soe.ucsc.edu/">University of California, Santa Cruz</a>.<br />
<a name="my-working-environment"></a></p>
<h3>My Working Environment:</h3>
<ul>
<li><strong>Ubuntu 8.04 Desktop LTS</strong> (Mine is on VMWare 7.01) Accuatlly, you can run sesc in any Linux distributions which are not too old.</li>
<li><strong>SESC</strong>: checked out in <strong>05/25/2010</strong> by cvs.</li>
<li><strong>Internet Access. </strong>If you can access internet in Linux, the process of installing will be much easier, because you can use apt-get install.</li>
<li><strong>gcc 3.4.x.</strong> Usually, this version of gcc is not installed in your OS. The way of installing this version of gcc will be introduced immediately.</li>
</ul>
<p><strong>Please follow the following howtos one by one to setup SESC.</strong></p>
<h3><a name="how-to-install-gcc34"></a>How to Install Old GCC3.4 by deb package in Ubuntu 8.04</h3>
<p><strong>Why we need a older version of gcc?</strong></p>
<p>Because the new version will cause errors, weird errors. The reason for this might be that some new features have been added to gcc 4.x, and they are not compatible with older codes. SESC were mainly developed around 2005, using gcc 3.4. If we use gcc 3.4, we’ll get the same SESC as Jose, the father of SESC.</p>
<ol>
<ol>
<li>Download the following 3 deb packages from <a href="http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-3.4/">http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-3.4/</a><br />
a)         cpp-3.4_3.4.4-6ubuntu8_i386.deb (1707096 bytes<br />
b)        gcc-3.4_3.4.4-6ubuntu8_i386.deb (484408 bytes)<br />
c)        gcc-3.4-base_3.4.4-6ubuntu8_i386.deb (163028 bytes)</li>
</ol>
</ol>
<p><em>Note: the version number in the online archive may not match the ones above, but it’s ok. Please download only the three packages listed above, no more no less. Otherwise, you will encounter some errors. </em></p>
<ol>
<ol>
<li>Follow the instructions in <a href="http://ubuntuforums.org/showthread.php?t=79896">http://ubuntuforums.org/showthread.php?t=79896</a>, then you can have GCC.installed.</li>
<li>Now, if you want to install g++, you have to install them by dpkg. Because if you use GUI-double-click to install g++-3.4_3.4.6-1ubuntu2_i386, ubuntu says “libstdc++6-dev_3.4.6-1ubuntu2_i386 is needed”. But if you double click libstdc++6-dev_3.4.6-1ubuntu2_i386 first, ubuntu says “g++-3.4_3.4.6-1ubuntu2_i386 is needed”.</li>
<li>Download the tow g++ deb packages mentioned in step 3 from <a href="http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-3.4/">http://archive.ubuntu.com/ubuntu/pool/main/g/gcc-3.4/</a></li>
<li>$sudo dpkg -i g++-3.4_3.4.6-1ubuntu2_i386.deb libstdc++6-dev_3.4.6-1ubuntu2_i386.deb</li>
</ol>
</ol>
<p><em>The following steps are from <a href="http://blog.sina.com.cn/s/blog_48a44f390100igad.html">http://blog.sina.com.cn/s/blog_48a44f390100igad.html</a> </em></p>
<ol>
<li>After the steps above, gcc3.4 is installed in your system. So now you have two versions of gcc in you system. The default is gcc 4.4, we should change it, in order to compile source codes of SESC by gcc 3.4</li>
<li>List the all gcc you have in your system by:<br />
$ls /usr/bin/gcc* -l</li>
<li>Add options for gcc 3.4 and gcc 4.4. The version number might not match yours. If not, change yours to the correct ones.<br />
$ sudo update-alternatives &#8211;install /usr/bin/gcc gcc /usr/bin/gcc-4.2 40<br />
$ sudo update-alternatives &#8211;install /usr/bin/gcc gcc /usr/bin/gcc-3.4 30</li>
<li>Alternate to gcc 3.4
<pre lang="bash">manio@jun-desktop:~/esesc/src/libsuc$ sudo update-alternatives --config gcc
[sudo] password for manio:
There are 2 alternatives which provide `gcc'.
Selection    Alternative
-----------------------------------------------
+        1    /usr/bin/gcc-4.2
*         2    /usr/bin/gcc-3.4
Press enter to keep the default[*], or type selection number:</pre>
</li>
<li>Enter 2, then gcc 3.4 will be chosen.</li>
<li>Now gcc 3.4 is successfully installed in your system. From now on, you should use the gcc 3.4 to compile SESC source code.</li>
</ol>
<h3><a name="how-to-build-sese-utils"></a>How to build SESC utils</h3>
<p><strong>What’s sescutils?</strong></p>
<p>Sescutils is a group of tools for building programs to run on SESC. These tools include gcc, gdb, glibc, etc.</p>
<p><strong>Why do we need utils in SESC?</strong></p>
<p>Actually, sescutils is a cross-compile toolchain, which is used to compile programs on PC for running on MIPS. SESC is a MIPS architecture simulator.</p>
<ol>
<ol>
<li>Download the sescutils from <a href="https://sourceforge.net/project/showfiles.php?group_id=49065">https://sourceforge.net/project/showfiles.php?group_id=49065</a></li>
<li>move the package to your $HOME. My $HOME=/home/manio. In the following parts of this tutorial, I will use /home/manio directly. You should</li>
<li>$cd $HOME</li>
<li>$tar jxvf sescutils.tar.bz2</li>
<li>make /bin/sh link to /bin/bash by:</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">sudo rm /bin/shsudo ln -s /bin/bash /bin/sh</td>
</tr>
</tbody>
</table>
<p><em>Ubuntu uses dash, not bash. But the shell scripts in SESC are written by bash. So we have to change to bash.</em></p>
<ol>
<ol>
<li>modify file build-common in /home/manio/sescutils/build-mipseb-linux<br />
GNUSRC=$HOME/sescutils/src<br />
PREFIX=$HOME/sescutils/install<em><br />
<em>Note: GNUSRC is the position of the source codes. PREFIX is the position where the sescutils binary files will be installed to.</em></em></li>
<li>$cd $HOME/sescutils/build-mipseb-linux</li>
<li>$./build-1-binutils.<em><br />
error</em></li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o ar arparse.o arlex.o ar.o not-ranlib.o arsup.o rename.o binemul.o emul_vanilla.o bucomm.o version.o filemode.o  ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.aarlex.o: In function `main&#8217;:</p>
<p>/home/manio/sescutils/build-mipseb-linux/obj/binutils-build/binutils/arlex.c:1: multiple definition of `main&#8217;</p>
<p>arparse.o:/home/manio/sescutils/build-mipseb-linux/obj/binutils-build/binutils/arparse.c:1: first defined here</p>
<p>ar.o: In function `main&#8217;:</p>
<p>/home/manio/sescutils/src/binutils/binutils/ar.c:342: multiple definition of `main&#8217;</p>
<p>arparse.o:/home/manio/sescutils/build-mipseb-linux/obj/binutils-build/binutils/arparse.c:1: first defined here</p>
<p>bucomm.o: In function `make_tempname&#8217;:</p>
<p>/home/manio/sescutils/src/binutils/binutils/bucomm.c:425: warning: the use of `mktemp&#8217; is dangerous, better use `mkstemp&#8217; or `mkdtemp&#8217;</p>
<p>ar.o: In function `mri_emul&#8217;:</td>
</tr>
</tbody>
</table>
<p><em><em>Note: These errors are caused by the missing of bison and flex, which are used to parse the codes. So, we install them in the following steps. Before installing, make sure you can access the internet.</em></em></p>
<ol>
<ol>
<li>Install bison<br />
$sudo apt-get install bison</li>
<li>$./build-1-binutils. Same error with 3</li>
<li>$sudo apt-get install flex</li>
<li>./build-1-binutils<br />
Success</li>
<li>$./build-2-gcc-core<em><br />
<em>Note: if you use gcc <strong>4.x</strong> to compile sescutils, you will meet this error. To solve this problem, change to gcc3.4 by following the<a href="#how-to-install-gcc34"> How to Install old gcc3.4 by deb in Ubuntu 8.04.</a></em></em><em><em><br />
If you still can not get rid of the error, refer to the comments of this page. Your bison or flex should be the correct version.</em></em><a href="#how-to-install-gcc34"><em><em><br />
</em></em></a></li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">gcc -c   -g -O2 -DIN_GCC -DCROSS_COMPILE  -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  -Wno-error  -DHAVE_CONFIG_H    -I. -I. -I/home/manio/sescutils/src/gcc-3.4/gcc/gcc -I/home/manio/sescutils/src/gcc-3.4/gcc/gcc/. -I/home/manio/sescutils/src/gcc-3.4/gcc/gcc/../include  c-parse.c -o c-parse.ogcc: c-parse.c: No such file or directory</p>
<p>gcc: no input files</p>
<p>make[1]: *** [c-parse.o] Error 1</p>
<p>make[1]: Leaving directory `/home/manio/sescutils/build-mipseb-linux/obj/gcc-core-build/gcc&#8217;</p>
<p>make: *** [all-gcc] Error 2</td>
</tr>
</tbody>
</table>
<ol>
<ol>
<li>$./build-3-glibc</li>
</ol>
</ol>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@jun-desktop:~/sescutils/build-mipseb-linux$ ./build-3-glibcchecking build system type&#8230; Invalid configuration `unknown-linux&#8217;: machine `unknown&#8217; not recognized</p>
<p>configure: error: /bin/sh /home/manio/sescutils/src/glibc-2.3.2/scripts/config.sub unknown-linux failed</p>
<p>make: *** No rule to make target `all&#8217;.  Stop.</td>
</tr>
</tbody>
</table>
<p><em>Note: This error is caused by the wrong value of BUILD in<em> build-common </em>file. The <em>uname –p </em>command cannot output the right version of the building system, i.e. your PC.<br />
To correct this problem, simply change the value of BUILD to “i686-pc-linux-gnu”. By the way, there is another value, <em>host</em>, which is the platform in which you want to run your compiled glibc. The target system is the platform in which you will run your program with glibc.<br />
The typical toolchain is: build=your pc, host=your pc, target=arm/mips…</em></p>
<ol>
<ol>
<li>$./build-3-glibc<br />
Success.</li>
<li>$./build-4-gcc<br />
Success</li>
<li>$./build-5-gdb</li>
</ol>
</ol>
<p>ERROR</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">checking for wctype&#8230; yeschecking for library containing gethostbyname&#8230; none required</p>
<p>checking for library containing socketpair&#8230; none required</p>
<p>checking for library containing waddstr&#8230; no</p>
<p>checking for library containing tgetent&#8230; no</p>
<p>configure: error: no termcap library found</p>
<p>make: *** [configure-gdb] Error 1</td>
</tr>
</tbody>
</table>
<p><em>Note: A lib is missing. Install it by the following steps.</em></p>
<ol>
<li>$ sudo apt-get install libncurses5-dev</li>
<li>$./build-5-gdb<br />
Success.</li>
<li>Now, the sescutils is completely built. You can use it to build programs for SESC later.</li>
</ol>
<h3><a name="how-to-build-sesc-source-code"></a>How to Build SESC source code</h3>
<ol>
<ol>
<li>Install CVS<br />
$sudo apt-get install cvs</li>
<li>Download SESC source code by CVS<br />
$cvs -d:pserver:anonymous@sesc.cvs.sourceforge.net:/cvsroot/sesc login<br />
<em>Note: just press Enter when password is requested.</em><br />
$cvs -z3 -d:pserver:anonymous@sesc.cvs.sourceforge.net:/cvsroot/sesc co -P sesc</li>
<li>Move the source code to $HOME/esesc</li>
<li>Read the $HOME/esesc/REAMME. It will give you some steps to install SESC.</li>
<li>$cd ~</li>
<li>$mkdir sesc-build</li>
<li>$cd sesc-build</li>
<li>$../esesc/configure<br />
Note: if you download SESC in Windows, you will meet the following error.<br />
ERROR: elif unexpected…<br />
REASON: cannot use DOS text format in Linux<br />
SOLVE: open configure by vim, :set ff=unix</li>
<li>$sudo apt-get install binutils<br />
Note: this binutils is for building SESC source code. The binutils in sescutils is for building programs running on SESC.</li>
<li>$make<br />
ERROR: USHRT_CHAR undefined<br />
SOLUTION: include limits.h file in esesc/src/libcore/FetchEngine.cpp file. Add<br />
#include &lt;limits.h&gt;</li>
<li>$make<br />
ERROR:<br />
/home/manio/SESC/build/../esesc/src/libmint/subst.cpp:52:26: error: linux/dirent.h: No such file or directory<br />
SOLUTION:<br />
- Do not include linux/dirent.h, use dirent.h instead</li>
<li>$make<br />
ERROR‘uint32_t’ was not declared in this scope<br />
SOLUTION: add #include &lt;stdint.h&gt; wherever you see this error.<br />
Reference:<br />
<em><a href="http://www1.cs.columbia.edu/%7Eyoungjin/discus/messages/54/59.html?1259617974">http://www1.cs.columbia.edu/~youngjin/discus/messages/54/59.html?1259617974</a><br />
Hi Alejandro,</em><em>It maybe caused by the strictness of the C compiler provided in Ubuntu 9.10.<br />
(I had almost the same thing with 9.10.)</em><em>As you mentioned, please try to include the<br />
following statement anytime you have the above-mentioned error:<br />
#include &lt;stdint.h&gt; </em></li>
<li>$make<br />
ERROR: &#8220;/usr/bin/ld: cannot find -lz&#8221;<br />
SOLUTION: sudo apt-get install zlib1g-dev</li>
<li>SUCCESS</li>
<li>Test installation:<br />
$make testsim</li>
</ol>
</ol>
<p>Output</p>
<table border="1" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top" width="568">manio@ubuntu:~/SESC/build$ make testsimmake[1]: `sesc.mem&#8217; is up to date.</p>
<p>Generating sesc.conf from: /home/manio/SESC/build/../esesc/confs/mem.conf</p>
<p>cp /home/manio/SESC/build/../esesc/confs/mem.conf sesc.conf</p>
<p>cp /home/manio/SESC/build/../esesc/confs/shared.conf .</p>
<p>./sesc.mem -h0x800000 -csesc.conf /home/manio/SESC/build/../esesc/tests/crafty &lt; /home/manio/SESC/build/../esesc/tests/tt.in</p>
<p>static[0x1008db40-0x101b3dd4] heap[0x101b4000-0x109b4000] stack[0x109b4000-0x111ac000] -&gt; [0x41000000-0x4211e4c0]</p>
<p>Crafty v14.3</p>
<p>sesc_simulation_mark 0 (simulated) @30176641</p>
<p>White(1): sesc_simulation_mark 1 (simulated) @30225840</p>
<p>White(1): pondering disabled.</p>
<p>sesc_simulation_mark 2 (simulated) @30299339</p>
<p>White(1): noise level set to 0.</p>
<p>sesc_simulation_mark 3 (simulated) @30321649</p>
<p>White(1): search time set to 99999.00.</p>
<p>sesc_simulation_mark 4 (simulated) @30423769</p>
<p>White(1): verbosity set to 5.</p>
<p>sesc_simulation_mark 5 (simulated) @30449198</p>
<p>White(1): sesc_simulation_mark 6 (simulated) @30751014</p>
<p>White(1): search depth set to 2.</p>
<p>sesc_simulation_mark 7 (simulated) @30767155</p>
<p>White(1):</p>
<p>clearing hash tables</p>
<p>depth   time  score   variation (1)</p>
<p>1   ###.##  -0.67   axb5 c6xb5</p>
<p>1   ###.##  -0.08   a4a5</p>
<p>sesc_simulation_mark 8 (simulated) @33091197</p>
<p>1-&gt; ###.##  -0.08   a4a5</p>
<p>2   ###.##     &#8211;   a4a5</p>
<p>2   ###.##  -0.65   a4a5 f6f5</p>
<p>2   ###.##  -0.58   axb5 c6xb5 Ne4c5</p>
<p>2   ###.##  -0.46   Rf1c1 f6f5</p>
<p>2   ###.##  -0.43   Ra1c1 f6f5</p>
<p>sesc_simulation_mark 9 (simulated) @37838384</p>
<p>2-&gt; ###.##  -0.43   Ra1c1 f6f5</p>
<p>time:###  cpu:###  mat:-1  n:833  nps: ####</p>
<p>ext-&gt; checks:18 recaps:4 pawns:0 1rep:6</p>
<p>predicted:0  nodes:833  evals:372</p>
<p>endgame tablebase-&gt; probes done: 0  successful: 0</p>
<p>hashing-&gt; trans/ref:17%  pawn:83%  used:w0% b0%</p>
<p>White(1): Ra1c1</p>
<p>time used: ###.##</p>
<p>sesc_simulation_mark 10 (simulated) @38879583</p>
<p><strong>Black(1): execution complete.</strong></td>
</tr>
</tbody>
</table>
<p><a href="http://www.grid-appliance.org/wiki/index.php/Archer:SESC" target="_blank">Here </a>is another howto for installing SESC, by Girish Venkatasubramanian.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.manio.org/blog/sesc-tutorial-1-instaall-whole-sesc-step-by-step/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
	</channel>
</rss>

