<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Laaboue</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Laaboue"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Laaboue"/>
	<updated>2026-06-02T12:22:39Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4514</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4514"/>
		<updated>2007-09-25T02:58:58Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''References''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [http://en.wikipedia.org/wiki/Atom atomic], [http://en.wikipedia.org/wiki/Polymer polymeric], [http://en.wikipedia.org/wiki/Biology biological], [http://en.wikipedia.org/wiki/Metal metallic], or [http://en.wikipedia.org/wiki/Granular_material granular] systems using a variety of [http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [http://www.spec.org/mpi2007/ SPEC MPI 2007] package used to [http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark] systems using the [http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [http://en.wikipedia.org/wiki/Velocity velocity] and [http://en.wikipedia.org/wiki/Temperature temperature]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of [http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29 concurrency] just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such [http://en.wikipedia.org/wiki/Granularity fine granularity] imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS suite is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum [http://en.wikipedia.org/wiki/Speedup speedup] of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal size boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled by boundary condition calculators. Atoms and molecules in the system can be mobile and they can move across boxes. Such activity triggers an exchange function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of [http://en.wikipedia.org/wiki/Load_balancing_(computing) &amp;quot;Load Imbalance&amp;quot;] that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different [http://en.wikipedia.org/wiki/Duration timescales] for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snippet of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the [http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy] values from all the processors are summed and a value is derived for the whole domain. Note the recount function near the end of the snippet where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snippet of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains. This gives us a hint that multiple message sizes are used throughout the LAMMPS suite.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is [http://en.wikipedia.org/wiki/Scalability scalable], it does not guarantee [http://en.wikipedia.org/wiki/Load_balancing_%28computing%29 load balancing]. &lt;br /&gt;
&lt;br /&gt;
==='''References'''===&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&amp;lt;br&amp;gt;&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&amp;lt;br&amp;gt;&lt;br /&gt;
3: [http://www.spec.org Standard Performance Evaluation Corporation (SPEC)]&amp;lt;br&amp;gt;&lt;br /&gt;
4: [http://www.spec.org/mpi2007/ SPEC MPI 2007]&amp;lt;br&amp;gt;&lt;br /&gt;
5: S. J. Plimpton, Fast Parallel Algorithms for Short-Range Molecular Dynamics, J Comp Phys, 117, 1-19 (1995).&amp;lt;br&amp;gt;&lt;br /&gt;
6: S. J. Plimpton, R. Pollock, M. Stevens, Particle-Mesh Ewald and rRESPA for Parallel Molecular Dynamics Simulations, in Proc of the Eighth SIAM Conference on Parallel Processing for Scientific Computing, Minneapolis, MN (March 1997).&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4513</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4513"/>
		<updated>2007-09-25T02:52:56Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Mapping''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [http://en.wikipedia.org/wiki/Atom atomic], [http://en.wikipedia.org/wiki/Polymer polymeric], [http://en.wikipedia.org/wiki/Biology biological], [http://en.wikipedia.org/wiki/Metal metallic], or [http://en.wikipedia.org/wiki/Granular_material granular] systems using a variety of [http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [http://www.spec.org/mpi2007/ SPEC MPI 2007] package used to [http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark] systems using the [http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [http://en.wikipedia.org/wiki/Velocity velocity] and [http://en.wikipedia.org/wiki/Temperature temperature]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of [http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29 concurrency] just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such [http://en.wikipedia.org/wiki/Granularity fine granularity] imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS suite is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum [http://en.wikipedia.org/wiki/Speedup speedup] of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal size boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled by boundary condition calculators. Atoms and molecules in the system can be mobile and they can move across boxes. Such activity triggers an exchange function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of [http://en.wikipedia.org/wiki/Load_balancing_(computing) &amp;quot;Load Imbalance&amp;quot;] that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different [http://en.wikipedia.org/wiki/Duration timescales] for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snippet of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the [http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy] values from all the processors are summed and a value is derived for the whole domain. Note the recount function near the end of the snippet where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snippet of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains. This gives us a hint that multiple message sizes are used throughout the LAMMPS suite.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is [http://en.wikipedia.org/wiki/Scalability scalable], it does not guarantee [http://en.wikipedia.org/wiki/Load_balancing_%28computing%29 load balancing]. &lt;br /&gt;
&lt;br /&gt;
==='''References'''===&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4512</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4512"/>
		<updated>2007-09-25T02:50:21Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Orchestration''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [http://en.wikipedia.org/wiki/Atom atomic], [http://en.wikipedia.org/wiki/Polymer polymeric], [http://en.wikipedia.org/wiki/Biology biological], [http://en.wikipedia.org/wiki/Metal metallic], or [http://en.wikipedia.org/wiki/Granular_material granular] systems using a variety of [http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [http://www.spec.org/mpi2007/ SPEC MPI 2007] package used to [http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark] systems using the [http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [http://en.wikipedia.org/wiki/Velocity velocity] and [http://en.wikipedia.org/wiki/Temperature temperature]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of [http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29 concurrency] just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such [http://en.wikipedia.org/wiki/Granularity fine granularity] imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS suite is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum [http://en.wikipedia.org/wiki/Speedup speedup] of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal size boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled by boundary condition calculators. Atoms and molecules in the system can be mobile and they can move across boxes. Such activity triggers an exchange function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of [http://en.wikipedia.org/wiki/Load_balancing_(computing) &amp;quot;Load Imbalance&amp;quot;] that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different [http://en.wikipedia.org/wiki/Duration timescales] for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snippet of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the [http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy] values from all the processors are summed and a value is derived for the whole domain. Note the recount function near the end of the snippet where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snippet of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains. This gives us a hint that multiple message sizes are used throughout the LAMMPS suite.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4511</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4511"/>
		<updated>2007-09-25T02:44:17Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Assignment''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [http://en.wikipedia.org/wiki/Atom atomic], [http://en.wikipedia.org/wiki/Polymer polymeric], [http://en.wikipedia.org/wiki/Biology biological], [http://en.wikipedia.org/wiki/Metal metallic], or [http://en.wikipedia.org/wiki/Granular_material granular] systems using a variety of [http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [http://www.spec.org/mpi2007/ SPEC MPI 2007] package used to [http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark] systems using the [http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [http://en.wikipedia.org/wiki/Velocity velocity] and [http://en.wikipedia.org/wiki/Temperature temperature]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of [http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29 concurrency] just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such [http://en.wikipedia.org/wiki/Granularity fine granularity] imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS suite is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum [http://en.wikipedia.org/wiki/Speedup speedup] of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal size boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled by boundary condition calculators. Atoms and molecules in the system can be mobile and they can move across boxes. Such activity triggers an exchange function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of [http://en.wikipedia.org/wiki/Load_balancing_(computing) &amp;quot;Load Imbalance&amp;quot;] that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4510</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4510"/>
		<updated>2007-09-25T02:42:25Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [http://en.wikipedia.org/wiki/Atom atomic], [http://en.wikipedia.org/wiki/Polymer polymeric], [http://en.wikipedia.org/wiki/Biology biological], [http://en.wikipedia.org/wiki/Metal metallic], or [http://en.wikipedia.org/wiki/Granular_material granular] systems using a variety of [http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [http://www.spec.org/mpi2007/ SPEC MPI 2007] package used to [http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark] systems using the [http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [http://en.wikipedia.org/wiki/Velocity velocity] and [http://en.wikipedia.org/wiki/Temperature temperature]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of [http://en.wikipedia.org/wiki/Concurrency_%28computer_science%29 concurrency] just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such [http://en.wikipedia.org/wiki/Granularity fine granularity] imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS suite is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum [http://en.wikipedia.org/wiki/Speedup speedup] of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4509</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4509"/>
		<updated>2007-09-25T02:38:09Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of atoms or molecules in a solid, liquid or gaseous material. It can model [[http://en.wikipedia.org/wiki/Atom atomic]], [[http://en.wikipedia.org/wiki/Polymer polymeric]], [[http://en.wikipedia.org/wiki/Biology biological]], [[http://en.wikipedia.org/wiki/Metal metallic]], or [[http://en.wikipedia.org/wiki/Granular_material granular]] systems using a variety of [[http://en.wikipedia.org/wiki/Force_field_%28physics%29 force fields]] and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the [[http://www.spec.org/mpi2007/ SPEC MPI 2007]] package used to [[http://en.wikipedia.org/wiki/Benchmark_%28computing%29 benchmark]] systems using the [[http://en.wikipedia.org/wiki/Message_Passing_Interface Message-Passing Interface]]. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like initial [[http://en.wikipedia.org/wiki/Velocity velocity]] and [[http://en.wikipedia.org/wiki/Temperature temperature]]. Once the initialization is completed the various required parameters are calculated (the flow chart below shows force/energy as an example). After the parameters are calculated the necessary boundary conditions are applied and the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed and presented using visualization schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4508</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4508"/>
		<updated>2007-09-25T02:26:38Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4507</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4507"/>
		<updated>2007-09-25T02:25:11Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4506</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4506"/>
		<updated>2007-09-25T02:24:35Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4505</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4505"/>
		<updated>2007-09-25T02:24:16Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:http://pg.ece.ncsu.edu/mediawiki/images/6/6a/FlowChart.jpg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:FlowChart.jpg&amp;diff=4503</id>
		<title>File:FlowChart.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:FlowChart.jpg&amp;diff=4503"/>
		<updated>2007-09-25T02:23:21Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: Sequential algorithm for the sequential molecular dynamics simulation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sequential algorithm for the sequential molecular dynamics simulation.&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4498</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4498"/>
		<updated>2007-09-25T02:20:43Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Orchestration''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring atoms. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain. Note the recount function near the end of the snipit where the atoms are recounted. This happens if the atoms are mobile. When the atoms are mobile, it is possible for some of the atoms to move between boxes, which triggers the exchange function between processors.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4480</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4480"/>
		<updated>2007-09-25T02:02:26Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Decomposition''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). The LAMMPS suite is documented to have a maximum speedup of 7.5 to 8 versus a similar sequential molecular dynamics suite.&lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4478</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4478"/>
		<updated>2007-09-25T02:01:16Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Assignment''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). &lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite takes the following approach in assigning the tasks defined above. The atoms and molecules in the system (known as World in the LAMMPS suite) are divided spatially into equal sizes boxes. Each box is assigned a processor. Such division minimizes the overhead of communication since most of the atom interactions occur within a box. There still communication between atoms that occur at the borders and such communication is handled as a boundary condition. Atoms and molecules in the system can be mobil and they can move across boxes. Such activity triggers the &amp;quot;Exchange&amp;quot; function that transfers ownership of atoms from one processor to another. Also, since the division of atoms is spatial, some boxes might be saturated with atoms while other boxes barely have any atoms. This in turn is a cause of &amp;quot;Load Imbalance&amp;quot; that can occur in this suite.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4471</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4471"/>
		<updated>2007-09-25T01:47:42Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition'''===&lt;br /&gt;
The LAMMPS suite provides two levels of concurrency just like the ocean problem. The function parallelism is performed across a grid where the parameters like force, energy, temperature and pressure of the atom are computed. These computations are independent per atom. Each atom can be computed by one processor but such fine granularity imposes heavy cost on communication since the computation for each atom depends on neighboring atoms.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite decomposes the domain into a set of equal sized boxes. Since near by atoms are placed on the same processor, only neighboring atoms on different processors need to be communicated. The decomposition of the LAMMPS algorithm is spatial and the computation cost is of O(N/P) and the communication cost is of O(N/P). &lt;br /&gt;
&lt;br /&gt;
==='''Assignment'''===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4444</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4444"/>
		<updated>2007-09-25T00:09:45Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''LAMMPS Algorithm:''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS ('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem) suite is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensamble of particles in a solid, liquid or gaseous state. It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. It is is an integral part of the SPEC MPI 2007 package used to benchmark systems using the Message-Passing Interface. LAMMPS was created in 2003.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS algorithm decompose domain into a set of equal sized boxes. Since nearby atoms are placed on same processor, only neighboring atoms on different processor need to be communicated. The decomposition of the LAMMPS algorithm is spatial &amp;amp; the computation cost is of O(N/P) &amp;amp; the communication cost is of O(N/P). It should be noted that there is a possibility of load imbalance as the domain is decomposed into equal size boxes.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4443</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 4 LA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_4_LA&amp;diff=4443"/>
		<updated>2007-09-25T00:03:20Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Mapping''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.It can model atomic, polymeric, biological, metallic, or granular systems using a variety of force fields and boundary conditions and can be easily modified and extended. LAMMPS is distributed as an [http://lammps.sandia.gov/download.html open source code]. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
This algorithm is performed for every atoms.The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. Once the initialization is completed the various required parameters are calculated(In this flow chart the force/energy is given as an example). After the parameters are calculated the necessary boundary conditions are applied &amp;amp; the atom schemes are integrated to get the desired results. This step is repeated for all the atom schemes. After the results for all the atom schemes are completed the results are analyzed &amp;amp; presented using visualizations schemes for further study.&lt;br /&gt;
&lt;br /&gt;
[[Image:FlowChart.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS algorithm decompose domain into a set of equal sized boxes. Since nearby atoms are placed on same processor, only neighboring atoms on different processor need to be communicated. The decomposition of the LAMMPS algorithm is spatial &amp;amp; the computation cost is of O(N/P) &amp;amp; the communication cost is of O(N/P). It should be noted that there is a possibility of load imbalance as the domain is decomposed into equal size boxes.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. Each processor has information about all the atoms and molecules in its sub-domain and their count. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world. Each processor works within its own three-dimensional box, where it is responsible for a collection of atoms. The LAMMPS suite divides the atoms among processors spatially in what is called &amp;quot;Spatial Decomposition.&amp;quot; Each processor operates within a box and each processor owns a box of the same size as the other processors. Although this design decision is scalable, it does not guarantee load balancing. &lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;br /&gt;
2: [http://etd.lib.fsu.edu/theses/available/etd-07122004-165317/unrestricted/02_JK_RestThesis.pdf Sequential algorithm]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4340</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 3 pa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4340"/>
		<updated>2007-09-24T06:26:42Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Orchestration''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. This algorithm is performed for every atoms.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Flow1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS algorithm decompose domain into a set of equal sized boxes. Since nearby atoms are placed on same processor, only neighboring atoms on different processor need to be communicated. The decomposition of the LAMMPS algorithm is spatial &amp;amp; the computation cost is of O(N/P) &amp;amp; the communication cost is of O(N/P). It should be noted that there is a possibility of load imbalance as the domain is decomposed into equal size boxes.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
  double ComputeTemp::compute_scalar() &lt;br /&gt;
  {&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
    if (mass) {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
            mass[type[i]];&lt;br /&gt;
    } else {&lt;br /&gt;
      for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
        if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
          t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    if (dynamic) recount();&lt;br /&gt;
    scalar *= tfactor;&lt;br /&gt;
    return scalar;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
  void ComputeTemp::compute_vector() &lt;br /&gt;
  {&lt;br /&gt;
    int i;&lt;br /&gt;
&lt;br /&gt;
    double **v = atom-&amp;gt;v;&lt;br /&gt;
    double *mass = atom-&amp;gt;mass;&lt;br /&gt;
    double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
    int *type = atom-&amp;gt;type;&lt;br /&gt;
    int *mask = atom-&amp;gt;mask;&lt;br /&gt;
    int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
    double massone,t[6];&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
    for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
        if (mass) massone = mass[type[i]];&lt;br /&gt;
        else massone = rmass[i];&lt;br /&gt;
        t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
        t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
        t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
        t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
        t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
        t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
    MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
    for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4339</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 3 pa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4339"/>
		<updated>2007-09-24T06:25:01Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Orchestration''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. This algorithm is performed for every atoms.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Flow1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS algorithm decompose domain into a set of equal sized boxes. Since nearby atoms are placed on same processor, only neighboring atoms on different processor need to be communicated. The decomposition of the LAMMPS algorithm is spatial &amp;amp; the computation cost is of O(N/P) &amp;amp; the communication cost is of O(N/P). It should be noted that there is a possibility of load imbalance as the domain is decomposed into equal size boxes.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
double ComputeTemp::compute_scalar()&lt;br /&gt;
&lt;br /&gt;
{&lt;br /&gt;
  double **v = atom-&amp;gt;v;&lt;br /&gt;
  double *mass = atom-&amp;gt;mass;&lt;br /&gt;
  double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
  int *type = atom-&amp;gt;type;&lt;br /&gt;
  int *mask = atom-&amp;gt;mask;&lt;br /&gt;
  int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
  double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
  if (mass) {&lt;br /&gt;
    for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
        t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
          mass[type[i]];&lt;br /&gt;
  } else {&lt;br /&gt;
    for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
        t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
  if (dynamic) recount();&lt;br /&gt;
  scalar *= tfactor;&lt;br /&gt;
  return scalar;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
void ComputeTemp::compute_vector()&lt;br /&gt;
{&lt;br /&gt;
  int i;&lt;br /&gt;
&lt;br /&gt;
  double **v = atom-&amp;gt;v;&lt;br /&gt;
  double *mass = atom-&amp;gt;mass;&lt;br /&gt;
  double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
  int *type = atom-&amp;gt;type;&lt;br /&gt;
  int *mask = atom-&amp;gt;mask;&lt;br /&gt;
  int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
  double massone,t[6];&lt;br /&gt;
  for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
  for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
    if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
      if (mass) massone = mass[type[i]];&lt;br /&gt;
      else massone = rmass[i];&lt;br /&gt;
      t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
      t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
      t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
      t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
      t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
      t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
  for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4338</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 3 pa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4338"/>
		<updated>2007-09-24T06:23:33Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Orchestration''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. This algorithm is performed for every atoms.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Flow1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
The LAMMPS algorithm decompose domain into a set of equal sized boxes. Since nearby atoms are placed on same processor, only neighboring atoms on different processor need to be communicated. The decomposition of the LAMMPS algorithm is spatial &amp;amp; the computation cost is of O(N/P) &amp;amp; the communication cost is of O(N/P). It should be noted that there is a possibility of load imbalance as the domain is decomposed into equal size boxes.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
For computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. Communication is also minimized to optimal level by replicating force computations of boundary atoms. To increase computational efficiency the algorithm uses different timescales for different force computations. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small three-dimensional sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
The following snipit of code shows how the temperature is calculated for each sub-domain. A sub-domain is owned by a single processor and that constitutes a task. The temperature of the sub-domain is derived from the kinetic energy of each atom in the sub-domain. For each atom in the sub-domain, the square of the velocity in each dimension is accumulated, then multiplied by the mass of the atom. The final accumulated value of the sub-domain is sent to the root processor of the world using the MPI_Allreduce function. There, all the values are summed and a value is derived for the whole domain.&lt;br /&gt;
&lt;br /&gt;
double ComputeTemp::compute_scalar()&lt;br /&gt;
{&lt;br /&gt;
  double **v = atom-&amp;gt;v;&lt;br /&gt;
  double *mass = atom-&amp;gt;mass;&lt;br /&gt;
  double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
  int *type = atom-&amp;gt;type;&lt;br /&gt;
  int *mask = atom-&amp;gt;mask;&lt;br /&gt;
  int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
  double t = 0.0;&lt;br /&gt;
&lt;br /&gt;
  if (mass) {&lt;br /&gt;
    for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
        t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) *&lt;br /&gt;
          mass[type[i]];&lt;br /&gt;
  } else {&lt;br /&gt;
    for (int i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
      if (mask[i] &amp;amp; groupbit)&lt;br /&gt;
        t += (v[i][0]*v[i][0] + v[i][1]*v[i][1] + v[i][2]*v[i][2]) * rmass[i];&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  MPI_Allreduce(&amp;amp;t,&amp;amp;scalar,1,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
  if (dynamic) recount();&lt;br /&gt;
  scalar *= tfactor;&lt;br /&gt;
  return scalar;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
As for this snipit of code, it shows how the atoms in this sub-domain affect the atoms in the six neighboring sub-domains. The kinetic energy of each atom (affecting each neighbor) in this sub-domain are accumulated. The vector of values are sent to the root processor of the World. At the root, the vectors from all the sub-domain are accumulated and sent back to the sending processors. We can see that the MPI_Allreduce function was passed six items of a vector, which constitute six neighboring sub-domains.&lt;br /&gt;
&lt;br /&gt;
void ComputeTemp::compute_vector()&lt;br /&gt;
{&lt;br /&gt;
  int i;&lt;br /&gt;
&lt;br /&gt;
  double **v = atom-&amp;gt;v;&lt;br /&gt;
  double *mass = atom-&amp;gt;mass;&lt;br /&gt;
  double *rmass = atom-&amp;gt;rmass;&lt;br /&gt;
  int *type = atom-&amp;gt;type;&lt;br /&gt;
  int *mask = atom-&amp;gt;mask;&lt;br /&gt;
  int nlocal = atom-&amp;gt;nlocal;&lt;br /&gt;
&lt;br /&gt;
  double massone,t[6];&lt;br /&gt;
  for (i = 0; i &amp;lt; 6; i++) t[i] = 0.0;&lt;br /&gt;
&lt;br /&gt;
  for (i = 0; i &amp;lt; nlocal; i++)&lt;br /&gt;
    if (mask[i] &amp;amp; groupbit) {&lt;br /&gt;
      if (mass) massone = mass[type[i]];&lt;br /&gt;
      else massone = rmass[i];&lt;br /&gt;
      t[0] += massone * v[i][0]*v[i][0];&lt;br /&gt;
      t[1] += massone * v[i][1]*v[i][1];&lt;br /&gt;
      t[2] += massone * v[i][2]*v[i][2];&lt;br /&gt;
      t[3] += massone * v[i][0]*v[i][1];&lt;br /&gt;
      t[4] += massone * v[i][0]*v[i][2];&lt;br /&gt;
      t[5] += massone * v[i][1]*v[i][2];&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
  MPI_Allreduce(t,vector,6,MPI_DOUBLE,MPI_SUM,world);&lt;br /&gt;
  for (i = 0; i &amp;lt; 6; i++) vector[i] *= force-&amp;gt;mvv2e;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world.&lt;br /&gt;
&lt;br /&gt;
'''References'''&lt;br /&gt;
1: [http://lammps.sandia.gov/ LAMMPS website]&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4329</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 3 pa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4329"/>
		<updated>2007-09-24T03:32:14Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Mapping''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. This algorithm is performed for every atoms.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Flow1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
For Computational efficiency LAMMPS uses neighbor lists to keep track of the neighboring particles. The lists are optimized for systems with particles that are repulsive at short distances, so that the local density of particles never becomes too large. On parallel machines, LAMMPS uses spatial-decomposition techniques to partition the simulation domain into small 3d sub-domains, one of which is assigned to each processor.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its processor ID, the number of processors in the Universe, the World it belongs to, the number of processors in its world and the total number of worlds. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with its six neighboring processors in its three-dimensional world.&lt;br /&gt;
&lt;br /&gt;
==='''Summary'''===&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4324</id>
		<title>CSC/ECE 506 Fall 2007/wiki2 3 pa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki2_3_pa&amp;diff=4324"/>
		<updated>2007-09-24T02:37:02Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* '''Mapping''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Topic: Parallelizing an application'''&lt;br /&gt;
&lt;br /&gt;
Pick another parallel application, not covered in the text, and less than 7 years old, and describe the various steps in parallelizing it (decomposition, assignment, orchestration, and mapping). You may use an example from the peer-reviewed literature, or a Web page. You do not have to go into great detail, but you should describe enough about these four stages to make the algorithm interesting.&lt;br /&gt;
&lt;br /&gt;
=='''LAMMPS Algorithm:''' ==&lt;br /&gt;
&lt;br /&gt;
The LAMMPS('''L'''arge Scale '''A'''tomic/'''M'''olecular '''M'''assively '''P'''arallel '''S'''ystem)  algorithm is a classical [http://en.wikipedia.org/wiki/Molecular_dynamics molecular dynamics] code developed at [http://www.sandia.gov/index.html Sandia National Labs], New Mexico. This algorithm models the ensemble of particles in a solid, liquid or gaseous state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Sequential Algorithm:'''===&lt;br /&gt;
The initialization step sets up the various parameters for the atom like number of particles, initial velocity, temperature etc. This algorithm is performed for every atoms.&lt;br /&gt;
 &lt;br /&gt;
[[Image:Flow1.jpeg]]&lt;br /&gt;
&lt;br /&gt;
==='''Decomposition &amp;amp; Assignment'''===&lt;br /&gt;
The LAMMPS algorithm provides two levels of concurrency in a single time step just like the ocean problem. The function parallelism is performed across the grid where the parameters like the force, energy, temperature , pressure etc of the atom is computed. The data parallelism is performed for the  function but with different data sets.&lt;br /&gt;
&lt;br /&gt;
==='''Orchestration''' ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==='''Mapping''' ===&lt;br /&gt;
&lt;br /&gt;
The LAMMPS suite utilizes the Message-Passing parallel computing model. This implies that each processor has a copy of all the data. It performs its operations and it sends, receives and broadcasts data as necessary. The LAMMPS suite defines a Universe where all the processors belong. The LAMMPS suite defines a number of Worlds in case different unrelated simulations should run. However, if all the processors available are used to tackle a single problem, then the Universe is said to contain one World. Each processor has its own copy of the LAMMPS suite and it knows some information about the Universe such as its ID, the number of processors in the Universe, the World it belongs to, the number of processor in its world and the total number of worlds. In each world, there exists a processor, which is called the Root processor. Also, the Message-Passing interface is defined for each processor to enable it to communicate with the processors in its world.&lt;br /&gt;
&lt;br /&gt;
==='''Summary'''===&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3273</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3273"/>
		<updated>2007-09-10T21:17:56Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
Up to 1986, advancements in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the established norm has been 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned for use in microprocessors. However, [http://en.wikipedia.org/wiki/Graphics_processing_unit graphics processors (GPU)] have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Instruction_level_parallelism Instruction-level parallelism]'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. [http://en.wikipedia.org/wiki/Superscalar Superscalar] microprocessors were created, which encompassed [http://en.wikipedia.org/wiki/Branch_prediction branch predictors], [http://en.wikipedia.org/wiki/Out_of_order_execution out-of-order execution], deeper and larger levels of [http://en.wikipedia.org/wiki/Cache cache], [http://en.wikipedia.org/wiki/Speculative_execution speculative execution], [http://en.wikipedia.org/wiki/Cache_coherency cache coherency] protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''[http://en.wikipedia.org/wiki/Thread_level_parallelism thread-level parallelism].''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''[http://en.wikipedia.org/wiki/Multi-core_%28computing%29 Multi-Core]'' on chip and the second is ''[http://en.wikipedia.org/wiki/Simultaneous_multithreading Simultaneous Multi-Threading (SMT)]'' (also known as ''[http://en.wikipedia.org/wiki/Hyper_threading Hyper-Threading]''). Industry refrained at this point from using the [http://en.wikipedia.org/wiki/Clock_speed clock speed] as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores (from AMD and Sun respectively). It is foreseen to see sixteen cores on a single chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by [http://en.wikipedia.org/wiki/Intel Intel] and then by [http://en.wikipedia.org/wiki/Amd AMD].  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the [http://en.wikipedia.org/wiki/Itanium Itanium] microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, in 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Instruction Sets and Parallelism===&lt;br /&gt;
&lt;br /&gt;
Following the direction of gearing away from making the clock speed faster, research in instruction sets took off again in the 1990s to exploit more parallelism with [http://en.wikipedia.org/wiki/Explicitly_Parallel_Instruction_Computing Explicit Parallel Instruction Computing (EPIC)]. This technology was implemented in the Itanium processor. It utilizes software in order to exploit more parallelism within instructions. In the early 2000s, support for [http://en.wikipedia.org/wiki/Multiprocessing multiprocessors] was added to instruction sets. This was done by allowing multiprocessors to communicate gluelessly. Multiprocessors are increasingly becoming more able to communicate in a point-to-point fashion without the need for extra hardware or software.&lt;br /&gt;
&lt;br /&gt;
In 1999, the [http://en.wikipedia.org/wiki/Streaming_SIMD_Extensions Streaming SIMD Extensions (SSE)] instruction set was introduced by Intel. This instruction set added eight new 128 bit registers and 70 floating point instructions. In 2000, Intel added a complete complement of integer instructions and 64-bit SIMD floating point instructions to the original SSE registers when they introduced the SSE2 instruction set. In 2004, a revision of Intel's Pentium 4 processor introduced the SSE3 instruction set. This instruction set added specific memory and thread-handling instructions, which improved the performance of Intel's HyperThreading technology.&lt;br /&gt;
&lt;br /&gt;
In an attempt to keep pace with Intel, AMD licensed the SSE3 instruction set and implemented most of its instructions in particular Athlon 64 processors. In the summer of 2007, AMD introduced a new extension of the x86 instruction set: [http://developer.amd.com/sse5.jsp SSE5]. This extension was designed to increase application efficiency and performance by allowing software developers to simplify code and by providing them with additional capabilities.&lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first [http://en.wikipedia.org/wiki/Powerpc PowerPC] microprocessor designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the [http://en.wikipedia.org/wiki/Silicon_on_insulator Silicon-On-Insulator (SOI)] technology, which saved a significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a [http://en.wikipedia.org/wiki/High-k_dielectric high-K] material and electrode metals (instead of [http://en.wikipedia.org/wiki/Polysilicon polysilicon]) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip, among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay, thus continuing the legacy of [http://en.wikipedia.org/wiki/Moore%27s_law Moore's Law].&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
System design has become a very diverse field. There are systems that utilize a single backplane which supports a small amount of microprocessors. Although the number of microprocessors has slowly been inching up, such a technology has been limited to desktops and workstations. Larger loads of work need more microprocessors. Creativity settled in on how to gather those microprocessors into a single system. Some companies took on the challenge of packing many microprocessors into a single system utilizing a shared bus. That challenge has been so tough that only a couple companies are persuing it, such as IBM and HP. Other companies pursued different technologies, such as [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA] and [http://en.wikipedia.org/wiki/Blade_server blade servers], for tight clustering. Larger clusters utilize computer-to-computer links, such as [http://en.wikipedia.org/wiki/Infiniband Infiniband]. Such clusters enter the realm of [http://en.wikipedia.org/wiki/Supercomputer supercomputing], which deserve their [http://pg.ece.ncsu.edu/mediawiki/index.php/CSC/ECE_506_Fall_2007/wiki1_5_1008 own topic].&lt;br /&gt;
&lt;br /&gt;
===PC Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported microprocessors in a computer is ever increasing. Since the mid 2000's, the norm has increasingly been to support more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support).&lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processors that have been supported in a shared bus (for the past decade). A commonality between the technology appearing this decade and in the last decade is that servers throughout these decades supported either a single core or a dual core microprocessor. The industry has been inching towards supporting 100 microprocessors on a single shared bus. Because the bus has a fixed bandwidth, such an approach was bound to reach a dead end if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies are multiple cores per chip, deeper levels of caching and better addressing schemes. Consider a microprocessor with multiple cores as a node. Nodes communicate, and it is left up to the microprocessor to arbitrate between cores, thus relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA]. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cache-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is [http://en.wikipedia.org/wiki/Silicon_Graphics SGI], with its [http://en.wikipedia.org/wiki/SGI_Origin_350 Origin 350] server supporting up to 32 microprocessors.&lt;br /&gt;
&lt;br /&gt;
===Shared Memory Bus Direction===&lt;br /&gt;
&lt;br /&gt;
As microprocessors become faster, and more and more microprocessors (all sharing a common bus) are added to a system, the [http://en.wikipedia.org/wiki/Bandwidth bandwidth] of the bus becomes ever more critical. As shown in Figure 2, the shared bus bandwidth of commercial multiprocessors has increased with time. Various technologies and techniques have been implemented to increase bus bandwidth, such as faster electrical signaling, wider datapaths, pipelined protocols, and multiple paths. In 2001, a bidirectional serial/parallel high-bandwidth, low-latency point to point link called [http://en.wikipedia.org/wiki/Hyper_transport HyperTransport (HT)] was introduced. HT runs from 200 MHz to 2.6 GHz.  It is used in many processors and in high-performance computing. HT has also been used as an interconnect for NUMA multiprocessor systems (see above).&lt;br /&gt;
&lt;br /&gt;
Techniques have also been implemented to alleviate the strain put on the bus. With the [http://en.wikipedia.org/wiki/Pentium_3 Pentium III], Intel introduced an instruction designed to reduce bus contention. This is called the PAUSE instructions, which eliminates the bus transactions that occur when spin lock code repeatedly tries to test and set a memory location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
Culler DE, Singh JP, Gupta A. Parallel Computer Architecture: A Hardware/Software Approach. San Francisco, CA: Morgan Kaufmann Publishers, Inc., 1999.&amp;lt;br&amp;gt;&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.amd.com/us-en/assets/content_type/DownloadableAssets/MPF_Hammer_Presentation.PDF&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.demandtech.com/Resources/Papers/Multiprocessor%20scalability.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hpcwire.com/hpc/1754487.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hypertransport.org/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.mbipr.com/whitepaper5.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sun.com/processors/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3174</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3174"/>
		<updated>2007-09-10T01:24:51Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* System Design Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''[http://pg.ece.ncsu.edu/mediawiki/index.php/CSC/ECE_506_Fall_2007/wiki1_4_la Instruction-level parallelism]'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. [http://en.wikipedia.org/wiki/Superscalar Superscalar] microprocessors were created, which encompassed [http://en.wikipedia.org/wiki/Branch_prediction branch predictors], [http://en.wikipedia.org/wiki/Out_of_order_execution out-of-order execution], deeper and larger levels of [http://en.wikipedia.org/wiki/Cache cache] on chip, [http://en.wikipedia.org/wiki/Cache_coherency cache coherency] protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''[http://en.wikipedia.org/wiki/Thread_level_parallelism thread-level parallelism].''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''[http://en.wikipedia.org/wiki/Multi-core_%28computing%29 Multi-Core]'' on chip and the second is ''[http://en.wikipedia.org/wiki/Simultaneous_multithreading Simultaneous Multi-Threading (SMT)]'' (also known as ''[http://en.wikipedia.org/wiki/Hyper_threading Hyper-Threading]''). Industry refrained at this point from using the [http://en.wikipedia.org/wiki/Clock_speed clock speed] as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores. It is foreseen to see sixteen cores on a single chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by [http://en.wikipedia.org/wiki/Intel Intel] and then by [http://en.wikipedia.org/wiki/Amd AMD].  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the [http://en.wikipedia.org/wiki/Itanium Itanium] microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, in 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Instruction Sets and Parallelism===&lt;br /&gt;
&lt;br /&gt;
Following the direction of gearing away from making the clock speed faster, research in instruction sets took off again in the 1990s to exploit more parallelism with the [http://en.wikipedia.org/wiki/Explicitly_Parallel_Instruction_Computing Explicit Parallel Instruction Computing (EPIC)]. This technology was implemented in the Itanium processor. It utilizes software in order to exploit more parallelism within instructions. In the early 2000s, support for multiprocessors was added to instruction sets. This was done by allowing multiprocessors to communicate gluelessly. Multiprocessors are increasingly becoming more able to communicate in a point-to-point fashion without the need for extra hardware or software. &lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first [http://en.wikipedia.org/wiki/Powerpc PowerPC] microprocessor which was designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the [http://en.wikipedia.org/wiki/Silicon_on_insulator Silicon-On-Insulator (SOI)] technology, which saved significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a [http://en.wikipedia.org/wiki/High-k_dielectric high-K] material and electrode metals (instead of [http://en.wikipedia.org/wiki/Polysilicon polysilicon]) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay continuing the legacy of [http://en.wikipedia.org/wiki/Moore%27s_law Moore's Law].&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
System design has become a very diverse field. There are systems that utilize a single backplane that supports a small amount of microprocessors. Such a number has been inching up and such a technology has been limited to desktops and workstations. Larger loads of work needed more microprocessors. Creativity settled in on how to gather those microprocessors into a single system. Some companies took on the challenge of packing so many microprocessors into a single system utilizing a shared bus. That challenge has been so tough that only a couple of companies are persuing it such as IBM and HP. Other companies pursued different technologies such as ccNUMA and blade servers for tight clustering. Larger clusters utilize computer-to-computer links such as [http://en.wikipedia.org/wiki/Infiniband Infiniband]. Such clusters enter the realm of [http://en.wikipedia.org/wiki/Supercomputer supercomputing], which deserve their own topic.&lt;br /&gt;
&lt;br /&gt;
===PC Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported microprocessors in a computer is ever increasing. Since mid 2000's, the norm has increasingly been to support more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support).&lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processors that have been supported in a shared bus this decade. A commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting 100 microprocessors on a single shared bus. Because the bus has a fixed bandwidth, such an approach was bound to reach a dead end if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies are multiple cores per chip, deeper levels of caching and better addressing schemes. Consider a microprocessor with multiple cores as a node. Nodes communicate, and it is left up to the microprocessor to arbitrate between cores, thus relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA]. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cache-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is [http://en.wikipedia.org/wiki/Silicon_Graphics SGI], with its [http://en.wikipedia.org/wiki/SGI_Origin_350 Origin 350] server supporting up to 32 microprocessors.&lt;br /&gt;
&lt;br /&gt;
===Shared Memory Bus Direction===&lt;br /&gt;
&lt;br /&gt;
As microprocessors become faster, and more and more microprocessors (all sharing a common bus) are added to a system, the [http://en.wikipedia.org/wiki/Bandwidth bandwidth] of the bus becomes ever more critical. As shown in Figure 2, the shared bus bandwidth of commercial multiprocessors has increased with time. Various technologies and techniques have been implemented to increase bus bandwidth, such as faster electrical signaling, wider datapaths, pipelined protocols, and multiple paths. In 2001, a bidirectional serial/parallel high-bandwidth, low-latency point to point link called [http://en.wikipedia.org/wiki/Hyper_transport HyperTransport (HT)] was introduced. HT runs from 200 MHz to 2.6 GHz.  It is used in many processors and in high-performance computing. HT has also been used as an interconnect for NUMA multiprocessor systems (see above).&lt;br /&gt;
&lt;br /&gt;
Techniques have also been implemented to alleviate the strain put on the bus. With the [http://en.wikipedia.org/wiki/Pentium_3 Pentium III], Intel introduced an instruction designed to reduce bus contention. This is called the PAUSE instructions, which eliminates the bus transactions that occur when spin lock code repeatedly tries to test and set a memory location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
Culler DE, Singh JP, Gupta A. Parallel Computer Architecture: A Hardware/Software Approach. San Francisco, CA: Morgan Kaufmann Publishers, Inc., 1999.&amp;lt;br&amp;gt;&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.demandtech.com/Resources/Papers/Multiprocessor%20scalability.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hypertransport.org/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.mbipr.com/whitepaper5.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sun.com/processors/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.amd.com/us-en/assets/content_type/DownloadableAssets/MPF_Hammer_Presentation.PDF&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3173</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3173"/>
		<updated>2007-09-10T01:22:41Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''[http://pg.ece.ncsu.edu/mediawiki/index.php/CSC/ECE_506_Fall_2007/wiki1_4_la Instruction-level parallelism]'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. [http://en.wikipedia.org/wiki/Superscalar Superscalar] microprocessors were created, which encompassed [http://en.wikipedia.org/wiki/Branch_prediction branch predictors], [http://en.wikipedia.org/wiki/Out_of_order_execution out-of-order execution], deeper and larger levels of [http://en.wikipedia.org/wiki/Cache cache] on chip, [http://en.wikipedia.org/wiki/Cache_coherency cache coherency] protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''[http://en.wikipedia.org/wiki/Thread_level_parallelism thread-level parallelism].''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''[http://en.wikipedia.org/wiki/Multi-core_%28computing%29 Multi-Core]'' on chip and the second is ''[http://en.wikipedia.org/wiki/Simultaneous_multithreading Simultaneous Multi-Threading (SMT)]'' (also known as ''[http://en.wikipedia.org/wiki/Hyper_threading Hyper-Threading]''). Industry refrained at this point from using the [http://en.wikipedia.org/wiki/Clock_speed clock speed] as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores. It is foreseen to see sixteen cores on a single chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by [http://en.wikipedia.org/wiki/Intel Intel] and then by [http://en.wikipedia.org/wiki/Amd AMD].  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the [http://en.wikipedia.org/wiki/Itanium Itanium] microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, in 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Instruction Sets and Parallelism===&lt;br /&gt;
&lt;br /&gt;
Following the direction of gearing away from making the clock speed faster, research in instruction sets took off again in the 1990s to exploit more parallelism with the [http://en.wikipedia.org/wiki/Explicitly_Parallel_Instruction_Computing Explicit Parallel Instruction Computing (EPIC)]. This technology was implemented in the Itanium processor. It utilizes software in order to exploit more parallelism within instructions. In the early 2000s, support for multiprocessors was added to instruction sets. This was done by allowing multiprocessors to communicate gluelessly. Multiprocessors are increasingly becoming more able to communicate in a point-to-point fashion without the need for extra hardware or software. &lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first [http://en.wikipedia.org/wiki/Powerpc PowerPC] microprocessor which was designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the [http://en.wikipedia.org/wiki/Silicon_on_insulator Silicon-On-Insulator (SOI)] technology, which saved significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a [http://en.wikipedia.org/wiki/High-k_dielectric high-K] material and electrode metals (instead of [http://en.wikipedia.org/wiki/Polysilicon polysilicon]) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay continuing the legacy of [http://en.wikipedia.org/wiki/Moore%27s_law Moore's Law].&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
System design has become a very diverse field. There are systems that utilize a single backplane that supports a small amount of microprocessors. Such a number has been inching up and such a technology has been limited to desktops and workstations. Larger loads of work needed more microprocessors. Creativity settled in on how to gather those microprocessors into a single system. Some companies took on the challenge of packing so many microprocessors into a single system utilizing a shared bus. That challenge has been so tough that only a couple of companies are persuing it such as IBM and HP. Other companies pursued different technologies such as ccNUMA and blade servers for tight clustering. Larger clusters utilize computer-to-computer links such as Infiniband. Such clusters enter the realm of [http://en.wikipedia.org/wiki/Supercomputer supercomputing], which deserve their own topic.&lt;br /&gt;
&lt;br /&gt;
===PC Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported microprocessors in a computer is ever increasing. Since mid 2000's, the norm has increasingly been to support more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support).&lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processors that have been supported in a shared bus this decade. A commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting 100 microprocessors on a single shared bus. Because the bus has a fixed bandwidth, such an approach was bound to reach a dead end if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies are multiple cores per chip, deeper levels of caching and better addressing schemes. Consider a microprocessor with multiple cores as a node. Nodes communicate, and it is left up to the microprocessor to arbitrate between cores, thus relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA]. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cache-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is [http://en.wikipedia.org/wiki/Silicon_Graphics SGI], with its [http://en.wikipedia.org/wiki/SGI_Origin_350 Origin 350] server supporting up to 32 microprocessors.&lt;br /&gt;
&lt;br /&gt;
===Shared Memory Bus Direction===&lt;br /&gt;
&lt;br /&gt;
As microprocessors become faster, and more and more microprocessors (all sharing a common bus) are added to a system, the [http://en.wikipedia.org/wiki/Bandwidth bandwidth] of the bus becomes ever more critical. As shown in Figure 2, the shared bus bandwidth of commercial multiprocessors has increased with time. Various technologies and techniques have been implemented to increase bus bandwidth, such as faster electrical signaling, wider datapaths, pipelined protocols, and multiple paths. In 2001, a bidirectional serial/parallel high-bandwidth, low-latency point to point link called [http://en.wikipedia.org/wiki/Hyper_transport HyperTransport (HT)] was introduced. HT runs from 200 MHz to 2.6 GHz.  It is used in many processors and in high-performance computing. HT has also been used as an interconnect for NUMA multiprocessor systems (see above).&lt;br /&gt;
&lt;br /&gt;
Techniques have also been implemented to alleviate the strain put on the bus. With the [http://en.wikipedia.org/wiki/Pentium_3 Pentium III], Intel introduced an instruction designed to reduce bus contention. This is called the PAUSE instructions, which eliminates the bus transactions that occur when spin lock code repeatedly tries to test and set a memory location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
Culler DE, Singh JP, Gupta A. Parallel Computer Architecture: A Hardware/Software Approach. San Francisco, CA: Morgan Kaufmann Publishers, Inc., 1999.&amp;lt;br&amp;gt;&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.demandtech.com/Resources/Papers/Multiprocessor%20scalability.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hypertransport.org/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.mbipr.com/whitepaper5.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sun.com/processors/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.amd.com/us-en/assets/content_type/DownloadableAssets/MPF_Hammer_Presentation.PDF&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3172</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3172"/>
		<updated>2007-09-10T01:05:18Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''[http://pg.ece.ncsu.edu/mediawiki/index.php/CSC/ECE_506_Fall_2007/wiki1_4_la Instruction-level parallelism]'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. [http://en.wikipedia.org/wiki/Superscalar Superscalar] microprocessors were created, which encompassed [http://en.wikipedia.org/wiki/Branch_prediction branch predictors], [http://en.wikipedia.org/wiki/Out_of_order_execution out-of-order execution], deeper and larger levels of [http://en.wikipedia.org/wiki/Cache cache] on chip, [http://en.wikipedia.org/wiki/Cache_coherency cache coherency] protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''[http://en.wikipedia.org/wiki/Thread_level_parallelism thread-level parallelism].''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''[http://en.wikipedia.org/wiki/Multi-core_%28computing%29 Multi-Core]'' on chip and the second is ''[http://en.wikipedia.org/wiki/Simultaneous_multithreading Simultaneous Multi-Threading (SMT)]'' (also known as ''[http://en.wikipedia.org/wiki/Hyper_threading Hyper-Threading]''). Industry refrained at this point from using the [http://en.wikipedia.org/wiki/Clock_speed clock speed] as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores. It is foreseen to see sixteen cores on a single chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by [http://en.wikipedia.org/wiki/Intel Intel] and then by [http://en.wikipedia.org/wiki/Amd AMD].  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the [http://en.wikipedia.org/wiki/Itanium Itanium] microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, in 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Instruction Sets and Parallelism===&lt;br /&gt;
&lt;br /&gt;
Following the direction of gearing away from making the clock speed faster, research in instruction sets took off again in the 1990s to exploit more parallelism with the [http://en.wikipedia.org/wiki/Explicitly_Parallel_Instruction_Computing Explicit Parallel Instruction Computing (EPIC)]. This technology was implemented in the Itanium processor. It utilizes software in order to exploit more parallelism within instructions. In the early 2000s, support for multiprocessors was added to instruction sets. This was done by allowing multiprocessors to communicate gluelessly. Multiprocessors are increasingly becoming more able to communicate in a point-to-point fashion without the need for extra hardware or software. &lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first [http://en.wikipedia.org/wiki/Powerpc PowerPC] microprocessor which was designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the [http://en.wikipedia.org/wiki/Silicon_on_insulator Silicon-On-Insulator (SOI)] technology, which saved significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a [http://en.wikipedia.org/wiki/High-k_dielectric high-K] material and electrode metals (instead of [http://en.wikipedia.org/wiki/Polysilicon polysilicon]) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay continuing the legacy of [http://en.wikipedia.org/wiki/Moore%27s_law Moore's Law].&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===PC Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported microprocessors in a computer is ever increasing. Since mid 2000's, the norm has increasingly been to support more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support).&lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processors that have been supported in a shared bus this decade. A commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting 100 microprocessors on a single shared bus. Because the bus has a fixed bandwidth, such an approach was bound to reach a dead end if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies are multiple cores per chip, deeper levels of caching and better addressing schemes. Consider a microprocessor with multiple cores as a node. Nodes communicate, and it is left up to the microprocessor to arbitrate between cores, thus relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA]. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cache-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is [http://en.wikipedia.org/wiki/Silicon_Graphics SGI], with its [http://en.wikipedia.org/wiki/SGI_Origin_350 Origin 350] server supporting up to 32 microprocessors.&lt;br /&gt;
&lt;br /&gt;
===Shared Memory Bus Direction===&lt;br /&gt;
&lt;br /&gt;
As microprocessors become faster, and more and more microprocessors (all sharing a common bus) are added to a system, the [http://en.wikipedia.org/wiki/Bandwidth bandwidth] of the bus becomes ever more critical. As shown in Figure 2, the shared bus bandwidth of commercial multiprocessors has increased with time. Various technologies and techniques have been implemented to increase bus bandwidth, such as faster electrical signaling, wider datapaths, pipelined protocols, and multiple paths. In 2001, a bidirectional serial/parallel high-bandwidth, low-latency point to point link called [http://en.wikipedia.org/wiki/Hyper_transport HyperTransport (HT)] was introduced. HT runs from 200 MHz to 2.6 GHz.  It is used in many processors and in high-performance computing. HT has also been used as an interconnect for NUMA multiprocessor systems (see above).&lt;br /&gt;
&lt;br /&gt;
Techniques have also been implemented to alleviate the strain put on the bus. With the [http://en.wikipedia.org/wiki/Pentium_3 Pentium III], Intel introduced an instruction designed to reduce bus contention. This is called the PAUSE instructions, which eliminates the bus transactions that occur when spin lock code repeatedly tries to test and set a memory location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
Culler DE, Singh JP, Gupta A. Parallel Computer Architecture: A Hardware/Software Approach. San Francisco, CA: Morgan Kaufmann Publishers, Inc., 1999.&amp;lt;br&amp;gt;&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.demandtech.com/Resources/Papers/Multiprocessor%20scalability.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hypertransport.org/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.mbipr.com/whitepaper5.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sun.com/processors/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.amd.com/us-en/assets/content_type/DownloadableAssets/MPF_Hammer_Presentation.PDF&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3147</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=3147"/>
		<updated>2007-09-09T06:14:31Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''[http://pg.ece.ncsu.edu/mediawiki/index.php/CSC/ECE_506_Fall_2007/wiki1_4_la Instruction-level parallelism]'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. [http://en.wikipedia.org/wiki/Superscalar Superscalar] microprocessors were created, which encompassed [http://en.wikipedia.org/wiki/Branch_prediction branch predictors], [http://en.wikipedia.org/wiki/Out_of_order_execution out-of-order execution], deeper and larger levels of [http://en.wikipedia.org/wiki/Cache cache] on chip, [http://en.wikipedia.org/wiki/Cache_coherency cache coherency] protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''[http://en.wikipedia.org/wiki/Thread_level_parallelism thread-level parallelism].''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''[http://en.wikipedia.org/wiki/Multi-core_%28computing%29 Multi-Core]'' on chip and the second is ''[http://en.wikipedia.org/wiki/Simultaneous_multithreading Simultaneous Multi-Threading (SMT)]'' (also known as ''[http://en.wikipedia.org/wiki/Hyper_threading Hyper-Threading]''). Industry refrained at this point from using the [http://en.wikipedia.org/wiki/Clock_speed clock speed] as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores. It is foreseen to see sixteen cores on a single chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by [http://en.wikipedia.org/wiki/Intel Intel] and then by [http://en.wikipedia.org/wiki/Amd AMD].  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the [http://en.wikipedia.org/wiki/Itanium Itanium] microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, in 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first [http://en.wikipedia.org/wiki/Powerpc PowerPC] microprocessor which was designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the [http://en.wikipedia.org/wiki/Silicon_on_insulator Silicon-On-Insulator (SOI)] technology, which saved significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a [http://en.wikipedia.org/wiki/High-k_dielectric high-K] material and electrode metals (instead of [http://en.wikipedia.org/wiki/Polysilicon polysilicon]) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay continuing the legacy of [http://en.wikipedia.org/wiki/Moore%27s_law Moore's Law].&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===PC Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported microprocessors in a computer is ever increasing. Since mid 2000's, the norm has increasingly been to support more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support).&lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processors that have been supported in a shared bus this decade. A commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting 100 microprocessors on a single shared bus. Because the bus has a fixed bandwidth, such an approach was bound to reach a dead end if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies are multiple cores per chip, deeper levels of caching and better addressing schemes. Consider a microprocessor with multiple cores as a node. Nodes communicate, and it is left up to the microprocessor to arbitrate between cores, thus relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called [http://en.wikipedia.org/wiki/Ccnuma#Cache_coherent_NUMA_.28ccNUMA.29 ccNUMA]. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cache-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is [http://en.wikipedia.org/wiki/Silicon_Graphics SGI], with its [http://en.wikipedia.org/wiki/SGI_Origin_350 Origin 350] server supporting up to 32 microprocessors.&lt;br /&gt;
&lt;br /&gt;
===Shared Memory Bus Direction===&lt;br /&gt;
&lt;br /&gt;
As microprocessors become faster, and more and more microprocessors (all sharing a common bus) are added to a system, the [http://en.wikipedia.org/wiki/Bandwidth bandwidth] of the bus becomes ever more critical. As shown in Figure 2, the shared bus bandwidth of commercial multiprocessors has increased with time. Various technologies and techniques have been implemented to increase bus bandwidth, such as faster electrical signaling, wider datapaths, pipelined protocols, and multiple paths. In 2001, a bidirectional serial/parallel high-bandwidth, low-latency point to point link called [http://en.wikipedia.org/wiki/Hyper_transport HyperTransport (HT)] was introduced. HT runs from 200 MHz to 2.6 GHz.  It is used in many processors and in high-performance computing. HT has also been used as an interconnect for NUMA multiprocessor systems (see above).&lt;br /&gt;
&lt;br /&gt;
Techniques have also been implemented to alleviate the strain put on the bus. With the [http://en.wikipedia.org/wiki/Pentium_3 Pentium III], Intel introduced an instruction designed to reduce bus contention. This is called the PAUSE instructions, which eliminates the bus transactions that occur when spin lock code repeatedly tries to test and set a memory location.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
Culler DE, Singh JP, Gupta A. Parallel Computer Architecture: A Hardware/Software Approach. San Francisco, CA: Morgan Kaufmann Publishers, Inc., 1999.&amp;lt;br&amp;gt;&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.demandtech.com/Resources/Papers/Multiprocessor%20scalability.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.hypertransport.org/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.mbipr.com/whitepaper5.pdf&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.sun.com/processors/&amp;lt;br&amp;gt;&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2867</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2867"/>
		<updated>2007-09-06T00:55:58Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores, with the promise of sixteen cores on a single chip to be made in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by Intel and then by AMD.  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the Itanium microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, In 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
In 1998, IBM announced its first PowerPC microprocessor which was designed using copper wiring. IBM claimed that its performance was boosted by up to a third by utilizing that technology. In 2004, it announced developing chips utilizing the Silicon-On-Insulator (SOI) technology, which saved significant amount of power. Finally in 2007, Intel and IBM announced recently that they were able to produce a high-K material and electrode metals (instead of polysilicon) that will enable the mass production of chips in 45nm technology. Dual core and dual threaded microprocessors have already been designed in 65nm technology. Designing microprocessors in 45nm technology will enable adding more cores and cache to the chip among other features. Coupled with the technologies mentioned earlier, performance will increase and power consumption will be kept at bay.&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===Desktop Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported processors in a computer is ever increasing. In mid 2000's, the norm has increasingly been supporting more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support). &lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processrs that has been supported this decade in a shared bus. However, a commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting a 100 microprocessors on a single shared bus. Such an approach is bound to reaching a deadend if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies we mention multiple cores per chip, deeper levels of caching and better addressing schemes. If a microprocessor with multiple cores was considered a node, nodes communicate and it is left to the microprocessor to arbitrate between cores relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called ccNUMA. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cahce-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is SGI with its Origin 350 server supporting up to 32 microprocessors. &lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;center&amp;gt;http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&amp;lt;/center&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&amp;lt;/center&amp;gt;&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&lt;br /&gt;
http://compoundsemiconductor.net/articles/news/11/1/25&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2856</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2856"/>
		<updated>2007-09-06T00:43:40Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores, with the promise of sixteen cores on a single chip to be made in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by Intel and then by AMD.  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the Itanium microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, In 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===Desktop Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported processors in a computer is ever increasing. In mid 2000's, the norm has increasingly been supporting more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support). &lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processrs that has been supported this decade in a shared bus. However, a commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting a 100 microprocessors on a single shared bus. Such an approach is bound to reaching a deadend if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies we mention multiple cores per chip, deeper levels of caching and better addressing schemes. If a microprocessor with multiple cores was considered a node, nodes communicate and it is left to the microprocessor to arbitrate between cores relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&lt;br /&gt;
Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called ccNUMA. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cahce-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is SGI with its Origin 350 server supporting up to 32 microprocessors. &lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&lt;br /&gt;
&amp;lt;br&amp;gt;Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2855</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2855"/>
		<updated>2007-09-06T00:42:45Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: /* Update section 1.1.3: Architectural Trends */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores, with the promise of sixteen cores on a single chip to be made in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by Intel and then by AMD.  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the Itanium microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, In 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
===Silicon Technologies===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===Desktop Direction===&lt;br /&gt;
&lt;br /&gt;
The number of supported processors in a computer is ever increasing. In mid 2000's, the norm has increasingly been supporting more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support). &lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows the number of processrs that has been supported this decade in a shared bus. However, a commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting a 100 microprocessors on a single shared bus. Such an approach is bound to reaching a deadend if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies we mention multiple cores per chip, deeper levels of caching and better addressing schemes. If a microprocessor with multiple cores was considered a node, nodes communicate and it is left to the microprocessor to arbitrate between cores relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&lt;br /&gt;
Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&lt;br /&gt;
&lt;br /&gt;
A different class of servers is emerging which is neither an SMP or a cluster. It is called ccNUMA. ccNUMA servers utilize Cache-Coherent Non-Uniform Memory Access. Such servers provide better memory access time to local memory. However, the different copies of the same data are kept up to date through cahce-coherency protocols. Such technology is being supported by Intel and AMD. Another server manufacturer supporting this technology is SGI with its Origin 350 server supporting up to 32 microprocessors. &lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&lt;br /&gt;
Figure 2. Bandwidth of the shared memory bus in commercial multiprocessors.&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;br /&gt;
http://www.sgi.com/products/remarketed/offering.html&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2843</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2843"/>
		<updated>2007-09-06T00:32:21Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
The textbook discusses that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millennium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit and 256-bit wide datapaths and it is possible to see an increase to 512-bit wide datapaths soon, especially with the advancements in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more precise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage for the next level of parallelism to be exploited: ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors in existence today with four and eight cores, with the promise of sixteen cores on a single chip to be made in a matter of months.&lt;br /&gt;
&lt;br /&gt;
===Clock Speed and Parallelism===&lt;br /&gt;
In the PC system world, throughout the 1990's and early 2000's, increasing chip clock speed was the standard way to increase system performance. Desktop processors topped 1GHz clock speeds in 2000, 2GHz in 2001, and topped 3GHz in 2002. But, due to power demands and heat concerns, this trend has since been discontinued. Design obstacles, especially in laptop computers, meant that other methods had to be pursued in order to increase processing power without losing efficiency. The ''Multi-Core'' era was then introduced to the PC world. In the spring of 2005, dual-core chips were introduced by Intel and then by AMD.  Quad-core processors have reached the market, and octal-cores may hit the market by 2009.&lt;br /&gt;
&lt;br /&gt;
In 2002, Intel released the Itanium microprocessor, which takes advantage of explicit ''instruction-level parallelism''. The compiler makes decisions about which instructions to execute in parallel, allowing the processor to execute up to six instructions per clock cycle. Although the original (and several subsequent) Itanium processors contained a single core, In 2006, Intel released an Itanium dual core microprocessor. The future of the Itanium family will follow the trend of most other microprocessors, in that ''thread-level parallelism'' will be exploited via multi-core chips.&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
===Desktop Direction===&lt;br /&gt;
The number of supported processors in a computer is ever increasing. In mid 2000's, the norm has increasingly been supporting more than one processor in a desktop computer (with laptops following closely behind). Intel and AMD are in a constant race to provide a stronger chip which provides higher performance (with multiple cores) and higher bandwidth (with faster electrical signaling, wider datapaths, pipelined protocols, multiple paths and software support). &lt;br /&gt;
&lt;br /&gt;
===Server Direction===&lt;br /&gt;
Figure 1 shows the number of processrs that has been supported this decade in a shared bus. However, a commonality between the technology appearing this decade and in the last decade is that servers at these times supported either a single core or a dual core microprocessor. The industry has been inching towards supporting a 100 microprocessors on a single shared bus. Such an approach is bound to reaching a deadend if new levels of indirection were not exploited. Indeed, new technologies have made supporting more microprocessors on a shared bus more feasible. Among these technologies we mention multiple cores per chip, deeper levels of caching and better addressing schemes. If a microprocessor with multiple cores was considered a node, nodes communicate and it is left to the microprocessor to arbitrate between cores relieving the shared bus from this addressing strain. With the constant improvements in multiple core support within a chip, it is possible to see servers with over two hundred cores as soon as this decade. &lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&lt;br /&gt;
Figure 1. Number of processors in fully configured commercial bus-based share memory multiprocessors.&lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2339</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2339"/>
		<updated>2007-09-04T23:41:48Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
It is discussed in the book that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millinium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit wide datapaths and it is possible to see an increase to 256-bit wide datapaths soon, especially with the advancement in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' has receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more percise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage to the next level of parallelism to be exploited; ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors exist with four and eight cores with the promise to have sixteen cores on a chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG&lt;br /&gt;
http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2338</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2338"/>
		<updated>2007-09-04T23:39:53Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
It is discussed in the book that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millinium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit wide datapaths and it is possible to see an increase to 256-bit wide datapaths soon, especially with the advancement in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' has receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more percise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage to the next level of parallelism to be exploited; ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors exist with four and eight cores with the promise to have sixteen cores on a chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Figures==&lt;br /&gt;
[[Image:http://upload.wikimedia.org/wikipedia/commons/3/32/Procs.JPG]]&lt;br /&gt;
[[Image:http://upload.wikimedia.org/wikipedia/commons/5/5e/Bandwidth.JPG]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2337</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2337"/>
		<updated>2007-09-04T23:02:31Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
It is discussed in the book that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millinium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit wide datapaths and it is possible to see an increase to 256-bit wide datapaths soon, especially with the advancement in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' has receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more percise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage to the next level of parallelism to be exploited; ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors exist with four and eight cores with the promise to have sixteen cores on a chip in a matter of months.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==System Design Trends==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
http://www.endian.net/details.aspx?ItemNo=655&lt;br /&gt;
http://www-05.ibm.com/se/news/sv/2007/05/power-timeline.html&lt;br /&gt;
http://www-03.ibm.com/servers/eserver/pseries/hardware/whitepapers/power/ppc_arch.html&lt;br /&gt;
http://www.theinquirer.net/?article=9235&lt;br /&gt;
http://www.sun.com/processors/&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2336</id>
		<title>CSC/ECE 506 Fall 2007/wiki1 4 la</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_506_Fall_2007/wiki1_4_la&amp;diff=2336"/>
		<updated>2007-09-04T22:58:05Z</updated>

		<summary type="html">&lt;p&gt;Laaboue: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Update section 1.1.3: Architectural Trends=&lt;br /&gt;
&lt;br /&gt;
==Microprocessor Design Trends==&lt;br /&gt;
&lt;br /&gt;
It is discussed in the book that up to 1986, advancement in microprocessors were dominated by ''bit-level parallelism''. It started with 4-bit datapaths, followed by 8-bit, 16-bit and 32-bit wide datapaths. In server design, the norm has been established to be at 64-bit since the start of the millinium. A 128-bit datapath is rarely mentioned to be used in microprocessors. However, graphics processors have been using 128-bit wide datapaths and it is possible to see an increase to 256-bit wide datapaths soon, especially with the advancement in computer graphics, animations and gaming.&lt;br /&gt;
&lt;br /&gt;
''Instruction-level parallelism'' took off as advancements in ''bit-level parallelism'' has receded. After all, the benefits possible by advancements in ''bit-level parallelism'' are limited to the ability to address more storage space and the ability to do more in a single cycle. The latter benefit has been limited to more percise floating point calculation although some microprocessors have the ability to bundle a couple of instructions into one.&lt;br /&gt;
&lt;br /&gt;
The period within the 1980's and 1990's indeed set the stage for the modern microprocessor. Superscalar microprocessors were created, which encompassed branch predictors, out-of-order execution, deeper and larger levels of cache on chip, cache coherency protocols and the ability to communicate with other microprocessors on chip. Research done in the 1990's and early 2000's set the stage to the next level of parallelism to be exploited; ''thread-level parallelism.''&lt;br /&gt;
&lt;br /&gt;
Two technologies appeard in the 2000's that altered the microprocessor performance race. The first is ''Multiple Cores'' on chip and the second is ''Simultaneous Multi-Threading (SMT)'' (also known as ''Hyper-Threading''). Industry refrained at this point from using the clock speed as the performance metric since a microprocessor encompassed many more intertwined technologies than merely speeding up the clock cycle. The industry has seen two cores on a single chip. Then, it saw cores taking advantage of SMT. The number of cores and the number of threads exploited in a microprocessor are ever increasing. Both core and thread technologies are increasing in the number of threads they are able to support. Dual core processors and dual thread processors are already in existence with the promise to merge both technologies so each core can support two threads. There are microprocessors exist with four and eight cores with the promise to have sixteen cores on a chip in a matter of months.&lt;/div&gt;</summary>
		<author><name>Laaboue</name></author>
	</entry>
</feed>