<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-424716740996444147</id><updated>2024-10-04T19:07:03.958-07:00</updated><category term="Dot Net Framework 4.0"/><category term="multi core"/><category term="parallel extensions"/><category term="parallel programming"/><category term="programming"/><title type='text'>OpenMP</title><subtitle type='html'>A dedicated blog on Multi-Core Programming and OpenMP</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-5463538909604754008</id><published>2011-04-29T08:19:00.000-07:00</published><updated>2011-04-29T08:19:19.012-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Dot Net Framework 4.0"/><category scheme="http://www.blogger.com/atom/ns#" term="multi core"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel extensions"/><category scheme="http://www.blogger.com/atom/ns#" term="parallel programming"/><category scheme="http://www.blogger.com/atom/ns#" term="programming"/><title type='text'>Will Dot Net Framework 4.0 create significant change in parallel programming?</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;&lt;div class=&quot;KonaBody&quot; style=&quot;color: black;&quot;&gt;      From many years, Since the birth of  multi-core computing, there has been a need for parallel-programming  architecture. But now, the multi-core computing has become the prevailing  paradigm in computer architecture due to significant improvement in the trend of multi  core-processors.&lt;br /&gt;
&lt;br /&gt;
Very recently, Microsoft  released the beta versions of dot Net Framework 4.0 and &lt;span style=&quot;color: rgb(0, 0, 0) ! important; font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: static;&quot;&gt;&lt;span class=&quot;kLink&quot; style=&quot;font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: relative;&quot;&gt;Visual &lt;/span&gt;&lt;span class=&quot;kLink&quot; style=&quot;font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: relative;&quot;&gt;Studio &lt;/span&gt;&lt;span class=&quot;kLink&quot; style=&quot;font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: relative;&quot;&gt;2010&lt;/span&gt;&lt;/span&gt;.  The all eyes fell on.NET 4, yet the labels boasted the advent of  parallel-programming.&lt;br /&gt;
&lt;br /&gt;
The next question, yet to be answered is, whether there are any advantages  (more specifically towards aiding normal traditional programmer and performance regarding multi-threading) on migrating from existing APIs?&lt;br /&gt;
&lt;br /&gt;
My thoughts about dot net 4.0,.. &lt;br /&gt;
&lt;br /&gt;
1) Multi-Core processing ability: &lt;br /&gt;
Visual Studio along with dot net 4.0 now has significantly improved the Parallel Extensions,  which might help migrating normal programmers onto multi-core computing(distributed computing). The way Microsoft has organised the support  for the Framework is that, it has four broad areas like library,  LINQ, data structures and diagonastic tools..NET 4&#39;s peers and  predecessors lacked the multi-core operable ability. The main criteria  like communication and synchronization of sub-tasks were considered as  the biggest obstacles in getting a good parallel program performance.  But in Dot Net 4.0, it has promising parallel library technology enables developers to  define simultaneous, asynchronous tasks without having to work with  threads, locks, or the thread pool and without having all other burdens. This helps in programmer concentrating more on the logic of the application rather than spending most of his/her time on those tasks listed previously.&lt;br /&gt;
&lt;br /&gt;
2)Complete support for multiple programming languages and compilers:&lt;br /&gt;
Apart from VB &amp;amp; C# languages,.NET 4 establishes full support for programming languages like Ironpython, &lt;span style=&quot;color: rgb(0, 0, 0) ! important; font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: static;&quot;&gt;&lt;span class=&quot;kLink&quot; style=&quot;font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: relative;&quot;&gt;Ironruby&lt;/span&gt;&lt;/span&gt;,  F# and other similar.NET compilers. Unlike 3.5, it encompasses both  functional-programming and imperative object-oriented programming.&lt;br /&gt;
&lt;br /&gt;
3)Parallel-diagnostics:&lt;br /&gt;
Unlike  Visual Studio 2008, the new Visual Studio 2010 supports debugging and  profiling, extensively. This helps programmer in debugging, hence this  was very much expected improvement in  Visual Studio 2010 from most  users of  Visual Studio 2008 programmers. The new profiling tools  provides various data  views which displays graphical, tabular and numerical information about  how a parallel or multiple-threaded application interacts with itself  and with other programs, thus programmer can now know how the  application is actually working. The results enable developers to  quickly  identify areas of concern, and helps in navigating from points on the  displays to call stacks &amp;amp; source codes.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
4)Dynamic language runtime:&lt;br /&gt;
Addition  of the dynamic language runtime (DLR) is a boon to.NET beginners. Using  this new DLR runtime environment, developers can add a set of services  for dynamic languages to the CLR. In addition to that, the DLR makes it  simpler and easier to develop dynamic languages and to add dynamic features to  statically typed languages. A new System Dynamic name space has been  added to the.NET Framework on supporting the DLR and several new classes  supporting the.NET Framework infrastructure are added to the System&lt;br /&gt;
&lt;br /&gt;
5)Runtime Compiler Services. &lt;br /&gt;
Anyway, the new DLR provides the following advantages to developers:&lt;br /&gt;
Developers  can use rapid feedback loop which lets them enter various statements  and execute them to see the results almost immediately.&lt;br /&gt;
Support for  both top-down and more traditional bottom-up development. For instance,  when a developer uses a top-down approach, he can call-out functions  that are not yet implemented and then add them when needed.&lt;br /&gt;
Easier refactoring and code modifications (Developers do not have to change static type declarations throughout the code) &lt;br /&gt;
&lt;br /&gt;
If you think only  parallel programming abilities and promising capabilities make the  MS.NET 4.0 a more promising next generation programming tool, think  again! That&#39;s not all. There are also a number of enhancements to the  Base Libraries for things like collections, reflection, data structures,  handling, threading and lots of new features for the web.Apart from Microsoft, there are other Open Source communities working continuously towards bringing the make-over in current traditional(non-parallel) programming trend.&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/5463538909604754008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/04/will-dot-net-framework-40-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/5463538909604754008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/5463538909604754008'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/04/will-dot-net-framework-40-create.html' title='Will Dot Net Framework 4.0 create significant change in parallel programming?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-8570775395066817527</id><published>2011-03-15T06:43:00.000-07:00</published><updated>2011-03-15T06:43:41.105-07:00</updated><title type='text'>General Structure of Open MP statements and all Clauses</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;So from now on lets stop Theory and get into some practical stuffs..!!!!&lt;br /&gt;
&lt;br /&gt;
Open MP provides various &lt;u&gt;Directives&lt;/u&gt;, &lt;u&gt;Run-time routines&lt;/u&gt;, &lt;u&gt;Environment variables &lt;/u&gt;to help us achieve parallelism in our application. So from now on lets begin our journey on Open MP.&lt;br /&gt;
&lt;br /&gt;
First lets look at general structure of any Open MP statements :&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;table border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr&gt; &lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;#pragma omp &lt;/th&gt;  &lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&lt;b&gt;directive-name&lt;/b&gt;&lt;/th&gt; &lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&lt;b&gt;[clause, ...]&lt;/b&gt;&lt;/th&gt;  &lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&lt;b&gt;newline&lt;/b&gt;&lt;/th&gt; &lt;/tr&gt;
&lt;tr valign=&quot;top&quot;&gt; &lt;td style=&quot;background-color: #38761d; color: white;&quot;&gt;Required for all OpenMP C/C++ directives.&lt;/td&gt;&lt;td style=&quot;background-color: #38761d; color: white;&quot;&gt;A valid OpenMP directive.  Must appear after the #pragma omp and before any &lt;br /&gt;
clauses.&lt;br /&gt;
&lt;br /&gt;
&lt;/td&gt;&lt;td style=&quot;background-color: #38761d; color: white;&quot;&gt;Optional.  Clauses can be in any order, and repeated as necessary unless otherwise restricted.&lt;/td&gt;&lt;td style=&quot;background-color: #38761d; color: white;&quot;&gt;Required.  Precedes the structured block which is enclosed by this  directive.&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;Clauses : &lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Usually these clauses are often referred as Data-Sharing or Data-Scope Clauses. These clauses are very important while dealing with Open-MP, because these clauses are used to specify How the data is shared among the threads? Which data is private to specific thread? Which aren&#39;t?..&lt;br /&gt;
&lt;br /&gt;
(Following requires prerequisite-thread, If you are not familiar with &quot;threads&quot; please get an overview about it &lt;a href=&quot;http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html&quot;&gt;here&lt;/a&gt;.) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is the list of clauses supported by most OpenMP,&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. &quot;&lt;b&gt;private&lt;/b&gt;&quot; Clause&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. &quot;&lt;b&gt;shared&lt;/b&gt;&quot; Clause&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3. &quot;&lt;b&gt;default&lt;/b&gt;&quot; Clause&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4. &quot;&lt;b&gt;firstprivate&lt;/b&gt;&quot; Clause&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5. &quot;&lt;b&gt;lastprivate&lt;/b&gt;&quot; Clause&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6. &quot;&lt;b&gt;reduction&lt;/b&gt;&quot; Clause&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 1 : &quot;private&quot;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;private (&lt;i&gt;list&lt;/i&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The &quot;private&quot;clause declares variables in its list to be private to each      thread. You can specify a list of variables which you need to make it private variable for each thread. Once we specify private clause, actual work going on behind the scene is explained as follows,&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;A new object(variable) of the same data type is declared once for each thread in the         team of threads to which belong.&lt;/li&gt;
&lt;li&gt;All references(pointers) to the original object are replaced with references         to the new object(variable) of the corresponding threads new variable(which is created in previous step)&lt;/li&gt;
&lt;li&gt;Variables specified in &quot;private&quot; clause should be assumed to be         uninitialized for each thread&lt;/li&gt;
&lt;li&gt;E.g.&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int tid;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma omp parallel &lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;private&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(tid)&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = omp_get_thread_num();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Thread ID&amp;nbsp; : %d:\n&quot;,tid);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }  /* end of parallel section */&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 2 : &quot;shared&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;shared (&lt;i&gt;list&lt;/i&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The &quot;shared&quot; clause declares variables in its &lt;b&gt;&lt;i&gt;list &lt;/i&gt;&lt;/b&gt;to be shared among all      threads in the team.&lt;/li&gt;
&lt;li&gt;This is one way which OpenMP allows us to share the data among multiple threads, hence achieve inter-thread communication by modifying the shared data.&lt;/li&gt;
&lt;li&gt;E.g,&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int tid;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma omp parallel &lt;i style=&quot;font-weight: normal;&quot;&gt;shared&lt;/i&gt;&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(tid)&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = omp_get_thread_num();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Thread ID&amp;nbsp; : %d:\n&quot;,tid);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }  /* end of parallel section */&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt; &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 3 : &quot;default&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;default(shared | none)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The &quot;default&quot;clause allows the user to specify a default      scope for all variables in any of the parallel region, up-till the next &quot;default&quot; clause is encountered.&lt;/li&gt;
&lt;li&gt;Specific variables can be exempted from the default using the &quot;private&quot;, &quot;shared&quot;, &quot;firstprivate&quot;, &quot;lastprivate&quot; and &quot;reduction&quot; clauses.&lt;/li&gt;
&lt;li&gt;Most of the C/C++ OpenMP specification allow only &lt;i&gt;shared&lt;/i&gt; or &lt;i&gt;none&lt;/i&gt; as a possible default, it does not allow &quot;private&quot; or      &quot;firstprivate&quot; as a possible      default.&lt;/li&gt;
&lt;li&gt;Using &lt;i&gt;none&lt;/i&gt; as a default requires that the programmer explicitly scope     all variables.&lt;/li&gt;
&lt;li&gt;E.g,&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int tid;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #pragma omp parallel &lt;i&gt;default(&lt;span style=&quot;font-weight: normal;&quot;&gt;shared&lt;/span&gt;&lt;/i&gt;&lt;i&gt;)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // some statements...&amp;nbsp;&lt;/i&gt; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma omp parallel&lt;b&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = omp_get_thread_num(); /*here tid has default scope, which is set to &quot;shared&quot;*/&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Thread ID&amp;nbsp; : %d:\n&quot;,tid);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }  /* end of parallel section */&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;  &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 4 : &quot;firstprivate&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;firstprivate(&lt;i&gt;list&lt;/i&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The &quot;firstprivate&quot; clause combines the behavior of the &quot;private&quot; clause with     automatic initialization of the variables in its list.&lt;/li&gt;
&lt;li&gt;The variables in the field &lt;i&gt;list&lt;/i&gt; are initialized to their respective values prior(before) to entry into the parallel or work-sharing construct&lt;/li&gt;
&lt;li&gt;E.g,&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int tid = 10;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma omp parallel &lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;firstprivate&lt;/span&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=&quot;font-weight: normal;&quot;&gt;(tid)&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Thread ID&amp;nbsp; : %d:\n&quot;,tid);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; tid = omp_get_thread_num();&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; printf(&quot;Thread ID&amp;nbsp; : %d:\n&quot;,tid);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }  /* end of parallel section */&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;  &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 5 : &quot;lastprivate&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;lastprivate(&lt;i&gt;list&lt;/i&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The &quot;lastprivate&quot; clause combines the behavior of the &quot;private&quot; clause with     a copy from the last loop iteration or section to the original      variable object.&lt;/li&gt;
&lt;li&gt;The value copied back into the original variable object is obtained from     the last (sequentially) iteration or section of the enclosing construct.&lt;/li&gt;
&lt;li&gt;For example,      the team member which executes the final iteration for a DO section, or      the team member which does the last SECTION of a SECTIONS context performs      the copy with its own values.&lt;/li&gt;
&lt;li&gt;This clause is not used most of the time, so if you don&#39;t get understand this clause don&#39;t worry&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Clause 6 : &quot;reduction&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Format of this clause =&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;reduction(&lt;i&gt;operator : list&lt;/i&gt;)&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;The &quot;reduction&quot; clause performs a reduction on the variables that appear in     its list. &lt;/li&gt;
&lt;li&gt;A private copy for each variable in the &lt;b&gt;&lt;i&gt;list &lt;/i&gt;&lt;/b&gt;is created for each thread.       At the end of the parallel section&amp;nbsp; the reduction operation is applied to all copies of the variable in the list, and the final result is written back      to the actual variable shared by other team members. &lt;/li&gt;
&lt;li&gt;E.g,&lt;/li&gt;
&lt;/ul&gt;&lt;table align=&quot;left&quot; border=&quot;1&quot; cellpadding=&quot;5&quot; cellspacing=&quot;0&quot;&gt;&lt;tbody&gt;
&lt;tr align=&quot;left&quot;&gt;&lt;th style=&quot;background-color: #93c47d; color: #38761d;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; int x = 0, i;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #pragma omp parallel for default(shared) private(i) reduction(+ : x) &lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; for(i = 1; i &amp;lt;= 10; i++)&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = x + 1;&lt;br /&gt;
&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }  /* end of parallel section, now the value of x is added back to actual variable shared by other team members */&lt;/th&gt;&lt;/tr&gt;
&lt;/tbody&gt;  &lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/8570775395066817527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/03/general-structure-of-open-mp-statements.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/8570775395066817527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/8570775395066817527'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/03/general-structure-of-open-mp-statements.html' title='General Structure of Open MP statements and all Clauses'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-5707240263723288646</id><published>2011-01-15T06:53:00.000-08:00</published><updated>2011-03-15T06:56:50.528-07:00</updated><title type='text'>Other sites based on multicore programming,..</title><content type='html'>&lt;div dir=&quot;ltr&quot; style=&quot;text-align: left;&quot; trbidi=&quot;on&quot;&gt;You can get some more ideas by visiting following sites..&lt;br /&gt;
&lt;ul&gt;&lt;li&gt;&lt;a href=&quot;http://www.multicoreinfo.com/&quot;&gt;www.multicoreinfo.com&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://www.openmp.org/&quot;&gt;www.openmp.org&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/5707240263723288646/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/01/other-sites-based-on-multicore.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/5707240263723288646'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/5707240263723288646'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/01/other-sites-based-on-multicore.html' title='Other sites based on multicore programming,..'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-9084299631651766342</id><published>2011-01-15T05:41:00.000-08:00</published><updated>2011-01-15T06:17:44.740-08:00</updated><title type='text'>Home</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This is a dedicated blog only for Multi-Core Programming and OpenMP.Here discussions will be on Multi-Core technology and how to improve efficiency of system using Multi-Core programming.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;This is my first blog, hope it will be nice, cool and useful for everyone who are interested to learn multi-core programming and OpenMP,etc..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Here, as i said will be posting some information on multi-core programming and complete tutorial on OpenMP. I will begin from basics of OpenMP and proceed towards to advanced topics. To say in one line according to me - &quot;OpenMP is very useful and easy to learn&quot;,&amp;nbsp; to get an overview its enough if you go through all of my current posts and some more to come..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;My sincere request to one and all is, please feel free to leave a comment as to how you felt about my first blog.. Any and/or all advice is always welcome, please do reply via comments..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;At any point of time you can refer to index present at top of the page, so that you get an overview of all topics covered so far.&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/9084299631651766342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/01/home.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/9084299631651766342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/9084299631651766342'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/01/home.html' title='Home'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-7632018882885328527</id><published>2011-01-15T05:23:00.000-08:00</published><updated>2011-01-15T06:18:11.259-08:00</updated><title type='text'>Threads and Parallel programming model</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;what is a thread?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Informally said, a thread consists of a series of instructions with its own program counter(PC) and state&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;A multi-threaded program executes multiple threads in parallel&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;This is the core concept to increase the utilization of CPU, therefore performance of system is increased.(if you are not convinced with this statement, have a glance at this page&amp;nbsp; &lt;a href=&quot;http://openmp.blogspot.com/2011/01/introduction.html&quot;&gt;click here&lt;/a&gt;)&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrUYPTpzbpfI5yAfbZP6CzA3qvtwl4AihcZw6R_e8menWUOhxHwO8UNKQCBudSVcfozkqnbMfaDhJZXP30v5rfkcSb1JBa3uqtJHHG7G74lVRZx1p4AhCLQsOPcK93JMp_BY6YtGTt5AoB/s1600/pic2.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Multiple Threads&quot; border=&quot;0&quot; height=&quot;162&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrUYPTpzbpfI5yAfbZP6CzA3qvtwl4AihcZw6R_e8menWUOhxHwO8UNKQCBudSVcfozkqnbMfaDhJZXP30v5rfkcSb1JBa3uqtJHHG7G74lVRZx1p4AhCLQsOPcK93JMp_BY6YtGTt5AoB/s320/pic2.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp; &lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Parallel programming models :&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;There are various programming models present, some of the well-known are listed below. They can be categorized into two types,&lt;/span&gt;&lt;/div&gt;&lt;ol style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Distributed Memory&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b&gt;Shared Memory&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Some models which come under &lt;b&gt;Distributed Memory &lt;/b&gt;are : Sockets, PVM(Parallel Virtual Machine), MPI(Message Passing Interface), etc..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Some models which come under &lt;b&gt;Shared Memory &lt;/b&gt;are : OpenMP, posix thread, Automatic parallelization, etc,..&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;I will discuss in one or two sentence about one each from above two categories,&lt;/span&gt;&lt;/div&gt;&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;MPI (Message Passing Interface) :&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Is an example for Distributed memory model &lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;All data is private&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt; All threads have access to their own private memory&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Data is shared explicitly by exchanging buffers&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Data transfer has to be programmed explicitly&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;An overview is given below in the figure,&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVzURDJ5FFiq0IkuZTw4PKzJ0KVcsuB7C7qCRcIagXMw2aeqxlIM-zx9DtKnHZJ3GNTWR-KndPb2xlc_nh0Nxfw0T_LNSmr-ZPKIvVGCohdL39ZyDUZyfTaquRVlHNMQ_ox3YsX-M_DlmE/s1600/pic3.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Distributed Memory Model - MPI(Message passing Interface)&quot; border=&quot;0&quot; height=&quot;315&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVzURDJ5FFiq0IkuZTw4PKzJ0KVcsuB7C7qCRcIagXMw2aeqxlIM-zx9DtKnHZJ3GNTWR-KndPb2xlc_nh0Nxfw0T_LNSmr-ZPKIvVGCohdL39ZyDUZyfTaquRVlHNMQ_ox3YsX-M_DlmE/s320/pic3.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;OpenMP :&amp;nbsp; (Open Multi-Processing)&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Is an example for Shared Memory Model &lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Data can be shared or private&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;All threads can have access to the same or globally shared memory&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;private data can be accessed only by the thread that owns it&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Easy to learn and implement&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;it is as shown below&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj28no24h4z3_eMNELRqE2g6uAFp0y8Sn4oFsBCaflm88HDCTinR7dU8bnlzB7QV5jB4zpNGDK0Wk1ytS1xuRdWZXhkx3hyT4lr5v-DfU2Omb4KxfwqDf0eEDuiflxZ-7Dj81foCb6VDXk/s1600/pic4.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Shared Memory Model - Open MP&quot; border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj28no24h4z3_eMNELRqE2g6uAFp0y8Sn4oFsBCaflm88HDCTinR7dU8bnlzB7QV5jB4zpNGDK0Wk1ytS1xuRdWZXhkx3hyT4lr5v-DfU2Omb4KxfwqDf0eEDuiflxZ-7Dj81foCb6VDXk/s320/pic4.bmp&quot; width=&quot;317&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;b&gt;Note : &lt;/b&gt;In this blog i will only be discussing about OpenMP and other models on shared memory models, sorry to say no to MPI. So once you are through with this post you can get on to &lt;a href=&quot;http://openmp.blogspot.com/2011/01/what-is-open-mp-why-open-mp.html&quot;&gt;next post &lt;/a&gt;which discusses more about OpenMP.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/7632018882885328527/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/7632018882885328527'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/7632018882885328527'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html' title='Threads and Parallel programming model'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrUYPTpzbpfI5yAfbZP6CzA3qvtwl4AihcZw6R_e8menWUOhxHwO8UNKQCBudSVcfozkqnbMfaDhJZXP30v5rfkcSb1JBa3uqtJHHG7G74lVRZx1p4AhCLQsOPcK93JMp_BY6YtGTt5AoB/s72-c/pic2.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-30445570492921757</id><published>2011-01-15T05:15:00.000-08:00</published><updated>2011-01-15T06:18:00.161-08:00</updated><title type='text'>Introduction to Multi-Core Technology</title><content type='html'>&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: large;&quot;&gt;&lt;b&gt;Before we get into,.. &lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;In computing, a &lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;processor&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; is the unit that reads and executes program instructions and provides expected output&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Clock speed plays major role in determining the speed of the processors&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Initially it was started at &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;20&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;MHz and later gone up to &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;3.8&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;GHz&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Later the situation was such that they could not increase the clock speed. So they researched about other aspects where they could improve the speed of processing&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;So they came up with &lt;/span&gt;&lt;u&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;MULTI-CORE&amp;nbsp; &lt;/span&gt;&lt;/u&gt;&lt;u&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;TECHNOLOGY.&lt;/span&gt;&lt;/u&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: large;&quot;&gt;&lt;b&gt;Cores and Multi-Cores&lt;/b&gt;&lt;/span&gt;  &lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Initially processors were originally developed with only one &lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;core&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;The &lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;core&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; is the part of the processor that actually performs the reading and executing of the instruction&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwANybLb2DyywRK2Lte-hrBPDwTujD2gWfDdcPtF_qPATZhbe8VwfUEUym0dJN2WumrXWcHMDrXfsB5npHOjRnb4XACQj6lZPp1CMRrj9q99U_pAL0lT-cSycKvUPU5gh023vgmLkCUSXt/s1600/pic1.bmp&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img alt=&quot;Time efficiency with usage of multi-core processors&quot; border=&quot;0&quot; height=&quot;119&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwANybLb2DyywRK2Lte-hrBPDwTujD2gWfDdcPtF_qPATZhbe8VwfUEUym0dJN2WumrXWcHMDrXfsB5npHOjRnb4XACQj6lZPp1CMRrj9q99U_pAL0lT-cSycKvUPU5gh023vgmLkCUSXt/s320/pic1.bmp&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;Single-core&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; processors can only process one instruction at a time&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;A &lt;/span&gt;&lt;span style=&quot;color: black; font-weight: bold;&quot;&gt;multi-core processor&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; is a processing system composed of two or more independent cores. It is an integrated circuit(IC) to which two or more individual processors (called &lt;/span&gt;&lt;span style=&quot;color: black; font-style: italic;&quot;&gt;cores&lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt; in this sense) have been attached&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;So if a system has more cores, the more strength it has.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;One best example you could think off is, just imagine what if you had 4 hands instead of two..? that means you can work faster.. :) &lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;But there is certain limit on it, which i will dicuss in future posts.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;But more number of cores does not mean that performance of the system will always be better than before.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;That is because suppose if you have 4 hands but your mind is not able to utilize the 4 hands efficiently, so whats the use of having four hands then..?&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;It is the same case in today&#39;s Computer Industry. Hardware improvement isn&#39;t just enough, there has to be change in software trend to improve efficient usage of the multi-core technology.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Always remember the basic thing about computer&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Hardware + Software = Computer&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;Of-course that&#39;s not exactly accurate in today&#39;s trend, i mean there is many more additions to the above like firmware,etc.. But the above equation is the very basic one.&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt; &lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Other Issues :&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Currently &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;computer &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;market has &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;hardware that will only run at full speed with parallel programs. But &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;unfortunately number of programmers&amp;nbsp; who write such supportable and efficient programs are very less…&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;Usually Parallel &lt;/span&gt;&lt;span style=&quot;color: black;&quot;&gt;computing requires,&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;the problems to be decomposed into sub-problems that can be safely solved at the same time(concurrently)&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;T&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;he programmer structures the code and data to solve these sub-problems concurrently.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt;There are various tools that help the programmer achieve this, which i will discuss in next post,&lt;a href=&quot;http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html&quot;&gt;click here to go to next post&lt;/a&gt;.&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;span style=&quot;color: black;&quot;&gt; &lt;/span&gt;&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/30445570492921757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/01/introduction.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/30445570492921757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/30445570492921757'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/01/introduction.html' title='Introduction to Multi-Core Technology'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwANybLb2DyywRK2Lte-hrBPDwTujD2gWfDdcPtF_qPATZhbe8VwfUEUym0dJN2WumrXWcHMDrXfsB5npHOjRnb4XACQj6lZPp1CMRrj9q99U_pAL0lT-cSycKvUPU5gh023vgmLkCUSXt/s72-c/pic1.bmp" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-424716740996444147.post-6738660863459660654</id><published>2011-01-15T00:17:00.000-08:00</published><updated>2011-01-15T21:30:16.941-08:00</updated><title type='text'>What is OpenMP? Why OpenMP?</title><content type='html'>&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;What is OpenMP?&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OpenMP is an API (Application Programming Interface)&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OpenMP Supports &lt;a href=&quot;http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html&quot;&gt;shared memory model&lt;/a&gt; for parallel programming&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OpenMP can be used along with languages like C, C++, FORTRAN, etc..&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OpenMP works on Microsoft Windows platform and also on all Unix flavors&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Therefore, OpenMP is more flexible &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;OpenMP consists of vast set of compiler directives, library routines, and environment variables that influence run-time behavior. To conclude, OpenMP is a API used to make your application run in parallel, so that CPU utilization is more hence improving time efficiency.(if you aren&#39;t convinced, plz have a look at &lt;a href=&quot;http://openmp.blogspot.com/2011/01/introduction.html&quot;&gt;this&lt;/a&gt;)&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Why do we need OpenMP?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Why do we need OpenMP? why not any other alternatives(for other alternatives &lt;a href=&quot;http://openmp.blogspot.com/2011/01/threads-and-parallel-programming-model.html&quot;&gt;click here&lt;/a&gt;). This seems to be a BIG question, a million dollar $$ question. But the answer varies from person to person based on personal point of view on OpenMP.&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;But few common reasons for using OpenMP other than similar alternatives, are listed below :&lt;/span&gt;&lt;/div&gt;&lt;ul style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;First, OpenMP is easy to learn and implement on a fresh projects&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Secondly, Minimum code change required to alter existing applications&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;br /&gt;
&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Compilers :&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Below is the list of compilers which can be used to compile programs which uses OpenMP directives,libraries,..&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;&lt;ul&gt;&lt;li style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://gcc.gnu.org/&quot;&gt;GNU&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp&quot;&gt;IBM&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.oracle.com/technetwork/server-storage/solarisstudio/overview/index.html&quot;&gt;Oracle&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm&quot;&gt;Intel&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/tt15eb9t.aspx&quot;&gt;Microsoft Compilers&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;b style=&quot;font-family: &amp;quot;Trebuchet MS&amp;quot;,sans-serif;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.absoft.com/&quot;&gt;Absoft pro - for FORTRAN&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana,sans-serif; font-size: small;&quot;&gt;and many more,.. I recommend you to download and use &lt;a href=&quot;http://software.intel.com/en-us/articles/intel-parallel-studio/&quot;&gt;Intel Parallel Studio&lt;/a&gt; along with visual studio 2008 or higher version, because it has nice user interface, has IntelliSense and easy to debug.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;font-family: Verdana,sans-serif;&quot;&gt;&lt;span style=&quot;color: black; font-size: small;&quot;&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://openmp.blogspot.com/feeds/6738660863459660654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://openmp.blogspot.com/2011/01/what-is-open-mp-why-open-mp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/6738660863459660654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/424716740996444147/posts/default/6738660863459660654'/><link rel='alternate' type='text/html' href='http://openmp.blogspot.com/2011/01/what-is-open-mp-why-open-mp.html' title='What is OpenMP? Why OpenMP?'/><author><name>Unknown</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>